Fog Creek Software
Discussion Board

A Pirate as Emissary problem

Is there a solution to this problem? I think if there is one it has nothing to do with public key encryption. 

There are two kings, each on an island. Each king has one valuable diamond, one box, one lock, and one key. The king on the first island has a daughter (so we'll call him the Daughter King). The king on the second island has a son (so we'll call him the Son King).

The only way between the islands is a pirate ship. The pirate is open to doing a bit of commerce, but he's a pirate. If he can get the diamond and keep it, he will. The kings, on the other hand, are honest, which is to say that they don't steal and they keep their word.

The kings are trying to arrange a marriage between their respective offspring. The diamond is what proves how great a king is. The Son King has demanded to see the diamond belonging to the Daughter King. The Daughter King is willing to show it to him. How can he show off his diamond (and get it back) without any possibility of its being stolen?

Lenko Donchev
Thursday, July 3, 2003

This one is a classic.
As long as you assume the pirate will not steal a whole box, there is a solution:

-Daughter king puts diamond in box, and locks it with his lock.
-Daughter king sends box to Son King
-Son king adds his own lock to the box
-Son king sends the box back to Daughter king
-Daughter king removes his lock from the box
-Daughter king sends box back to Son king.
-Son king can now open the box and look at the diamond.

To send the diamond back, the same process is followed.

Francois Bonin
Thursday, July 3, 2003

i just read it and i will say this for now:

it seems more assumptions are required like:

- king can't send a key.
- Pirate won't steal a box; although it seems he should know the box must contain the diamond; highly lickely.
- the pyrate doesnt know that all these kings have are a key, a box, and a diamond! or he maybe an honest pyrate!

I like the solution, but one can propose a better puzzle for "double locking solution" which seems to be the key.

Sunday, July 6, 2003

Silly Pirate.
Pirate if the gets a nice lock and two glass diamonds, he's set!

Monday, July 14, 2003

*  Recent Topics

*  Fog Creek Home