Jam Jar Survival

To learn c++ I’ve been relying on forums to get through.  I usually hate having to trawl through it all, but today I stumbled across a treasure trove of CS riddles. Fun fun!

The Jam Jar puzzle (Level 1):

You are on a foreign island and the locals will let you live if you win their game. They give you two jars, one with 50 white marbles, the other with 50 black marbles. At first you can rearrange them as you wish. Then you are blindfolded, the jars shaken, and one randomly given to you. You have to pick a white marble to survive!

How do you rearrange the marbles so you have the highest probability of choosing a white marble?


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s