Maths Olympiad Prep

Library / /1323 of 1394

, 2024

Combinatorics Difficulty 6.1 National Olympiad Prove it United States

Problem:
On each cell of a 200×200200 \times 200 grid, we place a car, which faces in one of the four cardinal directions. In a move, one chooses a car that does not have a car immediately in front of it, and slides it one cell forward. If a move would cause a car to exit the grid, the car is removed instead. The cars are placed so that there exists a sequence of moves that eventually removes all the cars from the grid. Across all such starting configurations, determine the maximum possible number of moves to do so.

Solution

Solution:
Let n=100n=100. The answer is 12n(12n2+3n1)=6014950\frac{1}{2} n\left(12 n^{2}+3 n-1\right)=6014950.
A construction for an 8×88 \times 8 grid instead (so n=4n=4 ):

Figure 1

Label the rows and columns from 1 to 2n2 n, and let (r,c)(r, c) denote the cell at row rr, column cc. The cars can be cleared in the following order:
- Remove all cars in row nn.
- For each row k=n1,,1k=n-1, \ldots, 1, move the nn upward-facing cars in row kk once, then remove all remaining cars in row kk.
- Now all cars in the upper-left quarter of the grid can be removed, then those in the upper-right, then those in the lower-right.

Moreover, this starting configuration indeed requires
4n2(3n+1)2n(n+1)2=12n(12n2+3n1) 4 \cdot \frac{n^{2}(3 n+1)}{2}-\frac{n(n+1)}{2}=\frac{1}{2} n\left(12 n^{2}+3 n-1\right)
moves to clear.

Now we show this is the best possible. Take some starting configuration for which it is possible for all cars to leave. For each car cc, let d(c)d(c) denote the number of moves cc makes before it exits. Partition the grid into concentric square "rings" S1,,SnS_{1}, \ldots, S_{n}, such that S1S_{1} consists of all cells on the border of the grid, ,Sn\ldots, S_{n} consists of the four central cells:

Figure 2

Since all cars can be removed, each SkS_{k} contains some car cc which points away from the ring, so that d(c)=kd(c)=k. Now fix some ring SkS_{k}. Then:
- If car cc is at a corner of SkS_{k}, we have d(c)2n+1kd(c) \leq 2 n+1-k.
- Each car cc on the bottom edge of SkS_{k}, say at (x,k)(x, k) for k<x<2n+1kk<x<2 n+1-k, can be paired with the opposing car cc^{\prime} at (x,2n+1k)(x, 2 n+1-k). As c,cc, c^{\prime} cannot point toward each other, we have
d(c)+d(c)(2n+1k)+max{x,2n+1x}. d(c)+d\left(c^{\prime}\right) \leq(2 n+1-k)+\max \{x, 2 n+1-x\} .
Likewise, we can pair each car cc at (k,x)(k, x) with the opposing car cc^{\prime} at (2n+1k,x)(2 n+1-k, x), getting the same bound.
- If d(c)=kd(c)=k, then pairing it with the opposing car cc^{\prime} gives d(c)+d(c)2n+1d(c)+d\left(c^{\prime}\right) \leq 2 n+1. Note that this is less than the previous bound, by at least
max{x,2n+1x}kn+1k>0 \max \{x, 2 n+1-x\}-k \geq n+1-k>0
Summing the contributions d(c)d(c) from the four corners, each pair among the non-corner cars, and a pair involving an outward-facing car gives
cSkd(c)4(2n+1k)+4(x=k+1n[(2n+1k)+(2n+1x)])(n+1k) \sum_{c \in S_{k}} d(c) \leq 4(2 n+1-k)+4\left(\sum_{x=k+1}^{n}[(2 n+1-k)+(2 n+1-x)]\right)-(n+1-k)
One can verify that this evaluates to 12n(12n2+3n1)\frac{1}{2} n\left(12 n^{2}+3 n-1\right); alternatively, note that equality holds in our construction, so summing over all 1kn1 \leq k \leq n must yield the desired tight upper bound.

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.