[Combinatorics]
Problem: There are 60 empty boxes $B_{1}, \ldots, B_{60}$ in a row on a table and an unlimited supply of pebbles. Given a positive integer $n$, Alice and Bob play the following game.

In the first round, Alice takes $n$ pebbles and distributes them into the 60 boxes as she wishes. Each subsequent round consists of two steps:

(a) Bob chooses an integer $k$ with $1 \leqslant k \leqslant 59$ and splits the boxes into the two groups $B_{1}, \ldots, B_{k}$ and $B_{k+1}, \ldots, B_{60}$.

(b) Alice picks one of these two groups, adds one pebble to each box in that group, and removes one pebble from each box in the other group.

Bob wins if, at the end of any round, some box contains no pebbles. Find the smallest $n$ such that Alice can prevent Bob from winning.

Solution: We present solutions for the general case of $N>1$ boxes, and write $M=\left\lfloor\frac{N}{2}+1\right\rfloor\left\lceil\frac{N}{2}+1\right\rceil-1$ for the claimed answer. For $1 \leqslant k<N$, say that Bob makes a $k$-move if he splits the boxes into a left group $\left\{B_{1}, \ldots, B_{k}\right\}$ and a right group $\left\{B_{k+1}, \ldots, B_{N}\right\}$. Say that one configuration dominates another if it has at least as many pebbles in each box, and say that it strictly dominates the other configuration if it also has more pebbles in at least one box. (Thus, if Bob wins in some configuration, he also wins in every configuration that it dominates.)

It is often convenient to consider ' $V$-shaped' configurations; for $1 \leqslant i \leqslant N$, let $V_{i}$ be the configuration where $B_{j}$ contains $1+|j-i|$ pebbles (i.e. where the $i^{\text {th }}$ box has a single pebble and the numbers increase by one in both directions, so the first box has $i$ pebbles and the last box has $N+1-i$ pebbles). Note that $V_{i}$ contains $\frac{1}{2} i(i+1)+\frac{1}{2}(N+1-i)(N+2-i)-1$ pebbles. If $i=\left\lceil\frac{N}{2}\right\rceil$, this number equals $M$.solution split naturally into a strategy for Alice (starting with $M$ pebbles and showing she can prevent Bob from winning) and a strategy for Bob (showing he can win for any starting configuration with at most $M-1$ pebbles). The following observation is also useful to simplify the analysis of strategies for Bob.

Observation A. Consider two consecutive rounds. Suppose that in the first round Bob made a $k$-move and Alice picked the left group, and then in the second round Bob makes an $\ell$-move, with $\ell>k$. We may then assume, without loss of generality, that Alice again picks the left group.

Proof. Suppose Alice picks the right group in the second round. Then the combined effect of the two rounds is that each of the boxes $B_{k+1}, \ldots, B_{\ell}$ lost two pebbles (and the other boxes are unchanged). Hence this configuration is strictly dominated by that before the first round, and it suffices to consider only Alice's other response.

For Alice. Alice initially distributes pebbles according to $V_{\left\lceil\frac{N}{2}\right\rceil}$. Suppose the current configuration of pebbles dominates $V_{i}$. If Bob makes a $k$-move with $k \geqslant i$ then Alice picks the left group, which results in a configuration that dominates $V_{i+1}$. Likewise, if Bob makes a $k$-move with $k<i$ then Alice picks the right group, which results in a configuration that dominates $V_{i-1}$. Since none of $V_{1}, \ldots, V_{N}$ contains an empty box, Alice can prevent Bob from ever winning.

For Bob. The key idea in this solution is the following claim.

Claim. If there exist a positive integer $k$ such that there are at least $2 k$ boxes that have at most $k$ pebbles each then Bob can force a win.

Proof. We ignore the other boxes. First, Bob makes a $k$-move (splits the $2 k$ boxes into two groups of $k$ boxes each). Without loss of generality, Alice picks the left group. Then Bob makes a $(k+1)$-move, ... a $(2 k-1)$-move. By Observation A, we may suppose Alice always picks the left group. After Bob's $(2 k-1)$-move, the rightmost box becomes empty and Bob wins.

Now, we claim that if $n<M$ then either there already exists an empty box, or there exist a positive integer $k$ and $2 k$ boxes with at most $k$ pebbles each (and thus Bob can force a win). Otherwise, assume each box contains at least 1 pebble, and for each $1 \leqslant k \leqslant\left\lfloor\frac{N}{2}\right\rfloor$, at least $N-(2 k-1)=N+1-2 k$ boxes contain at least $k+1$ pebbles. Summing, there are at least as many pebbles in total as in $V_{\left\lceil\frac{N}{2}\right\rceil}$; that is, at least $M$ pebbles, as desired.
We present solutions for the general case of $N>1$ boxes, and write $M=\left\lfloor\frac{N}{2}+1\right\rfloor\left\lceil\frac{N}{2}+1\right\rceil-1$ for the claimed answer. For $1 \leqslant k<N$, say that Bob makes a $k$-move if he splits the boxes into a left group $\left\{B_{1}, \ldots, B_{k}\right\}$ and a right group $\left\{B_{k+1}, \ldots, B_{N}\right\}$. Say that one configuration dominates another if it has at least as many pebbles in each box, and say that it strictly dominates the other configuration if it also has more pebbles in at least one box. (Thus, if Bob wins in some configuration, he also wins in every configuration that it dominates.)

It is often convenient to consider ' $V$-shaped' configurations; for $1 \leqslant i \leqslant N$, let $V_{i}$ be the configuration where $B_{j}$ contains $1+|j-i|$ pebbles (i.e. where the $i^{\text {th }}$ box has a single pebble and the numbers increase by one in both directions, so the first box has $i$ pebbles and the last box has $N+1-i$ pebbles). Note that $V_{i}$ contains $\frac{1}{2} i(i+1)+\frac{1}{2}(N+1-i)(N+2-i)-1$ pebbles. If $i=\left\lceil\frac{N}{2}\right\rceil$, this number equals $M$.solution split naturally into a strategy for Alice (starting with $M$ pebbles and showing she can prevent Bob from winning) and a strategy for Bob (showing he can win for any starting configuration with at most $M-1$ pebbles). The following observation is also useful to simplify the analysis of strategies for Bob.

Observation A. Consider two consecutive rounds. Suppose that in the first round Bob made a $k$-move and Alice picked the left group, and then in the second round Bob makes an $\ell$-move, with $\ell>k$. We may then assume, without loss of generality, that Alice again picks the left group.

Proof. Suppose Alice picks the right group in the second round. Then the combined effect of the two rounds is that each of the boxes $B_{k+1}, \ldots, B_{\ell}$ lost two pebbles (and the other boxes are unchanged). Hence this configuration is strictly dominated by that before the first round, and it suffices to consider only Alice's other response.


For Alice. Let $K=\left\lfloor\frac{N}{2}+1\right\rfloor$. Alice starts with the boxes in the configuration $V_{K}$. For each of Bob's $N-1$ possible choices, consider the subset of rounds in which he makes that choice. In that subset of rounds, Alice alternates between picking the left group and picking the right group; the first time Bob makes that choice, Alice picks the group containing the $K^{\text {th }}$ box. Thus, at any time during the game, the number of pebbles in each box depends only on which choices Bob has made an odd number of times. This means that the number of pebbles in a box could decrease by at most the number of choices for which Alice would have started by removing a pebble from the group containing that box. These numbers are, for each box,

$$
\left\lfloor\frac{N}{2}\right\rfloor,\left\lfloor\frac{N}{2}-1\right\rfloor, \ldots, 1,0,1, \ldots,\left\lceil\frac{N}{2}-1\right\rceil
$$

These are pointwise less than the numbers of pebbles the boxes started with, meaning that no box ever becomes empty with this strategy.

So the final answer is $n=960$. In general, if there are $N>1$ boxes, the answer is $n=\left\lfloor\frac{N}{2}+1\right\rfloor\left\lceil\frac{N}{2}+1\right\rceil-1$.

Common remarks. We present solutions for the general case of $N>1$ boxes, and write $M=\left\lfloor\frac{N}{2}+1\right\rfloor\left\lceil\frac{N}{2}+1\right\rceil-1$ for the claimed answer. For $1 \leqslant k<N$, say that Bob makes a $k$-move if he splits the boxes into a left group $\left\{B_{1}, \ldots, B_{k}\right\}$ and a right group $\left\{B_{k+1}, \ldots, B_{N}\right\}$. Say that one configuration dominates another if it has at least as many pebbles in each box, and say that it strictly dominates the other configuration if it also has more pebbles in at least one box. (Thus, if Bob wins in some configuration, he also wins in every configuration that it dominates.)

It is often convenient to consider ' $V$-shaped' configurations; for $1 \leqslant i \leqslant N$, let $V_{i}$ be the configuration where $B_{j}$ contains $1+|j-i|$ pebbles (i.e. where the $i^{\text {th }}$ box has a single pebble and the numbers increase by one in both directions, so the first box has $i$ pebbles and the last box has $N+1-i$ pebbles). Note that $V_{i}$ contains $\frac{1}{2} i(i+1)+\frac{1}{2}(N+1-i)(N+2-i)-1$ pebbles. If $i=\left\lceil\frac{N}{2}\right\rceil$, this number equals $M$.

For Bob. Let $K=\left\lfloor\frac{N}{2}+1\right\rfloor$. For Bob's strategy, we consider a configuration $X$ with at most $M-1$ pebbles, and we make use of Observation A. Consider two configurations with $M$ pebbles: $V_{K}$ and $V_{N+1-K}$ (if $n$ is odd, they are the same configuration; if $n$ is even, one is the reverse of the other). The configuration $X$ has fewer pebbles than $V_{K}$ in at least one box, and fewer pebbles than $V_{N+1-K}$ in at least one box.

Suppose first that, with respect to one of those configurations (without loss of generality $V_{K}$ ), $X$ has fewer pebbles in one of the boxes in the half where they have $1,2, \ldots,\left\lceil\frac{N}{2}\right\rceil$ pebbles (the right half in $V_{K}$ if $N$ is even; if $N$ is odd, we can take it to be the right half, without loss of generality, as the configuration is symmetric). Note that the number cannot be fewer in the box with 1 pebble in $V_{K}$, because then it would have 0 pebbles. Bob then does a $K$-move. If Alice picks the right group, the total number of pebbles goes down and we restart Bob's strategy with a smaller number of pebbles. If Alice picks the left group, Bob follows with a $(K+1)$-move, a $(K+2)$-move, and so on; by Observation A we may assume Alice always picks the left group. But whichever box in the right half had fewer pebbles in $X$ than in $V_{K}$ ends up with 0 pebbles at some point in this sequence of moves.

Otherwise, $N$ is even, and for both of those configurations, there are fewer pebbles in $X$ only on the $2,3, \ldots, \frac{N}{2}+1$ side. That is, the numbers of pebbles in $X$ are at least

$$
\frac{N}{2}, \frac{N}{2}-1, \ldots, 1,1, \ldots, \frac{N}{2}
\tag{C}
$$

with equality occurring at least once on each side. Bob does an $\frac{N}{2}$-move. Whichever group Alice chooses, the total number of pebbles is unchanged, and the side from which pebbles are removed now has a box with fewer pebbles than in $(C)$, so the previous case of Bob's strategy can now be applied.

Final answer: 960