Using your Head is Permitted

January 2015 riddle

The following is a riddle I heard from Tomasz Kania at a recent conference. It is not original to him, but we weren't able to determine its source.

The question: does a function, f:ℝ→ℝ exist, that has all of the following properties?

  1. f is continuous.
  2. f is a surjection (i.e., it is "onto") but not an injection (i.e., it is not "one to one").
  3. If a∈ℚ, then f(a)∈ℚ.
  4. If g:ℚ→ℚ is f's restriction to ℚ then g is an injection but not a surjection.
If such a function exists, give an example (with proof). If none exists, give a proof of this fact.

List of solvers:

Radu-Alexandru Todor (1 January 14:23)
Dan Dima (2 January 01:58)
Gaoyue Guo (3 January 09:00)
Andreas Stiller (5 January 23:31)
Jan Fricke (6 January 23:04)
Lorenz Reichel (8 January 07:22)
Li Li (11 January 04:49)
Austin Shapiro (11 January 05:11)
Thomas Mack (13 January 04:46)
Harald Bögeholz (16 January 05:18)
Xiaoyao Zou (16 January 12:32)
Daniel Bitin (25 January 23:08)
Zilin Jiang (29 January 12:12)

Elegant and original solutions can be submitted to the puzzlemaster at Names of solvers will be posted on this page. Notify if you don't want your name to be mentioned.

The solution will be published at the end of the month.


To solution

Back to main page