impera Open Impera

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.

Example

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.

Worked example

Arranging letters

  1. How many ways can the letters of MATHS be arranged?
  2. 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?

  • 260

  • 2600

  • 26

  • 36

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)!}$$

Worked example

Prizes

  1. In a race with 8 runners, in how many ways can gold, silver and bronze be awarded?
  2. Order matters, so ${}^8P_3 = \dfrac{8!}{5!} = 8 \times 7 \times 6 = 336$.
Check yourself

What is the key feature of a permutation?

  • The order does not matter

  • Objects may be repeated

  • Only two objects are used

  • The order matters

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.

Worked example

A committee

  1. In how many ways can a committee of 3 be chosen from 8 people?
  2. Order does not matter, so ${}^8C_3 = \dfrac{8!}{3!\,5!} = \dfrac{336}{6} = 56$.
Worked example

A mixed committee

  1. A committee of 2 women and 2 men is chosen from 5 women and 6 men.
  2. Women: ${}^5C_2 = 10$. Men: ${}^6C_2 = 15$.
  3. Both choices are made, so multiply: $10 \times 15 = 150$.
Check yourself

In how many ways can 2 books be chosen from 5?

  • 20

  • 25

  • 10

  • 7

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.
Worked example

Two people together

  1. Six people stand in a row. Two of them must be next to each other.
  2. Treat the pair as one block: there are now 5 objects, arranged in $5! = 120$ ways.
  3. The pair can swap places: $\times\ 2$. Total $= 240$.
  4. The number of arrangements where they are not together $= 6! - 240 = 720 - 240 = 480$.
Worked example

Repeated letters

  1. How many arrangements are there of the letters of LETTER?
  2. There are 6 letters, with E twice and T twice.
  3. $\dfrac{6!}{2!\,2!} = \dfrac{720}{4} = 180$.
Check yourself

How do you count arrangements where two objects must be together?

  • Divide the total number of arrangements by 2

  • Subtract 2 from the total number of arrangements

  • Treat them as one block, then multiply by 2

  • Ignore them and arrange the other objects only

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.
Worked example

Arranging 5 people in a row, where A and B must sit together

  1. Treat AB as one block: 4 units, arranged in $4! = 24$ ways.
  2. A and B can swap inside the block: $2! = 2$.
  3. Total: $24 \times 2 = 48$.
  4. A and B apart: $5! - 48 = 120 - 48 = 72$.
Check yourself

In how many ways can 4 people be arranged in a row?

  • 4

  • 24

  • 16

  • 12

Show the answer

24

$4!$.

6Committees and selections

Use combinations when order does not matter.

Worked example

A committee of 4 from 6 boys and 5 girls, with exactly 2 girls

  1. Choose 2 girls: $\binom{5}{2} = 10$.
  2. Choose 2 boys: $\binom{6}{2} = 15$.
  3. Total: $10 \times 15 = 150$.
Worked example

At least one girl

  1. All committees: $\binom{11}{4} = 330$.
  2. No girls: $\binom{6}{4} = 15$.
  3. At least one girl: $330 - 15 = 315$.
Check yourself

How many ways can 3 people be chosen from 7?

  • 35

  • 210

  • 21

  • 343

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?

  1. There are 10 letters: S three times, T three times, I twice, A and C once.
  2. Arrangements: $\frac{10!}{3!\,3!\,2!} = \frac{3\,628\,800}{72} = 50\,400$.
  3. 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?

  1. Total: $\binom{10}{5} = 252$.
  2. No men: $\binom{6}{5} = 6$.
  3. Exactly one man: $\binom{4}{1}\binom{6}{4} = 4 \times 15 = 60$.
  4. At least two men: $252 - 6 - 60 = 186$.
  5. 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?

  1. Total: $5! = 120$.
  2. Together: treat the pair as one block, giving $4!$ arrangements, times 2 for the order inside the block: $48$.
  3. 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?

  1. Fill the restricted place first: the last digit is 2 or 4, so 2 choices.
  2. The other three places: $4 \times 3 \times 2 = 24$.
  3. 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?

  • 20

  • 60

  • 30

  • 120

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