3

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?

Mikasa
  • 67,942
Topology
  • 1,646
  • 13
  • 27

1 Answers1

2

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$.

Harald Hanche-Olsen
  • 32,608
  • 2
  • 61
  • 87
  • cont here means continuous not constant. – Squirtle Dec 26 '13 at 08:47
  • 2
    @Squirtle: Such a function is clearly not constant in any case, even if "cont" means continuous. – Mårten W Dec 26 '13 at 08:49
  • I didn't say it was.... I agree with the response; however, this simply wasn't the question. – Squirtle Dec 26 '13 at 09:15
  • 1
    @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))$. – Nikita Evseev Dec 26 '13 at 11:15