Maths Olympiad Prep

Track / Stage 8 / 54 of 180 #1754 of 1964

Problem 1754

IMO Shortlist mid-range; USAMO P2/P5
Combinatorics Difficulty 8.1 Prove it

On the grid plane all possible broken lines with the following properties are constructed:
each of them starts at the point (0,0)(0, 0), has all its vertices at integer points, each linear segment goes either up or to the right along the grid lines. For each such broken line consider the corresponding worm, the subset of the plane consisting of all the cells that share at least one point with the broken line. Prove that the number of worms that can be divided into dominoes (rectangles 2\times 1 and 1\times 2) in exactly n>2n > 2 different ways, is equal to the number of positive integers that are less than n and relatively prime to nn.

(Ilke Chanakchi, Ralf Schiffler)

This one wants a proof. Work it on paper, then read the official solution and mark yourself. Be honest about it: the record is only any use to you if it is.

Official solution

1. Understanding the Problem:
- We are given a grid plane and need to consider all possible broken lines starting at (0,0)(0,0), with vertices at integer points, and each segment either going up or to the right.
- For each broken line, we consider the corresponding "worm," which is the subset of the plane consisting of all cells that share at least one point with the broken line.
- We need to prove that the number of worms that can be divided into dominoes (rectangles 2×12 \times 1 and 1×21 \times 2) in exactly n>2n > 2 different ways is equal to the number of positive integers less than nn and relatively prime to nn.

2. Initial Observations:
- Each worm corresponds to a path from (0,0)(0,0) to some point (a,b)(a,b) on the grid.
- The problem can be approached by considering the tiling of the grid cells that the worm covers.

3. Recursive Approach:
- Suppose the last move of the broken line is rightward. If we tile the 2×22 \times 2 square containing the last point with a horizontal domino, there is a unique way to tile the largest staircase of the skeleton such that the last vertex is in it.
- If we tile the 2×22 \times 2 square containing the last vertex with a vertical domino, we can delete the last vertex and consider the remaining skeleton.

4. Recursion Formula:
- Let f(S)f(\mathcal{S}) be the number of ways to tile any skeleton S\mathcal{S} with dominoes.
- We get the recursion:
f(S)=f(AS)+f(BS) f(\mathcal{S}) = f(A_{\mathcal{S}}) + f(B_{\mathcal{S}})
where ASA_{\mathcal{S}} is the remaining skeleton when we tile the last 2×22 \times 2 square with a horizontal domino, and BSB_{\mathcal{S}} is the remaining skeleton when we tile it with a vertical domino.

5. Tree Representation:
- We can represent the recursion as a tree where each node corresponds to a skeleton S\mathcal{S}, and its children are ASA_{\mathcal{S}} and BSB_{\mathcal{S}}.
- In the kk-th row of the tree, we have all the 2k2^k paths of size kk.

6. Labeling the Tree:
- For each skeleton S\mathcal{S} on the tree, label it with f(S)f(\mathcal{S}).
- We want to prove that each integer nn appears exactly φ(n)\varphi(n) times on the tree, where φ(n)\varphi(n) is the Euler's totient function.

7. Coprime Neighbors:
- From the recursion, two neighbors on the tree are coprime. This can be proved via induction.

8. Claim:
- For each vertex labeled with nn, its parent is labeled with m(n2,n)m \in (\frac{n}{2}, n) and gcd(m,n)=1\gcd(m, n) = 1.
- Proof: Use induction. The base cases are done. The gcd\gcd condition is proved by the coprime neighbors property. Since nmn - m comes before mm on the tree, nm<m    n2<mn - m < m \implies \frac{n}{2} < m.

9. Counting Appearances:
- For each m<nm < n with gcd(m,n)=1\gcd(m, n) = 1, either mm or nmn - m belongs to (n2,n)(\frac{n}{2}, n). Thus, there are exactly φ(n)2\frac{\varphi(n)}{2} numbers belonging to (n2,n)(\frac{n}{2}, n) which are coprime to nn.

10. Uniqueness of Neighbors:
- There aren't two pairs of neighbors on the same side of the tree that are equal. This can be proved using induction.

11. Final Argument:
- Using the above claims and properties, we can prove that for each vertex vv labeled with ll, its parent is labeled with l0l_0 such that gcd(l,l0)=1\gcd(l, l_0) = 1 and l0(l2,l)l_0 \in (\frac{l}{2}, l), and its children are labeled with l1,l2l_1, l_2 such that gcd(l,l1)=gcd(l,l2)=1\gcd(l, l_1) = \gcd(l, l_2) = 1 and l1,l2(l,2l)l_1, l_2 \in (l, 2l).
- By induction, we can show that nn appears φ(n)\varphi(n) times on the tree.

The number of worms that can be divided into dominoes in exactly n different ways is φ(n). \boxed{\text{The number of worms that can be divided into dominoes in exactly } n \text{ different ways is } \varphi(n).}

Source: NuminaMath-1.5, licensed Apache-2.0. Statement and solution reproduced as published; topic, difficulty and ordering added by this site.