Exactly Twice Is Impossible
Prove that there is no continuous function that takes every real value exactly twice. That is, there is no continuous with
Bonus (think, don't prove): Is there a continuous taking every value exactly three times? What about exactly times?
Field: Topology / Real analysis (connectedness, Intermediate Value Theorem)
Why it's interesting: This is a folklore classic. "Every value exactly twice" sounds harmless, since a parabola nearly does it. But the condition cannot hold everywhere, and the obstruction is purely about the order and connectedness of . The answer also has a surprising parity twist: exactly times is possible if and only if is odd.
Key technique: Look at the maximum of between two points with the same value, then count preimages of values just below that maximum using the IVT.
Difficulty: 3/5
Answer: Exactly Twice Is Impossible
Key Idea / Intuition
If , then on the graph is a "hill" (or a "valley"). The top of the hill, at height , must be hit exactly twice. Values just below are then hit too often:
- Each side of the hill crosses those values once.
- The second preimage of forces at least one more crossing.
So you get at least preimages. That breaks "exactly twice."
Formal Proof / Solution
Suppose, for contradiction, that is continuous and every value has exactly two preimages.
Step 1: Set up a hill. Pick any and let be its two preimages, so . On , . Since is connected, by the IVT either throughout or throughout. Replacing by if necessary (which preserves the hypothesis), assume
Step 2: Take the top of the hill. By compactness, attains its maximum on at some point . Since inside, we have and . The value has exactly one other preimage . There are two cases.
Case A: . Then , because . Say ; the case is symmetric.
- is not constant on , since otherwise would have infinitely many preimages.
- So , attained at some .
Choose any with . By the IVT, is attained:
- on , since ;
- on , since ;
- on , since ;
- on , since .
These intervals are disjoint, so has at least preimages. Contradiction.
Case B: . Say ; the case is symmetric. Take any . By the IVT, is attained:
- on , since ;
- on , since ;
- on , since .
That gives at least preimages. Contradiction.
Both cases are impossible, so no such exists.
Remarks on the Bonus
Exactly three times is possible. Take a "rising zigzag" built from piecewise-linear pieces:
- On , go from up to .
- On , go from down to .
- On , go from up to .
Then extend so that . Each unit band of values is crossed by three consecutive monotone pieces. With care at the corner points (the "turning" values), every is hit exactly three times.
General parity theorem. A continuous taking each value exactly times exists if and only if is odd. Here is the idea for even :
- For large , must tend to in a consistent way.
- If both ends go to the same infinity, a large value is crossed an even number of times. If the ends go to opposite infinities, it is crossed an odd number of times.
- A local-extremum counting argument, generalizing the hill argument above, then rules out the even case.
The proof above is the cleanest instance of this: local extrema create excess preimages.