Strange real functions 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.
 A: 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.
A: Every continuous function is monotone on a perfect set:  
Let $I=[0,1]$ and let $f:I\to\mathbb R$ be continuous (actually, Borel-measurable is enough for what follows).
Let $[I]^2$ be the set of 2-element subsets of $I$.
For all $\{a,b\}\in[I]^2$ with $a\lt b$ let $c(a,b)=0$ if $f(a)\lt f(b)$ and $c(a,b)=1$, otherwise.
Since $f$ is continuous, the set 
$$\{(a,b)\in I^2:a\lt b\wedge c(a,b)=0\}$$
is Borel in $I^2$.
By a theorem of Galvin, there is a perfect set $P\subseteq I$ such that $c$ is constant on
$[P]^2$.
From the definition of $c$ is follows that $f$ is monotone on $P$.
A source for Galvin's theorem is Kechris' book on Classical Descriptive Set Theory.
If you want to avoid the use of Galvin's theorem, you can use the full strength of 
continuity: 
Since every nonempty open subset of $I$ contains a perfect set, we may assume $f$ is not monotone on any nonempty open subset of $I$.
Now every nonempty open subset of $I$ has a two-element subset on which $f$ is strictly
increasing.   
A straight-forward perfect set construction now gives you a perfect set on which $f$ is
strictly increasing.
A: Enumerate all rational intervals, let them be $\Delta_1$, $\Delta_2$ and so on. Let $K_i\subset \Delta_i$ be a perfect nowhere dense set (of cardinality continuum, of course) so that $K_i$ are mutually disjoint. It is easy to construct such sets one by one. Then map each $K_i$ to $\mathbb{R}$ bijectively and define $f$ in other points (not belonging to $\cup K_i$) arbitrarily.
