# 38th Canadian Mathematical Olympiad Wednesday, March 29, 2006 Solutions to the 2006 CMO paper 1. Let $f(n, k)$ be the number of ways of distributing $k$ candies to $n$ children so that each child receives at most 2 candies. For example, if $n=3$, then $f(3,7)=0, f(3,6)=1$ and $f(3,4)=6$. Determine the value of $$ f(2006,1)+f(2006,4)+f(2006,7)+\cdots+f(2006,1000)+f(2006,1003) . $$ Comment. Unfortunately, there was an error in the statement of this problem. It was intended that the sum should continue to $f(2006,4012)$. Solution 1. The number of ways of distributing $k$ candies to 2006 children is equal to the number of ways of distributing 0 to a particular child and $k$ to the rest, plus the number of ways of distributing 1 to the particular child and $k-1$ to the rest, plus the number of ways of distributing 2 to the particular child and $k-2$ to the rest. Thus $f(2006, k)=$ $f(2005, k)+f(2005, k-1)+f(2005, k-2)$, so that the required sum is $$ 1+\sum_{k=1}^{1003} f(2005, k) $$ In evaluating $f(n, k)$, suppose that there are $r$ children who receive 2 candies; these $r$ children can be chosen in $\left(\begin{array}{l}n \\ r\end{array}\right)$ ways. Then there are $k-2 r$ candies from which at most one is given to each of $n-r$ children. Hence $$ f(n, k)=\sum_{r=0}^{\lfloor k / 2\rfloor}\left(\begin{array}{l} n \\ r \end{array}\right)\left(\begin{array}{c} n-r \\ k-2 r \end{array}\right)=\sum_{r=0}^{\infty}\left(\begin{array}{l} n \\ r \end{array}\right)\left(\begin{array}{c} n-r \\ k-2 r \end{array}\right) $$ with $\left(\begin{array}{l}x \\ y\end{array}\right)=0$ when $x0\right\}$. Suppose that $r_{i}$ is the sum of the $i$ th row and $c_{j}$ the sum of the $j$ th column. Then $r_{i}=c_{j}$ whenever $(i, j) \in S$. Then we have that $$ \sum\left\{\frac{a_{i j}}{r_{i}}:(i, j) \in S\right\}=\sum\left\{\frac{a_{i j}}{c_{j}}:(i, j) \in S\right\} $$ We evaluate the sums on either side independently. $$ \begin{aligned} & \sum\left\{\frac{a_{i j}}{r_{i}}:(i, j) \in S\right\}=\sum\left\{\frac{a_{i j}}{r_{i}}: 1 \leq i \leq m, 1 \leq j \leq n\right\}=\sum_{i=1}^{m} \frac{1}{r_{i}} \sum_{j=1}^{n} a_{i j}=\sum_{i=1}^{m}\left(\frac{1}{r_{i}}\right) r_{i}=\sum_{i=1}^{m} 1=m . \\ & \sum\left\{\frac{a_{i j}}{c_{j}}:(i, j) \in S\right\}=\sum\left\{\frac{a_{i j}}{c_{j}}: 1 \leq i \leq m, 1 \leq j \leq n\right\}=\sum_{j=1}^{n} \frac{1}{c_{j}} \sum_{i=1}^{m} a_{i j}=\sum_{j=1}^{n}\left(\frac{1}{c_{j}}\right) c_{j}=\sum_{j=1}^{n} 1=n . \end{aligned} $$ Hence $m=n$. Comment. The second solution can be made cleaner and more elegant by defining $u_{i j}=a_{i j} / r_{i}$ for all $(i, j)$. When $a_{i j}=0$, then $u_{i j}=0$. When $a_{i j}>0$, then, by hypothesis, $u_{i j}=a_{i j} / c_{j}$, a relation that in fact holds for all $(i, j)$. We find that $$ \sum_{j=1}^{n} u_{i j}=1 \quad \text { and } \quad \sum_{i=1}^{n} u_{i j}=1 $$ for $1 \leq i \leq m$ and $1 \leq j \leq n$, so that $\left(u_{i j}\right)$ is an $m \times n$ array whose row sums and column sums are all equal to 1 . Hence $$ m=\sum_{i=1}^{m}\left(\sum_{j=1}^{n} u_{i j}\right)=\sum\left\{u_{i j}: 1 \leq i \leq m, 1 \leq j \leq n\right\}=\sum_{j=1}^{n}\left(\sum_{i=1}^{m} u_{i j}\right)=n $$ (being the sum of all the entries in the array). 4. Consider a round-robin tournament with $2 n+1$ teams, where each team plays each other team exactly once. We say that three teams $X, Y$ and $Z$, form a cycle triplet if $X$ beats $Y, Y$ beats $Z$, and $Z$ beats $X$. There are no ties. (a) Determine the minimum number of cycle triplets possible. (b) Determine the maximum number of cycle triplets possible. Solution 1. (a) The minimum is 0 , which is achieved by a tournament in which team $T_{i}$ beats $T_{j}$ if and only if $i>j$. (b) Any set of three teams constitutes either a cycle triplet or a "dominated triplet" in which one team beats the other two; let there be $c$ of the former and $d$ of the latter. Then $c+d=\left(\begin{array}{c}2 n+1 \\ 3\end{array}\right)$. Suppose that team $T_{i}$ beats $x_{i}$ other teams; then it is the winning team in exactly $\left(\begin{array}{c}x_{i} \\ 2\end{array}\right)$ dominated triples. Observe that $\sum_{i=1}^{2 n+1} x_{i}=\left(\begin{array}{c}2 n+1 \\ 2\end{array}\right)$, the total number of games. Hence $$ d=\sum_{i=1}^{2 n+1}\left(\begin{array}{c} x_{i} \\ 2 \end{array}\right)=\frac{1}{2} \sum_{i=1}^{2 n+1} x_{i}^{2}-\frac{1}{2}\left(\begin{array}{c} 2 n+1 \\ 2 \end{array}\right) $$ By the Cauchy-Schwarz Inequality, $(2 n+1) \sum_{i=1}^{2 n+1} x_{i}^{2} \geq\left(\sum_{i=1}^{2 n+1} x_{i}\right)^{2}=n^{2}(2 n+1)^{2}$, whence $$ c=\left(\begin{array}{c} 2 n+1 \\ 3 \end{array}\right)-\sum_{i=1}^{2 n+1}\left(\begin{array}{c} x_{i} \\ 2 \end{array}\right) \leq\left(\begin{array}{c} 2 n+1 \\ 3 \end{array}\right)-\frac{n^{2}(2 n+1)}{2}+\frac{1}{2}\left(\begin{array}{c} 2 n+1 \\ 2 \end{array}\right)=\frac{n(n+1)(2 n+1)}{6} . $$ To realize the upper bound, let the teams be $T_{1}=T_{2 n+2}, T_{2}=T_{2 n+3}$. $\cdots, T_{i}=T_{2 n+1+i}, \cdots, T_{2 n+1}=T_{4 n+2}$. For each $i$, let team $T_{i}$ beat $T_{i+1}, T_{i+2}, \cdots, T_{i+n}$ and lose to $T_{i+n+1}, \cdots, T_{i+2 n}$. We need to check that this is a consistent assignment of wins and losses, since the result for each pair of teams is defined twice. This can be seen by noting that $(2 n+1+i)-(i+j)=2 n+1-j \geq n+1$ for $1 \leq j \leq n$. The cycle triplets are $\left(T_{i}, T_{i+j}, T_{i+j+k}\right)$ where $1 \leq j \leq n$ and $(2 n+1+i)-(i+j+k) \leq n$, i.e., when $1 \leq j \leq n$ and $n+1-j \leq k \leq n$. For each $i$, this counts $1+2+\cdots+n=\frac{1}{2} n(n+1)$ cycle triplets. When we range over all $i$, each cycle triplet gets counted three times, so the number of cycle triplets is $$ \frac{2 n+1}{3}\left(\frac{n(n+1)}{2}\right)=\frac{n(n+1)(2 n+1)}{6} . $$ Solution 2. [S. Eastwood] (b) Let $t$ be the number of cycle triplets and $u$ be the number of ordered triplets of teams $(X, Y, Z)$ where $X$ beats $Y$ and $Y$ beats $Z$. Each cycle triplet generates three ordered triplets while other triplets generate exactly one. The total number of triplets is $$ \left(\begin{array}{c} 2 n+1 \\ 3 \end{array}\right)=\frac{n\left(4 n^{2}-1\right)}{3} . $$ The number of triples that are not cycle is $$ \frac{n\left(4 n^{2}-1\right)}{3}-t $$ Hence $$ u=3 t+\left(\frac{n\left(4 n^{2}-1\right)}{3}-t\right) \Longrightarrow $$ $$ t=\frac{3 u-n\left(4 n^{2}-1\right)}{6}=\frac{u-(2 n+1) n^{2}}{2}+\frac{n(n+1)(2 n+1)}{6} $$ If team $Y$ beats $a$ teams and loses to $b$ teams, then the number of ordered triples with $Y$ as the central element is $a b$. Since $a+b=2 n$, by the Arithmetic-Geometric Means Inequality, we have that $a b \leq n 2$. Hence $u \leq(2 n+1) n 2$, so that $$ t \leq \frac{n(n+1)(2 n+1)}{6} $$ The maximum is attainable when $u=(2 n+1) n 2$, which can occur when we arrange all the teams in a circle with each team beating exactly the $n$ teams in the clockwise direction. Comment. Interestingly enough, the maximum is $\sum_{i=1}^{n} i^{2}$; is there a nice argument that gives the answer in this form? 5. The vertices of a right triangle $A B C$ inscribed in a circle divide the circumference into three arcs. The right angle is at $A$, so that the opposite $\operatorname{arc} B C$ is a semicircle while $\operatorname{arc} A B$ and $\operatorname{arc} A C$ are supplementary. To each of the three arcs, we draw a tangent such that its point of tangency is the midpoint of that portion of the tangent intercepted by the extended lines $A B$ and $A C$. More precisely, the point $D$ on $\operatorname{arc} B C$ is the midpoint of the segment joining the points $D^{\prime}$ and $D^{\prime \prime}$ where the tangent at $D$ intersects the extended lines $A B$ and $A C$. Similarly for $E$ on arc $A C$ and $F$ on arc $A B$. Prove that triangle $D E F$ is equilateral. ![](https://cdn.mathpix.com/cropped/2024_04_17_87adde2ca6b3faf10a84g-4.jpg?height=509&width=783&top_left_y=1042&top_left_x=662) Solution 1. A prime indicates where a tangent meets $A B$ and a double prime where it meets $A C$. It is given that $D D^{\prime}=D D^{\prime \prime}, E E^{\prime}=E E^{\prime \prime}$ and $F F^{\prime}=F F^{\prime \prime}$. It is required to show that arc $E F$ is a third of the circumference as is arc $D B F$. $A F$ is the median to the hypotenuse of right triangle $A F^{\prime} F^{\prime \prime}$, so that $F F^{\prime}=F A$ and therefore $$ \operatorname{arc} A F=2 \angle F^{\prime \prime} F A=2\left(\angle F F^{\prime} A+\angle F A F^{\prime}\right)=4 \angle F A F^{\prime}=4 \angle F A B=2 \text { arc } B F \text {, } $$ whence $\operatorname{arc} F A=(2 / 3)$ arc $B F A$. Similarly, arc $A E=(2 / 3)$ arc $A E C$. Therefore, $\operatorname{arc} F E$ is $2 / 3$ of the semicircle, or $1 / 3$ of the circumference as desired. As for arc $D B F$, arc $B D=2 \angle B A D=\angle B A D+\angle B D^{\prime} D=\angle A D D^{\prime \prime}=(1 / 2)$ arc $A C D$. But, arc $B F=(1 / 2)$ arc $A F$, so arc $D B F=(1 / 2)$ arc $F A E D$. That is, arc $D B F$ is $1 / 3$ the circumference and the proof is complete. Solution 2. Since $A E^{\prime} E^{\prime \prime}$ is a right triangle, $A E=E E^{\prime}=E E^{\prime \prime}$ so that $\angle C A E=\angle C E^{\prime \prime} E$. Also $A D=D^{\prime} D=D D^{\prime \prime}$, so that $\angle C D D^{\prime \prime}=\angle C A D=\angle C D^{\prime \prime} D$. As $E A D C$ is a concyclic quadrilateral, $$ \begin{aligned} 180^{\circ} & =\angle E A D+\angle E C D \\ & =\angle D A C+\angle C A E+\angle E C A+\angle A C D \\ & =\angle D A C+\angle C A E+\angle C E E^{\prime \prime}+\angle C E^{\prime \prime} E+\angle C D D^{\prime \prime}+\angle C D^{\prime \prime} D \\ & =\angle D A C+\angle C A E+\angle C A E+\angle C A E+\angle C A D+\angle C A D \\ & =3(\angle D A C+\angle D A E)=3(\angle D A E) \end{aligned} $$ Hence $\angle D F E=\angle D A E=60^{\circ}$. Similarly, $\angle D E F=60^{\circ}$. It follows that triangle $D E F$ is equilateral.