# There are 7 children in a classroom. In how many ways can they line up for recess?

##### 1 Answer
Dec 21, 2014

7! = 7*6*5*4*3*2*1 = 5040.

This particular problem is a permutation. Recall, the difference between permutations and combinations is that, with permutations, order matters. Given that the question asks how many ways the students can line up for recess (i.e. how many different orders), this is a permutation.

Imagine for the moment that we were filling only two positions, position 1 and position 2. In order to differentiate between our students, because order matters, we will assign each a letter from A to G. Now, if we are filling these positions one at a time, we have seven options to fill the first position: A, B, C, D, E, F, and G. However, once that position is filled, we have only six options for the second, because one of the students has already been positioned.

As an example, suppose A is in position 1. Then our possible orders for our two positions are AB (i.e. A in position 1 and B in position 2), AC, AD, AE, AF, AG. However...this does not account for all of the possible orders here, as there are 7 options for the first position. Thus, if B were in position 1, we would have as possibilities BA, BC, BD, BE, BF, and BG. Thus we multiply our numbers of options together: $7 \cdot 6 = 42$

Looking back at the initial problem, there are 7 students who can be placed in position 1 (again, assuming that we fill positions 1 through 7 in order). Once position 1 is filled, 6 students can be placed in position 2. With positions 1 and 2 filled, 5 can be placed in position 3, et cetera, up until only one student may be placed in the last position. Thus, multiplying our numbers of options together, we get $7 \cdot 6 \cdot 5 \cdot 4 \cdot 3 \cdot 2 \cdot 1 = 5040$.

For a more general formula to find the number of permutations of $n$ objects taken $r$ at a time, without replacement (i.e., the student in position 1 doesn't return to the waiting area and become an option for position 2), we tend to use the formula:

Number of permutations = $\text{n!"/"(n-r)!}$.

with $n$ the number of objects, $r$ the number of positions to be filled, and ! the symbol for the factorial, an operation which acts on a non-negative integer $a$ such that a! = $a \times \left(a - 1\right) \times \left(a - 2\right) \times \left(a - 3\right) \times \ldots \times \left(1\right)$

Thus, using our formula with the original problem, where we have 7 students taken 7 at a time (e.g. we wish to fill 7 positions), we have
"7!"/"(7-7)!" = (7*6*5*4*3*2*1)/(0!) = (7*6*5*4*3*2*1)/1 = 7!

It might seem counter-intuitive that 0! = 1; however, this is indeed the case.