4C

Grouping, complementary and cases

Three more counting principles for ordered selections: treat objects that must be together as a block, count the complement, and split a problem into cases.

The multiplication principle handles straightforward questions. Real questions add conditions: "these two must sit together", "these two must not", "the number must be odd and bigger than 4000". Three more principles handle almost all of them.

Grouping: tie them together

If some objects must be next to each other, tie them into one block. Arrange the blocks, then arrange the objects inside each block.

Example 1●

Three sisters and four other people stand in a row. In how many ways can this be done if the sisters stand together?

Arrange the $5$ units: $5! = 120$
Treat the three sisters as one block. Now there are 5 things to arrange: the block and the 4 others.
Arrange the sisters: $3! = 6$
Inside the block, the sisters can stand in any order.
$120 \times 6 = 720$

The same idea works with several blocks. Four maths books and three English books go on a shelf with each subject kept together: order the $2$ blocks ($2!$), then each block ($4!$ and $3!$), giving $2 \times 24 \times 6 = 288$.

The complement: count what you don't want

"Not together" is awkward to count directly. "Together" is easy, by grouping. So count everything, and subtract the arrangements you don't want.

Example 2●●

Six people sit in a row. In how many ways can they sit if Alex and Bo must not sit next to each other?

Total: $6! = 720$
All arrangements, with no restriction.
Together: $5! \times 2! = 240$
Alex and Bo together: tie them as a block (5 units), then order the pair.
Not together: $720 - 240 = 480$

Cases: split it up

Sometimes one set of boxes can't cope, because how many choices one box has depends on what went in another. Split into cases that don't overlap, count each, and add.

Example 3●●●

How many 4-digit odd numbers greater than $4000$ can be made from $1, 2, 3, 4, 5, 6$ with no repetition?

Case 1: first digit $4$ or $6$. Case 2: first digit $5$.
The first digit must be 4, 5 or 6, and the last digit must be odd. The digit 5 is in both lists, so the number of choices for the last digit depends on the first. Split on the first digit.
Case 1: $2 \times 3 \times 4 \times 3 = 72$
First digit: 2 ways. Last digit: any of 1, 3, 5: 3 ways. Middle two from the 4 left: 4 × 3.
Case 2: $1 \times 2 \times 4 \times 3 = 24$
First digit 5: 1 way. Last digit: 1 or 3, since 5 is used: 2 ways. Middle: 4 × 3.
Total: $72 + 24 = 96$
The cases don't overlap, so add.

If the cases do overlap, subtract the overlap so it isn't counted twice: $|A \cup B| = |A| + |B| - |A \cap B|$. For example, among $1$ to $100$ there are $33$ multiples of $3$ and $20$ multiples of $5$, but $6$ numbers (multiples of $15$) are in both. So $33 + 20 - 6 = 47$ numbers are multiples of $3$ or $5$.

Your turn

Three boys and three girls sit in a row, alternating boy, girl, boy, girl, and so on. How many ways?

Show the working

The pattern can start with a boy or a girl: $2$ ways. Then the boys fill their three seats in $3!$ ways and the girls fill theirs in $3!$ ways. Total $2 \times 6 \times 6 = 72$.

Flashcards
Grouping principle
Order the blocks, then order within each block.
Complementary principle
Count all, then subtract the unwanted arrangements.
Overlapping cases
$|A \cup B| = |A| + |B| - |A \cap B|$
Practice
  1. Three sisters and four others stand in a row, with the sisters together. How many arrangements?

  2. Six people sit in a row. In how many ways are Alex and Bo not next to each other?

  3. Four maths and three English books are shelved with each subject together. The number of arrangements is:

  4. Three boys and three girls sit in a row, alternating. How many arrangements?

  5. How many arrangements of the letters of NUMBER have the two vowels next to each other?

  6. The digits $1, 2, 3, 4, 5$ are arranged to form a 5-digit number. In how many arrangements are $1$ and $2$ not next to each other?

  7. How many numbers from $1$ to $100$ are multiples of $3$ or of $5$?

  8. How many numbers from $1$ to $1000$ are multiples of $4$ or of $6$?

  9. Exam style: how many 4-digit odd numbers greater than $4000$ can be formed from $1, 2, 3, 4, 5, 6$ without repetition?

  10. Exam style: how many 3-digit even numbers greater than $500$ have no repeated digit?

Formula sheet