6 ms·
Two logic puzzles
- RiderOfGiraffes 17y agoI know that many, perhaps most, of you hate logic puzzles, especially as selection or hiring criteria. And that's fine. However, the second puzzle on this page is, I think, particularly nice. Feel free to ignore it.
- deleted 17y ago[deleted]
- jacquesm 17y agoI used to think that I was pretty good at puzzles like this. That is, until I met a girl that just simply aced them, one after the other, and in record time at that. It's the first time that I ran into very solid proof that brains definitely are not created equal, I've never met anybody in my life that even came close to that level of problem solving ability. It's akin to the difference between a chess grand-master and someone that just plays a half decent game of chess, some people operate on a different plane altogether, they are so good at attacking a problem in parallel from all sides at once that what seems confounding to one person is a walk in the park for them. If you solve the second puzzle in 5 seconds or so because you simply 'see' the solution then you fall in to that group, consider yourself a very lucky person, I wonder how rare such talent really is.
- riffraff 17y agoI was thinking "eh, just like my brother used to", so I told him the problems and he solved both in about 5 mins (although the first one the same way I did, it seems trivial if you can ybpx gur fnzr fnsr jvgu obgu ybpxf ng gur fnzr gvzr but also seems slightly wrong)
- jaiwithani 17y agoClarification question (possible but unlikely spoiler): Can two padlocks fit on the safe at the same time?
- tome 17y agoDid you know there's a puzzle called "The Hardest Logic Puzzle Ever"? http://en.wikipedia.org/wiki/The_Hardest_Logic_Puzzle_Ever http://en.wikipedia.org/wiki/The_Hardest_Logic_Puzzle_Ever I extended it to the general case! http://www.srcf.ucam.org/~te233/maths/puzzles/evenharder.html http://www.srcf.ucam.org/~te233/maths/puzzles/evenharder.htm...
- RiderOfGiraffes 17y agoI agree that they are difficult, but for me, they fall into the category of: "I can probably solve these by long and convoluted means, but I suspect the solution is neither clean nor elegant and, to be frank, I can no longer care." The beauty of the 100 coins problem is that the solution, once seen, is clean, simple and elegant, and it is possible to reason to it - it doesn't require complete inspiration from nowhere. That's why I liked it so much. YMMV.
- btilly 17y agoActually the solution to the 3 god version is clean and elegant, and long and convoluted reasoning doesn't shed any light on it.
- RevRal 17y agoI like the solution to the variant of the Knights and Knaves problem in Every Man For Himself And God Against All by Werner Herzog. To determine the liar, Kaspar Hauser asks both people -- the liar and the truth teller -- if they are a tree frog.
- RevRal 17y agoSpoiler: The solution is very easy for problem # two if you're allowed to flip the coins. I haven't worked it out since I've been up all night and had to squint just to read the problem, so I may have read it wrong. I didn't read the first question. Have fun. ---- Edit: Just great, seeing this right when I'm about go to sleep after a long night. And it appears what I had in mind doesn't work.
- isleyaardvark 17y agoNo, no. You were on the right track. Think about it with a smaller number of coins, say 4 coins and you know only 1 is Queen side up. On the first one: I get the feeling this isn't what the puzzle was looking for, but I'd just lock the amulet up in the safe, send it to the other spy, and let them spirit it out of the country. What, does my country not have bolt cutters? Edit: Spoiler hint for the first one: Start by sending over an empty safe with the padlock locked on only one handle of the safe.
- riffraff 17y agoI disagree with the premise: there are a lot of elegant logic puzzles (consider: to mock a mockingbird), it's just that a lot of puzzles dod not fall in this category :)
- midnightmonster 17y agoI got #2, and I have a solution for #1, but I don't think it's right. Here's my non-right solution to #1: G places the amulet in his own safe, locks it with the padlock, and keeps the key. G sends the safe to K by way of a servant. K takes the safe with him and uses whatever tools to open it at his convenience once he is safe away. I think this is wrong, because it's not very satisfying at all. I think it could be right, because (1) it could work in real life and (2) it meets the solution criteria of the puzzle, namely, transferring the amulet from G to K. I would be happy to know of a more elegant solution.
- jacquesm 17y agoWhat's to stop the servant from making off with the safe if they can carry it in the first place ?
- RiderOfGiraffes 17y agoThere is provably no solution if the servants simply make off with everything given to them. I think we have to assume that they don't steal secured (i.e. locked with a lock) safes.
- jacquesm 17y agoThen I think the puzzle is somewhat flawed. If the premise is that it is a 'logic' puzzle and in the end it depends on the cooperation of the servants then in 'real life' there would be no solution. After all, the 'real life' problem is what sketches the background for this, otherwise why bother with that? My personal favorite for little (smart) kids: A farmer has to cross the river, he has with him: - a wolf - a sheep - a cabbage The boat that hast to take him across the river will only hold one item besides the farmer, what is the sequence of moves that will get the farmer and his possessions to the other side without the sheep eating the cabbage or the wolf eating the sheep ?
- RiderOfGiraffes 17y ago
- RiderOfGiraffes 17y agoI'm puzzled over the difficulty people are having with number 1. Surely it's pretty obvious given public-key cryptography ...
- RevRal 17y agoI thought it was obvious because I have never come across a person who hasn't dealt with the logic problem where the farmer has to get a few of his animals across a river, one at a time, and must do so in a sequence where no animals will kill each other. There was some vicious animal included. I immediately recognized that problem #1 is very very same problem, but worded differently. But it sounds like you and I have different solutions...? Edit: Oh okay, I had to look up public-key cryptography. I thought you meant slip each other secret messages or something.
- ubernostrum 17y agoIt's also exactly the technique Simon Singh uses in one of his books to explain public-key cryptography...
- RiderOfGiraffes 17y agoDownmod this if you don't want me to get the karma from up-voting the spoiler warning.
- RiderOfGiraffes 17y agoWARNING: SPOILERS FOLLOW If you want to read on, do so. If people up-mod this comment then it will stay at the top. In case you don't want me to get the karma, up-mod it anyway, and down-mod the other comment to balance it out. Here's the link: http://news.ycombinator.com/item?id=1013881 http://news.ycombinator.com/item?id=1013881 . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- huangm 17y ago1. A puts amulet in the safe, puts lock on it, sends to B. B puts lock on it, sends back to A. A unlocks his lock and sends it back to B. B unlocks and receives the amulet. 2. Take 20 coins aside, and flip them - this is one group. Take the 80 remaining coins - this is the second group. If there were X (0 \leq X \leq 20) queens in the first group, then there were 20-X queens in the second group. Since we flip the 20 coins in the first group, there are now 20-X queens in the first group as well.
- eggoa 17y agoI guess that's the right answer, but it's not really satisfying. If the servants can walk off with the safe to crack it at their leisure, how is it secure?
- huangm 17y agoThe moral here is that the more colorful you try to make your logic puzzle, the more implausible the correct solution will be.
- deleted 17y ago[deleted]
- jbm 17y agoMy solution for #1 - not sure if it is correct. I didn't expect that two locks could fit in the clasp. Person #2 sends the safe back to Person #1. It has nothing in it. Person #1 locks his own safe to the safe of person #2, making sure the clasp of his safe is over the latch pin of the second safe. Again he sends it back with nothing in it. Person #2 repeats this; now you have two safes locked together (with the latch pin being on top of opposite clasps). He sends the safe back to person #1. Person #1 unlocks his lock, puts the amulet inside, and locks it again. He sends it back. Person #2 unlocks the other side, and now has both safes, plus the amulet.
- dalke 17y agoWhat kind of hotel room has moveable safes? The ones in the rooms I've been in are fastened down. What kind of thief would steal anything except for a portable safe? Couldn't you kidnap one of the thieves, steal the clothes, and disguise yourself? How would exchanging safes in the middle of the night not be noticed? Couldn't the henchmen just open up every room looking for them? Don't safes have built-in locks? My dictionary says a safe is "a strong fireproof cabinet with a complex lock, used for the storage of valuables." That definition does exclude some categories of safe, but "strongbox" or "lockbox" might be a better word. Having now seen the answer here, I didn't even think that the clasp (shouldn't that be "hasp"?) might be big enough to admit two locks. That seems like a poorly designed safe, since that means the door probably opens enough to admit a crowbar. Yes, I knew when I started that the answer was "public key cryptography." I'm just complaining that the puzzle wasn't well stated. Besides, if we're going along those lines, what if the henchmen start sending safes into every room to see if it comes back with an extra lock on it? That gives them idea of where the bad guys/spies might be, and prevents the spies from being able to make the exchange.
- jcl 17y agoPresumably the choice of the word "safe" (and perhaps "clasp") was to make the solution hard to search for. Traditionally, the word "chest" is used. http://www.google.com/webhp?hl=en#hl=en&q=chest+lock+key+puzzle http://www.google.com/webhp?hl=en#hl=en&q=chest+lock+key...
- dalke 17y agoAh! I am enlightened. Thanks!
- vlad 17y agoThe description says you have five minutes to complete the task. So just move any ten coins to a new pile. Continue moving one coin at a time while asking if you have completed the task. You will have to move at most eighty coins after the initial ten. Since you have five minutes to do this, you'll have about 3-4 seconds per coin for the captor to reply if you've solved it yet. The solution someone posted to flip each coin after picking out twenty is faster but flawed; it would be too easy for a nervous and blinded person to flip the same coin twice. The best solution would be to flip each coin as it's drawn from the initial set of one hundred.