When one position in an arrangement has a condition, fill that position first, then fill the rest. This keeps the number of choices for each position clear, and it is the most reliable way to avoid over- or under-counting in permutations and combinations.
This lesson follows on from deciding whether order matters, because every example here is an ordered arrangement.
How does filling a restricted position first work?
Think of each position as a box, and write the number of choices above each box. Multiply them together.
- Draw the boxes, one per position.
- Find the restricted box (an even last digit, a person who must be first, a letter that must be in the middle).
- Fill it first, counting only choices that satisfy the condition.
- Fill the other boxes from left to right, reducing the choices each time because items cannot be reused.
- Multiply.
If an item is fixed to a position and all the items are different, the other n − 1 items are arranged freely: (n − 1)!.
Worked example
How many 4-digit even numbers can be made from the digits 1 to 9, if no digit can be used more than once?
Step 1, boxes: there are 4 boxes. The last digit must be even.
Step 2, restricted box first: the even digits available are 2, 4, 6 and 8, so there are 4 choices for the last box.
Step 3, other boxes: 8 digits are left for the first box, 7 for the second and 6 for the third.
Step 4, multiply:
4 × 8 × 7 × 6 = 4 × 336 = 1344
Check (a different route): count the even numbers as the total minus the odd ones. Total = 9 × 8 × 7 × 6 = 3024. Odd numbers: 5 odd digits for the last box, then 8 × 7 × 6 = 336, so 5 × 336 = 1680. Then 3024 − 1680 = 1344. The two routes agree.
The mistake to watch for
A common slip is to fill the boxes from left to right and only think about the condition at the end.
Mistaken answer: 9 × 8 × 7 × 4 = 2016
The student fills the first three places freely and then says “4 even digits for the last one”.
This is wrong because the first three places may already have used some of the even digits. The number left for the last box depends on what happened earlier, so there is no single value of 4. Filling the last box first removes that problem.
Correction: last box 4 ways, then 8 × 7 × 6, giving 1344.
Check yourself
1. Five people stand in a row. One particular person must stand in the middle. How many arrangements are there?
Show answer
The middle is fixed, so the other 4 people fill the other 4 places freely: 4! = 24.
2. How many 4-digit odd numbers can be formed from the digits 1 to 7, with no digit repeated?
Show answer
The last digit must be odd: 1, 3, 5 or 7, so 4 choices. Then 6 × 5 × 4 for the other boxes. 4 × 6 × 5 × 4 = 480.
3. The 5 letters of the word MATHS are arranged in a row, using each letter once. How many arrangements start with a consonant?
Show answer
Only A is a vowel, so there are 4 consonants for the first box. The other 4 letters fill 4 places in 4! = 24 ways. 4 × 24 = 96.
Check: total 5! = 120, and arrangements starting with A number 24, so 120 − 24 = 96.
Where this leads next
Next, see how conditions work when you are choosing a group rather than arranging one, in counting selections with a restriction. Then try the mixed practice set.
Students who follow the boxes method in class sometimes still start with the wrong box in a new question. A teacher in online one-to-one Additional Mathematics tuition can practise that first step with you until it is automatic.