Maths Olympiad Prep

Library / /4 of 4

Combinatorics Difficulty 7.0 National Olympiad, round 2 Prove it Romania

Consider a table with nn lines and mm columns (n,mN,n,m2n, m \in \mathbb{N}, n, m \ge 2) consisting of nmn \cdot m squares 1×11 \times 1, which we will call cells. We call snake a sequence of cells with the following properties: the first cell is located on the first (top) line of the table, the last cell is located on the last line of the table and, starting with the second, each cell of the snake has a common side with the previous one and is not located on a line above the previous cell. The length of a snake is the number of cells that form the snake. Determine the arithmetic mean of the lengths of all the snakes in the table.
Cristian Șăvescu

Solution

Consider a certain snake. For each line i{1,2,,n}i \in \{1, 2, \dots, n\} of the table, we denote by aia_i and bib_i the numbers of the columns corresponding to the first and last cell, respectively, that the snake has on line ii. We observe that ai+1=bia_{i+1} = b_i for any i{1,2,,n1}i \in \{1, 2, \dots, n-1\}, therefore the snake is determined by the values a1,b1,b2,,bn{1,2,,m}a_1, b_1, b_2, \dots, b_n \in \{1, 2, \dots, m\}. We deduce that the total number of snakes is mn+1m^{n+1}.

Let (k,p)(k, p) be some cell of the table. The snakes that contain this cell are those for which akpbka_k \le p \le b_k. For these, we can choose aka_k and bkb_k in 2p(mp+1)12p(m-p+1)-1 ways, and the numbers a1,b1,b2,,bna_1, b_1, b_2, \dots, b_n, other than aka_k and bkb_k, in mn1m^{n-1} ways. Thus, the cell (k,p)(k, p) is counted by mn1(2pm2p2+2p1)m^{n-1}(2pm-2p^2+2p-1) times in all the snakes in the table.

It follows that the cells on column pp contribute with nmn1(2pm2p2+2p1)n \cdot m^{n-1}(2pm - 2p^2 + 2p - 1) to the total TT of the lengths of all snakes in the table, therefore
T=p=1mnmn1(2pm2p2+2p1)=nmn+1(m+1)nmn(m+1)(2m+1)3+nmn+1=nmn(m2+3m1)3. T = \sum_{p=1}^{m} n \cdot m^{n-1} (2pm - 2p^2 + 2p - 1) = n \cdot m^{n+1} (m+1) - \frac{n \cdot m^n (m+1)(2m+1)}{3} + n \cdot m^{n+1} = \frac{n \cdot m^n (m^2 + 3m - 1)}{3}.
The arithmetic mean of the lengths of all the snakes in the table is n(m2+3m1)3m\frac{n(m^2+3m-1)}{3m}.

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.