Posts

Showing posts with the label balls

The Color Of The Last Ball?

You have 20 Blue balls and 10 Red balls in a bag. You put your hand in the bag and take off two at a time. If they’re of the same color, you add a Blue ball to the bag. If they’re of different colors, you add a Red ball to the bag. What will be the color of the last ball left in the bag?

Note: Assume you have a big supply of Blue and Red balls for this purpose. When you take the two balls out, you don’t put them back in, so the number of balls in the bag keeps decreasing.

Once you tackle that, what if there are 20 blue balls and 11 red balls to start with?


What Would Be The Color Of The Last Ball?

This should be the color of last ball! 

Source 

That's The Color Of Last Ball


What was the challenge? 

There could be 3 possible combinations that we could get on each removal.

1. One is Red & other is Blue. 

In this case, we are taking off Blue & Red but adding Red back though from other source. Effectively we are taking off only Blue keeping number of Red balls same.

2. Both are Red.

We are taking off 2 Red balls but adding 1 Blue.

3. Both are Blue.

Again we are taking off both Blue balls but adding 1 from other source. Effectively, we are keeping number of Blue intact in such cases.

What we observe from this is that the Red is always taken off in pair. And if it is taken off in single then other Red takes it's place as seen in case 1 above. On the other hand, Blue is added or taken off in single.


Since there are even number of Red balls i.e.10 which only can be taken off in pair, there won't be any single Red balls at the end. Hence, last ball must be Blue.


Logic To Find Out The Color Of Last Ball
 
Sub question's Answer :

For odd number of Red balls i.e. 11 here, if taken off in pair then the last ball would be the Red always. Hence, the last ball must be Red in the case.


Logic To FInd Out The Color Of Last Ball

Follow me on Blogarama