There is a box in which there are 20 black chocolates and 16 white chocolates. You take out two chocolates at one time. If both are of same type, you add a black chocolate otherwise you add a white chocolate.
You keep repeating like this till there is only one chocolate left in the box. Which type of chocolate will be left in the last?
Also, suppose you begin the same process with 100 black and 93 white chocolates. Which chocolate will be left at last then?
Solution:
Let us solve this problem with variables to find the general nature. Let us assume that there are x black chocolates and y white chocolates. Three things can happen when you take out two chocolates.
1) You take out two black chocolates.
Then, you will be replacing one black chocolate and so the jar will have x+1 black chocolates and y-2 white chocolates.
2) You take out two white chocolates.
Then, you will be replacing 1 black chocolate and so the jar will have x-1 black chocolates and y white chocolates.
3) You take out 1 black chocolate and 1 white chocolate. Then, you will be replacing a white chocolate and so the jar will have x-1 black chocolates and y white chocolates.
Thus at every step, you are wither removing a black chocolate or replacing two white chocolates by one black chocolate irreversibly till there is just one chocolate left. Therefore each white chocolate is equivalent to two black chocolates.
This, if the number of white chocolates are odd in number, the last one remaining will be white chocolate and if the number of white chocolates are even in number, the last one remaining will be black chocolate.