There are $n$ boxes ${B_1},{B_2},\ldots,{B_n}$ from left to right, and there are $n$ balls in these boxes. If there is at least $1$ ball in ${B_1}$, we can move one to ${B_2}$. If there is at least $1$ ball in ${B_n}$, we can move one to ${B_{n - 1}}$. If there are at least $2$ balls in ${B_k}$, $2 \leq k \leq n - 1$ we can move one to ${B_{k - 1}}$, and one to ${B_{k + 1}}$. Prove that, for any arrangement of the $n$ balls, we can achieve that each box has one ball in it.
Problem
Source: 2011 China Girls Mathematical Olympiad P7
Tags: algorithm, induction, abstract algebra, combinatorics unsolved, combinatorics, Chip firing
07.08.2011 08:53
I feel like a very slick solution should exist for this problem, but I couldn't find it. Here's an algorithm that should work. Assign weights to the boxes so that $B_k$ has weight $2^{n-k}$. In the first stage of the algorithm, repeatedly perform moves that don't involve moving balls out of $B_1$ until we can no longer do so. Notice that the total weight of the balls is a positive integer that strictly increases with every move and is bounded above by $n \cdot 2^n$, so this will terminate. At the end, we have no balls in $B_n$, at most one ball in $B_2$ through $B_{n-1}$, and at least two balls in $B_1$. Now for the second stage. Suppose $m$ is the smallest index such that $B_m$ has no balls, so that the first $m$ boxes have $k, 1, 1, \ldots 1, 0$ balls for some $k \geq 1$. Perform the operations that move balls out of $B_1, B_2, \ldots B_{m-1}$ in order, resulting in $k, 1, 1, \ldots 0, 1$ and effectively moving a ball from $B_{m-1}$ to $B_m$. Do the same tactic to move the ball in $B_{m-2}$ to $B_{m-1}$. Repeat this until we eventually get $k-1, 1, 1, 1, \ldots, 1, 1$, so that we have transferred a ball from $B_1$ to $B_m$. Now find the empty box closest to $B_1$ again and repeat the same process. We'll eventually fill all the boxes from $B_2$ to $B_n$ with exactly one ball in this manner, and since we started with $n$ balls that means $B_1$ will have one ball left, completing the proof.
07.08.2011 09:25
We can use induction to solve the problem. We show that from the position $01111...1k000..00$(with$n-k$ 1s we can obtain $01111....11111(k-1)00...000$ with $n-k+1$ 1s. To obtain this we perform the following moves :$ 011....111112(k-2)100...000 \Rightarrow 01111...111120(k-1)1000...00$ and repeatedly to obtain $020111...11(k-1)1000...000 \Rightarrow 101111....1111(k-1)000....0000 \Rightarrow 011111....1111(k-1)1000....0000$. Aplying this couple of moves repeatedly, we get that from $01111...1k000..00$ we can obtain$ 011111...111(k-1)000000$. But, we can move all the balls into box #1. Then, we can move them in box #2. We'll have :$0n00...0000$ which is the type of a configuration $01111...1k000..00$. Applying the induction step, we can obtain $ 01111111..11112$ and moving repeatedly one of the balls in the last box we obtain $1111...1111$.
07.08.2011 18:01
MellowMelon wrote: I feel like a very slick solution should exist for this problem, but I couldn't find it. Perhaps there is a very short solution that makes reference to general properties of the abelian sandpile model (a.k.a. the chip-firing game and by several other names). But I don't know if you would count this as slick For example, your first paragraph may be achived by treating B_1 as the sink and observing that any stable configuration has the form you claimed. But this doesn't really give a different proof, just a shorter statement of that step; but maybe more can be done to avoid the second paragraph.
21.02.2012 14:06
MellowMelon wrote: I feel like a very slick solution should exist for this problem, but I couldn't find it. Here's an algorithm that should work. Assign weights to the boxes so that $B_k$ has weight $2^{n-k}$. In the first stage of the algorithm, repeatedly perform moves that don't involve moving balls out of $B_1$, until we can no longer do so. Notice that the total weight of the balls is a positive integer that strictly increases with every move and is bounded above by $n 2^n$, so this will terminate. At the end, we have no balls in $B_n$, at most one ball in $B_2$ through $B_{n-1}$, and at least two balls in $B_1$. ... Now, this should be slick enough for everyone (it is for me, beeing already acquainted with such semi-invariants). We can now finish by induction, without much care for the actual composition of the configurations. Clearly, we are ok for $n=2$, so assume we work with $n+1$ boxes labeled $B_0,B_1,\ldots,B_n$ from left to right, for $n\geq 2$. Denote by $F$ the move that moves a ball from $B_0$ to $B_1$ if $|B_0| \geq 1$. Denote by $M$ the move that moves a ball from $B_1$ to $B_0$ and one to $B_2$ if $|B_1| \geq 2$. All other permitted moves, on boxes $B_k$ with $k\geq 2$, are also permitted in the model with $n$ boxes $B_1,B_2,\ldots,B_n$. Using the quoted procedure, we end up with $|B_n| = 0$, $|B_k| \leq 1$ for all $1\leq k < n$, and $|B_0|\geq 2$. We apply now $|B_0| - 1$ times the move $F$, reaching $|B_0| = 1$. Denote now by $F'$ the move that moves a ball from $B_1$ to $B_2$ if $|B_1| \geq 1$; yes, this is not allowed with $n+1$ boxes, but we can model it as $F'= M \circ F$. Now, using just $F'$ and the other permitted moves for the $n$ boxes $B_1,B_2,\ldots,B_n$ (we never use $F$ alone, but rather only in conjunction with $M$, if a move $F'$ were required), by the induction hypothesis we reach the situation when $|B_k| = 1$ for all $1\leq k \leq n$, and so also $|B_0|=1$ (since in total we have $n+1$ balls).
22.08.2017 13:06
06.10.2019 11:29
I will prove the following operation using induction: lemma if $B_i$ has more than 1 ball we can move one ball to $B_{i+1}$ proof: let's call this operation a $N-secret-operation$ for $b_n$ $1-secret-operation$ is obvious for $2-secret-operation$ suppose $|B_1|=L , |B_2|=K , |B_3|=M$ we can make $|B_1|=L+1 , |B_2|=K-1 , |B_3|=M+1$ and then $|B_1|=L , |B_2|=K-1 , |B_3|=M+1$ for $n-secret-operation$ suppose it's true for $n-1$ and $|B_n|=k $ using the second operation we will have $|B_{n-1}|=L+1 , |B_{n-1}|=K-2 , |B_{n-1}|=M+1$ using the $(n-1)-secret-operation$ we can make $|B_{n-1}|=L , |B_{n-1}|=K-1 , |B_{n-1}|=M+1$ so we prove the $n-secret-operation$ now use the firs operation to move all the balls into $B_1$ and apply the secret operation many times
21.10.2021 06:49
yunxiu wrote: There are $n$ boxes ${B_1},{B_2},\ldots,{B_n}$ from left to right, and there are $n$ balls in these boxes. If there is at least $1$ ball in ${B_1}$, we can move one to ${B_2}$. If there is at least $1$ ball in ${B_n}$, we can move one to ${B_{n - 1}}$. If there are at least $2$ balls in ${B_k}$, $2 \leq k \leq n - 1$ we can move one to ${B_{k - 1}}$, and one to ${B_{k + 1}}$. Prove that, for any arrangement of the $n$ balls, we can achieve that each box has one ball in it. Strong induct on $n$;when there are $2$ boxes and $2$ balls then:- $\;\;\;\;\;\;\; \bullet$ If both boxes have $1$ ball we would be done. $\;\;\;\;\;\;\; \bullet$ If one box has $2$ balls and $1$ has $0$ balls then shift balls by operation $1$ Now suppose that it works for $n-1$ boxes-balls,we show it for $n$ boxes-balls. $\;\;\;\;\;\;\; \bullet$ If any box has exactly $1$ ball then delete it;now we have $n-1$ boxes with $n-1$ balls so we are done by the inductive hypothesis. $\;\;\;\;\;\;\; \bullet$ If all boxes have $>1$ ball,then select two boxes WLOG $a_1$ and $a_3$ where both $a_1,a_3$ have $>1$ balls,then shift balls from $a_1$ to $a_3$ until there remains only $1$ ball in $a_1$ and then delete $a_1$;again we have an $n-1$ boxes-balls scenario so we are done by strong induction.$\blacksquare$
22.07.2023 15:42
We proceed by using induction. The base case for $n=1$ has nothing to prove. Now we assume that the case is true for some $n$, and prove it for the case $n+1$. We call a box available if an operation can be performed on the box. We firstly perform the following algorithm. Algorithm: If box 1 has at least $1$ ball in it, then do nothing. Otherwise perform the following: Perform an operation on the rightmost available box. Repeat the operation until there is at least one ball in box 1. I claim that this algorithm places at least one ball in box 1. FTSOC assume that it doesn't. There can only be two ways that this algorithm can fail. Either it goes on forever, else it ends without placing a ball in box 1. Now we deal with the case if the process goes on forever. Denote the values of the number of balls in the boxes from left to right as a $(n+1)$-digit number in base $(n+2)$. Call this base $(n+2)$ number as $N$. Note that after each operation, the value of $N$ is strictly increasing as we are performing no operation on the first box; so it must end at some point which is a contradiction. Now for the case when the process ends, but we do not have any ball in box 1. So there are $(n+1)$ balls in the last $n$ boxes (that is all the boxes without box 1). So by PHP, we get a box that has at least $2$ balls. But then we can perform an operation on that box which is a contradiction. So we must have at least $1$ ball in box 1 after this operation. Now we move onto the actual part of the solution. We move all except just $1$ ball from box 1 $\rightarrow$ box 2. So, we now have $n$ balls in the $n$ boxes (all the boxes starting from box 2 till box n+1). So we can now use our inductive step on these $n$ boxes. So now whenever another ball enters in box 1 from box 2, we perform our move on box 1. Now note that a move on box 2 followed by a move on box 1, is equivalent to moving a ball from box 2 to box 3. So we are done by our induction hypothesis for $n$ boxes.