Classic Computer Science Puzzles

@bladesjester

If you meant this to be a mathematical problem, then you should state the conditions more clearly to present it as a purely mathematical problem. I have heard this problem before, but your description of the problem lends itself to some creative answers because it describes a real world situation. A person choosing a marble randomly in a room from two buckets has too many variables to determine the probability.

Observations:

  1. You did specify that the new person would choose a marble at random from inside one of the buckets.
  2. You specified a that a person would choose “randomly” which introduces a lot of variables.
  3. You did not specify that the choice of bucket was completely random as well as the choice of marble.

Potential solutions that exploit the above observations:
1)Put all of the marbles in one bucket. Put the other bucket on top of of the full one upside-down. Put a single blue marble inside the rim of the bottom of the upside-down bucket. A bucket has two concave surfaces, either of which can be considered “inside” under normal assumptions. Under topographical assumptions, neither could be considered “inside” the bucket.

  1. Melt the plastic of both buckets. Put the white marbles into this goo and reform the plastic into a new bucket made of plastic and white marbles. Place the blue marbles into this new bucket. Both the white and blue marbles are inside of both buckets.
  2. Leave a post-it note: “Take One” on the blue marble bucket.
  3. Completely fill one bucket until it is brimming with all of the white marbles and pee. Leave the blue marble bucket as is.
  4. Put all of the white marbles in one bucket, then the second bucket with blue marbles on inside of that bucket covering the white marbles.
  5. Cover the white marble bucket with your shirt and turn it upside-down. Slide your shirt away to leave the white marbles contained by the upside-down bucket. Then place the full blue bucket on top of the upturned white bucket.
  6. Stack the buckets so you can climb to the ceiling. Hide the white marbles bucket in the ceiling.

There’s quite a few good ones here:
http://www.ocf.berkeley.edu/~wwu/riddles/intro.shtml

One of the first ones we worked with in college was the Cannibals and Missionaries Problem.

http://www.learn4good.com/games/puzzle/boat.htm

Fairly simple, but a good warm up to some of the harder ones.