Given a $32 \times 32$ table, we put a mouse (facing up) at the bottom left cell and a piece of cheese at several other cells. The mouse then starts moving. It moves forward except that when it reaches a piece of cheese, it eats a part of it, turns right, and continues moving forward. We say that a subset of cells containing cheese is good if, during this process, the mouse tastes each piece of cheese exactly once and then falls off the table. Show that: (a) No good subset consists of 888 cells. (b) There exists a good subset consisting of at least 666 cells.
Problem
Source: APMO 2021 Problem 4
Tags: combinatorics, APMO
09.06.2021 09:30
The problems are now on the site! Discussion can begin Anyway yeah I really liked this one.
09.06.2021 10:33
The bound in part (a) can be improved to $820$, corresponding to a cheese density of $\frac45$ for any rectangular grid. Suppose there are $C$ pieces of cheese. After the mouse falls off the table, have the mouse walk back to its original position along the outside of the table, following the same rules as before (only going forward and turning right allowed) so that its path back does not intersect itself. It is easy to see that its path will have $4\left\lfloor\frac{C+5}4\right\rfloor$ corners. Furthermore, all self-intersections of the mouse's path occur at a cell in the table in which there is no cheese. On the other hand, by this, the mouse's path intersects itself at least $\left\lfloor\frac{C+1}4\right\rfloor$ times. It follows that $C+\left\lfloor\frac{C+1}4\right\rfloor\le1024\implies C\le819$.
09.06.2021 10:59
It's almost over when the optimal config is found: but writing the solution's completeness takes a lot of work. $\color{green} \rule{7.8cm}{2pt}$ $\color{green} \clubsuit$ $\boxed{\textbf{Basic Definitions and Slight Removal.}}$ $\color{green} \clubsuit$ $\color{green} \rule{7.8cm}{2pt}$ Let the cheese signify a one-time use of a right turn; denote each of them to be of type $UR, RD, DL, LU$ if the mouse moves at the direction up-right, right-down and so on. Now instead of considering the $\text{path}$ of the mouse; which follows the structure \[ \text{start point} \; - C_1 - C_2 - \ldots - C_k \](big $C_i$ denoting cheese and dash representing a straight path) we will consider $\textit{Hamiltionian cycles}$. Define a $\textit{closed circuit}$ to be a series of $\textit{straightaways}$ and $\textit{turns}$ the mouse travel through, where all cheeses are part of the circuit exactly once (meaning the straightaways do not have cheese in the middle), and the start and end points are equal, and the endpoint can be put a cheese to complete the circuit (in other words, if the start direction is up, the end direction $\textbf{must}$ be right.) We close this little definition Section by the claim that
$\color{blue} \boxed{\textbf{Bijection Verification Finishing.}}$ It remains to prove that in each intersection cell, there are at most two direct shots. Note that for each matched intersection cell, for example with $C_k - C_{k+1}$ (also WLOG in the right direction), it must be the intersection of (somewhat) consecutive straightaways in the form of $C_{k-2}-C_{k-1}$ and $C_{k+1}-C_{k+2}$ if the closer cheese is $C_{k-1}$, or $C_{k-1}-C_k$ and $C_{k+2}-C_{k+3}$ if the closer cheese is $C_{k+2}$. However, if there exists $l \ne k-1,k$ so that $C_l-C_{l+1}$ so that it has the same matched cell with $C_k-C_{k+1}$, we will consider the sets of straightaways before/after $C_l-C_{l+1}$ as before. By the process in $\color{red} \spadesuit$ $\color{red} \boxed{\textbf{Proof}}$ $\color{red} \spadesuit$, we know that the segments that form the intersection cell $\{(C_{l-2},C_{l-1}), (C_{l+1},C_{l+2})\}$ and $\{(C_{k-2},C_{k-1}), (C_{k+1},C_{k+2})\}$ if $C_l-C_{l+1}$ is of the $\textbf{First Type}$, or $\{(C_{l-1},C_{l}), (C_{l+2},C_{l+3})\}$ and $\{(C_{k-2},C_{k-1}), (C_{k+1},C_{k+2})\}$ if $C_l-C_{l+1}$ is of the $\textbf{Second Type}$ are equal. This is a no-brainer --- $l$ must be either $k$ or $k-1$. So, as there exists more than $\dfrac{2}{5}x$ direct shots and fewer than $\dfrac{1}{5}x$ vacant cells (fewer intersection cells, at that), we have a contradiction. We are done. $\blacksquare$ $\blacksquare$ $\blacksquare$
09.06.2021 22:00
Great problem, I really enjoyed it. Here's my solution to a) (same approach as the official one, though I will post it). We have the following two claims: Claim 1: Each non-cheese cell is visited at most twice, one time max from each direction. Proof: Suppose FTSoC that we have visited a cell twice from the horizontal direction. Then, the second time when we come to this cell, we will have to turn once on the row of that cell, but we should have visited that cheese-cell the first time, so this cell is visited twice, absurd. Claim 2: We can't visit 4 cheese cells consecutively. Proof: Pretty obvious, if it is so, we have turned four times, so a cell from those is visited twice, absurd. Now view the path of mouse as a string of $C$ and $N$ (cheese and non-cheese) with $888$ $C$. We consider the blocks of C's. They are max $888/3=296$ (claim 2), so at least $295$ strings of $N$'s between them, and thus at least $295$ $N$'s at all. But claim 1 gives at least $148$ actual empty cells, so we calculate that the cells are too much: $888+148=1036>1024=32^2$, so a) is done.
10.06.2021 00:01
The C and N model in Vick's post can be used to obtain some very good bounds for (a). I used T and S for turn and straight, so T=C and S=N. Here's a proof that there are at most 768 pieces of cheese.
10.06.2021 03:08
MellowMelon wrote: The C and N model in Vick's post can be used to obtain some very good bounds for (a). I used T and S for turn and straight, so T=C and S=N. Here's a proof that there are at most 768 pieces of cheese.
Another way to get the 768 upper bound is by showing that one can partition the string of visited cells into blocks such that, in each block, the cheese-cells make up at most 3/5 of the block's length. (One can argue that such a partitioning is possible by a casework on forbidden substrings, similar to what MellowMelon did: S is a good block, TS is good, TTSS is good, TTSTS is good, TTSTT is impossible, $\dots$) Once verified, this gives an upper bound of 3/4 on the density of cheese-cells in the table -- at least for large boards, where the little overhead due to the beginning/end is negligible. When Morteza Saghafian and I (Josef Tkadlec) came up with the problem, we thought we could push this idea (through a more annoying casework) down to density 5/9 within blocks, which would then give an upper bound of (roughly) 5/7 on the density of cheese-cells. But even if this 5/7 upper bound works out, the construction from (b) for a large $2^n\times 2^n$ board has density only (roughly) 2/3. Can anyone close the gap?
18.06.2021 11:53
This is a really fun problem! Did a video covering the solution: https://www.youtube.com/watch?v=nIQVbtch4k8
23.06.2021 01:05
30.06.2021 08:21
InternetPerson10 wrote: Given a $32 \times 32$ table, we put a mouse (facing up) at the bottom left cell and a piece of cheese at several other cells. The mouse then starts moving. It moves forward except that when it reaches a piece of cheese, it eats a part of it, turns right, and continues moving forward. We say that a subset of cells containing cheese is good if, during this process, the mouse tastes each piece of cheese exactly once and then falls off the table. Show that: (a) No good subset consists of 888 cells. (b) There exists a good subset consisting of at least 666 cells. Part a) We call a cell 'good' if it contains a cheese block, and 'bad' otherwise. It can be seen that each bad block is visited at most twice. We define a sequence $S$ of letters $G$ and $B$ such that the letter at the $i^{\text{th}}$ position tells us whether the mouse was on a good $(G)$ or bad $(B)$ cell during the $i^{th}$ step. We observe that a block of four consecutive $C$ letters cannot occur in $S$, else, the mouse will be stuck in a cyclic loop. We see that if the maximum number of cheese blocks on the board possible is $x$, then there are at least $\frac{x}{3}$ continuous blocks of $G$ in the sequence $S$. But all these continuous $G$ blocks must be separated by blocks of $S$, which means that there must be at least $\frac{x}{3}-1$ blocks of $B$, which means that there are at least $\frac{\frac{x}{3}-1}{2}$ bad cells on the board. This means that there are at least $x + \dfrac{\frac{x}{3}-1}{2} \leq 1024$ cells on the board, which bounds $x \leq \dfrac{6147}{7} < \dfrac{6216}{7} = 888$ cells, which means that there cannot exist a good subset with $888$ cells. Although this bound is weaker than $820$ or $768$, it is quick and easy to reciprocate in exam conditions Part b) We induction on $n$ to prove: For all positive integers $n$, there exists a good subset of size $\dfrac{2^{2n+1}+1}{3}$ on the board of size $2^n$ units. Let us say that for all positive integers $k \leq n$, there exists a good subset of the aforesaid size on the board of size $2^k$. Divide the $2^{n+1}$ by $2^{n+1}$ unit dimensions square board into $4$ congruent square boards of size $2^n$ each. Then replicate the pattern similar to what Internet Person did (I cannot draw using asymptote like that ) then observe that we get a good subset on the square board of dimensions $2^{n+1}$ by $2^{n+1}$ units with size $4 \cdot \dfrac{2^{2n+1}+1}{3} - 1 = \dfrac{2^{2(n+1)+1}+4-3}{3} = \dfrac{2^{2(n+1)+1}+1}{3}$ as desired. Plugging in $n=5$ gives there exists a good subset of size $683 > 666$ on the $32$ by $32$ square board which is the desired conclusion.
15.10.2021 04:03
30.11.2021 06:42
a) Consider a good subset with $T$ pieces of cheese. The mouse hits each piece of cheese, and it cannot hit any $4$ pieces of cheese consecutively (else it cycles infinitely), so in the mouse's path, he has to go through $\geq \tfrac{T}{3}$ non-cheese squares, not necessarily distinct. However, we do know he cannot enter a non-cheese block more than twice, else he hits some two cheese blocks in that row twice. Thus, the mouse must pass through $\geq \tfrac{T}{6}$ $\textit{distinct}$ non cheese blocks, hence\[1024 \geq T + \frac{T}{6} \implies T \leq \frac{1024 \times 6}{7} < 888\]as desired. b) bah
01.01.2023 08:50
pepat wrote: MellowMelon wrote: The C and N model in Vick's post can be used to obtain some very good bounds for (a). I used T and S for turn and straight, so T=C and S=N. Here's a proof that there are at most 768 pieces of cheese.
Another way to get the 768 upper bound is by showing that one can partition the string of visited cells into blocks such that, in each block, the cheese-cells make up at most 3/5 of the block's length. (One can argue that such a partitioning is possible by a casework on forbidden substrings, similar to what MellowMelon did: S is a good block, TS is good, TTSS is good, TTSTS is good, TTSTT is impossible, $\dots$) Once verified, this gives an upper bound of 3/4 on the density of cheese-cells in the table -- at least for large boards, where the little overhead due to the beginning/end is negligible. When Morteza Saghafian and I (Josef Tkadlec) came up with the problem, we thought we could push this idea (through a more annoying casework) down to density 5/9 within blocks, which would then give an upper bound of (roughly) 5/7 on the density of cheese-cells. But even if this 5/7 upper bound works out, the construction from (b) for a large $2^n\times 2^n$ board has density only (roughly) 2/3. Can anyone close the gap? I've been working on this, but I just couldn't figure out how you reached the density of 5/7. I'm actually a senior high student, can you explain it to me? Thank you~
05.03.2023 19:49
For part a, note that the configuration: OOO .O. OOO Is illegal in both rotations, so each empty point we can say contributes a badness factor of $1$ to its diagonal neighbors and $\frac{1}{2}$ to its edge-adjacent neighbors, then each point in the diagram must have badness at least $1$ (edges of diagram work as well). Therefore by double counting badness, if $E$ is the number of empty points, $7E \geq 32^2$ so $E \geq \frac{1024}{7} \geq 146$ so the number of cheese is at most $878$, giving contradiction. For part b, note that we can make a fractal pattern: Take grid $A$, duplicate it four times, place them rotated, and remove an entry corner. For instance: OO .O OOOO O..O O..O .OOO OOOOOOOO O..OO..O O..OO..O OOO..OOO OOO..OOO O..OO..O O..OO..O .OOOOOOO And so on. This gives a construction with $671$ points, which is at least $666$, finishing.
04.12.2023 02:37
Am I the only person who misinterpreted the problem as allowing the mouse to visit the same cheese cell more than once, but then only count the number of cheese cells visited once? I'm pretty sure that (surprising) part (a) is still provable under this assumption with a more convoluted version of the original proof, but it makes everything so much harder (and more time-consuming...) Bad/unclear wording really seems to be a common theme in APMO problems... unfortunate.
10.03.2024 12:21
IAmTheHazard wrote: Am I the only person who misinterpreted the problem as allowing the mouse to visit the same cheese cell more than once, but then only count the number of cheese cells visited once? I'm pretty sure that (surprising) part (a) is still provable under this assumption with a more convoluted version of the original proof, but it makes everything so much harder (and more time-consuming...) Bad/unclear wording really seems to be a common theme in APMO problems... unfortunate. I just spent the last 2 days trying to solve the problem assuming that each piece of cheese disappears after the mouse eats it which makes the problem so much harder and I'm not even sure if 888 is impossible like that...