Qm
BrainteasersJane StreetCitadel

No continuous function satisfies f(f(x)) = minus x

Is there a function f from the real numbers to the real numbers such that f(f(x)) = minus x for every x?

  1. Show that if such a function is continuous, a contradiction follows.
  2. Show that if continuity is dropped, such a function does exist.
Show a hint

For part 1: a continuous function that never takes the same value twice must be strictly increasing or strictly decreasing. What does that say about applying it twice? For part 2: think of the real numbers as pairs of points that f rotates among.

Your answer

Solving needs a free account

Answers, streaks and solutions unlock when you are signed in. Reading the question and the hint stays free.

Discussion

Sign in to join the discussion · reading is open to everyone

💡 Discussion rules

  1. No full solutions here. Hints and approaches only.
  2. Complexity, edge cases and intuition are the point.
  3. Interview experiences are welcome. Respect your NDAs.

Loading discussion…

Learn the concepts

The theory behind this question.

Related questions

Two opposite points with the same temperatureThe monk on the mountain pathChameleons changing colorsWhy a football always has exactly twelve pentagonsThe bulbs in a ring that always come back on
All questions →