Two friends $A$ and $B$ must solve the following puzzle. Each of them receives a number from the set $\{1,2,…,250\}$, but they don’t see the number that the other received. The objective of each friend is to discover the other friend’s number. The procedure is as follows: each friend, by turns, announces various not necessarily distinct positive integers: first $A$ says a number, then $B$ says one, $A$ says a number again, etc., in such a way that the sum of all the numbers said is $20$. Demonstrate that there exists a strategy that $A$ and $B$ have previously agreed on such that they can reach the objective, no matter which number each one received at the beginning of the puzzle.
Problem
Source: Cono Sur 2008 #3
Tags: combinatorics, cono sur
19.11.2015 21:00
I haven't solved it... but i can share a little idea about it if we replace $20$ by $30$. With this, very simply $A$ and $B$ can go about declaring the digits of their numbers in binary one by one , speaking out $1$ for a $0$ and $2$ for a $1$. They make each number $8$-digits long by adding sufficient $0$s in front , and the number which will cost the most is $01111111_{2} (126_{10})$ , the cost being $1*1+2*7=15$ so if $A$ and $B$ gets $(126,126)$ their sum counts upto $30$. . For base $4$ also the maximum is $30$. Can anybody modify it a bit to bring that down to $20$.
19.11.2015 21:54
A somewhat lofty idea brings it down to $24$ also. . $A$ ,$B$ declare the numbers in base $4$. Now there are exactly( ) $125$ numbers in base for which "cost" more than $10$, numbers which if $A$ and $B$ picks both there's a problem. Call them "Bad" numbers and the others "Good" numbers. Form a bijection between the "Bad" and "Good" sets. Both $A$ and $B$ have the mappings. In first move $A$ and $B$ speak $1$ or $2$ signifying their number belong to the "Good" or "Bad" set respectively. After that they declare the base $4$ digits of $n$ where $n$ is the number that they have if it is "Good" or the number that the given number has been mapped to if it is "Bad". In either cases they form a number of the "Good" set which costs them , altogether a maximum of $20$. Coupled with the worst-case-scenario of having to speak $2$ at first for giving out the group, maximum cost is , ahem , $24$.
20.11.2015 01:27
Here's a solution (getting 20) taking advantage of $250 < \binom{10}{5}$. Have $A$ and $B$ agree on an injection taking each number in $\{1,2,\ldots,250\}$ to a ten number sequence with five 1s and five 0s. If $A$'s number maps to the sequence with 1s at positions $a_1, a_2, \ldots, a_5$ (where $1 \leq a_i \leq 10$), then $A$ will call out the numbers $a_1, a_2 - a_1, a_3 - a_2, a_4 - a_3, a_5 - a_4$. These numbers sum to at most 10. $B$ does the same thing with his number. If the numbers do not yet sum to 20 after this, $A$ just says the remainder (both players will know that all the information is in the first five numbers). It is obvious that each player can recover the other's number from this. I get the feeling powers of 2 was an intentional red herring. I spent awhile trying and failing to get the "distance between 1s" idea to work for binary before deciding to prioritize a strategy where both players would have the same amount of numbers to call out.
20.11.2015 09:56
Wow. Thus using your idea, the bound can be made strict-er bringing it down to $16$. I had also thought of giving out the positions of $1$-s in the binary expansion , but couldn't think that we can do that through the "distance between 1s" . So now we can just go back to giving out the positions of $1$ in the binary representations, following the method you gave. There can be atmost $7$ $1$-s , though this doesn't matter , we just write all the numbers using $8$ digits and thus maximum that each number can cost is $8$. So in total we can be done with $16$ .
20.11.2015 18:46
Actually, I don't know if the bound can be brought lower at all. The trouble with doing the same idea with binary is that if one person gets 10000000 and the other gets 10111111 (128 and 191), the first person starts by saying 8, then the next person says 1 with the intent of saying five more 1s and a 2, and now the first person is stuck naming positive integers and pointlessly driving up the sum while the second person finishes. You end up with 22 in this case. I couldn't figure out how to improve it.
21.11.2015 19:31
Yaa right. I was thinking of A nd B swparately nd there waz the bug
06.10.2017 19:37
also here
26.12.2018 00:29
And here.