Maths Olympiad Prep

Library / /368 of 462

Combinatorics Difficulty 6.7 National Olympiad Prove it Ireland

Let NN, kk be positive integers with kNk \le N. An (N,k)(N, k)-Mountain Tetris mini-game is played on an N×NN \times N grid. An ascending path contour is any path on the grid made of horizontal and vertical segments, which starts at (0,0)(0, 0) and reaches (N,N)(N, N) without ever going down or back.

Every (N,k)(N, k)-Mountain Tetris mini-game begins with a mountain having an initial ascending path contour which starts from (0,0)(0, 0) in horizontal direction, and has exactly kk horizontal and kk vertical segments. A 1×11 \times 1-square rock drops vertically from a random slot on the grid ceiling. A move consists of shifting the rock 1 unit to the right. The game is won if the player performs the minimum number of moves needed so that when the rock settles on the mountain, the resulting shape is still an ascending path contour. The game is then reset and begins with a new initial ascending path contour.

Prove that the average number of moves played over all possible (N,k)(N, k)-Mountain Tetris mini-games equals
Nkk+1. \frac{N-k}{k+1}.

Here is an example of a (6,4)(6, 4) Mountain Tetris mini-game with an initial ascending path contour. The player needs one move to win.
Figure 1

Solution

Given an initial ascending path contour, let d1,d2,,dkd_1, d_2, \dots, d_k denote the lengths of the horizontal segments, then di>0d_i > 0 and idi=N\sum_i d_i = N. Because the contour starts in horizontal direction and has exactly kk horizontal and kk vertical segments, it ends with a vertical segment and so no horizontal segment is placed at level NN. The lengths of the vertical segments is not related to the horizontal lengths and play no role in how the game is played so we will disregard them.

There are a total of (N1k1)\binom{N-1}{k-1} ways to choose the lengths of the horizontal segments of an initial ascending path contour in an (N,k)(N, k)-game. Indeed, we can encode the choice (d1,d2,,dk)(d_1, d_2, \dots, d_k) by a length (N1)(N-1) sequence of 0-s and 1-s, with a 1 following each string of (di1)(d_i - 1) consecutive 0-s to mark the end of the ii-th segment, for i{1,,k1}i \in \{1, \dots, k-1\} (the end of the last segment necessarily is at position NN).

Depending on its position, a rock emerging on top of the ii-th horizontal segment will require 0,1,,di20, 1, \dots, d_i - 2 or di1d_i - 1 moves to be brought to a winning position. This gives a total of
0+1++(di1)=(di1)di2=(di2) 0 + 1 + \dots + (d_i - 1) = \frac{(d_i - 1)d_i}{2} = \binom{d_i}{2}
moves for the did_i possible positions of the rock above the ii-th horizontal segment. Hence the average number of moves required for all (N1k1)\binom{N-1}{k-1} initial paths and all NN possible starting positions of the rock is:
(d1,,dk)i=1k(di2)/N(N1k1) \sum_{(d_1, \dots, d_k)} \sum_{i=1}^{k} \binom{d_i}{2} / N \binom{N-1}{k-1}
We note that (di2)\binom{d_i}{2} can also be interpreted as the number of ways to choose 2 distinct integer points on the ii-th horizontal segment (but not including the starting point of the segment since then we would have a choice of di+1d_i + 1 points). This is equivalent to splitting the ii-th segment into 3 segments of lengths ai+bi+ci=dia_i + b_i + c_i = d_i, with ai>0a_i > 0 and bi>0b_i > 0 but possibly ci=0c_i = 0. For symmetry, let ci=ci+1c'_i = c_i + 1. Then after relabelling the sequence d1,,di1,ai,bi,ci,di+1,,dkd_1, \dots, d_{i-1}, a_i, b_i, c'_i, d_{i+1}, \dots, d_k as e1,,ek+2e_1, \dots, e_{k+2} and remembering i{1,,k}i \in \{1, \dots, k\} we get
(d1,,dk)i=1k(di2)=k#{(e1,,ek+2)|iei=N+1 and eiZ,ei>0} \sum_{(d_1, \dots, d_k)} \sum_{i=1}^{k} \binom{d_i}{2} = k \cdot \# \left\{ (e_1, \dots, e_{k+2}) \middle| \sum_i e_i = N+1 \text{ and } e_i \in \mathbb{Z}, e_i > 0 \right\}
which is equal to k(Nk+1)k \binom{N}{k+1} by binary code counting as before. Finally we get
k(Nk+1)N(N1k1)=Nkk+1, \frac{k \binom{N}{k+1}}{N \binom{N-1}{k-1}} = \frac{N-k}{k+1},
as required.

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.