IrMo - Advanced Class 2026

Presented by Dr. Gabriel Rodrigues Palma

Welcome the students.

Ask: what do you see? Wait ten seconds. Nobody can read 108 pairs of numbers.

Say: these are the same numbers. Each pair is now one point. Ask again: what is it?

Say: joined in order, it is a butterfly. Nothing new was added. Only the drawing lets us see what the numbers say.

Say: a drawing can do more than show. It can prove. We start with one dot.

Add three dots around it. Ask: what shape is it now? A 2 by 2 square.

Add five more: 3 by 3.

Add seven: 4 by 4. Ask: how many dots come next?

Nine more: 5 by 5.

Eleven more: 6 by 6.

Ask: why is the sum of the first n odd numbers always n × n? The picture is the whole proof: each new layer wraps the square and has two more dots than the last one.

Say: in the Olympiad, the first minutes are for reading and drawing, not for calculating.

From words to a picture, and back

Say: every Olympiad question arrives as words. Read this one aloud and give the students a moment.

Say: we leave the world of words and draw. The first drawing is the board with some dominoes on it. Trying does not help much.

Say: so we change the drawing. With two colours we see something new. Every domino covers one square of each colour, and the two missing corners have the same colour.

Say: now the picture becomes numbers. 31 dominoes need 31 squares of each colour. The board has only 30 of one colour.

Say: we go back to the world of words. The answer is a sentence with its reason, so that anybody can check it. This is what rigour means.

Say: read, translate, solve, answer, and then read the question again. Every question today makes this trip.

Overview

How do we translate a question into an animated solution?

Say: every question follows the same three moves. Read the words, translate them into a drawing, then solve by moving the drawing.

Say: five questions come from past Irish Olympiads.

Say: the last four are new, and come from measuring insect wings.

Overview

Next stop: Seven Friends.

Question 1

Say: this question is from the first Irish Olympiad, in 1988.

Question 1ReadTranslateSolve

1st IrMO, 30 April 1988, Paper 1, Question 5

A person has seven friends and invites a different subset of three friends to dinner every night for one week (seven days).
In how many ways can this be done so that all friends are invited at least once?

Read slowly. Ask: which numbers matter? Seven friends, three guests, seven nights.

Ask: which words make it difficult? “At least once”.

Question 1ReadTranslateSolve

Rows are friends and columns are nights.

The wordsThe drawing
seven friends, seven days→A table: 7 rows, 7 columns
three friends … every night→3 circles in each column
a different subset→No two columns are equal
all friends … at least once→No row is empty

Ask: how would you draw one week? Let a student suggest the table first.

Watch one night at a time: three circles in each column.

Point at the groups under the columns: all seven are different.

Run a finger along each row. Ask: what would an empty row mean? A friend who is never invited.

Question 1ReadTranslateSolve

$7\times 6\times 5=210$choose 3 friends, one after the other
$3\times 2\times 1=3!=6$orders of the same 3 friends
$\dbinom{7}{3}=\dfrac{7\times 6\times 5}{3\times 2\times 1}=35$“7 choose 3”
$\dbinom{n}{k}=\dfrac{n!}{k!\,(n-k)!}$the order does not matter
$P(n,k)=\dfrac{n!}{(n-k)!}=n(n-1)\cdots(n-k+1)$the order matters

n! = n × (n − 1) × … × 2 × 1. For example 3! = 6 and 4! = 24.

Which counting rules do we need?

  • Choose in order: 7, then 6, then 5
  • Each group of three appears 6 times
  • Divide: 35 groups of three
  • In general: “$n$ choose $k$”
  • $k$ different choices in order: $P(n,k)$
Groups: $\binom{n}{k}$. Ordered lists without repeats: $P(n,k)$.

Say: we need two counting rules. First, choose the three guests one after the other: 7 choices, then 6, then 5.

Ask: we counted the dinner with friends 1, 2, 3 more than once. How often? Six times, once for each order.

Say: so we divide by 6. There are 35 different dinners.

Say: this is the general formula. Check it with n = 7 and k = 3: 7! divided by 3! times 4!. The 4! cancels and leaves 7 × 6 × 5 over 6.

Say: when the order matters we do not divide. For the week, the order of the nights matters.

Question 1ReadTranslateSolve

Each box is one dinner with three friends. P(35, 7) = 35 × 34 × … × 29: seven different dinners, in order.

How many weeks are possible?

  • $\binom{7}{3}=35$ possible dinners
  • 7 nights, no repeats:
    $P(35,7)=35\times 34\times\cdots\times 29$
  • Without friend 1: $\binom{6}{3}=20$ dinners
  • Without friends 1 and 2: $\binom{5}{3}=10$
  • Without three friends: $\binom{4}{3}=4$
4 dinners cannot fill 7 nights. At most two friends can be missing.

Ask: how many groups of three can we choose from seven friends? The formula is under the number.

Say: 35 choices on the first night, then 34, then 33. P(35, 7) is the product of these seven numbers.

Cross out every dinner with friend 1. Six friends remain, choose three: 6 × 5 × 4 divided by 6 is 20.

Cross out friend 2 as well. Five remain, choose three: 10.

Ask: can we fill seven nights with four dinners? No. So at most two friends can be missing.

Question 1ReadTranslateSolve

Outside every circle = all − (one friend missing) + (two missing) − (three missing).

Which weeks do we remove?

  • Count every week once
  • Subtract the weeks without one friend
  • The overlap was subtracted twice: add it back
  • Three friends missing: impossible
  • Add the three lines
$P(35,7)-7\,P(20,7)+21\,P(10,7)$
= 31,169,376,000 ways
1Count everything, subtract the bad weeks, add back the overlap.

Say: a circle holds the weeks in which one friend is never invited. We want the weeks outside every circle.

Say: seven friends, so seven subtractions. Point at the overlap. Ask: how often is it counted now? 1 − 2 = −1.

Say: adding the pair back makes the overlap zero. There are 21 pairs of friends: 7 choose 2, which is 7 × 6 divided by 2.

Remind them: with three friends missing, only four dinners are left. P(4, 7) = 0, so the 35 triples of friends add nothing.

Read the total: P(35, 7) − 7 P(20, 7) + 21 P(10, 7).

Repeat the idea: count all, subtract, add back.

Overview

Next stop: Two Sets.

Question 2

Say: this is Question 1 of Paper 1 in 2012.

Question 2ReadTranslateSolve

25th IrMO, 12 May 2012, Paper 1, Question 1

Let $C=\{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20\}$ and let $S=\{4,5,9,14,23,37\}$.

Find two sets $A$ and $B$ with the properties

  • $A\cap B=\emptyset$.
  • $A\cup B=C$.
  • The sum of two distinct elements of $A$ is not in $S$.
  • The sum of two distinct elements of $B$ is not in $S$.

Say: C holds the numbers from 1 to 20. S holds only six numbers.

Ask: what do (a) and (b) say in plain words? Every number goes into exactly one set.

Question 2ReadTranslateSolve

The numbers in C, the forbidden sums in S, and the two sets to fill.

The wordsThe drawing
C and S→20 numbers and 6 forbidden sums
A ∩ B = ∅, A ∪ B = C→Each number goes into one box
the sum … is not in S→1 + 3 = 4 is in S: separate them
any other sum→1 + 2 = 3 is not in S: no rule

Point at the six numbers in S: these are the forbidden sums.

Say: two boxes, and every number must choose one.

Ask: can 1 and 3 share a box? Their sum is 4, so no.

Ask: and 1 and 2? Yes, they may share a box. Only the forbidden pairs matter.

Question 2ReadTranslateSolve

An edge joins two numbers whose sum is in S.

Which pairs are forbidden?

  • One point for each number
  • Sum 4: one pair
  • Sum 5: two pairs
  • Sum 9: four pairs
  • Sum 14: six pairs
  • Sum 23: nine pairs
  • Sum 37: two pairs
1 + 2 + 4 + 6 + 9 + 2 = 24 edges

Say: one point for each number in C. We join two numbers when their sum is in S. Ask: what will an edge mean? These two cannot be in the same set.

Ask: which two different numbers add to 4? Only 1 and 3. Not 2 + 2, because the two numbers must be different.

Ask for the pairs with sum 5: 1 + 4 and 2 + 3.

Sum 9: start with 1 + 8 and move one step each time, until 4 + 5.

Sum 14: from 1 + 13 to 6 + 8. Not 7 + 7.

Ask: why does sum 23 start with 3 + 20? Because no number is larger than 20. It ends with 11 + 12.

Sum 37 needs two large numbers: 17 + 20 and 18 + 19. Count the edges together: 24.

Question 2ReadTranslateSolve

Each click follows edges from one number. The sums in the box are in S, so the two numbers go to different sets.

Who goes where?

  • Our choice: 1 goes to $A$
  • Neighbours of $A$ go to $B$
  • Neighbours of $B$ go to $A$
  • Check the 5 edges not used
  • Two rows: no edge inside a row
  • Extra: it is the only answer
A = {1, 2, 5, 6, 10, 11, 14, 15, 16, 19, 20}
B = {3, 4, 7, 8, 9, 12, 13, 17, 18}
2Draw each forbidden pair as an edge, then follow the edges.

Say: the sets are empty. We must start somewhere, so we put 1 in A. Ask: does it matter? No, A and B are only names.

First connection. Say: 1 + 3 = 4, and 4 is in S. So 3 cannot be with 1, and 3 goes to B.

Second connection. Say: 1 + 4 = 5 is in S, so 4 goes to B.

Third connection. Say: 1 + 8 = 9 is in S, so 8 goes to B.

Fourth connection. Say: 1 + 13 = 14 is in S, so 13 goes to B. Now 1 has no more edges.

Say: we move forward and take 3, which is in B. Ask for its edges: 2, 6, 11 and 20. Each one must leave B, so they go to A.

Take 4, in B. Its new neighbours are 5, 10 and 19: they go to A.

Take 8, in B. It forces 15 into A.

Say: now we start from A. 2 is in A, so 7 and 12 go to B. Let the students say the sums.

Take 6, in A: 6 + 17 = 23, so 17 goes to B.

Take 5, in A: 9 and 18 go to B.

Take 7, in B: 7 + 16 = 23, so 16 goes to A.

Take 9, in B: 9 + 14 = 23, so 14 goes to A. Ask: is any number still white? No, all 20 have a set.

Say: we used 19 edges to decide. The other 5 must be checked: each one joins a number of A to a number of B. If one of them joined two numbers of the same set, no answer would exist.

Say: we pull the two colours apart. Ask: do you see an edge inside a row? None, so the two sets work. Such a graph is called bipartite.

Say: every choice after the first one was forced, and the graph is in one piece. So this is the only answer, apart from the names A and B.

Repeat the idea: edges for forbidden pairs.

Overview

Next stop: The Postman.

Question 3

Say: this is Question 1 of Paper 1 in 2009.

Question 3ReadTranslateSolve

22nd IrMO, 9 May 2009, Paper 1, Question 1

Hamilton Avenue has eight houses. On one side of the street are the houses numbered 1,3,5,7 and directly opposite are houses 2,4,6,8 respectively.
An eccentric postman starts deliveries at house 1 and delivers letters to each of the houses, finally returning to house 1 for a cup of tea.

Throughout the entire journey he must observe the following rules.

  • The numbers of the houses delivered to must follow an odd-even-odd-even pattern throughout,
  • each house except house 1 is visited exactly once (house 1 is visited twice)
  • and the postman at no time is allowed to cross the road to the house directly opposite.
How many different delivery sequences are possible?

Ask a student to place the houses with their hands: odd numbers on one side, even on the other.

Say: he starts at 1 and ends at 1. It is a closed walk.

Read the three rules one by one. Ask: which rule is the strongest?

Say: we count sequences, so the order matters.

Question 3ReadTranslateSolve

Odd houses on one side, even houses on the other.

The wordsThe drawing
directly opposite→Two sides, four facing pairs
odd-even-odd-even→He crosses the road every time
not … directly opposite→4 crossings are forbidden
each house … exactly once→One closed loop through all 8

Say: 1 faces 2, 3 faces 4, and so on.

Ask: can he go from 1 to 3? No, both are odd. He crosses the road every time.

Point at the four crossed lines. These are the only forbidden crossings.

Follow the route with a finger: 1, 4, 5, 2, 7, 6, 3, 8, and back to 1.

Question 3ReadTranslateSolve

The eight visits in order.

Where can each house go?

  • Odd, even, odd, even, …
  • Order the odd houses 3, 5, 7:
    $3!=3\times 2\times 1=6$ ways
  • Between 1 and 3: not 2, not 4
  • Start with 6: then 4, 2, 8 are forced
  • Start with 8: then 2, 4, 6 are forced
  • Each of the 6 orders gives 2 sequences
6 × 2 = 12 delivery sequences

Say: eight places. The odd houses take the first, third, fifth and seventh.

Ask: how many orders for 3, 5 and 7? Three choices for the first, two for the next, one for the last: 3! = 6. House 1 is fixed.

Take 1, 3, 5, 7. Between 1 and 3, houses 2 and 4 are opposite, so only 6 or 8 fits.

Say: 6 is used, so the last place must be 4. Then the place before 7 must be 2, and 8 is left.

Say: 8 is used, so the place after 3 must be 2. Then 4, and 6 is left.

Say: in every order, each gap excludes the two facing houses, so the same argument works. Two sequences each.

Question 3ReadTranslateSolve

The twelve routes. The coloured line is the way back to house 1.

Can we check the answer?

  • Next to house 1: only 4, 6 or 8
  • First and last even house: 3 × 2 = 6 ways
  • Each way can be completed in 2 routes
  • The same total
12 delivery sequences
3Place one side of the street; the rule fills the gaps.

Say: a second method is the best check. Now we look at the houses just after and just before house 1.

Ask: three choices for the second house, then how many for the last? Two.

Watch the routes draw themselves. Every way has two routes, shown one above the other.

Say: both methods give 12.

Repeat the idea: place one side first.

Overview

Next stop: A Prime Number.

Question 4

Say: same paper, 2009, Question 3. The statement is short, but it hides a lot.

Question 4ReadTranslateSolve

22nd IrMO, 9 May 2009, Paper 1, Question 3

Find all positive integers $n$ for which

$n^8+n+1$

is a prime number.

Ask: what is a prime number? Ask for a first value of n to try.

Question 4ReadTranslateSolve

A number of dots, arranged in a rectangle.

The wordsThe drawing
positive integer n→A number goes in, a number comes out
prime number→The dots fit in one row only
not prime→The dots form a wider rectangle

Say: think of a machine. We put n in and ask whether the output is prime.

Ask: can you arrange seven dots in a rectangle? Only as a single row.

Say: six dots make 2 by 3. So to show “not prime”, we look for a rectangle.

Question 4ReadTranslateSolve

$n$$n^8+n+1$Prime factorsHidden factor
$1$$3$$3$ (prime)$\textcolor{#c4006a}{3}$
$2$$259$$7\times 37$$\textcolor{#c4006a}{7}$
$3$$6565$$5\times 13\times 101$$\textcolor{#c4006a}{13}$
$4$$65541$$3\times 7\times 3121$$\textcolor{#c4006a}{21=3\times 7}$

The first four positive integers.

What do small cases show?

  • $n=1$ gives 3: prime
  • $n=2$ gives 259: not prime
  • $n=3$ gives 6565: not prime
  • $n=4$ gives 65541: not prime
  • 3, 7, 13, 21 are $n^2+n+1$
Guess: $n^2+n+1$ is always a factor.

Say: 1 + 1 + 1 = 3, a prime number.

Ask: is 259 prime? Try 7.

Say: it ends in 5, so it is not prime.

Say: the digits add to 21, so 3 divides it.

Ask: what connects 3, 7, 13 and 21? The differences are 4, 6, 8. They are the values of n² + n + 1.

Question 4ReadTranslateSolve

$n^8+n+1$
$=\;n^8-n^2+\textcolor{#c4006a}{n^2+n+1}$subtract and add $n^2$
$n^8-n^2=n^2(n^6-1)$take out $n^2$
$\phantom{n^8-n^2}=n^2(n^3+1)(n^3-1)$$a^2-1=(a+1)(a-1)$, with $a=n^3$
$\phantom{n^8-n^2}=n^2(n^3+1)(n-1)\textcolor{#c4006a}{(n^2+n+1)}$$n^3-1=(n-1)(n^2+n+1)$
$n^8+n+1=\textcolor{#c4006a}{(n^2+n+1)}\bigl(n^2(n^3+1)(n-1)+1\bigr)$common factor

One operation per line.

Is the factor always there?

  • Start from the number
  • Create $n^2+n+1$
  • Work on the rest: take out $n^2$
  • Difference of two squares
  • Difference of two cubes: it appears
  • Both parts have it: take it out
Yes: $n^2+n+1$ is always a factor.

Say: we want to see n² + n + 1 inside this expression.

Ask: what is missing? An n². We subtract it and add it, so nothing changes.

Say: the coloured part is ready. Look only at n⁸ − n².

Say: n⁶ is the square of n³, so we use a² − 1 = (a + 1)(a − 1).

Say: n³ − 1 = (n − 1)(n² + n + 1). Multiply it out if they do not know it. The factor appears.

Say: the first part has the factor, and the second part is the factor once. That is why + 1 is left in the second bracket.

Question 4ReadTranslateSolve

The two factors are the sides of the rectangle.

Can a side be equal to 1?

  • Two factors, two sides
  • $n=1$: the sides are 3 and 1, so 3 is prime
  • $n=2$: the sides are 7 and 37
  • $n\geq 2$: then $n-1\geq 1$, and both sides are longer than 1
Only $n=1$ works.
4Not prime means a rectangle: find two factors larger than 1.

Say: a product is a rectangle of dots.

Say: for n = 1 the second factor is 0 + 1 = 1, so the dots make one row.

Watch 259 dots make a 7 by 37 rectangle.

Ask: when is the second side equal to 1? Only when n − 1 = 0. For n ≥ 2 both sides grow, so the number is never prime again.

Repeat the idea: not prime means a rectangle.

Overview

Next stop: Four Mice.

Question 5

Say: this is the last question of Paper 2 in 2012. It is long, so we read it in pieces.

Question 5ReadTranslateSolve

25th IrMO, 12 May 2012, Paper 2, Question 10

Let $n$ be a positive integer. A mouse sits at each corner point of an $n\times n$ square board, which is divided into unit squares as shown for the example $n=5$. The mice then move according to a sequence of steps, in the following manner:
  • In each step, each of the four mice travels a distance of one unit in a horizontal or vertical direction. Each unit distance is called an edge of the board, and we say that each mouse uses an edge of the board.
  • An edge of the board may not be used twice in the same direction.
  • At most two mice may occupy the same point on the board at any time.
The mice wish to collectively organise their movements so that each edge of the board will be used twice (not necessarily by the same mouse), and each mouse will finish up at its starting point. Determine, with proof, the values of $n$ for which the mice may achieve this goal.

Say: a square board and four mice, one in each corner. The example comes on the next slide.

Read the three rules. Do not explain them yet, the drawing will do it.

Ask: what must be true at the end? Every edge used twice, and every mouse at home.

Question 5ReadTranslateSolve

The board for n = 5, with one mouse at each corner.

The wordsThe drawing
a mouse … at each corner→4 mice on an n × n grid
(a) each … one unit→All four move together, one edge each
(b) not … same direction→Each edge: once each way
(c) at most two mice→Two may meet, three may not
used twice … starting point→Every edge both ways, everyone home

Say: this is the board for n = 5.

Watch one step: the four mice move at the same time.

Ask: how often can one edge be used? Twice, once in each direction.

Say: two mice may share a point. Three may not.

Say: now the goal is a picture. Every edge has two arrows, and every mouse is home.

Question 5ReadTranslateSolve

The boards for n = 1 and n = 2. The colour shows which mouse used the edge.

Do the smallest boards work?

  • Follow the mouse at A
  • $n=1$: go to B and come back
  • $n=2$: six steps, and every edge is used both ways
  • Two mice meet in the centre: allowed
$n=1$ and $n=2$ work.

Ask: what would you try first? The smallest board. Follow only the mouse at A, the others copy it around the board.

Say: follow the mouse at A. It goes to B and comes back. The others make the same move, rotated.

Let it run. Ask: is every edge used in both directions at the end?

Say: here two mice share the centre. Rule (c) allows this.

Question 5ReadTranslateSolve

From n − 2 to n, shown for n = 5. The inner board is shaded.

How do we reach every board?

  • A board of side $n-2$ sits inside
  • Walk to the inner corners: 4 steps
  • Assume the inner board is solved
  • Finish the border, then go home
  • All $2n(n+1)=60$ edges, once in each direction
  • From 1: 3, 5, 7, … From 2: 4, 6, 8, …
Every positive integer $n$ works.
5Solve the smallest boards, then build around them.

Point at the shaded square: it is the board for n − 2, here 3.

Watch the mice reach the inner corners Y.

Say: we assume that the smaller board is solved. The mice use it and finish at the same corners.

Say: each mouse works only on its own side. It goes along the top, steps down and up at each point, and then walks straight home. No two mice meet on the border.

Say: count the edges. The board has n + 1 lines of n edges across, and the same number down: 2n(n + 1) edges. For n = 5 that is 2 × 5 × 6 = 60, and two directions give 120 uses. All the mice are home, so n = 5 works because 3 works.

Say: the same steps take us from any n − 2 to n. We start at 1 and at 2, so we reach every n. This is proof by induction.

Repeat the idea: small boards first, then build around them.

Overview

Next stop: Centroid Size.

Question 6

Say: morphometrics studies shape with numbers. Biologists mark landmarks where the veins of a wing meet.

Question 6ReadTranslateSolve

New question, insect morphometrics

An entomologist marks eight landmarks on the wing of a bee. All the landmarks lie inside or on a circle of radius 1 cm.
For every pair of landmarks, the distance between them is measured in centimetres and squared. Let $T$ be the sum of the 28 squares.
Find the largest possible value of $T$, and determine all the positions of the landmarks for which it is reached.

Say: landmarks are points that every wing of the species has, for example where two veins meet.

Ask: why 28? Eight landmarks, choose two: 8 × 7 divided by 2.

Ask for a guess: where would you put the landmarks to make T large?

Question 6ReadTranslateSolve

A bee wing with eight landmarks.

The wordsThe drawing
eight landmarks on the wing→8 points
a circle of radius 1 cm→No point is further than 1 from the centre
the distance … squared→The area of a square on the segment
the sum of the 28 squares→$\binom82=\frac{8\times 7}{2}=28$ segments: $T$ adds their squares

Say: forget the wing for a moment, we only need eight points.

Say: the circle limits how far apart the points can be.

Point at the square: its area is the squared distance.

Watch the 28 segments. Say: T is n times the square of what biologists call centroid size, here with n = 8.

Question 6ReadTranslateSolve

Landmarks spread evenly around the circle.

What do small cases show?

  • 2 landmarks: $T=4$
  • 3 landmarks: $T=9$
  • 4 landmarks: $T=16$
  • 8 landmarks: …?
Guess: the largest $T$ is $8^2=64$.

Ask: where do two points go? On opposite sides. The distance is the diameter 2, squared 4.

Say: an equilateral triangle in the circle has side √3, so squared side 3. Check with the cosine rule: 1 + 1 − 2 cos 120° = 3. Three sides give 9.

Say: a square. Each side has squared length 1 + 1 = 2 by Pythagoras, and each diagonal is a diameter with square 4. Four sides and two diagonals: 8 + 8 = 16.

Ask: 4, 9, 16, what comes for eight? This is only a guess, and we still need a proof.

Question 6ReadTranslateSolve

$|v_i-v_j|^2=|v_i|^2+|v_j|^2-2\,v_i\cdot v_j$one pair
$T=7\displaystyle\sum|v_i|^2-2\sum_{i\lt j}v_i\cdot v_j$add all 28 pairs
$\Bigl|\displaystyle\sum v_i\Bigr|^2=\sum|v_i|^2+2\sum_{i\lt j}v_i\cdot v_j$square of the total arrow
$T+\Bigl|\displaystyle\sum v_i\Bigr|^2=8\sum|v_i|^2$add the two lines
$T=\textcolor{#c4006a}{8}\displaystyle\sum|v_i|^2-\Bigl|\sum v_i\Bigr|^2$move the total arrow

The arrow vi goes from the centre to landmark i. The dot product of (a, b) and (c, d) is ac + bd.

Can we write T with arrows?

  • One pair: expand the square
  • Each landmark is in 7 pairs
  • Square the sum of all the arrows
  • Add the two lines: the products cancel
  • Only lengths are left
$T$ = 8 × (sum of lengths²) − (total arrow)²

Say: put an arrow from the centre to each landmark. The distance is the length of a difference. It expands like (a − b)².

Ask: in how many pairs does landmark 1 appear? Seven. So each squared length is counted seven times.

Say: the total arrow is the sum of the eight arrows. Its square contains the same products, with a plus sign.

Say: look at the last terms of the two lines. One has minus, the other has plus, so they cancel. And 7 + 1 = 8 squared lengths.

Say: this formula has two parts. Ask: which part do we want large, and which part small?

Question 6ReadTranslateSolve

Left: the arrows from the centre. Right: the same arrows, one after the other.

How do we make T large?

  • Draw the 8 arrows
  • Join them: this is the total arrow
  • First part: no arrow is longer than 1, so at most 8 × 8 = 64
  • Second part: at least 0, when the chain closes
$T\leq 8\times 8-0=64$
Equal when all 8 are on the circle and their centroid is its centre.
6Draw arrows: long arrows that cancel give the largest size.

Say: these are eight landmarks in any position.

Watch the arrows join tip to tail. The thick arrow is their sum.

Ask: what makes the first number large? All the landmarks on the circle. Eight squared lengths of 1, times 8, is 64.

Ask: what makes the second number small? The arrows cancel, so the chain closes. T = 64 exactly when all the landmarks are on the circle and their centroid is the centre. A regular octagon works, but so do any four diameters, as here.

Repeat the idea: long arrows that cancel.

Overview

Next stop: Nine Landmarks.

Question 7

Say: in the computer, a wing is a photograph made of pixels. Every landmark has whole-number coordinates.

Question 7ReadTranslateSolve

New question, insect morphometrics

A photograph of a fly wing is divided into pixels, and the position of each pixel is given by two integers $(x,y)$.
The centroid of three landmarks $(x_1,y_1)$, $(x_2,y_2)$, $(x_3,y_3)$ is the point $\left(\frac{x_1+x_2+x_3}{3},\frac{y_1+y_2+y_3}{3}\right)$.
  • Nine landmarks are placed on nine different pixels. Prove that three of them always have a centroid with integer coordinates.
  • Show that eight landmarks are not always enough.

Say: pixels are like squares on graph paper.

Say: the centroid is the average position. Ask: when is a third of a sum an integer?

Say: part (a) must work for every position. Part (b) needs only one example.

Question 7ReadTranslateSolve

Nine landmarks on a small photograph.

The wordsThe drawing
nine different pixels→9 points on a grid
the centroid of three→Add, then divide by 3
integer coordinates→Both sums are multiples of 3
always→For any 9 points, find such a triangle

Say: each point is a landmark, at whole-number coordinates. We will call a triangle good when its centroid has integer coordinates.

Say: this triangle fails. The sum of x is 7, and 7/3 is not an integer.

Say: this triangle works. The sums are 15 and 9, both multiples of 3.

Ask: what if I move the points? The question says that a good triangle always exists.

Question 7ReadTranslateSolve

Left: the photograph. Right: one box for each pair of remainders.

What matters about a position?

  • Too many positions to try
  • Divide $x$ and $y$ by 3, keep the remainders
  • 3 × 3 = 9 boxes
  • Three in one box: a good triangle
  • If not: at most 2 in each box, so at least 5 boxes are used
Four boxes hold only 4 × 2 = 8 landmarks.

Ask: can we try all the positions? There are too many. We need to keep less information.

Ask: to know if a sum is a multiple of 3, what do we need? Only the remainders 0, 1 or 2.

Watch every landmark go to its box. The column is the remainder of x and the row is the remainder of y.

Say: three landmarks in the same box have equal remainders. 0 + 0 + 0, 1 + 1 + 1 and 2 + 2 + 2 are multiples of 3.

Say: if no box has three, then each box has at most two. Nine landmarks need at least five boxes.

Question 7ReadTranslateSolve

Five occupied boxes. Columns: remainder of x. Rows: remainder of y.

Are five boxes always enough?

  • Take one landmark from each box
  • A full row: a good triangle
  • No full row: the rows have 2, 2 and 1
  • From the single box: 3 lines, every sum is a multiple of 3
  • 2 empty boxes break at most 2 lines
  • The last line is a good triangle
Part (a) is proved.

Say: we keep five occupied boxes and look for three that work together.

Say: in a full row x gives 0 + 1 + 2 = 3, and y is equal three times. It works.

Ask: if no row is full, how can five boxes be shared? Only 2, 2 and 1.

Say: take the single box. Three lines use one box from each row, and each line has sum 3 in x. In y the sum is 0 + 1 + 2 = 3.

Say: each empty box lies on one line only. Two empty boxes, three lines, so one line survives.

Go back to the photograph: the three landmarks on that line have their centroid on a pixel. Part (a) is proved.

Question 7ReadTranslateSolve

Eight landmarks in four boxes, for example (0,0), (3,3), (1,0), (7,3), (0,4), (6,1), (4,4), (10,1).

Why are eight not enough?

  • Use 4 boxes, two landmarks in each
  • Good sum in $x$: three equal remainders
  • Good sum in $y$: also three equal
  • So all three are in the same box
Each box has only two: no good triangle.
7Keep only the remainders: nine landmarks, nine boxes.

Say: for part (b) we choose the positions, and we choose them badly on purpose.

Ask: which sums of three zeros and ones are multiples of 3? Only 0 and 3, so all three are equal.

Say: the same is true for y.

Say: equal x and equal y means the same box, and each box has only two landmarks. No triangle works.

Repeat the idea: keep only the remainders.

Overview

Next stop: Wing Cells.

Question 8

Say: the wing of a dragonfly is a net of small cells. We can count without measuring.

Question 8ReadTranslateSolve

New question, insect morphometrics

The veins and the margin of a dragonfly wing form one connected network. Exactly three segments meet at every junction, and each segment separates two different regions (two cells, or a cell and the outside).
Every cell has five, six or seven sides, where a side is a segment between two junctions. There are $k$ junctions on the margin of the wing.
Prove that at least $k+6$ cells have five sides, and determine when there are exactly $k+6$.

Say: the margin is the border of the wing. A junction is a point where segments meet.

Ask: does the question give the number of cells? No. The answer depends only on k.

Say: it is surprising that the six-sided cells do not matter.

Question 8ReadTranslateSolve

A small wing with 13 cells.

The wordsThe drawing
one connected network→Points, segments and cells
three segments … every junction→Each point has 3 ends
five, six or seven sides→Write the number in each cell
k junctions on the margin→Count along the border: k = 6

Say: this is a small example that follows all the rules.

Point at one junction and count the segments: one, two, three.

Count the cells together: 12 with five sides, and 1 with six.

Ask: what does the statement say here? At least 6 + 6 = 12 cells with five sides. We have exactly 12.

Question 8ReadTranslateSolve

V: junctions. E: segments. C: closed cells.

What never changes?

  • Count $V$, $E$ and $C$: $24-36+13=1$
  • Remove one segment: one cell opens
  • $E$ and $C$ both lose 1: the result stays 1
  • At the end, a tree: $V-E=1$ and $C=0$
Euler: $V-E+C=1$

Count together: 24 junctions, 36 segments, 13 cells. 24 − 36 + 13 = 1.

Say: a segment disappears and one cell opens. We lose one segment and one cell.

Watch the numbers: E and C go down together, so the result stays at 1.

Say: no closed cell is left, only a tree. A tree has one more point than segments. This works for every wing.

Question 8ReadTranslateSolve

The same 72, counted in three ways. p, h and s: cells with five, six and seven sides.

How can we count the sides?

  • By segments: 2 sides each, $2E$
  • By junctions: 3 ends each, $3V$
  • By cells: $5p+6h+7s$, and $k$ outside the margin
$2E=3V=5p+6h+7s+k$

Put a finger on each side of one segment. Two marks for each segment.

Now count the ends of the segments. Three at each junction, and two for each segment, so 2E = 3V.

Say: p, h and s are the numbers of cells with five, six and seven sides. The k comes from the outside: k junctions on the margin make k segments, and each has one side outside.

Question 8ReadTranslateSolve

$6V-6E+6C=6$Euler, times 6
$4E-6E+6C=6\;\Rightarrow\;6C=2E+6$$6V=4E$, because $3V=2E$
$5p+6h+7s=6C-p+s$because $C=p+h+s$
$6C-p+s=2E-k$because $5p+6h+7s+k=2E$
$\textcolor{#c4006a}{p-s=k+6}$second line minus fourth line
$p=k+6+s\;\geq\;\textcolor{#c4006a}{k+6}$$s$ cannot be negative

p, h and s: cells with five, six and seven sides.

How do we join the two counts?

  • Multiply Euler by 6
  • Replace $V$: only $C$ and $E$ are left
  • Six sides per cell: five is 1 less, seven is 1 more
  • Use the count of the sides
  • Subtract: $C$ and $E$ disappear
  • Each seven-sided cell adds one more
Exactly $k+6$ when no cell has seven sides.
8Count the same thing in two ways.

Ask: why 6? Because then the six-sided cells will disappear.

Say: we know 3V = 2E, so 6V = 4E. Put it in and tidy up.

Say: if every cell had six sides, the total would be 6C. Each five-sided cell has one side less, and each seven-sided cell has one more.

Say: the last slide gave 5p + 6h + 7s + k = 2E. Move the k to the other side.

Say: 6C and 2E are in both lines, so they disappear. Only p, s and k are left.

Say: p is the smallest when s = 0. That is the equality case, as in our small wing: 12 = 6 + 6.

Repeat the idea: count the same thing in two ways.

Overview

Next stop: Bootstrap Samples.

Question 9

Say: we measured the wings. How much can we trust the average? There is a method for this, called the bootstrap. You do not need to know it: the next slide explains it.

Question 9The ideaReadTranslateSolve

The bootstrap (B. Efron, 1979): new samples are drawn from the data that we already have.

What is the bootstrap?

  • Our data: 5 wing lengths, with mean 9.6 mm
  • Other bees would give another mean
  • Draw 5 lengths from our own data. Repeats are allowed
  • This is a bootstrap sample. Take its mean
  • Repeat many times and look at the spread
The bootstrap resamples our own data to see how much an average can change.

Say: an entomologist measured one wing from each of five bees. The mean length is 9.6 mm.

Ask: if she caught five other bees, would the mean be 9.6 again? Probably not. We want to know how far it could move, but we cannot catch all the bees.

Say: the idea is to use the five wings that we have as if they were all the bees. Draw one at random, write its length, and put it back. Do this five times.

Say: this new list is called a bootstrap sample. Wing 2 appears twice and wing 3 is missing. Its mean is 47.7 divided by 5, which is 9.54.

Say: the computer repeats this a thousand times. The means pile up around 9.6, and most of them lie between 9.1 and 10.2. This spread tells us how much to trust our 9.6. Now we ask Olympiad questions about these samples.

Question 9ReadTranslateSolve

New question, insect morphometrics and the bootstrap

An entomologist measures one wing from each of $n$ bees, where $n\geq 2$, and obtains $n$ different lengths.
A bootstrap sample is a list of $n$ entries. Each entry is one of the $n$ lengths, the same length may be used again, and the order matters. So there are $n^n$ samples.
  • Prove that the average of the means of all the $n^n$ samples is equal to the mean of the $n$ lengths.
  • Two samples are of the same kind if one is a reordering of the other. How many kinds are there?
  • Let $D$ be the average number of different lengths in a sample, over all the samples. Prove that $D>\dfrac{3n}{5}$.

Say: n bees, n wings, n different numbers. Nothing difficult yet.

Say: this is the bootstrap sample of the last slide, written as a list. Ask: why n to the power n? There are n choices for each of the n entries.

Say: three parts, and each one needs a different skill. Part (a) is about symmetry, part (b) about counting, and part (c) about an inequality.

Question 9ReadTranslateSolve

The example n = 3, with lengths 1, 2 and 3.

The wordsThe drawing
n different lengths→n = 3: lengths 1, 2 and 3
a bootstrap sample→3 entries, repeats allowed: 2, 3, 2
nⁿ samples→3 × 3 × 3 = 27 lists
(a) the mean · (b) the kind→Mean 7/3. Same kind: 2 2 3, 2 3 2, 3 2 2
(c) different lengths→2, 3, 2 has two different lengths

Say: we call the lengths 1, 2 and 3.

Watch one sample: we choose 2, then 3, then 2 again. Length 1 is missing.

Say: three choices for each entry. These are all the samples.

Say: for part (a) each sample has a mean, here 7 divided by 3. For part (b) these three samples are one kind: two 2s and one 3.

Say: for part (c) we count the different lengths. 3 samples have one, 18 have two and 6 have three. The total is 57, so D is 57 divided by 27. That is more than 3n/5 = 1.8.

Question 9ReadTranslateSolve

Average of the means = (sum of all the entries) ÷ (n entries in a sample) ÷ (nⁿ samples).

(a) Where is the centre of the means?

  • List the 27 samples and their sums
  • Pile them up by their mean: a guess
  • Place 1: each length appears 9 times
  • All three places: $3\times 9\times(1+2+3)=162$
  • Any $n$: each length is $n^{n-1}$ times in each place
$\dfrac{n\cdot n^{n-1}(x_1+\cdots+x_n)}{n\cdot n^{n}}=\dfrac{x_1+\cdots+x_n}{n}$

Say: each column is one sample, read from the top. Under it is the sum of its three entries.

Watch the samples pile up by their mean. Ask: what do you notice? The pile is the same on both sides of 2. This is only a guess, and it uses the lengths 1, 2, 3. We need a proof for any lengths.

Say: do not add sample by sample. Add place by place. In place 1 we see nine 1s, nine 2s and nine 3s, because the other two places are free: 3 × 3 = 9.

Say: the three places give the same total. The sum of all the entries is 162. Divide by 3 to get means, and by 27 to get their average: 2.

Say: the same count works for any n and any lengths x. Fix one place and one length: the other n − 1 places are free, so n to the power n − 1 samples. The fraction simplifies to the mean of the data.

Question 9ReadTranslateSolve

Stars and bars for n = 3: three stars for the entries and two bars between the three lengths.

(b) How many kinds of sample?

  • A kind: count each length
  • Draw it with stars and bars
  • Each row of stars and bars: one kind
  • Choose the places of the stars:
    $\dbinom{5}{3}=\dfrac{5!}{3!\,2!}=10$
  • Any $n$: $n$ stars, $n-1$ bars, $2n-1$ places
$\dbinom{2n-1}{n}=\dfrac{(2n-1)!}{n!\,(n-1)!}$ kinds

Say: if the order does not matter, a sample is only three numbers: how many 1s, how many 2s, how many 3s. Here 0, 2 and 1.

Say: we draw this. A star for each entry, and a bar each time we move to the next length. No 1s, so we start with a bar. Then two stars, a bar, and one star.

Ask: can every row of three stars and two bars be read as a kind? Yes, and different rows give different kinds. Here are all of them.

Say: a row has five places. Once we choose the three places of the stars, the bars take the rest. 5 choose 3 is 5! over 3! 2!, which is 10. Check: the orders add up to 1 + 3 + 3 + 3 + 6 + 3 + 1 + 3 + 3 + 1 = 27.

Say: for n lengths we need n stars and n − 1 bars, so 2n − 1 places. For n = 5 this gives 9 choose 5 = 126 kinds, out of 3125 samples.

Question 9ReadTranslateSolve

The 27 samples for n = 3. A dot means that the sample contains that length.

(c) Can we count in another way?

  • One column for each sample
  • Count by columns: 57 dots
  • Count by rows: 19 + 19 + 19 = 57
  • Row 1: all except 2 × 2 × 2 = 8 samples
  • Every row is the same, for any $n$
It is enough to prove: length 1 is in more than $\frac35$ of the samples.

Say: read a column from the top. The sample 1, 1, 2 contains the lengths 1 and 2, so it has two dots.

Say: a column gives the number of different lengths in one sample. D is the total divided by 27.

Ask: how many dots are in the first row? 19. The other rows have 19 too, because no length is special.

Say: a sample without length 1 uses only 2 and 3. That is 2 × 2 × 2 = 8, and 27 − 8 = 19.

Say: D is n times the share of one row. If each row fills more than 3/5 of the columns, then D is more than 3n/5.

Question 9ReadTranslateSolve

The example n = 5, with 5⁵ = 3125 samples. M is the number of samples without length 1.

(c) How often is length 1 missing?

  • Never: $M=4^5=1024$
  • Once: $5\times 4^4=1280$, more than $M$
  • Twice: $\binom52\times 4^3=10\times 64=640$, more than half of $M$
  • Together: more than $2\frac12$ times $M$
So $M$ is less than $\frac25$ of all the samples.

Say: length 1 never appears, so each place has four choices.

Say: choose the place for length 1, five ways. The other four places have four choices each. Ask: why is this more than M? Because 5 is more than 4.

Say: choose two places out of five: 5 × 4 divided by 2, ten ways. The other three places have four choices each. This is more than half of M.

Say: these groups do not overlap, and all the samples together are at least as many. So M fits more than two and a half times.

Question 9ReadTranslateSolve

$M=(n-1)^n$length 1 never
$n\,(n-1)^{n-1}\;>\;(n-1)(n-1)^{n-1}=M$length 1 once
$\dbinom n2(n-1)^{n-2}=\dfrac n2\,(n-1)^{n-1}\;>\;\dfrac M2$length 1 twice
$n^n\;\geq\;\text{never}+\text{once}+\text{twice}\;>\;\dfrac{5M}{2}$add the three groups
$\dfrac{M}{n^n}\;<\;\textcolor{#c4006a}{\dfrac25}$share without length 1
$D=n\Bigl(1-\dfrac{M}{n^n}\Bigr)\;>\;\textcolor{#c4006a}{\dfrac{3n}{5}}$$n$ equal rows

The same three groups, for every n ≥ 2. Here n choose 2 = n(n − 1) ÷ 2.

(c) Does it work for every n?

  • Never: $n-1$ choices in each place
  • Once: $n$ places, and $n>n-1$
  • Twice: $\binom n2=\frac{n(n-1)}{2}$ pairs of places
  • Add the three groups
  • Length 1 is missing in less than $\frac25$
  • So it is present in more than $\frac35$
$D>\frac{3n}{5}$ for every $n\geq 2$.
9Resample your own data, then count the samples row by row.

Say: now we repeat the last picture with n in place of 5.

Ask: what changed from M? One factor n − 1 became n.

Say: n choose 2 is n(n − 1)/2, the number of pairs of places. One factor n − 1 joins the power, and n/2 is left. Compare with the line above: it is half of it.

Say: the three groups do not overlap, so together they are at most all the samples. There may be more samples, with length 1 three times or more. We do not need them.

Say: turn the inequality around.

Say: n rows, each with more than 3/5 of the dots. For fast students: when n is very large, the share is about 63.2%, a number that statisticians know well.

Repeat the idea: resample your own data, then count row by row.

Overview

Say: we reached the top. Look back at the route.

Summary

Ask: which question did you like the most, and why?

Summary

1Seven FriendsCount everything, subtract the bad weeks, add back the overlap.
2Two SetsDraw each forbidden pair as an edge, then follow the edges.
3The PostmanPlace one side of the street; the rule fills the gaps.
4A Prime NumberNot prime means a rectangle: find two factors larger than 1.
5Four MiceSolve the smallest boards, then build around them.
6Centroid SizeDraw arrows: long arrows that cancel give the largest size.
7Nine LandmarksKeep only the remainders: nine landmarks, nine boxes.
8Wing CellsCount the same thing in two ways.
9Bootstrap SamplesResample your own data, then count the samples row by row.
Read the words, draw each one, then move the drawing until the answer is forced.

Ask the students to say each idea in their own words.

Say: the four insect questions use the same ideas.

Read the last line together. Give them one minute to choose a question to redo at home.

References

Cover of the Holland compilation

Irish Mathematical Olympiad 1988-1999: Problems, Hints & Solutions. Compiled and edited by Finbarr Holland.

Cover of the Dukes compendium

The Irish Mathematical Olympiads Compendium. Mark Dukes, University College Dublin. The questions follow the 1988 – 2026 edition.

Questions 6 to 9 were written for this class. They are based on known results on distances from a centroid, zero sums of remainders, Euler’s formula and the bootstrap (B. Efron, 1979, Annals of Statistics 7, 1–26).

Show the two books.

Thank the students and take questions.