HMMT 二月 2024 · 团队赛 · 第 9 题
HMMT February 2024 — Team Round — Problem 9
题目详情
英文原题
- [55] On each cell of a 200 × 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 cellforward. If a move would cause a car to exit the grid, the car is removed instead. The cars are placedso that there exists a sequence of moves that eventually removes all the cars from the grid. Across allsuch starting configurations, determine the maximum possible number of moves to do so.
解析
英文解析
- [55] On each cell of a 200 × 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 cellforward. If a move would cause a car to exit the grid, the car is removed instead. The cars are placedso that there exists a sequence of moves that eventually removes all the cars from the grid. Across allsuch starting configurations, determine the maximum possible number of moves to do so.
Proposed by: Ethan Zhou
Answer: 6014950
Solution:
Let n = 100 . The answer is n (12 n + 3 n − 1) = 6014950 .21
A construction for an 8 × 8 grid instead (so n = 4 ):2
◀ ◀ ◀ ◀
▼ ▼ ▼ ▼
◀ ◀ ◀ ◀
▼ ▼ ▼ ▼
◀ ◀ ◀ ◀
▼ ▼ ▼ ▼
▼ ▼ ▼ ▼ ◀ ◀ ◀ ◀
▶ ▶ ▶ ▶ ▶ ▶ ▶ ▶ ▶ ▶ ▶ ▶
▶ ▶ ▶ ▶ ▲ ▲ ▲ ▲
▶ ▶ ▶ ▶ ▲ ▲ ▲ ▲
▶ ▶ ▶ ▶
▲ ▲ ▲ ▲
Label the rows and columns from 1 to 2 n , and let ( r, c ) denote the cell at row r , column c . The carscan be cleared in the following order:
• Remove all cars in row n .
• For each row k = n − 1 , . . . , 1 , move the n upward-facing cars in row k once, then remove allremaining cars in row k .
• 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 requiresn (3 n + 1) n ( n + 1) 12
4 · − = n (12 n + 3 n − 1)2
2 2 2
moves to clear.
Now we show this is the best possible. Take some starting configuration for which it is possible for allcars to leave. For each car c , let d ( c ) denote the number of moves c makes before it exits. Partitionthe grid into concentric square “rings” S , . . . , S , such that S consists of all cells on the border of
1 n 1
the grid, . . . , S consists of the four central cells:
▼ ▼ ▼ ▼ ◀ ◀ ◀ ◀n
▼ ▼ ▼ ▼ ◀ ◀ ◀ ◀
▼ ▼ ▼ ▼ ◀ ◀ ◀ ◀
◀ ◀ ◀ ◀
▼ ▼ ▼ ▼
▶ ▶ ▶ ▶ ▶ ▶ ▶ ▶ ▶ ▶ ▶ ▶
▶ ▶ ▶ ▶
▲ ▲ ▲ ▲
▶ ▶ ▶ ▶ ▲ ▲ ▲ ▲
▶ ▶ ▶ ▶ ▲ ▲ ▲ ▲
Since all cars can be removed, each S contains some car c which points away from the ring, so thatkd ( c ) = k . Now fix some ring S . Then:
• If car c is at a corner of S , we have d ( c ) ≤ 2 n + 1 − k .kk
• Each car c on the bottom edge of S , say at ( x, k ) for k < x < 2 n + 1 − k , can be paired with thek
′ ′
opposing car c at ( x, 2 n + 1 − k ) . As c, c cannot point toward each other, we have
′
d ( c ) + d ( c ) ≤ (2 n + 1 − k ) + max { x, 2 n + 1 − x } .
′
Likewise, we can pair each car c at ( k, x ) with the opposing car c at (2 n + 1 − k, x ) , getting the same bound.
′ ′
• If d ( c ) = k , then pairing it with the opposing car c gives d ( c ) + d ( c ) ≤ 2 n + 1 . Note that this isless than the previous bound, by at leastmax { x, 2 n + 1 − x } − k ≥ n + 1 − k > 0 .
Summing the contributions d ( c ) from the four corners, each pair among the non-corner cars, and apair involving an outward-facing car gives
( )
∑ ∑nd ( c ) ≤ 4(2 n + 1 − k ) + 4 [(2 n + 1 − k ) + (2 n + 1 − x )] − ( n + 1 − k ) .
c ∈ S x = k +1
1 k
One can verify that this evaluates to n (12 n + 3 n − 1) ; alternatively, note that equality holds in our 2
construction, so summing over all 1 ≤ k ≤ n must yield the desired tight upper bound.2