Players $A$ and $B$ play a game with $N \geq 2012$ coins and $2012$ boxes arranged around a circle. Initially $A$ distributes the coins among the boxes so that there is at least $1$ coin in each box. Then the two of them make moves in the order $B,A,B,A,\ldots $ by the following rules: (a) On every move of his $B$ passes $1$ coin from every box to an adjacent box. (b) On every move of hers $A$ chooses several coins that were not involved in $B$'s previous move and are in different boxes. She passes every coin to an adjacent box. Player $A$'s goal is to ensure at least $1$ coin in each box after every move of hers, regardless of how $B$ plays and how many moves are made. Find the least $N$ that enables her to succeed.
Problem
Source: IMO Shortlist 2012, Combinatorics 4
Tags: combinatorics, game, invariant, IMO Shortlist
01.08.2013 02:39
The answer is $2012 + 2010 = 4022$. Suppose we have 4022 coins. Label the boxes $1,2,\cdots,2012$. Claim. Suppose, at the beginning of $B$'s turn, the following conditions are satisfied: (a) Every box contains at most 2 coins. (b) There are totally 2011 coins in odd-numbered boxes (resp. even-numbered boxes). Then, no matter how $B$ plays, $A$ can play in a way so that the two conditions are preserved at the end of $A$'s turn. Proof. The strategy for $A$ is as follows. For every box which contains two coins before $B$'s move, if $B$ moves a coin to the left, then $A$ moves the other coin to the right, and vice versa. It is pretty easy to see that the two conditions are preserved under this strategy. Q.E.D. It is clear that, at the beginning of the game, $A$ can distribute the coins in a way such that the two conditions are satisfied, and by the claim above $A$ can play in a way so that these two conditions are satisfied. In addition, it is clear that whenever the two conditions are satisfied, every box has a coin. Suppose we have at most 4021 coins. Label the boxes $0,1,2,\cdots,1005,1006,1005,\cdots,1$. Suppose each coin in a box labeled $i$ will score $i$ points, and let $S$ be the total score. $B$'s strategy is as follows. Except for the box labeled $0$, always move a coin to a box which gives a lower score. By this way $B$ can reduce $S$ by 2010, but since $A$ can move at most 2009 coins, he can increase $S$ by at most 2009. Thus there is a net decrease of $S$ by at least 1, but $S$ can't decrease forever.
21.08.2014 05:56
Yeah I have the same $4021$ is bad proof as you (actually I labeled the boxes $1$, $2$,... $1006$, $1006$,... $2$, $1$ but it's the same more or less). But you are not exactly right in one particular regard. If a box $Y$ has $2$ coins whereas its neighbors have $1$ coin each, following your strategy leads one to complete doom if $Y$'s neighbors have their coins moved away from $Y$, because this gives $Y$ $0$ coins. As such, I employed this other strategy, which is to keep track of "debts." $A$ starts by picking two of the boxes to have $1$ coin and the rest with $2$. Basically if $X$, $Y$ are adjacent coins then $X$ has a debt to $Y$ if $Y$ gives its coin to $X$ but $X$ does not give its coin to $Y$. Now, note that after $B$'s turn some pairs of adjacent vertices have debts, and no vertex can be indebted or have debt from both of its neighbors. Every vertex can pay off a debt except perhaps $X$, $Y$. So $A$ just gets every vertex to pay off its debt that can. The result is that everything still has the same number of coins with the possible exception that $X$ or $Y$ could have unpaid debt to neighbors so the $1$ or $2$ coin boxes might shift by $1$. This is all fine and good unless the two one coin boxes are adjacent or they have a common neighbor. If they have a common neighbor it's actually fine because both cannot be indebted and unable to pay to that common neighbor, so that common neighbor will still have coins. If they are adjacent I just used what you outlined, which is just sending a coin the other way. (To clarify, then it becomes $X$ and $Y$'s other neighbors who have one coin each). (Note - By the way, it's not hard for $B$ to force $1$ coin in two adjacent boxes, by just moving everything toward some side of the $2006$ gon repeatedly. Also I wonder if there is a strategy that does not have any bad cases. The one I mainly use had the bad case I patched with GaryTam's strategy, and GaryTam's strategy also has at least one bad case.)
27.01.2015 11:38
I have a nice sort of way to visualize this: redox reactions (sort of). Divide each box into an inner portion and outer portion. In each box, place one ball in the outer portion, and everything else in the inner portion. $B$ is going to remove the coin from the outer portion around the circle without touching the inner part (like the orbitals of atoms!). I claim that the answer for $n$ coins is $N = 2n - 2$. I will show that $A$ can always defend the homeostasis position of every box has at least one ball. Have $A$ arrange the balls so that there are only two boxes with an empty inner box. Call these two boxes deficient. Now $B$ is going to move stuff around in the outer layer of the ring. Call a box that net loses one ball to be an oxidization site and a box that net gains one ball (two come in, one goes out) a reduction site. It is easy to see that 1) you cannot have three reduction sites in a row and 2) every oxidization site is paired with a reduction site. So now, things are in danger if a deficient box gets oxidized because now it has no balls (please be mature). Then this oxidization must be paired with some reduction site. So what we will have $A$ do is this: start from the reduction site and move a ball towards the oxidization site. You can just propagate that ball towards that oxidization site. If it reaches the oxidization site, then we're all good. If it doesn't, that means there's another deficient box somewhere along that pathway. Then just skip it, start with the box after that deficient box and keep transferring to the oxidization site. There's a catch though: what if the two deficient boxes are adjacent? (That is, they are adjacent and part of the same redox linkage). Then have the reduced site have the ball travel to the first deficient box it comes across. Have the other deficient box just take from the one that is next to it (that isn't the other deficient box). For everything else, just run the redox reaction induced by B backwards; so like take the reduced boxes and move the balls to the oxidized sites; this will just restore everything back to the way it was before (so that each one gets a net gain of 0). Now to deal with when $N < 2n-2$. This means that $A$ can only move at most $n-3$ balls, while $B$ moves $n$ balls. We now create a potential field here. Label one of the boxes with the lowest potential energy, for convenience let's just say $0$. Then, the two boxes surrounding it will have potential energy $1$, and then after that $2$, and so on. Then, B can deliberately lower the potential energy of at least $n-1$ balls and inevitably increase the potential energy of the ball in $0$ by $1$ with a net change of $n-2$ loss of potential energy. But then, $A$ can only increase potential energy by $n-3$ which is a problem because that means potential energy keeps decreasing yet it is minimized at $0$. Therefore, the process must end and $A$ is screwed and the lowest energy point is found, forming a stable...idk XD
02.04.2015 21:20
GaryTam wrote: The answer is $2012 + 2010 = 4022$. Suppose we have 4022 coins. Label the boxes $1,2,\cdots,2012$. Suppose we start with the following conditions: (a) Every box contains at most 2 coins. (b) There are totally 2011 coins in odd-numbered boxes. Similar for even-numbered boxes. . I'm sorry but why can you impose this conditions?
24.07.2016 11:19
yugrey wrote: But you are not exactly right in one particular regard. If a box $Y$ has $2$ coins whereas its neighbors have $1$ coin each, following your strategy leads one to complete doom if $Y$'s neighbors have their coins moved away from $Y$, because this gives $Y$ $0$ coins. In my proof, maintaining condition (b) is the trick to avoid such a possibility.
24.07.2016 11:21
Pythagorasauras wrote: GaryTam wrote: The answer is $2012 + 2010 = 4022$. Suppose we have 4022 coins. Label the boxes $1,2,\cdots,2012$. Suppose we start with the following conditions: (a) Every box contains at most 2 coins. (b) There are totally 2011 coins in odd-numbered boxes. Similar for even-numbered boxes. . I'm sorry but why can you impose this conditions? I have slightly edited the proof to clarify this.
24.07.2016 12:14
fclvbfm934 wrote: I have a nice sort of way to visualize this: redox reactions (sort of). Divide each box into an inner portion and outer portion. In each box, place one ball in the outer portion, and everything else in the inner portion. $B$ is going to remove the coin from the outer portion around the circle without touching the inner part (like the orbitals of atoms!). I claim that the answer for $n$ coins is $N = 2n - 2$. I will show that $A$ can always defend the homeostasis position of every box has at least one ball. Have $A$ arrange the balls so that there are only two boxes with an empty inner box. Call these two boxes deficient. Now $B$ is going to move stuff around in the outer layer of the ring. Call a box that net loses one ball to be an oxidization site and a box that net gains one ball (two come in, one goes out) a reduction site. It is easy to see that 1) you cannot have three reduction sites in a row and 2) every oxidization site is paired with a reduction site. So now, things are in danger if a deficient box gets oxidized because now it has no balls (please be mature). Then this oxidization must be paired with some reduction site. So what we will have $A$ do is this: start from the reduction site and move a ball towards the oxidization site. You can just propagate that ball towards that oxidization site. If it reaches the oxidization site, then we're all good. If it doesn't, that means there's another deficient box somewhere along that pathway. Then just skip it, start with the box after that deficient box and keep transferring to the oxidization site. There's a catch though: what if the two deficient boxes are adjacent? (That is, they are adjacent and part of the same redox linkage). Then have the reduced site have the ball travel to the first deficient box it comes across. Have the other deficient box just take from the one that is next to it (that isn't the other deficient box). For everything else, just run the redox reaction induced by B backwards; so like take the reduced boxes and move the balls to the oxidized sites; this will just restore everything back to the way it was before (so that each one gets a net gain of 0). Now to deal with when $N < 2n-2$. This means that $A$ can only move at most $n-3$ balls, while $B$ moves $n$ balls. We now create a potential field here. Label one of the boxes with the lowest potential energy, for convenience let's just say $0$. Then, the two boxes surrounding it will have potential energy $1$, and then after that $2$, and so on. Then, B can deliberately lower the potential energy of at least $n-1$ balls and inevitably increase the potential energy of the ball in $0$ by $1$ with a net change of $n-2$ loss of potential energy. But then, $A$ can only increase potential energy by $n-3$ which is a problem because that means potential energy keeps decreasing yet it is minimized at $0$. Therefore, the process must end and $A$ is screwed and the lowest energy point is found, forming a stable...idk XD Looool im crying because of this solution its amazing
26.06.2018 23:28
(b) On every move of hers A chooses several coins that were not involved in B's previous move and are in different boxes. Can somebody explain what in different boxes means? They were not moved during B's so I am assuming they are in a different box from the starting position. But then there must be at least 2 coins in each box(notice that after the first move by B, every coin is either in the same box or just moved by B, so A's first move is doing nothing, thus if there is only 1 coin in the box, B moves it away, A does nothing and fails) so $n>=4024$, I am getting n to be around $2012^2$. Somebody please help.
03.08.2020 02:21
Nice problem! Solved with eisirrational, goodbear, Th3Numb3rThr33. Diagrams by goodbear. Let \(n=2012\). The answer is \(2n-2=4022\) coins. First let $A$ be Athena and $B$ be Beus (rhymes with Zeus, illustration below). Figure: When Zeus uses his Lightning Bolt he says "Kaboom!" When Beus uses his Lightning Zolt he says "Caboose!" \bigskip Athena's strategy for \(2n-2\): Label the coins 1, 2, 3, \ldots, \(n\). Say a configuration of \(2n-2\) coins is good if all boxes contain either one or two coins (hence exactly two boxes contain one one coin), and the two boxes with only one coin have labels of different parity. Start with a good configuration, and place a counterfeit coin in each of the two boxes with only one coin. Beus never moves the counterfeit coins. Whenever Beus moves a coin from box \(i\) to \(i-1\), Athena moves the remaining coin in box \(i\) (counterfeit or not) to \(i+1\), and vice versa. Hence every box always contains two (real or counterfeit) coins. Now the boxes with the counterfeit coins always have labels of different parity, so the counterfeit coins are never in the same box. Thus if we ever remove the counterfeit coins, the configuration is still good. \bigskip Beus's strategy for \(2n-3\): Designate one of the boxes to be the black hole, and let \(\delta\) be the sum of the distances of the coins to the black hole. On each of his moves, Beus moves every coin (that he can move) closer to the black hole. The coin in the black hole must move away from the black move by a distance of one, but every other coin moves closer by a distance of one, so \(\delta\) decreases by \(n-2\). On Athena's move, she can move at most \(n-3\) coins (since she cannot move from boxes with one coin), so she can increase \(\delta\) by at most \(n-3\). Thus, Beus can ensure \(\delta\) is strictly decreasing after every round, so Beus must win eventually.
03.08.2020 04:58
TheUltimate123 wrote: Nice problem! Solved with eisirrational, goodbear, Th3NumberThr33. Diagrams by goodbear. Let \(n=2012\). The answer is \(2n-2=4022\) coins. First let $A$ be Athena and $B$ be Beus (rhymes with Zeus, illustration below). Figure: When Zeus uses his Lightning Bolt he says "Kaboom!" When Beus uses his Lightning Zolt he says "Caboose!" \bigskip Athena's strategy for \(2n-2\): Label the coins 1, 2, 3, \ldots, \(n\). Say a configuration of \(2n-2\) coins is good if all boxes contain either one or two coins (hence exactly two boxes contain one one coin), and the two boxes with only one coin have labels of different parity. Start with a good configuration, and place a counterfeit coin in each of the two boxes with only one coin. Beus never moves the counterfeit coins. Whenever Beus moves a coin from box \(i\) to \(i-1\), Athena moves the remaining coin in box \(i\) (counterfeit or not) to \(i+1\), and vice versa. Hence every box always contains two (real or counterfeit) coins. Now the boxes with the counterfeit coins always have labels of different parity, so the counterfeit coins are never in the same box. Thus if we ever remove the counterfeit coins, the configuration is still good. \bigskip Beus's strategy for \(2n-3\): Designate one of the boxes to be the black hole, and let \(\delta\) be the sum of the distances of the coins to the black hole. On each of his moves, Beus moves every coin (that he can move) closer to the black hole. The coin in the black hole must move away from the black move by a distance of one, but every other coin moves closer by a distance of one, so \(\delta\) decreases by \(n-2\). On Athena's move, she can move at most \(n-3\) coins (since she cannot move from boxes with one coin), so she can increase \(\delta\) by at most \(n-3\). Thus, Beus can ensure \(\delta\) is strictly decreasing after every round, so Beus must win eventually. LEAK
07.08.2020 10:40
Quote: LEAK the fact you said LEAK was itself a LEAK
04.02.2021 03:59
In general, if there are $n$ boxes, the answer is $2n-2$. Call the first player Annie and the second player Bertolt. We first establish a winning strategy for Annie when there are $2n-2$ coins. Annie initially arranges the coins such as there are two consecutive boxes with $1$ coin, and the remaining boxes have exactly $2$ coins. Construct an arrow for each box, marking the direction that Bertolt moves the coins on his move. If the arrows form a cycle, then Annie can stay in the same configuration without moving any coins. Otherwise, there exists two consecutive boxes such that each box passed a coin to the other, possibly more. If these two boxes are not the two boxes with exactly $1$ coin, then Annie can reverse every single arrow (e.g. if Bertolt moves a coin from box $1$ to box $2$, then Annie moves the coin back from box $2$ to box $1$), except the arrows that negate each other. Annie can do this in $n-2$ moves, so we always stay in the same initial configuration. Now, for when there are $2n-3$ coins, choose any box $B$, Bertolt directs the arrow from each box towards $B$. $B$ must direct its arrow away, but the sum of the distances of the coins from $B$ decreases by $n-2$ on each of Bertolt's moves. Annie can only increase the sum by $n-3$ on each of her moves, so Bertolt must win eventually.
27.12.2021 21:57
The answer is $\boxed{4022}.$ Label the boxes $1$ through $2012$ in circular order. Suppose there are $2$ coins placed in each of the boxes except for two boxes of opposite parity which get $1$ each. $A$ can always maintain this condition after $B$'s move in the following way: for any box with $2$ coins, $B$ first moves a coin out of the box on his turn on a neighbor. Then, $A$ moves the remaining coin to the other neighbor on his turn. After the operation, we have that for each of the two boxes previously having $1$ coin, exactly one box bordering it (which must have opposite parity) has $1$ coin, since it only receives a coin from one neighbor. The others have $2$ coins (one from each neighbor). So the condition is maintained. Suppose we have at most $4021$ coins before one of $B$'s moves, and at least $1$ coin is in each box. Take a box $b.$ Then $B$ moves a coin in every box except $b$ closer to $b.$ The sum of the distances of all coins to the box $b$ is decreased by $2011 - 1 = 2010.$ But then $A$ can only move at most $4021-2012= 2009$ coins on his turn (since each box has at least one coin). So if there are initially at most $4041$ coins, $B$ can force the sum of the distances of all the coins to the box $b$ to decrease after every round until $A$ loses. $\square$
27.05.2023 02:16
The answer is $4022$. We will first prove the bound. Suppose $N\le 4021$. Denote one box $X$ with $0$ and each other box with the distance to this box, going either clockwise or counter-clockwise, whichever is shorter. Let the score of a game state be the sum of the box numbers of each coin. Note that as long as each box has a coin, Bob can move all but one coin towards $X$, thus decreasing the score by $2011$. One coin is moved away, so the score is in total decreased by $2010$. However, Alice can move only $2009$ coins so the score decreases after both of them move. However, score is discrete and bounded below, contradiction. When $n\ge 4022$, Alice can start by distributing so that there are $2010$ boxes with two and $2$ boxes with one. For each coin Bob moves, if it is moved from some box, $X$ to a box with two coins, $Y$. If he also moved a coin from $Y$ to $X$, we're all good. If he moved it the other way, then $Y$ has a coin that is unused so far: move it to $X$. If both $Y$'s neighbors give a coin to $Y$, one of them will receive a coin from $Y$, so any movement of coins to a box with two coins can be reversed by Alice. Donations to a box with two coins will not change the configuration in any way. If it is moved from some box with two coins $X$, to a box with one coin, $Z$, then the fact that there are $2010$ boxes with two and $2$ boxes with one remains, so Alice doesn't need to do anything. If $X$ also has one coin, then obviously $Z$ cannot give back to $X$, but $X$ has no coins. Let $W$ be the box adjacent to $X$ on the other side of $Z$ Clearly, $W$ has two coins right now. If Bob has already moved a coin from $W$ to $X$, then $X$ has one coin and we are done. Otherwise, since Alice did not move a coin from $X$ to $W$, and Bob has also not moved a coin from $X$ to $W$ there is one in $W$ that has not been moved. Alice can make that move and maintain the distribution of coin counts in boxes.