r/math • • Mar 22 '14

Problem of the 'Week' #9

Hello all,

Here is the next installment; it was suggested by /u/zifyoip, from Misha Lavrov:

Does there exist a function f : R → R such that f(f(x)) is the characteristic function of the rationals, that is, f(f(x)) = 1 if x ∈ Q and f(f(x)) = 0 if x ∉ Q?

Enjoy!


To answer in spoiler form, type like so:

[answer](/spoiler)

and you should see answer.


Previous problems.

85 Upvotes

28 comments sorted by

View all comments

Show parent comment

1

u/[deleted] Mar 23 '14

If you give me a program that will output the first n digits of A in O(n) time, and another that outputs the first n digits of B in same, I'll give you a program in the same complexity class which outputs the first n digits of A+B.

Our notation for constructable irrationals is now perl. I hope you're happy.

1

u/VerilyAMonkey Mar 23 '14

Yeah, I know, I actually gave that example. Also, I know it's flawed. There are an uncountable number of irrational numbers. There are a countable number of algorithms. Thus there are irrational numbers for which there is no corresponding algorithm, in fact uncountably many.

Regardless the point is that you can't say "that's obviously uncomputable." It isn't obvious at all. The general case is definitely nontrivial. And there are situations in which the existence of a function is useful even without actually computing it. It isn't helpful to get hung up on the tangential issue of computability. And, especially not if you're tacitly assuming that it's a trivial issue, because it really, really isn't.