Maths Olympiad Prep

Library / APMO - March

APMO - March, 2005

Combinatorics Difficulty 7.7 National Olympiad, round 2 Prove it Asia Pacific Mathematics Olympiad (APMO)

In a small town, there are n×nn \times n houses indexed by (i,j)(i, j) for 1≤i,j≤n1 \leq i, j \leq n with (1,1)(1,1) being the house at the top left corner, where ii and jj are the row and column indices, respectively. At time 00, a fire breaks out at the house indexed by (1,c)(1, c), where c≤n2c \leq \frac{n}{2}. During each subsequent time interval [t,t+1][t, t+1], the fire fighters defend a house which is not yet on fire while the fire spreads to all undefended neighbors of each house which was on fire at time tt. Once a house is defended, it remains so all the time. The process ends when the fire can no longer spread. At most how many houses can be saved by the fire fighters? A house indexed by (i,j)(i, j) is a neighbor of a house indexed by (k,ℓ)(k, \ell) if ∣i−k∣+∣j−ℓ∣=1|i-k|+|j-\ell|=1.

Solution

At most n2+c2−nc−cn^{2}+c^{2}-n c-c houses can be saved. This can be achieved under the following order of defending:
(2,c),(2,c+1);(3,c−1),(3,c+2);(4,c−2),(4,c+3);…(c+1,1),(c+1,2c);(c+1,2c+1),…,(c+1,n) \begin{gather*} (2, c), (2, c+1); (3, c-1), (3, c+2); (4, c-2), (4, c+3); \ldots \\ (c+1, 1), (c+1, 2c); (c+1, 2c+1), \ldots, (c+1, n) \end{gather*}

Under this strategy, there are

2 columns (column numbers cc, c+1c+1) at which n−1n-1 houses are saved

2 columns (column numbers c−1c-1, c+2c+2) at which n−2n-2 houses are saved

⋯

2 columns (column numbers 11, 2c2c) at which n−cn-c houses are saved

n−2cn-2c columns (column numbers n−2c+1,…,nn-2c+1, \ldots, n) at which n−cn-c houses are saved

Adding all these we obtain:
2[(n−1)+(n−2)+⋯+(n−c)]+(n−2c)(n−c)=n2+c2−cn−c \begin{equation*} 2[(n-1)+(n-2)+\cdots+(n-c)] + (n-2c)(n-c) = n^{2}+c^{2}-c n-c \end{equation*}

We say that a house indexed by (i,j)(i, j) is at level tt if ∣i−1∣+∣j−c∣=t|i-1|+|j-c|=t. Let d(t)d(t) be the number of houses at level tt defended by time tt, and p(t)p(t) be the number of houses at levels greater than tt defended by time tt. It is clear that
p(t)+∑i=1td(i)≤t and p(t+1)+d(t+1)≤p(t)+1 p(t) + \sum_{i=1}^{t} d(i) \leq t \text{ and } p(t+1) + d(t+1) \leq p(t) + 1
Let s(t)s(t) be the number of houses at level tt which are not burning at time tt. We prove that
s(t)≤t−p(t)≤t s(t) \leq t - p(t) \leq t
for 1≤t≤n−11 \leq t \leq n-1 by induction. It is obvious when t=1t=1. Assume that it is true for t=kt=k. The union of the neighbors of any k−p(k)+1k-p(k)+1 houses at level k+1k+1 contains at least k−p(k)+1k-p(k)+1 vertices at level kk. Since s(k)≤k−p(k)s(k) \leq k-p(k), one of these houses at level kk is burning. Therefore, at most k−p(k)k-p(k) houses at level k+1k+1 have no neighbor burning. Hence we have
s(k+1)≤k−p(k)+d(k+1)=(k+1)−(p(k)+1−d(k+1))≤(k+1)−p(k+1) \begin{aligned} s(k+1) &\leq k-p(k)+d(k+1) \\ &= (k+1) - (p(k)+1-d(k+1)) \\ &\leq (k+1) - p(k+1) \end{aligned}

We now prove that the strategy given above is optimal. Since
∑t=1n−1s(t)≤(n2), \sum_{t=1}^{n-1} s(t) \leq \binom{n}{2},
the maximum number of houses at levels less than or equal to n−1n-1, that can be saved under any strategy is at most (n2)\binom{n}{2}, which is realized by the strategy above. Moreover, at levels bigger than n−1n-1, every house is saved under the strategy above.

The following is an example when n=11n=11 and c=4c=4. The houses with ◯\bigcirc mark are burned. The houses with ⊗\otimes mark are blocked ones and hence those and the houses below them are saved.

Figure 1

Want a route through all this instead of an archive? The track puts 2,604 problems in a working order, from Junior Challenge level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.