3
$\begingroup$

Possible Duplicate:
No continuous function that switches $\mathbb{Q}$ and the irrationals

Is there a continuous function $f\colon\mathbb R\to \mathbb R$ such that $f(\mathbb Q)\subseteq \mathbb R-\mathbb Q$ and $f(\mathbb R-\mathbb Q)\subseteq \mathbb Q$?

$\endgroup$
  • $\begingroup$ What do you think? $\endgroup$ – Did Jan 1 '13 at 18:08
  • $\begingroup$ See here and here . $\endgroup$ – David Mitra Jan 1 '13 at 18:56
  • $\begingroup$ @nice question ali. +1 $\endgroup$ – mrs Jan 1 '13 at 19:17
10
$\begingroup$

HINT: If such an $f$ exists, $$\Bbb R\setminus\Bbb Q=\bigcup_{q\in\Bbb Q}f^{-1}[\{q\}]$$ is the union of countably many closed sets. Now apply the Baire category theorem.

$\endgroup$
  • 2
    $\begingroup$ I just love it when Baire knocks at the door ... $\endgroup$ – Hagen von Eitzen Jan 1 '13 at 18:17
  • 3
    $\begingroup$ @Hagen: Lions and tigers and Baires [oh my]. :-) $\endgroup$ – Brian M. Scott Jan 1 '13 at 18:18
  • $\begingroup$ Hammer, nails, and all that... $\endgroup$ – Did Jan 1 '13 at 18:29
  • $\begingroup$ @BrianM.Scott $\mathbb{R}\setminus \mathbb{Q}$ has empty interior , yet I don't got it how your hint solve the question $\endgroup$ – user52188 Jan 1 '13 at 19:19
  • 1
    $\begingroup$ I wonder how many of the downvoters understand that the answer is correct, albeit less elementary than was actually necessary. $\endgroup$ – Brian M. Scott Jan 1 '13 at 20:14
13
$\begingroup$

Hint: Consider a continuous function $f:\mathbb R\to\mathbb R$. Either $f$ is constant or $f(\mathbb R)$ is uncountable. (Can you show this? Sub-hint: intermediate value theorem.) If $f(\mathbb R\setminus\mathbb Q)$ is countable, what about the countability/uncountability of the set $f(\mathbb R)$, using the fact that $f(\mathbb R)=f(\mathbb Q)\cup f(\mathbb R\setminus\mathbb Q)$?

$\endgroup$
  • 2
    $\begingroup$ Ah, a smaller hammer; nice. $\endgroup$ – Brian M. Scott Jan 1 '13 at 18:29
  • 2
    $\begingroup$ @BrianM.Scott Indeed. $\endgroup$ – Did Jan 1 '13 at 18:31
1
$\begingroup$

Suppose by contradiction that such a function exists. Then it is non-constant.

Let $a<b$ be so that $f(a) \neq f(b)$. Then by the IVT $f([a,b])$ is a non-trivial interval. Let call this interval $[c,d]$.

Thus

$$f([ a,b] \cap \mathbb Q)= [c,d] \cap (\mathbb R \backslash \mathbb Q) \,.$$ This implies that $f$ takes a countable set onto an uncountable set, contradiction.

$\endgroup$
0
$\begingroup$

See, $f(\mathbb{Q})$ is a countable set, how $f(\mathbb{R-Q})\subset \mathbb{Q}$, then, $f(\mathbb{R-Q})$ is too a countable set, then $f(\mathbb{R})$ is also a countable set. See, a continuous function have a countable image if only if $f$ is a constant function, contradiction!

$\endgroup$

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