In this algorithm, we have a random bit source that generates one bit randomly (p(0) = p(1) = 1/2) to decide to swap the data or not.
Now the question is that: