22 original competition-style problems: counting arrangements, paths, subsets and tilings. Try each one before opening the hints; the second hint gives more away, and the full solution explains why the method works and where the idea leads.
15 free with full solutions. Problems marked ‘With a plan’ show the question to everyone; their hints, answer checking and full solutions are included with every A Level, IB, IGCSE and CBSE plan. See plans.
For teachers: project, add to a worksheet or set as homework
Press Project on any problem to show it full screen with a timer, the hints, the answer and the worked solution one step at a time (arrow keys move between problems; Space reveals the next step; F full screen; Esc closes). Switch on the ‘Add to worksheet’ buttons, pick problems, then print them from the worksheet builder or set them as homework for a class, with the full solutions as the mark scheme. Free problems are free for every class; problems marked ‘With a plan’ can be set by teachers with a plan or school licence. Ready-made sessions: maths club packs.
A 2 by 8 board is tiled with 1 by 2 dominoes (either way round) and 2 by 2 squares. How many tilings are there?
Hint
Let t(n) be the number of tilings of a 2 by n board. How can the left edge be covered?
Second hint
The left edge is covered by an upright domino (leaving 2 by (n − 1)), two flat dominoes, or a 2 by 2 square (both leaving 2 by (n − 2)).
Full worked solution
Answer: 171
Let t(n) be the number of tilings of a 2 by n board.
Look at the left-hand column. Either a vertical domino covers it (leaving 2 by (n − 1)), or two horizontal dominoes cover the first two columns, or a 2 by 2 square does (each leaving 2 by (n − 2)).
So t(n) = t(n − 1) + 2 t(n − 2).
Start: t(0) = 1 (the empty board) and t(1) = 1 (one vertical domino).
Why this works: Tilings of strips satisfy linear recurrences found by asking how the first column is covered. Here t(n) = (2n+1 + (−1)n)/3, the Jacobsthal numbers.
Where it leads: t(n) = t(n − 1) + 2t(n − 2) gives the Jacobsthal numbers, (2n+1 + (−1)n)/3.
Why this works: Describing strings by run lengths separates ‘which letter’ (fixed once the first is chosen) from ‘how long each run is’, a composition count.
Where it leads: The compositions of n into 1s and 2s are counted by Fibonacci numbers, so the answer is 2F9 = 68.
Three vertices of a regular 12-sided polygon are chosen to form a triangle. How many of the possible triangles are obtuse?
Hint
An inscribed triangle is obtuse exactly when all three vertices lie strictly within a half of the circle.
Second hint
For each vertex A, count triangles whose other two vertices are among the next 5 vertices clockwise: C(5, 2).
Full worked solution
Answer: 120
An angle inscribed in a circle is obtuse exactly when it stands on an arc greater than a semicircle; so a triangle is obtuse when its three vertices lie inside an arc smaller than a semicircle.
On a regular 12-gon, neighbouring vertices are 30° apart, so ‘less than a semicircle’ means the three vertices lie among 6 consecutive vertices (spanning at most 150°).
Count each obtuse triangle from its first vertex going clockwise: choose that vertex (12 ways), then the other two from the next 5 vertices: C(5, 2) = 10.
Each obtuse triangle has exactly one such first vertex, so there are 12 × 10 = 120.
Check: of C(12, 3) = 220 triangles, 60 are right-angled (a diameter, 6 ways, and a third vertex, 10 ways), and 220 − 120 − 60 = 40 acute.
Answer: 120.
Why this works: An inscribed angle is obtuse when it stands on an arc greater than a semicircle. Counting from a canonical starting vertex avoids counting the same triangle several times.
Where it leads: As the number of sides grows, three random vertices form an obtuse triangle with probability approaching 3/4.
How many paths from (0, 0) to (6, 6), using unit steps right or up, avoid every point whose coordinates are both odd?
Hint
From a point with both coordinates even, where can the path go next, and what must the step after that be?
Second hint
From an even-even point the path must take two steps in the same direction to reach the next allowed point.
Full worked solution
Answer: 20
The path starts at (0, 0), where both coordinates are even.
From an even–even point, one step makes exactly one coordinate odd.
The next step must not make both odd, so it must change the same coordinate again, back to even: the path moves in double steps RR or UU between even–even points.
So the path is a route on the grid of even points, from (0, 0) to (6, 6) in steps of 2: 3 double steps right and 3 double steps up.
Number of routes: C(6, 3) = 20.
Why this works: Spotting an invariant (you can only be at an odd coordinate for one step at a time) turns the problem into a smaller, familiar one.
Where it leads: Shrinking the grid by a factor of 2 turns the problem into ordinary paths from (0, 0) to (3, 3): C(6, 3).
How many whole numbers from 1 to 10 000 have digits that add up to 10?
Hint
Treat numbers below 10 000 as four-digit strings with leading zeros. Stars and bars, then remove strings with a ‘digit’ of 10.
Second hint
Four-digit strings with digit sum 10: C(13, 3) = 286. Remove those with a ‘digit’ 10 (one digit 10, rest 0): 4.
Full worked solution
Answer: 282
Write every number from 0 to 9999 as four digits d1d2d3d4 (with leading zeros). 0 has digit sum 0, so it never counts.
Count solutions of d1 + d2 + d3 + d4 = 10 with di ≥ 0: stars and bars, C(13, 3) = 286.
Remove the ones where some ‘digit’ is 10 or more: that digit is 10 and the others 0: 4 cases. (Two digits ≥ 10 is impossible.)
So 286 − 4 = 282 numbers below 10 000.
10 000 has digit sum 1, so the answer is 282.
Why this works: Leading zeros make every number the same length so stars and bars applies; the digit cap of 9 is handled by subtracting the few overflows.
Where it leads: Stars and bars with an upper limit needs one round of inclusion–exclusion; larger sums need more rounds.
How many ways can the numbers 1, 2, 3, 4, 5, 6 be arranged in a row so that every number is at most one place away from its own position (number k in position k−1, k or k+1)?
Hint
Look at number 1: it stays in place, or it swaps with 2.
Second hint
If 1 stays, arrange 2 to 6 in the same way; if 1 and 2 swap, arrange 3 to 6.
Full worked solution
Answer: C, 13
Let a(n) be the number of arrangements of 1 to n with every number at most one place from home.
Look at number 1. If it stays in position 1, the other n − 1 numbers form the same problem: a(n − 1) ways.
If 1 moves to position 2, position 1 must be filled by 2 (no other number may move that far). So 1 and 2 swap, and the rest is the problem for n − 2: a(n − 2) ways.
So a(n) = a(n − 1) + a(n − 2), with a(1) = 1 and a(2) = 2.
a(3) = 3, a(4) = 5, a(5) = 8, a(6) = 13 (C).
Why this works: Local rules (each item moves at most one place) force the arrangement into fixed points and adjacent swaps, which gives a Fibonacci recurrence.
Where it leads: an = an−1 + an−2: Fibonacci again, since the arrangements are tilings by ‘stay’ and ‘swap’ pieces.
Let Dn count such arrangements (derangements). D1 = 0, D2 = 1.
Recurrence: number 1 goes to position k (n − 1 choices). Either k goes to position 1 (leaving Dn−2) or not (behaving like Dn−1). So Dn = (n − 1)(Dn−1 + Dn−2).
How many 4-element subsets of {1, 2, …, 20} can be arranged to form an arithmetic sequence?
Hint
A 4-term arithmetic sequence a, a + d, a + 2d, a + 3d with d ≥ 1 is fixed by a and d.
Second hint
For each d, a can run from 1 to 20 − 3d.
Full worked solution
Answer: 57
Arrange the set in increasing order: a, a + d, a + 2d, a + 3d with d ≥ 1. Each set gives exactly one (a, d).
Need a + 3d ≤ 20, so a has 20 − 3d choices, and d ≤ 6.
Sum: 17 + 14 + 11 + 8 + 5 + 2 = 57.
Why this works: Matching each set to its first term and common difference makes the count a simple sum over d.
Where it leads: Van der Waerden’s theorem: colour 1 to N in two colours; for N large enough there is always a one-coloured arithmetic sequence of length 4 (N = 35 suffices, and is the smallest).
10 identical balls are placed in 4 different boxes so that no box has more than 4 balls. In how many ways can this be done?
Hint
Count without the limit, then subtract the arrangements where some box has 5 or more.
Second hint
Without limit: C(13, 3) = 286. A given box with ≥ 5: put 5 in first, C(8, 3) = 56 ways.
Full worked solution
Answer: C, 68
Without the limit: stars and bars, C(10 + 3, 3) = 286.
A particular box has at least 5: pre-place 5, share the other 5 freely: C(8, 3) = 56. Four boxes: 224.
Two particular boxes with at least 5 each: all 10 used, 1 way. C(4, 2) = 6 pairs: 6. Three boxes is impossible.
Inclusion–exclusion: 286 − 224 + 6 = 68 (C).
Why this works: Upper limits are handled by counting the violations (pre-placing balls) and correcting overlaps with inclusion–exclusion.
Where it leads: This is the coefficient of x10 in (1 + x + x2 + x3 + x4)4: generating functions and inclusion–exclusion are two views of one calculation.
Four couples sit in a row of 8 chairs so that each couple sits together. In how many ways can they sit?
Hint
Treat each couple as a block.
Second hint
Arrange 4 blocks, then each couple can sit in 2 orders.
Full worked solution
Answer: 384
Glue each couple into a block: 4 blocks in a row, 4! = 24 orders.
Each couple can sit in 2 orders within its block: 24 = 16.
Total: 24 × 16 = 384.
Why this works: Blocks handle ‘must sit together’; the internal orders multiply in independently.
Where it leads: The harder question, with no couple together, needs inclusion–exclusion over the couples. Around a circular table with men and women alternating it becomes the ménage problem.
How many paths from (0, 0) to (5, 5), using unit steps right or up, touch the line y = x only at their two ends?
Hint
Such a path starts either right or up and then stays strictly on one side of the line.
Second hint
By symmetry, count paths staying strictly below and double. A path strictly below goes (0,0) → (1,0), ends (5,4) → (5,5), and in between never goes above y = x − 1.
Full worked solution
Answer: B, 28
A path that avoids the diagonal except at its ends stays strictly below it or strictly above it; by reflection these are equally many.
Strictly below: the first step is right to (1, 0) and the last step is up from (5, 4). In between it goes from (1, 0) to (5, 4) without crossing y = x − 1: shifting left by 1, that is a path from (0, 0) to (4, 4) never above y = x, counted by the Catalan number C4 = 14.
Total: 2 × 14 = 28 (B).
Why this works: Symmetry halves the work, and stripping off the forced first and last steps reveals a Catalan count.
Where it leads: By the same argument the probability that a random 2n-step path to (n, n) avoids the diagonal is 2Cn−1/C(2n, n) = 1/(2n − 1).
How many 3-element subsets of {1, 2, 3, …, 15} have a sum divisible by 3?
Hint
Sort the numbers by remainder on division by 3: five of each.
Second hint
The sum is divisible by 3 when all three remainders are equal, or all three are different.
Full worked solution
Answer: 155
Remainders 0, 1, 2 each occur 5 times in 1 to 15.
Sum ≡ 0 (mod 3) when the remainders are all equal (0 + 0 + 0, 1 + 1 + 1, 2 + 2 + 2) or all different (0 + 1 + 2).
All equal: 3 × C(5, 3) = 30. All different: 5 × 5 × 5 = 125.
Total: 155.
Why this works: Only remainders matter for divisibility, so classify the numbers into three equal classes and count combinations of classes.
Where it leads: 155 is very close to C(15, 3)/3 = 151.67: sums are spread almost evenly among the remainders. Roots of unity make this exact in generating-function proofs.
In how many ways can the six people {A, B, C, D, E, F} be split into three non-empty groups (the groups are unlabelled and the order within a group does not matter)?
Hints, answer check and full worked solution. Included with every A Level, IB, IGCSE and CBSE plan.
The six corners of a hexagon (fixed in place) are each coloured with one of 3 colours so that neighbouring corners have different colours. How many colourings are there?
Hints, answer check and full worked solution. Included with every A Level, IB, IGCSE and CBSE plan.
In an election, Amina gets 6 votes and Ben gets 4. The 10 votes are counted one at a time in some order. In how many of the C(10, 4) = 210 possible orders is Amina strictly ahead throughout the count (after every vote)?
Hints, answer check and full worked solution. Included with every A Level, IB, IGCSE and CBSE plan.
Eight rooks are placed on a chessboard so that no two attack each other (one in each row and each column), and none is on the main diagonal from the bottom-left corner to the top-right corner. In how many ways can this be done?
Hints, answer check and full worked solution. Included with every A Level, IB, IGCSE and CBSE plan.
Six points are placed on a circle and every pair is joined by a straight chord. No three chords meet at one point inside the circle. Into how many regions do the chords divide the inside of the circle?
Hints, answer check and full worked solution. Included with every A Level, IB, IGCSE and CBSE plan.