# TSTST 2014 Solution Notes ## Lincoln, Nebraska ## Evan Chen《陳誼廷》 15 April 2024 This is a compilation of solutions for the 2014 TSTST. The ideas of the solution are a mix of my own work, the solutions provided by the competition organizers, and solutions found by the community. However, all the writing is maintained by me. These notes will tend to be a bit more advanced and terse than the "official" solutions from the organizers. In particular, if a theorem or technique is not known to beginners but is still considered "standard", then I often prefer to use this theory anyways, rather than try to work around or conceal it. For example, in geometry problems I typically use directed angles without further comment, rather than awkwardly work around configuration issues. Similarly, sentences like "let $\mathbb{R}$ denote the set of real numbers" are typically omitted entirely. Corrections and comments are welcome! ## Contents 0 Problems ..... 2 1 Solutions to Day 1 ..... 3 1.1 TSTST 2014/1 ..... 3 1.2 TSTST 2014/2 ..... 4 1.3 TSTST 2014/3 ..... 5 2 Solutions to Day 2 ..... 6 2.1 TSTST 2014/4 ..... 6 2.2 TSTST 2014/5 ..... 7 2.3 TSTST 2014/6 ..... 8 ## §0 Problems 1. Let $\leftarrow$ denote the left arrow key on a standard keyboard. If one opens a text editor and types the keys "ab $\leftarrow \mathrm{cd} \leftarrow \leftarrow \mathrm{e} \leftarrow \leftarrow \mathrm{f}$ ", the result is "faecdb". We say that a string $B$ is reachable from a string $A$ if it is possible to insert some amount of $\leftarrow$ 's in $A$, such that typing the resulting characters produces $B$. So, our example shows that "faecdb" is reachable from "abcdef". Prove that for any two strings $A$ and $B, A$ is reachable from $B$ if and only if $B$ is reachable from $A$. 2. Consider a convex pentagon circumscribed about a circle. We name the lines that connect vertices of the pentagon with the opposite points of tangency with the circle gergonnians. (a) Prove that if four gergonnians are concurrent, then all five of them are concurrent. (b) Prove that if there is a triple of gergonnians that are concurrent, then there is another triple of gergonnians that are concurrent. 3. Find all polynomials $P(x)$ with real coefficients that satisfy $$ P(x \sqrt{2})=P\left(x+\sqrt{1-x^{2}}\right) $$ for all real numbers $x$ with $|x| \leq 1$. 4. Let $P(x)$ and $Q(x)$ be arbitrary polynomials with real coefficients, with $P \neq 0$, and let $d=\operatorname{deg} P$. Prove that there exist polynomials $A(x)$ and $B(x)$, not both zero, such that $\max \{\operatorname{deg} A, \operatorname{deg} B\} \leq d / 2$ and $P(x) \mid A(x)+Q(x) \cdot B(x)$. 5. Find the maximum number $E$ such that the following holds: there is an edge-colored graph with 60 vertices and $E$ edges, with each edge colored either red or blue, such that in that coloring, there is no monochromatic cycles of length 3 and no monochromatic cycles of length 5 . 6. Suppose we have distinct positive integers $a, b, c, d$ and an odd prime $p$ not dividing any of them, and an integer $M$ such that if one considers the infinite sequence $$ \begin{gathered} c a-d b \\ c a^{2}-d b^{2} \\ c a^{3}-d b^{3} \\ c a^{4}-d b^{4} \end{gathered} $$ and looks at the highest power of $p$ that divides each of them, these powers are not all zero, and are all at most $M$. Prove that there exists some $T$ (which may depend on $a, b, c, d, p, M)$ such that whenever $p$ divides an element of this sequence, the maximum power of $p$ that divides that element is exactly $p^{T}$. ## §1 Solutions to Day 1 ## §1.1 TSTST 2014/1 Available online at https://aops.com/community/p3549404. ## Problem statement Let $\leftarrow$ denote the left arrow key on a standard keyboard. If one opens a text editor and types the keys "ab $\leftarrow \mathrm{cd} \leftarrow \leftarrow \mathrm{e} \leftarrow \leftarrow \mathrm{f}$ ", the result is "faecdb". We say that a string $B$ is reachable from a string $A$ if it is possible to insert some amount of $\leftarrow$ 's in $A$, such that typing the resulting characters produces $B$. So, our example shows that "faecdb" is reachable from "abcdef". Prove that for any two strings $A$ and $B, A$ is reachable from $B$ if and only if $B$ is reachable from $A$. Obviously $A$ and $B$ should have the same multiset of characters, and we focus only on that situation. Claim - If $A=123 \ldots n$ and $B=\sigma(1) \sigma(2) \ldots \sigma(n)$ is a permutation of $A$, then $B$ is reachable if and only if it is $\mathbf{2 1 3}$-avoiding, i.e. there are no indices $i0}$ such that $x \equiv y \equiv 1(\bmod p)$. If the sequence $\nu_{p}\left(x^{n}-y\right)$ of positive integers is nonconstant, then it is unbounded. For this it would be sufficient to prove the following claim. Claim - Let $p$ be an odd prime. Let $x, y \in \mathbb{Q}>0$ such that $x \equiv y \equiv 1(\bmod p)$. Suppose $m$ and $n$ are positive integers such that $$ d=\nu_{p}\left(x^{n}-y\right)<\nu_{p}\left(x^{m}-y\right)=e . $$ Then there exists $\ell$ such that $\nu_{p}\left(x^{\ell}-y\right) \geq e+1$. Proof. First, note that $\nu_{p}\left(x^{m}-x^{n}\right)=\nu_{p}\left(\left(x^{m}-y\right)-\left(x^{n}-y\right)\right)=d$ and so by exponent lifting we can find some $k$ such that $$ \nu_{p}\left(x^{k}-1\right)=e $$ namely $k=p^{e-d}|m-n|$. (In fact, one could also choose more carefully $k=p^{e-d} \cdot \operatorname{gcd}(m-$ $\left.n, p^{\infty}\right)$, so that $k$ is a power of $p$.) Suppose we set $x^{k}=p^{e} u+1$ and $x^{m}=p^{e} v+y$ where $u, v \in \mathbb{Q}$ aren't divisible by $p$. Now for any integer $1 \leq r \leq p-1$ we consider $$ \begin{aligned} x^{k r+m}-y & =\left(p^{e} u+1\right)^{r} \cdot\left(p^{e} v+y\right)-y \\ & =p^{e}(v+y u \cdot r)+p^{2 e}(\ldots) \end{aligned} $$ By selecting $r$ with $r \equiv-v / u(\bmod p)$, we ensure $p^{e+1} \mid x^{k r+m}-y$, hence $\ell=k r+m$ is as desired. Remark. One way to motivate the proof of the claim is as follows. Suppose we are given $\nu_{p}\left(x^{m}-y\right)=e$, and we wish to find $\ell$ such that $\nu_{p}\left(x^{\ell}-y\right)>e$. Then, it is necessary (albeit insufficient) that $$ x^{\ell-m} \equiv 1 \quad\left(\bmod p^{e}\right) \text { but } x^{\ell-m} \not \equiv 1 \quad\left(\bmod p^{e+1}\right) $$ In particular, we need $\nu_{p}\left(x^{\ell-m}-1\right)=e$ exactly. So the $k$ in the claim must exist if we are going to succeed. On the other hand, if $k$ is some integer for which $\nu_{p}\left(x^{k}-1\right)=e$, then by choosing $\ell-m$ to be some multiple of $k$ with no extra factors of $p$, we hope that we can get $\nu_{p}\left(x^{\ell}-y\right)=e+1$. That's why we write $\ell=k r+m$ and see what happens when we expand.