Last Ball

A bag has 20 blue and 14 red balls.Each time you randomly take two balls out of the bag.(Assume each ball has equal probability of being taken).You do not put the two balls back.Instead,if both balls are of same color,you add a blue ball to the bag;if they have different color,red ball is put in the bag.Assume that you have infinite supply of red and blue balls,if you keep on repeating this process ,what will be color of last ball left in the bag.Will the case remains same if we have 13 red balls????


  1. blue in the first in the 2nd...whenever there is odd no. of red balls it would be red otherwise blue.

  2. If you start with r red balls and b blue balls here is what can happen:
    1) Both red: Now you have r-2 red and b+1 blue balls
    2) Both blue: Now you have r red and b-1 blue balls
    3) 1 red and 1 blue: Now you have r red and b-1 blue balls.

    Notice that case 2) and case 3) produce same final result and can be combined.

    Also notice that parity of red balls don't change (i.e. if there are even number of red balls to start with, we will have even number at end vice-versa). This means if we have odd number of red balls to start with we will have 1 in end else 0.

  3. @pathikrit very good explanation..:)


Post a Comment

Popular posts from this blog