Less Wrong is a community blog devoted to refining the art of human rationality. Please visit our About page for more information.

The Parable of the Dagger

3Eliezer_Yudkowsky01 February 2008 08:53PM

Once upon a time, there was a court jester who dabbled in logic.

The jester presented the king with two boxes.  Upon the first box was inscribed:

"Either this box contains an angry frog, or the box with a false inscription contains an angry frog, but not both."

On the second box was inscribed:

"Either this box contains gold and the box with a false inscription contains an angry frog, or this box contains an angry frog and the box with a true inscription contains gold."

And the jester said to the king:  "One box contains an angry frog, the other box gold; and one, and only one, of the inscriptions is true."

The king opened the wrong box, and was savaged by an angry frog.

"You see," the jester said, "let us hypothesize that the first inscription is the true one.  Then suppose the first box contains gold.  Then the other box would have an angry frog, while the box with a true inscription would contain gold, which would make the second statement true as well.  Now hypothesize that the first inscription is false, and that the first box contains gold.  Then the second inscription would be -"

The king ordered the jester thrown in the dungeons.

A day later, the jester was brought before the king in chains, and shown two boxes.

"One box contains a key," said the king, "to unlock your chains; and if you find the key you are free.  But the other box contains a dagger for your heart, if you fail."

And the first box was inscribed:

"Either both inscriptions are true, or both inscriptions are false."

And the second box was inscribed:

"This box contains the key."

The jester reasoned thusly:  "Suppose the first inscription is true.  Then the second inscription must also be true.  Now suppose the first inscription is false.  Then again the second inscription must be true. So the second box must contain the key, if the first inscription is true, and also if the first inscription is false.  Therefore, the second box must logically contain the key."

The jester opened the second box, and found a dagger.

"How?!" cried the jester in horror, as he was dragged away.  "It's logically impossible!"

"It is entirely possible," replied the king.  "I merely wrote those inscriptions on two boxes, and then I put the dagger in the second one."

(Adapted from Raymond Smullyan.)

Comments (27)

Ben_Jones01 February 2008 09:49:52PM1 point [-]

Did the dagger have 'pwned' inscribed on it?

Dmitriy_Kropivnitskiy01 February 2008 09:58:23PM1 point [-]

And if the king wanted to be particularly nasty the other box would also contain a dagger :)

Eliezer_Yudkowsky01 February 2008 10:02:39PM2 points [-]

And if the king wanted to be particularly nasty the other box would also contain a dagger

No, that the king specified couldn't happen. One of the morals of the parable is that the king didn't lie.

Enginerd01 February 2008 10:08:27PM0 points [-]

It's a dressed up version of "This sentence is a lie". It's only self referential, so it's truth value can't be determined in any meaningful, empirical sense.

Jester should've remembered the primary rule of logic: Don't make somebody look like an idiot if they can kill you.

HalFinney01 February 2008 10:55:47PM0 points [-]

I'm having some trouble with the logic here. I wonder if the parable got a bit garbled.

"You see," the jester said, "let us hypothesize that the first inscription is the true one."

The first inscription says, "Either this box contains an angry frog, or the box with a false inscription contains an angry frog, but not both." Now we are hypothesizing that this is the true one. Therefore "the box with a false inscription" means "the second box". So, "Either the 1st box contains an angry frog, or the 2nd box contains an angry frog, but not both".

The jester goes on, "Then suppose the first box contains an angry frog."

So we know (by assumption) that the 1st clause of the inscription is true, the 1st box contains an angry frog. Since "not both" clauses are true, it means the 2nd clause is false, and so the 2nd box does not contain an angry frog - it must contain gold.

But the jester claims that this is a contradiction: "Then the other box would contain gold and this would contradict the first inscription which we hypothesized to be true." For this to be a contradiction, the 1st inscription would have had to say that the 2nd box should contain an angry frog, but we just saw that it doesn't say that.

I can't make much progress with the 2nd inscription either. I'm getting pretty confused now!

Caledonian202 February 2008 12:19:39AM-2 points [-]

Rationality is choosing to acknowledge that candlelight is fire, instead of preserving your dignity by maintaining the search.

Now Eliezer has cleverly gotten us to turn down a certain $1,000 by telling us lies about how the other box will contain $1,000,000 if we choose only it! Wasn't that clever of him?

RichardKennaway02 February 2008 12:25:13AM0 points [-]

The simplest way to solve the jester's puzzle is to make a table of the four cases (where the frog is, where the true inscription is), then determine for each case whether the inscriptions are in fact true or false as required for that case. (All the while making la-la-la-can't-hear-you noises at any doubts one might have about whether self-reference can be formalised at all.) The conclusion is that the first box has the frog and the true inscription. That assumes that the jester was honest in stating his puzzle, but given his shock at the outcome of the king's puzzle, that appears to be so.

But can self-reference be formalised? How, for example, do two perfect reasoners negotiate a deal? In general, how can two perfect reasoners in an adversarial situation ever interpret the other's words as anything but noise?

"Are you the sort of man who would put the poison into his own goblet or his enemy's? Now, a clever man would put the poison into his own goblet because he would know that only a great fool would reach for what he was given. I am not a great fool so I can clearly not choose the wine in front of you...But you must have known I was not a great fool; you would have counted on it, so I can clearly not choose the wine in front of me." ...etc.

Or consider a conversation between an FAI that wants to keep the world safe for humans, and a UFAI that wants to turn the world into paperclips.

Zubon02 February 2008 12:25:40AM2 points [-]

We note that the king did not say one thing the jester did: "... one, and only one, of the inscriptions is true."

Caledonian202 February 2008 12:27:30AM0 points [-]

But can self-reference be formalised?

Yes. Godel demonstrated this.

Doug_S.02 February 2008 12:31:15AM0 points [-]

If this material conditional is true, you should give me a hundred dollars. ;)

Alex_Rockwell02 February 2008 01:00:21AM1 point [-]

The King DID lie, because he wrote the inscriptions. What is written on the inscriptions is inaccurate if the dagger is not in the second box.

zzz202 February 2008 01:32:21AM0 points [-]

The simplest way to solve the jester's puzzle is to make a table of the four cases ... then determine for each case whether the inscriptions are in fact true or false as required for that case. The conclusion is that the first box has the frog and the true inscription.

If you do this, the case where the second inscription is true and the first box contains a frog is also consistent.

Eliezer_Yudkowsky02 February 2008 02:18:14AM0 points [-]

I must have edited this parable into an inconsistent state at some point - should've double-checked it before reprinting it. I've rewritten the jester's explanation to make sense.

Unknown02 February 2008 05:43:02AM0 points [-]

Eliezer will think that this statement is false.

i.e. the above statement.

Of course, when he does, that will make it true, and without paradox, so he will be wrong. On the other hand, if he thinks it is true, it will be false, and without paradox, so he will be wrong.

Tiiba202 February 2008 05:53:44AM0 points [-]

So, the king put the dagger in the second box that he touched, without regard for whether the jester can find it - right? Is that what the last sentence means?

Ian_C.02 February 2008 08:26:12AM0 points [-]

The last sentence is the King pointing out to the Jester that all the reasoning in the world is no good if it is based on false premises, in this case the false presumption was that the text on the boxes was truthful.

Unknown02 February 2008 10:17:25AM2 points [-]

Ian, no, the jester didn't presume the text was true: he simply presumed the first inscription was either true or false, and the problem arose from this presumption.

In my example, on the other hand, the statement is actually true or false, but Eliezer can never know which (if he doesn't decide, then it is false, but he will never know this, since he will be undecided.)

Andrew_Clough202 February 2008 02:52:49PM0 points [-]

I always thought that the statement "You can never know that this statement is true" illustrates the principle most clearly.

RichardKennaway02 February 2008 02:56:41PM0 points [-]

You're right, zzz. Proof, if I needed it, that I am not yet a perfect reasoner.

Caledonian: While Gรถdel formalised some sorts of self-reference, it's not clear to me how his work applies to puzzles like these, or to the question of how hostile perfect reasoners can communicate. Barwise and Etchemendy's "The Liar" has other approaches to the problem, but I don't think they solve it either.

Caledonian202 February 2008 03:26:54PM0 points [-]

the question of how hostile perfect reasoners can communicate

Hostile reasoners are rarely interested in communicating with each other. When they are, they use language - just like everyone else.

Dmitriy_Kropivnitskiy04 February 2008 04:33:05PM0 points [-]

Oh, I get it, the other box couldn't contain a dagger as well, because the king explicitly said that only one box has a dagger in it. But he never claimed that the writings on boxes are in any way related to the contents of the boxes. Is that it? Or is it that if the "both are true or both are false" sign is false, basically anything goes?

This reminds me strongly of a silly russian puzzle. In the original it is about turtles, but I sort of prefer to translate it using bulls. So, three bulls are walking single file across the field. The first bull says "There are two bulls in behind me and no bulls in front of me." The second one says "There is a bull in front of me and a bull behind me." The third one says "There are two bulls in front of me and two bulls behind me."

JonathanG05 February 2008 11:35:02PM0 points [-]

The third one says "There are two bulls in front of me and two bulls behind me."

Sorry, don't you mean, "0 in front / 2 behind"? (third bull is walking backwards)

Cyan205 February 2008 11:51:35PM0 points [-]

JonathanG,

Actually, the third bull is just straight up lying. (That's why Dmitriy called the puzzle silly.)

Patrick_Robotham17 October 2008 04:17:46PM0 points [-]

Using the jester's reasoning, it's possible to make him believe that the earth is flat by writing down "either this inscription is true and the earth is flat, or this inscription is false and the earth is not flat, but not both" this makes an unflat earth logically impossible!

I wonder what this says about the law of the excluded middle, I guess that it slides if self reference is involved.

xrchz26 October 2009 08:29:42PM1 point [-]

It's not the law of the excluded middle that's the problem, it's the jester's assumption that the entire statement "either this ..., or this..., but not both" is true. The jester reasons correctly under his assumptions, but fails to realize that he still has to discharge those assumptions before reaching reality.

wedrifid01 January 2010 03:16:04AM* 4 points [-]

"One box contains a key," said the king, "to unlock your chains; and if you find the key you are free. But the other box contains a dagger for your heart, if you fail."

And the Jester opened both boxes, successfully finding (that is, not failing to find) the key. Of course, the King could declare "you know what I meant to say" and kill him anyway but that does change the intended moral somewhat.

Eliezer_Yudkowsky01 January 2010 04:51:17AM0 points [-]

Well, I'm certainly not going to object to that moral.