7

Actually there are 2 questions, but they are closely related. Does it exist a function that is:

  1. Continuous at every rational point and discontinuous at every irrational point?
  2. Continuous at every irrational point and discontinuous at every rational point?
Hedgehog
  • 1,722

3 Answers3

5

For part 2, let $f(p/q)=1/q$ for rational points $p/q$ (in reduced form) and $f(x)=0$ for irrational $x$.

Barry Cipra
  • 79,832
3

For first part there does not exist any function Because f is discontinuous on only F-sigma set. F-sigma set is defined as the set which can be written as countable union of closed set.

0

The set of discontinuities of any real function must be the countable union of closed sets.

The rationals, Q, is such a set, and so your Case #2 does exist (and should be easily Googled). But the irrationals are not the countable collection of closed sets, so your Case #1 does not exist.