A snake of length $k$ is an animal which occupies an ordered $k$-tuple $(s_1, \dots, s_k)$ of cells in a $n \times n$ grid of square unit cells. These cells must be pairwise distinct, and $s_i$ and $s_{i+1}$ must share a side for $i = 1, \dots, k-1$. If the snake is currently occupying $(s_1, \dots, s_k)$ and $s$ is an unoccupied cell sharing a side with $s_1$, the snake can move to occupy $(s, s_1, \dots, s_{k-1})$ instead. The snake has turned around if it occupied $(s_1, s_2, \dots, s_k)$ at the beginning, but after a finite number of moves occupies $(s_k, s_{k-1}, \dots, s_1)$ instead. Determine whether there exists an integer $n > 1$ such that: one can place some snake of length $0.9n^2$ in an $n \times n$ grid which can turn around. Nikolai Beluhov
Problem
Source: USA Winter TST for IMO 2019, Problem 3, by Nikolai Beluhov
Tags: combinatorics
11.12.2018 19:31
11.12.2018 20:03
15.12.2018 00:09
Now that some time has passed, here is the official solution. It's hidden because (i) it's very long, (ii) there's a picture which is a huge spoiler.
06.01.2019 01:41
The proposer seems to like snake puzzles a lot https://www.gmpuzzles.com/blog/2017/06/pentosnake-nikolai-beluhov/
21.06.2020 23:45
19.09.2021 17:23
07.11.2022 02:24
Yes. First go up and down slowly right until right side go up left down to wrap around. Then slowly change from left to right to going right and left slowly up and wrap around from left side down, over the course of multiple iteration, each time increasing the height of the left-right portion (starting from the bottom side) by one and decreasing the height of the up-down section by one (shrinking upwards). Once complete, Then instead of wrapping left side, go up, then right and wrap the right side, and then it is not hard to translate the motion down and to the left. Now we can undo the operation in a left-right symmetric manner to yield the desired backwards snake.
06.07.2023 08:32
Let $m = 10$ and let a "block" be a $\textstyle \lfloor 0.999n\rfloor \times 2\lfloor \frac{0.999n}{2(m+1)}\rfloor$ rectangle. Since a block has an even number of columns, it can be traversed in either a "forwards" or "backwards" direction, as demonstrated below: [asy][asy] unitsize(3mm); add(grid(6,12,gray+linewidth(0.4))); draw(box((0,0),(6,12))); draw((-0.5,0.5)--(0.5,0.5)--(0.5,11.5)--(1.5,11.5)--(1.5,0.5)--(2.5,0.5)--(2.5,11.5)--(3.5,11.5)--(3.5,0.5)--(4.5,0.5)--(4.5,11.5)--(5.5,11.5)--(5.5,0.5)--(7,0.5),red+linewidth(1),Arrow(TeXHead)); add(shift((15,0))*grid(6,12,gray+linewidth(0.4))); draw(shift((15,0))*box((0,0),(6,12))); draw(shift((15,0))*((6.5,0.5)--(5.5,0.5)--(5.5,11.5)--(4.5,11.5)--(4.5,0.5)--(3.5,0.5)--(3.5,11.5)--(2.5,11.5)--(2.5,0.5)--(1.5,0.5)--(1.5,11.5)--(0.5,11.5)--(0.5,0.5)--(-1,0.5)),blue+linewidth(1),Arrow(TeXHead)); [/asy][/asy] Now consider the following "road map", where the rectangles indicate blocks. This can be fit inside an $n \times n$ square for large enough $n$. [asy][asy] unitsize(3mm); draw(box((0,0),(5,10))); draw(shift((8,0))*box((0,0),(5,10))); draw(shift((24,0))*box((0,0),(5,10))); draw(shift((32,0))*box((0,0),(5,10))); label("$1$",(2.5,5)); label("$2$",(10.5,5)); label("$\cdots$",(18.5,5)); label("$m$",(26.5,5)); label("$X$",(34.5,5)); draw((5,1)--(8,1)); draw((13,1)--(16,1)); draw((21,1)--(24,1)); draw((29,1)--(32,1)); draw((37,1)--(38,1)); draw((38,1)--(38,11),Arrow(TeXHead,Relative(0.52))); draw((38,11)--(7,11),Arrow(TeXHead,Relative(0.62))); draw((7,11)--(7,1),Arrow(TeXHead,Relative(0.52))); draw((15,11)--(15,1),Arrow(TeXHead,Relative(0.52))); draw((23,11)--(23,1),Arrow(TeXHead,Relative(0.52))); draw((30,11)--(30,1),Arrow(TeXHead,Relative(0.52))); draw((30,1)--(30,-1),Arrow(TeXHead,Relative(0.6))); draw((30,-1)--(6,-1),Arrow(TeXHead,Relative(0.51))); draw((6,-1)--(6,1),Arrow(TeXHead,Relative(0.6))); draw((22,-1)--(22,1),Arrow(TeXHead,Relative(0.6))); draw((14,-1)--(14,1),Arrow(TeXHead,Relative(0.6))); draw((0,1)--(-1,1)); draw((-1,1)--(-1,-2),Arrow(TeXHead,Relative(0.57))); draw((-1,-2)--(31,-2),Arrow(TeXHead,Relative(0.51))); draw((31,-2)--(31,1),Arrow(TeXHead,Relative(0.57))); [/asy][/asy] Take a snake with length equal to the number of cells within $m$ blocks and have it take the following path, using the appropriate labeled routes (here $i$ refers to traversing block $i$ forwards and $\overline i$ refers to traversing block $i$ backwards): \begin{align*} &1\,2\,3\,\cdots\, m\,X \\ &2\,3\,\cdots m\, \,\overline 1\, X \\ &3 \,\cdots \,m \,\overline 2\, \overline 1 \,X \\ & \vdots \\ & m\, \overline{m-1} \,\cdots \,\overline 2\, \overline 1 \,X \\ & \overline{m}\, \overline{m-1}\, \cdots\, \overline 2\, \overline 1 \end{align*}As this path clearly reverses the snake, it suffices to show that there are no collisions. To see this, note that there are always at least $m$ blocks traversed before a given block is used again, so there cannot be a collision inside a block. Given one of the $2(m+1)$ cells that are not in a block but are adjacent to the entrance or exit of a block, the only times the snake traverses it are immediately before or after it traverses the adjacent block, so there cannot be a collision here either. All other cells are in "one-way" parts of the map, so a collision cannot start there either. This concludes the proof.
06.07.2023 09:45
^ this solution is the bomb
25.12.2023 19:52
A very difficult and elegant problem. The key to solving this problem is to ensure that the snake's path does not have short loops, and such a set of sequences is easy to construct. Then, using modular thinking, the elements in each sequence can be mapped to a sufficiently large module and the modules can be interconnected. In the end, it looks a bit like an integrated circuit.
06.04.2024 19:02
The idea of this problem -- and most, if not all, of the solutions, -- is to split the snake into $s \ge 10$ sections of $\frac{n^2}{s}$ blocks each, then reallocating each section individually, modulo some final things. As such, here's a solution written with terrible naming scheme from computers. Take the snake initially as a snake pattern inside a $(n-2) \times (n-2)$ box called the disk, where it goes up, then down, then up for an even number of columns from left to right, filling all but the last two or three columns of the box, which are instead the RAM. Have a horizontal row above and below, and a vertical row on either side. Call the immediately adjacent rows above and below the cache, and the top and bottom row the CPU. Then the snake can repeatedly loop around its path through going the CPU. We use allocate to refer to filling rows or not. Claim: We can flip the orientation of two adjacent up, then down columns in the grid. Proof. Let the snake first skip those two columns, instead going through the cache as appropriate. The snake then snakes through the RAM to reallocate those rows. Then the snake allocates the columns again whie going along the CPU, and unallocates the RAM (which it can do by length). $\blacksquare$ When flipping two rows already next to flipped rows, we can stay entirely in the disk. By doing this for each element, we've flipped the entire snake, but now it's been shifted, so it goes down then up then so on from right to left. We also empty cache while we are at it. This can be fixed by having the snake go through RAM first to free a row ahead of the snake, then when it retravels the disk it just goes the correct shift.