Black or White Pebble

pradeep_agrawal

pradeep_agrawal

@pradeep-agrawal-rhdX5z Oct 21, 2024
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

Welcome, guest

Join CrazyEngineers to reply, ask questions, and participate in conversations.

CrazyEngineers powered by Jatra Community Platform

  • tech_vaibhav_ee

    tech_vaibhav_ee

    @tech-vaibhav-ee-65Xzvs Jun 29, 2009

    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

    @pradeep-agrawal-rhdX5z Jun 30, 2009

    That's a correct answer with correct reason behind the behavior.

    Awesome buddy.

    -Pradeep