dkogan ([info]dkogan) wrote,

Puzzles

I've made mugs with a lot of these puzzles. Check them out here.

I'm going to collect good (by my criteria) puzzles here and add to the post as needed.

This list is also on my website here, and I have not yet decided which is going to be more up-to-date. For now, I'm just going to try to keep them sync'd.

Last update: Jan 26, 2007.

  • Games

    • 1000 Pirates: Consider 1000 pirates that are all perfectly greedy, heartless, and rational (and aware that the other pirates are the same), ranked by seniority, 1 through 1000. They want to split a horde of treasure, and decide that they will do so by a series of votes. Each time they vote, if 50% or more vote to split the treasure equally, they do so. Otherwise, they kill off the lowest ranking pirate, and repeat the vote. How many pirates die before the treasure is split?
      • Bonus 1: Consider the same pirates, who subseqently gained/lost enough members to number 100. They come across a hoard of 5,000 gold coins. This time, the most senior pirate (the captain) will decide on a way to split the coins (not necessarily equally). All the pirates then vote. If at least 50% agree to the split, they do so. Otherwise, they kill the captain, elect the next most-senior pirate captain, and repeat. You are the captain. How do you split the coins?
      • Bonus 2: Same as Bonus 1, but this time, you need a majority (more than 50%) of the vote to survive. You may assume the pirates to be bloodthirsty if it helps.

    • Poison Wells and Dragons: You are stranded in the middle of a very large lake on an island with a dragon and seven poisoned wells, numbered 1 to 7. Each poison is the antidote to any lower numbered poison (3 is the antidote to both 2 and 1), and you have a couple of hours to get to an antidote after you are poisoned. However, only the dragon can reach well 7, as it is at the top of a tall mountain. The water in the wells looks clean, so you can't tell them apart. The dragon challenges you to a duel: he and you will each bring a glass of water, exchange glasses and drink. Can you survive? Can you kill the dragon? How sure are you of success?

    • Quarter Game: The devil challenges you to a game played on a circular table of unspecified diameter. You and he take turns placing a quarter on the table such that it is completely on the table and does not overlap with any other quarters already played. A player wins if he makes the last legal move. Do you prefer to go second or first?

  • Probability & Statistics:

    • Monty Hall: You are on a gameshow in front of three doors which lead to three rooms. One of the rooms contains a prize, the other two are empty. You may open one door. You choose a door, but do not open it yet. The host, who knows which door hides the prize, opens one of the doors you did not pick, showing that it does not hide the prize. He then gives you the opportunity to switch doors. Should you change your choice?

    • Envelope Choice: You have two envelopes in front of you, each with a non-zero sum of money. One contains twice as much money as the other. You select one of the envelopes, but ponder before opening it. If your envelope has x dollars, there is a 50% chance the other one has x/2 dollars and a 50% chance it has 2x dollars. The expected return of switching therefore is .5(.5x 2x) = 1.25x, which seems like a favorable gamble. Do you switch and why?

    • Children: Your married-with-two-kids co-worker invites you over to dinner. You come over and...
      • a) A son of the coworker answers the door. What is the probability that the other child is a girl?
      • b) The co-worker's firstborn, a son, answers the door. What is the probability that the other (younger) child is a girl?
      • c) Recently, the government has sent all families with two female children to China. Your co-worker (still not in China) answers the door, and says 'my two kids will be down shortly'. What is the probability that he has two boys?
      • d) The (presumably mathematician) co-worker answers the door, and says 'I have two children, at least one of whom is a boy.' What is the probability that both children are boys?

    • Marbles: You are brought two jars, one with 50 white marbles, the other with 50 black marbles. You are allowed to redistribute the marbles however you wish so long as when you are done, every marble must be in one of the two jars. The two jars will then be shaken up, then you will be blindfolded and presented with one of the jars at random. You pick one marble out of the jar given to you. If the marble you pull out is white, you live; if black, you die (sorry). How should you redistribute the marbles?

    • 100 Prisoners: 100 men are on death row. Their names are placed in 100 boxes on a table, one name to a box. The prisoners are led into the room with the boxes, one at a time. Each is allowed to look into up to 50 of the boxes to try to find his own name. If every prisoner is able to find his name, all the prisoners are released. Otherwise, all are executed. The prisoners are not allowed to alter the state of the room or boxes in any way, nor communicate after they enter the room; however, they are given a chance to come up with a strategy in advance. What is their best strategy? Hint: Lbh pna trg nobir guvegl creprag. Ab, ernyyl.

    • Rock Stars: The keeper of the website The Premature Death of Rockstars argues that rock stars live on average 36.9 years, while the rest of us live on average 75.8 years. Is his assesment reasonable given the data?

    • Lazy Hunter: A rabbit starts on an infinite straight path, at a point we'll call 0. Every second, the rabbit randomly jumps either one meter to the right or one meter to the left. A lazy hunter waits for just off the path, one hundred meters to the right of the rabbit's starting position. What is the expected time until the rabbit lands at the 100 meter mark in front of the hunter?

  • Sets

    • Pills: You are on a strict medical regimen that requires you to take exactly one A pill and exactly one B pill at the same time each day. The pills are very expensive. You open the bottle of A pills, and tap one out into your hand. Then you open the bottle of B pills, but tap too hard, and two B pills come out into your hand with the A pill. Problem is, the pills are all exactly identical. How can you satisfy your regimen without wasting any pills?

    • Coin Room: You're wearing a blindfold and thick gloves, in a room with 50 quarters, 20 of which are heads up. You are allowed to move the coins around and/or flip some or all of them, if you wish. Problem is, you can neither see the coins nor feel which side of any of them is up. Find a way to split the coins into two groups, each of which has the same number of heads up coins.

    • Mutilated Chessboard: Consider a standard 8x8 chessboard, and a set of rectangular tiles 1x2 squares in size. You can cover the board with 32 tiles. If you remove one square each from two opposite corners of the board, is it possible to cover every remaining square using 31 tiles?
      • Bonus: Consider a chessboard with two adjacent squares removed at each of two opposite corners (four squares removed altogether in two rectangles - your choice of orientation). Can you cover this chessboard with tiles shaped as tetris Ts: 1x3 with an extra 1x1 attached in the middle?

    • Scales: You have 14 marbles, identical except that one is flawed, either heavier or lighter than the others. You have a scale which will compare weights, but will only let you know heavier than, lighter than, or equal. You are allowed 3 weighings, and your task is to determine which marble is flawed, and whether it is lighter or heavier than the others.
      • a) Prove that the problem is impossible to solve. (1-2 sentences max)
      • b) Prove that the problem is impossible to solve even with 13 marbles.
      • c) Solve the problem with 12 marbles.

    • 1000 Barrels of Wine: A king has 1000 barrels of expensive wine. His guards catch an assassin in the cellar, but only after the assassin poisoned an unknown one of the barrels. The poison is so lethal that any amount of contaminated wine will kill, and it takes a month to take effect. Fortunately, the king has 10 political prisoners he was going to execute anyway. How soon can the king drink his wine again?

  • Other

    • Liar/Truthteller: You die and find yourself before two doors, with a pair of guardian statues situated between them. One door leads to salvation, the other to purgatory (they are not labeled). One of the guardian statues always tells the truth, the other always lies (they, also, are not labeled). You may pose only one question to one statue. What do you ask to determine which door leads to salvation?

    • Secure Medicine: Alice needs to send medicine to Bob, who is on another island. Eve has a boat and a chest that can be locked. Eve is willing to transport objects in the chest, but she is a kleptomaniac and will steal whatever is inside the chest if she has access to it. Both Alice and Bob have a padlock and a key such that their own key only opens their own lock. Neither Alice nor Bob are able to travel. How can Alice send Bob the medicine so that Eve won't steal it?

    • Foresight: There are two envelopes in front of you, A and B, prepared by Buddha. Envelope A contains $1,000. Envelope B contains either $1 million, or nothing. Buddha has predicted which envelope you are going to pick. If he predicted that you pick envelope A, then envelope B contains $1 million. If he predicted that you will pick envelope B, then envelope B is empty. The envelopes were prepared before you entered the room, and Buddha is omniscient. What envelope to you choose and why?

    • The Unexpected Tiger: Princess Jane wants to marry knave Mike. The king, who is renowned for being always right and always truthful, offers the couple a small chance. Mike will open seven doors in order from 1 to 7. Behind one door, the king promises, will be an unexpected tiger, which Mike will have to defeat to win the princess. Mike agrees. Before he opens any doors, he considers that if he opens doors 1 through 6 and they are empty, then the tiger would have to be behind door 7. Yet then the tiger would not be unexpected, so that rules out door 7 (the king always keeps his promises). That leaves only doors 1 through 6. Yet by the same logic, the new last door (6) also can not contain the tiger. Mike quickly eliminates the rest of the doors, and decides that none can hide a tiger. Confidently, he begins to open the doors, and is devoured by the (unexpected) tiger behind door 3. Where did Mike go wrong?

    • Tiger 'Round a Lake: You go fishing in a circular lake of radius R. From the center of the lake, you spot a hungry tiger at the shore. The tiger can't swim, runs N times faster than you can row your boat, but you can run faster than the tiger. If you can get onto the shore away from the tiger, you can escape. The tiger knows this, and is smart enough to optimize his strategy to be waiting for you when you reach the shore. What is your best strategy for getting to shore as far away from the tiger as possible? At what relative values of N and R can you no longer escape?

  • Short/Odd (some with real solutions, some not so much)

    • There are 10 types of people in the world - what are they?

    • You are on a lake in a boat. You take a bowling ball from the boat and throw it into the lake. Does the level of the lake fall, rise, or stay the same?

    • A machinist drills a circular hole, dead center, all the way through a solid metal sphere. The hole is 6 inches long. How much metal remains in the ball? (Ah, but can you prove it?)

    • Parallel train tracks appear to converge in perspective. What angle must they be laid at to appear to be parallel in perspective?


I'm adding this to my memories if you are ever bored and want to while away a few minutes.

Comment if you have any suggestions for the list, though bear in mind my criteria may be different from yours, so I don't guarantee I'll add your puzzle.

Let me know if I've erred in any of the problem statements.

Feel free to post solutions (it's screened) / ask questions (or for hints) / etc.


References: Berkeley riddles; Slashdot Thread; Hard interview questions on E2; Grey Labyrinth; Stanford; Mathematical Puzzles by Peter Winkler, Cut the Knot, [info]problemaday, techinterview.org.

Tags: logic, puzzles

  • Post a new comment

    Error

    Your reply will be screened

    Your IP address will be recorded 

  • 50 comments

[info]countrycousin

December 20 2005, 20:49:17 UTC 6 years ago

I have seen many of these before (I may have seen more - memory unreliable :<( )

Re: children - I go with 50% in both cases. I recall seeing a discussion of something similar in a Marilyn vos Savant article, but I don't recall the precise wording. In at least one of those cases, there was argument for something other than 50%, but I think the specification was a bit different.

Re: pirates - only the top two are guaranteed survival (although the third can vote to split at N=4 without counting on the perfect reasoning ability of anyone except the last, who has a very easy choice. The fourth could wait until N= 6, etc, but has to be sure everyone lower sees things his way). Once they decide not to split, the same reasoning applies all the way up. Since they all presumably recognize this, I predict a 997 to 3 initial vote for splitting and no lost pirates :<) , but it might be 500 to 500.

[info]dkogan

December 20 2005, 21:03:52 UTC 6 years ago

True, some of these are quite common.

Children: Try enumerating the possibilites. (Although to be fair, I'm not sure I agree with the official answer.)

Pirates: The pirates are more rational than that. Try figuring out what each pirate's logic will be, starting at 1 and going down the ranks.

[info]countrycousin

December 21 2005, 00:11:06 UTC 6 years ago

Children: Try enumerating the possibilites. (Although to be fair, I'm not sure I agree with the official answer.)

Yes, that was the tactic I recall being used in the argument. However, one has to weight the possibilities correctly.

e.g. possibilities: bb bg gb gg (this is the way I recall seeing explanation). b answers, so you throw out gg, leaving the first 3, with the other partner being 2/3 g. But that is not really the case. Real possibilities are bb 1 ans; bb 2 ans etc, or 8 cases. After throwing out those eliminated by b answering, we have bb 1 ans; bb 2 ans; bg 1 ans; gb 2 ans; or 4 out of 8, with 2 partners g and 2 b, as one expects.

However, I resorted to a simulation on a spreadsheet A & B are random (even distribution 0-1). 3rd col also random. A & B arbitrarily defined to be boy if >.5. In 3rd col, A answers door if >.5 . So, accumulated all those for which boy answers door, and other partner was split 50-50.

As I recall (more of this has come to mind since I first wrote), the discussion disallowed my counting of the possibilities, claiming there was nothing to distinguish the A and B that I arbitrarily assigned. (and so in the 2d case, since such a distinction is specified, my counting of possibilities is allowed.) Well, if we were talking quantum states, I'd buy that, but these states are quite distinguishable, and I submit my counting is correct, and that my simulation is also a simulation of what we are told: two children, one of whom answers the door.

re: pirates.
let N be the current remaining # of pirates.
A: pirate N always votes to split - if the vote is to continue, he dies.
1 always votes to continue
2 would always vote to continue until N = 2, then votes to split.
3, recognizing 2's strategy, always votes to continue until N=4. If waits until N=3, continue wins, he dies. If he votes to split at N=4, and by A above, split wins and he maxes out.
4, recognizing 3's strategy, can wait until N=4 and survive. I missed this one the first time.
5 has more of a problem. 4 will vote to continue until N=4. 5 has to vote to split at N=8, and N 6 through 8 can wait until then. *light dawns* It is binary and 256 vote to continue until N = 256, whereupon 128 vote to split. 244 pirates walk the plank. Neat.

[info]dkogan

6 years ago

Screened comment

[info]dkogan

6 years ago

[info]dkogan

6 years ago

[info]dkogan

6 years ago

[info]dkogan

6 years ago

[info]dkogan

6 years ago

[info]dkogan

6 years ago

[info]vvvexation

6 years ago

[info]dkogan

6 years ago

[info]vvvexation

6 years ago

[info]dkogan

6 years ago

[info]dkogan

6 years ago

Screened comment

[info]dkogan

December 22 2005, 01:50:15 UTC 6 years ago

Re: marbles

Right.
Try the 'Scales' one. It's typically only posed as C. I figured out that parts A and B were interesting while trying to understand how to solve the problem in the general case.

Screened comment

[info]dkogan

December 22 2005, 17:17:16 UTC 6 years ago

Re: scales

a) is quite right, b) is somewhat an extrapolation on a) (makes you think more about the methodology involved) and then c) is real easy.

[info]countrycousin

December 22 2005, 17:06:17 UTC 6 years ago

Re: scales - disclaimer

re: (c) - rats - I messed up. Shouldn't work so late. Case 1 is wrong.

[info]dkogan

December 22 2005, 17:16:28 UTC 6 years ago

Re: scales - disclaimer

Heh.
The answer to A (and especially B) should take the guesswork out of figuring out C.

Screened comment

[info]dkogan

December 26 2005, 23:47:51 UTC 6 years ago

Re: scales, 2d try

Hmmm. I'm having some trouble following the logic here. It sounds like you're trying to get as close to the n3 limit as possible by using standards against which to compare.

if one had 13 unknowns and 1 standard and separated them into D, 5 members; E, 4 members; F, 4 members; Z the one standard, then we have enough partitions for D and E theoretically.

I am pretty sure that if you did not know anything about the 3 groups other than whether E or F was heavier, you would not be able to resolve this with two weighings. Your logic is too complex... think about it this way: once you're done with the first weighing, between how many final branches can you discriminate for each of the three outcomes of the first weighing? How many branches do you atually have?

You're right - I've fixed it.

Screened comment

[info]dkogan

6 years ago

Screened comment

[info]dkogan

December 27 2005, 06:08:17 UTC 6 years ago

Re: Mutilated chessboard bonus

Yeah, that's a really old problem, and the bonus follows naturally, so isn't much of a challenge if you know the first answer. That's correct, of course.

[info]countrycousin

December 27 2005, 16:46:50 UTC 6 years ago

Secure Medicine

Thanks for fixing the divot. I'm still puzzled (it is a very successful puzzle ;<) ). I presume since Eve steals anything in the chest, that includes unlocked padlocks and, if not keys, impressions thereof?

If Eve doesn't bother with padlocks she doesn't have the key for, Bob can send Alice his padlock and she can send back the medicine in the locked chest. That seems much too simple.

[info]dkogan

December 27 2005, 18:53:23 UTC 6 years ago

Re: Secure Medicine

Yes, she'll steal anything she can get at.

It is a bit misleading in that to get the solution, you have to assume something not expressly stated in the problem (but natural to assume). Unfortunately, if it were expressly stated, it would give away the solution.

[info]countrycousin

December 27 2005, 20:37:12 UTC 6 years ago

Re: Secure Medicine

Well, if Bob can hitch a ride, he can take Alice his padlock (and get his current dose at the same time). She then can put next month's medicine and her padlock in the chest and send them to him at the appropriate time. He takes out the medicine, puts his padlock back in the chest and locks it with hers and sends it back to her for the following time. But that seems pretty simple, too.

[info]dkogan

6 years ago

[info]vvvexation

February 14 2006, 22:05:06 UTC 6 years ago

Isn't the poison wells question trivial? I mean, if the dragon gives you poison 7, you die; and whatever you give him, he can just take 7 and live. Maybe I'm reading it wrong, or maybe it's phrased wrong.

[info]dkogan

February 14 2006, 22:20:40 UTC 6 years ago

You've understood the problem correctly...

[info]vvvexation

February 14 2006, 22:31:05 UTC 6 years ago

Surely there's got to be a more interesting version of it....

[info]dkogan

6 years ago

[info]vvvexation

6 years ago

[info]dkogan

6 years ago

Screened comment

[info]dkogan

6 years ago

[info]vvvexation

6 years ago

[info]dkogan

6 years ago

[info]vvvexation

6 years ago

Screened comment

[info]dkogan

August 15 2006, 03:58:13 UTC 5 years ago

Re: Chameleons

Correct.
(And I think I'll keep it out of the list. If anyone is wondering how 'chameleons' come up, see here).

Screened comment

[info]dkogan

August 15 2006, 04:00:24 UTC 5 years ago

Re: 1000 barrels of wine

I read that as just one barrel being poisoned. I would think if they know that, they'd know which, but it's a puzzle.

Yeah. I couldn't figure out a way to resolve that without going into ridiculous convolutions in the plot, way beyond what I consider acceptable in a problem statement, so I left it.

And, correct.

[info]countrycousin

August 15 2006, 01:56:35 UTC 5 years ago

100 prisoners

If the screws randomized the boxes sufficiently, I don't know what can be done. If I were in that position I'd talk about taking a few dispersed samples and looking for an order - alphabetical, numerical, cell assignment, then I'd talk about binary searches. But that doesn't seem to be a proper puzzle answer.

[info]dkogan

August 15 2006, 04:04:11 UTC 5 years ago

Re: 100 prisoners

Heh, yeah, it is entirely random. And seems impossible. In fact, if you follow the 'source' links, you'll see a discussion of me trying to convince the guy who posted the problem that it's impossible. :) (It has the solution posted, so be cautious if you go.)

Can you come up with any way to do a bit better than .5100?

[info]dkogan

5 years ago

[info]dkogan

5 years ago

Create an Account
Forgot your login or password?
Facebook Twitter More login options
English • Español • Deutsch • Русский…