# Imo 2012

This is the wiki page for the mini-polymath4 project, which will seek a solution to a problem from the 2012 International Mathematical Olympiad, held in Argentina from July 10-11. The project will start at Thursday, July 12, 2012 at 22:00:00. It will be held primarily at the polymath blog (with a discussion thread at the "What's new" blog.)

## Rules

This project will follow the usual polymath rules. In particular:

• Everyone is welcome to participate, though people who have already seen an external solution to the problem should refrain from giving spoilers throughout the experiment.
• This is a team effort, not a race between individuals. Rather than work for extended periods of time in isolation from the rest of the project, the idea is to come up with short observations (or to carry an observation of another participant further) and then report back what one gets to the rest of the team. Partial results or even failures can be worth reporting.
• Participants are encouraged to update the wiki, or to summarise progress within threads, for the benefit of others. (In particular, linking between the wiki and specific comments on the blogs is highly encouraged.)

Planning:

Discussion:

Research:

## The question

Problem 3. The liar's guessing game is a game played between two players $A$ and $B$. The rules of the game depend on two positive integers $k$ and $n$ which are known to both players.
At the start of the game, $A$ chooses two integers $x$ and $N$ with $1 \leq x \leq N$. Player $A$ keeps $x$ secret, and truthfully tells $N$ to player $B$. Player $B$ now tries to obtain information about $x$ by asking player $A$ questions as follows. Each question consists of $B$ specifying an arbitrary set $S$ of positive integers (possibly one specified in a previous question), and asking $A$ whether $x$ belongs to $S$. Player $B$ may ask as many such questions as he wishes. After each question, player $A$ must immediately answer it with yes or no, but is allowed to lie as many times as she wishes; the only restriction is that, among any $k+1$ consecutive answers, at least one answer must be truthful.
After $B$ has asked as many questions as he wants, he must specify a set $X$ of at most $n$ positive integers. If $x$ belongs to $X$, then $B$ wins; otherwise, he loses. Prove that:
1. If $n \geq 2^k$, then $B$ can guarantee a win.
2. For all sufficiently large $k$, there exists an integer $n \geq 1.99^k$ such that $B$ cannot guarantee a win.

## Observations

• B can as well ask questions in “rounds” of k+1 questions. Then, each round is guaranteed to have at least 1 correct answer.
• for any partition of some set of numbers into 2^(k+1) parts, one round of questioning allows to rule out one of the parts.
• hence, while we can partition N into 2^(k+1) non-empty parts, we can rule out something each round of k+1 questions. We can go on ruling out numbers until no more than 2^(k+1) possible answers remain. After that, we need to somehow cut that in half.
• Since there is a possibility that B would win the game simply by guessing, there is no “always win” for A. Thus suggests that part 2 is somewhat harder than part 1. So it might be wise to completely focus on part 1 first.
• For part 1, it suffices to produce a winning strategy for $N=n+1$. In other words, player B can win for $N$ iff he can win $N=n+1$. $\Rightarrow$ is trivial. $\Leftarrow$ is as follows:
• Go by induction. Suppose $N \gt n+1$ and a winning strategy is known for all $n+1\leq N' \lt N$. Partition $N$ into $n+1$ nonempty sets $G_1,\cdots,G_{n+1}$. Then instead of asking "is it in $S\subset \{1,\cdots,n+1\}$", he asks "is it in $\cup_{s\in S} G_s$"? By using the winning strategy for $n+1$, we can throw out one of the $G_i$ and we now have a winning strategy by assumption.
• In fact, it suffices to assume that $n = 2^k, N = 2^k+1$.

## Partial results and examples

• For $k=0$ any version of binary search works.
• Focus on k=1, n=2?
• assume that $N$ is a power of 2. Say $N = 2^r$. Suppose that $r \geq k+1$. Think of numbers from $1$ to $N$ as vertices of $r$-dimensional Boolean cube. Then let $x_i\in\{0,1\}$ be the $i$-th coordinate of $x$. First, $B$ asks if $x_1 = 0$ (formally, B gives set $\{x:x_i = 0\}$), then he asks if $x_2 =0$, and so on. Finally, he asks if $x_{k+1} = 0$. He gets "yes" and "no" answers. In other words, he gets $b_1, \dots, b_{r+1}$ such that one of the statements "$x_i = b_i$" is true. Therefore, the first $r+1$ bits of $x$ cannot be equal $1-b_1,1-b_2, \dots, 1-b_{r+1}$. Thus B can exclude some values of $x$, and essentially reduces $N$. He proceeds until $N \leq n$. Then he outputs the remaining numbers.
• If $N$ is not a power of 2 but $N \gt 2^{k+1}$, $B$ groups all numbers in $2^{r+1}$ non-empty clusters. Then he labels each cluster, and all numbers in it, with a unique binary string of length $r+1$. He then asks if the first bit of the label of $x$ is 0; then he asks if the second bit is 0, and so on. After $B$ asks $r+1$ questions, he finds a label $L = (1 - b_1, ..., 1 - b_{r+1})$ such that $x$ is not labeled with $L$. Now he can exclude all number with label $L$ and iterate. This reduces $n$ to be at most $2^{k+1}-1$.

## Possible strategies

• Are there any results from Ramsey theory or related which might be useful for part one?
• Might be related to error-correcting codes?
• For the first part, proving for $n=2^k$ suffices. The first approach that comes to my mind is to induct on $k$.
• Since the solution is obvious if N is inside [1,n], then we could simply prove the case n+1 and the rest would follow by induction on N.

## Completed solutions for part 1

We can assume N = 2^k + 1, n = 2^k.

It means that x has at most k + 1 binary digits (k+1 digits only for n = 2^k)

$x = b_1 b_2\dots b_{k+1}$

Then we can keep asking if b_1 is 1, there are two possibilities,

1. k + 1 times we get the answer NO, then we exclude the number 10…0
1. There is a YES answer. Then we stop asking about b_1 and ask b_2 = 1, b_3 = 1 … b_{k+1} = 1. After we are done we can exclude the number for which all the last k + 1 asnwers would have been lies whose first digit is 0 (because of the YES answer).

## Completed solutions for part 2

Let $\epsilon \gt 0$ be a small parameter. Our strategy will allow Alice to deny Bob a certain win with $n+1 = \epsilon (2-\epsilon)^{k+1}$. By first choosing $\epsilon$ sufficiently small (say $10^{-3}$) and then $k$ sufficiently large, this is greater than $1.99^k$.

With $n=\epsilon (2-\epsilon)^{k+1}/2$, Alice starts by choosing a random integer from $1$ to $n+1$. Alice then never considers this value again. Since her answers will in no way depend what number she has chosen, they can reveal no information about that number, and therefore can provide Bob with no aid. What we must see is that Alice can do this while obeying the rule that she must tell the truth once every $k+1$ rounds.

We say that Alice "suggests $i$" if she gives an answer which would be truthful, if her number were $i$. We will describe a strategy so that Alice suggests every number at least once every $k+1$ turns. In particular, she suggests the true number once every $k+1$ rounds, and thus obeys the rules.

Let $a_r$ be the number of values which have not been suggested in the last $r$ rounds. Alice's strategy will be to always answer so as to minimize the quantity $\sum a_r (2-\epsilon)^r$. We'll call this quantity the score. At the beginning of the game, the score is $n+1$. Suppose that the score is $B$. The next question is asked about set $S$. Let $n_1 = |S|$ and $n_2 = (n+1) - |S|$. Let $B_1$ be the part of the score contributed by numbers in $S$, and let $B_2$ be the part contributed by numbers not in $S$. Then the new score is $\min((2- \epsilon) B_1 + n_2, (2- \epsilon) B_2 + n_1)$. Since $( (2- \epsilon) B_1 + n_2 ) + ((2- \epsilon) B_2 + n_1) = (2-\epsilon) B + n + 1$, Alice can definitely arrange for the new score to be $\leq ((2-\epsilon) B + n+1)/2 = (1-\epsilon/2) B + (n+1)/2$. So, inductively, the score never gets higher than $(n+1)/\epsilon$. In particular, there is no contribution from $r$ such that $(2-\epsilon)^r \gt (n+1)/\epsilon$. Since we chose $(k,n)$ such that $n+1 = \epsilon (2-\epsilon)^{k+1}$, that means that we have succeeded in suggesting every value at least once every $k+1$ steps, as desired.