How To Compose A Problem
How To Compose A Problem
Hung-Hsun Hans Yu
May 25, 2023
Each year, there is endless need for quality and novel problems in TSTs and contests
all around the world. For example, the entire Taiwan team selection process now requires
47 problems a year (it was 36 before). Even if, say, 25 problems are chosen from the
ISL, there are still 22 slots to fill in. On the other hand, coming up with a good problem
is not that easy, and very often the problem selection committee faces a lack of quality
problems. I thus think it is important for people done with contests to learn a bit and
compose some problems.
In this note, I will discuss some ways that one could compose a problem in with the
thought process behind the problems I proposed before. The purpose of this note is
mainly to share my two cents about problem-making to inspire people who are interested
in doing so. The hope is that people who are done with contests can propose some
interesting problems, and people who are still doing competitive math can also come up
with some interesting problems to think about themselves.
Hung-Hsun Hans Yu 1
Theorem 1.1 (Solymosi). For any finite set A, B ⊆, we have
|A|4/3
max(|A + B|, |A · B|) ≥ .
2⌈log2 |A|⌉1/3
The Erdős-Szemerédi conjecture states that the inequality still holds when the right
hand side is replaced by Ω(|A|2−ε ) for any ε > 0, but this is still wide open.
We can also ask this over Z/nZ. We know that there is a proper subset S of Z/nZ
such that S · S = S—we can simply take S to be all the quadratic residues. Then our
intuition from our experience with the sum-product problem in reals tells us that S is
unlikely an arithmetic progression. Is this actually the case? Can we prove this only
using tools available in Olympiads? The answer is (mostly) yes if S includes 0, and this
is 2021 TMO P2.
Problem 1.1 (2021 TMO P2). Find all integers n = 2k + 1 > 1 so that there exists a
permutation a0 , a1 , . . . , ak of 0, 1, . . . , k such that
We could also ask if the set contains constellations of other shapes. In fact, Szemerédi
shows the following.
Theorem 1.3 (Szemerédi). Any subset of N of positive upper density contains a con-
stellation of any given finite shape.
Well, we could also consider those questions over Z/N Z, and see what we can say
about the size of a subset of Z/N Z that contains a constellation of any shapes of size k.
To make the discussion simpler, I instead consider “ordered shapes” (v1 , . . . , vn ) and k
copies of Z/N Z, and I require a + bvi lies in the chosen subset of the i-th copy. I also set
b = 1 to make the question simpler. Then a simple counting argument shows that the
sum of the sizes of the subsets is at least kN (k−1)/k . It thus makes sense to set N to be a
k-th power and see if this is the optimal bound. After coming up with the construction
meeting this bound, we are done composing the problem!
Hung-Hsun Hans Yu 2
Problem 1.2 (2021 TST Round 1 Mock P6). Let n be a positive integer and N = n2021 .
There are 2021 concentric circles centered at O, and N equally-spaced rays are emitted
from point O. Among the 2021N intersections of the circles and the rays, some are
painted red while the others remain unpainted.
It is known that, no matter how one intersection point from each circle is chosen,
there is an angle θ such that after a rotation of θ with respect to O, all chosen points are
moved to red points. Prove that the minimum number of red points is 2021n2020 .
Hung-Hsun Hans Yu 3
actually not needed if we just view this as a geometry problem, where we notice that
knowing where the isometry sends two points to already almost determines the entire
isometry.
The usual inner product is not the only way we measure the length of a vector, or the
distance between two points. In fact, one measurement that also appears a lot in math
contests is the Manhattan distance, or equivalently the L1 norm. The simple question we
ask is thus: what are all the maps from R2 to R2 that preserves the Manhattan distance
between two points? It turns out that the same geometric insight solves this immediately,
but if we write it in terms of functional equations, then this would actually increase the
difficulty by a lot for students with little exposure to those kinds of natural questions
asked by mathematicians.
Problem 1.4 (2022 TMO P3). Find all functions f, g : R2 → R satisfying that
I was told by Yi Kung later that in fact there is a result showing that any endormor-
phism of a normed space that preserves norms is an affine map. This is the Mazur–Ulam
theorem. Well, I do not know anything in functional analysis and thought that people
would always assume affineness in these settings, but it seems that I am totally wrong
about this.
I don’t know about other people, but for me, it seems that this way of composing a
problem usually leads to a simple problem when it comes to geometry.
Hung-Hsun Hans Yu 4
1.6 2022 Taiwan TST Round 3 Mock Exam P6
The motivation question of this is easy: how “competitive” can a “streaming algorithm”
be for determining the median of a sequence? Here, the competitivity is determined by
its distance it outputs from the actual median, and it is streaming in the sense that the
sequence is given term by term, and we can choose a term to be our answer only after
it is immediately given. One other way to see this is that: if we have really limited
memory for the algorithm, so limited that we can only store constantly many integers in
the memory, how well can we do in determining the median?
Well, in order for any algorithm of this kind to work, we need to know beforehand
the range of the numbers n and the length of the sequence 2k + 1. It is also pretty easy
to see that when k is fixed and n is sufficiently large, we cannot do much better than
n/2; and in order to achieve n/2, we can simply cut the interval in half, and choose an
element when the half it belongs to already has k + 1 elements. Therefore, I decided to
see if I can actually determine the exact answer. It turned out pretty surprisingly that
it is indeed possible to determine the answer completely, and that the answer turned out
to be piecewise “linear” (in quotation marks as we need to round it to integers).
Problem 1.6 (2022 TST Round 3 Mock P6). Positive integers n and k satisfying
n ≥ 2k + 1 are known to Alice. There are n cards with numbers from 1 to n, randomly
shuffled as a deck, face down. On her turn, she does the following in order:
(i) She first flips over the top card of the deck, and puts it face up on the table. (ii)
Then, if Alice has not signed any card, she can sign the newest card now.
The game ends after 2k + 1 turns, and Alice must have signed on some card. Let A
be the number on the signed cards, and M be the (k + 1)st largest number among all
2k + 1 face-up cards. Alice’s score is |M − A|, and she wants the score to be as close to
zero as possible.
For each (n, k), find the smallest integer d = d(n, k) such that Alice has a strategy to
guarantee her score no greater than d.
Hung-Hsun Hans Yu 5
and n = 1, . . . , 6. I also wanted that E[x], E[x2 ], E[x3 ], E[x4 ] to be integers and possibly
small. Playing with the numbers a bit gives me a = 3, b = −4, n = 5. This leads to the
following problem.
Problem 1.7 (2023 TMO P5). Let m be a positive integer, and real numbers a1 , a2 , . . . , am
satisfy
1 ∑
m
ai = 1,
m i=1
1 ∑ 2
m
a = 11,
m i=1 i
1 ∑ 3
m
a = 1,
m i=1 i
and
1 ∑ 4
m
a = 131.
m i=1 i
Prove that m is a multiple of 7.
Hung-Hsun Hans Yu 6
averaging argument immediately gives that no matter what α ⃗ we choose, we can always
find a point in the orbit with sum of coordinates at most d/2, and this is tight when d is
even. A more careful analysis shows that for d odd the minimum necessarily has to drop
to almost (d − 1)/2, and as 2023 is an odd number, this problem suits really well for the
year!
Problem 1.9 (2023 TST Round 1 Mock Exam P6). For every positive integer M ≥ 2,
find the smallest real number CM such that for any integers a1 , a2 , . . . , a2023 , there always
exist some integer 1 ≤ k < M such that
ß ™ ß ™ ß ™
ka1 ka2 ka2023
+ + ··· + ≤ CM .
M M M
Here, {x} is the unique number in the interval [0, 1) such that x − {x} is an integer.
1. Try to wrap the fact up with some fancy stuff so it is not so obvious how the
problem is composed.
2. Take a special case of the problem to make it harder to see how the problem is
composed.
3. Test-solve it once again to see if there are other solutions that appear after morphing
the problem.
This works especially well for geometry problems, as this makes discovering a true and
interesting statement way easier, and wrapping geometry problems up is in general easier.
The advantage of this method is that you don’t need to worry about coming up with
a solution—you already have one in mind when you are composing it. The drawback of
this is that the problem might not look as elegant and natural, and sometimes there are
some unexpected solutions that totally mess up the difficulty (so make sure that you find
other people to test-solve).
Hung-Hsun Hans Yu 7
2.1 2021 Taiwan TST Round 2 Independent Study I-G
For every triangle with unequal sides, there is a special line associated to it called the Euler
line. An intuitive question is: is Euler line the locus of some moving point? Suppose
that the moving point P is given by the intersection of BQ and CR, where Q, R are
some other moving points. We know that O, G, H are points on the Euler line. Note
that O = BO ∩ CO and G = BMb ∩ CMc . This motivates us to constrain Q, R on
the perpendicular bisector ℓb , ℓc of AC, AB, respectively. Then we can also see that
H = B∞ℓb ∩ C∞ℓc .
Now we see that BQ∩CR does lie on the Euler line if (Q, R) = (O, O), (Mb , Mc ), (∞ℓb , ∞ℓc ).
The last question to ask here is what constraint is needed to put on Q and R. It is not
hard to see that we just need QR parallel to BC by the moving point technique. Thus we
have our first version of the problem: Given a triangle ABC and a line ℓ parallel to BC.
If Q, R are the intersections ℓ ∩ ℓb , ℓ ∩ ℓc respectively (where ℓb , ℓc are the perpendicular
bisectors of AC, AB, respectively), then BQ ∩ CR lies on the Euler line of ABC.
Well, this version kind of exposes the moving-point nature too much. To hide it a
bit, we can think of some ways to determine Q and R such that they are still points on
the perpendicular bisectors that determine the line parallel to BC. Since they are on
the perpendiculars, it is natural to set Q, R as circumcenters of ACD, ABD for some
point D. The condition that QR is parallel to BC can then be replaced by that BC is
perpendicular to AD. Note that in this case, due to symmetry, we know that the Euler
line of BCD also passes through BQ ∩ CR. After relabeling, we have the version that
appears on the test!
Problem 2.1 (2021 TST Round 2 Independent I-G). Let ABCD be a convex quadri-
lateral with pairwise distinct side lengths such that AC ⊥ BD. Let O1 , O2 be the
circumcenters of ∆ABD, ∆CBD, respectively. Show that AO2 , CO1 , the Euler line of
∆ABC and the Euler line of ∆ADC are concurrent.
In fact, we can hide this configuration in any configuration that has four points
A, B, C, D with AC ⊥ BD. However, I did not find a good configuration to hide this
property in, so I decided to propose this version.
Hung-Hsun Hans Yu 8
In fact, if this is the case, then we can always choose c to be the smallest number! I
conjectured that the smallest number always has to divide the other numbers given the
condition, and it turned out to be the case.
Problem 2.2 (2021 TST Round 2 Independent I-N). Let S be a set of positive integers
such that for every a, b ∈ S, there always exists c ∈ S such that c2 divides a(a + b). Show
that there exists an a ∈ S such that a divides every element of S.
Because of the discussion above, to prove it, one natural approach is to take a to be
the smallest number and b to be the smallest number not divisible by a. Then we must
have c ≥ b and so a(a + b) = c2 or 2c2 . This is not the contradiction yet, but it is not
hard to go from here to show that such b must not exist, and we are done composing yet
another problem once again!
Hung-Hsun Hans Yu 9
2.4 2021 Taiwan TST Round 3 Independent Study II-N
The motivation comes from a research question I encountered. A toy problem of the
question I encountered is the following.
Theorem 2.1. Let V ⊆ C[x, y] be a finite dimensional vector subspace so that there
exists (x, y) ∈ C2 such that f (x, y) = 0 for all f ∈ V . If any nonzero polynomial in V is
not irreducible, then there exists a nontrivial common factor among all the elements in
V.
The proof basically goes like this. We first focus on the case where V is of dimension 2.
Then we need to show that if f, g ̸= 0, V (f ) ∩ V (g) ̸= ∅ and af + bg is not irreducible for
all [a : b] ∈ P1 , then gcd(f, g) is non-constant. This follows from some algebrogeometric
fact. Once we have this, we can actually use it to show the general case. To see this, we
pick an arbitrary nonzero f ∈ V , and look at all the prime divisors of f . If for any prime
divisor p of f I can find gp ∈ V such that p ∤ gp , then I can find some linear combination
∑
g= ap gp
p prime divisor of f
such that gcd(f, g) = 1. By the contrapositive of the 2-dimensional case, we know that
there exists [a : b] ∈ P1 such that af + bg is irreducible. Thus
∑
af + bap gp
p prime divisor of f
Hung-Hsun Hans Yu 10
then x1 , . . . , xk have gcd larger than 1. This is the originally proposed version of the
problem. To make it easier, the actual version appearing in the test becomes the following.
Problem 2.4 (2021 TST Round 3 Independent II-N). Let n be a given positive integer.
We say that a positive integer m is n-good if and only if there are at most 2n distinct
primes p satisfying p2 | m.
(a) Show that if two positive integers a, b are coprime, then there exist positive integers
x, y so that axn + by n is n-good.
(b) Show that for any k positive integers a1 , . . . , ak satisfying gcd(a1 , . . . , ak ) = 1,
there exist positive integers x1 , . . . , xk so that a1 xn1 + a2 xn2 + · · · + ak xnk is n-good.
There, one can show if (a, b) ∈ S, then (b, a − b) ∈ S or something like that. I thus
started to try if I can use this idea to make up any interesting functional equation. My
original plan was to somehow compose the problem so that the conditions allow us to do
“Euclidean algorithm”. But there are two issues with this: the first is that this usually
requires two kinds of operations: (a, b) ∈ S implies (b, a) ∈ S and (a, b) ∈ S implies
(a, b − a) ∈ S. I do not see how one can compress those two operations into one equation.
Another more fatal issue is that the set S is destined to contain (0, d) for some nonzero
d, which would prove the non-existence of the functions we are to solve for.
This issue might be annoying, but unfortunately the only interesting thing we can say
about S is that if (0, d) ∈ S then d = 0. What this entails is that if we ever succeed in
solving the functional equation using only the set S, then we need to say something like:
if S is not of a particular form, then starting from some pair (a, b) in S, after finitely many
operations we end up at (0, d) for d ̸= 0, which is then a contradiction. The only one
operation I found that seemed reasonable to me was: if (a, b) ∈ S then (⌊ 2b ⌋, −⌈ 2b ⌉) ∈ S.
With this, one can see that if b is ever allowed to be nonzero, then we can eventually
produce (0, d) ∈ S for some d ̸= 0. This would then prove that f has to be the constant
function. Now it just remains to write down a condition that shows that if (a, b) ∈ S
then (⌊ 2b ⌋, −⌈ 2b ⌉) ∈ S. This is how I ended up with the proposed functional equation.
Problem 2.5 (2022 TST Round 1 Independent I-A). Find all f : Z → Z such that
(õ û) õ û
f (x) + f (y) f (x) + f (y)
f + f (x) = f (f (y)) +
2 2
Hung-Hsun Hans Yu 11
Me four years ago dreamt about the imaginary world where the consideration of the
set S becomes trendy in Olympiad math, but me now just thinks it’s impossible. I think
it is still worth trying for those passionate about writing problems though, and do let me
know if you end up with anything interesting.
Hung-Hsun Hans Yu 12
which is a contradiction.
In fact, this proof is exactly the proof of the proposed problem when s = 1, As = [n].
Generalizing this proof gives the this problem as stated in the exam.
Problem 2.7 (2022 TST Round 3 Mock P2). Let n, s, t be three positive integers,
and let A1 , . . . , As , B1 , . . . , Bt be non-necessarily distinct subsets of {1, 2, . . . , n}. For any
subset S of {1, . . . , n}, define f (S) to be the number of i ∈ {1, . . . , s} with S ⊆ Ai and
g(S) to be the number of j ∈ {1, . . . , t} with S ⊆ Bj . Assume that for any 1 ≤ x < y ≤ n,
we have f ({x, y}) = g({x, y}). Show that if t < n, then there exists some 1 ≤ x ≤ n so
that f ({x}) ≥ g({x}).
Hung-Hsun Hans Yu 13
OP + DP = D + 3P + π/2 (why does it not necessarily hold when P = D?), and so we
get 3P = D + ℓ, showing that the other three intersections indeed form an equilateral
triangle.
Of course, this cannot be the statement of the problem. In general, to hide any
conic, we can use Pascal’s theorem. Let ∞1 and ∞2 be the two intersections of h with
the infinity line. Then we may apply Pascal’s theorem on OOD∞1 P ∞2 to get that
X = ℓ ∩ P ∞1 , Y = OD ∩ P ∞2 and Z = D∞1 ∩ O∞2 . Also note that ∞1 , ∞2 are
exactly the directions that the angular bisectors of OD and ℓ point in, and so we exactly
know what they are. This also shows that Z is determined. We could thus construct P
backward: let X be a point on ℓ, Y be a point on OD such that XY Z are collinear, we
can let P be the intersection of Y ∞2 and X∞1 and assume that P is on the circle Γ.
We also need to hide the formal sum identity 3P = D + ℓ. The best way to hide this
is to construct two points differently and say that they are actually the same, but then
this identity has the “wrong order”: both sides have “order three” (i.e. 3P = 3N + θ
for some reference point N and some θ ∈ R/πZ). The most natural way to move things
around so that we have the right order is that 2P − D = ℓ − P . Now if Q = 2P − D,
then D + Q = 2P and so DQ is the line through D parallel to the tangent of P at Γ, or
the line perpendicular to the line OP . If Q′ = ℓ − P , then P + Q′ = ℓ and so P Q′ is the
line through P parallel to ℓ. Thus 3P = D + ℓ is equivalent to that the line through D
perpenciular to OP intersects the line through P parallel to ℓ at some point on Γ. After
relabelling, we get the proposed problem.
Problem 2.8 (2023 TMO P3). Let O be the center of a circle Γ, and let A, B be two
distinct points such that O, A, B are not collinear. Let M be the midpoint of AB, and
let P, Q be points on OA, OB such that P M Q are collinear. Let X be the intersection of
the line through P parallel to AB and the line through Q parallel to OM . Let Y be the
intersection of the line through X parallel to OA and the line through B perpendicular
to OX.
Show that if X is on Γ, then Y is on Γ.
The last thing to do is to find a proof that does not use any hyperbola nonsense. It
turns out that an easy (but interesting) trig-bash kills it. Saen Lee also found a solution
that is completely geometric without using hyperbola at all. This is thus a fair problem
to put in high school contest!
Hung-Hsun Hans Yu 14
place where F P is parallel to BC, it is clear by chasing angles that F Q is parallel to
BA1 and F R is parallel to CA1 . For this particular choice of P QR, we have that ABC
and P QR share the same centroid.
When I gave this to Sean Lee, he noticed that the underlying trick would be better
hidden if we just erase P from the diagram and ask them to show that the line connecting
the centroids of ABC and F QR is parallel to BC. I really like this idea, and so by
renaming, we have the following.
Problem 2.9 (2023 TST Round 1 Independent I-G). Let ABC be a triangle. Let
ABC1 , BCA1 , CAB1 be three equilateral triangles that do not overlap with ABC. Let P
be the intersection of the circumcircles of triangle ABC1 and CAB1 . Let Q be the point
on the circumcircle of triangle CAB1 so that P Q is parallel to BA1 . Let R be the point
on the circumcircle of triangle ABC1 so that P R is parallel to CA1 .
Show that the line connecting the centroid of triangle ABC and the centroid of triangle
P QR is parallel to BC.
Hung-Hsun Hans Yu 15
3 Modify the Prototype
Quite often, the very first version of the problem is not that suitable for proposal. If
one starts with the first method, it is quite often for them to generate a problem that
is either too easy or too hard. If one starts with the second method, it is sometimes
hard to look for a good way to hide the trick. I think the key in those scenarios is to
realize that we are composing problems, not solving problems. Unlike contestants, we
are allowed to modify the conditions at our will. Thus, if the question is too easy, ask
some deeper/harder question or get rid of some constraints; if the question is too hard,
add some more constraint or consider some other quantities or objects that are more in
control; if the trick or property considered is too exposed, maybe switch up a bit in how
it is hidden or simply choose another related trick to hide instead. This entire process is
more like an art work, and you should never feel constrained or limit the possibilities of
the problem!
The proof of this inequality can be obtained by induction on k and do Chebyshev’s sum
inequality on each inductive step. This inequality is an important correlation inequality
as it basically says that “the product of two positively correlated random variables has
a higher expected value than the product of the individual expected values”, which is
intuitively correct but hard to verify in many cases. It thus finds lots of applications in
statistical mechanics and probabilistic combinatorics.
For simplicity, I took k = 2. Let X1 take values in {a1 , . . . , an } ⊆≥0 and X2 take values
in {b1 , . . . , bn } ⊆≥0 . If f, g are decreasing in X1 , X2 , then the equallity in FKG holds when
X1 = X2 with probability 1. Therefore, we have a way to compose an inequality with
multiple equality cases here: we can let P(X1 = ai ) proportional to ai and P(X2 = bi )
proportional to bi . Then the equality would hold when all nonzero ai ’s and bi ’s are equal
to each other.
Now I oopsed a bit and thought that f = X1 /(X1 X2 + 1) and g = X2 /(X1 X2 + 1)
were both increasing in X1 , X2 . Assuming that this were the case, then by the FKG
inequaltiy,
( )( )( ) ( )( )
∑ ∑ ∑ a2i b2j ∑ ai b j ∑ ai b j
ai bj ≥ ai · bj · .
i j i,j
(ai bj + 1)2 i,j
ai b j + 1 i,j
ai b j + 1
∑ ∑
This is kind of ugly, so let us set S = i ai = j bj . Note that ai bj /(ai bj + 1)2 ≤ 1/4,
so the left hand side is upper bounded by S 4 /4. We still have some of the equality cases
Hung-Hsun Hans Yu 16
remaining when S is some positive integer at most n, and we get that
( )( )
∑ ai b j ∑ ai b j 1
ai · bj · ≤ S 4.
i,j
ai b j + 1 i,j
ai b j + 1 4
Calvin Hsu verified that despite we arrived at this point with a totally wrong proof, this
inequality is still true when S = n/2 with the help of computer. Obviously though, this
cannot be an actual problem if we∑ do not have an accessible proof. What I noticed is that,
if mA is the
∑ minimum value of j ai bj /(ai bj + 1) for nonzero ai , and mB is the minimum
value of i ai bj /(ai bj + 1) for nonzero bj , then the left hand side can be bounded by
S 2 mA mB . Assuming that S ̸= 0, then we get that
√ 1
min(mA , mB ) ≤ mA mB ≤ S.
2
Setting S = n/2 and doubling n, we get the proposed problem. After checking that there
are actually plenty of easy ways to solve the problem, I decided to propose this version
of the problem.
Problem 3.1 (2021 TST Round 1 Mock P4). Let n be a positive integer. ∑ For∑each 4n-
tuple of nonnegative real numbers a1 , . . . , a2n , b1 , . . . , b2n that satisfy 2n a
i=1 i = 2n
j=1 bj =
n, define the sets
{ 2n }
∑ ai b j ∑2n
ai b j
A := : i ∈ {1, . . . , 2n} s.t. ̸= 0 ,
ab +1
j=1 i j
ab +1
j=1 i j
{ 2n }
∑ ai b j ∑
2n
ai b j
B := : j ∈ {1, . . . , 2n} s.t. ̸= 0 .
i=1
ai b j + 1 i=1
ai b j + 1
Let m be the minimum element of A ∪ B. Determine the maximum value of m among
those derived from all such 4n-tuples a1 , . . . , a2n , b1 , . . . , b2n .
Hung-Hsun Hans Yu 17
Problem 3.2 (2021 TST Round 2 Mock P5). Let ∥x∥∗ = (|x| + |x − 1| − 1)/2. Find
all f : N → N such that
f (∥f (x)−x∥∗ ) (x) = x, ∀x ∈ N.
Here f (0) (x) = x and f (n) (x) = f (f (n−1) (x)) for all n ∈ N.
At this point, I still don’t know if O(n2 /k) is the best possible answer. I also don’t
know if we can do as good without knowing if two vertices have distance exactly k. Inter-
Hung-Hsun Hans Yu 18
ested readers are welcome to think about those two problems, and I would be interested
in knowing the answer.
Hung-Hsun Hans Yu 19
z | xy(x + y + z),
and
x + y + z | xyz,
show that xyz(x + y + z) is a perfect square.
At this point we have already composed 2022 TMO P1, but I did not stop here. I
really wanted to add some constraint so that only the right triangles survive. If we look
back at the Pythagorean triple example and compute the corresponding x, y, z, we will
see that gcd(y, z) = 1 and x | yz. This corresponds to having a = s = 1, and now we have
x(x+y+z) = bctu = yz. This last equation is equivalent to (x+y)2 +(x+z)2 −(y+z)2 = 0,
showing that the triangle must have a right angle! This corresponds to the two alternative
versions that I proposed, and they can be found on AoPS.
Hung-Hsun Hans Yu 20
x, y to get something useful that ends up solving the entire FE. This reemphasizes the
importance of test-solving if you write a problem with some trick in mind—you really
want to make sure that there is not some unexpectedly sad/dumb solution that you
overlook.
Though it was a bit sad, I decided to see if I can solve the FE without g being
strictly increasing, in a way that I prefer more. After a long struggle, I finally discovered
the actual main trick of the problem: if f (x) > f (f (2) (x) + y) for any x, y > 0, then
f (4) (x) = f (2) (x)! At this point, the “Galois trick” is already all gone—or is it? To me, it
seems that the proof of this claim still pertains some characteristic of the original trick.
Anyways, having discovered this, I started to play around with this trick and see what
FE I can write out. After a really long trial-and-error, I found two versions that I think
are more reasonable.
( )
Second version. xf (x) = xf f (2) (x) + y + yf (x + y).
( )
Third version. f (x) = f f (2) (x) + y + yf (x)f (x + y).
Then... it’s time to test-solve! It turns out that there is another solution for the second
version (due to Ting-Wei William Chao) that proceeds by analyzing limx→0 xf (x). On
the other hand, there does not seem to be any reasonably short alternative solution for
the third version, so I was already pretty satisfied with it. One unfortunate charactersitic
of it is that the y variable is pretty exposed, and one can get injectivity basically for free
because of that. I tried really hard to wrap everything up with f ’s, but this more or
less makes proving injectivity really hard, and, as a consequence, making it hard going
from f (4) (x) = f (2) (x) to f (2) (x) = x. After another long trial-and-error (this time with
Pang-Cheng Wu), I finally ended with the proposed version (and the proof of injectivity
is due to him)!
Problem 3.5 (2022 USAMO P3). Let R>0 be the set of all positive real numbers. Find
all functions f : R>0 → R>0 such that for all x, y ∈ R>0 we have
I had this idea first in early 2017, and the final version came up in (I think) mid 2018,
so it was a long time to refine and crystallize all the ideas. I am glad that after a long
wait, I can finally share the FE I will be most proud of with other people (the second
being 2016 Taiwan TST Round 2 Quiz 1 P2).
for all k ≥ 1, where C > 0 and α > 1 are some constants. We need to show that there is
some constant M > 0 and k0 ∈ N depending only on C and α such that ck < M maxi≤k0 ci
Hung-Hsun Hans Yu 21
for all k. What was done in the note is that we take dk = (1 + C ′ α−k )ck for some C ′ > 0
chosen sufficiently large so that
and
(1 + C ′ α−2k )A ≥ (1 + C ′ α−k )(1 + (A + 1)Cα−k ).
If A > 1 and (α − 1)C ′ > AC, then both hold for sufficiently large k. Therefore for some
k0 , we have
dk ≤ dk−1 + Cα−k [A(d2k − dk ) + (dk−1 − dk )]
holds for all k ≥ k0 . Since dk is eventually zero, we can choose kmax that maximizes dk
when k ≥ k0 . If kmax > k0 , then the inequality above leads to an immediate contradiction.
Therefore kmax = k0 and so dk ≤ dk0 for all k ≥ k0 , showing that ck ≤ (1 + C ′ α−k0 )ck0 for
all k ≥ k0 .
I thought that this substitution is hard to motivate, so I tried to simplify the setting
and set a question based on it. If we take α = 2, C = 1, and ask ck to be eventually 1
instead of 0, then we now actually get a lower√bound on ck0 as long as k0√is sufficiently
large. For example, if we take A = 9(7 − 21)/14 and C ′ = 20 − 4 21, then the
inequalities hold for k ≥ 3. This shows that
1
c3 ≥ √ ≈ 0.827.
1 + (20 − 4 21) · 2−3
Then, I gave it to Cheng-Ying, who then told me that this bound is weaker than what
he could get by a simple argument considering the largest element. His method also does
not depend on the assumption that each term is non-negative. This is when I realized
that Tao probably took on an unnecessarily harder approach (which explains why the
substitution seems so unmotivated), and probably Cheng-Ying’s method is the way it
should have been done. Anyways, the new method makes both the problem statement
and the solution look way cleaner, and this becomes the proposed problem.
Problem 3.6 (2022 TST Round 1 Independent I-A). Let a1 , a2 , a3 , . . . be a sequence
of reals such that there exists N ∈ N so that an = 1 for all n ≥ N , and for all n ≥ 2 we
have
an ≤ an−1 + 2−n a2n .
Show that ak > 1 − 2−k for all k ∈ N.
Hung-Hsun Hans Yu 22
trick does not work anymore, but the same idea with some small modification does the
magic. Indeed, for every x, we know that there exits x′ such that gcd(x′ , a) = 1 and
x ≤ x′ < x + a. Then we have f (ax′ ) = f (a)f (x′ ) ≥ f (a)f (x). Similarly, there exists x′′
such that gcd(x′′ , a) = 1 and x − a < x′′ ≤ x, and this shows that f (ax′′ ) ≤ f (a)f (x).
With this modification, it is now not hard to see how to modify the original solution.
In fact, the only condition we need is that for every a ∈ N, there is a constant ca so
that for every x ∈ N, there exists x ≤ x′ < x + ca such that f (ax′ ) = f (a)f (x′ ). By
taking the contrapositive, we get the following.
Problem 3.7 (2023 TST Round 1 Independent I-A). Let f : N → R>0 be a given
increasing functions that take positive values. For any pair (m, n) of positive integers,
we call it disobedient if f (mn) ̸= f (m)f (n). For any positive integer m, we call it ultra-
disobedient if for any nonnegative integer N , there are always infinitely many positive
integers n satisfying that (m, n), (m, n + 1), . . . ,
(m, n + N ) are all disobedient pairs.
Show that if there exists some disobedient pair, then there exists some ultra-disobedient
positive integer.
Hung-Hsun Hans Yu 23
let a1 , . . . , an be positive integers at least two, and we define
®
a1 if n = 1;
[a1 , a2 , . . . , an ] = −1
a1 − [a2 , . . . , an ] if n > 1.
It turns out that all rational number greater than 1 admits a unique expression as a
Hirzebruch–Jung continued fraction (basically via the same proof as the one for the usual
continued fraction). However, it enjoys some other properties that the usual continued
fraction does not have due to its tight connection to toric geometry. Roughly speaking,
the singularities of toric surface can be classified by a pair of two coprime numbers
p > q ≥ 1, and (p, q) describes the same singularity as (p′ , q ′ ) if and only if p = p′
and qq ′ ≡ 1 (mod p). The Hirzebruch–Jung continued fraction is related in the following
sense: there is some standard way of resolve this singularity by blow-ups, and the minimal
way of doing so corresponds to exactly the sequence (a1 , . . . , an ) if [a1 , . . . , an ] = p/q.
Note that p/q ′ should correspond to the same sequence then—and it does, but just in
reverse: [an , . . . , a1 ] = p/q ′ . This would be unclear without knowing this connection (but
can however still be proved by induction), but for people who know toric geometry, this
should be clear.
Now if qq ′ ≡ 1 mod p, then we know that (p − q)(p − q ′ ) ≡ 1 mod p. This shows that
if [b1 , . . . , bm ] = p/(p − q), then [bm , . . . , b1 ] = p/(p − q ′ ). This is originally how I would
want to make the problem as, but as I was trying to find out if this was well-known, I
came across a handout: https://arxiv.org/pdf/math/0506432.pdf. It turns out that
there is actually an algorithm that computes [b1 , . . . , bm ] from [a1 , . . . , an ]! Basically, for
each [a1 , . . . , an ] we put (ai −1) points in the i-th column, where the bottom-most point of
the (i + 1)-th column is at the right of the top-most point of the i-th column. If we reflect
this diagram with respect to the x = y axis, then we get the diagram for [b1 , . . . , bn ]!
Therefore by double-counting (actually triple-counting here) the number of points in the
diagram, we get
∑ n ∑m
m+n−1= (ai − 1) = (bm − 1),
i=1 j=1
Now if you ∑
go back to the original statement, you would realize that this f is indeed just
computing ni=1 (ai − 3)!
Problem 3.9 (2023 Taiwan TST Round 1 Mock P1). Let Q>1 be the set of rational
numbers greater than 1. Let f : Q>1 → Z be a function that satisfies
{
q−3 ( ) if q is an integer,
f (q) =
⌈q⌉ − 3 + f ⌈q⌉−q
1
otherwise.
Of course, we need to make sure that toric geometry is not the only way to go. But the
handout above already gives an elementary proof for the relation between [a1 , . . . , an ] and
[b1 , . . . , bm ], and there is actually another easier inductive proof for the problem stated
above. This problem is thus good to go!
Hung-Hsun Hans Yu 24
3.10 2023 Taiwan TST Round 2 Independent Study I-N
The starting point of this problem was that I was trying to see if I could make up an
FE with bivariate polynomials. After playing around some equations written randomly,
I arrived at f (x, y) = f (x + y, y). Now this is pretty boring, as the fact that f depends
polynomially in the first variable already forces f (x, y) = f (0, y) whenever y ̸= 0, showing
that f is a polynomial that only depends on the second variable.
The argument above uses crucially the polynomial dependence in the first variable.
What if we remove that? So now let’s say that . . . , f−2 , f−1 , f0 , f1 , f2 , . . . is an infinite
sequence of polynomials such that fx (y) = fx+y (y) for all x, y ∈ Z. It turns out that it
is pretty easy to construct some crazy solution if we only ask the polynomials to have
rational coefficients. In this construction though, the denominators of the polynomials
could be arbitrarily large, so it is natural to ask if there is a non-constant (in x) solution
if we ask all the polynomials to have integer coefficients. It happens to be the case that
once we add this restriction, we must have that all polynomials in the sequence must be
the same.
Problem 3.10 (2023 TST Round 2 Independent I-N). Let fx be a polynomial with
real coefficients for every x ∈ Z. Suppose that
Cheng-Ying’s conjecture was that this algorithm should take O(N K log N ) time. To
prove this, we need to show that
∑
t ∑
t
di log di + d′i log d′i ≤ CN log N
i=1 i=1
Hung-Hsun Hans Yu 25
for some C < 2 in order to close the induction. I originally did this by some really
messy calculation, but it seemed like when C = 1 this should still be true, and I felt like
there should be a much better way of doing this. After a bit, I realized ∑N that the correct
way to view this should probably be writing the left hand side as i=1 log s1,i + log s2,i ,
where s1,i is the number of repetitions of the second half of the i-th string, and s2,i is
the number of repetitions of the first half of the i-th string (note that the indices might
look like the opposite of what it should naturally be, but the reason for this would be
obvious later). Note that log s1,i + log s2,i = log s1,i s2,i , which is the log of the “score”
we will eventually define in the problem. The ∑Nrelevance of this algorithmic problem
should now start to be clear. To show that i=1 log s1,i s2,i ≤ N log N , it is the same
(∏ )1/N
as showing N
i=1 s 1,i s 2,i ≤ N . Now we need to use the crucial assumption that
all strings are distinct (as otherwise it could be the case that s1,i = s2,i = N for all i).
∑N
In
(∑t this case, it
) (∑t follows
) from a simple AM-GM consideration: note that i=1 s1,i s2,i ≤
′ 2
i=1 di i=1 di = N (where we use that the strings are distinct; details omitted).
Therefore the desired inequality follows immediately from AM-GM.
I thought more about it, and realized that there should be a K-dimensional analog
of what happened above: for j ∈ [K] and i ∈ [N ], let sj,i be the number of repetitions of
∑ ∑K
the i-th string if we delete the j-th character from all strings. Then N i=1 j=1 log sj,i ≤
N log N .
From the argument above, we know that what exactly happens is that we can prove
( )1/N
∏
N
s1,i · · · sK,i ≤ N,
i=1
i.e. the geometric mean of the “scores” Si = s1,i · · · sK,i is at most N . The geometric
mean is also the 0-th power mean, and it is natural to ask what is the smallest t such
that the t-th power mean of the scores is still bounded above by N . An easy construction
with N = M K + 1 and s1,1 = · · · = sK,1 = M + 1 immediately shows that t ≥ 1/(K − 1),
and it turns out that this can be proved using induction and Hölder’s inequality! This is
a pretty legit problem now, and this is what appears in the contest too.
Problem 3.11 (2023 TST Round 2 Independent II-A). For each positive integer k
greater than 1, find the largest real number t such that the following hold: Given n
(1) (1) (n) (n)
distinct points a(1) = (a1 , . . . , ak ), . . ., a(n) = (a1 , . . . , ak ) in Rk , we define the score
of the tuple a(i) as
∏
k
′
#{1 ≤ i′ ≤ n such that πj (a(i ) ) = πj (a(i) )}
j=1
where #S is the number of elements in set S, and πj is the projection Rk → Rk−1 omitting
the j-th coordinate. Then the t-th power mean of the scores of all a(i) ’s is at most n.
Hung-Hsun Hans Yu 26
integers be exactly one greater √ than there geometric
√ mean?
√ 2 I started with n = 2, and
I realized that if (a + b)/2 = ab + 1, then ( a − b) = 2, showing that (a, b) =
(2t2 , 2(t + 1)2 ). The next
√ question is of course n = 3, and I found out that if I take 1, 2, 4,
then (1 + 2 + 4)/3 = 1 · 2 · 4 + 13 , so we just need to multiply them by three to get a
3
solution. At that point, there were two directions that I alternated between: I wanted to
find the solutions for n = 3, or ask for which n is there a solution. It turns out that the
1, 2, 4 solution can be generalized to one 1, one 4 and a bunch of 2’s. After finding this
out, I focused more on solving the equation for n = 3.
With more thoughts, I realized that actually (3t2 , 3t(t + 1), 3(t + 1)2 ) are all solutions.
My original strategy was to also factorize the equation as
(√ √ √ )( √ √ √ √ √ √ )
a + b + 3 c ( 3 a − b)2 + ( 3 a − 3 c)2 + ( b − 3 c)2 = 6.
3 3 3 3
This shows that the second factor cannot be too large, and so a, b, c has to be somewhat
close to each other. The only other constraints that might help us is that abc is a cube.
However, I did not see how this could allow us to prove that (3t2 , 3t(t + 1), 3(t + 1)2 )
are all the solutions. In fact, I believed that there must be other solutions, as a, b, c just
need to be close to each other while making abc a cube. It turned out that there were
indeed other solutions, the smallest being (3 · 108, 3 · 125, 3 · 128), but I only found this
afterwards via a compute search.
At this point, it was pretty clear that the strategy to go is to use some inequalities. To
make
√ it easier for the inequalities to work, I decided to change the equation to a + b + c =
3
3 abc + 1. Also the solution (t2 , t(t + 1), (t + 1)2 ) should be almost the equality case for
whatever inequalities we would use. Note that t2 (t + 1)2 is always a perfect square, and
in some sense they are the closest possible given their “sizes” and that they multiply to
a square. This made me think that maybe by adding the condition that ac is a perfect
square, the equation would not have any other solutions. This was indeed the case by
AM-GM, and the Diophantine equation was done!
Problem 3.12 (2023 TST Round 3 Mock P4). Find all positive integers a, b and c
such that ab is a square, and
√
a + b + c − 3 abc = 1.
3
Hung-Hsun Hans Yu 27