AZTest
Counting study guide · step 2 of 5

Permutation word problems: arranging people, flags and books

When order matters, count arrangements. n different things can be lined up in n! ways; r of them in n!/(n − r)! ways.

Key ideas

Watch out: Identical items: divide by the arrangements of the identical ones.

Practise this step

5 questions from this step only, in 8 minutes: new numbers and stories every time, of exactly the types worked out below. Marked at the end, with every question worked out.

Start the 5-question quiz

Every question type in this step, worked out

10 types of question. Try each one yourself before you open the hint or the solution.

Example 1 · level 6

7 people stand in a row for a photo. The 3 people of one family must stand at the left end, in any order. In how many ways can the row be arranged?

?
Hint

Arrange the family in its places, and the others in theirs; multiply.

Worked solution
= 144
m!×(n−m)!
  1. Family: 3! = 6; the other 4: 4! = 24
  2. Rows: 6 × 24 = 144

Answer: 144 ways

Example 2 · level 7

34 runners start a race. Gold, silver and bronze go to the first three. In how many ways can the three medals be given out?

34×34 − 1×34 − 2?
Hint

Gold has 34 possible winners; silver then one fewer; bronze one fewer again.

Worked solution
34×34 − 1×34 − 2= 35,904
n(n−1)(n−2)
  1. 34 × 33 × 32 = 35,904

Answer: 35,904 ways

Example 3 · level 8

8 friends stand in a row. 6 of them insist on standing next to each other. In how many ways can the row be arranged?

?
Hint

Glue the 6 friends into one block; arrange the blocks, then the friends inside their block.

Worked solution
= 4320
k!×(n−k+1)!
  1. Blocks: 8 − 6 + 1 = 3, arranged in 3! = 6 ways
  2. Inside the block: 6! = 720
  3. Rows: 6 × 720 = 4320

Answer: 4320 ways

Example 4 · level 8

A coach picks a relay team of 3 runners from a squad of 9 and decides who runs first, second, and so on. The fastest runner of the squad must run the last leg. How many different line-ups are possible?

9 − 1×9 − 2×1?
Hint

The last leg is fixed; fill the other legs in order from the rest of the squad.

Worked solution
9 − 1×9 − 2×1= 56
(n−1)!(n−k)!
  1. Other legs: 2, chosen in order from 8 runners
  2. 8 × (8 − 1) × … = 56

Answer: 56 line-ups

Example 5 · level 8

9 guests sit at a round table; only who sits next to whom matters, not the exact chairs. The 6 members of one family must sit together. In how many ways can the guests be seated?

?
Hint

Treat the family as one unit: round a table, u units can be arranged in (u − 1)! ways.

Worked solution
= 4320
(n−k)!×k!
  1. Units: the family plus the other guests, 9 − 6 + 1 = 4, round the table in 6 ways
  2. The family inside its unit: 6! = 720
  3. Seatings: 6 × 720 = 4320

Answer: 4320 ways

Example 6 · level 9

A shelf holds 2 different maths books, 5 different science books and 3 different history books. Books of the same subject must stand together. In how many ways can the books be arranged?

?
Hint

Order the three subject groups, then the books inside each group.

Worked solution
= 8640
3!×a!·b!·c!
  1. The three groups: 3! = 6
  2. Inside: 2! × 5! × 3! = 2 × 120 × 6
  3. Shelves: 6 × 2 × 120 × 6 = 8640

Answer: 8640 ways

Example 7 · level 9

A line of bunting has 2 red, 4 blue and 2 yellow flags; flags of the same colour look the same. In how many different orders can the flags hang?

?
Hint

Arrange all flags as if they were different, then divide out the swaps within each colour.

Worked solution
= 420
(a+b+c)!a!·b!·c!
  1. All 8 flags as if different: 8! = 40,320
  2. Divide by 2! × 4! × 2! = 2 × 24 × 2
  3. Orders: 420

Answer: 420 orders

Example 8 · level 9

A gardener plants 7 roses and 2 tulips in one row. Roses all look alike, and so do tulips. No two tulips may stand next to each other. How many different rows are possible?

?
Hint

Plant the roses first: they leave a gap at each end and between every two. Each tulip takes a different gap.

Worked solution
= 28
C(r+1,t)
  1. Gaps around 7 roses: 7 + 1 = 8
  2. Choose 2 of them: C(8, 2) = 28

Answer: 28 rows

Example 9 · level 9

A row has 34 empty chairs. Two rivals come in, one after the other, and each takes a chair, but they must not sit next to each other. In how many ways can they choose their chairs?

?
Hint

Count all the ways for the two, then take away the ways in which they sit side by side.

Worked solution
= 1056
n(n−1)−2(n−1)
  1. All: 34 × 33 = 1122
  2. Side by side: 33 neighbouring pairs, in 2 orders: 2 × 33 = 66
  3. Apart: 1122 − 66 = 1056

Answer: 1056 ways

Example 10 · level 10

Tiles show 10 different letters, 2 of them vowels. A code word is 5 different tiles laid in a row, and it must start with a vowel. How many code words are there?

2×10 − 1×…×10 − 4?
Hint

Choose the first tile from the vowels; then fill the other places from the tiles left.

Worked solution
2×10 − 1×…×10 − 4= 6048
v×(n−1)!(n−k)!
  1. First place: 2 choices
  2. The other 4 places from the 9 tiles left: 3024 ways
  3. Code words: 2 × 3024 = 6048

Answer: 6048 words

Ready for the quiz?

Check yourself on this step: 5 questions, 8 minutes.

Start the quiz

All steps of the Counting study guide

  1. The multiplication principle

    Outfits, routes through towns, number plates, PINs, menus and numbers made from digits.

  2. Arrangements (permutations)

    Photos with people at the ends, podiums, groups that stay together, round tables and books by subject.

  3. Choosing (combinations)

    Committees, teams from two groups, lines and triangles through points, lottery and handshakes.

  4. Paths, grids and sharing out

    Routes on a grid, via a shop or avoiding a crossing, tournaments, dominoes, rectangles in grids, stairs and boxes.

  5. Complements and overlaps

    Neither club, divisible by neither, three sports, repeated digits, passwords and the pigeonhole principle.

When every step feels easy, take the whole Counting test: 10 questions in 15 minutes.