Browse · MathNet
PrintBalkan Mathematical Olympiad Shortlisted Problems
counting and probability
Problem
Let and be positive integers with . There are piles having stones such that for each we have (so ). Aida and Bob play the following game: on each round, Bob picks two non-empty piles (if possible) and he removes a number of stones from the pile with fewer stones (in the case of equality, he chooses randomly). Then Aida decides whether she removes the same number of stones from the other pile or she moves the stones Bob just removed to the other pile. If there is at most one non-empty pile, the game ends. Find the smallest positive integer such that Aida can guarantee that at some point there will be at most stones, regardless of the sequence and of how Bob plays.
Solution
Answer: . Let the piles be labeled such that the pile labeled has stones. We first provide a construction achieving . Let and . Then each stone removed from the pile can be matched to a stone removed from one of the first piles. Since the first piles have stones in total, it follows that we cannot remove more than stones from the last pile, so the game will finish with at least stones. We now prove that Aida can always force a position with at most stones. Before going further, we will prove that the game must end, regardless of how Aida and Bob play. Observe that after each move, the sum either decreases or stays constant, and moreover, if it stays constant, then increases. Hence, if the game never ends, from some point the total number of stones remains invariant, while increases on each round, contradiction. The rest of the proof relies on the following lemma: Lemma. It is possible to split into two non-empty subsets and such that Proof. Imagine a balance. First, place the pile with stones on one of the pans and then place on the other pan. After having placed on the balance, place on the lighter pan (ties broken arbitrarily). We claim that when are placed on the balance, the difference of weight is less than or equal to . We prove this by induction. The base case is trivial. For the inductive step, assume that immediately before placing the difference in weight is . Then the pans will differ by after placing . Since by the inductive hypothesis, we have , so . At the end, we will get the desired partition. □ Let's return to the problem. Aida can use the following strategy: she splits the piles into two groups, the ones with labels in and the ones with labels in , where is a partition such that which is possible by the Lemma. Then, if Bob picks two piles from the same group, Aida moves the removed stones to the larger pile, whereas if Bob picks two piles from different groups, Aida will remove stones from the larger pile. If the two groups initially have total sums of , respectively , then notice that is invariant due to this strategy. At the end of the game, there will be at most one nonempty pile. Since is invariant, all piles in will be empty, and the piles in will have a total of stones, as desired.
---
Alternative solution.
We provide an alternative construction and an alternative proof of the lemma. For the construction, pick such that each of them is a multiple of and . Bob's strategy will be to always remove stones. It's easy to see that the size of each pile will remain a multiple of , so this is a valid strategy. Moreover, the total number of stones is invariant (mod ) so at any point there will be at least stones. We now turn to presenting an alternative proof of the lemma. We say that a finite nonempty sequence of reals is -tight if, when ordered increasingly, no two consecutive elements differ by more than . We will prove the following stronger statement: if is a sequence of non-negative real numbers such that and for each . Then the sequence formed by the sums of all subsets of is -tight. We prove the statement by induction on . Note that we allow here. The base case is trivial. For the inductive step, assume the property holds for and we will prove it for . If determine the sequence of sums, then the sequence for is . As both and are -tight and , our conclusion follows. For finishing the proof of the lemma, note that the sequence satisfies the conditions required for the stronger statement, implying that lies at a distance of at most from some . If we let , this is our desired partition.
---
Alternative solution.
We provide yet another proof of the lemma. We perform induction on . The base cases are clear. For the induction step, assume that and that the statement is true for . We replace and with . It suffices that there is a partition for the new sequence: if we have such a partition, then we can place in the same set as and in the other set. We see that . If , then this follows by the inductive hypothesis applied to , . If , apply the inductive hypothesis to to obtain a partition such that . If we add to this will make the difference between the two parts become , as desired.
---
Alternative solution.
We provide an alternative construction and an alternative proof of the lemma. For the construction, pick such that each of them is a multiple of and . Bob's strategy will be to always remove stones. It's easy to see that the size of each pile will remain a multiple of , so this is a valid strategy. Moreover, the total number of stones is invariant (mod ) so at any point there will be at least stones. We now turn to presenting an alternative proof of the lemma. We say that a finite nonempty sequence of reals is -tight if, when ordered increasingly, no two consecutive elements differ by more than . We will prove the following stronger statement: if is a sequence of non-negative real numbers such that and for each . Then the sequence formed by the sums of all subsets of is -tight. We prove the statement by induction on . Note that we allow here. The base case is trivial. For the inductive step, assume the property holds for and we will prove it for . If determine the sequence of sums, then the sequence for is . As both and are -tight and , our conclusion follows. For finishing the proof of the lemma, note that the sequence satisfies the conditions required for the stronger statement, implying that lies at a distance of at most from some . If we let , this is our desired partition.
---
Alternative solution.
We provide yet another proof of the lemma. We perform induction on . The base cases are clear. For the induction step, assume that and that the statement is true for . We replace and with . It suffices that there is a partition for the new sequence: if we have such a partition, then we can place in the same set as and in the other set. We see that . If , then this follows by the inductive hypothesis applied to , . If , apply the inductive hypothesis to to obtain a partition such that . If we add to this will make the difference between the two parts become , as desired.
Final answer
k = m
Techniques
Games / greedy algorithmsInvariants / monovariantsInduction / smoothing