How many ways can six books stand on a shelf, or three medals go to ten runners? Draw one box for each position, write how many choices are left for it, and multiply. That single idea gives \(n!\), the permutation formula \({}^{n}P_{r}\) and every arrangement with a restriction.
If one choice can be made in \(m\) ways and then a second in \(n\) ways, the two together can be made in \(m \times n\) ways. So \(n\) different items can be arranged in a row in \(n! = n(n - 1)(n - 2) \cdots 3 \times 2 \times 1\) ways, with \(0! = 1\), and \(r\) of them can be chosen and arranged in order in \({}^{n}P_{r} = \dfrac{n!}{(n - r)!}\) ways. Deal with restrictions FIRST: fill the restricted boxes, glue items that must be together into one block, and count 'not together' as total minus together.
Fig. 1: the box method. Each position gets a box holding the number of choices left for it; with no repetition the numbers fall by 1 from box to box, and the answer is their product, 9 × 8 × 7 × 6 = 3024 = 9P4
Section 01
Boxes, choices and n factorial.
Counting arrangements one by one is hopeless beyond tiny cases. Instead draw a box for each position, write in it how many choices are still available, and multiply (Fig. 1). Arranging ALL \(n\) different items in a row fills \(n\) boxes with \(n, n - 1, \dots, 1\), so there are \(n!\) ('\(n\) factorial') arrangements. Factorials grow fast: \(5! = 120\), \(8! = 40\,320\), \(10! = 3\,628\,800\).
Factorial: \(n! = n \times (n - 1) \times \cdots \times 2 \times 1\), and \(n! = n \times (n - 1)!\).
Zero factorial: putting \(n = 1\) in \(n! = n \times (n - 1)!\) gives \(1! = 1 \times 0!\), so \(0! = 1\). (There is exactly one way to arrange nothing.)
Cancelling: \(\dfrac{9!}{7!} = \dfrac{9 \times 8 \times 7!}{7!} = 72\). Write the bigger factorial down to the smaller one, then cancel.
Worked example Books on a shelf and a code
(a) In how many ways can 6 different books be arranged in a row on a shelf? (b) A code is made from 4 different digits chosen from 1 to 9. How many codes are possible?
Factorials do not cancel like ordinary numbers: \(\dfrac{6!}{3!}\) is \(6 \times 5 \times 4 = 120\), NOT \(2!\), and \((2n)!\) is not \(2 \times n!\). Also \(0! = 1\), not 0, so \(\dfrac{5!}{0!} = 120\).
Section 02
Choose some, arrange them: nPr.
Often you arrange only some of the items. Choosing and ordering \(r\) items from \(n\) different ones fills \(r\) boxes with \(n, n - 1, \dots, n - r + 1\). Multiplying by \(\dfrac{(n - r)!}{(n - r)!}\) turns that product into a neat formula. Order matters in a permutation: gold to Ana and silver to Ben is different from gold to Ben and silver to Ana.
\[ {}^{n}P_{r} = n(n - 1)(n - 2) \cdots (n - r + 1) = \frac{n!}{(n - r)!}, \qquad 0 \le r \le n \]
The formula is \(\dfrac{n!}{(n - r)!}\), not \(\dfrac{n!}{r!}\): \({}^{7}P_{3} = \dfrac{7!}{4!} = 210\), whereas \(\dfrac{7!}{3!} = 840\). And always reject the negative root of an equation like \(n(n - 1) = 56\): there is no such thing as \(-7\) runners.
Stage 1 · Learn
Check your understanding
Four quick checks. Each correct answer earns XP and records this skill on your profile.
Quick check+10 XP
Evaluate \(5!\).
Quick check+10 XP
Evaluate \({}^{7}P_{3}\).
Quick check+10 XP
What is the value of \(0!\)?
Quick check+10 XP
Five people stand in a row. In how many arrangements do two particular people, A and B, stand next to each other?
Section 03
Arrangements with restrictions.
Most exam questions add a condition. The golden rule: deal with the restriction FIRST, then let the remaining items fill the remaining places freely. Four standard tricks cover almost everything at this level (the syllabus never repeats an object or seats people round a circle).
Condition
Method
Certain items must be together
glue them into one block; arrange the block with the others, then multiply by the arrangements inside the block
Two items must not be together
total arrangements minus the arrangements with them together
Fixed ends or positions
fill the restricted boxes first, then the rest
Numbers from digits (even, odd, greater than)
fill the last box (even/odd) or the first box (size) first; split into cases if both are restricted; 0 can never be the first digit
Worked example Together and apart
The letters of the word PENCIL are arranged in a row. Find the number of arrangements in which (a) P and E are next to each other (b) P and E are not next to each other.
The six letters are all different, so there are \(6! = 720\) arrangements in total.
(a) Glue P and E into one block [PE]. Now arrange 5 items: [PE], N, C, I, L in \(5! = 120\) ways.
Inside the block, PE or EP: \(2! = 2\) ways. Together: \(120 \times 2 = 240\).
(b) Not together \(=\) total \(-\) together \(= 720 - 240\).
Answer: (a) \(240\) (b) \(480\)
Worked example Digits with two restrictions
Four-digit numbers are formed from the digits 1, 2, 3, 4, 5, 6, with no digit used more than once. How many of them are (a) even (b) greater than 4000 (c) both even and greater than 4000?
(a) Last box first: 2, 4 or 6, so 3 choices. The other three boxes: \(5 \times 4 \times 3 = 60\). Even: \(3 \times 60 = 180\).
(b) First box first: 4, 5 or 6, so 3 choices; the rest \(5 \times 4 \times 3 = 60\). Greater than 4000: \(180\).
(c) Both ends are restricted and they compete for the digits 4 and 6, so split on the first digit.
First digit 4 or 6 (2 ways): the last digit is one of the 2 even digits left, middle \(4 \times 3\): \(2 \times 2 \times 12 = 48\).
First digit 5 (1 way): the last digit is 2, 4 or 6 (3 ways), middle \(4 \times 3\): \(1 \times 3 \times 12 = 36\).
Total \(48 + 36 = 84\).
Answer: (a) \(180\) (b) \(180\) (c) \(84\)
Your turn
The 7 letters of FORMULA are arranged in a row. How many arrangements begin and end with a vowel?
Vowels O, U, A. First box 3 choices, last box 2 (one vowel used), then the middle 5 letters in \(5!\) ways: \(3 \times 2 \times 120 = 720\).
Examiner trap
Two classic slips. First, forgetting the arrangements INSIDE the block: 'P and E together' is \(5! \times 2!\), not \(5!\). Second, 'not together' for THREE items is not total minus all-three-together: for six letters, A, B, C not all in one block gives \(720 - 144 = 576\), but 'no two of A, B, C next to each other' is only \(144\). Read which one the question means.
Stage 2 · Exam
Exam-style questions
Unlocks once the four checks above are done. Worth more XP, written to IGCSE Additional Mathematics Paper 1 and Paper 2 standard.
Finish the four checks above to unlock the exam questions
Exam style+20 XP
Find the value of \(n\) for which \({}^{n}P_{2} = 90\).
Exam style+20 XP
Simplify \(\dfrac{(n + 1)!}{(n - 1)!}\).
Exam style+20 XP
Four-digit numbers are made from the digits 1, 2, 3, 4, 5, 6, 7, with no digit repeated. How many of them are even?
Exam style+20 XP
The 7 letters of the word FORMULA are arranged in a row. How many arrangements have the three vowels O, U, A all next to each other?
Skill unlocked
Boxes filled, restrictions first.
This skill is now recorded on your profile. Keep the chain going.