Andy and Grant are staying in different rooms in the same hotel. Andy needs to give a gold pendant to Grant, but spies are trying to assassinate Andy and Grant so neither of them can leave their room. The only way they can transfer objects is by using the bellhops. Both Andy and Grant have a safe with a large clasp that can be secured with a padlock. Both Andy and Grant have a padlock and a corresponding key. (So 1 gold pendant, 2 safes, 2 padlocks, and 2 keys.) But the bellhops are thieves. Anything that is not padlocked in the safe will be stolen by the bellhops - including any unlocked padlocks, the keys or the pendant. How can Andy transfer the gold pendant to Grant without it being stolen?
I saw this two days ago, and it's driving me nuts. I decided to just code the problem and run every single possibility to figure out the solution. Then I realized my initial ideas on how to write the program were all wrong and stupid. It looks like an encryption problem. Too bad I don't know dick about encryption.
Thursday, August 05, 2004
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment