# The 2022 Canadian ## Mathematical Olympiad ## Official Solutions for CMO 2022 P1. Assume that real numbers $a$ and $b$ satisfy $$ a b+\sqrt{a b+1}+\sqrt{a^{2}+b} \cdot \sqrt{b^{2}+a}=0 $$ Find, with proof, the value of $$ a \sqrt{b^{2}+a}+b \sqrt{a^{2}+b} $$ Solution. Let us rewrite the given equation as follows: $$ a b+\sqrt{a^{2}+b} \sqrt{b^{2}+a}=-\sqrt{a b+1} . $$ Squaring this gives us $$ \begin{aligned} a^{2} b^{2}+2 a b \sqrt{a^{2}+b} \sqrt{b^{2}+a}+\left(a^{2}+b\right)\left(b^{2}+a\right) & =a b+1 \\ \left(a^{2} b^{2}+a^{3}\right)+2 a b \sqrt{a^{2}+b} \sqrt{b^{2}+a}+\left(a^{2} b^{2}+b^{3}\right) & =1 \\ \left(a \sqrt{b^{2}+a}+b \sqrt{a^{2}+b}\right)^{2} & =1 \\ a \sqrt{b^{2}+a}+b \sqrt{a^{2}+b} & = \pm 1 . \end{aligned} $$ Next, we show that $a \sqrt{b^{2}+a}+b \sqrt{a^{2}+b}>0$. Note that $$ a b=-\sqrt{a b+1}-\sqrt{a^{2}+b} \cdot \sqrt{b^{2}+a}<0 $$ so $a$ and $b$ have opposite signs. Without loss of generality, we may assume $a>0>b$. Then rewrite $$ a \sqrt{b^{2}+a}+b \sqrt{a^{2}+b}=a\left(\sqrt{b^{2}+a}+b\right)-b\left(a-\sqrt{a^{2}+b}\right) $$ and, since $\sqrt{b^{2}+a}+b$ and $a-\sqrt{a^{2}+b}$ are both positive, the expression above is positive. Therefore, $$ a \sqrt{b^{2}+a}+b \sqrt{a^{2}+b}=1, $$ and the proof is finished. P2. Let $d(k)$ denote the number of positive integer divisors of $k$. For example, $d(6)=4$ since 6 has 4 positive divisors, namely, $1,2,3$, and 6 . Prove that for all positive integers $n$, $$ d(1)+d(3)+d(5)+\cdots+d(2 n-1) \leq d(2)+d(4)+d(6)+\cdots+d(2 n) $$ Solution. For any integer $k$ and set of integers $S$, let $f_{S}(k)$ be the number of multiples of $k$ in $S$. We can count the number of pairs $(k, s)$ with $k \in \mathbb{N}$ dividing $s \in S$ in two different ways, as follows: - For each $s \in S$, there are $d(s)$ pairs that include $s$, one for each divisor of $s$. - For each $k \in \mathbb{N}$, there are $f_{k}(S)$ pairs that include $k$, one for each multiple of $k$. Therefore, $$ \sum_{s \in S} d(s)=\sum_{k \in \mathbb{N}} f_{S}(k) $$ Let $$ O=\{1,3,5, \ldots, 2 n-1\} \quad \text { and } \quad E=\{2,4,6, \ldots, 2 n\} $$ be the set of odd and, respectively, the set of even integers between 1 and $2 n$. It suffices to show that $$ \sum_{k \in \mathbb{N}} f_{O}(k) \leq \sum_{k \in \mathbb{N}} f_{E}(k) $$ Since the elements of $O$ only have odd divisors, $$ \sum_{k \in \mathbb{N}} f_{O}(k)=\sum_{k \text { odd }} f_{O}(k) $$ For any odd $k$, consider the multiples of $k$ between 1 and $2 n$. They form a sequence $$ k, 2 k, 3 k, \ldots,\left\lfloor\frac{2 n}{k}\right\rfloor k $$ alternating between odd and even terms. There are either an equal number of odd and even terms, or there is one more odd term than even terms. Therefore, we have the inequality $$ f_{O}(k) \leq f_{E}(k)+1 $$ for all odd $k$. Combining this with the previous observations gives us the desired inequality: $$ \begin{aligned} \sum_{k \in \mathbb{N}} f_{O}(k) & =\sum_{k \text { odd }} f_{O}(k) \\ & \leq \sum_{k \text { odd }}\left(f_{E}(k)+1\right) \\ & =\sum_{k \text { odd }} f_{E}(k)+n \\ & =\sum_{k \text { odd }} f_{E}(k)+f_{E}(2) \\ & \leq \sum_{k \in \mathbb{N}} f_{E}(k) \end{aligned} $$ P3: Let $n \geq 2$ be an integer. Initially, the number 1 is written $n$ times on a board. Every minute, Vishal picks two numbers written on the board, say $a$ and $b$, erases them, and writes either $a+b$ or $\min \left\{a^{2}, b^{2}\right\}$. After $n-1$ minutes there is one number left on the board. Let the largest possible value for this final number be $f(n)$. Prove that $$ 2^{n / 3}4$, we have that $$ g(n)=\max \left\{g(n-1)+1, \max _{1 \leq x \leq n-1} g(x) g(n-x)\right\} $$ Now proceed similarly to the first proof. Assume $n>4$ and $g(m) \leq 3^{m / 3}$ for all $m0$, we get $$ \begin{gathered} f\left(2^{m}\right) \geq f\left(2^{m-1}\right)^{2} \geq\left(2^{2^{m-2}}\right)^{2}=2^{2^{m-1}} \\ f\left(3 \cdot 2^{m}\right) \geq f\left(3 \cdot 2^{m-1}\right)^{2} \geq\left(3^{2^{m-1}}\right)^{2}=3^{2^{m}} \end{gathered} $$ by induction, as required. (This lemma can also be proved more constructively. Briefly, if $n=2^{m}$, then partition the 1 's on the board into $2^{m-1}$ pairs, and then add each pair to get $2^{m-1} 2^{\prime} \mathrm{s}\left(2=2^{2^{0}}\right)$; then multiply pairs of 2 's to get $2^{m-2} 4$ 's $\left(4=2^{2^{1}}\right)$; then multiply pairs of 4's to get $2^{m-3} 16$ 's $\left(16=2^{2^{2}}\right)$; and so on, until there are $2\left(=2^{1}\right)$ copies of $2^{2^{m-2}}$, which then gets replaced with $\left.\mathrm{a} 2^{2^{m-1}}\right)$. The process is similar for $n=3 \cdot 2^{m}$, except that the first step is to partition the 1 's into $2^{m}$ groups of 3 , and then use addition within each group to get $2^{m} 3$ 's on the board.) Now assume $2^{x} \leq n<3 \cdot 2^{x-1}$ for some integer $x$. Then we have $$ f(n) \geq f\left(2^{x}\right) \geq 2^{2^{x-1}}>2^{n / 3} $$ as required. If no such $x$ exists, then there exists an integer $x$ such that $3 \cdot 2^{x-1} \leq n<2^{x+1}$. In this case, we have $$ f(n) \geq f\left(3 \cdot 2^{x-1}\right) \geq 3^{2^{x-1}}>2^{2^{x+1} / 3}>2^{n / 3} $$ where the second last inequality is equivalent to $2^{x-1} \log (3) \geq \frac{2^{x+1}}{3} \log (2)$, and by dividing out $2^{x}$ and clearing the denominator this is equivalent to $3 \log (3) \geq 4 \log 2$, which is true as $3^{3}=27>16=2^{4}$. Second proof of lower bound. We shall prove the stronger result $f(n) \geq 2^{(n+1) / 3}$ for $n \geq 2$ by induction. One can check that $f(n)=n$ for $n=2,3,4$, which proves the result for these values. Assume that $n \geq 5$ and that $f(k) \geq 2^{(k+1) / 3}$ for all $k=2,3, \ldots, n-1$. Then $$ \begin{array}{rlr} f(n) & \geq f(\lfloor n / 2\rfloor)^{2} & \\ & \geq\left(2^{(\lfloor n / 2\rfloor+1) / 3}\right)^{2} \quad \quad \text { since }\left\lfloor\frac{n}{2}\right\rfloor \geq 2 \\ & =2^{(2\lfloor n / 2\rfloor+2) / 3} \quad \\ & \geq 2^{(n+1) / 3} \quad \text { since }\left\lfloor\frac{n}{2}\right\rfloor \geq \frac{n-1}{2} . \end{array} $$ The result follows by induction. Remark 1. One can show that $f$ satisfies the recurrence $f(n)=n$ for $n=1,2, f(2 n)=f(n)^{2}$ for $n \geq 2$, and $f(2 n+1)=f(2 n)+1$ for $n \geq 1$. The upper bound in the problem is tight (equality holds for $n=3 \cdot 2^{x}$ ), but the lower bound is not. P4. Let $n$ be a positive integer. A set of $n$ distinct lines divides the plane into various (possibly unbounded) regions. The set of lines is called "nice" if no three lines intersect at a single point. A "colouring" is an assignment of two colours to each region such that the first colour is from the set $\left\{A_{1}, A_{2}\right\}$, and the second colour is from the set $\left\{B_{1}, B_{2}, B_{3}\right\}$. Given a nice set of lines, we call it "colourable" if there exists a colouring such that 1. no colour is assigned to two regions that share an edge; 2. for each $i \in\{1,2\}$ and $j \in\{1,2,3\}$ there is at least one region that is assigned with both $A_{i}$ and $B_{j}$. Determine all $n$ such that every nice configuration of $n$ lines is colourable. Solution. The answer is $n \geq 5$. If $n \leq 4$, consider $n$ parallel lines. There are 6 total colour combinations required, and only $n+1 \leq 5$ total regions, hence the colouring is not possible. Now, assume $n \geq 5$. Rotate the picture so that no line is horizontal, and orient each line so that the "forward" direction increases the $y$-value. In this way, each line divides the plane into a right and left hand side (with respect to this forward direction). Every region of the plane is on the right hand side of $k$ lines and on the left hand side of $n-k$ lines for some $0 \leq k \leq n$. Furthermore, there is a region for every $k$ : let $w$ be large enough so that $w$ is greater than the $y$-value of any intersection point of two lines. Consider the horizontal line $y=w$ : a point very far on the left of this line is left of every single line, and as we cross over all lines in the problem, we hit all values of $k$. Finally, take a region that is on the right hand side of $k$ lines. Colour it $A_{1}$ if $k$ is odd, and $A_{2}$ if it is even. Similarly, colour it $B_{i}$ if $k \equiv i(\bmod 3)$. By the previous paragraph, there are regions for at least $k=0,1, \ldots, 5$, whence there is a region coloured $A_{i}$ and $B_{j}$ for all $(i, j)$. Furthermore, two regions that share an edge will be on the right hand side of $k$ and $k+1$ lines for some $k$. By construction, the $A_{i}$ and $B_{i}$ colours of the regions must differ, hence we have proven that the set of lines is colourable. P5. Let $A B C D E$ be a convex pentagon such that the five vertices lie on a circle and the five sides are tangent to another circle inside the pentagon. There are $\binom{5}{3}=10$ triangles which can be formed by choosing 3 of the 5 vertices. For each of these 10 triangles, mark its incenter. Prove that these 10 incenters lie on two concentric circles. Solution. Let $I$ be the incenter of pentagon $A B C D E$. Let $I_{A}$ denote the incenter of triangle $E A B$ and $I_{a}$ the incenter $D A C$. Define $I_{B}, I_{b}, I_{C}, I_{c}, I_{D}, I_{d}, I_{E}, I_{e}$ similarly. We will first show that $I_{A} I_{B} I_{C} I_{D} I_{E}$ are concyclic. Let $\omega_{A}$ be the circle with center at the midpoint of arc $D E$ and passing through $D$ and $E$. Define $\omega_{B}, \omega_{C}, \omega_{D}, \omega_{E}$ similarly. It is well-known that the incenter of a triangle lies on such circles, in particular, $I_{A}$ lies on $\omega_{C}$ and $\omega_{D}$. So the radical axis of $\omega_{C}, \omega_{D}$ is the line $A I_{A}$. But this is just the angle bisector of $\angle E A B$, which $I$ also lies on. So $I$ is in fact the radical center of $\omega_{A}, \omega_{B}, \omega_{C}, \omega_{D}, \omega_{E}$ ! Inverting about $I$ swaps $I_{A}$ and $A$ and since $A B C D E$ are concyclic, $I_{A} I_{B} I_{C} I_{D} I_{E}$ are concyclic as well. Let $O$ be the center of the circle $I_{A} I_{B} I_{C} I_{D} I_{E}$. We will now show that $O I_{a}=O I_{d}$ which finishes the problem as we can consider the cyclic versions of this equation to find that $O I_{a}=O I_{d}=O I_{b}=O I_{e}=O I_{c}$. Recall a well-known lemma: For any cyclic quadrilateral $W X Y Z$, the incenters of $X Y Z, Y Z W, Z W X, W X Y$ form a rectangle. Applying this lemma on $A B C D$, we see that $I_{B}, I_{C}, I_{a}, I_{d}$ form a rectangle in that order. Then the perpendicular bisector of $I_{B} I_{C}$ is exactly the perpendicular bisector of $I_{a} I_{d}$. Thus, $O$ is equidistant to $I_{a}$ and $I_{d}$ and we are done.