![](https://cdn.mathpix.com/cropped/2024_11_22_a6fde8055c8f4889ad00g-1.jpg?height=313&width=1654&top_left_y=234&top_left_x=233) # Official Solutions for CMO 2023 P1. William is thinking of an integer between 1 and 50, inclusive. Victor can choose a positive integer $m$ and ask William: "does $m$ divide your number?", to which William must answer truthfully. Victor continues asking these questions until he determines William's number. What is the minimum number of questions that Victor needs to guarantee this? Solution. The minimum number is 15 questions. First, we show that 14 or fewer questions is not enough to guarantee success. Suppose Victor asks at most 14 questions, and William responds with "no" to each question unless $m=$ 1. Note that these responses are consistent with the secret number being 1. But since there are 15 primes less than 50 , some prime $p$ was never chosen as $m$. That means the responses are also consistent with the secret number being $p$. Therefore, Victor cannot determine the number for sure because 1 and $p$ are both possible options. Now we show that Victor can always determine the number with 15 questions. Let $N$ be William's secret number. First, Victor asks 4 questions, with $m=2,3,5,7$. We then case on William's responses. Case 1. William answers " $n o$ " to all four questions. $N$ can only be divisible by primes that are 11 or larger. This means $N$ cannot have multiple prime factors (otherwise $N \geq 11^{2}>50$ ), so either $N=1$ or $N$ is one of the 11 remaining primes less than 50 . Victor can then ask 11 questions with $m=11,13,17, \ldots, 47$, one for each of the remaining primes, to determine the value of $N$. Case 2. William answers "yes" to $m=2$, and " $n o$ " to $m=3,5,7$. There are only 11 possible values of $N$ that match these answers $(2,4,8,16,22,26,32$, 34, 38, 44, and 46). Victor can use his remaining 11 questions on each of these possibilities. Case 3. William answers "yes" to $m=3$, and " $n o$ " to $m=2,5,7$. There are 5 possible values of $N(3,9,27,33$, and 39). Similar to Case 2, Victor can ask about these 5 numbers to determine the value of $N$. Case 4. William answers "yes" to multiple questions, or one "yes" to $m=5$ or $m=7$. Let $k$ be the product of all $m$ 's that received a "yes" response. Since $N$ is divisible by each of these $m$ 's, $N$ must be divisible by $k$. Since $k \geq 5$, there are at most 10 multiples of $k$ between 1 and 50 . Victor can ask about each of these multiples of $k$ with his remaining questions. P2. There are 20 students in a high school class, and each student has exactly three close friends in the class. Five of the students have bought tickets to an upcoming concert. If any student sees that at least two of their close friends have bought tickets, then they will buy a ticket too. Is it possible that the entire class buys tickets to the concert? (Assume that friendship is mutual; if student $A$ is close friends with student $B$, then $B$ is close friends with $A$.) Solution 1. It is impossible for the whole class to buy tickets to the concert. If two students $A$ and $B$ are close friends, and $A$ has bought a ticket to the concert while $B$ has not, then $A$ is enticing $B$. We call this pair $(A, B)$ an enticement. In order for a student to change their mind and buy a ticket, they first be enticed by at least 2 of their 3 close friends. That means they can only entice at most 1 other friend. Therefore, the total number of enticements among the students decreases by 1 whenever a student changes their mind to buy a ticket. Initially, the maximum number of enticements is 15 (each of the initial 5 students with tickets has 3 friends to entice). Assume, for the sake of contradiction, that the entire class ends up buying tickets. After the first 14 people buy tickets, the number of enticements is at most $15-14=1$. This is not enough to convince the last person to buy a ticket, since they need 2 enticements. Therefore, it is impossible that the entire class buys tickets. Solution 2. We shall use the term friendship to denote an unordered pair of students who are close friends. Since each of the 20 students is part of exactly 3 friendships, there are exactly 30 friendships in the class. (We could also represent friendships as edges in an undirected graph whose vertices are the 20 students.) We say that a friendship is used if one of the students in that friendship buys a ticket after the original five buyers, and the other student already has a ticket at that time. Each time a ticket is purchased after the original five purchases, at least two friendships are used. Observe that no friendship gets used twice. If all 20 students buy tickets, then three friendships are used when the last student buys a ticket. This would imply that the number of used friendships is at least $14 \times 2+3=31$, which is more than the number of friendships. This contradiction proves that it is not possible that the entire class buys tickets. P3. An acute triangle is a triangle that has all angles less than $90^{\circ}$ ( $90^{\circ}$ is a Right Angle). Let $A B C$ be an acute triangle with altitudes $A D, B E$, and $C F$ meeting at $H$. The circle passing through points $D, E$, and $F$ meets $A D, B E$, and $C F$ again at $X, Y$, and $Z$ respectively. Prove the following inequality: $$ \frac{A H}{D X}+\frac{B H}{E Y}+\frac{C H}{F Z} \geq 3 $$ Solution. Let the circumcircle of $A B C$ meet the altitudes $A D, B E$, and $C F$ again at $I, J$, and $K$ respectively. ![](https://cdn.mathpix.com/cropped/2024_11_22_a6fde8055c8f4889ad00g-3.jpg?height=1050&width=1172&top_left_y=792&top_left_x=468) Lemma (9-point circle). $I, J, K$ are the reflections of $H$ across $B C, C A, A B$. Moreover, $D, E, F, X, Y, Z$ are the midpoints of $H I, H J, H K, H A, H B, H C$. Proof. Since $A B D E$ and $A B I C$ are cyclic, we see that $$ \angle E B D=\angle E A D=\angle C A I=\angle C B I . $$ Hence the lines $B I$ and $B H$ are reflections across $B C$. Similarly, $C H$ and $C I$ are reflections across $B C$, so $I$ is the reflection of $H$ across $B C$. The analogous claims for $J$ and $K$ follow. A $\times 2$ dilation from $H$ now establishes the result. From this lemma, we get $A I=2 X D, B J=2 E Y$, and $C K=2 F Z$. Hence it is equivalent to showing that $$ \frac{A H}{2 D X}+\frac{B H}{2 E Y}+\frac{C H}{2 F Z} \geq \frac{3}{2} $$ which is in turn equivalent to $$ \frac{A H}{A I}+\frac{B H}{B J}+\frac{C H}{C K} \geq \frac{3}{2} . $$ Let $a=J K, b=K I$ and $c=I J$. Again by the lemma we find $A H=A K=A J$, so by Ptolemy's theorem on $A K I J$, $$ A J \cdot K I+A K \cdot I J=A I \cdot J K $$ Substituting and rearranging, $$ \begin{aligned} A H \cdot b+A H \cdot c & =A I \cdot a \\ A H \cdot(b+c) & =A I \cdot a \\ \frac{A H}{A I} & =\frac{a}{b+c} . \end{aligned} $$ Similarly, $$ \frac{B H}{B J}=\frac{b}{c+a} \quad \text { and } \quad \frac{C H}{C K}=\frac{c}{a+b} $$ Plugging these back into $\left(^{*}\right)$, the desired inequality is now $$ \frac{a}{b+c}+\frac{b}{a+c}+\frac{c}{a+b} \geq \frac{3}{2} . $$ This is known as Nesbitt's Inequality, which has many proofs. Below is one such proof. Add 3 to both sides and rearrange: $$ \begin{aligned} \left(\frac{a}{b+c}+1\right)+\left(\frac{b}{c+a}+1\right)+\left(\frac{c}{a+b}+1\right) & \geq \frac{3}{2}+3 \\ \Longleftrightarrow \quad \frac{a+b+c}{b+c}+\frac{a+b+c}{c+a}+\frac{a+b+c}{a+b} & \geq \frac{9}{2} \\ \Longleftrightarrow \quad(a+b+c)\left(\frac{1}{b+c}+\frac{1}{c+a}+\frac{1}{a+b}\right) & \geq \frac{9}{2} \\ \Longleftrightarrow \quad & \frac{(b+c)+(c+a)+(a+b)}{3} \end{aligned} $$ which is true by the AM-HM inequality. P4. Let $f(x)$ be a non-constant polynomial with integer coefficients such that $f(1) \neq 1$. For a positive integer $n$, define $\operatorname{divs}(n)$ to be the set of positive divisors of $n$. A positive integer $m$ is $f$-cool if there exists a positive integer $n$ for which $$ f[\operatorname{divs}(m)]=\operatorname{divs}(n) $$ Prove that for any such $f$, there are finitely many $f$-cool integers. (The notation $f[S]$ for some set $S$ denotes the set $\{f(s): s \in S\}$.) Remark 1. The original problem statement was "For a fixed non-constant polynomial $f(x) \neq$ $x$, prove that there are finitely many composite $f$-cool integers." Note that this allows $f(1)=1$. Try this problem for an added challenge! Solution. Assume for the sake of contradiction that there are infinitely many $f$-cool integers. If $f(x)$ has a negative leading coefficient, then a sufficiently large $f$-cool integer $m$ will have $f(m)<0$. But this implies $m$ is not $f$-cool, contradiction. Thus $f(x)$ has a positive leading coefficient, so we can pick an $N$ such that for all $m>N$, $$ f(m)>\max (f(1), f(2), \ldots, f(m-1)) $$ This means $f(m)$ is the largest value in $f[\operatorname{divs}(m)]$, so if $m$ is $f$-cool with $f[\operatorname{divs}(m)]=\operatorname{divs}(n)$, then we must have $n=f(m)$, since $n$ is the largest value in $\operatorname{divs}(n)$. In other words, $$ f[\operatorname{divs}(m)]=\operatorname{divs}(f(m)) $$ for all $f$-cool $m>N$. For each of those $m$ 's, $1 \in \operatorname{divs}(f(m))$, so there must be a $k \in \operatorname{divs}(m)$ such that $f(k)=1$. Let $k_{1}, k_{2}, \ldots, k_{n}$ be the solutions to $f(x)=1$. Thus every $f$-cool $m>N$ is divisible by some $k \in\left\{k_{1}, k_{2}, \ldots, k_{n}\right\}$. Since there are infinitely many such $m$ 's and finitely many $k$ 's, by the Pigeonhole Principle there is some $k$ which divides infinitely many $f$-cool integers $m$. (Note that $k \neq 1$ since $f(1) \neq 1$.) For all $f$-cool $m>N$ divisible by $k$, we have $$ \left.f\left(\frac{m}{k}\right) \in f[\operatorname{divs}(m)]=\operatorname{divs}(f(m)) \Longrightarrow f\left(\frac{m}{k}\right) \right\rvert\, f(m) . $$ Thus, $f(x) \mid f(k x)$ has infinitely many positive integer solutions. Let $d=\operatorname{deg}(f)$, and write $$ \frac{f(k x)}{f(x)}=k^{d}+\frac{g(x)}{f(x)} $$ for some $g(x) \in \mathbb{Z}[x]$ with $\operatorname{deg}(g)\operatorname{deg}(g)$. But then $\frac{f(k x)}{f(x)}-k^{d}=\frac{g(x)}{f(x)}$ cannot be an integer, which gives us the desired contradiction. Therefore $g(x)=0$, so $f(k x)=k^{d} f(x)$, i.e. $f(x)=a x^{d}$ for some positive integer $a$. If $a=1$ then $f(1)=1$, a contradiction. But if $a>1$, then $f(x)=1$ has no integer solutions, another contradiction. P5. A country with $n$ cities has some two-way roads connecting certain pairs of cities. Someone notices that if the country is split into two parts in any way, then there would be at most $k n$ roads between the two parts (where $k$ is a fixed positive integer). What is the largest integer $m$ (in terms of $n$ and $k$ ) such that there is guaranteed to be a set of $m$ cities, no two of which are directly connected by a road? Solution. The answer is $m=\left\lceil\frac{n}{4 k}\right\rceil$ Call a collection of cities independent if no two cities in the collection are joined by a road. Let $r$ and $k$ be integers such that $n=4 k q+r$ where $1 \leq r \leq 4 k$. First we show that $m \leq\left\lceil\frac{n}{4 k}\right\rceil=q+1$. Let $K_{i}$ denote a set of $i$ cities such that every pair of cities in $K_{i}$ is linked by a road. Consider a country containing $q$ copies of $K_{4 k}$ and one copy of $K_{r}$. An independent set of cities in this country contains at most one city from each $K_{4 k}$ or $K_{r}$ and therefore contains at most $q+1$ cities. Now note that any partition of the cities of the country into two new countries partitions each $K_{4 k}$ and $K_{r}$ into two sets. If $K_{i}$ where $i \leq 4 k$ is partitioned into two sets of cities of sizes $a$ and $b$, then the number of roads between the two sets is $a b \leq \frac{(a+b)^{2}}{4} \leq k i$. Summing this inequality over all copies of $K_{4 k}$ and $K_{r}$ yields that there are at most $k n$ roads between the two new countries. This implies that this particular country satisfies the given condition and it follows that $m \leq\left\lceil\frac{n}{4 k}\right\rceil$. Now we show that any country satisfying the given condition has an independent set containing at least $\left\lceil\frac{n}{4 k}\right\rceil$ cities. Call a set of cities $i$-separable if it can be partitioned into $i$ disjoint independent sets of cities. Given a country satisfying the conditions, let $S$ be a largest set of cities in the country that is $2 k$-separable. We prove that $|S| \geq n / 2$. By definition of $S$, there exists a partition $A_{1}, A_{2}, \ldots, A_{2 k}$ of the cities in $S$ such that each $A_{i}$ is independent. Let $|S|=t$. Assume for contradiction that $t<\frac{n}{2}$. There are at most $k n$ roads between $S$ and the rest of the country, which by the pigeonhole principle implies that there is a city $u$ not in $S$ that is connected to at most $\frac{k n}{n-t}<2 k$ cities by road. Therefore $u$ is joined by a road to at most $2 k-1$ cities in $S$, and there must be an independent subset $A_{i}$ such that $u$ is not linked by a road to any city in $A_{i}$. Adding $u$ to $S$ maintains the fact that $S$ is $2 k$-separable but contradicts its maximality. Therefore it must follow that $t \geq \frac{n}{2}$. By the pigeonhole principle, one of the sets $A_{1}, A_{2}, \ldots, A_{2 k}$ must contain at least $\frac{t}{2 k} \geq \frac{n}{4 k}$ cities. This proves the claim and therefore $m=\left\lceil\frac{n}{4 k}\right\rceil$.