olympiads-ref / USAMO /md /en-USAMO-2016-notes.md
beichen0426's picture
Duplicate from AI-MO/olympiads-ref
63c5bce verified
|
Raw
History Blame Contribute Delete
22.2 kB

USAMO 2016 Solution Notes

Evan Chen《陳誼廷》

15 April 2024

This is a compilation of solutions for the 2016 USAMO. The ideas of the solution are a mix of my own work, the solutions provided by the competition organizers, and solutions found by the community. However, all the writing is maintained by me.

These notes will tend to be a bit more advanced and terse than the "official" solutions from the organizers. In particular, if a theorem or technique is not known to beginners but is still considered "standard", then I often prefer to use this theory anyways, rather than try to work around or conceal it. For example, in geometry problems I typically use directed angles without further comment, rather than awkwardly work around configuration issues. Similarly, sentences like "let $\mathbb{R}$ denote the set of real numbers" are typically omitted entirely.

Corrections and comments are welcome!

Contents

0 Problems ..... 2 1 Solutions to Day 1 ..... 3 1.1 USAMO 2016/1, proposed by Iurie Boreico ..... 3 1.2 USAMO 2016/2, proposed by Kiran Kedlaya ..... 5 1.3 USAMO 2016/3, proposed by Evan Chen, Telv Cohl ..... 6 2 Solutions to Day 2 ..... 9 2.1 USAMO 2016/4, proposed by Titu Andreescu ..... 9 2.2 USAMO 2016/5, proposed by Ivan Borsenco ..... 11 2.3 USAMO 2016/6, proposed by Gabriel Carroll ..... 13

§0 Problems

  1. Let $X_{1}, X_{2}, \ldots, X_{100}$ be a sequence of mutually distinct nonempty subsets of a set $S$. Any two sets $X_{i}$ and $X_{i+1}$ are disjoint and their union is not the whole set $S$, that is, $X_{i} \cap X_{i+1}=\emptyset$ and $X_{i} \cup X_{i+1} \neq S$, for all $i \in{1, \ldots, 99}$. Find the smallest possible number of elements in $S$.
  2. Prove that for any positive integer $k$,

(k2)!j=0k1j!(j+k)! \left(k^{2}\right)!\cdot \prod_{j=0}^{k-1} \frac{j!}{(j+k)!}

is an integer. 3. Let $A B C$ be an acute triangle and let $I_{B}, I_{C}$, and $O$ denote its $B$-excenter, $C$ excenter, and circumcenter, respectively. Points $E$ and $Y$ are selected on $\overline{A C}$ such that $\angle A B Y=\angle C B Y$ and $\overline{B E} \perp \overline{A C}$. Similarly, points $F$ and $Z$ are selected on $\overline{A B}$ such that $\angle A C Z=\angle B C Z$ and $\overline{C F} \perp \overline{A B}$. Lines $I_{B} F$ and $I_{C} E$ meet at $P$. Prove that $\overline{P O}$ and $\overline{Y Z}$ are perpendicular. 4. Find all functions $f: \mathbb{R} \rightarrow \mathbb{R}$ such that for all real numbers $x$ and $y$,

(f(x)+xy)f(x3y)+(f(y)+xy)f(3xy)=(f(x+y))2 (f(x)+x y) \cdot f(x-3 y)+(f(y)+x y) \cdot f(3 x-y)=(f(x+y))^{2}

  1. An equilateral pentagon $A M N P Q$ is inscribed in triangle $A B C$ such that $M \in \overline{A B}$, $Q \in \overline{A C}$, and $N, P \in \overline{B C}$. Let $S$ be the intersection of $\overline{M N}$ and $\overline{P Q}$. Denote by $\ell$ the angle bisector of $\angle M S Q$. Prove that $\overline{O I}$ is parallel to $\ell$, where $O$ is the circumcenter of triangle $A B C$, and $I$ is the incenter of triangle $A B C$.
  2. Integers $n$ and $k$ are given, with $n \geq k \geq 2$. You play the following game against an evil wizard. The wizard has $2 n$ cards; for each $i=1, \ldots, n$, there are two cards labeled $i$. Initially, the wizard places all cards face down in a row, in unknown order. You may repeatedly make moves of the following form: you point to any $k$ of the cards. The wizard then turns those cards face up. If any two of the cards match, the game is over and you win. Otherwise, you must look away, while the wizard arbitrarily permutes the $k$ chosen cards and then turns them back face-down. Then, it is your turn again.

We say this game is winnable if there exist some positive integer $m$ and some strategy that is guaranteed to win in at most $m$ moves, no matter how the wizard responds. For which values of $n$ and $k$ is the game winnable?

§1 Solutions to Day 1

§1.1 USAMO 2016/1, proposed by lurie Boreico

Available online at https://aops.com/community/p6213589.

Problem statement

Let $X_{1}, X_{2}, \ldots, X_{100}$ be a sequence of mutually distinct nonempty subsets of a set $S$. Any two sets $X_{i}$ and $X_{i+1}$ are disjoint and their union is not the whole set $S$, that is, $X_{i} \cap X_{i+1}=\emptyset$ and $X_{i} \cup X_{i+1} \neq S$, for all $i \in{1, \ldots, 99}$. Find the smallest possible number of elements in $S$.

Solution with Danielle Wang: the answer is that $|S| \geq 8$. \ Proof that $|S| \geq 8$ is necessary. Since we must have $2^{|S|} \geq 100$, we must have $|S| \geq 7$.

To see that $|S|=8$ is the minimum possible size, consider a chain on the set $S=$ ${1,2, \ldots, 7}$ satisfying $X_{i} \cap X_{i+1}=\emptyset$ and $X_{i} \cup X_{i+1} \neq S$. Because of these requirements any subset of size 4 or more can only be neighbored by sets of size 2 or less, of which there are $\binom{7}{1}+\binom{7}{2}=28$ available. Thus, the chain can contain no more than 29 sets of size 4 or more and no more than 28 sets of size 2 or less. Finally, since there are only $\binom{7}{3}=35$ sets of size 3 available, the total number of sets in such a chain can be at most $29+28+35=92<100$, contradiction.

【 Construction. We will provide an inductive construction for a chain of subsets $X_{1}, X_{2}, \ldots, X_{2^{n-1}+1}$ of $S={1, \ldots, n}$ satisfying $X_{i} \cap X_{i+1}=\varnothing$ and $X_{i} \cup X_{i+1} \neq S$ for each $n \geq 4$.

For $S={1,2,3,4}$, the following chain of length $2^{3}+1=9$ will work:

34123412314213. \begin{array}{lllllllll} 34 & 1 & 23 & 4 & 12 & 3 & 14 & 2 & 13 . \end{array}

Now, given a chain of subsets of ${1,2, \ldots, n}$ the following procedure produces a chain of subsets of ${1,2, \ldots, n+1}$ :

  1. take the original chain, delete any element, and make two copies of this chain, which now has even length;
  2. glue the two copies together, joined by $\varnothing$ in between; and then
  3. insert the element $n+1$ into the sets in alternating positions of the chain starting with the first.

For example, the first iteration of this construction gives:

345 1 235 4 125 3 145 2 5
34 15 23 45 12 35 14 25

It can be easily checked that if the original chain satisfies the requirements, then so does the new chain, and if the original chain has length $2^{n-1}+1$, then the new chain has length $2^{n}+1$, as desired. This construction yields a chain of length 129 when $S={1,2, \ldots, 8}$.

Remark. Here is the construction for $n=8$ in its full glory.

345678 1 235678 4 125678 3 145678 2 5678
34 15678 23 45678 12 35678 14 678
345 1678 235 4678 125 3678 145 2678 5
34678 15 23678 45 12678 35 78
3456 178 2356 478 1256 378 1456 278 56
3478 156 2378 456 1278 356 1478 6
34578 16 23578 46 12578 36 14578 26 578
346 1578 236 4578 126 8
34567 18 23567 48 12567 38 14567 28 567
348 1567 238 4567 128 3567 148 67
3458 167 2358 467 1258 367 1458 267 58
3467 158 2367 458 1267 358 7
34568 17 23568 47 12568 37 14568 27 568
347 1568 237 4568 127 3568 147 68
3457 168 2357 468 1257 368 1457 268 57
3468 157 2368 457 1268

§1.2 USAMO 2016/2, proposed by Kiran Kedlaya

Available online at https://aops.com/community/p6213627.

Problem statement

Prove that for any positive integer $k$,

(k2)!j=0k1j!(j+k)! \left(k^{2}\right)!\cdot \prod_{j=0}^{k-1} \frac{j!}{(j+k)!}

is an integer.

We show the exponent of any given prime $p$ is nonnegative in the expression. Recall that the exponent of $p$ in $n!$ is equal to $\sum_{i \geq 1}\left\lfloor n / p^{i}\right\rfloor$. In light of this, it suffices to show that for any prime power $q$, we have

k2q+j=0k1jqj=0k1j+kq \left\lfloor\frac{k^{2}}{q}\right\rfloor+\sum_{j=0}^{k-1}\left\lfloor\frac{j}{q}\right\rfloor \geq \sum_{j=0}^{k-1}\left\lfloor\frac{j+k}{q}\right\rfloor

Since both sides are integers, we show

k2q+j=0k1jq>1+j=0k1j+kq. \left\lfloor\frac{k^{2}}{q}\right\rfloor+\sum_{j=0}^{k-1}\left\lfloor\frac{j}{q}\right\rfloor>-1+\sum_{j=0}^{k-1}\left\lfloor\frac{j+k}{q}\right\rfloor .

If we denote by ${x}$ the fractional part of $x$, then $\lfloor x\rfloor=x-{x}$ so it's equivalent to

{k2q}+j=0k1{jq}<1+j=0k1{j+kq}. \left\{\frac{k^{2}}{q}\right\}+\sum_{j=0}^{k-1}\left\{\frac{j}{q}\right\}<1+\sum_{j=0}^{k-1}\left\{\frac{j+k}{q}\right\} .

However, the sum of remainders when $0,1, \ldots, k-1$ are taken modulo $q$ is easily seen to be less than the sum of remainders when $k, k+1, \ldots, 2 k-1$ are taken modulo $q$. So

j=0k1{jq}j=0k1{j+kq} \sum_{j=0}^{k-1}\left\{\frac{j}{q}\right\} \leq \sum_{j=0}^{k-1}\left\{\frac{j+k}{q}\right\}

follows, and we are done upon noting $\left{k^{2} / q\right}<1$.

§1.3 USAMO 2016/3, proposed by Evan Chen, Telv Cohl

Available online at https://aops.com/community/p6213572.

Problem statement

Let $A B C$ be an acute triangle and let $I_{B}, I_{C}$, and $O$ denote its $B$-excenter, $C$ excenter, and circumcenter, respectively. Points $E$ and $Y$ are selected on $\overline{A C}$ such that $\angle A B Y=\angle C B Y$ and $\overline{B E} \perp \overline{A C}$. Similarly, points $F$ and $Z$ are selected on $\overline{A B}$ such that $\angle A C Z=\angle B C Z$ and $\overline{C F} \perp \overline{A B}$. Lines $I_{B} F$ and $I_{C} E$ meet at $P$. Prove that $\overline{P O}$ and $\overline{Y Z}$ are perpendicular.

We present two solutions. \ First solution. Let $I_{A}$ denote the $A$-excenter and $I$ the incenter. Then let $D$ denote the foot of the altitude from $A$. Suppose the $A$-excircle is tangent to $\overline{B C}, \overline{A B}, \overline{A C}$ at $A_{1}, B_{1}, C_{1}$ and let $A_{2}, B_{2}, C_{2}$ denote the reflections of $I_{A}$ across these points. Let $S$ denote the circumcenter of $\triangle I I_{B} I_{C}$.

We begin with the following observation: Claim - Points $D, I, A_{2}$ are collinear, as are points $E, I_{C}, C_{2}$ are collinear and points $F, I_{B}, B_{2}$ are collinear.

Proof. This basically follows from the "midpoints of altitudes" lemma. To see $D, I, A_{2}$ are collinear, recall first that $\overline{I A_{1}}$ passes through the midpoint $M$ of $\overline{A D}$.

Now since $\overline{A D} | \overline{I_{A} A_{2}}$, and $M$ and $A_{1}$ are the midpoints of $\overline{A D}$ and $\overline{I_{A} A_{2}}$, it follows from the collinearity of $A, I, I_{A}$ that $D, I, A_{2}$ are collinear as well.

The other two claims follow in a dual fashion. For example, using the homothety taking the $A$ to $C$-excircle, we find that $\overline{C_{1} I_{C}}$ bisects the altitude $\overline{B E}$, and since $I_{C}, B$, $I_{A}$ are collinear the same argument now gives $I_{C}, E, C_{2}$ are collinear. The fact that $I_{B}$, $F, B_{2}$ are collinear is symmetric.

Observe that $\overline{B_{2} C_{2}}\left|\overline{B_{1} C_{1}}\right| \overline{I_{B} I_{C}}$. Proceeding similarly on the other sides, we discover $\triangle I I_{B} I_{C}$ and $\triangle A_{2} B_{2} C_{2}$ are homothetic. Hence $P$ is the center of this homothety (in particular, $D, I, P, A_{2}$ are collinear). Moreover, $P$ lies on the line joining $I_{A}$ to $S$, which is the Euler line of $\triangle I I_{B} I_{C}$, so it passes through the nine-point center of $\triangle I I_{B} I_{C}$, which is $O$. Consequently, $P, O, I_{A}$ are collinear as well.

To finish, we need only prove that $\overline{O S} \perp \overline{Y Z}$. In fact, we claim that $\overline{Y Z}$ is the radical axis of the circumcircles of $\triangle A B C$ and $\triangle I I_{B} I_{C}$. Actually, $Y$ is the radical center of these two circumcircles and the circle with diameter $\overline{I I_{B}}$ (which passes through $A$ and $C)$. Analogously $Z$ is the radical center of the circumcircles and the circle with diameter $\overline{I I_{C}}$, and the proof is complete.

I Second solution (barycentric, outline, Colin Tang). we are going to use barycentric coordinates to show that the line through $O$ perpendicular to $\overline{Y Z}$ is concurrent with $\overline{I_{B} F}$ and $\overline{I_{C} E}$.

The displacement vector $\overrightarrow{Y Z}$ is proportional to $(a(b-c):-b(a+c): c(a+b))$, and so by strong perpendicularity criterion and doing a calculation gives the line

x(bc)bc(a+b+c)+y(a+c)ac(a+bc)+z(a+b)ab(a+bc)=0. x(b-c) b c(a+b+c)+y(a+c) a c(a+b-c)+z(a+b) a b(-a+b-c)=0 .

On the other hand, line $I_{C} E$ has equation

0=det[abcSC0SAxyz]=bSax+(cSCaSA)y+(bSC)z 0=\operatorname{det}\left[\begin{array}{ccc} a & b & -c \\ S_{C} & 0 & S_{A} \\ x & y & z \end{array}\right]=b S_{a} \cdot x+\left(-c S_{C}-a S_{A}\right) \cdot y+\left(-b S_{C}\right) \cdot z

and similarly for $I_{B} F$. Consequently, concurrence of these lines is equivalent to

det[bSAcSCaSAbSCcSAcSBaSAbSB(bc)bc(a+b+c)(a+c)ac(a+bc)(a+b)ab(a+bc)]=0 \operatorname{det}\left[\begin{array}{ccc} b S_{A} & -c S_{C}-a S_{A} & -b S_{C} \\ c S_{A} & -c S_{B} & -a S_{A}-b S_{B} \\ (b-c) b c(a+b+c) & (a+c) a c(a+b-c) & (a+b) a b(-a+b-c) \end{array}\right]=0

which is a computation. \ Authorship comments. I was intrigued by a Taiwan TST problem which implied that, in the configuration above, $\angle I_{B} D I_{C}$ was bisected by $\overline{D A}$. This motivated me to draw all three properties above where $I_{A}$ and $P$ were isogonal conjugates with respect to $D E F$. After playing around with this picture for a long time, I finally noticed that $O$ was on line $P I_{A}$. (So the original was to show that $I_{B} F, I_{C} E, D A_{2}$ concurrent). Eventually I finally noticed in the picture that $P I_{A}$ actually passed through the circumcenter of $A B C$ as well. This took me many hours to prove.

The final restatement (which follows quickly from $P, O, I_{A}$ collinear) was discovered by Telv Cohl when I showed him the problem.

§2 Solutions to Day 2

§2.1 USAMO 2016/4, proposed by Titu Andreescu

Available online at https://aops.com/community/p6220308.

Problem statement

Find all functions $f: \mathbb{R} \rightarrow \mathbb{R}$ such that for all real numbers $x$ and $y$,

(f(x)+xy)f(x3y)+(f(y)+xy)f(3xy)=(f(x+y))2 (f(x)+x y) \cdot f(x-3 y)+(f(y)+x y) \cdot f(3 x-y)=(f(x+y))^{2}

We claim that the only two functions satisfying the requirements are $f(x) \equiv 0$ and $f(x) \equiv x^{2}$. These work.

First, taking $x=y=0$ in the given yields $f(0)=0$, and then taking $x=0$ gives $f(y) f(-y)=f(y)^{2}$. So also $f(-y)^{2}=f(y) f(-y)$, from which we conclude $f$ is even. Then taking $x=-y$ gives

xR:f(x)=x2 or f(4x)=0() \forall x \in \mathbb{R}: \quad f(x)=x^{2} \quad \text { or } \quad f(4 x)=0 \quad(\star)

for all $x$. Remark. Note that an example of a function satisfying $(\boldsymbol{\star})$ is

f(x)={x2 if x<11cos(π2x1337) if 1x<40 if x4 f(x)= \begin{cases}x^{2} & \text { if }|x|<1 \\ 1-\cos \left(\frac{\pi}{2} \cdot x^{1337}\right) & \text { if } 1 \leq|x|<4 \\ 0 & \text { if }|x| \geq 4\end{cases}

So, yes, we are currently in a world of trouble, still. (This function is even continuous; I bring this up to emphasize that "continuity" is completely unrelated to the issue at hand.)

Now we claim

 Claim - f(z)=0f(2z)=0 \text { Claim - } f(z)=0 \Longleftrightarrow f(2 z)=0

Proof. Let $(x, y)=(3 t, t)$ in the given to get

(f(t)+3t2)f(8t)=f(4t)2 \left(f(t)+3 t^{2}\right) f(8 t)=f(4 t)^{2}

Now if $f(4 t) \neq 0$ (in particular, $t \neq 0$ ), then $f(8 t) \neq 0$. Thus we have $(\boldsymbol{\phi})$ in the reverse direction.

Then $f(4 t) \neq 0 \stackrel{(\star)}{\Longrightarrow} f(t)=t^{2} \neq 0 \stackrel{(\boldsymbol{\bullet})}{\Longrightarrow} f(2 t) \neq 0$ implies the forwards direction, the last step being the reverse direction $(\boldsymbol{\phi})$.

By putting together $(\boldsymbol{\star})$ and $(\boldsymbol{\oplus})$ we finally get

xR:f(x)=x2 or f(x)=0 \forall x \in \mathbb{R}: \quad f(x)=x^{2} \quad \text { or } \quad f(x)=0

We are now ready to approach the main problem. Assume there's an $a \neq 0$ for which $f(a)=0$; we show that $f \equiv 0$.

Let $b \in \mathbb{R}$ be given. Since $f$ is even, we can assume without loss of generality that $a, b>0$. Also, note that $f(x) \geq 0$ for all $x$ by ( $\Omega$ ). By using ( $\boldsymbol{\uparrow}$ ) we can generate $c>b$ such that $f(c)=0$ by taking $c=2^{n} a$ for a large enough integer $n$. Now, select $x, y>0$ such that $x-3 y=b$ and $x+y=c$. That is,

(x,y)=(3c+b4,cb4). (x, y)=\left(\frac{3 c+b}{4}, \frac{c-b}{4}\right) .

Substitution into the original equation gives

0=(f(x)+xy)f(b)+(f(y)+xy)f(3xy)(f(x)+xy)f(b) 0=(f(x)+x y) f(b)+(f(y)+x y) f(3 x-y) \geq(f(x)+x y) f(b)

But since $f(b) \geq 0$, it follows $f(b)=0$, as desired.

§2.2 USAMO 2016/5, proposed by Ivan Borsenco

Available online at https://aops.com/community/p6220306.

Problem statement

An equilateral pentagon $A M N P Q$ is inscribed in triangle $A B C$ such that $M \in \overline{A B}$, $Q \in \overline{A C}$, and $N, P \in \overline{B C}$. Let $S$ be the intersection of $\overline{M N}$ and $\overline{P Q}$. Denote by $\ell$ the angle bisector of $\angle M S Q$. Prove that $\overline{O I}$ is parallel to $\ell$, where $O$ is the circumcenter of triangle $A B C$, and $I$ is the incenter of triangle $A B C$.

【 First solution (complex). In fact, we only need $A M=A Q=N P$ and $M N=Q P$. We use complex numbers with $A B C$ the unit circle, assuming WLOG that $A, B, C$ are labeled counterclockwise. Let $x, y, z$ be the complex numbers corresponding to the arc midpoints of $B C, C A, A B$, respectively; thus $x+y+z$ is the incenter of $\triangle A B C$. Finally, let $s>0$ be the side length of $A M=A Q=N P$.

Then, since $M A=s$ and $M A \perp O Z$, it follows that

ma=isz m-a=i \cdot s z

Similarly, $p-n=i \cdot s y$ and $a-q=i \cdot s x$, so summing these up gives

is(x+y+z)=(pq)+(mn)=(mn)(qp) i \cdot s(x+y+z)=(p-q)+(m-n)=(m-n)-(q-p)

Since $M N=P Q$, the argument of $(m-n)-(q-p)$ is along the external angle bisector of the angle formed, which is perpendicular to $\ell$. On the other hand, $x+y+z$ is oriented in the same direction as $O I$, as desired.

ๆI Second solution (trig, Danielle Wang). Let $\delta$ and $\epsilon$ denote $\angle M N B$ and $\angle C P Q$. Also, assume $A M N P Q$ has side length 1.

In what follows, assume $A B<A C$. First, we note that

BN=(c1)cosB+cosδCP=(b1)cosC+cosϵ, and a=1+BN+CP \begin{aligned} B N & =(c-1) \cos B+\cos \delta \\ C P & =(b-1) \cos C+\cos \epsilon, \text { and } \\ a & =1+B N+C P \end{aligned}

from which it follows that

cosδ+cosϵ=cosB+cosC1 \cos \delta+\cos \epsilon=\cos B+\cos C-1

Also, by the Law of Sines, we have $\frac{c-1}{\sin \delta}=\frac{1}{\sin B}$ and similarly on triangle $C P Q$, and from this we deduce

sinϵsinδ=sinBsinC \sin \epsilon-\sin \delta=\sin B-\sin C

The sum-to-product formulas

sinϵsinδ=2cos(ϵ+δ2)sin(ϵδ2)cosϵcosδ=2cos(ϵ+δ2)cos(ϵδ2) \begin{aligned} & \sin \epsilon-\sin \delta=2 \cos \left(\frac{\epsilon+\delta}{2}\right) \sin \left(\frac{\epsilon-\delta}{2}\right) \\ & \cos \epsilon-\cos \delta=2 \cos \left(\frac{\epsilon+\delta}{2}\right) \cos \left(\frac{\epsilon-\delta}{2}\right) \end{aligned}

give us

tan(ϵδ2)=sinϵsinδcosϵcosδ=sinBsinCcosB+cosC1 \tan \left(\frac{\epsilon-\delta}{2}\right)=\frac{\sin \epsilon-\sin \delta}{\cos \epsilon-\cos \delta}=\frac{\sin B-\sin C}{\cos B+\cos C-1}

Now note that $\ell$ makes an angle of $\frac{1}{2}(\pi+\epsilon-\delta)$ with line $B C$. Moreover, if line $O I$ intersects line $B C$ with angle $\varphi$ then

tanφ=rRcosA12(bc) \tan \varphi=\frac{r-R \cos A}{\frac{1}{2}(b-c)}

So in order to prove the result, we only need to check that

rRcosA12(bc)=cosB+cosC+1sinBsinC \frac{r-R \cos A}{\frac{1}{2}(b-c)}=\frac{\cos B+\cos C+1}{\sin B-\sin C}

Using the fact that $b=2 R \sin B, c=2 R \sin C$, this reduces to the fact that $r / R+1=$ $\cos A+\cos B+\cos C$, which is the so-called Carnot theorem.

§2.3 USAMO 2016/6, proposed by Gabriel Carroll

Available online at https://aops.com/community/p6220302.

Problem statement

Integers $n$ and $k$ are given, with $n \geq k \geq 2$. You play the following game against an evil wizard. The wizard has $2 n$ cards; for each $i=1, \ldots, n$, there are two cards labeled $i$. Initially, the wizard places all cards face down in a row, in unknown order. You may repeatedly make moves of the following form: you point to any $k$ of the cards. The wizard then turns those cards face up. If any two of the cards match, the game is over and you win. Otherwise, you must look away, while the wizard arbitrarily permutes the $k$ chosen cards and then turns them back face-down. Then, it is your turn again.

We say this game is winnable if there exist some positive integer $m$ and some strategy that is guaranteed to win in at most $m$ moves, no matter how the wizard responds. For which values of $n$ and $k$ is the game winnable?

The game is winnable if and only if $k<n$. First, suppose $2 \leq k<n$. Query the cards in positions ${1, \ldots, k}$, then ${2, \ldots, k+1}$, and so on, up to ${2 n-k+1,2 n}$. Indeed, by taking the difference of the $i$ th and $(i+1)$ st query, we can deduce the value of the $i$ th card, for $1 \leq i \leq 2 n-k$. (This is possible because the cards are flipped face up before they are re-shuffled, so even if two adjacent queries return the same set, one can still determine the $i$ th card. It is possible to solve the problem even without the flipped information, though.) If $k \leq n$, this is more than $n$ cards, so we can find a matching pair.

For $k=n$ we remark the following: at each turn after the first, assuming one has not won, there are $n$ cards representing each of the $n$ values exactly once, such that the player has no information about the order of those $n$ cards. We claim that consequently the player cannot guarantee victory. Indeed, let $S$ denote this set of $n$ cards, and $\bar{S}$ the other $n$ cards. The player will never win by picking only cards in $S$ or $\bar{S}$. Also, if the player selects some cards in $S$ and some cards in $\bar{S}$, then it is possible that the choice of cards in $S$ is exactly the complement of those selected from $\bar{S}$; the strategy cannot prevent this since the player has no information on $S$. This implies the result.