Source: TSTST-2022-P5
Category: Operations and Strategies

Problem:
Let $A_1$, \dots, $A_{2022}$ be the vertices of a regular $2022$-gon in the plane.
Alice and Bob play a game.
Alice secretly chooses a line and colors all points in the plane
on one side of the line blue, and all points on the other side of the line red.
Points on the line are colored blue,
so every point in the plane is either red or blue.
(Bob cannot see the colors of the points.)

In each round, Bob chooses a point in the
plane (not necessarily among $A_1$, \dots, $A_{2022}$)
and Alice responds truthfully with the color of that point.
What is the smallest number $Q$ for which Bob has a strategy to
always determine the colors of points $A_1$, \dots, $A_{2022}$ in $Q$ rounds?

Solution:
The answer is $22$.

To prove the lower bound, note that there are $2022\cdot 2021 + 2 > 2^{21}$ possible colorings. If Bob makes fewer than $22$ queries, then he can only output at most $2^{21}$ possible colorings, which means he is wrong on some coloring.

Now we show Bob can always win in $22$ queries. A key observation is that the set of red points is convex, as is the set of blue points, so if a set of points is all the same color, then their convex hull is all the same color.

**Lemma 1.** Let $B_0, \dots, B_{k+1}$ be equally spaced points on a circular arc such that the colors of $B_0$ and $B_{k+1}$ differ and are known. Then it is possible to determine the colors of $B_1, \dots, B_k$ in $\lceil \log_2 k \rceil$ queries.

*Proof.* There exists some $0\le i\le k$ such that $B_0, \dots, B_i$ are the same color and $B_{i+1}, \dots, B_{k+1}$ are the same color. (If $i<j$ and $B_0$ and $B_j$ were red and $B_i$ and $B_{k+1}$ were blue, then the segment $B_0B_j$ is red and the segment $B_iB_{k+1}$ is blue, but they intersect). Therefore, we can binary search.

**Lemma 2.** Let $B_0, \dots, B_{k+1}$ be equally spaced points on a circular arc such that the colors of $B_0$, $B_{\lceil k/2 \rceil}$, and $B_{k+1}$ are all red and are known. Then at least one of the following holds: all of $B_1, \dots, B_{\lceil k/2 \rceil}$ are red or all of $B_{\lceil k/2 \rceil}, \dots, B_k$ are red. Furthermore, in one query we can determine which one of the cases holds.

*Proof.* The existence part holds for a similar reason to the previous lemma. To figure out which case holds, choose a point $P$ such that all of $B_0, \dots, B_{k+1}$ lie between the rays $PB_0$ and $PB_{\lceil k/2 \rceil}$, and such that $B_1, \dots, B_{\lceil k/2 \rceil-1}$ lie inside the triangle $PB_0B_{\lceil k/2 \rceil}$ and $B_{\lceil k/2 \rceil+1}, \dots, B_{k+1}$ lie outside (this point should always exist by looking around the intersection of the lines $B_0B_1$ and $B_{\lceil k/2 \rceil-1}B_{\lceil k/2 \rceil}$). Then if $P$ is red, all the inside points are red because they lie in the convex hull of the red points $P$, $B_0$, and $B_{\lceil k/2 \rceil}$. If $P$ is blue, then all the outside points are red: if $B_i$ were blue for $i > \lceil k/2 \rceil$, then the segment $PB_i$ is blue and intersects the segment $B_0B_{\lceil k/2 \rceil}$, which is red, a contradiction.

Now the strategy is as follows: Bob picks $A_1$. Without loss of generality, it is red. Now suppose Bob does not know the colors of $\le 2^k-1$ points $A_i, \dots, A_j$ with $j-i+1\le 2^k-1$ and knows the rest are red. I claim Bob can win in $2k-1$ queries. 

First, if $k=1$, there is one point and he wins by querying the point, so the base case holds. Assume $k>1$. Bob queries $A_{i+\lceil (j-i+1)/2 \rceil}$. 
- If it is blue, he finishes in $2 \lceil \log_2{\lceil (j-i+1)/2 \rceil} \rceil \le 2(k-1)$ queries by the first lemma, for a total of $2k-1$ queries. 
- If it is red, he can query one more point and learn some half of $A_i, \dots, A_j$ that are red by the second lemma, and then he has reduced the problem to the case with $\le 2^{k-1}-1$ points in two queries, at which point we induct.

Initially, Bob does not know the colors of $2021$ points. Since $2021 \le 2^{11}-1$, the condition holds for $k=11$. Bob uses $1$ query for $A_1$ and at most $2(11)-1 = 21$ queries for the remaining points, achieving a total of $22$ queries.

Answer: 22

Grading guidelines:
(Partial) 1. Established the information-theoretic lower bound: there are at least 2022·2021+2 distinct colorings induced by a line, hence Q≥22 since 2022·2021+2>2^21. 2. Proved the convexity/monotonicity property along the polygon: if two vertices on an arc are different colors then along that arc there is a unique “switch index” (equivalently, colors on that arc form one contiguous block of one color followed by the other), justifying a binary-search type approach. 3. Gave a correct subroutine (Lemma 1 type): with endpoints on an arc known to have different colors, determined all intermediate vertex colors in ⌈log2 k⌉ queries via binary search. (Almost) 1. Presented a full 22-query strategy based on the convex-hull argument and the two lemmas (binary search when a midpoint is blue; otherwise one extra query to certify a red half and induct), but left a localized gap in Lemma 2 (existence/construction of the auxiliary point P, or the segment-intersection contradiction). 2. Completed the recursive query count (2k−1 for ≤2^k−1 unknown consecutive vertices, then k=11 for 2021) but made a small off-by-one error in the induction setup or in the final accounting that does not affect the main method. 3. Solution is almost complete, but made minor mistakes which are not negligible.