Find a function f:R->R (R the set of real numbers), such that

1. f has a discontinuity in every rational number, but is continous everywhere else, and

2. f is monotonic: x<y → f(x)<f(y)

Note: Textbooks frequently present examples of functions that meet only the first condition; requiring monotonicity makes for a slightly more challenging problem.

(In reply to

re: Possible solution? by Steve Herman)

Thanks for the kind words, Steve.

I don't know if "deep thinker" is a fair assessment, especially looking at some of my blunders in previous posts on this site, but thank you. I still think the solution looks good, though, and I'm glad you concur.

I did briefly address the numbers outside [0,1] when I said "For numbers outside the range 0 to 1, just prepend the integer portion before the decimal point." So ww(3.5) = 3.1 and ww(3.75) = 3.101 and ww(-3.75) = -3.101. (Now I'm using your idea of keeping it all in decimal--forget binary and ternary...I agree there's no need!). This function is already discontinuous for all the integers except 0. So, all we need to do is add 1 for the positive numbers and subtract 1 for the negative numbers (just like you suggested in your comment dated 8/19 at 12:35:47). I.e.,

WW(x) = ww(x) + 1 for x>0

WW(0) = 0

WW(x) = ww(x) - 1 for x<0

This one's sure, been a lot of fun, hasn't it? JLo? I think we're ready to hear your solution.

Ken

*Edited on ***August 23, 2006, 11:32 pm**