Does there exist a cont function $f$ : $\mathbb{R}$ $\rightarrow$$\mathbb{R}$ which takes irrational values at rational points and rational values at irrational points?

  • $\begingroup$ I get the feeling, no. And I suspect this is because of their density $\endgroup$ – Squirtle Dec 26 '13 at 8:36

No. Such a function is clearly not constant. Let $a$ and $b$ be numbers with $f(a)\ne f(b)$. Then $f(x)$ must take all values between $f(a)$ and $f(b)$ for $x$ between $a$ and $b$. But there are an uncountable number of irrational numbers between $f(a)$ and $f(b)$, and only a countable number of rational $x$ between $a$ and $b$.

  • $\begingroup$ cont here means continuous not constant. $\endgroup$ – Squirtle Dec 26 '13 at 8:47
  • 2
    $\begingroup$ @Squirtle: Such a function is clearly not constant in any case, even if "cont" means continuous. $\endgroup$ – Mårten W Dec 26 '13 at 8:49
  • $\begingroup$ I didn't say it was.... I agree with the response; however, this simply wasn't the question. $\endgroup$ – Squirtle Dec 26 '13 at 9:15
  • 1
    $\begingroup$ @Squirtle It was the first step to observe that the function $f$ not constant. Then we show that such continuous function impossible because we can not map countable set of rational numbers from $(a,b)$ on to uncountable set of irrational numbers from $(f(a), f(b))$. $\endgroup$ – Nikita Evseev Dec 26 '13 at 11:15

Not the answer you're looking for? Browse other questions tagged or ask your own question.