exam: USAMO

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_5f0e796e43a11586ccbfg-03.jpg?height=892&width=995&top_left_y=999&top_left_x=536) 【 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_5f0e796e43a11586ccbfg-03.jpg?height=892&width=995&top_left_y=999&top_left_x=536) ## ब 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_5f0e796e43a11586ccbfg-03.jpg?height=892&width=995&top_left_y=999&top_left_x=536) ब 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.  $$ \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_5f0e796e43a11586ccbfg-03.jpg?height=892&width=995&top_left_y=999&top_left_x=536) 【 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_5f0e796e43a11586ccbfg-03.jpg?height=892&width=995&top_left_y=999&top_left_x=536) \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: Solve over the positive real numbers the functional equation  $$ f(x y+f(x))=x f(y)+2 $$

solution: $  The answer is $f(x) \equiv x+1$, which is easily verified to be the only linear solution. We show conversely that $f$ is linear. Let $P(x, y)$ be the assertion. Claim $-f$ is weakly increasing.  Claim (Up to an error of $2, f$ is linear) - We have  $$ |f(x)-(K x+C)| \leq 2 $$  where $K:=\frac{2}{f(1)}$ and $C:=f(f(1))-2$ are constants.  $$ 2\left\lfloor\frac{x}{f(1)}\right\rfloor+C \leq f(x) \leq 2\left\lceil\frac{x}{f(1)}\right\rceil+C $$  which implies the result. Rewrite the previous claim to the simpler $f(x)=K x+O(1)$. Then for any $x$ and $y$, the above claim gives  $$ K(x y+K x+O(1))+O(1)=x f(y)+2 $$  which means that  $$ x \cdot\left(K y+K^{2}-f(y)\right)=O(1) . $$  If we fix $y$ and consider large $x$, we see this can only happen if $K y+K^{2}-f(y)=0$, i.e. $f$ is linear.


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 all possible values of $k(C)$ as a function of $n$.

solution: The answer is that  $$ 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.  We now proceed in two cases: ब The special squares have both odd coordinates. We 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. Thus all special squares have an outgoing edge except the empty cell. ![](https://cdn.mathpix.com/cropped/2024_11_19_5f0e796e43a11586ccbfg-08.jpg?height=612&width=609&top_left_y=1664&top_left_x=729)  Claim - Any undirected connected component of $G$ is acyclic unless the cycle contains the empty square inside it.   This can be proven directly by induction, but for theatrical effect, we use Pick's theorem. Mark the center of every chessboard cell on or inside the cycle to get a lattice. The dominoes of the cycle then enclose a polyominoe which actually consists of $2 \times 2$ squares, meaning its area is a multiple of 4. ![](https://cdn.mathpix.com/cropped/2024_11_19_5f0e796e43a11586ccbfg-09.jpg?height=466&width=466&top_left_y=458&top_left_x=795)  Hence $B / 2+I-1$ is a multiple of 4 , in the notation of Pick's theorem. As $B$ is twice the number of dominoes, and a parity argument on the special squares shows that number is even, it follows that $B$ is also a multiple of 4 (these correspond to blue and black in the figure above). This means $I$ is odd (the red dots in the figure above), as desired.  Let $T$ be the connected component containing the empty cell. By the claim, $T$ is acyclic, so it's a tree. Now, notice that all the arrows point along $T$ 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}$ in this case. Equality is achieved if $T$ is a spanning tree of $G$. One example of a way to achieve this is using the snake configuration below. ![](https://cdn.mathpix.com/cropped/2024_11_19_5f0e796e43a11586ccbfg-09.jpg?height=461&width=466&top_left_y=1711&top_left_x=795)  Remark. In Russia 1997/11.8 it's shown that as long as the missing square is a corner, we have $G=T$. The proof is given implicitly from our work here: when the empty cell is in a corner, it cannot be surrounded, ergo the resulting graph has no cycles at all. And since the overall graph has one fewer edge than vertex, it's a tree.  Conversely, suppose $T$ was not a spanning tree, i.e. $T \neq G$. Since in this odd-odd case, $G$ has one fewer edge than vertex, if $G$ is not a tree, then it must contain at least one cycle. That cycle encloses every special square of $T$. In particular, this means that $T$ can't contain any special squares from the outermost row or column of the $n \times n$ grid. In this situation, we therefore have $k(C) \leq\left(\frac{n-3}{2}\right)^{2}$.  【 The special squares have both even coordinates. We construct the analogous graph $G$ on the same special squares. However, in this case, some of the points may not have outgoing edges, because their domino may "point" outside the grid. ![](https://cdn.mathpix.com/cropped/2024_11_19_5f0e796e43a11586ccbfg-10.jpg?height=806&width=803&top_left_y=582&top_left_x=632)  As before, the connected component $T$ containing the empty square is a tree, and $k(C)$ is exactly the number of vertices of $T$. Thus to finish the problem we need to give, for each $k \in\left\{1,2, \ldots,\left(\frac{n-1}{2}\right)^{2}\right\}$, an example of a configuration where $G$ has exactly $k$ vertices.  The construction starts with a "snake" picture for $k=\left(\frac{n-1}{2}\right)^{2}$, then decreases $k$ by one by perturbing a suitable set of dominoes. Rather than write out the procedure in words, we show the sequence of nine pictures for $n=7$ (where $k=9,8, \ldots, 1$ ); the generalization to larger $n$ is straightforward. ![](https://cdn.mathpix.com/cropped/2024_11_19_5f0e796e43a11586ccbfg-11.jpg?height=1383&width=1380&top_left_y=241&top_left_x=339)


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: Let $n \geq 3$ be an integer. We say that an arrangement of the numbers $1,2, \ldots, n^{2}$ in an $n \times n$ table is row-valid if the numbers in each row can be permuted to form an arithmetic progression, and column-valid if the numbers in each column can be permuted to form an arithmetic progression. For what values of $n$ is it possible to transform any row-valid arrangement into a column-valid arrangement by permuting the numbers in each row?

solution: Answer: $n$ prime only.  So, look at the multiples of $p$ in a row-valid table; there is either 1 or $p$ per row. As there are $p$ such numbers total, there are two cases:  - If all the multiples of $p$ are in the same row, then the common difference in each row is a multiple of $p$. In fact, it must be exactly $p$ for size reasons. In other words, up to permutation the rows are just the $k(\bmod p)$ numbers in some order, and this is obviously column-valid because we can now permute such that the $k$ th column contains exactly $\{(k-1) p+1,(k-1) p+2, \ldots, k p\}$. - If all the multiples of $p$ are in different rows, then it follows each row contains every residue modulo $p$ exactly once. So we can permute to a column-valid arrangement by ensuring the $k$ th column contains all the $k(\bmod p)$ numbers.  【 Counterexample for $n$ composite (due to Anton Trygub). Let $p$ be any prime divisor of $n$. Construct the table as follows:  - Row 1 contains 1 through $n$. - Rows 2 through $p+1$ contain the numbers from $p+1$ to $n p+n$ partitioned into arithmetic progressions with common difference $p$. - The rest of the rows contain the remaining numbers in reading order.  For example, when $p=2$ and $n=10$, we get the following table: $\left[\begin{array}{cccccccccc}1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 \\ \mathbf{1 1} & 13 & 15 & 17 & 19 & 21 & 23 & 25 & 27 & 29 \\ 12 & 14 & 16 & 18 & 20 & 22 & 24 & 26 & 28 & 30 \\ 31 & 32 & 33 & 34 & 35 & 36 & 37 & 38 & 39 & 40 \\ 41 & 42 & 43 & 44 & 45 & 46 & 47 & 48 & 49 & 50 \\ 51 & 52 & 53 & 54 & 55 & 56 & 57 & 58 & 59 & 60 \\ 61 & 62 & 63 & 64 & 65 & 66 & 67 & 68 & 69 & 70 \\ 71 & 72 & 73 & 74 & 75 & 76 & 77 & 78 & 79 & 80 \\ 81 & 82 & 83 & 84 & 85 & 86 & 87 & 88 & 89 & 90 \\ 91 & 92 & 93 & 94 & 95 & 96 & 97 & 98 & 99 & 100\end{array}\right]$  We claim this works fine. Assume for contradiction the rows may be permuted to obtain a column-valid arrangement. Then the $n$ columns should be arithmetic progressions whose smallest element is in $[1, n]$ and whose largest element is in $\left[n^{2}-n+1, n^{2}\right]$. These two elements must be congruent modulo $n-1$, so in particular the column containing 2 must end with $n^{2}-n+2$.  Hence in that column, the common difference must in fact be exactly $n$. And yet $n+2$ and $2 n+2$ are in the same row, contradiction.


problem: Let $A B C$ be a triangle with incenter $I$ and excenters $I_{a}, I_{b}, I_{c}$ opposite $A, B$, and $C$, respectively. Given an arbitrary point $D$ on the circumcircle of $\triangle A B C$ that does not lie on any of the lines $I I_{a}, I_{b} I_{c}$, or $B C$, suppose the circumcircles of $\triangle D I I_{a}$ and $\triangle D I_{b} I_{c}$ intersect at two distinct points $D$ and $F$. If $E$ is the intersection of lines $D F$ and $B C$, prove that $\angle B A D=\angle E A C$.

solution: ![](https://cdn.mathpix.com/cropped/2024_11_19_5f0e796e43a11586ccbfg-15.jpg?height=920&width=763&top_left_y=896&top_left_x=658) \I Barycentric coordinates (Carl Schildkraut). With reference triangle $\triangle A B C$, set $D=(r: s: t)$.  Claim - The equations of $\left(D I I_{a}\right)$ and $\left(D I_{b} I_{c}\right)$ are, respectively,  $$ \begin{aligned} & 0=-a^{2} y z-b^{2} z x-c^{2} x y+(x+y+z) \cdot\left(b c x-\frac{b c r}{c s-b t}(c y-b z)\right) \\ & 0=-a^{2} y z-b^{2} z x-c^{2} x y+(x+y+z) \cdot\left(-b c x+\frac{b c r}{c s+b t}(c y+b z)\right) . \end{aligned} $$   By EGMO Lemma 7.24, the radical axis is then given by  $$ \overline{D F}: b c x-\frac{b c r}{c s-b t}(c y-b z)=-b c x+\frac{b c r}{c s+b t}(c y+b z) . $$  Now the point  $$ \left(0: \frac{b^{2}}{s}: \frac{c^{2}}{t}\right)=\left(0: b^{2} t: c^{2} s\right) $$  lies on line $D F$ by inspection, and is obviously on line $B C$, hence it coincides with $E$. This lies on the isogonal of $\overline{A D}$ (by EGMO Lemma 7.6), as needed. 『 Synthetic approach (Anant Mudgal). Focus on just $\left(D I I_{a}\right)$. Let $P$ be the second intersection of $\left(D I I_{a}\right)$ with $(A B C)$, and let $M$ be the midpoint of minor arc $\widehat{B C}$. Then by radical axis, lines $A M, D P$, and $B C$ are concurrent at a point $K$.  Let $E^{\prime}=\overline{P M} \cap \overline{B C}$. ![](https://cdn.mathpix.com/cropped/2024_11_19_5f0e796e43a11586ccbfg-16.jpg?height=864&width=901&top_left_y=776&top_left_x=583)  Claim - We have $\measuredangle B A D=\measuredangle E^{\prime} A C$.   $$ \measuredangle K A E^{\prime}=\measuredangle K P E^{\prime}=\measuredangle D P M=\measuredangle D A M $$  Claim - The power of point $E^{\prime}$ with respect to $\left(D I I_{a}\right)$ is $2 E^{\prime} B \cdot E^{\prime} C$.   $$ \measuredangle X I_{a} I=\measuredangle I_{a} I E^{\prime}=\measuredangle M I E^{\prime}=\measuredangle M P I=\measuredangle X P I $$  Hence $X$ lies on $\left(D I I_{a}\right)$, and $E^{\prime} X \cdot E^{\prime} P=2 E^{\prime} M \cdot E^{\prime} P=2 E^{\prime} B \cdot E^{\prime} C$. Repeat the argument on $\left(D I_{b} I_{c}\right)$; the same point $E^{\prime}$ (because of the first claim) then has power $2 E^{\prime} B \cdot E^{\prime} C$ with respect to $\left(D I_{b} I_{c}\right)$. Hence $E^{\prime}$ lies on the radical axis of $\left(D I I_{a}\right)$ and $\left(D I_{b} I_{c}\right)$, ergo $E^{\prime}=E$. The first claim then solves the problem.