The first box has two white balls. The second box has two black balls. The third box has one white and one black ball. Boxes are labeled but all labels are wrong! You are allowed to open one box, pick one of its balls at random, see its color and put it back into the box (you do not get to know the color of the other ball). How many such operations are necessary to correctly label the boxes?
A classic puzzle.
Since no label is correct, we have to distinguish between two cases: (BW is labeled BB, BB is labeled WW, WW is labeled BW) or (BW is labeled WW, WW is labeled BB, BB is labeled BW). So pick one ball at random from the box labeled BW.
How would you divide 50 black and 50 white marbles into two piles, not necessarily of same size, so that the probability of picking a white marble as follows is maximized: we first pick one of the piles uniformly at random, then we pick a marble in that pile uniformly at random?