Question 5 [12 pts]: Countability.
A set S is countable if either it is finite or it has the same size as N, that is, there exists
a bijective function (both one-to-one and onto) from N to S. To show S is countable, you
can also construct an onto function (surjection) from N to S. Here N is the set of natural
numbers, N = {1,2,...}.
(a) Prove that if sets A and B are countable, then AUB is also countable.
(b) Prove that the set of rational numbers Q is countable. A real number is rational if
it can be written as a fraction p/q, where p is an integer and q is a natural number.
Hence,
$Q = \{\frac{m}{n} | m \in Z, n \in N\}$
Here, Z = {..., -2, -1, 0, 1, 2,...} is the set of integers.
[Hint: Example 4.15 in the Sipser book argues about countability of positive rational
numbers. You can assume Z is countable if needed.]
(c) Using Parts (a) and (b), prove that the set of irrational numbers is an uncountable set.
[Hint: You can use the fact that the set of real numbers is uncountable.]