You have a bag that contains $b$ black balls and $w$ white balls. ($b+w>2$) You put your hand into the bag and pull out a pair of balls.
- If both balls are black, you throw away one and return one to the bag.
- If both balls are white, you throw them both away.
- If the balls are of different colours, you throw away the black ball and return the white ball to the bag.
You repeat this process $N$ times. At the end, you end up with exactly one ball in the bag.
For what all values of $b$ and $w$ is the maximum possible $N$ different from the minimum possible $N$?
Answer
The conditions can be reduced to effectively the following 2 cases:
- remove 2 white balls
- remove 1 black ball
If $w$ is even then the last ball must be black and then $N=\frac{w}{2}+(b-1)$.
If $w$ is odd then the last ball must be white and then $N=\frac{w-1}{2}+b$.
In both cases the value of $N$ is fixed, so the minimum and maximum are equal.
No comments:
Post a Comment