Posts Tagged Puzzles

From the Archives: Monty Hall

My “Day I Left Pennsylvania” led me to some archived website posts (before blogs were invented) I had written many years ago. I’m re-posting them now. Bear in mind that most of the content in this series is over 5 years old. I have left the content more or less intact. I have removed some links and added some others — but that’s it. Enjoy!


UPDATE

After John W’s skepticism, I decided to put my code where my mouth is — please see:

http://amhill.net/projects/montyhall/

It has a simulator, demonstrating the superiority of switching, based on a sample size of 10,000 or less. Source code included.  Check it out!

For those of you who remember Let’s Make a Deal the idea of the three-door choice is very familiar. For those who aren’t familiar with Monty Hall and his extravaganza of game-showness, here’s the low-down:

Door 1
Door 2
Door 3
Goat
Goat
New Car

The contestant is presented with a choice of three doors. Two of them have a goat, and one of them has a fabulous prize, like a new car, or a boat, or an evening with Brad Pitt, or whatever. (the contestants were mostly women, since at the time less women were in the workforce, therefore they were the target demographic). Anyways, here’s how it works. They pick one of the doors, then Monty reveals one of the two doors they did not choose; but the door revealed will always contain a goat. The contestant is then allowed to stick with their choice, or change it. The puzzle here is: Is it better odds, statistically speaking, to stick with your choice, or change it, after the goat is revealed? Most mathematicians have said yes in the past, but Marilyn Vos Savant disagreed. Here is a paraphrasing of her proof: Read the rest of this entry »

Popularity: 3% [?]

Tags: , , ,

Goblin Game [From the Archives]

My “Day I Left Pennsylvania” led me to some archived website posts (before blogs were invented) I had written many years ago. I’m re-posting them now. Bear in mind that most of the content in this series is over 5 years old. I have left the content more or less intact. I have removed some links and added some others — but that’s it. Enjoy!


goblin_gameYes it may be a magic card, but it inherently possesses a fundamental of game theory. For those of you who are not familiar with what that image to the right is, it is a card from the game Magic: the Gathering ,however it’s origin is unimportant, nor is whether or not you understand the nuances of the numbers and whatnot. The text in the lower-half of the card is what is important here. Allow me to elucidate in real-life terms….money!:

Let’s say that everyone (3 or more people) has 20 dollars. The game proceeds like this:

  1. Each player hides a certain number of objects (poker chips, for example). The number must be greater than 1.
  2. After everyone has their objects hidden, all players simultaneously reveal their objects to other players. The number of objects hidden is significant here, and should be recorded.
  3. Everyone immediately loses the amount of money equal to the number of objects hidden, this goes into a “pot” in the middle. If a player has hidden more objects than he has money, all of his money is put into the pot instead.
  4. Whoever had set aside the fewest objects loses half of their remaining money, rounded up.
  5. Repeat steps 1 – 4 until only one player is left with any money. That player then wins it all.

Understand how to play? More importantly, do you understand how this illustrates game theory? All players must consider the actions of other players when making their own decisions. Read the rest of this entry »

Popularity: 1% [?]

Tags: , , ,

Towers of Annoyed [From the Archives]

My “Day I Left Pennsylvania” led me to some archived website posts (before blogs were invented) I had written many years ago. I’m re-posting them now. Bear in mind that most of the content in this series is over 5 years old. I have left the content more or less intact. I have removed some links and added some others — but that’s it. Enjoy!


(Just kidding, it’s “Towers of Hanoi” :) )

hanoiAny first or second-year computer programmers have likely run into this problem, most likely when they first get introduced to recursion.

Legend has it that in a temple in the Far East, priests are attempting to move a stack of disks from one peg to another. The initial stack had 64 disks threaded onto one of three pegs and arranged from bottom to top by decreasing size. The priests are attempting to move the stack from that peg to a second peg. The only constraints are that disks must be moved one at a time, and at no time may a larger disk be placed above a smaller disk. A third peg is available for temporarily holding disks.(Supposedly the world will end when the priests finish, so you would kind of wonder why we would want to help them, eh? ;^)

Ok, that’s a mouthful! Let’s start by breaking this down into some simpler rules: Read the rest of this entry »

Popularity: unranked [?]

Tags: , , ,

Billiard Ball Puzzle [From the Archives]

My “Day I Left Pennsylvania” led me to some archived website posts (before blogs were invented) I had written many years ago. I’m re-posting them now. Bear in mind that most of the content in this series is over 5 years old. I have left the content more or less intact. I have removed some links and added some others — but that’s it. Enjoy!


Consider the puzzle:

I have six billiard balls, one of which weighs less than the other five. Otherwise, they are all identical. What is the least number of weighings it will take to identify the lighter ball by using a balance scale?*

This is the classic layout for puzzles like this. The correct answer for this particular puzzle is 2. The formula for this type of puzzle is floor( log (base 2) x ). The function floor( ) means that if the number was a fraction, you round down to the nearest whole number. log (base 2) xmeans the answer is whatever power to which 2 must be raised to reach x.

log (base 2) 2 1 (2 ^ 1 = 2)
log (base 2) 4 2 (2 ^ 2 = 4)
log (base 2) 8 3 (2 ^ 3 = 8)
log (base 2) 6 ~2.585 (2 ^2.585…= 6)

So, using our equation from earlier, we can see that the floor(2.585…) is simply 2. 3 weighings wouldn’t be required until you add an 8th ball.

The question is now, how did we reach that conclusion? We have our cute little formulae and all, but if you really had to do this, how would you do it? (let’s say in this example that the ( 1 ) ball is the light one, but we don’t know that) Read the rest of this entry »

Popularity: 1% [?]

Tags: , , ,

The Marble Puzzle [From the Archives]

My “Day I Left Pennsylvania” led me to some archived website posts (before blogs were invented) I had written many years ago. I’m re-posting them now. Bear in mind that most of the content in this series is over 5 years old. I have left the content more or less intact. I have removed some links and added some others — but that’s it. Enjoy!


You are presented with the following puzzle:

In a box there are 20 balls: 10 white and 10 black. With a blindfold on, what is the least number you must draw out in order to get a pair that matches?

Some people get this one right off the bat, other people don’t. If you answered 3 then you are one of the people that DO get it. If you answered 11, then you are in the latter category. Why is the answer three? The best way to explain it is by analyzing the worst-case-scenarios of draws, which will give us the minimum number of draws necessary. (W = White, B = Black)

Drawing #
Current Draw
Total Draws
1
W
W
2
B
WB
3
W
WBW

The problem most people run into is that they forget that the problem asks for ANY TWO balls of the same color. If the problem said “how many must you pick until you can guarantee two white balls” then the answer would be 12. Read the rest of this entry »

Popularity: unranked [?]

Tags: , , ,