IB Diploma Mathematics AA · Number and algebra
Counting principles (HL)
1The multiplication principle
If one choice can be made in $m$ ways and a second, independent choice in $n$ ways, the two together can be made in $m \times n$ ways.
A menu has 3 starters and 4 main courses. A two-course meal can be chosen in $3 \times 4 = 12$ ways.
If the choices are alternatives (one or the other), add instead.
Factorials. The number of ways of arranging $n$ different objects in a row is $n! = n(n-1)(n-2)\dots 1$. There are $n$ choices for the first place, $n - 1$ for the second, and so on.
Arranging letters
- How many ways can the letters of MATHS be arranged?
- There are 5 different letters, so $5! = 120$.
Check yourself
A code has one letter (26 choices) followed by one digit (10 choices). How many codes are possible?
Show the answer
260
Multiply the numbers of choices.
2Permutations
A permutation is an arrangement: the order matters.
The number of ways of arranging $r$ objects chosen from $n$ is:
$${}^nP_r = \frac{n!}{(n-r)!}$$
Prizes
- In a race with 8 runners, in how many ways can gold, silver and bronze be awarded?
- Order matters, so ${}^8P_3 = \dfrac{8!}{5!} = 8 \times 7 \times 6 = 336$.
Check yourself
What is the key feature of a permutation?
Show the answer
The order matters
ABC and CBA are different permutations.
3Combinations
A combination is a selection: the order does not matter.
$${}^nC_r = \binom{n}{r} = \frac{n!}{r!\,(n-r)!}$$
It is the number of permutations divided by $r!$, because each selection can be arranged in $r!$ ways.
A committee
- In how many ways can a committee of 3 be chosen from 8 people?
- Order does not matter, so ${}^8C_3 = \dfrac{8!}{3!\,5!} = \dfrac{336}{6} = 56$.
A mixed committee
- A committee of 2 women and 2 men is chosen from 5 women and 6 men.
- Women: ${}^5C_2 = 10$. Men: ${}^6C_2 = 15$.
- Both choices are made, so multiply: $10 \times 15 = 150$.
Check yourself
In how many ways can 2 books be chosen from 5?
Show the answer
10
⁵C₂ = 10. Order does not matter.
4Harder arrangements
- Objects that must stay together. Treat them as one block, then multiply by the number of ways of arranging the objects inside the block.
- Objects that must not be together. Count all the arrangements and subtract those where they are together.
- Repeated objects. Divide by the factorial of each repeat.
Two people together
- Six people stand in a row. Two of them must be next to each other.
- Treat the pair as one block: there are now 5 objects, arranged in $5! = 120$ ways.
- The pair can swap places: $\times\ 2$. Total $= 240$.
- The number of arrangements where they are not together $= 6! - 240 = 720 - 240 = 480$.
Repeated letters
- How many arrangements are there of the letters of LETTER?
- There are 6 letters, with E twice and T twice.
- $\dfrac{6!}{2!\,2!} = \dfrac{720}{4} = 180$.
Check yourself
How do you count arrangements where two objects must be together?
Show the answer
Treat them as one block, then multiply by 2
The pair can be in either order inside the block.
5Restrictions in arrangements
Many counting questions add restrictions.
- Items together: treat them as one block, then multiply by the arrangements inside the block.
- Items apart: count all arrangements, then subtract those where they are together.
Arranging 5 people in a row, where A and B must sit together
- Treat AB as one block: 4 units, arranged in $4! = 24$ ways.
- A and B can swap inside the block: $2! = 2$.
- Total: $24 \times 2 = 48$.
- A and B apart: $5! - 48 = 120 - 48 = 72$.
Check yourself
In how many ways can 4 people be arranged in a row?
Show the answer
24
$4!$.
6Committees and selections
Use combinations when order does not matter.
A committee of 4 from 6 boys and 5 girls, with exactly 2 girls
- Choose 2 girls: $\binom{5}{2} = 10$.
- Choose 2 boys: $\binom{6}{2} = 15$.
- Total: $10 \times 15 = 150$.
At least one girl
- All committees: $\binom{11}{4} = 330$.
- No girls: $\binom{6}{4} = 15$.
- At least one girl: $330 - 15 = 315$.
Check yourself
How many ways can 3 people be chosen from 7?
Show the answer
35
$\binom{7}{3}$.
7Going deeper: four classic problem types
Decide first whether order matters (permutations) or not (combinations), then deal with any restriction before counting the rest.
Type 1 (repeated letters): how many arrangements are there of the letters of STATISTICS?
- There are 10 letters: S three times, T three times, I twice, A and C once.
- Arrangements: $\frac{10!}{3!\,3!\,2!} = \frac{3\,628\,800}{72} = 50\,400$.
- Divide by the factorial of each repeat, because swapping identical letters gives nothing new.
Type 2 ("at least" in a committee): a committee of 5 is chosen from 6 women and 4 men. How many committees include at least 2 men?
- Total: $\binom{10}{5} = 252$.
- No men: $\binom{6}{5} = 6$.
- Exactly one man: $\binom{4}{1}\binom{6}{4} = 4 \times 15 = 60$.
- At least two men: $252 - 6 - 60 = 186$.
- The complement is quicker and safer than adding four separate cases.
Type 3 (not together): five people stand in a row. In how many ways can they stand if two particular people must not be next to each other?
- Total: $5! = 120$.
- Together: treat the pair as one block, giving $4!$ arrangements, times 2 for the order inside the block: $48$.
- Not together: $120 - 48 = 72$.
Type 4 (digits with a condition): how many 4-digit even numbers can be made from 1, 2, 3, 4, 5 with no digit repeated?
- Fill the restricted place first: the last digit is 2 or 4, so 2 choices.
- The other three places: $4 \times 3 \times 2 = 24$.
- Total: $2 \times 24 = 48$.
Formulas
- $^nP_r = \frac{n!}{(n - r)!}$: ordered selections of $r$ from $n$.
- $^nC_r = \binom{n}{r} = \frac{n!}{r!(n - r)!}$: unordered selections.
- $^nP_r = r! \times {}^nC_r$.
- Arrangements of $n$ people around a circle: $(n - 1)!$, because rotations are the same.
Common mistakes
- Double counting in "at least" problems: choosing 2 men first and then "any 3 others" counts the same committee several times.
- Using permutations for committees, where order does not matter.
- Forgetting the factor of 2 (or $k!$) for the order inside a block.
- Allowing a leading zero when forming numbers.
Check yourself
In how many ways can the letters of the word LEVEL be arranged?
Show the answer
30
5! ÷ (2! × 2!) = 120 ÷ 4, because L and E each appear twice.
Now test yourself
This lesson has a 8-question quiz and 5 exam-style questions with mark schemes in Impera. Free, with your progress saved.
Practise in Impera