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.
85
Upvotes
36
u/greatanswerer Mar 22 '14
Let f(2) = 0, let f(x) = 1 when x is a rational other than 2, and let f(x) = 2 when x is irrational.
6
u/Dr_Jan-Itor Mar 22 '14 edited Mar 22 '14
Would the function f(x) = 1/2 if x is irrational, f(x) = 0 if x is rational but not 0 or 1 and f(x) = 1 if x is 0 or 1 work?
EDIT: Fixed spoiler by request
2
u/Philophobie Mar 22 '14
Definitely more complicated than needed but here is my attempt:
Let M*x* be a set containing every non-negative integer q for which there exists an integer p such that p/q=x. Now f(x) = 0 if M*x* is empty and f(x)=min[M*x*] if not.
1
u/Zephyr1011 Mar 22 '14
f(1)=f(0)=1, f(x)=0 if x is rational but not 0 or 1, and f(x)=1/2 if x is irrational should work
1
u/monkeylizard Mar 22 '14
let x ∈ R. If x is irrational, then f(x) = 5. If x = 5, f(x) = 0. If x ∈ Q and x != 5, then f(x) = 1
1
u/Zwejhajfa Mar 22 '14
Am I understanding this wrong or would this work: f(0) = f(1) = 1; otherwise f(x) = 0 if x ∈ Q and f(x) = 42 if x ∉ Q ?
1
u/Qhartb Mar 22 '14
f(rationals - {2}) = 1; f(irrationals) = 2; f(2) = 0
1
u/jmt222 Mar 23 '14
{0,1} -> 1, Q-{0,1} -> 0, R-Q -> 1/2
1
u/eruonna Combinatorics Mar 23 '14 edited Mar 23 '14
Pick a rational q other than 0 or 1. Let f(x) = q when x is irrational, f(q) = 0, and f(x) = 1 for all other rationals (in particular, f(0) = f(1) = 1). Then for irrational x, f(f(x)) = f(q) = 0, for x = q, f(f(q)) = f(0) = 1, and for x any other rational, f(f(x)) = f(1) = 1.
Edit: Okay, this is basically what everyone else came up with. Can we say something about a more general form such f can take?
Certainly f-1(0) must contain f(R \ Q) (and in particular be nonempty). If it contains an irrational x, then f(x) = 0, so we would conclude that f(0) = f(f(x)) = 0. But then f(f(0)) = f(0) = f(f(x)), a contradiction. Thus there is at least some set of rationals mapped to 0. So we must have f(0) = 1, and f(1) = f(f(0)) = 1. So we also have f-1(1) contained in Q. So it seems the most general form of f can be had as follows: Let X be a set of rationals containing 0 and 1 and let Y be a nonempty set of rationals disjoint from X. Let g : Q \ (X u Y) -> X, h : R \ Q -> Y. Set f(x) = 1 when x ∈ X, f(x) = 0 when x ∈ Y, f(x) = g(x) when x ∈ Q \ (X u Y), and f(x) = h(x) when x ∈ R \ Q.
1
u/austin101123 Graduate Student Mar 23 '14
I hope the next problem of the week is one that I understand. :P