← Back to Blogs

May 12, 2026

Solving a Short but Nontrivial Introductory Olympiad Problem from China

A rigorous solution to my fifth grade neighbor's insanely difficult math homework.

#math #algebra
IntroductionApparently, my new neighbor in Shanghai is a genius fifth grader who is enrolled in a high school curriculum right now. It should not be too surprising to say that he is preparing for the China Mathematical Olympiad (CMO). Today, he showed me one of his homework problems from his olympiad training class, and I was stumped.The topic was “Set Theory.” I thought that, surely as a college student, a fifth grader’s set theory problem cannot be difficult?He pointed at problem 3 on his homework, telling me that this is the first problem he could not solve. He also reminded me that problems 4 through 6 are from the CMO and the IMO, so he also did not solve them (since when are 5th graders solving IMO problems now?).After staring at the problem for ten minutes, I could not solve the second part of the problem. As a redemption after the embarrassment, I will write up my solution here. Because this problem has so many edge cases and places for mistakes, I will write a fully-rigorous solution.Oh yeah, this problem reminds me of exactly why I did not do olympiad math in China. If you do enough Gaolian problems, you’ll see some sort of pattern among them… Note that I am not sure about the source of this problem — it looks like the style of a past Gaolian round 2 (China’s equivalent of AIME) exam. Please let me know if you find the source of this problem.1% Set Theory, 99% Algebra.ProblemFor a given 𝑎, define 𝑓(𝑥)=𝑎𝑥21. Define sets 𝐴={𝑥|𝑓(𝑥)=𝑥} and 𝐵={𝑥|𝑓(𝑓(𝑥))=𝑥}.(a) Prove that 𝐴𝐵.(b) Determine, with proof, all possible values of 𝑎 for which 𝐴=𝐵.RemarkPart (a) is trivial — it simply tests whether the contestant knows what a subset is.Part (b)… no idea why this is on the set theory homework. My only bottleneck was the algebra observations.My Solution(a) Proof. Let 𝑥𝐴. Then, 𝑓(𝑥)=𝑥, so 𝑓(𝑓(𝑥))=𝑓(𝑥)=𝑥, which means 𝑥𝐵. Therefore, 𝐴𝐵. (b) I claim that the set of all possible values of 𝑎 is [14,34].Proof. We break the proof down into two claims.Claim 1: 𝐴 if and only if 𝑎14.Proof of claim 1.() First note that if 𝑎=0, the claim trivially holds because 014.For the case where 𝑎0, if 𝐴, then 𝑓(𝑥)𝑥=𝑎𝑥2𝑥1 has a root. Therefore, Δ=(1)24(𝑎)(1)0, so 𝑎14.() First note that if 𝑎=0, then 𝑓(𝑥)=1, so 𝑓(1)=1 is a fixed point, hence 1𝐴, so 𝐴.For the case where 𝑎0, if 𝑎14, then Δ0, so 𝑓(𝑥)𝑥 has at least one real root, which means there exists some 𝑥 for which 𝑥𝐴. Claim 2: 𝐴=𝐵 if and only if 𝑎34.Proof of claim 2. We have that 1=𝑓(𝑥)𝑎𝑥2. Therefore,𝑓(𝑓(𝑥))𝑥=𝑎(𝑓(𝑥))21𝑥=𝑎(𝑓(𝑥))2+𝑓(𝑥)𝑎𝑥2𝑥=𝑎(𝑓(𝑥)𝑥)(𝑓(𝑥)+𝑥)+(𝑓(𝑥)𝑥)=(𝑎(𝑓(𝑥)+𝑥)+1)(𝑓(𝑥)𝑥)holds for all 𝑥.For convenience, denote 𝑔(𝑥)=𝑎2𝑥2+𝑎𝑥+(1𝑎). Then 𝑓(𝑓(𝑥))𝑥=𝑔(𝑥)(𝑓(𝑥)𝑥).First note that if 𝑎=0, then we get 𝑓(𝑓(𝑥))𝑥=(0+1)(𝑓(𝑥)𝑥)=𝑓(𝑥)𝑥 for all 𝑥, so 𝐴=𝐵.Then, we will prove claim 2 for the case where 𝑎0.() Since 𝐴=𝐵, it must be that 𝐵𝐴. Hence any root of 𝑓(𝑓(𝑥))𝑥 is also a root of 𝑓(𝑥)𝑥. Therefore, either 𝑔(𝑥) has no real roots, or the roots of 𝑔(𝑥) is a subset of the roots of 𝑓(𝑥)𝑥.Case 1: 𝑔(𝑥) has no real roots. Then, Δ=𝑎24𝑎2(1𝑎)<0, so 𝑎2(4𝑎3)<0, and since 𝑎0, this gives 𝑎<34.Case 2: 𝑔(𝑥) has at least one real root, and all roots of 𝑔(𝑥) is also a root of 𝑓(𝑥)𝑥.In this case, 𝑟, 𝑔(𝑟)=0𝑓(𝑟)𝑟=0.Let 𝑟 be a root of 𝑔(𝑥). Then, both 𝑎2𝑟2+𝑎𝑟+(1𝑎)=0 and 𝑎𝑟2𝑟1=0. Substitution gives 𝑎(𝑟+1)+𝑎𝑟+(1𝑎)=0, so 2𝑎𝑟+1=0, and since 𝑎0, this gives 𝑟=12𝑎. Therefore, 𝑔(𝑥) must have exactly one real root, and it must be 12𝑎. In this case, Δ=0, so 𝑎2(4𝑎3)=0, and since 𝑎0, we have 𝑎=34.That concludes all cases. In all cases, 𝑎34.() As above, if 𝑎<34, then 𝑔(𝑥) has no real roots, so 𝑓(𝑓(𝑥))𝑥=0𝑓(𝑥)𝑥=0, so 𝐵𝐴.If 𝑎=34, then 𝑔(𝑥) has exactly one root 12𝑎=23, and in this case, 𝑓(23)(23)=(34)(23)21+23=0, so 𝑓(𝑓(𝑥))𝑥=0𝑓(𝑥)𝑥=0, which means 𝐵𝐴.Hence if 𝑎34 and 𝑎0, then 𝐵𝐴. Furthermore, in part (a), we deduced that 𝐴𝐵. Therefore, we have 𝑎34𝑎0𝐴=𝐵.Therefore, both directions are proven, and in the case where 𝑎0, we have 𝑎34 if and only if 𝐴=𝐵.Combining this with the 𝑎=0 case, we have proven claim 2. By claim 1 and claim 2, 𝐴=𝐵 and 𝐴 if and only if 𝑎14 and 𝑎34, so the set of all possible values of 𝑎 is [14,34].
IntroductionApparently, my new neighbor in Shanghai is a genius fifth grader who is enrolled in a high school curriculum right now. It should not be too surprising to say that he is preparing for the China Mathematical Olympiad (CMO). Today, he showed me one of his homework problems from his olympiad training class, and I was stumped.The topic was “Set Theory.” I thought that, surely as a college student, a fifth grader’s set theory problem cannot be difficult?He pointed at problem 3 on his homework, telling me that this is the first problem he could not solve. He also reminded me that problems 4 through 6 are from the CMO and the IMO, so he also did not solve them (since when are 5th graders solving IMO problems now?).After staring at the problem for ten minutes, I could not solve the second part of the problem. As a redemption after the embarrassment, I will write up my solution here. Because this problem has so many edge cases and places for mistakes, I will write a fully-rigorous solution.Oh yeah, this problem reminds me of exactly why I did not do olympiad math in China. If you do enough Gaolian problems, you’ll see some sort of pattern among them… Note that I am not sure about the source of this problem — it looks like the style of a past Gaolian round 2 (China’s equivalent of AIME) exam. Please let me know if you find the source of this problem.1% Set Theory, 99% Algebra.ProblemFor a given 𝑎, define 𝑓(𝑥)=𝑎𝑥21. Define sets 𝐴={𝑥|𝑓(𝑥)=𝑥} and 𝐵={𝑥|𝑓(𝑓(𝑥))=𝑥}.(a) Prove that 𝐴𝐵.(b) Determine, with proof, all possible values of 𝑎 for which 𝐴=𝐵.RemarkPart (a) is trivial — it simply tests whether the contestant knows what a subset is.Part (b)… no idea why this is on the set theory homework. My only bottleneck was the algebra observations.My Solution(a) Proof. Let 𝑥𝐴. Then, 𝑓(𝑥)=𝑥, so 𝑓(𝑓(𝑥))=𝑓(𝑥)=𝑥, which means 𝑥𝐵. Therefore, 𝐴𝐵. (b) I claim that the set of all possible values of 𝑎 is [14,34].Proof. We break the proof down into two claims.Claim 1: 𝐴 if and only if 𝑎14.Proof of claim 1.() First note that if 𝑎=0, the claim trivially holds because 014.For the case where 𝑎0, if 𝐴, then 𝑓(𝑥)𝑥=𝑎𝑥2𝑥1 has a root. Therefore, Δ=(1)24(𝑎)(1)0, so 𝑎14.() First note that if 𝑎=0, then 𝑓(𝑥)=1, so 𝑓(1)=1 is a fixed point, hence 1𝐴, so 𝐴.For the case where 𝑎0, if 𝑎14, then Δ0, so 𝑓(𝑥)𝑥 has at least one real root, which means there exists some 𝑥 for which 𝑥𝐴. Claim 2: 𝐴=𝐵 if and only if 𝑎34.Proof of claim 2. We have that 1=𝑓(𝑥)𝑎𝑥2. Therefore,𝑓(𝑓(𝑥))𝑥=𝑎(𝑓(𝑥))21𝑥=𝑎(𝑓(𝑥))2+𝑓(𝑥)𝑎𝑥2𝑥=𝑎(𝑓(𝑥)𝑥)(𝑓(𝑥)+𝑥)+(𝑓(𝑥)𝑥)=(𝑎(𝑓(𝑥)+𝑥)+1)(𝑓(𝑥)𝑥)holds for all 𝑥.For convenience, denote 𝑔(𝑥)=𝑎2𝑥2+𝑎𝑥+(1𝑎). Then 𝑓(𝑓(𝑥))𝑥=𝑔(𝑥)(𝑓(𝑥)𝑥).First note that if 𝑎=0, then we get 𝑓(𝑓(𝑥))𝑥=(0+1)(𝑓(𝑥)𝑥)=𝑓(𝑥)𝑥 for all 𝑥, so 𝐴=𝐵.Then, we will prove claim 2 for the case where 𝑎0.() Since 𝐴=𝐵, it must be that 𝐵𝐴. Hence any root of 𝑓(𝑓(𝑥))𝑥 is also a root of 𝑓(𝑥)𝑥. Therefore, either 𝑔(𝑥) has no real roots, or the roots of 𝑔(𝑥) is a subset of the roots of 𝑓(𝑥)𝑥.Case 1: 𝑔(𝑥) has no real roots. Then, Δ=𝑎24𝑎2(1𝑎)<0, so 𝑎2(4𝑎3)<0, and since 𝑎0, this gives 𝑎<34.Case 2: 𝑔(𝑥) has at least one real root, and all roots of 𝑔(𝑥) is also a root of 𝑓(𝑥)𝑥.In this case, 𝑟, 𝑔(𝑟)=0𝑓(𝑟)𝑟=0.Let 𝑟 be a root of 𝑔(𝑥). Then, both 𝑎2𝑟2+𝑎𝑟+(1𝑎)=0 and 𝑎𝑟2𝑟1=0. Substitution gives 𝑎(𝑟+1)+𝑎𝑟+(1𝑎)=0, so 2𝑎𝑟+1=0, and since 𝑎0, this gives 𝑟=12𝑎. Therefore, 𝑔(𝑥) must have exactly one real root, and it must be 12𝑎. In this case, Δ=0, so 𝑎2(4𝑎3)=0, and since 𝑎0, we have 𝑎=34.That concludes all cases. In all cases, 𝑎34.() As above, if 𝑎<34, then 𝑔(𝑥) has no real roots, so 𝑓(𝑓(𝑥))𝑥=0𝑓(𝑥)𝑥=0, so 𝐵𝐴.If 𝑎=34, then 𝑔(𝑥) has exactly one root 12𝑎=23, and in this case, 𝑓(23)(23)=(34)(23)21+23=0, so 𝑓(𝑓(𝑥))𝑥=0𝑓(𝑥)𝑥=0, which means 𝐵𝐴.Hence if 𝑎34 and 𝑎0, then 𝐵𝐴. Furthermore, in part (a), we deduced that 𝐴𝐵. Therefore, we have 𝑎34𝑎0𝐴=𝐵.Therefore, both directions are proven, and in the case where 𝑎0, we have 𝑎34 if and only if 𝐴=𝐵.Combining this with the 𝑎=0 case, we have proven claim 2. By claim 1 and claim 2, 𝐴=𝐵 and 𝐴 if and only if 𝑎14 and 𝑎34, so the set of all possible values of 𝑎 is [14,34].