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

41 Post author: Eliezer_Yudkowsky 01 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.)

 

Part of the sequence A Human's Guide to Words

Next post: "The Parable of Hemlock"

Comments (59)

Sort By: Old
Comment author: Ben_Jones 01 February 2008 09:49:52PM 14 points [-]

Did the dagger have 'pwned' inscribed on it?

Comment author: Dmitriy_Kropivnitskiy 01 February 2008 09:58:23PM 4 points [-]

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

Comment author: victordrake 11 April 2013 12:14:32AM 4 points [-]

No, If the king REALLY wanted to be a dick, he would have put the key and the dagger in the same box, and then said "one box contains a key, and one box contains a dagger."

Comment author: Eliezer_Yudkowsky 01 February 2008 10:02:39PM 18 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.

Comment author: Enginerd 01 February 2008 10:08:27PM 8 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.

Comment author: HalFinney 01 February 2008 10:55:47PM 4 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!

Comment author: RichardKennaway 02 February 2008 12:25:13AM 6 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.

Comment author: Zubon 02 February 2008 12:25:40AM 6 points [-]

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

Comment author: DanielLC 10 October 2010 05:29:41AM 2 points [-]

The Jester never assumed that. He showed that if the first inscription is true, it must be false, so he assumed it was false.

Comment author: bigjeff5 01 September 2012 11:42:32PM 4 points [-]

Unlike the jester's riddle, the king never claimed there was any correlation between the contents of the boxes and the inscriptions on those boxes. The jester merely assumed that there was.

Comment author: DanielLC 02 September 2012 12:43:07AM 2 points [-]

The jester assumed that the inscriptions on the boxes were either true or false, and nothing else.

Comment author: bigjeff5 02 September 2012 06:25:04PM 0 points [-]

For the inscriptions to be either true or false, they would have to correlate with the contents of the boxes. If he didn't assume this correlation existed, why would he have bothered trying to solve the implied riddle, and then believe upon solving it that he could choose the correct box?

The assumption that one of the inscriptions is true is also the assumption that the contents of the boxes correlate with the truthfulness of the inscriptions. And the key point is that neither inscription need be true, because the contents of the boxes don't correlate with the truthfulness of the inscriptions. And in fact, neither inscription was true.

In other words, I don't understand why you're arguing a simple clarification of essentially the same point you made.

Comment author: DanielLC 02 September 2012 07:12:35PM 1 point [-]

He assumed something that implied the correlation, but he did not assume the correlation. He also assumed something that implied that the key was in the second box, but if he assumed that the key was in the second box, he wouldn't have even bothered reading the inscriptions.

Comment author: bigjeff5 03 September 2012 12:23:52AM 0 points [-]

I'm still not getting the difference. He chose the second box because he deduced the the key must be there based on the assumption that one of the inscriptions was true. There is no equivalence between assuming a key in the second box and deducing a key in the second box based on a false premise.

However, assuming one of the inscriptions is true and assuming a correlation between the inscriptions and the contents of the box seem the same to me. He can't deduce a correlation between them, because the only basis for such a correlation is the existence of the inscriptions and the basic format of the king's challenge (which was not identical to the jester's own riddle). There is nothing in the first inscription to suggest a correlation exists, particularly if he determined that the inscription must be false! It has to be a faulty assumption, and I don't see how it is different than assuming one of the inscriptions must be true, other than semantically.

I'm not trying to be obtuse here, I'm just not seeing the difference between what you've said and what I've said.

Comment author: DanielLC 03 September 2012 01:42:51AM 2 points [-]

based on the assumption that one of the inscriptions was true.

He did not assume either of the inscriptions were true. He assumed that each was either true or false.

He never assumed a correlation. He deduced a correlation. He was wrong because the deduction hinged on a false assumption.

Comment author: Caledonian2 02 February 2008 12:27:30AM 1 point [-]

But can self-reference be formalised?

Yes. Godel demonstrated this.

Comment author: Doug_S. 02 February 2008 12:31:15AM 1 point [-]

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

Comment author: Alex_Rockwell 02 February 2008 01:00:21AM 9 points [-]

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.

Comment author: DanielLC 05 January 2012 06:09:24AM 3 points [-]

Given that it's strongly implied, and logically necessary, that both inscriptions not be true, I don't think it could be considered a lie.

Comment author: zzz2 02 February 2008 01:32:21AM 0 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.

Comment author: Pamelina 19 October 2010 02:01:04AM 0 points [-]

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

No, because in that case the first inscription would also be true. Both inscriptions cannot be true.

Comment author: wedrifid 19 October 2010 02:07:23AM *  1 point [-]

Markdown syntax. Asterixes give italics. > at start of paragraph for block quotes. Help link just below comment box. Welcome. Etc.

Comment author: macronencer 17 January 2012 02:20:50PM 0 points [-]

Interestingly enough, I just mapped this whole problem out carefully in a spreadsheet, and it appears to agree with zzz2. I'll have to check it now that I've seen your comment.

Comment author: Eliezer_Yudkowsky 02 February 2008 02:18:14AM 2 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.

Comment author: Unknown 02 February 2008 05:43:02AM 8 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.

Comment author: Tiiba2 02 February 2008 05:53:44AM 0 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?

Comment author: Ian_C. 02 February 2008 08:26:12AM 3 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.

Comment author: Unknown 02 February 2008 10:17:25AM 6 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.)

Comment author: Andrew_Clough2 02 February 2008 02:52:49PM 0 points [-]

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

Comment author: RichardKennaway 02 February 2008 02:56:41PM 0 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.

Comment author: Caledonian2 02 February 2008 03:26:54PM 0 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.

Comment author: Dmitriy_Kropivnitskiy 04 February 2008 04:33:05PM 2 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."

Comment author: JonathanG 05 February 2008 11:35:02PM 1 point [-]

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)

Comment author: Cyan2 05 February 2008 11:51:35PM 3 points [-]

JonathanG,

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

Comment author: Chalybs_Levitas 19 November 2011 01:13:26PM 0 points [-]

Oh, I assumed that they were walking in a circle and the third bull was counting both ahead of him and behind him, even though those bulls are both the same, on the assumption that 'single file' =/= 'straight line'.

Comment author: Patrick_Robotham 17 October 2008 04:17:46PM 4 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.

Comment author: xrchz 26 October 2009 08:29:42PM 5 points [-]

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.

Comment author: wedrifid 01 January 2010 03:16:04AM *  25 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.

Comment author: Eliezer_Yudkowsky 01 January 2010 04:51:17AM 12 points [-]

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

Comment author: gjm 07 February 2012 05:03:45PM 1 point [-]

And the Jester opened both boxes

... and was first set free from his chains, and then stabbed through the heart with the dagger.

Comment author: Luke_A_Somers 26 April 2012 09:06:18PM 5 points [-]

Nope. The dagger is only if he fails to find the key, NOT if he succeeds in finding the dagger.

Comment author: roystgnr 07 January 2011 02:23:20PM 3 points [-]

A problem with self-reference which I find nearly as amusing but which is much more terse:

"This sentence is false, and Santa Claus does not exist."

Comment author: Normal_Anomaly 16 April 2011 08:41:12PM 6 points [-]

I have created an exercise that goes with this post. Use it to solidify your knowledge of the material.

Comment author: taelor 05 January 2012 08:03:25AM 0 points [-]

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

Suppose the second inscription is false. In that case, the first inscription must also be false, in which case the king can put whatever he damn well pleases in the boxes.

Comment author: nshepperd 05 January 2012 09:11:45AM *  0 points [-]

That would make the first inscription true. (And therefore false, and therefore paradoxical, etc)

Comment author: Zetetic 05 January 2012 11:22:29AM 5 points [-]

The first inscription says that the inscriptions have the same truth value. If the second one is false then the first one implies that it is false which, in turn, implies that the first one is true. Contradiction. So the premise that "the second inscription is false" is false. So the second inscription is true.

The Jester's logical inference is right. The point isn't that the Jester's logic was wrong - it wasn't. It's that the Jester assumed that the locations of the key and the dagger would follow the logic when there really was no good reason to assume so. This is meant to illustrate that making unwarranted assumptions about reality isn't a good idea.

Comment author: Luke_A_Somers 26 April 2012 09:09:11PM 0 points [-]

Was there enough information around for the Jester to correctly determine the box? I guess he could have figured that the more obvious solution was the key being in the box labelled as having the key in it, and the king was mad at him, so that probably wasn't it.

That doesn't seem all that strong evidence.

Comment author: shminux 27 April 2012 08:05:24PM 1 point [-]

The parable implied the disconnect between inscriptions and box content, so no, there couldn't have been enough information.

Comment author: trlkly 27 April 2012 05:03:01PM 1 point [-]

Do I read this correctly--that there was no key?

Comment author: ArisKatsaris 27 April 2012 05:50:24PM *  3 points [-]

That's incorrect - the king's uttered words ("One box contains a key, 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.") were still completely true. The key was in the first box, the dagger on the second.

It's just that the jester's reasoning about the supposed logical impossibility of the statements inscribed on the boxes was utter nonsense. He knew that neither of the statements inscribed need have been true, but he still foolishly argued himself into thinking that whether true or false they 'proved' the key being on the second box.

Comment author: ialdabaoth 13 October 2012 10:56:01PM *  2 points [-]

So then the actual correct solution, per the king's description of events, would be to ignore the inscriptions and just open both boxes?

Since the King didn't say that he'd be killed if he found the dagger, only that the dagger would be employed if he failed to find the key. Opening both boxes means finding the key, therefore, open both boxes.

(bonus points for chutzpah if he opens the box with the knife first, says "cool! this will make opening the other box MUCH easier!" and then uses that to get the key out of the second box)

Comment author: victordrake 11 April 2013 12:40:22AM 3 points [-]

King: Very clever. (to the guards) set him free from the top of the tallest tower.

Comment author: Petruchio 15 October 2012 11:42:36PM 3 points [-]

I suppose the message here is that though the inscriptions (literally) labeled the boxes as X and Y, this does not conform in reality. The words do not make it true, and the Jester made the mistake of presuming that his strict logic meant that reality has to follow the labels that were given. His last words, sadly, was “It's logically impossible!” One should reconsider calling things logical impossibilities, when they are occurring right in front of you. Who know what other logical impossibilities you were missing.

If I were man of literature, I would also comment on the juxtaposition of the Jester and King. The Jester, who is a fan of logic, lives in the court. His devotion to logical reasoning plays itself out in entertainment form, whether privately in his bedroom, or by sticking an angry frog onto a king. The King, on the other hand, lives in a world of politics, diplomacy, and war. He does not have the luxury of syllogisms, as he is surrounded by flatterers, rivals and enemies. He cannot presume that anything that is presented is not an exaggeration, inaccurate or an outright lie.

The final moral; do not stick angry frogs on someone who has the ability and the potential disposition to kill you. Or more generally, do not stick angry frogs onto people, it is just bad behavior. Just don’t do it.

Comment author: jesterjaimi 10 February 2013 12:14:05AM -2 points [-]

Or, as P.T. Barnum put it... there is a Sucker Born Every Minute.

Even for Jesters, it's never a good idea to humiliate the King...

Comment author: Chrysophylax 16 February 2013 07:42:10PM *  -1 points [-]

There are a lot of comments here that say that the jester is unjustified in assuming that there is a correlation between the inscriptions and the contents of the boxes. This is, in my opinion, complete and utter nonsense. Once we assign meanings to the words true and false (in this case, "is an accurate description of reality" and "is not an accurate description of reality"), all other statements are either false, true or meaningless. A statement can be meaningless because it describes something that is not real (for example, "This box contains the key" is meaningless if the world does not contain any boxes) or because it is inconsistent (it has at least one infinite loop, as with "This statement is false"). If a statement is meaningful it affects our observations of reality, and so we can use Bayesian reasoning to assign a probabilty for the statement being true. If the statement is meaningless, we cannot assign a probabilty for it being true without violating our assumption that there is a consistent underlying reality to observe, in which case we cannot trust our observations. Halt, Melt and Catch Fire.

The statement "This box contains the key" is a description of reality, and is either false or true. The statement "Both inscriptions are true" is meaningful if there exists another inscription, true if the second description is true and false if the second description is false or meaningless. The statement "Both inscriptions are false" is meaningless because it is inconsistent - we cannot assign a truth-value to it. The statement "Either both inscriptions are true, or both inscriptions are false" is therefore either true (both inscriptions are true, implying that the key is in box 2) or meaningless. In the latter case, we can gain no information from the statement - the jester might as well have been given only the second box and the second inscription. The jester's mistake lies in assuming that both inscriptions must be meaningful - "one is meaningless and the other is false" is as valid an answer as "both are true", in that both of those statements are meaningful - the latter is true if the second box contains the key, and the former is true if the second box does not contain the key. The jester should have evaluated the probabilty that the problem was meant to be solvable and the probability that the problem was not meant to be solvable, given that the problem is not solvable, which is an assessment of the king's ability at puzzle-devising and the king's desire to kill the jester.

It is also provable that we cannot assign a probabilty of 1 or 0 to any statement's truth (including tautologies), since we must have some function from which truth and falsity are defined, and specifying both an input and an output (a statement and its truth value) changes the function we use. If a statement is assigned a truth-value except by the rules of whatever logical system we pick, the logical system fails and we cannot draw any inferences at all. A system with a definition of truth, a set of thruth-preserving operations and at least one axiom must always be meaningless - the assumption of the axiom's truth is not a truth-preserving operation, and neither is the assumption that our truth-preserving operations are truth-preserving. Axiomatic logic works only if we accept the possibility that the axioms might be false and that our reasoning might be flawed - you can't argue based on the truth of A without either allowing arguments based on ~A or including "A" in your definition of truth. In other words, axiomatic logic can't be applied to reality with certainty - we would end up like the jester, asserting that reality must be wrong. As a consequence of the above, defining "true" as "reflecting an observable underlying reality" implies that all meaningful statements must have observable consequences.

The argument above applies to itself. The last sentence applies to itself and the paragraph before that. The last sentence... (If I acquire the karma to post articles, I'll probably write one explaining this in more detail, assuming anyone's interested.)