Arbitrary continuous function expressed by purely discontinuous composition

continuityfunction-and-relation-compositionfunctions

I'm trying to determine whether the following statement is true.

For any continuous function $h:\mathbb{R}\rightarrow\mathbb{R}$, there exist two purely discontinuous functions $f, g : \mathbb{R}\rightarrow\mathbb{R}$ so that $h = f\circ g$.

Here a purely discontinuous function is one that is not continuous at any point. Think, $\chi_{\mathbb{Q}}(x) = \left\{\begin{array}{rl}
1 & x \in \mathbb{Q} \\
0 & x \notin \mathbb{Q} \\
\end{array}\right.$
, the indicator function of the rationals.

I've thought of trying to do a construction along the lines of letting $f(x) = \left\{\begin{array}{rl}
h(x-1) & x \in \mathbb{Q} \\
h(x) & x \notin \mathbb{Q} \\
\end{array}\right.$
and $g(x) = \left\{\begin{array}{rl}
x+1 & x \in \mathbb{Q} \\
x & x \notin \mathbb{Q} \\
\end{array}\right.$

Then $(f\circ g)(x) = h(x)$. It is clear that $g(x)$ is purely discontinuous, but $f(x)$ isn't necessarily. For example, if $h(x) = \sin(2\pi x)$, then its period of $1$ would cause $f(x)$ to be continuous (indeed, $f$ would just equal $h$).

Can this idea be tweaked to make a proof? Or is there a function one can construct that cannot be a composition of purely discontinuous functions?

Best Answer

You're so close! We can define $$ f(x) = \begin{cases} h(x)-1, & \text{if } h(x) \in \mathbb{Q}, \\ h(x), & \text{if } h(x) \notin \mathbb{Q} \end{cases} \quad\text{and}\quad g(x) = \begin{cases} x+1, & \text{if }x \in \mathbb{Q}, \\ x, & \text{if }x \notin \mathbb{Q} \end{cases} $$ and then check that $h=g\circ f$ as opposed to $f\circ g$.

[PS: Check the LaTeX source for this answer for the {cases} environment—simpler than {array}.]

Related Question