problem_type: Algebra

exam: HMMT

problem:
Suppose that $x$ and $y$ are positive reals such that

$$
x-y^{2}=3, \quad x^{2}+y^{4}=13
$$

Find $x$.

solution: $\frac{3+\sqrt{17}}{2}$ Squaring both sides of $x-y^{2}=3$ gives $x^{2}+y^{4}-2 x y^{2}=9$. Subtract this equation from twice the second given to get $x^{2}+2 x y^{2}+y^{4}=17 \Longrightarrow x+y^{2}= \pm 17$. Combining this equation with the first given, we see that $x=\frac{3 \pm \sqrt{17}}{2}$. Since $x$ is a positive real, $x$ must be $\frac{3+\sqrt{17}}{2}$.

solution_match: Answer:


problem: The rank of a rational number $q$ is the unique $k$ for which $q=\frac{1}{a_{1}}+\cdots+\frac{1}{a_{k}}$, where each $a_{i}$ is the smallest positive integer such that $q \geq \frac{1}{a_{1}}+\cdots+\frac{1}{a_{i}}$. Let $q$ be the largest rational number less than $\frac{1}{4}$ with rank 3 , and suppose the expression for $q$ is $\frac{1}{a_{1}}+\frac{1}{a_{2}}+\frac{1}{a_{3}}$. Find the ordered triple $\left(a_{1}, a_{2}, a_{3}\right)$.

solution:
$(5,21,421)$ Suppose that $A$ and $B$ were rational numbers of rank 3 less than $\frac{1}{4}$, and let $a_{1}, a_{2}, a_{3}, b_{1}, b_{2}, b_{3}$ be positive integers so that $A=\frac{1}{a_{1}}+\frac{1}{a_{2}}+\frac{1}{a_{3}}$ and $B=\frac{1}{b_{1}}+\frac{1}{b_{2}}+\frac{1}{b_{3}}$ are the expressions for $A$ and $B$ as stated in the problem. If $b_{1}<a_{1}$ then $A<\frac{1}{a_{1}-1} \leq \frac{1}{b_{1}}<B$. In other words, of all the rationals less than $\frac{1}{4}$ with rank 3 , those that have $a_{1}=5$ are greater than those that have $a_{1}=6,7,8, \ldots$ Therefore we can "build" $q$ greedily, adding the largest unit fraction that keeps $q$ less than $\frac{1}{4}$ :
$\frac{1}{5}$ is the largest unit fraction less than $\frac{1}{4}$, hence $a_{1}=5$;
$\frac{1}{27}$ is the largest unit fraction less than $\frac{1}{4}-\frac{1}{5}$, hence $a_{2}=21$;
$\frac{1}{421}$ is the largest unit fraction less than $\frac{1}{4}-\frac{1}{5}-\frac{1}{21}$, hence $a_{3}=421$.


problem: Let $S_{0}=0$ and let $S_{k}$ equal $a_{1}+2 a_{2}+\ldots+k a_{k}$ for $k \geq 1$. Define $a_{i}$ to be 1 if $S_{i-1}<i$ and -1 if $S_{i-1} \geq i$. What is the largest $k \leq 2010$ such that $S_{k}=0$ ?

solution:
1092 Suppose that $S_{N}=0$ for some $N \geq 0$. Then $a_{N+1}=1$ because $N+1 \geq S_{N}$. The following table lists the values of $a_{k}$ and $S_{k}$ for a few $k \geq N$ :

| $k$ | $a_{k}$ | $S_{k}$ |
| :--- | ---: | :--- |
| $N$ |  | 0 |
| $N+1$ | 1 | $N+1$ |
| $N+2$ | 1 | $2 N+3$ |
| $N+3$ | -1 | $N$ |
| $N+4$ | 1 | $2 N+4$ |
| $N+5$ | -1 | $N-1$ |
| $N+6$ | 1 | $2 N+5$ |
| $N+7$ | -1 | $N-2$ |

We see inductively that, for every $i \geq 1$,

$$
S_{N+2 i}=2 N+2+i
$$

and

$$
S_{N+1+2 i}=N+1-i
$$

thus $S_{3 N+3}=0$ is the next $k$ for which $S_{k}=0$. The values of $k$ for which $S_{k}=0$ satisfy the recurrence relation $p_{n+1}=3 p_{n}+3$, and we compute that the first terms of the sequence are $0,3,12,39,120,363,1092$; hence 1092 is our answer.


problem: Suppose that there exist nonzero complex numbers $a, b, c$, and $d$ such that $k$ is a root of both the equations $a x^{3}+b x^{2}+c x+d=0$ and $b x^{3}+c x^{2}+d x+a=0$. Find all possible values of $k$ (including complex values).

solution: $1,-1, i,-i$ Let $k$ be a root of both polynomials. Multiplying the first polynomial by $k$ and subtracting the second, we have $a k^{4}-a=0$, which means that $k$ is either $1,-1, i$, or $-i$. If $a=b=c=d=1$, then $-1, i$, and $-i$ are roots of both polynomials. If $a=b=c=1$ and $d=-3$, then 1 is a root of both polynomials. So $k$ can be $1,-1, i$, and $-i$.


problem: Suppose that $x$ and $y$ are complex numbers such that $x+y=1$ and that $x^{20}+y^{20}=20$. Find the sum of all possible values of $x^{2}+y^{2}$.

solution:
-90 We have $x^{2}+y^{2}+2 x y=1$. Define $a=2 x y$ and $b=x^{2}+y^{2}$ for convenience. Then $a+b=1$ and $b-a=x^{2}+y^{2}-2 x y=(x-y)^{2}=2 b-1$ so that $x, y=\frac{\sqrt{2 b-1} \pm 1}{2}$. Then

$$
\begin{aligned}
x^{20}+y^{20} & =\left(\frac{\sqrt{2 b-1}+1}{2}\right)^{20}+\left(\frac{\sqrt{2 b-1}-1}{2}\right)^{20} \\
& =\frac{1}{2^{20}}\left[(\sqrt{2 b-1}+1)^{20}+(\sqrt{2 b-1}-1)^{20}\right] \\
& =\frac{2}{2^{20}}\left[(\sqrt{2 b-1})^{20}+\binom{20}{2}(\sqrt{2 b-1})^{18}+\binom{20}{4}(\sqrt{2 b-1})^{16}+\ldots\right] \\
& =\frac{2}{2^{20}}\left[(2 b-1)^{10}+\binom{20}{2}(2 b-1)^{9}+\binom{20}{4}(2 b-1)^{8}+\ldots\right] \\
& =20
\end{aligned}
$$

We want to find the sum of distinct roots of the above polynomial in $b$; we first prove that the original polynomial is square-free. The conditions $x+y=1$ and $x^{20}+y^{20}=20$ imply that $x^{20}+(1-x)^{20}-20=0$; let $p(x)=x^{20}+(1-x)^{20}-20 . p$ is square-free if and only if $G C D\left(p, p^{\prime}\right)=c$ for some constant $c$ :

$$
\begin{aligned}
\operatorname{GCD}\left(p, p^{\prime}\right) & =\operatorname{GCD}\left(x^{20}+(1-x)^{20}-20,20\left(x^{19}-(1-x)^{19}\right)\right) \\
& =\operatorname{GCD}\left(x^{20}-x(1-x)^{19}+(1-x)^{19}-20,20\left(x^{19}-(1-x)^{19}\right)\right) \\
& =G C D\left((1-x)^{19}-20, x^{19}-(1-x)^{19}\right) \\
& =G C D\left((1-x)^{19}-20, x^{19}-20\right)
\end{aligned}
$$

The roots of $x^{19}-20$ are $\sqrt[19]{20^{k}} \exp \left(\frac{2 \pi i k}{19}\right)$ for some $k=0,1, \ldots, 18$; the roots of $(1-x)^{19}-20$ are $1-\sqrt[19]{20^{k}} \exp \left(\frac{2 \pi i k}{19}\right)$ for some $k=0,1, \ldots, 18$. If $x^{19}-20$ and $(1-x)^{19}-20$ share a common root, then there exist integers $m, n$ such that $\sqrt[19]{20^{m}} \exp \left(\frac{2 \pi i m}{19}\right)=1-\sqrt[19]{20^{n}} \exp \left(\frac{2 \pi i n}{19}\right)$; since the imaginary parts of both sides must be the same, we have $m=n$ and $\sqrt[19]{20^{m}} \exp \left(\frac{2 \pi i m}{19}\right)=\frac{1}{2} \Longrightarrow 20^{m}=\frac{1}{2^{19}}$, a contradiction. Thus we have proved that the polynomial in $x$ has no double roots. Since for each $b$ there exists a unique pair ( $x, y$ ) (up to permutations) that satisfies $x^{2}+y^{2}=b$ and $(x+y)^{2}=1$, the polynomial in $b$ has no double roots.
Let the coefficient of $b^{n}$ in the above equation be $\left[b^{n}\right]$. By Vieta's Formulas, the sum of all possible values of $b=x^{2}+y^{2}$ is equal to $-\frac{\left[b^{9}\right]}{\left[b^{0}\right]} .\left[b^{10}\right]=\frac{2}{2^{20}}\left(2^{10}\right)$ and $\left[b^{9}\right]=\frac{2}{2^{20}}\left(-\binom{10}{1} 2^{9}+\binom{20}{2} 2^{9}\right)$; thus $-\frac{\left[b^{9}\right]}{\left[b^{10}\right]}=-\frac{\binom{10}{1} 2^{9}-\binom{20}{2_{2}}^{9}}{2^{10}}=-90$.


problem: Suppose that a polynomial of the form $p(x)=x^{2010} \pm x^{2009} \pm \cdots \pm x \pm 1$ has no real roots. What is the maximum possible number of coefficients of -1 in $p$ ?

solution:
1005 Let $p(x)$ be a polynomial with the maximum number of minus signs. $p(x)$ cannot have more than 1005 minus signs, otherwise $p(1)<0$ and $p(2) \geq 2^{2010}-2^{2009}-\ldots-2-1=$ 1 , which implies, by the Intermediate Value Theorem, that $p$ must have a root greater than 1 .
Let $p(x)=\frac{x^{2011}+1}{x+1}=x^{2010}-x^{2009}+x^{2008}-\ldots-x+1$. -1 is the only real root of $x^{2011}+1=0$ but $p(-1)=2011$; therefore $p$ has no real roots. Since $p$ has 1005 minus signs, it is the desired polynomial.


problem:
Let $a, b, c, x, y$, and $z$ be complex numbers such that

$$
a=\frac{b+c}{x-2}, \quad b=\frac{c+a}{y-2}, \quad c=\frac{a+b}{z-2} .
$$

If $x y+y z+z x=67$ and $x+y+z=2010$, find the value of $x y z$.

solution:
-5892 Manipulate the equations to get a common denominator: $a=\frac{b+c}{x-2} \Longrightarrow x-2=$ $\frac{b+c}{a} \Longrightarrow x-1=\frac{a+b+c}{a} \Longrightarrow \frac{1}{x-1}=\frac{a}{a+b+c}$; similarly, $\frac{1}{y-1}=\frac{b}{a+b+c}$ and $\frac{1}{z-1}=\frac{c}{a+b+c}$. Thus

$$
\begin{aligned}
\frac{1}{x-1}+\frac{1}{y-1}+\frac{1}{z-1} & =1 \\
(y-1)(z-1)+(x-1)(z-1)+(x-1)(y-1) & =(x-1)(y-1)(z-1) \\
x y+y z+z x-2(x+y+z)+3 & =x y z-(x y+y z+z x)+(x+y+z)-1 \\
x y z-2(x y+y z+z x)+3(x+y+z)-4 & =0 \\
x y z-2(67)+3(2010)-4 & =0 \\
x y z & =-5892
\end{aligned}
$$


problem: How many polynomials of degree exactly 5 with real coefficients send the set $\{1,2,3,4,5,6\}$ to a permutation of itself?

solution:
714 For every permutation $\sigma$ of $\{1,2,3,4,5,6\}$, Lagrange Interpolation ${ }^{1}$ gives a polynomial of degree at most 5 with $p(x)=\sigma(x)$ for every $x=1,2,3,4,5,6$. Additionally, this polynomial is unique: assume that there exist two polynomials $p, q$ of degree $\leq 5$ such that they map $\{1,2,3,4,5,6\}$ to the same permutation. Then $p-q$ is a nonzero polynomial of degree $\leq 5$ with 6 distinct roots, a contradiction. Thus an upper bound for the answer is $6!=720$ polynomials.
However, not every polynomial obtained by Lagrange interpolation is of degree 5 (for example, $p(x)=$ $x$ ). We can count the number of invalid polynomials using finite differences ${ }^{2}$ A polynomial has degree less than 5 if and only if the sequence of 5 th finite differences is 0 . The 5 th finite difference of $p(1), p(2), p(3), p(4), p(5), p(6)$ is $p(1)-5 p(2)+10 p(3)-10 p(4)+5 p(5)-p(6)$; thus we want to solve $p(1)-5 p(2)+10 p(3)-10 p(4)+5 p(5)-p(6)=0$ with $\{p(1), p(2), p(3), p(4), p(5), p(6)\}=\{1,2,3,4,5,6\}$.
Taking the above equation modulo 5 , we get $p(1)=p(6)(\bmod 5) \Longrightarrow\{p(1), p(6)\}=\{1,6\}$. Note that $1-5 p(2)+10 p(3)-10 p(4)+5 p(5)-6=0$ if and only if $6-5 p(5)+10 p(4)-10 p(3)+5 p(2)-1=0$, so we may assume that $p(1)=1$ and double our result later. Then we have $\{p(2), p(3), p(4), p(5)\}=\{2,3,4,5\}$ and

$$
-p(2)+2 p(3)-2 p(4)+p(5)=1
$$

The above equation taken modulo 2 implies that $p(2), p(5)$ are of opposite parity, so $p(3), p(4)$ are of opposite parity. We do casework on $\{p(2), p(5)\}$ :
(a) $p(2)=2, p(5)=3 ; 2 p(3)-2 p(4)=0$ is a contradiction
(b) $p(2)=2, p(5)=5 ; 2 p(3)-2 p(4)=-2 \Longrightarrow p(3)-p(4)=-1 \Longrightarrow p(3)=3, p(4)=4$
(c) $p(2)=3, p(5)=2 ; 2 p(3)-2 p(4)=-2 \Longrightarrow p(3)-p(4)=-1 \Longrightarrow p(3)=4, p(4)=5$
(d) $p(2)=3, p(5)=4 ; 2 p(3)-2 p(4)=0$ is a contradiction
(e) $p(2)=4, p(5)=3 ; 2 p(3)-2 p(4)=2 \Longrightarrow p(3)-p(4)=1$ but $\{p(3), p(4)\}=\{2,5\}$, contradiction
(f) $p(2)=4, p(5)=5 ; 2 p(3)-2 p(4)=0$ is a contradiction
(g) $p(2)=5, p(5)=2 ; 2 p(3)-2 p(4)=4 \Longrightarrow p(3)-p(4)=2$, contradiction
(h) $p(2)=5, p(5)=4 ; 2 p(3)-2 p(4)=2 \Longrightarrow p(3)-p(4)=1 \Longrightarrow p(3)=3, p(4)=2$

Hence there are a total of $720-2(3)=714$ polynomials.


problem: Let $f(x)=c x(x-1)$, where $c$ is a positive real number. We use $f^{n}(x)$ to denote the polynomial obtained by composing $f$ with itself $n$ times. For every positive integer $n$, all the roots of $f^{n}(x)$ are real. What is the smallest possible value of $c$ ?

solution:
2 We first prove that all roots of $f^{n}(x)$ are greater than or equal to $-\frac{c}{4}$ and less than or equal to $1+\frac{c}{4}$. Suppose that $r$ is a root of $f^{n}(x)$. If $r=-\frac{c}{4}, f^{-1}(r)=\left\{\frac{1}{2}\right\}$ and $-\frac{c}{4}<\frac{1}{2}<1+\frac{c}{4}$ since $c$ is positive. Suppose $r \neq-\frac{c}{4}$; by the quadratic formula, there exist two complex numbers $r_{1}, r_{2}$ such that $r_{1}+r_{2}=1$ and $f\left(r_{1}\right)=f\left(r_{2}\right)=r$. Thus all the roots of $f^{n}(x)$ (except $\frac{1}{2}$ ) come in pairs that sum to 1 . No root $r$ of $f^{n}(x)$ can be less than $-\frac{c}{4}$, otherwise $f^{n+1}(x)$ has an imaginary root, $f^{-1}(r)$. Also, no root $r$ of $f^{n}(x)$ can be greater than $1+\frac{c}{4}$, otherwise its "conjugate" root will be less than $-\frac{c}{4}$.
Define $g(x)=\frac{1}{2}\left(1+\sqrt{1+\frac{4 x}{c}}\right)$, the larger inverse of $f(x)$. Note that $g^{n}(x)$ is the largest element of $f^{-n}(x)$ (which is a set). $g^{n}(0)$ should be less than or equal to $1+\frac{c}{4}$ for all $n$. Let $x_{0}$ be the nonzero real number such that $g\left(x_{0}\right)=x_{0}$; then $c x_{0}\left(x_{0}-1\right)=x_{0} \Longrightarrow x_{o}=1+\frac{1}{c}$. $x_{0}<g(x)<x$ if $x>x_{0}$ and $x<g(x)<x_{0}$ if $x<x_{0}$; it can be proved that $g^{n}$ converges to $x_{0}$. Hence we have the requirement that $x_{0}=1+\frac{1}{c} \leq 1+\frac{c}{4} \Longrightarrow c \geq 2$.
We verify that $c=2$ is possible. All the roots of $f^{-} n(x)$ will be real if $g(0) \leq 1+\frac{c}{4}=\frac{3}{2}$. We know that $0<\frac{3}{2} \Longrightarrow g(0)<\frac{3}{2}$, so $g^{2}(0)<\frac{3}{2}$ and $g^{n}(0)<g^{n+1}(0)<\frac{3}{2}$ for all $n$. Therefore all the roots of $f^{n}(x)$ are real.


problem:
Let $p(x)$ and $q(x)$ be two cubic polynomials such that $p(0)=-24, q(0)=30$, and
$$
p(q(x))=q(p(x))
$$
for all real numbers $x$. Find the ordered pair $(p(3), q(6))$.

solution:
$(3,-24)$ Note that the polynomials $f(x)=a x^{3}$ and $g(x)=-a x^{3}$ commute under composition. Let $h(x)=x+b$ be a linear polynomial, and note that its inverse $h^{-1}(x)=x-b$ is also a linear polynomial. The composite polynomials $h^{-1} f h$ and $h^{-1} g h$ commute, since function composition is associative, and these polynomials are also cubic.
We solve for the $a$ and $b$ such that $\left(h^{-1} f h\right)(0)=-24$ and $\left(h^{-1} g h\right)(0)=30$. We must have:
$$
a b^{3}-b=-24,-a b^{3}-b=30 \Rightarrow a=1, b=-3
$$

These values of $a$ and $b$ yield the polynomials $p(x)=(x-3)^{3}+3$ and $q(x)=-(x-3)^{3}+3$. The polynomials take on the values $p(3)=3$ and $q(6)=-24$.
Remark: The pair of polynomials found in the solution is not unique. There is, in fact, an entire family of commuting cubic polynomials with $p(0)=-24$ and $q(0)=30$. They are of the form

$$
p(x)=t x(x-3)(x-6)-24, q(x)=-t x(x-3)(x-6)+30
$$

where $t$ is any real number. However, the values of $p(3)$ and $q(6)$ are the same for all polynomials in this family. In fact, if we give the initial conditions $p(0)=k_{1}$ and $q(0)=k_{2}$, then we get a general solution of

$$
\begin{gathered}
p(x)=t\left(x^{3}-\frac{3}{2}\left(k_{1}+k_{2}\right) x^{2}+\frac{1}{2}\left(k_{1}+k_{2}\right)^{2} x\right)+\frac{k_{2}-k_{1}}{k_{2}+k_{1}} x+k_{1} \\
q(x)=-t\left(x^{3}-\frac{3}{2}\left(k_{1}+k_{2}\right) x^{2}+\frac{1}{2}\left(k_{1}+k_{2}\right)^{2} x\right)-\frac{k_{2}-k_{1}}{k_{2}+k_{1}} x+k_{2}
\end{gathered}
$$