Browse · MathNet
PrintSELECTION and TRAINING SESSION
Belarus counting and probability
Problem
Integers from to are written on the cards and placed in a row on the table. Each number is used once and there is exactly one number on each card. Mary plays the following game: on each move she takes any card from the table and puts it into her right pocket, then she takes the leftmost card and puts it into her left pocket. After moves the table is empty, the game stops and Mary calculates the sum of the numbers written on the cards in her left pocket. For each initial position of the cards denote by the maximal possible sum that Mary can reach. Find the number of initial positions , for which the sum is minimal possible.
Solution
Let Mary always choose the card with the maximal number among the two leftmost cards. Then on -th move the difference between the sums of numbers in her pockets increases at least by which implies that this strategy allows to get at least . In particular, for each and moreover if at some moment the difference between the cards is more than then Mary gets the sum more than . Hence if then the row consists of the pairs , , , arranged in some order.
Suppose that . If there exist two adjacent pairs and (in that order from left to right) such that then choosing two numbers from the second pair instead of the first pair will allow Mary to obtain the sum greater than , a contradiction. Hence if any pair is placed to the left from any pair .
Finally consider any such initial position , it has the form , , , where the elements in the pairs are arbitrarily permuted. On -th move Mary will put into her left pocket the card with number which is at least . Hence the sum of the numbers in her left pocket will be not less than , which implies that the sum in her right pocket will not exceed . Therefore for all such positions.
Suppose that . If there exist two adjacent pairs and (in that order from left to right) such that then choosing two numbers from the second pair instead of the first pair will allow Mary to obtain the sum greater than , a contradiction. Hence if any pair is placed to the left from any pair .
Finally consider any such initial position , it has the form , , , where the elements in the pairs are arbitrarily permuted. On -th move Mary will put into her left pocket the card with number which is at least . Hence the sum of the numbers in her left pocket will be not less than , which implies that the sum in her right pocket will not exceed . Therefore for all such positions.
Final answer
2^1011
Techniques
Games / greedy algorithmsInvariants / monovariantsColoring schemes, extremal arguments