Puzzle
2 minute read

Ponder This Challenge - October 2001 - f maps any open interval onto R

Ponder This Challenge:

This month's puzzle comes from Laszi Ladanyi, who heard it in college.

Find a function f from R (that is, the set of real numbers) to R
such that for all open intervals I=(u,v) ,we have that f maps (u,v) onto R.
The function f is independent of u,v.

(That is, given any target real number t, and any interval
I=(u,v) with u<v, there is x with u<x<v and f(x)=t.)


We will post the names of those who submit a correct, original solution! If you don't want your name posted then please include such a statement in your submission!

We invite visitors to our website to submit an elegant solution. Send your submission to the ponder@il.ibm.com.

If you have any problems you think we might enjoy, please send them in. All replies should be sent to: ponder@il.ibm.com

Solution

  • First define a function g from R to the half-open interval [0,1).

    Express |x| in ternary (base 3).
    (Note: when x is rational with a power of 3 in the denominator, we have a choice between a representation ending in an infinite number of 0's or one ending in an infinite number of 2's; select the former.)

    If the expression has an infinite number of 2's, or no 2's at all, then set g(x)=0.
    Otherwise it has a finite number of 2's.

    Take the portion of the ternary expansion of |x| after the last 2, precede it with a decimal point, and interpret it as a binary number; let that be g(x).
    The function g maps R to [0,1), and it maps each open interval I=(u,v) to all of [0,1).

    Now set f(x)=0 if g(x)=0, otherwise f(x)=tan(pi(x-1/2)).


    If you have any problems you think we might enjoy, please send them in. All replies should be sent to: ponder@il.ibm.com

Solvers

  • Bill Roscoe (10.01.2001 @ 11:35 AM EDT)
  • Henry Bottomley (10.01.2001 @ 12:22 PM EDT)
  • Vineet Gupta (10.01.2001 @ 2:56 PM EDT)
  • George Ross (10.02.2001 @ 2:35 PM EDT)
  • Alexey Vorobyov (10.02.2001 @ 2:51 PM EDT)
  • Ionel Santa (10.03.2001 @ 2:39 AM EDT)
  • Jacques Willekens (10.03.2001 @ 3:13 AM EDT)
  • Vadim Alexandrov (10.03.2001 @ 8:40 AM EDT)
  • James McGrath (10.03.2001 @ 2:40 PM EDT)
  • Marian Olteanu (10.04.2001 @ 3:52 PM EDT)
  • Ruth Algor (10.03.2001 @ 8:46 PM EDT)
  • Andreas Spillner (10.04.2001 @ 4:07 AM EDT)
  • Hilary Jones (10.04.2001 @ 9:54 PM EDT)
  • Ben North (10.05.2001 @ 10:49 AM EDT)
  • Andy Lowry & Howie Kaye (10.05.2001 @ 11:44 AM EDT)
  • Vladimir Sedach (10.05.2001 @ 3:35 PM EDT)
  • Sameer Udeshi (10.05.2001 @ 3:52 PM EDT)
  • Saibal Mitra (10.06.2001 @ 6:26 PM EDT)
  • Marian Vasile (10.08.2001 @ 10:31 AM EDT)
  • Felipe Bertrand and Cesar Sanchez (10.09.2001 @ 2:08 PM EDT)
  • Oleg Mazurov (10.10.2001 @ 1:26 AM EDT)
  • Jens Voss (10.10.2001 @ 3:47 AM EDT)
  • David G Radcliffe (10.12.2001 @ 4:05 PM EDT)
  • Chi-Bong Chan (10.13.2001 @ 3:39 PM EDT)
  • Ross Millikan (10.15.2001 @ 11:26 AM EDT)
  • G XU (10.15.2001 @ 1:15 PM EDT)
  • Victor Chang (10.15.2001 @ 8:22 PM EDT)
  • Koen Claessen (10.16.2001 @ 4:49 AM EDT)
  • Christopher Howe (10.17.2001 @ 7:04 PM EDT)
  • Vishaal Kapoor (10.20.2001 @ 3:45 AM EDT)
  • John Lamping (10.20.2001 @ 3:04 PM EDT)
  • Devin Sezer (10.26.2001 @ 8:37 PM EDT)

Related posts