I’d like to welcome you with a little logic puzzle
So I’m trying to finally get around to starting and maintaining a blog. We’ll see how it works out this time. As a little welcome for ALL my many valued readers, I’ll present a logic puzzle that has supposedly been used by Microsoft for programming interviews.
You have a 3-quart bucket, a 5-quart bucket, and an infinite
“supply of water. How can you measure out exactly 4 quarts?
My solution is as follows:
First, place the 3-quart bucket upside-down inside the 5-quart bucket. Fill up the 5-quart bucket, then remove the 3-quart bucket. This will leave 2 quarts inside the 5-quart bucket. Pour this into the 3-quart bucket. So there are now 2 quarts in the 3 quart bucket, and none in the 5-quart bucket. Place the 5-quart bucket over the 3-quart bucket so the bottom of the 5-quart bucket is covering the rim of the 3-quart bucket, then turn them over, so the 5-quart bucket is facing upwards. Fill the outside of the 5-quart bucket, then remove the 3-quart bucket. The 2-quarts that were contained in the 3-quart bucket will mix with the 2-quarts surrounding the outside of the 3-quart bucket, and you’ll be left with 4 quarts in the 5-quart bucket.
About this entry
You’re currently reading “I’d like to welcome you with a little logic puzzle,” an entry on Overflow: Auto
- Published:
- 07.01.07 / 2pm
- Category:
- Logic
2 Comments
Jump to comment form | comments rss [?] | trackback uri [?]