problem: Let $n \geq 2$ be an integer. Carl has $n$ books arranged on a bookshelf. Each book has a height and a width. No two books have the same height, and no two books have the same width.  Initially, the books are arranged in increasing order of height from left to right. In a move, Carl picks any two adjacent books where the left book is wider and shorter than the right book, and swaps their locations. Carl does this repeatedly until no further moves are possible.  Prove that regardless of how Carl makes his moves, he must stop after a finite number of moves, and when he does stop, the books are sorted in increasing order of width from left to right.

solution: We say that a pair of books $(A, B)$ is height-inverted if $A$ is to the left of $B$ and taller than $A$. Similarly define width-inverted pairs.  Note that every operation decreases the number of width-inverted pairs. This proves the procedure terminates, since the number of width-inverted pairs starts at $\binom{n}{2}$ and cannot increase indefinitely.  Now consider a situation where no more moves are possible. Assume for contradiction two consecutive books $(A, B)$ are still width-inverted. Since the operation isn't possible anymore, they are also height-inverted. In particular, the operation could never have swapped $A$ and $B$. But this contradicts the assumption there were no height-inverted pairs initially.


problem: Let $\omega$ be the incircle of a fixed equilateral triangle $A B C$. Let $\ell$ be a variable line that is tangent to $\omega$ and meets the interior of segments $B C$ and $C A$ at points $P$ and $Q$, respectively. A point $R$ is chosen such that $P R=P A$ and $Q R=Q B$. Find all possible locations of the point $R$, over all choices of $\ell$.

solution: Let $r$ be the inradius. Let $T$ be the tangency point of $\overline{P Q}$ on arc $\widehat{D E}$ of the incircle, which we consider varying. We define $R_{1}$ and $R_{2}$ to be the two intersections of the circle centered at $P$ with radius $P A$, and the circle centered at $Q$ with radius $Q B$. We choose $R_{1}$ to lie on the opposite side of $C$ as line $P Q$. ![](https://cdn.mathpix.com/cropped/2024_11_19_7a2c3e8ae10363caaf59g-04.jpg?height=906&width=1098&top_left_y=1003&top_left_x=482)  Claim - The point $R_{1}$ is the unique point on ray $T I$ with $R_{1} I=2 r$.  Note that since TASD is an isosceles trapezoid, it follows $P A=P S$. Similarly, $Q B=Q S$. So it follows that $S=R_{1}$.  Since $T$ can be any point on the open arc $\widehat{D E}$, it follows that the locus of $R_{1}$ is exactly the open $120^{\circ}$ arc of $\widehat{A B}$ of the circle centered at $I$ with radius $2 r$ (i.e. the circumcircle of $A B C)$.  It remains to characterize $R_{2}$. Since $T I=r, I R_{1}=2 r$, it follows $T R_{2}=3 r$ and $I R_{2}=4 r$. Define $A^{\prime}$ on ray $D I$ such that $A^{\prime} I=4 r$, and $B^{\prime}$ on ray $I E$ such that $B^{\prime} I=4 r$. Then it follows, again by homothety, that the locus of $R_{2}$ is the $120^{\circ}$ arc $\widehat{A^{\prime} B^{\prime}}$ of the circle centered at $I$ with radius $4 r$.  In conclusion, the locus of $R$ is the two open $120^{\circ}$ arcs we identified.


problem: An empty $2020 \times 2020 \times 2020$ cube is given, and a $2020 \times 2020$ grid of square unit cells is drawn on each of its six faces. A beam is a $1 \times 1 \times 2020$ rectangular prism. Several beams are placed inside the cube subject to the following conditions:  - The two $1 \times 1$ faces of each beam coincide with unit cells lying on opposite faces of the cube. (Hence, there are $3 \cdot 2020^{2}$ possible positions for a beam.) - No two beams have intersecting interiors. - The interiors of each of the four $1 \times 2020$ faces of each beam touch either a face of the cube or the interior of the face of another beam. What is the smallest positive number of beams that can be placed to satisfy these conditions?

solution: \I Answer. 3030 beams.  【 Construction. We first give a construction with $3 n / 2$ beams for any $n \times n \times n$ box, where $n$ is an even integer. Shown below is the construction for $n=6$, which generalizes. (The left figure shows the cube in 3 d ; the right figure shows a direct view of the three visible faces.) ![](https://cdn.mathpix.com/cropped/2024_11_19_7a2c3e8ae10363caaf59g-06.jpg?height=815&width=1303&top_left_y=1551&top_left_x=315) ![](https://cdn.mathpix.com/cropped/2024_11_19_7a2c3e8ae10363caaf59g-06.jpg?height=295&width=281&top_left_y=2031&top_left_x=1113)  Left face ![](https://cdn.mathpix.com/cropped/2024_11_19_7a2c3e8ae10363caaf59g-06.jpg?height=295&width=278&top_left_y=2034&top_left_x=1460)  Right face  To be explicit, impose coordinate axes such that one corner of the cube is the origin. We specify a beam by two opposite corners. The $3 n / 2$ beams come in three directions, $n / 2$ in each direction:  - $(0,0,0) \rightarrow(1,1, n),(2,2,0) \rightarrow(3,3, n),(4,4,0) \rightarrow(5,5, n)$, and so on; - $(1,0,0) \rightarrow(2, n, 1),(3,0,2) \rightarrow(4, n, 3),(5,0,4) \rightarrow(6, n, 5)$, and so on; - $(0,1,1) \rightarrow(n, 2,2),(0,3,3) \rightarrow(n, 4,4),(0,5,5) \rightarrow(n, 6,6)$, and so on.  This gives the figure we drew earlier and shows 3030 beams is possible.  Necessity. We now show at least $3 n / 2$ beams are necessary. Maintain coordinates, and call the beams $x$-beams, $y$-beams, $z$-beams according to which plane their long edges are perpendicular too. Let $N_{x}, N_{y}, N_{z}$ be the number of these.  Claim - If $\min \left(N_{x}, N_{y}, N_{z}\right)=0$, then at least $n^{2}$ beams are needed.   We henceforth assume $\min \left(N_{x}, N_{y}, N_{z}\right)>0$. Claim - If $N_{z}>0$, then we have $N_{x}+N_{y} \geq n$.   Proceeding in a similar fashion, we arrive at the three relations  $$ \begin{aligned} & N_{x}+N_{y} \geq n \\ & N_{y}+N_{z} \geq n \\ & N_{z}+N_{x} \geq n \end{aligned} $$  Summing gives $N_{x}+N_{y}+N_{z} \geq 3 n / 2$ too. Remark. The problem condition has the following "physics" interpretation. Imagine the cube is a metal box which is sturdy enough that all beams must remain orthogonal to the faces of the box (i.e. the beams cannot spin). Then the condition of the problem is exactly what is needed so that, if the box is shaken or rotated, the beams will not move.  Remark. Walter Stromquist points out that the number of constructions with 3030 beams is actually enormous: not dividing out by isometries, the number is $(2 \cdot 1010!)^{3}$.


problem: Let $A B C D$ be a convex quadrilateral inscribed in a circle and satisfying  $$ D A<A B=B C<C D $$  Points $E$ and $F$ are chosen on sides $C D$ and $A B$ such that $\overline{B E} \perp \overline{A C}$ and $\overline{E F} \| \overline{B C}$. Prove that $F B=F D$.

solution: 【 First solution by inscribed angle theorem. Since $\overline{E F} \| \overline{B C}$ we may set $\theta=\angle F E B=$ $\angle C B E=\angle E B F$. This already implies $F E=F B$, so we will in fact prove that $F$ is the circumcenter of $\triangle B E D$. ![](https://cdn.mathpix.com/cropped/2024_11_19_7a2c3e8ae10363caaf59g-08.jpg?height=666&width=803&top_left_y=1300&top_left_x=632)  Note that $\angle B D C=\angle B A C=90^{\circ}-\theta$. However, $\angle B F E=180^{\circ}-2 \theta$. So by the inscribed angle theorem, $D$ lies on the circle centered at $F$ with radius $F E=F B$, as desired.


solution: đ Second general solution by angle chasing. By Reim's theorem, $A F E D$ is cyclic. ![](https://cdn.mathpix.com/cropped/2024_11_19_7a2c3e8ae10363caaf59g-09.jpg?height=747&width=804&top_left_y=246&top_left_x=626)  Hence  $$ \begin{aligned} \measuredangle F D B & =\measuredangle F D C-\measuredangle B D C=\measuredangle F A E-\measuredangle F A C \\ & =\measuredangle C A E=\measuredangle E C A=\measuredangle D C A=\measuredangle D B A=\measuredangle D B F \end{aligned} $$  as desired.


solution: \ Third general solution by Pascal. Extend rays $A E$ and $D F$ to meet the circumcircle again at $G$ and $H$. By Pascal's theorem on $H D C B A G$, it follows that $E, F$, and $G H \cap B C$ are collinear, which means that $\overline{E F}\|\overline{G H}\| \overline{B C}$. ![](https://cdn.mathpix.com/cropped/2024_11_19_7a2c3e8ae10363caaf59g-09.jpg?height=746&width=798&top_left_y=1523&top_left_x=635)  Since $E A=E C$, it follows $D A G C$ in isosceles trapezoid. But also $G H B C$ is an isosceles trapezoid. Thus $\mathrm{m} \widehat{D A}=\mathrm{m} \widehat{G C}=\mathrm{m} \widehat{B H}$, so $D A H B$ is an isosceles trapezoid. Thus $F D=F B$.  Remark. Addicts of projective geometry can use Pascal on $D B C A H G$ to finish rather than noting the equal arcs.


problem: Suppose that $\left(a_{1}, b_{1}\right),\left(a_{2}, b_{2}\right), \ldots,\left(a_{100}, b_{100}\right)$ are distinct ordered pairs of nonnegative integers. Let $N$ denote the number of pairs of integers $(i, j)$ satisfying $1 \leq i<j \leq 100$ and $\left|a_{i} b_{j}-a_{j} b_{i}\right|=1$. Determine the largest possible value of $N$ over all possible choices of the 100 ordered pairs.

solution: The answer is 197 . In general, if 100 is replaced by $n \geq 2$ the answer is $2 n-3$. The idea is that if we let $P_{i}=\left(a_{i}, b_{i}\right)$ be a point in the coordinate plane, and let $O=(0,0)$ then we wish to maximize the number of triangles $\triangle O P_{i} P_{j}$ which have area $1 / 2$. Call such a triangle good.  【 Construction of 197 points. It suffices to use the points $(1,0),(1,1),(2,1),(3,1)$, ..., $(99,1)$ as shown. Notice that:  - There are 98 good triangles with vertices $(0,0),(k, 1)$ and $(k+1,1)$ for $k=1, \ldots, 98$. - There are 99 good triangles with vertices $(0,0),(1,0)$ and $(k, 1)$ for $k=1, \ldots, 99$. This is a total of $98+99=197$ triangles. ![](https://cdn.mathpix.com/cropped/2024_11_19_7a2c3e8ae10363caaf59g-10.jpg?height=326&width=818&top_left_y=1382&top_left_x=625)   For the inductive step, suppose (without loss of generality) that the point $P=P_{n}=$ $(a, b)$ is the farthest away from the point $O$ among all points.  Claim - This farthest point $P=P_{n}$ is part of at most two good triangles. ![](https://cdn.mathpix.com/cropped/2024_11_19_7a2c3e8ae10363caaf59g-11.jpg?height=995&width=1000&top_left_y=245&top_left_x=528)  Since $\operatorname{gcd}(a, b)=1$, see that only two lattice points on this locus actually lie inside the quarter-circle centered at $O$ with radius $O P$. Indeed if one of the points is $(u, v)$ then the others on the line are $(u \pm a, v \pm b)$ where the signs match. This proves the claim.  This claim allows us to complete the induction by simply deleting $P_{n}$.


problem: Let $n \geq 2$ be an integer. Let $P\left(x_{1}, x_{2}, \ldots, x_{n}\right)$ be a nonconstant $n$-variable polynomial with real coefficients. Assuming that $P$ vanishes whenever two of its arguments are equal, prove that $P$ has at least $n$ ! terms.

solution: 『 First solution using induction (by Ankan). Begin with the following observation:  Claim - Let $1 \leq i<j \leq n$. There is no term of $P$ which omits both $x_{i}$ and $x_{j}$.  Remark (Technical warning for experts). The fact we used is not true if $\mathbb{R}$ is replaced by a field with finitely many elements, such as $\mathbb{F}_{p}$, even with one variable. For example the one-variable polynomial $X^{p}-X$ vanishes on every element of $\mathbb{F}_{p}$, by Fermat's little theorem.  We proceed by induction on $n \geq 2$ with the base case $n=2$ being clear. Assume WLOG $P$ is not divisible by any of $x_{1}, \ldots, x_{n}$, since otherwise we may simply divide out this factor. Now for the inductive step, note that  - The polynomial $P\left(0, x_{2}, x_{3}, \ldots, x_{n}\right)$ obviously satisfies the inductive hypothesis and is not identically zero since $x_{1} \nmid P$, so it has at least ( $n-1$ )! terms. - Similarly, $P\left(x_{1}, 0, x_{3}, \ldots, x_{n}\right)$ also has at least $(n-1)$ ! terms. - Similarly, $P\left(x_{1}, x_{2}, 0, \ldots, x_{n}\right)$ also has at least $(n-1)$ ! terms. - . . .and so on.  By the claim, all the terms obtained in this way came from different terms of the original polynomial $P$. Therefore, $P$ itself has at least $n \cdot(n-1)!=n!$ terms.  Remark. Equality is achieved by the Vandermonde polynomial $P=\prod_{1 \leq i<j \leq n}\left(x_{i}-x_{j}\right)$.


solution: 【 Second solution using Vandermonde polynomial (by Yang Liu). Since $x_{i}-x_{j}$ divides $P$ for any $i \neq j$, it follows that $P$ should be divisible by the Vandermonde polynomial  $$ V=\prod_{i<j}\left(x_{j}-x_{i}\right)=\sum_{\sigma} \operatorname{sgn}(\sigma) x_{1}^{\sigma(0)} x_{2}^{\sigma(1)} \ldots x_{n}^{\sigma(n-1)} $$  where the sum runs over all permutations $\sigma$ on $\{0, \ldots, n-1\}$.  Consequently, we may write  $$ P=\sum_{\sigma} \operatorname{sgn}(\sigma) x_{1}^{\sigma(0)} x_{2}^{\sigma(1)} \ldots x_{n}^{\sigma(n-1)} Q $$  The main idea is that each of the $n$ ! terms of the above sum has a monomial not appearing in any of the other terms.  As an example, consider $x_{1}^{n-1} x_{2}^{n-2} \ldots x_{n-1}^{1} x_{n}^{0}$. Among all monomial in $Q$, consider the monomial $x_{1}^{e_{1}} x_{2}^{e_{2}} \ldots x_{n}^{e_{n}}$ with the largest $e_{1}$, then largest $e_{2}, \ldots$. (In other words, take the lexicographically largest $\left(e_{1}, \ldots, e_{n}\right)$.) This term  $$ x_{1}^{e_{1}+(n-1)} x_{2}^{e_{2}+(n-2)} \ldots x_{n}^{e_{n}} $$  can't appear anywhere else because it is strictly lexicographically larger than any other term appearing in any other expansion.  Repeating this argument with every $\sigma$ gives the conclusion.