Let N, k be positive integers with k≤N. An (N,k)-Mountain Tetris mini-game is played on an N×N grid. An ascending path contour is any path on the grid made of horizontal and vertical segments, which starts at (0,0) and reaches (N,N) without ever going down or back.
Every (N,k)-Mountain Tetris mini-game begins with a mountain having an initial ascending path contour which starts from (0,0) in horizontal direction, and has exactly k horizontal and k vertical segments. A 1×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)-Mountain Tetris mini-games equals k+1N−k.
Here is an example of a (6,4) Mountain Tetris mini-game with an initial ascending path contour. The player needs one move to win.
Solution
Given an initial ascending path contour, let d1,d2,…,dk denote the lengths of the horizontal segments, then di>0 and ∑idi=N. Because the contour starts in horizontal direction and has exactly k horizontal and k vertical segments, it ends with a vertical segment and so no horizontal segment is placed at level N. 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 (k−1N−1) ways to choose the lengths of the horizontal segments of an initial ascending path contour in an (N,k)-game. Indeed, we can encode the choice (d1,d2,…,dk) by a length (N−1) sequence of 0-s and 1-s, with a 1 following each string of (di−1) consecutive 0-s to mark the end of the i-th segment, for i∈{1,…,k−1} (the end of the last segment necessarily is at position N).
Depending on its position, a rock emerging on top of the i-th horizontal segment will require 0,1,…,di−2 or di−1 moves to be brought to a winning position. This gives a total of 0+1+⋯+(di−1)=2(di−1)di=(2di) moves for the di possible positions of the rock above the i-th horizontal segment. Hence the average number of moves required for all (k−1N−1) initial paths and all N possible starting positions of the rock is: (d1,…,dk)∑i=1∑k(2di)/N(k−1N−1) We note that (2di) can also be interpreted as the number of ways to choose 2 distinct integer points on the i-th horizontal segment (but not including the starting point of the segment since then we would have a choice of di+1 points). This is equivalent to splitting the i-th segment into 3 segments of lengths ai+bi+ci=di, with ai>0 and bi>0 but possibly ci=0. For symmetry, let ci′=ci+1. Then after relabelling the sequence d1,…,di−1,ai,bi,ci′,di+1,…,dk as e1,…,ek+2 and remembering i∈{1,…,k} we get (d1,…,dk)∑i=1∑k(2di)=k⋅#{(e1,…,ek+2)i∑ei=N+1 and ei∈Z,ei>0} which is equal to k(k+1N) by binary code counting as before. Finally we get N(k−1N−1)k(k+1N)=k+1N−k, 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.