Geek Brain Teasers
muce writes "A few days ago my cube mate entertained a lot of us engineers by presenting us with the famous Monty Hall problem. That problem sparked a day of strong debates, coding simulations, and ramped writing of equations on whiteboards. Since then we've been thirsting for more good geeky mathematical brain teasers to pass the time at work. Does anybody know of any good ones like the Monty Hall problem, or by chance is there a web page with a collection of them?"
check out the puzzles faq (ftp from rtfm.mit.edu) lots of math puzzles, language puzzles, every sort of puzzle you could want.
if you and two friends go to a hotel, the hotel manager charges you thirty dollars, you split it three ways, ten bucks each, right? then you go to your room, the manager realizes it was only 25, so he sends a bellhop with five dollars to your room. The bellhop steals two bucks, giving you each a dollar back, reducing your expenditure to nine dollars each, nine times three is twenty-seven, plus the two that the bellboy stole is twenty-nine dollars, where's the missing dollar?
You'd think you had a 50/50 chance by knowing that you seem to have a choice between two doors. Because, should a second person come along not knowing of your choice, and choose between the two doors, his chances would have to be 50/50.
Let's ask the question another way. Monty asks you to choose a door with no chance to switch. Your chances are 1/3. Even if he opens one of the wrong doors before he tells you if you won or lost, you cannot change, and therefore your chances are 1/3.
Again, but this time Monty asks you to *remove* a door. In other words, you win if the door is *not* the one that you pick. Your chances are 2/3. Even if Monty opens up a losing door before he tells you the winner.
Should you choose to stay or switch *before* you choose any doors, these two cases are stay and switch respectively, showing the odds are 1/3 for staying and 2/3 for switching.
The thing that boggles the mind, is if someone else chose his chances are 50/50. Yes, this is true. But had he known the previous situation, his chances are the same as yours.
It still seems not to make sense since how does opening the door affect your decision. So here is what helped me. When you make your first choice, you have a 1/3 chance of getting the car. So, in 1/3 of the cases, Monty can choose either of the other two doors to open, as they are both losers. In 2/3 of the cases (that is, when you choose a goat door) the door that monty open is chosen by your choice. That is, he can't choose your choice to open, nor can he open the one with the car. Thus, in 2/3 of the cases you *affected* the opening and cancellation of one of the doors. Thus bring it into the equation and allowing it to raise the cahnces of the other door.
---
ticks = jiffies;
while (ticks == jiffies);
ticks = jiffies;
Have you read my journal today?
I posted this lat time Ask /. had a puzzle of boring Sunday a while back.
Three smart kids are on a beach and all have mud on their foreheads. An old man comes over to them and asks for each of them to look at *both* their friends, and should one *or* both of their friends have mud on their foreheads, they should raise their hands. All three kids look at both of their friends, and seeing mud on both of their friends heads, they raise their hands.
The old man then offers a dollar to anyone who can answer his next question, and prove it. He asks if any of the kids know that they do, or do not, have mud on their foreheads, and if they can prove it. The kids look at each other and are bewildered for a bit. Suddenly, one of them screaches, "Oh!" and raises his hand. He then explains to the old man how he must have mud on his forehead and explains his reasoning. As his reasoning was excellent, the old man gives him the dollar.
What was the boy's reasoning?
---
ticks = jiffies;
while (ticks == jiffies);
ticks = jiffies;
Have you read my journal today?
The original is "how many [black|red] cards are there in three face down cards; does the number seem to "change" when one of the cards is revealed?" The problem is from the 16th century (about the time of the application of color to what became the "standard" deck), and the solution came in the 18th century...with no computers involved. The solution uses basic probability mathematics that's still taught as-is in today's Prob&Stats classes for Math and CS Majors.
"But remember, most lynch mobs aren't this nice." (H.Simpson)
-- Joe
Three travelers stop at a hotel for the evening. The manager offers the travelers a single room at a cost of $30, to which the travelers agree, each paying the manager $10.
Later that evening the manager realizes that he has over charged the travelers for their room: the price should have been $25 rather than $30. The manager calls the bellhop over, giving him $5 and instructing him to take the money up to three travelers as a refund. On his way up to the travelers' room the bellhop considers that there is no even way to divide $5 between three people, and decides, in the interest of civility, to keep $2 for himself as a tip, giving the travelers' only a $3 refund
When the bellhop gets to the room, he gives the travelers their $3, which they divide equally amoung themselvs, $1 per person, and everyone is happy. Here, however, is the problem: Each traveler has now paid $9 ($10-$1=$9), meaning that they have paid a total of $27 (3*$9=$27) for the room. Add in the $2 that the bellhop kept as a tip and we have $29 ($27+$2=$29). But the three travelers originally paid $30! Where is the missing dollar?
Monty shows you 1000 doors and asks you to pick the one you think hides a car. You pick door 94. Then Monty opens 998 doors. At each door, he checks the number on the door against a little scrap of paper he has. When Monty is done opening doors, he has revealed 998 goats, and left your selection, door 94, and one other door, door 672, closed.
Monty reminds you that one of the two remaining closed doors hides the 999th goat, and the other hides a brand new car! You can keep your original choice, or change your choice to door 672.
Should you switch?
If yes, how is this different from the three door case?
Don't feed the trolls.
Let's assume without loss of generality that you pick the first digit. That rules out cases 4 to 7. Knowing there's at least a 1 rules out case 0. The cases left are 001, 010 and 011. Therefore the odds that there are two 1's is 1/3.
Get it now?
sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
There were some pretty heated discussions here a while ago, until we wrote down all the possible outcomes. It was a relief to find a mathematician agreed:
http://math.ucsd.edu/~crypto/Monty/montybg.html
Arguments and code simulations? Why? Are your co-workers mentally weak? This is an open and shut case of logical analysis.
At first glance, there are three doors, two goats, and one car. However, this is misleading.
In any run of the problem, one of the unchosen doors is shown to be a goat. You cannot choose that door, and both it and its associated goat never enter into the statistical problem.
The actual problem has only two doors, one goat, one car. Plain old 50/50 chance. There is no gain to be had by changing doors.
Well, unless the door is hung a bit high and you can see goat legs under the door you have chosen.
.sig: Now legally binding!
Heh.. Why worry about it, when the answer can easily be gained through social engineering at no cost?
'Man, three kids.. How do you handle the sibling rivalry?' should produce at least one childs name and the gender of the other two. If it doesn't, eg, you get a result like 'Oh, it is/is not terribly bad.' you have to go fishing again. If you had siblings, or have at two children of the same sex, try the empathy ploy. Detail how when you/your children had to share a room, the infighting was worse, and ask if keeping them seperated could be the reason/solution.
Leading, generic talk can get you anywhere.
.sig: Now legally binding!
Nope. A decreased chance. Seeing a girl's bedroom is as good as seeing the girl. There are a myriad of excuses to have the hockey schedule on the fridge, from 'My wife picks up the neighbor's kid when she picks the girls from ballet' to 'My twelve year old, Daphne, was so good they moved her into boys AAA Pee-Wee this year.'.
.sig: Now legally binding!
"This message is composed of 100% recycled electrons."
I never figured it out but apparently it is possible.
Free Techno/Jazz/DNB/MI Music by guys obsessed with monkeys!
handA = (mudB or mudC);
handB = (mudA or mudC);
Since mudA and mudB are both true, the value of mudC is indeterminate. An individual, therefore, would not know the value of mudC (his own forehead muddiness), solely from handA, handB, mudA, and mudB. However, when the kid saw that at least one of the others was sufferring from the indeterminacy of his own forehead muddiness, the only reason is that that kid is also seeing the same problem of two hands and two muddy foreheads. Seeing this, the kid pronounced that his forehead must certainly also be muddy. QED.
- You choose one digit randomly, and are told it is a 0.
- You are told that there is at least one 1.
Notice that the two pieces of information are not of the same "quality". Now, what are the odds that there are two 0's? What are the odds that there are two 1's?Slashdot is jumping the shark. I'm just driving the boat.
As a side note, at one time I heard an explanation of her world record IQ that makes me discount her as the world record holder.
Supposedly IQ scores depend on the sample size taking the test. If a relatively small number of people take the test, even scoring a perfect score can only rate an IQ a few points above the average.
So the story I heard is that the test she set the record on was one of the most widely given standardized IQ tests. I believe she is solidly in the "baby boomer" set and I think this was a school test given years and years ago.
Since no test since then has been given to more people, even a perfect score on every IQ test since then wouldn't result in breaking her record.
Of course, that's just the information I heard. It could be wrong, but it does sound plausable.
Here's a variant on the Monty Hall problem that I got from a computer science prof, which illustrates arguments regarding Bayesian inference.
Your friend invites you to his house. You know a priori that he has three children, but you have no information on their genders.
While looking for the bathroom, you accidentally stumble into one of the children's rooms, and find that it is obviously a girl's room.
While in the kitchen, you see a schedule for a boys' hockey team.
So, you know that there is at least one boy and one girl. The question is: what is the probability that there are two boys and one girl?
I am obfuscating the answer so as to let you think about it first: floor(log(7.39))/floor(10^(0.779))
Toronto-area transit rider? Rate your ride.