Maths Olympiad Prep

Track / Stage 7 / 185 of 300 #2065 of 2444

Problem 2065

National Olympiad second round; IMO P1/P4
Combinatorics Difficulty 7.5 Prove it Olimpiadi di Matematica - Febbraio · Italy

Given a 2n×2n2n \times 2n grid, a subset SS of its cells is called mazy if it has the following properties:
- from every cell of SS it is possible to move to every other cell of SS moving only from cells of SS to adjacent cells of SS (horizontally or vertically, that is, sharing a side with the cell of origin);
- it is not possible, starting from a cell of SS, to return to the same cell moving only toward adjacent cells of SS and without ever crossing the same side twice.

a. Prove that if SS is mazy then it cannot have more than 3n23n^{2} cells;

b. Exhibit a mazy set of 12 cells for n=2n=2.

c. Let us call perimeter of SS the number of sides adjacent to at least one cell of SS, but not to two cells of SS. If SS is mazy and consists of kk cells, what is its perimeter?

d. Prove that there does not exist a mazy set of 300 cells if n=10n=10.

This one wants a proof. Work it on paper, then read the official solution and mark yourself. Be honest about it: the record is only any use to you if it is.

Next problem →

Official solution

Solution:

a. First of all we observe that a 2×22 \times 2 square inside the grid can contain at most 3 cells belonging to the set SS: indeed, if for contradiction there were a 2×22 \times 2 square with all 4 cells belonging to the set SS, then one could find a path, entirely contained inside the square, that contradicts the second condition given by the problem (for example, starting from the bottom-left cell of the square and going once right, once up, once left and once down one would return to the starting cell without ever crossing the same side twice).
Let us divide the whole grid into n2n^{2} squares, each of size 2×22 \times 2. By what was said before, each of these 2×22 \times 2 squares can contain at most 3 cells belonging to the set SS and hence the set SS can contain at most 3n23 \cdot n^{2} cells.

b. An example of a mazy set of 12 cells in a 4×44 \times 4 grid is given by the set of shaded cells in the following figure:

Figure 1

c. We prove by induction on the number of cells that if a mazy set SS has kk cells, then there are 2k+22k+2 sides adjacent to exactly one cell of SS, that is
perimetro(S)=2k+2. \operatorname{perimetro}(S)=2k+2 \text{.}
If k=1k=1, then S=4=21+2S=4=2 \cdot 1+2, as we wanted.
Let us now assume that the statement holds for any mazy set with k1k-1 cells, with k2k \geq 2, and let us consider SS a mazy set with kk cells.
All the cells of SS are adjacent to at least one other cell of SS: indeed, given a cell xx of SS, there exists at least one other cell xx' of SS distinct from xx (SS by hypothesis has at least two cells); by the first condition on mazy sets, it is possible to move from xx to xx' moving only from cells of SS to adjacent cells of SS. In particular, there exists at least one cell adjacent to xx.
There exists at least one cell of SS adjacent to only one other cell of SS: assume for contradiction that there are no cells of SS with this property, that is, that all cells of SS are adjacent to at least 2 other cells of SS; let x0x_{0} and x1x_{1} be two cells adjacent to each other and let us construct recursively the sequence of cells x0,x1,x2,x_{0}, x_{1}, x_{2}, \ldots in SS, such that, for every i1i \geq 1, the cells xix_{i} and xi+1x_{i+1} are adjacent and xi+1x_{i+1} is distinct from xi1x_{i-1} (since every cell of SS is adjacent to at least two other cells of SS, given xi1x_{i-1} and xix_{i}, it is always possible to choose an xi+1x_{i+1} that satisfies the required conditions). Let tt be the first time at which the sequence passes again over an already visited cell, that is, such that xs=xtx_{s}=x_{t} for some s<ts<t; this leads to a contradiction, since the sequence xs,,xtx_{s}, \ldots, x_{t} contradicts the second hypothesis on mazy sets. Hence there must exist at least one cell of SS that is adjacent to only one cell of SS; let us call cc such a cell.
It is now immediate to verify that the set SS' formed by all the cells of SS minus the cell cc, is still mazy. Since SS is obtained from SS' by adding the cell cc, the set of sides adjacent to exactly one cell of SS is given by the set of sides adjacent to exactly one cell of SS', minus the side between cc and SS', and adding the other three sides of cc, whence
perimetro(S)=perimetro(S)+2=(2(k1)+2)+2=2k+2, \operatorname{perimetro}(S)=\operatorname{perimetro}(S')+2=(2(k-1)+2)+2=2k+2 \text{,}
where the second equality holds by the inductive hypothesis.

Second solution:
We want to prove that the set SS can be constructed recursively by attaching one cell at a time, in such a way that each attached cell is adjacent to exactly one of the previously attached cells; furthermore, we want to prove that every time a cell is attached, the perimeter increases by 2 with respect to the previous step.
Let x1x_{1} be an arbitrary cell of SS and let S1S_{1} be the set formed by the cell x1x_{1}, whose perimeter equals 4. If k=1k=1, then we are done. If k>1k>1, then the set SS contains at least one other cell cc. Thanks to the first condition of mazy sets, we know that it is possible to reach cc starting from x0x_{0} and moving only through adjacent cells; in particular, there exists at least one cell x2x_{2} adjacent to x1x_{1}; let us call S2S_{2} the set consisting of the cells x1x_{1} and x2x_{2} and observe that the perimeter of S2S_{2} is 6=4+26=4+2.
Suppose now that we have constructed the set SjS_{j} with the rules stated above and let us call x2,,xjx_{2}, \ldots, x_{j} the cells that have been attached in order to obtain SjS_{j}; if j=kj=k, then S=SkS=S_{k} and we are done. If j<kj<k, then there exists at least one cell cc' in SS that is not in SjS_{j} and, by the first condition of mazy sets, there exists a path of adjacent cells starting from x0x_{0} and arriving at cc'; let xj+1x_{j+1} be the first cell traversed by this path that is not in SjS_{j}: in this way xj+1x_{j+1} is adjacent to the cell that precedes it in the path, which is indeed a cell of SjS_{j}. Now we want to prove that xj+1x_{j+1} is adjacent to a unique cell of SjS_{j}: suppose for contradiction that xrx_{r} and xsx_{s} are two cells of SjS_{j} adjacent to xj+1x_{j+1}; then there exists at least one path completely contained in SjS_{j} going from xsx_{s} to xrx_{r} that crosses only adjacent cells (indeed, by construction of SjS_{j}, there exist two paths, Σ1\Sigma_{1} going from x1x_{1} to xrx_{r} and Σ2\Sigma_{2} going from x1x_{1} to xsx_{s}, that cross only adjacent cells; by traversing Σ1\Sigma_{1} backwards and then Σ2\Sigma_{2}, one obtains the desired path). Let Σ\Sigma be the minimal path from xrx_{r} to xsx_{s} (that is, crossing the smallest possible number of cells) that crosses only adjacent cells and that is completely contained in SjS_{j}; by minimality, this path can never cross the same side twice (otherwise the path could be shortened). Now, starting from xj+1x_{j+1}, going to xrx_{r}, traversing Σ\Sigma until arriving at xsx_{s} and finally returning to xj+1x_{j+1}, one finds a path completely contained in SS that crosses only adjacent cells and that never passes twice over the same side. We have thus found a contradiction to the second hypothesis of the problem and we have thus proved that xj+1x_{j+1} can be adjacent to at most one cell of SjS_{j}.
Let Sj+1S_{j+1} be the set obtained by adding to SjS_{j} the cell xj+1x_{j+1}. Observe that the set of sides adjacent to only one cell of Sj+1S_{j+1} is given by the set of sides adjacent to only one cell of SjS_{j}, from which we remove the side between xj+1x_{j+1} and SjS_{j} and to which we add the other 3 sides of xj+1x_{j+1}. From this it follows that every time we attach a cell, we add exactly 2 sides to the perimeter.
Since the perimeter of S1S_{1} is 4 and to this exactly k1k-1 cells are attached in order to obtain Sk=SS_{k}=S, we have
perimetro(S)=4+2(k1)=2k+2. \operatorname{perimetro}(S)=4+2\cdot(k-1)=2k+2 \text{.}

d. Suppose that there exists a mazy set SS of 300 cells in a 20×2020 \times 20 grid. The perimeter of the whole grid is 80, while by the previous point we know that the perimeter of SS is 2300+2=6022 \cdot 300+2=602.
Let TT be the set formed by the 100 cells that do not belong to SS; observe that the perimeter of TT is at most 4100=4004 \cdot 100=400 (that is, each cell of TT contributes at most 4 sides to the perimeter), while the perimeter of the whole grid is 80.
Since by definition a side contributes to the perimeter of SS only if it is adjacent to only one cell in SS, we have that this side must either belong to the boundary of the grid, or be adjacent to a cell of TT, whence
602=perimetro(S)perimetro(T)+ perimetro(Tabella) 400+80=480 602=\operatorname{perimetro}(S) \leq \operatorname{perimetro}(T)+\text{ perimetro(Tabella) } \leq 400+80=480
which gives a contradiction.

Second solution:
Thanks to the previous point, we know that the set SS has a perimeter of 602 cells; moreover, again from the proof of the previous point, we see that every time a cell is attached, exactly one side is used to attach the cell to the set. Hence the number of sides that are adjacent to two cells of SS is exactly 3001=299300-1=299 (one side for each attached cell). Hence the existence of SS requires at least 602+299=901602+299=901 sides. Since the grid possesses in total 840 sides, the set SS cannot exist.

Source: MathNet, licensed CC-BY-4.0. Statement translated into English from it; metadata (topic, difficulty, ordering) added by this project.