Solutions of APMO 2016
Problem 1. We say that a triangle $A B C$ is great if the following holds: for any point $D$ on the side $B C$, if $P$ and $Q$ are the feet of the perpendiculars from $D$ to the lines $A B$ and $A C$, respectively, then the reflection of $D$ in the line $P Q$ lies on the circumcircle of the triangle $A B C$.
Prove that triangle $A B C$ is great if and only if $\angle A=90^{\circ}$ and $A B=A C$. Solution. For every point $D$ on the side $B C$, let $D^{\prime}$ be the reflection of $D$ in the line $P Q$. We will first prove that if the triangle satisfies the condition then it is isosceles and right-angled at $A$.
Choose $D$ to be the point where the angle bisector from $A$ meets $B C$. Note that $P$ and $Q$ lie on the rays $A B$ and $A C$ respectively. Furthermore, $P$ and $Q$ are reflections of each other in the line $A D$, from which it follows that $P Q \perp A D$. Therefore, $D^{\prime}$ lies on the line $A D$ and we may deduce that either $D^{\prime}=A$ or $D^{\prime}$ is the second point of the angle bisector at $A$ and the circumcircle of $A B C$. However, since $A P D Q$ is a cyclic quadrilateral, the segment $P Q$ intersects the segment $A D$. Therefore, $D^{\prime}$ lies on the ray $D A$ and therefore $D^{\prime}=A$. By angle chasing we obtain
and since $D^{\prime}=A$ we also know $\angle P D^{\prime} Q=\angle B A C$. This implies that $\angle B A C=90^{\circ}$.
Now we choose $D$ to be the midpoint of $B C$. Since $\angle B A C=90^{\circ}$, we can deduce that $D Q P$ is the medial triangle of triangle $A B C$. Therefore, $P Q | B C$ from which it follows that $D D^{\prime} \perp B C$. But the distance from $D^{\prime}$ to $B C$ is equal to both the circumradius of triangle $A B C$ and to the distance from $A$ to $B C$. This can only happen if $A=D^{\prime}$. This implies that $A B C$ is isosceles and right-angled at $A$.

We will now prove that if $A B C$ is isosceles and right-angled at $A$ then the required property in the problem holds. Let $D$ be any point on side $B C$. Then $D^{\prime} P=D P$ and we also have $D P=B P$. Hence, $D^{\prime} P=B P$ and similarly $D^{\prime} Q=C Q$. Note that $A P D Q D^{\prime}$ is cyclic with diameter $P Q$. Therefore, $\angle A P D^{\prime}=\angle A Q D^{\prime}$, from which we obtain $\angle B P D^{\prime}=\angle C Q D^{\prime}$. So triangles $D^{\prime} P B$ and $D^{\prime} Q C$ are similar. It follows that $\angle P D^{\prime} Q=\angle P D^{\prime} C+\angle C D^{\prime} Q=$ $\angle P D^{\prime} C+\angle B D^{\prime} P=\angle B D^{\prime} C$ and $\frac{D^{\prime} P}{D^{\prime} Q}=\frac{D^{\prime} B}{D^{\prime} C}$. So we also obtain that triangles $D^{\prime} P Q$ and $D^{\prime} B C$ are similar. But since $D P Q$ and $D^{\prime} P Q$ are congruent, we may deduce that $\angle B D^{\prime} C=$ $\angle P D^{\prime} Q=\angle P D Q=90^{\circ}$. Therefore, $D^{\prime}$ lies on the circle with diameter $B C$, which is the circumcircle of triangle $A B C$.
Problem 2. A positive integer is called fancy if it can be expressed in the form
where $a_{1}, a_{2}, \ldots, a_{100}$ are non-negative integers that are not necessarily distinct. Find the smallest positive integer $n$ such that no multiple of $n$ is a fancy number. Answer: The answer is $n=2^{101}-1$. Solution. Let $k$ be any positive integer less than $2^{101}-1$. Then $k$ can be expressed in binary notation using at most 100 ones, and therefore there exists a positive integer $r$ and non-negative integers $a_{1}, a_{2}, \ldots, a_{r}$ such that $r \leq 100$ and $k=2^{a_{1}}+\cdots+2^{a_{r}}$. Notice that for a positive integer $s$ we have:
This shows that $k$ has a multiple that is a sum of $r+s$ powers of two. In particular, we may take $s=100-r \geq 0$, which shows that $k$ has a multiple that is a fancy number.
We will now prove that no multiple of $n=2^{101}-1$ is a fancy number. In fact we will prove a stronger statement, namely, that no multiple of $n$ can be expressed as the sum of at most 100 powers of 2 .
For the sake of contradiction, suppose that there exists a positive integer $c$ such that $c n$ is the sum of at most 100 powers of 2 . We may assume that $c$ is the smallest such integer. By repeatedly merging equal powers of two in the representation of $c n$ we may assume that
where $r \leq 100$ and $a_{1}<a_{2}<\ldots<a_{r}$ are distinct non-negative integers. Consider the following two cases:
- If $a_{r} \geq 101$, then $2^{a_{r}}-2^{a_{r}-101}=2^{a_{r}-101} n$. It follows that $2^{a_{1}}+2^{a_{2}}+\cdots+2^{a_{r}-1}+2^{a_{r}-101}$ would be a multiple of $n$ that is smaller than $c n$. This contradicts the minimality of $c$.
- If $a_{r} \leq 100$, then $\left{a_{1}, \ldots, a_{r}\right}$ is a proper subset of ${0,1, \ldots, 100}$. Then
This is also a contradiction. From these contradictions we conclude that it is impossible for cn to be the sum of at most 100 powers of 2 . In particular, no multiple of $n$ is a fancy number.
Problem 3. Let $A B$ and $A C$ be two distinct rays not lying on the same line, and let $\omega$ be a circle with center $O$ that is tangent to ray $A C$ at $E$ and ray $A B$ at $F$. Let $R$ be a point on segment $E F$. The line through $O$ parallel to $E F$ intersects line $A B$ at $P$. Let $N$ be the intersection of lines $P R$ and $A C$, and let $M$ be the intersection of line $A B$ and the line through $R$ parallel to $A C$. Prove that line $M N$ is tangent to $\omega$.
Solution. We present two approaches. The first one introduces an auxiliary point and studies similarities in the figure. The second one reduces the problem to computations involving a particular exradius of a triangle. The second approach has two variants.
Solution 1.
Let the line through $N$ tangent to $\omega$ at point $X \neq E$ intersect $A B$ at point $M^{\prime}$. It suffices to show that $M^{\prime} R | A C$, since this would yield $M^{\prime}=M$.
Suppose that the line $P O$ intersects $A C$ at $Q$ and the circumcircle of $A M^{\prime} O$ at $Y$, respectively. Then
By angle chasing we have $\angle E O Q=\angle F O P=90^{\circ}-\angle A O F=\angle M^{\prime} A O=\angle M^{\prime} Y P$ and by symmetry $\angle E Q O=\angle M^{\prime} P Y$. Therefore $\triangle M^{\prime} Y P \sim \triangle E O Q$.
On the other hand, we have
Since we know that $\angle A Y M^{\prime}$ and $\angle M^{\prime} O P$ are complementary this implies
Therefore, $\angle A Y M^{\prime}$ and $\angle N O E$ are congruent angles, and this means that $A$ and $N$ are corresponding points in the similarity of triangles $\triangle M^{\prime} Y P$ and $\triangle E O Q$. It follows that
We conclude that $M^{\prime} R | A C$, as desired.
Solution 2a.
As in Solution 1, we introduce point $M^{\prime}$ and reduce the problem to proving $\frac{P R}{R N}=\frac{P M^{\prime}}{M^{\prime} A}$. Menelaus theorem in triangle $A N P$ with transversal line $F R E$ yields
Since $A F=E A$, we have $\frac{F P}{N E}=\frac{P R}{R N}$, so that it suffices to prove
This is a computation regarding the triangle $A M^{\prime} N$ and its excircle opposite $A$. Indeed, setting $a=M^{\prime} N, b=N A, c=M^{\prime} A, s=\frac{a+b+c}{2}, x=s-a, y=s-b$ and $z=s-c$, then $A E=A F=s, M^{\prime} F=z$ and $N E=y$. From $\triangle O F P \sim \triangle A F O$ we have $F P=\frac{r_{a}^{2}}{s}$, where $r_{a}=O F$ is the exradius opposite $A$. Combining the following two standard formulas for the area of a triangle
we have $r_{a}^{2}=\frac{y z s}{x}$. Therefore, $F P=\frac{y z}{x}$. We can now write everything in (1) in terms of $x, y, z$. We conclude that we have to verify
which is easily seen to be true. Note: Antoher approach using Menalaus theorem is to construct the tangent from $M$ to create a point $N^{\prime}$ in $A C$ and then prove, using the theorem, that $P, R$ and $N^{\prime}$ are collinear. This also reduces to an algebraic identity.
Solution 2b.
As in Solution 1, we introduce point $M^{\prime}$. Let the line through $M^{\prime}$ and parallel to $A N$ intersect $E F$ at $R^{\prime}$. Let $P^{\prime}$ be the intersection of lines $N R^{\prime}$ and $A M$. It suffices to show that $P^{\prime} O | F E$, since this would yield $P=P^{\prime}$, and then $R=R^{\prime}$ and $M=M^{\prime}$. Hence it is enough to prove that
where $D$ is the intersection of $A O$ and $E F$. Once again, this reduces to a computation regarding the triangle $A M^{\prime} N$ and its excircle opposite $A$.
Let $u=P^{\prime} F$ and $x, y, z, s$ as in Solution 2a. Note that since $A E=A F$ and $M^{\prime} R^{\prime} | A E$, we have $M^{\prime} R^{\prime}=M^{\prime} F=z$. Since $M^{\prime} R^{\prime} | A N$, we have $\frac{P^{\prime} M^{\prime}}{P^{\prime} A}=\frac{M^{\prime} R^{\prime}}{N A}$, that is,
From this last equation we obtain $u=\frac{y z}{x}$. Hence $\frac{A F}{F P^{\prime}}=\frac{x s}{y z}$. Also, as in Solution 2a, we have $r_{a}^{2}=\frac{y z s}{x}$.
Finally, using similar triangles $O D F, F D A$ and $O F A$, and the above equalities, we have
as required.
Problem 4. The country Dreamland consists of 2016 cities. The airline Starways wants to establish some one-way flights between pairs of cities in such a way that each city has exactly one flight out of it. Find the smallest positive integer $k$ such that no matter how Starways establishes its flights, the cities can always be partitioned into $k$ groups so that from any city it is not possible to reach another city in the same group by using at most 28 flights.
Answer: 57
Solution. The flights established by Starways yield a directed graph $G$ on 2016 vertices in which each vertex has out-degree equal to 1.
We first show that we need at least 57 groups. For this, suppose that $G$ has a directed cycle of length 57. Then, for any two cities in the cycle, one is reachable from the other using at most 28 flights. So no two cities in the cycle can belong to the same group. Hence, we need at least 57 groups.
We will now show that 57 groups are enough. Consider another auxiliary directed graph $H$ in which the vertices are the cities of Dreamland and there is an arrow from city $u$ to city $v$ if $u$ can be reached from $v$ using at most 28 flights. Each city has out-degree at most 28 . We will be done if we can split the cities of $H$ in at most 57 groups such that there are no arrows between vertices of the same group. We prove the following stronger statement.
Lemma: Suppose we have a directed graph on $n \geq 1$ vertices such that each vertex has out-degree at most 28. Then the vertices can be partitioned into 57 groups in such a way that no vertices in the same group are connected by an arrow.
Proof: We apply induction. The result is clear for 1 vertex. Now suppose we have more than one vertex. Since the out-degree of each vertex is at most 28 , there is a vertex, say $v$, with in-degree at most 28. If we remove the vertex $v$ we obtain a graph with fewer vertices which still satifies the conditions, so by inductive hypothesis we may split it into at most 57 groups with no adjacent vertices in the same group. Since $v$ has in-degree and out-degree at most 28 , it has at most 56 neighboors in the original directed graph. Therefore, we may add $v$ back and place it in a group in which it has no neighbors. This completes the inductive step.
Problem 5. Find all functions $f: \mathbb{R}^{+} \rightarrow \mathbb{R}^{+}$such that
for all positive real numbers $x, y, z$. Answer: The only solution is $f(x)=x$ for all positive real numbers $x$. Solution. The identity function $f(x)=x$ clearly satisfies the functional equation. Now, let $f$ be a function satisfying the functional equation. Plugging $x=y=1$ into (3) we get $2 f(f(z)+1)=(z+1)(f(2))$ for all $z \in \mathbb{R}^{+}$. Hence, $f$ is not bounded above.
Lemma. Let $a, b, c$ be positive real numbers. If $c$ is greater than $1, a / b$ and $b / a$, then the system of linear equations
has a positive real solution $u, v$. Proof. The solution is
The numbers $u$ and $v$ are positive if the conditions on $c$ above are satisfied.
We will now prove that
Consider $a, b, c, d \in \mathbb{R}^{+}$such that $a+b=c+d$. Since $f$ is not bounded above, we can choose a positive number $e$ such that $f(e)$ is greater than $1, a / b, b / a, c / d$ and $d / c$. Using the above lemma, we can find $u, v, w, t \in \mathbb{R}^{+}$satisfying
Note that $u+v=w+t$ since $(u+v)(f(e)+1)=a+b$ and $(w+t)(f(e)+1)=c+d$. Plugging $x=u, y=v$ and $z=e$ into (3) yields $f(a)+f(b)=(e+1) f(u+v)$. Similarly, we have $f(c)+f(d)=(e+1) f(w+t)$. The claim follows immediately.
We then have
since by (3) and (4),
Now, let $a=f(1 / f(1))$. Plugging $x=1$ and $y=1 / f(1)$ into (5) yields $f(a)=1$. Hence $a=a f(a)$ and $f(a f(a))=f(a)=1$. Since $a f(a)=f(a f(a))$ by (5), we have $f(1)=a=1$. It follows from (5) that
Using (4) we have for all $x, y \in \mathbb{R}^{+}$that
Therefore
where $b=f(2)-2 f(1)=f(2)-2$. Using (5), (7) and (6), we get
This shows that $b=0$ and thus
In particular, $f$ is strictly increasing. We conclude as follows. Take any positive real number $x$. If $f(x)>x$, then $f(f(x))>$ $f(x)>x=f(f(x))$, a contradiction. Similarly, it is not possible that $f(x)<x$. This shows that $f(x)=x$ for all positive real numbers $x$.
