Calculating cardinality of the following sets I want to calculate the cardinality of the various sets such as:


*

*The set of continuous functions from $\mathbb R$ to $\mathbb R$.

*The set of continuous functions from $\mathbb Q$ to $\mathbb Q$

*The set of discontinuous functions from $\mathbb R$ to $\mathbb R$.

*The set of discontinuous functions from $\mathbb Q$ to $\mathbb Q$.
I can't find any mechanism for calculating them.  Any hints on how to proceed would be great.
 A: As general advice, you should separately work on establishing upper- and lower-bounds for these cardinalities. Perhaps surprisingly, somewhat naive approaches are enough to get the same cardinality as both an upper- and lower-bound.
I assume you know some basic cardinal arithmetic (e.g., $\kappa \times \kappa = \kappa$ for infinite $\kappa$). If not, you should learn or review it; it's absolutely essential to working through this kind of problem
Let $C(X,Y)$ denote the continuous functions from $X$ to $Y$, and let's work on the rationals first. It is clear that $2^\omega \leq |C(\mathbb{Q},\mathbb{Q})|$ (since we can extend the characteristic function of any set of integers to a continuous function on the rationals). We can also see the following: $$|C(\mathbb{Q},\mathbb{Q})| \leq |\mathbb{Q}^{\mathbb{Q}}| = \omega^\omega \leq (2^\omega)^\omega = 2^{\omega \times \omega} = 2^\omega \text{,}$$ so $|C(\mathbb{Q},\mathbb{Q})| = |\mathbb{Q}^{\mathbb{Q}}| = 2^\omega$. It's pretty clear that there are at least $2^\omega$ discontinuous functions $\mathbb{Q} \to \mathbb{Q}$ (since we can extend the characteristic function of any set of integers to a discontinuous function on the rationals), so there are exactly $2^\omega$ many.
Now, for the reals. As a commenter observed, since a continuous function on reals is determined by its values on the rationals, $|C(\mathbb{R},\mathbb{R})| \leq |C(\mathbb{Q},\mathbb{R})|$, so $$2^\omega \leq |C(\mathbb{R},\mathbb{R})| \leq |C(\mathbb{Q},\mathbb{R})| \leq |\mathbb{R}^\mathbb{Q}| = (2^\omega)^\omega = 2^\omega \text{.}$$
The last piece is the discontinuous functions $\mathbb{R} \to \mathbb{R}$. For that, we need to know $|\mathbb{R}^\mathbb{R}|$. Compute $$|\mathbb{R}^\mathbb{R}| = (2^\omega)^{2^\omega} = 2^{\omega \times 2^\omega} = 2^{2^\omega} \text{,}$$ sometimes denoted $\beth_2$. Since $2^\kappa > \kappa$ for all $\kappa$, $\beth_2 > 2^\omega = |C(\mathbb{R},\mathbb{R})|$, so the discontinuous functions $\mathbb{R} \to \mathbb{R}$ have cardinality $\beth_2$, also.
