Two logic puzzles
nickyee.com
nickyee.com
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
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
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.
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.
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.htm...
"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.
To determine the liar, Kaspar Hauser asks both people -- the liar and the truth teller -- if they are a tree frog.
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.
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.
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.
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 ?I agree that the farmer puzzle is nice for kids, but it yields to "try it, oh, that works, ok, I'm done." There's no real insight from it.
Would they take an empty safe? What about a locked padlocked, without a key, not locked onto anything?
I think it's better to make these things explicit in the puzzle.
G places the amulet in his safe, attaches his padlock and locks it with his key, then sends it to K, keeping his key. K receives G's safe, attaches his own padlock in addition to G's (there is a "large clasp", no mention of how large or how many padlocks it could support) and sends it back to G without sending his key. G removes his own padlock, and sends the chest back. K removes his padlock and has the amulet.
Edit: But in real life the first solution might work better. Hard to imagine the henchmen who would be sure to spot you if you left your room even for a moment but would take no notice of servants shuffling back and forth three times with a [double-]padlocked safe.
It is one of the most brain-dead characteristics of school and university exams that one is not allowed to have extras - it's somehow "not fair."
I think not using some of the resources provided is perfectly reasonable.
That's why the solution to the wolf-sheep-cabbage problem is not "just add more floating stuff so you can bring all at once, idiot".
The comparison to school and exams, appears unrelated to me: there are situations where external aid kills the point (e.g. calculator for arithemitic in firs grade).
Recently (for some definition of "recent") I was setting an exam question. In it I gave various lengths, heights, and so on, and I was told that it was too hard because I gave details that weren't required. On the other hand, if one is given only the information required, there is already an artificial clue - all the information given must be used. That's unrealistic.
I've interviewed people for jobs who performed fantastically well on exam style questions, but when given free-form problems simply didn't know where to start.
For me, whether a solution is clean and elegant is independent of whether you've used all the information given. It's the solution itself that's elegant. It's not only plausible but likely that we have different concepts of elegance - I'm a mathematician. When solving math problems, real math problems such as required to get a PhD or publish a paper, there's no way you're given just the information required and no more.
Along those lines I've been moved to submit another puzzle - you can find it here:
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.
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.
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.
However, the second puzzle on this page is, I think, particularly nice. Feel free to ignore it.
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.