Consider a table with lines and columns () consisting of squares , 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 of the table, we denote by and the numbers of the columns corresponding to the first and last cell, respectively, that the snake has on line . We observe that for any , therefore the snake is determined by the values . We deduce that the total number of snakes is .
Let be some cell of the table. The snakes that contain this cell are those for which . For these, we can choose and in ways, and the numbers , other than and , in ways. Thus, the cell is counted by times in all the snakes in the table.
It follows that the cells on column contribute with to the total of the lengths of all snakes in the table, therefore
The arithmetic mean of the lengths of all the snakes in the table is .
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.