A blind mathematician is give a $2015$ bit sequence. The mathematician can take any two bits and switch them (so the bit in position $A$ goes to position $B$ and vice-versa). He knows at what position they are and has really good memory, but he has never seen any of them. Can the mathematician do a certain number of steps (at each time he can select which bits he wants to switch) so that he can point at two bits and be absolutely sure they are equal?
This is from the $2015$ USA TST.
You have translated the problem incorrectly.
If A has an electron and B does not, then the electron jumps from A to B.
This is completely different from just swapping two bits!
The swap only happens when Bit A is 1, and bit B is 0, and you can designate which bit is A and which bit is B.
For that, seems like a bubble sort type of approach will do (just an idea, that is).