How does one partition real numbers in two equinumerous sets (non-trivial)? I better explain my goal with simplified example. 
I look for a function $f:(0,1)\rightarrow\{0,1\}$ such that $\forall \varepsilon>0 \,\,\exists \text{ bijection }\varphi:\{x\in(0,\varepsilon): f(x) = 0\}\rightarrow\{ x\in(0,\varepsilon):f(x)=1\}$. What this function would do is it would actually partition $(0,1)$ in two equinumerous disjoint sets, so that in every infinitely small interval there is equal "number" of elements from each partition.
Thanks in advance!
 A: Every irrational in $(0,1)$ determines a unique infinite sequence of positive integers and vice versa, via continued fractions: 
 $$ x=\frac1{a_1+\frac1{a_2+\frac1{\dots}}}, $$
If the sequence is such that, from some point on, only $6$s and $7$s appear, put $x$ in the first set. Else, put $x$ in the second set. Both sets meet each interval in continuum ($=|\mathbb R|$) many points. 
A: The way the problem is formulated, you just need both $f^{-1}(0) \cap (0,\varepsilon)$ and $f^{-1}(1) \cap (0,\varepsilon)$ to contain an interval for any $\varepsilon>0$ (that way both are uncountable).  For instance, $$f(x)=\lfloor{1/x}\rfloor{\text{ mod }}2$$
will work.
A: To do the partition, define a function $f(x)$ by the following operation. Let $y$ be the fractional part of $x$.  Express $y$ in ternary, with trailing zeros if there is a choice.  If there are an infinite number of $2$'s in the expansion, set $f(x)=0$.  Otherwise, look at the digit after the last $2$, setting $f(x)=0$ if it is a zero and $f(x)=1$ if it is a $1$.  Within any interval, there is a subinterval of the form $(\frac {3k+2}{3^m},\frac{3k+3}{3^m})$  These numbers all have a $2$ in the $m$ place.  There are uncountably many followed by only $0$s and $1$s, so uncountably many $f(x)=0$ and $f(x)=1$ in every interval.
A: Let $C$ be the Cantor set, and let $\mathbb Q$ be the set of all rational numbers. Let $A=\{s+t:s\in C,t\in\mathbb Q\}$, i.e., $A$ is the union of all rational translates of the Cantor set. Let $B=\mathbb R\setminus A$. Then $|A\cap I|=|B\cap I|=|\mathbb R|$ for every interval $I=(a,b),a\lt b$.  
Define $f(x)=1$ if $x\in A$, $f(x)=0$ if $x\in B$.
A: Hmm, how about looking at the first nonzero digit in the decimal expansion of x and sending x to 0 if it's odd and 1 if it's event?
A: Write $x$ in base $3$. Consider the sets
$$A := \{x | \text{the expansion of } x \text{ has finitely many 2s, but infinite 1s} \}$$
$$B := \{x | \text{the expansion of } x \text{ has finitely many 1s, but infinite 2s} \}$$
They are obviously disjoint, and dense, because any $y \in \mathbb{R}$ can be approximated arbitrarily by a finite sequence, and then you can append a tail of $1$s or $02$s to land in $A$ or $B$.
Now, $A$ is uncountable because it contains numbers with no 2, and those are in bijection with $\mathbb{R}$ by reinterpreting the expansion in binary. Similarly, $B$ is uncountable. More importantly, the same argument holds for the intersection of $A$ (or $B$) with any subinterval, so both $A$ and $B$ are uncountable in any small region.
To obtain a partition of all of $\mathbb{R}$, simply join $\mathbb{R} \setminus (A \cup B)$ to $A$, and you are set (pun intended).
