News for hackers. Stuff that matters.
Re:Two logic puzzles by midnightmonster on Thursday December 24, 2009 @10:02AM (#1013853)
I 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.

Re:Two logic puzzles by ethikal on Thursday December 24, 2009 @10:16AM (#1013884)
Sorry, but I don't think that this solution is correct. This is a classic "Alice and Bob" security/encryption problem. G should place the amulet in his own safe, lock it with the padlock and send it to K. K then adds her own padlock onto the safe and locks it (now there are 2 padlocks locking the safe). K sends the safe back to G and G unlocks his padlock. He sends the safe back to K whereupon she may unlock the only remaining padlock with her own key. See http://en.wikipedia.org/wiki/Public-key_cryptography#A_posta... for more.
Re:Two logic puzzles by eplawless on Thursday December 24, 2009 @10:07AM (#1013865)
That was the first solution I had for #1. I'm currently at the following, but I think there has to be a better one because it's not clear that it would be possible.

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.

Re:Two logic puzzles by midnightmonster on Thursday December 24, 2009 @10:13AM (#1013880)
I think your current solution is clearly the right one: It gives me the 'duh' moment.

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.

Re:Two logic puzzles by riffraff on Thursday December 24, 2009 @10:46AM (#1013915)
reason it is unsatisfactiry (I had the same) is that one of the safe is not used, imo
Re:Two logic puzzles by RiderOfGiraffes on Thursday December 24, 2009 @10:57AM (#1013929)
It's a charasteristic of the real world that there are things not used in the solutions of the various problems that need to be solved.

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.

Re:Two logic puzzles by riffraff on Thursday December 24, 2009 @12:37PM (#1014051)
apple and oranges, if the beauty of the problem is in a clean elegant solution that does not require all of the pieces, it is not a well posed riddle, or solution.

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).

Re:Two logic puzzles by RiderOfGiraffes on Thursday December 24, 2009 @01:06PM (#1014086)
Then I must not have explained myself clearly enough. I'm not talking about extra equipment, I'm talking about information that's not needed for the solution to the problem.

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:

http://news.ycombinator.com/item?id=1014092

Re:Two logic puzzles by jacquesm on Thursday December 24, 2009 @10:03AM (#1013856)
What's to stop the servant from making off with the safe if they can carry it in the first place ?
Re:Two logic puzzles by RiderOfGiraffes on Thursday December 24, 2009 @10:11AM (#1013873)
There 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.
Re:Two logic puzzles by jacquesm on Thursday December 24, 2009 @10:14AM (#1013883)
Then 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 ?
Re:Two logic puzzles by RiderOfGiraffes on Thursday December 24, 2009 @11:02AM (#1013931)
Respectfully (and we've communicated - so you know I mean that literally and am not being sarcastic) we'll have to disagree. I think it's reasonable that the servants don't make off with things genuinely of no value, so locked padlocks without keys, and locked safes, are "safe" and not stolen. I think it's reasonable that they make off with anything remotely of value, such as a padlock and key, or (of course) the amulet, but not the amulet when it's locked in the safe.

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.

Re:Two logic puzzles by ars on Thursday December 24, 2009 @03:39PM (#1014353)
I figured out the answer, but only by assuming things (that they won't take a locked safe). But if I can assume that, can't I also assume they won't take a key by itself, since it has no value?

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.