A simple model for the boarding of an airplane is studied. Passengers have reserved seats but enter the airplane in arbitrary order. Queues are formed along the aisle, as some passengers have to wait to reach the seats for which they have reservation. We label a passenger by the number of his or her reserved seat. In most cases the boarding process is much slower than for the optimal situation, where passenger and seat orders are identical. We study this dynamical system by calculating the average boarding time when all permutations of N passengers are given equal weight. To first order, the boarding time for a given permutation (ordering) of the passengers is given by the number s of sequences of monotonically increasing values in the permutation. We show that the distribution of s is symmetric on [1,N], which leads to an average boarding time (N + 1)/2. We have found an exact expression for s and have shown that the full distribution of s approaches a normal distribution as N increases. However, there are significant corrections to the first-order results, due to certain correlations between passenger ordering and the substrate (seat ordering). This occurs for some cases in which the sequence of the seats is partially mirrored in the passenger ordering. These cases with correlations have a boarding time that is lower than predicted by the first-order results. The large number of cases with reduced boarding times have been classified. We also give some indicative results on the geometry of the correlations, with sorting into geometry groups. With increasing N, both the number of correlation types and the number of cases belonging to each type increase rapidly. Using enumeration we find that as a result of these correlations the average boarding time behaves like N-alpha, with alpha similar or equal to 0.69, as compared with alpha = 1.0 for the first-order approximation.