A box contains balls of different colours. At each step you draw an ordered pair of balls at random, repaint the first to match the colour of the second, and return both. How many steps on average until all the balls share a single colour?
Reveal solutionHide solution
#Repainting is a voter model
Drawing an ordered pair and repainting the first ball to match the second is the voter model on the complete graph. The box turns a single colour exactly once every ball descends from one common origin.
#Trace the colours backward
A ball's colour is a copy of whichever ball it last matched. Following those copy links backward in time, the starting colours form lineages that only ever merge and never split. Represent each surviving lineage by one token, so the token count equals the number of colours still present, falling from down to .
#Each merge is geometric
A backward step merges two tokens exactly when its ordered pair lands on two distinct surviving lineages, which with tokens left happens with probability . So the wait to drop from tokens to is geometric with mean .
#Telescope
#The last merge dominates
The answer is . The final merge of the last two colours alone costs , fully half the wait, since two thoroughly mixed colours are slow to tip over into one.