Black or White Pebble

There is a bowl containing black and white pebbles. You pick up two pebbles randomly at a time.

1. If both are white, you throw away both of them.
2. If one black and one is white, you throw away the black one and put the white pebble back into bowl.
3. If both of them are black, you throw away one of them and put the other back into the bowl.

If you try this with some given count of x black and y white pebbles in a bowl, what will be the color of last pebble left and why?

-Pradeep

Replies

  • tech_vaibhav_ee
    tech_vaibhav_ee
    if initial no. of white balls:
    1> odd ....then last ball would be white
    2> even...then last ball would either be black or no ball would be left..

    hint: since the only way to remove white balls is in a pair...therefore if initially the no of white balls were even , then they would always be even...and the same for odd....
  • pradeep_agrawal
    pradeep_agrawal
    That's a correct answer with correct reason behind the behavior.

    Awesome buddy.

    -Pradeep

You are reading an archived discussion.

Related Posts

The need for oil and gas is increasing everyday, with much of the world still developing.
Hello friends, Today I want to tell you something interesting about online Mechanical Engineering. Mechanicalebook.com is an online exclusive reference and handbook for . This website has...
​ Often companies will claim a "sellout" in order to hype incredible demand for its product. However, these claims are pointless without any firm numbers -- after all, there's a...
- Comparative Analysis of the Physical Layer Technologies in WiMax and LTE - FoIP vs VoIP : Design and Application - Software based GPS receiver - Smart Home Technologies -...
​Rumor has it that Intel is prepped to launch its new SSDs in the next two weeks. According to sources speaking to the The Inquirer, the new solid state disks...