Subfield: Combinatorics


Question: In Lineland there are $n \geqslant 1$ towns, arranged along a road running from left to right. Each town has a left bulldozer (put to the left of the town and facing left) and a right bulldozer (put to the right of the town and facing right). The sizes of the $2 n$ bulldozers are distinct. Every time when a right and a left bulldozer confront each other, the larger bulldozer pushes the smaller one off the road. On the other hand, the bulldozers are quite unprotected at their rears; so, if a bulldozer reaches the rear-end of another one, the first one pushes the second one off the road, regardless of their sizes.

Let $A$ and $B$ be two towns, with $B$ being to the right of $A$. We say that town $A$ can sweep town $B$ away if the right bulldozer of $A$ can move over to $B$ pushing off all bulldozers it meets. Similarly, $B$ can sweep $A$ away if the left bulldozer of $B$ can move to $A$ pushing off all bulldozers of all towns on its way.

Prove that there is exactly one town which cannot be swept away by any other one.

Solution:
Let $T_{1}, T_{2}, \ldots, T_{n}$ be the towns enumerated from left to right. Observe first that, if town $T_{i}$ can sweep away town $T_{j}$, then $T_{i}$ also can sweep away every town located between $T_{i}$ and $T_{j}$.

We prove the problem statement by strong induction on $n$. The base case $n=1$ is trivial.

For the induction step, we first observe that the left bulldozer in $T_{1}$ and the right bulldozer in $T_{n}$ are completely useless, so we may forget them forever. Among the other $2 n-2$ bulldozers, we choose the largest one. Without loss of generality, it is the right bulldozer of some town $T_{k}$ with $k<n$.

Surely, with this large bulldozer $T_{k}$ can sweep away all the towns to the right of it. Moreover, none of these towns can sweep $T_{k}$ away; so they also cannot sweep away any town to the left of $T_{k}$. Thus, if we remove the towns $T_{k+1}, T_{k+2}, \ldots, T_{n}$, none of the remaining towns would change its status of being (un)sweepable away by the others.

Applying the induction hypothesis to the remaining towns, we find a unique town among $T_{1}, T_{2}, \ldots, T_{k}$ which cannot be swept away. By the above reasons, it is also the unique such town in the initial situation. Thus the induction step is established.
Let $T_{1}, T_{2}, \ldots, T_{n}$ be the towns enumerated from left to right. Observe first that, if town $T_{i}$ can sweep away town $T_{j}$, then $T_{i}$ also can sweep away every town located between $T_{i}$ and $T_{j}$.


We also denote by $\ell_{i}$ and $r_{i}$ the sizes of the left and the right bulldozers belonging to $T_{i}$, respectively. One may easily see that no two towns $T_{i}$ and $T_{j}$ with $i<j$ can sweep each other away, for this would yield $r_{i}>\ell_{j}>r_{i}$.

Clearly, there is no town which can sweep $T_{n}$ away from the right. Then we may choose the leftmost town $T_{k}$ which cannot be swept away from the right. One can observe now that no town $T_{i}$ with $i>k$ may sweep away some town $T_{j}$ with $j<k$, for otherwise $T_{i}$ would be able to sweep $T_{k}$ away as well.

Now we prove two claims, showing together that $T_{k}$ is the unique town which cannot be swept away, and thus establishing the problem statement.

Claim 1. $T_{k}$ also cannot be swept away from the left.

Proof. Let $T_{m}$ be some town to the left of $T_{k}$. By the choice of $T_{k}$, town $T_{m}$ can be swept away from the right by some town $T_{p}$ with $p>m$. As we have already observed, $p$ cannot be greater than $k$. On the other hand, $T_{m}$ cannot sweep $T_{p}$ away, so a fortiori it cannot sweep $T_{k}$ away.

Claim 2. Any town $T_{m}$ with $m \neq k$ can be swept away by some other town.



Proof. If $m<k$, then $T_{m}$ can be swept away from the right due to the choice of $T_{k}$. In the remaining case we have $m>k$.

Let $T_{p}$ be a town among $T_{k}, T_{k+1}, \ldots, T_{m-1}$ having the largest right bulldozer. We claim that $T_{p}$ can sweep $T_{m}$ away. If this is not the case, then $r_{p}<\ell_{q}$ for some $q$ with $p<q \leqslant m$. But this means that $\ell_{q}$ is greater than all the numbers $r_{i}$ with $k \leqslant i \leqslant m-1$, so $T_{q}$ can sweep $T_{k}$ away. This contradicts the choice of $T_{k}$.
We separately prove that $(i)$ there exists a town which cannot be swept away, and that (ii) there is at most one such town. We also make use of the two observations from the previous solutions.

To prove $(i)$, assume contrariwise that every town can be swept away. Let $t_{1}$ be the leftmost town; next, for every $k=1,2, \ldots$ we inductively choose $t_{k+1}$ to be some town which can sweep $t_{k}$ away. Now we claim that for every $k=1,2, \ldots$, the town $t_{k+1}$ is to the right of $t_{k}$; this leads to the contradiction, since the number of towns is finite.

Induction on $k$. The base case $k=1$ is clear due to the choice of $t_{1}$. Assume now that for all $j$ with $1 \leqslant j<k$, the town $t_{j+1}$ is to the right of $t_{j}$. Suppose that $t_{k+1}$ is situated to the left of $t_{k}$; then it lies between $t_{j}$ and $t_{j+1}$ (possibly coinciding with $t_{j}$ ) for some $j<k$. Therefore, $t_{k+1}$ can be swept away by $t_{j+1}$, which shows that it cannot sweep $t_{j+1}$ away - so $t_{k+1}$ also cannot sweep $t_{k}$ away. This contradiction proves the induction step.

To prove (ii), we also argue indirectly and choose two towns $A$ and $B$ neither of which can be swept away, with $A$ being to the left of $B$. Consider the largest bulldozer $b$ between them (taking into consideration the right bulldozer of $A$ and the left bulldozer of $B$ ). Without loss of generality, $b$ is a left bulldozer; then it is situated in some town to the right of $A$, and this town may sweep $A$ away since nothing prevents it from doing that. A contradiction.