exam: USAJMO

problem: Find all triples of positive integers $(x, y, z)$ satisfying  $$ 2(x+y+z+2 x y z)^{2}=(2 x y+2 y z+2 z x+1)^{2}+2023 $$

solution: Answer: $(3,3,2)$ and permutations. Claim - The identity  $$ 2(x+y+z+2 x y z)^{2}-(2 x y+2 y z+2 z x+1)^{2}=\left(2 x^{2}-1\right)\left(2 y^{2}-1\right)\left(2 z^{2}-1\right) $$  is true.   $$ \operatorname{Norm}(a+b \sqrt{2})=a^{2}-2 b^{2} $$  which is multiplicative, meaning  $$ \operatorname{Norm}(u \cdot v)=\operatorname{Norm}(u) \cdot \operatorname{Norm}(v) $$  This means that for any rational numbers $x, y, z$, we should have  $$ \begin{aligned} & \operatorname{Norm}((1+\sqrt{2} x)(1+\sqrt{2} y)(1+\sqrt{2} z)) \\ = & \operatorname{Norm}(1+\sqrt{2} x) \cdot \operatorname{Norm}(1+\sqrt{2} y) \cdot \operatorname{Norm}(1+\sqrt{2} z) \end{aligned} $$  But $(1+\sqrt{2} x)(1+\sqrt{2} y)(1+\sqrt{2} z)=(2 x y+2 y z+2 z x+1)+(x+y+z+2 x y z) \sqrt{2}$ so the above equation is the negative of the desired identity.  We are thus reduced to find positive integers $x, y, z$ satisfying  $$ \left(2 x^{2}-1\right)\left(2 y^{2}-1\right)\left(2 z^{2}-1\right)=2023=7 \cdot 17^{2} $$  Each of the factors is a positive integer greater than 1 . The only divisors of 2023 of the form $2 t^{2}-1$ are $1,7,17$. This gives the answers claimed.


problem: In an acute triangle $A B C$, let $M$ be the midpoint of $\overline{B C}$. Let $P$ be the foot of the perpendicular from $C$ to $A M$. Suppose that the circumcircle of triangle $A B P$ intersects line $B C$ at two distinct points $B$ and $Q$. Let $N$ be the midpoint of $\overline{A Q}$. Prove that $N B=N C$.

solution: ![](https://cdn.mathpix.com/cropped/2024_11_19_9c5e556ae0970c152728g-04.jpg?height=892&width=1003&top_left_y=913&top_left_x=532) 【 Most common synthetic approach. The solution hinges on the following claim: Claim - $Q$ coincides with the reflection of $D$ across $M$.  $$ M B \cdot M Q=M A \cdot M P=M C \cdot M D . $$  Since $M B=M C$, the claim follows. It follows that $\overline{M N} \| \overline{A D}$, as $M$ and $N$ are respectively the midpoints of $\overline{A Q}$ and $\overline{D Q}$. Thus $\overline{M N} \perp \overline{B C}$, and so $N$ lies on the perpendicular bisector of $\overline{B C}$, as needed.  Remark (David Lin). One can prove the main claim without power of a point as well, as follows: Let $R$ be the foot from $B$ to $\overline{A M}$, so $B R C P$ is a parallelogram. Note that $A B D R$ is cyclic, and hence  $$ \measuredangle D R M=\measuredangle D B A=Q B A=\measuredangle Q P A=\measuredangle Q P M $$  Thus, $\overline{D R} \| \overline{P Q}$, so $D R Q P$ is also a parallelogram.


solution: ![](https://cdn.mathpix.com/cropped/2024_11_19_9c5e556ae0970c152728g-04.jpg?height=892&width=1003&top_left_y=913&top_left_x=532) ## \ Synthetic approach with no additional points at all.  Claim - $\triangle B P C \sim \triangle A N M$ (oppositely oriented).   $$ \frac{B M}{B P}=\frac{A M}{A Q} \Longrightarrow \frac{2 B M}{B P}=\frac{A M}{A Q / 2} \Longrightarrow \frac{B C}{B P}=\frac{A M}{A N} $$  implying the similarity (since $\measuredangle M A Q=\measuredangle B P M$ ). This similarity gives us the equality of directed angles  $$ \measuredangle(B C, M N)=-\measuredangle(P C, A M)=90^{\circ} $$  as desired.


solution: ![](https://cdn.mathpix.com/cropped/2024_11_19_9c5e556ae0970c152728g-04.jpg?height=892&width=1003&top_left_y=913&top_left_x=532) \ Synthetic approach using only the point $R$. Again let $R$ be the foot from $B$ to $\overline{A M}$, so $B R C P$ is a parallelogram.  Claim - $A R Q C$ is cyclic; equivalently, $\triangle M A Q \sim \triangle M C R$.  Note that in $\triangle M C R$, the $M$-median is parallel to $\overline{C P}$ and hence perpendicular to $\overline{R M}$. The same should be true in $\triangle M A Q$ by the similarity, so $\overline{M N} \perp \overline{M Q}$ as needed.


solution: ![](https://cdn.mathpix.com/cropped/2024_11_19_9c5e556ae0970c152728g-04.jpg?height=892&width=1003&top_left_y=913&top_left_x=532) 【 Cartesian coordinates approach with power of a point. Suppose we set $B=(-1,0)$, $M=(0,0), C=(1,0)$, and $A=(a, b)$. One may compute:  $$ \begin{aligned} \overleftrightarrow{A M}: 0 & =b x-a y \Longleftrightarrow y=\frac{b}{a} x \\ \overleftrightarrow{C P}: 0 & =a(x-1)+b y \Longleftrightarrow y=-\frac{a}{b}(x-1)=-\frac{a}{b} x+\frac{a}{b} \\ P & =\left(\frac{a^{2}}{a^{2}+b^{2}}, \frac{a b}{a^{2}+b^{2}}\right) \end{aligned} $$  Now note that  $$ A M=\sqrt{a^{2}+b^{2}}, \quad P M=\frac{a}{\sqrt{a^{2}+b^{2}}} $$  together with power of a point  $$ A M \cdot P M=B M \cdot Q M $$  to immediately deduce that $Q=(a, 0)$. Hence $N=(0, b / 2)$ and we're done.


solution: ![](https://cdn.mathpix.com/cropped/2024_11_19_9c5e556ae0970c152728g-04.jpg?height=892&width=1003&top_left_y=913&top_left_x=532) 【 Cartesian coordinates approach without power of a point (outline). After computing $A$ and $P$ as above, one could also directly calculate  $$ \begin{aligned} & \text { Perpendicular bisector of } \overline{A B}: y=-\frac{a+1}{b} x+\frac{a^{2}+b^{2}-1}{2 b} \\ & \text { Perpendicular bisector of } \overline{P B}: y=-\left(\frac{2 a}{b}+\frac{b}{a}\right) x-\frac{b}{2 a} \\ & \text { Perpendicular bisector of } \overline{P A}: y=-\frac{a}{b} x+\frac{a+a^{2}+b^{2}}{2 b} \\ & \text { Circumcenter of } \triangle P A B=\left(-\frac{a+1}{2}, \frac{2 a^{2}+2 a+b^{2}}{2 b}\right) \end{aligned} $$  This is enough to extract the coordinates of $Q=(\bullet, 0)$, because $B=(-1,0)$ is given, and the $x$-coordinate of the circumcenter should be the average of the $x$-coordinates of $B$ and $Q$. In other words, $Q=(-a, 0)$. Hence, $N=\left(0, \frac{b}{2}\right)$, as needed.


solution: ![](https://cdn.mathpix.com/cropped/2024_11_19_9c5e556ae0970c152728g-04.jpg?height=892&width=1003&top_left_y=913&top_left_x=532) \I III-advised barycentric approach (outline). Use reference triangle $A B C$. The $A$ median is parametrized by $(t: 1: 1)$ for $t \in \mathbb{R}$. So because of $\overline{C P} \perp \overline{A M}$, we are looking for $t$ such that  $$ \left(\frac{t \vec{A}+\vec{B}+\vec{C}}{t+2}-\vec{C}\right) \perp\left(A-\frac{\vec{B}+\vec{C}}{2}\right) $$  This is equivalent to  $$ (t \vec{A}+\vec{B}-(t+1) \vec{C}) \perp(2 \vec{A}-\vec{B}-\vec{C}) $$  By the perpendicularity formula for barycentric coordinates (EGMO 7.16), this is equivalent to  $$ \begin{aligned} 0 & =a^{2} t-b^{2} \cdot(3 t+2)+c^{2} \cdot(2-t) \\ & =\left(a^{2}-3 b^{2}-c^{2}\right) t-2\left(b^{2}-c^{2}\right) \\ \Longrightarrow t & =\frac{2\left(b^{2}-c^{2}\right)}{a^{2}-3 b^{2}-c^{2}} \end{aligned} $$  In other words,  $$ P=\left(2\left(b^{2}-c^{2}\right): a^{2}-3 b^{2}-c^{2}: a^{2}-3 b^{2}-c^{2}\right) . $$  A long calculation gives $a^{2} y_{P} z_{P}+b^{2} z_{P} x_{P}+c^{2} x_{P} y_{P}=\left(a^{2}-3 b^{2}-c^{2}\right)\left(a^{2}-b^{2}+c^{2}\right)\left(a^{2}-\right.$ $\left.2 b^{2}-2 c^{2}\right)$. Together with $x_{P}+y_{P}+z_{P}=2 a^{2}-4 b^{2}-4 c^{2}$, this makes the equation of $(A B P)$ as  $$ 0=-a^{2} y z-b^{2} z x-c^{2} x y+\frac{a^{2}-b^{2}+c^{2}}{2} z(x+y+z) $$  To solve for $Q$, set $x=0$ to get to get  $$ a^{2} y z=\frac{a^{2}-b^{2}+c^{2}}{2} z(y+z) \Longrightarrow \frac{y}{z}=\frac{a^{2}-b^{2}+c^{2}}{a^{2}+b^{2}-c^{2}} $$  In other words,  $$ Q=\left(0: a^{2}-b^{2}+c^{2}: a^{2}+b^{2}-c^{2}\right) $$  Taking the average with $A=(1,0,0)$ then gives  $$ N=\left(2 a^{2}: a^{2}-b^{2}+c^{2}: a^{2}+b^{2}-c^{2}\right) . $$  The equation for the perpendicular bisector of $\overline{B C}$ is given by (see EGMO 7.19)  $$ 0=a^{2}(z-y)+x\left(c^{2}-b^{2}\right) $$  which contains $N$, as needed.   $$ p=\frac{(a-m) \bar{c}+(\bar{a}-\bar{m}) c+\bar{a} m-a \bar{m}}{2(\bar{a}-\bar{m})}=\frac{a^{2} b-a^{2} c-a b^{2}-2 a b c-a c^{2}+b^{2} c+3 b c^{2}}{4 b c-2 a(b+c)} $$  Meanwhile, an extremely ugly calculation will eventually yield  $$ q=\frac{\frac{b c}{a}+b+c-a}{2} $$  SO  $$ n=\frac{a+q}{2}=\frac{a+b+c+\frac{b c}{a}}{4}=\frac{(a+b)(a+c)}{2 a} $$  There are a few ways to then verify $N B=N C$. The simplest seems to be to verify that  $$ \frac{n-\frac{b+c}{2}}{b-c}=\frac{a-b-c+\frac{b c}{a}}{4(b-c)}=\frac{(a-b)(a-c)}{2 a(b-c)} $$  is pure imaginary, which is clear.


problem: Consider an $n$-by- $n$ board of unit squares for some odd positive integer $n$. We say that a collection $C$ of identical dominoes is a maximal grid-aligned configuration on the board if $C$ consists of $\left(n^{2}-1\right) / 2$ dominoes where each domino covers exactly two neighboring squares and the dominoes don't overlap: $C$ then covers all but one square on the board. We are allowed to slide (but not rotate) a domino on the board to cover the uncovered square, resulting in a new maximal gridaligned configuration with another square uncovered. Let $k(C)$ be the number of distinct maximal grid-aligned configurations obtainable from $C$ by repeatedly sliding dominoes.  Find the maximum possible value of $k(C)$ as a function of $n$.

solution: The answer is that  $$ k(C) \leq\left(\frac{n+1}{2}\right)^{2} $$  Remark (Comparison with USAMO version). In the USAMO version of the problem, students instead are asked to find all possible values of $k(C)$. The answer is $k(C) \in$ $\left\{1,2, \ldots,\left(\frac{n-1}{2}\right)^{2}\right\} \cup\left\{\left(\frac{n+1}{2}\right)^{2}\right\}$.  Index the squares by coordinates $(x, y) \in\{1,2, \ldots, n\}^{2}$. We say a square is special if it is empty or it has the same parity in both coordinates as the empty square.  Construct a directed graph $G=G(C)$ whose vertices are special squares as follows: for each domino on a special square $s$, we draw a directed edge from $s$ to the special square that domino points to, if any. (If the special square has both odd coordinates, all special squares have an outgoing edge except the empty cell. In the even-even case, some arrows may point "off the board" and not be drawn.) ![](https://cdn.mathpix.com/cropped/2024_11_19_9c5e556ae0970c152728g-08.jpg?height=612&width=615&top_left_y=1816&top_left_x=726)  Now focus specifically on the weakly connected component $T$ of $G$ (i.e. the connected component of the undirected version of $G$ ) containing the empty square.  Claim - The graph $T$ has no cycles, even undirected. Hence, the undirected version of $T$ is tree.   Notice that all the arrows along $T$ point towards the empty cell, and moving a domino corresponds to flipping an arrow. Therefore:  Claim - $k(C)$ is exactly the number of vertices of $T$.   This implies that $k(C) \leq\left(\frac{n+1}{2}\right)^{2}$, the total number of vertices of $G$ (this could only occur if the special squares are odd-odd, not even-even). Equality is achieved as long as $T$ is a spanning tree; one example of a way to achieve this is using the snake configuration below. ![](https://cdn.mathpix.com/cropped/2024_11_19_9c5e556ae0970c152728g-09.jpg?height=464&width=466&top_left_y=1270&top_left_x=795)


problem: Two players, Blake and Ruby, play the following game on an infinite grid of unit squares, all initially colored white. The players take turns starting with Blake. On Blake's turn, Blake selects one white unit square and colors it blue. On Ruby's turn, Ruby selects two white unit squares and colors them red. The players alternate until Blake decides to end the game. At this point, Blake gets a score, given by the number of unit squares in the largest (in terms of area) simple polygon containing only blue unit squares.  What is the largest score Blake can guarantee?

solution: The answer is 4 squares.  ब Algorithm for Blake to obtain at least 4 squares. We simply let Blake start with any cell blue, then always draw adjacent to a previously drawn blue cell until this is no longer possible.  Note that for $n \leq 3$, any connected region of $n$ blue cells has more than $2 n$ liberties (non-blue cells adjacent to a blue cell); up to translation, rotation, and reflection, all the cases are shown in the figure below with liberties being denoted by circles. ![](https://cdn.mathpix.com/cropped/2024_11_19_9c5e556ae0970c152728g-10.jpg?height=655&width=818&top_left_y=1481&top_left_x=622)  So as long as $n \leq 3$, it's impossible that Ruby has blocked every liberty, since Ruby has colored exactly $2 n$ cells red. Therefore, this algorithm could only terminate once $n \geq 4$. \ Algorithm for Ruby to prevent more than 4 squares. Divide the entire grid into $2 \times 2$ squares, which we call windows. Any time Blake makes a move in a cell $c$, let Ruby mark any orthogonal neighbors of $c$ in its window; then place any leftover red cells arbitrarily.  Claim - It's impossible for any window to contain two orthogonally adjacent blue cells.   We show this gives the upper bound of 4 squares. Consider a blue cell $w$, and assume WLOG it is in the southeast corner of a window. Label squares $x, y, z$ as shown below. ![](https://cdn.mathpix.com/cropped/2024_11_19_9c5e556ae0970c152728g-11.jpg?height=506&width=510&top_left_y=661&top_left_x=773)  Note that by construction, the blue polygon cannot leave the square $\{w, x, y, z\}$, since whenever one of these four cells is blue, its neighbours outside that square are guaranteed to be red. This implies the bound.  Remark (For Tetris fans). Here is a comedic alternative finish after proving the claim. Consider the possible tetrominoes (using the notation of https://en.wikipedia.org/wiki/ Tetromino\#One-sided_tetrominoes). We claim that only the square (0) is obtainable; as  - T, J/L, and I all have three cells in a row, so they can't occur; - S and Z can't occur either; if the bottom row of an S crossed a window boundary, then the top row doesn't for example.  Moreover, the only way a blue 0 could be obtained is if each of it cells is in a different window. In that case, no additional blue cells can be added: it's fully surrounded by red.  Finally, for any $k$-omino with $k>4$, one can find a tetromino as a subset. (Proof: take the orthogonal adjacency graph of the $k$-omino, choose a spanning tree, and delete leaves from the tree until there are only four vertices left.)   As written, this strategy does not work. The reason is that one can end up in the following situation (imagine the blue square in the center is played first; moves for Ruby are drawn as red X's): ![](https://cdn.mathpix.com/cropped/2024_11_19_9c5e556ae0970c152728g-12.jpg?height=410&width=429&top_left_y=246&top_left_x=822)  In order to prevent Blake from winning, Ruby would need to begin playing moves not adjacent to Blake's most recent move.   It is even more difficult to come up with a solution involving playing on just "some" two neighbors of recently added blue squares without the "prefer north and west" idea.


problem: Positive integers $a$ and $N$ are fixed, and $N$ positive integers are written on a blackboard. Alice and Bob play the following game. On Alice's turn, she must replace some integer $n$ on the board with $n+a$, and on Bob's turn he must replace some even integer $n$ on the board with $n / 2$. Alice goes first and they alternate turns. If on his turn Bob has no valid moves, the game ends.  After analyzing the $N$ integers on the board, Bob realizes that, regardless of what moves Alice makes, he will be able to force the game to end eventually. Show that, in fact, for this value of $a$ and these $N$ integers on the board, the game is guaranteed to end regardless of Alice's or Bob's moves.

solution: For $N=1$, there is nothing to prove. We address $N \geq 2$ only henceforth. Let $S$ denote the numbers on the board.  Claim - When $N \geq 2$, if $\nu_{2}(x)<\nu_{2}(a)$ for all $x \in S$, the game must terminate no matter what either player does.   Hence, in fact the game will always terminate in exactly $\sum_{x \in S} \nu_{2}(x)$ moves in this case, regardless of what either player does.  Claim - When $N \geq 2$, if there exists a number $x$ on the board such that $\nu_{2}(x) \geq$ $\nu_{2}(a)$, then Alice can cause the game to go on forever.   - Operate on the first entry if $\nu_{2}(x)=\nu_{2}(a)$ (the new entry thus has $\nu_{2}(x+a)>\nu_{2}(a)$ ); - Operate on any other entry besides the first one, otherwise.  A double induction then shows that  - Just before each of Bob's turns, $\nu_{2}(x)>\nu_{2}(a)$ always holds; and - After each of Bob's turns, $\nu_{2}(x) \geq \nu_{2}(a)$ always holds.  In particular Bob will never run out of legal moves, since halving $x$ is always legal.


problem: Isosceles triangle $A B C$, with $A B=A C$, is inscribed in circle $\omega$. Let $D$ be an arbitrary point inside $B C$ such that $B D \neq D C$. Ray $A D$ intersects $\omega$ again at $E$ (other than $A$ ). Point $F$ (other than $E$ ) is chosen on $\omega$ such that $\angle D F E=90^{\circ}$. Line $F E$ intersects rays $A B$ and $A C$ at points $X$ and $Y$, respectively. Prove that $\angle X D E=\angle E D Y$.

solution: 【 Angle chasing solution. Note that $(B D A)$ and $(C D A)$ are congruent, since $B A=C A$ and $\angle B D A+\angle C D A=180^{\circ}$. So these two circles are reflections around line $E D$. Moreover, $(D E F)$ is obviously also symmetric around line $E D$. ![](https://cdn.mathpix.com/cropped/2024_11_19_9c5e556ae0970c152728g-14.jpg?height=812&width=1009&top_left_y=1182&top_left_x=518)  Hence, the radical axis of $(B D A)$ and $(D E F)$, and the radical axis of $(C D A)$ and $(D E F)$, should be symmetric about line $D E$. But these radical axii are exactly lines $X D$ and $Y D$, so we're done.  Remark (Motivation). The main idea is that you can replace $D X$ and $D Y$ with the radical axii, letting $X^{\prime}$ and $Y^{\prime}$ be the second intersections of the blue circles. Then for the problem to be true, you'd need $X^{\prime}$ and $Y^{\prime}$ to be reflections. That's equivalent to $(B D A)$ and $(C D A)$ being congruent; you check it and it's indeed true.


solution: 【 Harmonic solution (mine). Let $T$ be the point on line $\overline{X F E Y}$ such that $\angle E D T=90^{\circ}$, and let $\overline{A T}$ meet $\omega$ again at $K$. Then  $$ T D^{2}=T F \cdot T E=T K \cdot T A \Longrightarrow \angle D K T=90^{\circ} $$  so line $D K$ passes through the antipode $M$ of $A$. ![](https://cdn.mathpix.com/cropped/2024_11_19_9c5e556ae0970c152728g-15.jpg?height=940&width=1394&top_left_y=315&top_left_x=334)  Thus,  $$ -1=(A M ; C B)_{\omega} \stackrel{D}{=}(E K ; B C)_{\omega} \stackrel{A}{=}(T E ; X Y) $$  and since $\angle E D T=90^{\circ}$ we're done. Remark (Motivation). The idea is to kill the points $X$ and $Y$ by reinterpreting the desired condition as $(T D ; X Y)=-1$ and then projecting through $A$ onto $\omega$. This eliminates points $X$ and $Y$ altogether and reduces the problem to showing that $\overline{T A}$ passes through the harmonic conjugate of $E$ with respect to $B C$ on $\omega$.  The labels on the diagram are slightly misleading in that $\triangle E B C$ should probably be thought of as the "reference" triangle.


solution: 【 Pascal solution (Zuming Feng). Extend ray $F D$ to the antipode $T$ of $E$ on $\omega$. Then,  - By Pascal's theorem on $E F T A B C$, the points $X, D$, and $P:=\overline{E C} \cap \overline{A T}$ are collinear. - Similarly by Pascal's theorem on $E F T A C B$, the points the points $Y, D$, and $Q:=\overline{E B} \cap \overline{A T}$ are collinear. ![](https://cdn.mathpix.com/cropped/2024_11_19_9c5e556ae0970c152728g-16.jpg?height=740&width=1406&top_left_y=244&top_left_x=328)  Now it suffices to prove $\overline{E D}$ bisects $\angle Q D P$. However, $\overline{E D}$ is the angle bisector of $\angle Q E P=\angle B E C$, but also $\overline{E A} \perp \overline{Q P}$. Thus triangle $Q E P$ is isosceles with $Q E=P E$, and $\overline{E A}$ cuts it in half. Since $D$ is on $\overline{E A}$, the result follows now.