TITLE: Strange real functions
QUESTION [8 upvotes]: I know there are a lot of strange functions $f~:~\mathbb R \to \mathbb R$.
I'm looking for an "elementary but complete" exposition of a result discovered by W. Sierpi\'nski and A. Zygmund in "Sur une fonction qui est discontinue sur tout ensemble de puissance du continu." Fund. Math., vol. 4, pp.316–318, 1923 stating (in simple form) that there exist a function $f~:~\mathbb R \to \mathbb R$  such that for every non empty open interval $I$, $f(I)=\mathbb R$ .
And also, a probably well-known fact for experts in real analysis:
If an arbitrary continuous function $f~:~ [0,1] \to \mathbb R$  is given, is it true that $f_{|D}$ is monotonic on some dense set $D\subset [0,1]$ or some set $D$ of positive measure?
It seems to be true if I replace "dense set" by "perfect subset" (according to Jack Brown).
If this is not true an example is highly appreciated.

REPLY [5 votes]: Although you asked about continuous functions, here is an example of a discontinuous 
function $f:[0,1]\to\mathbb{R}$
which is not monotone on any measurable set with positive measure.
Let $V\subset [0,1]$ be the usual Vitali set, selecting one
element from each equivalence class under translation by
the rationals. Thus, $V$ is not measurable, and the
translates $V+q$ (working modulo 1) for rational $q$ are
disjoint and cover $[0,1]$. It follows that none of the
translates $V+q$ contains a measurable set of positive measure. Enumerate
the rationals $\mathbb{Q}=\{ q_n \mid n\in\mathbb{N}\}$,
and let $f(x)=n$ for $x\in V+q_n$. Thus, $f$ is constant on
each $V+q$, and the range of $f$ involves only natural
number values. Suppose that $f$ is monotone on a measurable
set $A\subset [0,1]$. If $f|A$ is constant or has only
finitely many values, then $A$ will be contained in the
union of finitely many $V+q$, and hence not have positive
measure. Otherwise, $A$ must contain points from infinitely
many $V+q$, and since the range is contained in
$\mathbb{N}$, it must be that $f$ is nondecreasing on $A$.
For any $a\in A$, note that if $f(a)=n$, then $A\cap [0,a]$
is contained in the union of $V+q_m$ for $m\leq n$, a
finite number of translations of $V$. Thus $A\cap [0,a]$
has measure $0$ for any $a\in A$, and it follows that $A$
has measure $0$ altogether.