knights and knaves

388 views
Skip to first unread message

Eric

unread,
Dec 10, 2007, 12:06:59 PM12/10/07
to calculationa...@googlegroups.com
An island is populated by two kinds of people - knights and knaves.
Knights always tell the truth and knaves always lie. We have

b == B is a knight.

If B says a statement `X', this gives rise to the expression b == X,
since if b, then B is a knight and tells the truth, and if 枴, B is a
knave and lies.

Someone asks B `are you a knight?' to which he replies, `If I am a
knight, I'll eat my hat.' Prove that B has to eat his hat.

E.

Marnix Klooster

unread,
Dec 10, 2007, 3:23:58 PM12/10/07
to Calculationa...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Op 10-12-07 18:06, Eric schreef:

That's simple, Eric:

B says, "If I am a knight, I'll eat my hat"
== { formalization, h stands for hat-eating }
b == (b => h)
== { expand => }
b == !b \/ h
== { simplify using logic }
b /\ h

...and this hat-eater turns out to be a knight.

Or am I missing something?

Groetjes,
<><
Marnix
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHXaBejn9v+6JsL6sRAkATAJ9CHJm+aCW9fn2z7KnJG+yNhEMTMwCgqSYX
AidPQ2MnDx285NPkSV/bRFQ=
=5dC8
-----END PGP SIGNATURE-----

Jeremy Weissmann

unread,
Dec 10, 2007, 4:06:20 PM12/10/07
to Calculationa...@googlegroups.com
> If B says a statement `X', this gives rise to the expression b == X,
> since if b, then B is a knight and tells the truth, and if ¬b, B is a
> knave and lies.

I first learned of this "Fundamental Theorem of Truth-Tellers/Liars" from Roland Backhouse, in his book "Program Construction" . It is a wonderful, simple application of predicate calculus. Please submit more problems like this to the thread!

While writing ARM3/JAW53: "The problem of the 21 students" , Apurva and I convinced ourselves of this in the following way, where x and y range over (boolean translations) of statements B makes:

b
== { definition of b }
"B is a truth-teller"
== { definition of truth-teller }
(Ax :: x)
== { B is "categorical" : (Ax,y :: x == y) }
y .

I think this nicely shows how each piece of information fits together. Notice the nice little lemma in the last step:

(Ax,y :: x == y) => ((Ax :: x) == y) .

I can prove this as follows:

(Ax :: x)
=> { instantiation: x and y have the same type }
y ,

and:

(Ax :: x) <= y
== { (<= y) over A }
(Ax :: x <= y)
<= { antisymmetry of <= }
(Ax :: x == y) .

On to Eric's problem.

> Someone asks B `are you a knight?' to which he replies, `If I am a
> knight, I'll eat my hat.' Prove that B has to eat his hat.

As Marnix said, the problem statement implies:

b == b => h ,

where h == "B will eat his hat" . However, I calculate in one step:

b == b => h
== { predicate calculus }
b /\ h .

Recall one of the theorems of implication:

b => h == b == b /\ h .

Let's not hinder ourselves by thinking that we can only use this theorem to rewrite b => h . We should exploit the symmetry and associativity of == to the fullest, meaning that with a theorem like:

W == X == Y == Z ,

we can rewrite the equivalence of any of W , X , Y , Z as the equivalence of the rest!

+j

Eric

unread,
Dec 10, 2007, 6:36:09 PM12/10/07
to Calculationa...@googlegroups.com
Jeremy Weissmann wrote:
> Please submit more problems like this to the thread!
As you wish:

B says of C, `If C is a knight then I am a knave.' What are B and C?

E.

Jeremy Weissmann

unread,
Dec 10, 2007, 7:12:54 PM12/10/07
to Calculationa...@googlegroups.com
> B says of C, `If C is a knight then I am a knave.' What are B and C?

Let b and c stand for the knighthood of B and C , respectively. The problem statement implies:

b == c => ¬b
== { contrapositive }
b == b => ¬c
== { implication and conjunction }
b /\ ¬c ,

ie that B is a knight and C is a knave.

+j

Eric Macaulay

unread,
Dec 11, 2007, 7:11:53 AM12/11/07
to Calculational Mathematics
It si rumoured that gold is buried on the island. You ask B whether
there is gold on the island. He replies, "There is gold on the island
if and only if I am a knight." Can you determine
(a) if B is a knight or a knave
(b) if there is gold on the island?

E.

Apurva Mehta

unread,
Dec 11, 2007, 7:25:00 AM12/11/07
to Calculationa...@googlegroups.com

Let:

b == "B is a knight"

g == "There is gold on the island" .

Formalizing B's statement, and by the Fundamental Theorem of Truth
tellers and Liars we have:

b == (b == g)
== { Predicate Calculus }
g .

So we may conclude that there is gold on the island. However, we
cannot conclude anything about whether B is a knight or knave.

(I am somewhat disconcerted by this result. But I can't see
anything wrong with it.)

Apurva

Jeremy Weissmann

unread,
Dec 11, 2007, 2:41:02 PM12/11/07
to Calculationa...@googlegroups.com
> Formalizing B's statement, and by the Fundamental Theorem of Truth
> tellers and Liars we have:
>
> b == (b == g)
> == { Predicate Calculus }
> g .
>
> So we may conclude that there is gold on the island. However, we
> cannot conclude anything about whether B is a knight or knave.
>
> (I am somewhat disconcerted by this result. But I can't see
> anything wrong with it.)

If your calculation had not been an equivalence, then it would have been disconcerting. You would have concluded that there was gold on the island, but you would not know whether there was more to conclude. This is why weakenings and strengthenings have to be undertaken with care!

However, you have calculated that the information contained in the problem equivales g , and is thus independent of the value of b .

+j

Eric Macaulay

unread,
Dec 11, 2007, 4:05:37 PM12/11/07
to Calculational Mathematics
Three inhabitants are standing together in a garden. A stranger passes
by and asks B, `Are you a knight or a knave?' B answers, but the
stranger does not hear. The stranger then asks C, `What did B say?' C
replies, `B said that he is a knave.' At this point, the third man, D
says, `Don't believe C; he's lying!' What are C and D?

Jeremy Weissmann

unread,
Dec 11, 2007, 7:41:46 PM12/11/07
to Calculationa...@googlegroups.com

Let a , b , c , d stand for the knighthood of A , B , C , D respectively. The problem statement gives:

(0) c == (b == ¬b)
(1) d == ¬c .

Given (0) equivales ¬c , whence by (1) , we have d . So C is a knave and D is a knight. (Actually, it is somewhat well known in these problems that neither knave nor knight can claim knavehood; both will claim knighthood. This is why one cannot deduce the status of an inhabitant by asking "Are you a knight (knave)?" .

+j

Apurva Mehta

unread,
Dec 12, 2007, 5:40:07 AM12/12/07
to Calculationa...@googlegroups.com
> However, you have calculated that the information contained in the problem equivales g , and is thus independent of the value of b .

This is precisely what I find disconcerting: Does our
formalization accurately capture all the relevant information about
the problem?

Intuitively, I feel that if I can conclude g , then I should be
able to conclude b as well. The fact that we cannot conclude the
latter prompts me to question whether our calculational theory for
dealing with such problems is incomplete in some way.

Of course, my intuition might be flawed as usual, but then I am not
able to convince myself of this at the moment.

This is the root cause of my disconcertion. Any illuminating words
would be most appreciated!

Apurva

PS : My colleague and friend Dhruv Matani is equally disconcerted
about this state of affairs. Perhaps the two of us are not alone in
this!

Jeremy Weissmann

unread,
Dec 12, 2007, 10:06:38 AM12/12/07
to Calculationa...@googlegroups.com
>> However, you have calculated that the information contained in
>> the problem equivales g , and is thus independent of the value of
>> b .
>
> This is precisely what I find disconcerting: Does our
> formalization accurately capture all the relevant information about
> the problem?

But if our only given is b == (b == g) , if that fully captured all the givens, would you agree that the value of b cannot be determined? If so, then you can ask yourself what might be missing from the formalization.

Separate your concerns!

> Intuitively, I feel that if I can conclude g , then I should be
> able to conclude b as well. The fact that we cannot conclude the
> latter prompts me to question whether our calculational theory for
> dealing with such problems is incomplete in some way.
>
> Of course, my intuition might be flawed as usual, but then I am not
> able to convince myself of this at the moment.

Of course your intuition is flawed. You can straightforwardly check that ¬b is consistent with the problem statement.

The real question is: What made you think that you could conclude b ? (What mistaken analogy did you draw? Etc.) That would be a good question to follow up on.

+j

Jeremy Weissmann

unread,
Dec 12, 2007, 10:28:43 AM12/12/07
to Calculationa...@googlegroups.com
> This is precisely what I find disconcerting: Does our
> formalization accurately capture all the relevant information about
> the problem?

Well, let's check.

> It si rumoured that gold is buried on the island.

Does this statement provide any information?

> You ask B whether there is gold on the island.

Does this?

> He replies, "There is gold on the island if and only if I am a knight."

Call this statement S . Then we have:

S
=> { Fundamental Theorem }


b == (b == g)

== { predicate calculus }
g .

Ah, so the Fundamental Theorem does not show equivalence in the first step! And it cannot, as we do not have:

"B utters X" <= (b == x) .

It would however suffice to show that b == x is the strongest solution to:

(*) q: "B utters X" => q .

We already know that b == x is a solution; that is the Fundamental Theorem. Now we need to show:

("B utters X" => q) => ((b == x) => q) .

I don't know how to prove this (or whether it can be), but it would clearly involve reasoning in English.

Does this satisfy you? "B utters statement X. We know that B is a knight or a knave. If he is a knight, then X is true, and in this case, there is gold on the island. If he is a knave, then X is false, and in this case, there is gold on the island." . Or does that still seem incomplete in some way?

+j

Apurva Mehta

unread,
Dec 12, 2007, 10:51:31 AM12/12/07
to Calculationa...@googlegroups.com
>
> Does this satisfy you? "B utters statement X. We know that B
> is a knight or a knave. If he is a knight, then X is true, and in
> this case, there is gold on the island. If he is a knave, then X
> is false, and in this case, there is gold on the island." . Or
> does that still seem incomplete in some way?


It satisfies me. In fact, I convinced myself of the correctness
along similar lines earlier today.

What originally made me think that I should be able to conclude
that B is a knight is B's statement: "There is gold on the
island if and only if I am a knight". Since we have proven that there
is gold on the island, then we should be able to prove that he is a
knight as well, right?

But that line of thinking already assumes the the truth of his
statement, and hence we would have assumed that B is a knight to
prove he is a knight. It is a subtle logical trap.

Apurva

Eric

unread,
Dec 12, 2007, 11:27:49 AM12/12/07
to Calculationa...@googlegroups.com
B, C, and D are sitting together. C says, 'There is one knight among
us.' D says. You're lying.' What can you tell about the knight/knavehood
of the three?

E.


Vegard Nossum

unread,
Dec 12, 2007, 12:32:30 PM12/12/07
to Calculationa...@googlegroups.com

Hi,

I'll try this one. But I've not really done this before, so excuse me if this
is very wrong :-)

We have:

d == "You're (C is) lying"
== { formalize }
d == non c

We also have:

c == "There is one knight among us"
== { formalize }
c == b \/ c \/ d
== { insert d }
c == b \/ c \/ non c
== { calculus }
c == b \/ true
==
c == b

Thus, C is a knight if and only if B is a knight. The knighthood/knavehood of
D is indeterminable. This makes sense; if D is a knight, then C and B are
knaves. Otherwise, C and B are knights.

I should add that I have interpreted "there is one" as "at least one". I think
it could also be interpreted as "exactly one". But I don't know how that would
be formalized.

Does that look right?


Vegard

Jeremy Weissmann

unread,
Dec 12, 2007, 12:41:25 PM12/12/07
to Calculationa...@googlegroups.com
>> B, C, and D are sitting together. C says, 'There is one knight among
>> us.' D says. You're lying.' What can you tell about the knight/knavehood
>> of the three?

Let's investigate "there is exactly one knight among us" .

From D's statement I conclude d == ¬c , as Vegard did. However, in that case, "there is exactly one knight among us" equivales ¬b . Thus c's statement gives c == ¬b .

Thus I conclude that B and D are the same, and C is different.

Vegard made a mistake however:

> c == "There is one knight among us"
> == { formalize }
> c == b \/ c \/ d
> == { insert d }
> c == b \/ c \/ non c
> == { calculus }
> c == b \/ true
> ==
> c == b

The last step should be:

c == b \/ true

== { calculus }
c == true .

So C is a knight, D is a knave, and the status of B cannot be determined.

+j

Vegard Nossum

unread,
Dec 12, 2007, 12:44:29 PM12/12/07
to Calculationa...@googlegroups.com
I have already realized my (first?) fatal mistake.

> I'll try this one. But I've not really done this before, so excuse me if this
> is very wrong :-)
>
> We have:
>
> d == "You're (C is) lying"
> == { formalize }
> d == non c
>
> We also have:
>
> c == "There is one knight among us"
> == { formalize }
> c == b \/ c \/ d
> == { insert d }
> c == b \/ c \/ non c
> == { calculus }
> c == b \/ true
> ==
> c == b

The last step is obviously wrong and should read:

c == true

This means that C is a knight and D is a knave, and B is indeterminable. (I
hope I've got it right this time!)


Vegard

Vegard Nossum

unread,
Dec 12, 2007, 1:24:19 PM12/12/07
to Calculationa...@googlegroups.com
On Wed, December 12, 2007 18:41, Jeremy Weissmann wrote:
>
>>> B, C, and D are sitting together. C says, 'There is one knight among
>>> us.' D says. You're lying.' What can you tell about the knight/knavehood
>>> of the three?
>
> Let's investigate "there is exactly one knight among us" .
>
> From D's statement I conclude d == 柚 , as Vegard did. However, in that
> case, "there is exactly one knight among us" equivales 枴 . Thus c's
> statement gives c == 枴 .

I think the "exactly one knight" can be formalized as follows:

c == (b /\ non c /\ non d) \/ (non b /\ c /\ non d) \/ (non b /\ non c /\ d)
== { insert d == non c }
c == (b /\ d /\ non d) \/ (non b /\ non d /\ non d) \/ (non b /\ d /\ d)
== { indepotence of /\ }
c == (b /\ false) \/ (non b /\ non d) \/ (non b /\ d)
==
c == false \/ (non b /\ non d) \/ (non b /\ d)
== { /\ distributes over \/ }
c == non b /\ (non d \/ d)
==
c == non b /\ true
== { identity element of /\ }
c == non b

And the conclusion is the same as yours (hopefully also without error). Is
this too long-winded in general? I understood your logic; only one of d and c
can be true. But how would that be formalized, apart from what I just wrote?
(Also, what would be appropriate hints where I did not provide any? Were the
other hints okay?)

> Thus I conclude that B and D are the same, and C is different.
>
> Vegard made a mistake however:

You noticed that too quickly! :-)


Vegard

Jeremy Weissmann

unread,
Dec 12, 2007, 5:38:05 PM12/12/07
to Calculationa...@googlegroups.com
Hint suggestions:

 c == (b /\ false) \/ (non b /\ non d) \/ (non b /\ d)
==   {  false  is zero element of  /\  }

 c == false \/ (non b /\ non d) \/ (non b /\ d)

and:
 
 c == non b /\ (non d \/ d)
==   { excluded middle }

 c == non b /\ true

.
 
And the conclusion is the same as yours (hopefully also without error). Is
this too long-winded in general?

   Yes!  At least, I think so.  First of all, I'd suggest the following translation, if you just want to translate:

     "exactly one of b,c,d is true"
==
     (b == c == d)  /\  ¬(b /\ c /\ d)     .

Second of all, I'd design a narrow calculation, like so:

     c
==   { what  C  says }
     "exactly one of b,c,d is true"
==   { above }
     (b == c == d)  /\  ¬(b /\ c /\ d)
==   {  ¬(c == d)  }
     ¬b  /\  ¬(b /\ c /\ d)
==   { Leibniz }
     ¬b  /\  ¬(false /\ c /\ d)
==   { predicate calculus }
     ¬b     ,

plus or minus a few extra steps, as needed.  This way, you're not repeating  "c=="  from line to line.

 
I understood your logic; only one of d and c
can be true. But how would that be formalized, apart from what I just wrote?
(Also, what would be appropriate hints where I did not provide any? Were the
other hints okay?)

   Let's let  U  be a function of several arguments (flexibly many), intended to denote that exactly one of its arguments is true.  (You'll have to pardon that notational convention.)   Notice that  U  is symmetric in its arguments.

   Thus we have for instance:

     U.x  ==  x
     U.x.y  ==  x  ≠≠  y     .

We also have:

     U.x  =>  (U.x.y.z  ==  ¬y /\ ¬z)
     U.x.y  =>  (U.x.y.z  ==  ¬z)     ,

and so forth.  This morning I toyed with making  U  a quantifier, but with a quantification you cannot describe things like  U.y.y .   Unless you use  "bag"  quantification!  But I don't really want to think about that right now.  The moral of the story is that sometimes a collection of properties of an operator like  U  is more convenient and compact than a full-on translation.

+j

Eric Macaulay

unread,
Dec 13, 2007, 8:27:01 AM12/13/07
to Calculational Mathematics
A stranger meets B, C and D and asks a question, to which B replies,
but the stranger does not hear. `What did B say?' asks the stranger. C
replies, `B said there was one knight among us.' D interjects, `Don't
believe C, he's lying!.' What are C and D?

E.

Jeremy Weissmann

unread,
Dec 13, 2007, 2:11:29 PM12/13/07
to Calculationa...@googlegroups.com

From  D's  statement we conclude  d == ¬c ,  whence  "exactly one knight among us"  equivales  ¬b .   Thus  C's  statement yields  c == b == ¬b .   Thus we conclude that  C  is a knave and  D  is a knight.  The status of  B  cannot be determined.

Let's get some harder ones!

+j

Eric Macaulay

unread,
Dec 13, 2007, 3:39:59 PM12/13/07
to Calculational Mathematics

> Let's get some harder ones!

I don't know if this is harder, but it is a little different:

A stranger stumbled upon one of the inhabitants and asked him: `Are
you a knight or a knave?' to which he received the answer 'I'm not
telling you!'
Was he a knight or a knave?



Eric Macaulay

unread,
Dec 13, 2007, 8:40:04 PM12/13/07
to Calculational Mathematics


On Dec 13, 7:11 pm, "Jeremy Weissmann" <jer...@mathmeth.com> wrote:

> Let's get some harder ones!

One day a stranger came across two inhabitants B and C and asked `Is
the fabled sword Excalibur on this island?' B answered, `If C is a
knave then Excalibur is on this island.' while C said, `I never
claimed that Excalibur is not on this island!'
The stranger pressed for a definite answer whereupon one of the two
replied and the stranger knew whether or not Excalibur was on the
island.

The stranger related this exchange to a friend who remarked `Whichever
one it was who answered, suppose the other had answered instead. Could
you have determined if Excalibur was on the island?' The stranger
answered and then his friend knew whether Excalibur was on the island.

Is Excalibur on the island?

Jeremy Weissmann

unread,
Dec 14, 2007, 12:23:09 AM12/14/07
to Calculationa...@googlegroups.com
   Wow, Eric, this is a provocative one.  I'm going to reason as carefully as I possibly can, because the following is dangerously philosophical.

* * *
BY WAY OF PREPARATION

   First, I wish to clarify the inhabitant's statement.  I take it to mean something like:  "Given the fact that I made this statement  --and the fact that I am either a knight or a knave, and predicate calculus, and so forth-- ,  you cannot determine whether I am a knight or a knave." .

   Well, we  _are_  given the fact that the inhabitant made his statement, and we are also given that he is either a knight or a knave, and we are also given predicate calculus, and so forth.  So all of that is in the context.  Furthermore, I shall refer to the knighthood/knavehood of the inhabitant as his  "status" .   Thus the inhabitant's statement may be simplified to:

S:   it is impossible to determine the inhabitant's status     .

As usual, thanks to the context, we have that  S  equivales that the inhabitant is a knight.

* * *
BY WAY OF EXPLORATION

   Let's explore some cases.

   First, imagine that it is possible to determine the inhabitant's status.  Then  S  is false, and hence he is a knave.  Thus we conclude:

(0)  if it is possible to determine his status,
     then we will determine that he is a knave     .

   Next, imagine that it is not possible to determine his status.  Then  S  is true, and hence he is a knight.  Thus we conclude:

(1)  if it is impossible to determine his status,
     then he is a knight     .

   From  (1) ,  we can draw a provocative conclusion:  Imagine that we  _knew_  that it was impossible to determine the inhabitant's status, imagine that we had a proof of this.  Then by  (1) ,  we would also have a proof that the inhabitant is a knight.  And these two proof results are contradictory.  Therefore:

(2)  there is no proof that it is impossible
     to determine the inhabitant's status

and similarly:

     there is no proof that he is a knight     .

   Therefore the best we can say is this:  If he is a knave, then one fine winter morning, someone will discover a proof of this.  But if he is a knight, we will never know!  (This is like the consistency of the ZFC axioms.)

* * *
BY WAY OF CONCLUSION

   When I first started thinking about this problem, within a minute I had come to conclusions  (0)  and  (1) ,  but suspected that  (1)  was somehow a contradiction, allowing us to conclude that  (0)  is the only case, and that therefore the inhabitant is a knave.  But, I was not sure.  It took me a bit longer to come to conclusion  (2) .

   I'm still not sure.  But I tried my best!

+j
Message has been deleted

Eric Macaulay

unread,
Dec 15, 2007, 5:08:05 AM12/15/07
to Calculational Mathematics


Anyone else want to give the Excalibur problem a try?

E.

Jeremy Weissmann

unread,
Dec 15, 2007, 5:13:33 AM12/15/07
to Calculationa...@googlegroups.com
No one has given it a try yet. My "provocative" writeup was about a different problem of yours, where the inhabitant says: "I'm not telling you!" .

I have a possible solution to the Excalibur problem, which I will write up tomorrow.

+j

Eric Macaulay

unread,
Dec 15, 2007, 5:30:13 AM12/15/07
to Calculational Mathematics


Ahem. Anyone else want to try the `I'm not telling you problem?'

E.

Eric Macaulay

unread,
Dec 15, 2007, 7:12:59 AM12/15/07
to Calculational Mathematics


On Dec 14, 5:23 am, "Jeremy Weissmann" <jer...@mathmeth.com> wrote:
>
> First, I wish to clarify the inhabitant's statement. I take it to mean
> something like: "Given the fact that I made this statement --and the fact
> that I am either a knight or a knave, and predicate calculus, and so forth--
> , you cannot determine whether I am a knight or a knave." .

No. The inhabitant's statement means that he is not telling us whether
he is a knight or knave.

E.

Jeremy Weissmann

unread,
Dec 15, 2007, 11:28:10 AM12/15/07
to Calculationa...@googlegroups.com
>> First, I wish to clarify the inhabitant's statement. I take it to mean
>> something like: "Given the fact that I made this statement --and the fact
>> that I am either a knight or a knave, and predicate calculus, and so
>> forth--
>> , you cannot determine whether I am a knight or a knave." .
>
> No. The inhabitant's statement means that he is not telling us whether
> he is a knight or knave.

I don't see how what you said is different from what I've said. He is not telling us whether he is a knight or knave, that is, his status. What does that mean? It means that the things he says are not sufficient to know his status. Isn't that what 'tell' means? To bring someone to a state of knowledge through speech?

+j

Jeremy Weissmann

unread,
Dec 15, 2007, 11:45:40 AM12/15/07
to Calculationa...@googlegroups.com
> No. The inhabitant's statement means that he is not telling us whether
> he is a knight or knave.

Unless you take it very very literally, where "I'm not telling you whether I'm a knight or a knave." means: "I am neither uttering the words 'I am a knight.' nor 'I am a knave.' ." . Such a statement is true, which would imply that he is a knight. Is that the answer that you're looking for?

I think that's twisting the meaning of the word 'tell' . Isn't it true that he _has_ told us his status? His statement communicated his status.

To decide in general whether someone has told us X , we need to ask: "Can we conclude X from his statement?" . Reasoning happens in a context, so this is equivalent to saying: "Given the context, can we conclude X from his statement?" . But his statement is in the context as well, so this is equivalent to: "Given the context, can we conclude X ?" . And that was my translation.

+j

Eric

unread,
Dec 15, 2007, 11:49:39 AM12/15/07
to Calculationa...@googlegroups.com
Jeremy Weissmann wrote:
He is not telling us whether he is a knight or knave, that is, his status.  What does that mean?  
It means he does not say whether he is a knight or a knave. It does not mean we cannot know if he is a knight or a knave.

E.


Eric

unread,
Dec 15, 2007, 11:58:11 AM12/15/07
to Calculationa...@googlegroups.com
Jeremy Weissmann wrote:
No. The inhabitant's statement means that he is not telling us whether
he is a knight or knave.
    
   Unless you take it very very literally, where  "I'm not telling you whether I'm a knight or a knave."  means:  "I am neither uttering the words  'I am a knight.'  nor  'I am a knave.' ." .   Such a statement is true, which would imply that he is a knight.  Is that the answer that you're looking for?
  
Yes.

   I think that's twisting the meaning of the word  'tell' .   Isn't it true that he  _has_  told us his status?  His statement communicated his status.
  
I think if I had written

The inhabitant is not telling us whether he is a knight or a knave.

then I can see how it might be misleading. But since I reported what the inhabitant literally said (hence the speech marks) I don't think I'm guilty of trickery.

E.

Jeremy Weissmann

unread,
Dec 15, 2007, 12:01:35 PM12/15/07
to Calculationa...@googlegroups.com
Okay, so you do mean 'say literally' . To me, that is not what is communicated by 'tell' .

If I say: "My age is greater than 24 and less than 26." , does that mean that "I have told you my age." equivales false?! Or put another way, isn't it blatantly contradictory to say something like: "My card is a red 7, not hearts... but I'm not telling you what my card is!" ?

To 'tell' is to allow someone to tell.

+j

Jeremy Weissmann

unread,
Dec 15, 2007, 1:43:48 PM12/15/07
to Calculationa...@googlegroups.com
What follows is my solution to Eric's Excalibur problem, so do not read on if you want to try it yourself.

* * *

Here is the problem statement.

> One day a stranger came across two inhabitants B and C and asked `Is
> the fabled sword Excalibur on this island?' B answered, `If C is a
> knave then Excalibur is on this island.' while C said, `I never
> claimed that Excalibur is not on this island!'
> The stranger pressed for a definite answer whereupon one of the two
> replied and the stranger knew whether or not Excalibur was on the
> island.
>
> The stranger related this exchange to a friend who remarked `Whichever
> one it was who answered, suppose the other had answered instead. Could
> you have determined if Excalibur was on the island?' The stranger
> answered and then his friend knew whether Excalibur was on the island.
>
> Is Excalibur on the island?

As usual, I let b and c denote respectively that B and C are knights. Furthermore, I let e denote that Excalibur is on the island.

Using the Fundamental Theorem, I conclude (0) and (1) from the inhabitants' statements:

(0) b == c \/ e
(1) c == ¬(C said ¬e) .

(I prefer c \/ e to the less symmetric but more literal translation ¬c => e .)

* * *

Next we learn that one of the two inhabitants says something which allows the stranger to conclude the status of Excalibur. Let's introduce some terminology: Let P be the inhabitant who makes the statement, and call his (boolean) statement x . We call the other inhabitant Q . Booleans p and q denote the knighthood of P and Q , as usual. From the fundamental theorem we have:

(2) p == x .

Since the stranger learns the status of Excalibur, one way or the other, we introduce a new variable which will help to simplify a case analysis:

s == "the stranger learns that Excalibur is on the island"
¬s == "the stranger learns that Excalibur is not on the island" ,

which of course yields:

(3) e == s .

From (2) and (3) we conclude:

(4) p == x == e == s .

Thus armed, we turn to the end of the problem, where the stranger's friend asks what could be concluded, had the other inhabitant made the statement. We calculate:

"the other inhabitant made the statement"
== { Fundamental Theorem }
q == x
== { (4) }
q == p == e == s
== { p,q are b,c }
b == c == e == s
== { (0) }
c \/ e == c == e == s
== { golden rule }
c /\ e == s .

* * *

Finally, we consider two cases.

If the stranger learned that Excalibur is on the island, then s is true. Hence, if the other inhabitant made the statement, c /\ e would be true, which implies e . So, in this case, the stranger's answer to his friend's question would be "Yes." .

On the other hand, if the stranger learned that Excalibur is not on the island, then s is false. Hence, in the other inhabitant made the statement, c /\ e would be false, that is, ¬c \/ ¬e holds. This is too weak to imply ¬e , hence in this case, the stranger's answer to his friend's question would be "No." .

Thus Excalibur is on the island equivales that stranger's answer is "Yes." .

(I don't see how we can do better than this: We have as much information as the stranger's friend had before his question was answered. If his friend needed the answer, so do we.)

* * *

Notice that we did not use (1) . We calculate:

¬c
== { (1) }
(C said ¬e)
=> { Fundamental Theorem }
c == ¬e
== { using the first line }
false == ¬e
== { predicate calculus }
e ,

equivalently, c \/ e . Then from (0) we may conclude b . As far as I can see, this allows to conclude c ≠≠ e in case ¬s , but that is still too weak to conclude ¬e .

+j

Jeremy Weissmann

unread,
Dec 15, 2007, 2:02:37 PM12/15/07
to Calculationa...@googlegroups.com
As another example, consider the following exchange:

A: Are you sworn to an oath of silence?
B: I'm not telling.

I'd say that B's statement is contradictory, which is why we interpret it as a joke: He doesn't intend it to be taken seriously. (Knights and knaves are not permitted to joke!)

+j

Eric Macaulay

unread,
Dec 16, 2007, 6:14:11 PM12/16/07
to Calculational Mathematics
My comments on +j's argument will be up in a day or two...

E.

Eric

unread,
Jan 2, 2008, 12:26:21 PM1/2/08
to Calculationa...@googlegroups.com
Sorry it took so long but here's the solution to the excalibur problem:

C said he never claimed that excalibur is not on the island. If C is a
knave, then C has said that that excalibur is not on the island and
hence if C is a knave then excalibur is on the island. B said that if C
is a knave then excalibur is on the island hence B is a knight.

Now we don't know who answered the second question or what the answer
was so we embark on a case analysis:

0. B said yes hence excalibur is on the island.

1. B said no hence excalibur is not on the island.

2. C said yes: If excalibur is not on the island then C is a knave, but
we know that if C is a knave then excalibur is on the island. Hence C is
a knight and excalibur is on the island.

3. C said no: In this case we cannot decide if excalibur is on the
island, but we know that the stranger did decide, so this case is ruled out.

***

The stranger was asked if he knew whether or not he could have decided
if the inhabitant who did answer had answered. Once again we analyse the
cases:

0. B said yes
The stranger would suppose that C had answered. If C said yes then
excalibur is on the island since B is not a knave. If C had answered no,
then the stranger could not have decided.(Why?)

1. B said no.
If C had answered, the stranger would not have been able to determine if
excalibur is on the island (Why?)

2. C said yes.
The stranger would have supposed B had answered. As B is a knight he
could have determined whether excalibur is on the island.

***

In case 0 the stranger doesn't know whether or not he could have
determined if excalibur is on the island.
In case 1 the stranger does know whether or not he could have determined
if excalibur is on island (he could not have.)
In case 2 the stranger does know whether or not he could have determined
if excalibur is on island (he could have.)

As the friend did know whether the fountain of youth was on the island,
the stranger must have answered that he could not have determined
whether excalibur was on the island i.e. case 0.

So excalibur is on the island.

E.

Jeremy Weissmann

unread,
Jan 2, 2008, 1:19:16 PM1/2/08
to Calculationa...@googlegroups.com
I will have to think on this a bit. Parts of this analysis did not make sense to me on first reading.

But the biggest disappointment was to see that I had misinterpreted the problem statement in two ways where it was ambiguous.

* "The stranger pressed for a definite answer whereupon one of the two replied" did not communicate to me that one of the two said 'yes' or 'no' to the question "Is Excalibur on the island?" . I only read this to mean that they said something, and the stranger thereby concluded whether or not Excalibur was on the island.

* "Whichever one it was who answered, suppose the other had answered instead. Could you have determined if Excalibur was on the island?" did not communicate to me that the other gave some (any) answer, but instead that the other person said _the exact same thing_ .

Boo for poor problem statements. I look forward to trying to "calculify" your answer.

Incidentally, it seems you adapted this problem from one about a "fountain of youth" . Now that the answer is out in the open, can you quote your source?

+j

Eric

unread,
Jan 2, 2008, 2:30:37 PM1/2/08
to Calculationa...@googlegroups.com
Jeremy Weissmann wrote:
>
> Incidentally, it seems you adapted this problem from one about a "fountain of youth" . Now that the answer is out in the open, can you quote your source?
To Mock A Mockingbird by Raymond Smullyan.

E.


Reply all
Reply to author
Forward
0 new messages