I came across the following question today:

> 
> "In drawing two balls from a box containing 6 red and 4 white balls without replacement, which of the following pairs will be independent?:
> 
> 
> (a) Red on 1st and red on 2nd draw
> (b) Red on 1st and white on 2nd draw
> 
> 
> 

I approached this problem by writing down the sample space as {RW, RR, WW, WR} first.

Then, let $A$ be the event that red is drawn first and $B$ be the event that red is drawn second;
$A$=$({RW}, {RR}) and $B=$({RR}, {WR})

Which gives me $A∩B$={$RR$}

Therefore, I get
$P(A)=1/2$
$P(B)=1/2$ and
$P(A∩B)=1/4$

Which gives me $P(A)P(B)=P(A∩B)$, proving that A and B are independent events. However, clearly, this is nonsense! A and B are absolutely **not** independent events, since the occurrence of A affects the chances of occurrence of B. Where have I gone completely wrong in my reasoning?

Edit: My textbook has solved this problem correctly in the following way but I am not interested in the solution to this problem in particular; I want to know where I have made a grave mistake. Please correct me for if I don't understand my mistake, I will continue to commit the **same** mistake in the future as well. Much thanks in advance :) Regards.

[![Textbook solution](https://i.stack.imgur.com/FHWgD.jpg)](https://i.stack.imgur.com/FHWgD.jpg)
['https://math.stackexchange.com/questions/1911782', 'https://math.stackexchange.com', 'https://math.stackexchange.com/users/-1/']
Let $I$ be a fixed interval $[a,b]$. Then you may let $F=\mathbb{Q} \cap I$ (rationals in $I$) and $G=I\setminus \mathbb{Q}$ (irrationals in $I$), which satisfy all the properties you want. 

As you point out, there is no 'least next' value, but this is not an issue because your last bullet point doesn't necessitate that such things exist. Instead, it is sufficient for both $F$ and $G$ to be dense in $I$.

To answer your last question, nothing changes, we could take $F= (I\cap \mathbb{Q})\cap \{n/2^m \mid \text{$n$ odd integer, $m\geq 0$}\}$ and $G = (I\cap \mathbb{Q}) \setminus \{n/2^m \mid \text{$n$ odd integer, $m\geq 0$}\}$. The elements of $\{n/2^m \mid \text{$n$ odd integer, $m\geq 0$}\}$ are called the dyadic rationals.

As far as your function $z(x)$ defined by
$$z(x) = \begin{cases} x+1 & x\in F \\ x-1 & x\in G \end{cases}$$
is concerned, it does indeed exist (that's a valid definition above). While it separates $I$, that isn't really a problem.
Such a partition does exist. Let $F = I \cap \Bbb Q$ and $G = I \setminus F$. It's clear that $F$ and $G$ have empty intersection, and their union is all of $I$.

And for any two rational numbers, there's an irrational number between them. The other way around too. Since this is all taking place inside an interval $I$, the middle point that you find is also in $I$.