Compare commits

..

1 Commits

Author SHA1 Message Date
d48ac47a13 Added "Gods, Demons, and Mortals"
Some checks failed
CI / Typst formatting (pull_request) Failing after 1s
CI / Typos (pull_request) Failing after 8s
CI / Build (pull_request) Has been skipped
2025-02-25 13:54:31 -08:00
7 changed files with 214 additions and 141 deletions

View File

@ -0,0 +1,12 @@
#import "@local/handout:0.1.0": *
#show: handout.with(
title: [Gods, Demons, and Mortals],
by: "Mark",
subtitle: [Based on Raymond Smullyan's _To Mock a Mockingbird_.],
)
#include "parts/00 warmup.typ"
#pagebreak()
#include "parts/01 gods.typ"

View File

@ -0,0 +1,6 @@
[metadata]
title = "Gods, Demons, and Mortals"
[publish]
handout = true
solutions = true

View File

@ -1,34 +1,36 @@
#import "@local/handout:0.1.0": * #import "@local/handout:0.1.0": *
= Miscellaneous Puzzles = Warm-Up
#problem("The Flower Garden") #problem("The Flower Garden")
In a certain flower garden, each flower was either red, yellow, In a certain flower garden, each flower was either red, yellow,
or blue, and all three colors were represented. A statistician or blue, and all three colors were represented. A statistician
once visited the garden and made the observation that whatever three flowers you picked, at least one of them was bound once visited the garden and made the observation that whatever three flowers you picked, at least one of them was bound
to be red. to be red.
#v(2mm)
A second statistician visited the garden and made A second statistician visited the garden and made
the observation that whatever three flowers you picked, at the observation that whatever three flowers you picked, at
least one was bound to be yellow. least one was bound to be yellow.
Two logic students heard about this and got into an argument. The first student said: "It therefore follows that whatever three flowers you pick, at least one is bound to be blue, #v(2mm)
Two logic students heard about this and got into an argument. \
The first student said: "It therefore follows that whatever three flowers you pick, at least one is bound to be blue,
doesn't it?" The second student said: "Of course not!" doesn't it?" The second student said: "Of course not!"
Which student was right, and why? Which student was right, and why?
#solution[ #solution[
The first student was right, and here is why. From the The first student was right, and here is why. From the
first statistician's report it follows that there cannot be more first statistician's report it follows that there cannot be more than one yellow flower, because if there were two yellows, you could pick two yellows and one blue, thus having a group of three flowers that contained no red. This is contrary to the report that every group of three is bound to contain at least one red flower. Therefore there cannot be more than one yellow flower.
than one yellow flower, because if there were two yellows,
you could pick two yellows and one blue, thus having a group #v(2mm)
of three flowers that contained no red. This is contrary to the
report that every group of three is bound to contain at least Similarly, there cannot be more than one blue flower, because if there were two blues, you could pick two blue flowers and one yellow and again have a group of three that contained no red. And so from the first statistician's report it follows that there is at most one yellow flower and one blue.
one red flower. Therefore there cannot be more than one yellow flower.
#v(2mm)
Similarly, there cannot be more than one blue
flower, because if there were two blues, you could pick two
blue flowers and one yellow and again have a group of three
that contained no red. And so from the first statistician's report
it follows that there is at most one yellow flower and one blue.
And it follows from the report of the second statistician that And it follows from the report of the second statistician that
there is at most one red flower, for if there were two reds, there is at most one red flower, for if there were two reds,
you could pick two reds and one blue, thus obtaining a group you could pick two reds and one blue, thus obtaining a group
@ -36,8 +38,10 @@ Which student was right, and why?
second report that there cannot be more than one blue, second report that there cannot be more than one blue,
although we have already deduced this from the first report. although we have already deduced this from the first report.
#v(2mm)
The upshot of all this is that there are only three flowers The upshot of all this is that there are only three flowers
in the entire garden-one red, one yellow, and one blue! And in the entire garden---one red, one yellow, and one blue! And
so it is of course true that whatever three flowers you pick, so it is of course true that whatever three flowers you pick,
one of them must be blue. one of them must be blue.
] ]
@ -63,6 +67,8 @@ Can you figure out what question I could have in mind?
no, then you are denying that no is your answer, although no no, then you are denying that no is your answer, although no
was your answer. was your answer.
#v(2mm)
It is therefore impossible for you to answer It is therefore impossible for you to answer
the question correctly even though the question does have a the question correctly even though the question does have a
correct answer: Either you answer no or you don't. If you do, correct answer: Either you answer no or you don't. If you do,
@ -94,6 +100,8 @@ have computed the probability that there will be a bomb on
the plane," he explained, "and although this probability is low, the plane," he explained, "and although this probability is low,
it is still too high for my comfort." it is still too high for my comfort."
#v(2mm)
Two weeks later, the friend Two weeks later, the friend
met the statistician on a plane. "How come you changed your met the statistician on a plane. "How come you changed your
theory?" he asked. "Oh, I didn't change my theory; it's just theory?" he asked. "Oh, I didn't change my theory; it's just

View File

@ -2,54 +2,73 @@
= Gods, Demons, and Mortals = Gods, Demons, and Mortals
#definition() #generic("Setup:")
Shortly after Inspector Craig returned to London from his One night, Inspector Craig had a curious dream.
strange experience in Subterranea, he had a curious dream.
He had been browsing that day in a library specializing in rare He had been browsing that day in a library specializing in rare
books on mythology, another of his many interests. His head books on mythology, another of his many interests. His head
was filled with gods and demons, and so his dream was perhaps not so surprising. was filled with gods and demons, and so his dream was perhaps not so surprising.
#v(2mm)
Time sometimes passes in unusual ways in the course of a Time sometimes passes in unusual ways in the course of a
dream. Craig dreamed that he spent nine days in a region in dream. Craig dreamed that he spent nine days in a region in
which dwelled gods, demons, and mortals. The gods, of which dwelled gods, demons, and mortals.
course, always told the truth, and the demons always lied. As
to the mortals, half were knights and half were knaves. As #v(2mm)
usual, the knights told the truth and the knaves lied.
The gods, of course, always told the truth, and the demons always lied. As to the mortals, half were knights and half were knaves. As usual, the knights told the truth and the knaves lied.
#problem("The First Day") #problem("The First Day")
Craig dreamed that on the first day he met a dweller of the Craig dreamed that on the first day he met a dweller of the
region who looked as ifhe might be a god, though Craig could region who looked as if he might be a god, though Craig could
not be sure. The dweller evidently guessed Craig's thoughts, not be sure. The dweller evidently guessed Craig's thoughts,
smiled, and made a statement to reassure him. From this state- smiled, and made a statement to reassure him. From this state-
ment, Craig knew that he was in the presence of a god. ment, Craig knew that he was in the presence of a god.
#v(2mm)
Can you supply such a statement? Can you supply such a statement?
#solution[ #solution[
One statement that works is: "I am not a knight." If the One statement that works is: "I am not a knight."
speaker were a knave or a demon, then it would be true that
he was not a knight, but knaves and demons don't make true #v(2mm)
statements. Therefore the speaker was neither a knavtr nor a
If the speaker were a knave or a demon, then it would be true that he was not a knight, but knaves and demons don't make true statements.
#v(2mm)
Therefore the speaker was neither a knave nor a
demon, hence he was a knight or a god and his statement was demon, hence he was a knight or a god and his statement was
true. Since it was true, then he really is not a knight; hence true.
he must be a god.
#v(2mm)
Since it was true, then he really is not a knight; hence he must be a god.
] ]
#v(1fr)
#problem("The Second Day") #problem("The Second Day")
In this episode of the dream, Craig met a terrifying-looking In this episode of the dream, Craig met a terrifying being who had every appearance of being a demon.
being who had every appearance of being a demon.
"What sort of being are'you?" asked Craig, in some alarm. "What sort of being are you?" asked Craig, in some alarm.
The being answered, and Craig then realized that he was confronting not a demon, but a knave. What could the being have
answered? The being answered, and Craig then realized that he was confronting not a demon, but a knave. \
What could the being have answered?
#solution[ #solution[
A statement that works is: "I am a demon." Obviously A statement that works is: "I am a demon." Obviously
no demon can claim he is a demon, so the speaker is not a no demon can claim he is a demon, so the speaker is not a
demon. Therefore his statement was false and since he is not demon. Therefore his statement was false and since he is not
a demon, he must be a knave. a demon, he must be a knave.
Incidentally, this and the last puzzle are essentially the same
as Problems 4 and 5 of Chapter 1, the puzzles about the prizes.
] ]
#v(1fr)
#pagebreak()
#problem("The Third Day") #problem("The Third Day")
In this episode, Craig met a totally nondescript-looking being In this episode, Craig met a totally nondescript-looking being
who from appearances could have been anything at all. The who from appearances could have been anything at all. The
@ -61,19 +80,26 @@ Can you supply such a statement?
#solution[ #solution[
This is a bit more tricky: A statement that works is: "I This is a bit more tricky: A statement that works is: "I
am either a god or a knave." That could be said by a god, am either a god or a knave." That could be said by a god,
since a god is either a god or a knave; it could also be falsely since a god is either a god or a knave; it could also be falsely said by a demon.
said by a demon. It couldn't be said by a knight, because a
knight would never lie and claim that he is either a god or a #v(2mm)
knave, and it couldn't be said by a knave, because a knave
would never admit to the true fact that he is either a god or It couldn't be said by a knight, because a knight would never lie and claim that he is either a god or a knave, and it couldn't be said by a knave, because a knave would never admit to the true fact that he is either a god or
a knave. And so the speaker must be either a god or a demon, a knave.
#v(2mm)
And so the speaker must be either a god or a demon,
but there is no way to tell which. but there is no way to tell which.
] ]
#v(1fr)
#problem("The Fourth Day") #problem("The Fourth Day")
Craig next met a being who made the following two statements: Craig next met a being who made the following two statements:
1. A god once claimed that I am a demon. - A god once claimed that I am a demon.
2. No knight has ever claimed that I am a knave. - No knight has ever claimed that I am a knave.
What sort of being was he? What sort of being was he?
@ -82,52 +108,74 @@ What sort of being was he?
it were true, a god would have once claimed that the speaker it were true, a god would have once claimed that the speaker
was a demon, which would mean that the speaker really was was a demon, which would mean that the speaker really was
a demon, but no one who tells the truth can be a demon. Since a demon, but no one who tells the truth can be a demon. Since
the first statement was false, so was the second statement, since the first statement was false, so was the second statement, since it was made by the same speaker. Therefore a knight did once claim that the speaker was a knave, hence the speaker really
it was made by the same speaker. Therefore a knight did once
claim that the speaker was a knave, hence the speaker really
is a knave. is a knave.
] ]
#v(1fr)
#problem("The Fifth Day") #problem("The Fifth Day")
A being made the following two statements to Craig: A being made the following two statements to Craig:
1. I never claim to be a knave. - I never claim to be a knave.
2. I sometimes claim that I am a demon. - I sometimes claim that I am a demon.
What sort of being are we now dealing with? What sort of being are we now dealing with?
#solution[ #solution[
The speaker's second statement was obviously a lie, be- The speaker's second statement was obviously a lie, because no truth-teller would ever say that he sometimes claims
cause no truth-teller would ever say that he sometimes claims to be a demon.
to be a demon. Therefore the first statement was also a lie,
#v(2mm)
Therefore the first statement was also a lie,
hence the speaker does sometimes claim to be a knave, hence hence the speaker does sometimes claim to be a knave, hence
he must be a demon. he must be a demon.
] ]
#v(1fr)
#pagebreak()
#problem("The Sixth Day") #problem("The Sixth Day")
In this episode, Craig came across two beings, each of whom In this episode, Craig came across two beings, each of whom
made a statement. Craig could then infer that at least one of made a statement. \
them must be a god, but he could not tell which one. From Craig could then infer that at least one of
neither statement alone could Craig have deduced this. them must be a god, but he could not tell which one. \
From neither statement alone could Craig have deduced this. \
What statements could the beings have made? What statements could the beings have made?
#solution[ #solution[
Many solutions are possible; here is one. Let us call the Many solutions are possible; here is one.
two beings A and B. Now, suppose A and B make the fol-
lowing two statements: #v(2mm)
A: B is a knight.
B: A is not a knight. Let us call the two beings A and B. \
Now, suppose A and B make the following two statements:
- A: B is a knight.
- B: A is not a knight.
A is either telling the truth or lying. A is either telling the truth or lying.
Case 1-A is telling the truth: Then B really is a knight,
hence his statement is true, hence A is not a knight, therefore #v(2mm)
A must be a god, since he is telling the truth.
Case 2-A is lying: Then B is not a knight, since A says *Case 1: A is telling the truth.* \
he is. Also, since A is lying, then A is certainly not a knight, Then B really is a knight,
hence B's statement is true. Therefore B is telling the truth, hence his statement is true, hence A is not a knight, therefore A must be a god, since he is telling the truth.
but is not a knight, hence B is a god.
So if Case 1 is true, A is a god; if Case 2 is true, then B is #v(2mm)
a god. There is no way to tell whether A is telling the truth
or lying.
*Case 2: A is lying.* \
Then B is not a knight, since A says he is. Also, since A is lying, then A is certainly not a knight, hence B's statement is true. Therefore B is telling the truth, but is not a knight, hence B is a god.
#v(2mm)
So if Case 1 is true, A is a god; if Case 2 is true, then B is a god. \
There is no way to tell whether A is telling the truth or lying.
] ]
#v(1fr)
#problem("The Seventh Day") #problem("The Seventh Day")
On the next day, Craig again met two beings each of whom On the next day, Craig again met two beings each of whom
made a statement. Craig could then infer that one of them was made a statement. Craig could then infer that one of them was
@ -136,16 +184,19 @@ was which. Again, from neither statement alone could Craig
have inferred this. Can you supply two such statements? have inferred this. Can you supply two such statements?
#solution[ #solution[
gain let us call the two beings A and B. The following Again, let us call the two beings A and B. \
statements would work: The following statements would work:
A: Both of us are knaves. - A: Both of us are knaves.
B: Both of us are demons. - B: Both of us are demons.
It is obvious that both are lying. Since A is lying, they are It is obvious that both are lying. Since A is lying, they are
not both knaves. Since B is lying, they are not both demons. not both knaves. Since B is lying, they are not both demons.
Therefore one is a knave and one is a demon, but there is no Therefore one is a knave and one is a demon, but there is no
way to tell which one is which. way to tell which one is which.
] ]
#v(1fr)
#problem("Introducing Thor") #problem("Introducing Thor")
On the eighth day, Craig met a being who had every ap- On the eighth day, Craig met a being who had every ap-
pearance of being the god Thor. The being made a statement, pearance of being the god Thor. The being made a statement,
@ -155,19 +206,32 @@ What statement could Thor have made?
#solution[ #solution[
A statement that works is: "I am either a knave or a demon A statement that works is: "I am either a knave or a demon
or the god Thor." or the god Thor."
#v(2mm)
If the speaker were either a knave or a demon, then it would If the speaker were either a knave or a demon, then it would
be true that he is either a knave or a demon or the god Thor. be true that he is either a knave or a demon or the god Thor.
This would mean that a knave or a demon made a true state-
ment, which is not possible. Therefore the speaker is neither #v(2mm)
a knave nor a demon, hence his statement is true. Hence he
must be the god Thor. This would mean that a knave or a demon made a true statement, which is not possible. Therefore the speaker is neither a knave nor a demon, hence his statement is true.
#v(2mm)
Hence he must be the god Thor.
] ]
#v(1fr)
#pagebreak()
#problem("A Perplexity Resolved") #problem("A Perplexity Resolved")
Craig and Thor became fast friends. In fact, on the evening of Craig and Thor became fast friends. In fact, on the evening of
the ninth day, Thor gave a magnificent banquet in Craig's the ninth day, Thor gave a magnificent banquet in Craig's
honor. "I propose a toast to our illustrious guest!" said Thor, honor. "I propose a toast to our illustrious guest!" said Thor,
as he raised his glass of nectar. as he raised his glass of nectar.
#v(2mm)
After a round of cheers, Craig was asked to speak. After a round of cheers, Craig was asked to speak.
"I am very perplexed!" said Craig as he rose. "I wonder "I am very perplexed!" said Craig as he rose. "I wonder
if this may not all be a dream!" if this may not all be a dream!"
@ -179,6 +243,9 @@ could possibly make. Then this afternoon I met someone else
who also made a statement which no dweller of this region who also made a statement which no dweller of this region
could possibly make. That is why I suspect that I may be could possibly make. That is why I suspect that I may be
dreaming. " dreaming. "
#v(2mm)
"Oh!" said Thor. "Be reassured; you are not dreaming. "Oh!" said Thor. "Be reassured; you are not dreaming.
The two incidents have a perfectly rational explanation. You The two incidents have a perfectly rational explanation. You
see, we have had two visitors here from another realm. Both see, we have had two visitors here from another realm. Both
@ -187,60 +254,64 @@ although he is not called a knight since he is not from this
region. The other is Alexander, who sometimes tells the truth region. The other is Alexander, who sometimes tells the truth
and sometimes lies. It must have been those two whom you and sometimes lies. It must have been those two whom you
met today. What statements did they make?" met today. What statements did they make?"
#v(2mm)
Craig then told the company what each had said. Craig then told the company what each had said.
"That explains it perfectly!" said Thor. "Moreover, it fol- "That explains it perfectly!" said Thor. "Moreover, it follows from their having said what they did that Cyrus was the
lows from their having said what they did that Cyrus was the
one you met in the morning. And interestingly enough, if you one you met in the morning. And interestingly enough, if you
hadn't met Alexander in the afternoon, you could never have hadn't met Alexander in the afternoon, you could never have
known whether the one you met in the morning was Cyrus known whether the one you met in the morning was Cyrus
or Alexander." or Alexander."
Craig thought the matter over and realized that Thor was
right. #v(2mm)
What statements could these two outsiders have made
which fulfill all of the above conditions? Craig thought the matter over and realized that Thor was right. \
What statements could these two outsiders have made which fulfill all of the above conditions?
#solution[ #solution[
Here is one possible solution. Here is one possible solution:
MORNING SPEAKER: "I am neither a knight nor a god." - morning speaker: "I am neither a knight nor a god."
AFTERNOON SPEAKER: "I am either a knave or a demon." - afternoon speaker: "I am either a knave or a demon."
No inhabitant of the region could make either of those No inhabitant of the region could make either of those
statements. No knight or god could claim that he is neither a statements. No knight or god could claim that he is neither a
knight nor a god; no knave or demon could make the true knight nor a god; no knave or demon could make the true
statement that he is neither a knight nor a god. As for the statement that he is neither a knight nor a god.
second statement, obviously no knight or god would claim to
be either a knave or a demon and no knave or demon would #v(2mm)
admit to being a knave or a demon. Therefore both were out-
siders; namely, Cyrus and Alexander. The statement of the As for the second statement, obviously no knight or god would claim to be either a knave or a demon and no knave or demon would admit to being a knave or a demon. Therefore both were outsiders; namely, Cyrus and Alexander.
morning speaker was true and the statement of the afternoon
sp,eaker was false. Since Cyrus never makes false statements, #v(2mm)
he couldn't have been the afternoon speaker. Thus he was the
morning speaker.
The statement of the morning speaker was true and the statement of the afternoon speaker was false. Since Cyrus never makes false statements, he couldn't have been the afternoon speaker. Thus he was the morning speaker.
] ]
#v(1fr)
#pagebreak()
#problem("A Philosophical Puzzle") #problem("A Philosophical Puzzle")
The next morning when Craig was wide awake and recalling The next morning, Craig was wide awake and recalling
his dream, he wondered whether he had been logically inconsistent in his sleep. "The trouble is this," thought Craig: "In his dream. He wondered whether he had been logically inconsistent in his sleep. "The trouble is this," thought Craig: "In my dream I believed that Thor was a god and that gods always tell the truth. Yet Thor told me that I wasn't dreaming. Now how could Thor, who tells the truth, say that I wasn't dreaming when in fact I was? Wasn't this an inconsistency on my part?"
my dream I believed that Thor was a god and that gods always
tell the truth. Yet Thor told me that I wasn't dreaming. Now #v(2mm)
how could Thor, who tells the truth, say that I wasn't dreaming when in fact I was? Wasn't this an inconsistency on my
part?"
Would you say that Craig's dream was logically inconsistent? Would you say that Craig's dream was logically inconsistent?
#solution[ #solution[
As I see it, Craig's dream was not necessarily inconsistent. If As I see it, Craig's dream was not necessarily inconsistent. If Craig had actually believed in the dream that he was dreaming, then the set of his beliefs during his dream would have been inconsistent, since the following propositions are indeed logically contradictory:
Craig had actually believed in the dream that he was dreaming, - Thor is a god
then the set of his beliefs during his dream would have been - Gods make only true statements
inconsistent, since the following propositions are indeed log- - Thor stated that Craig was not dreaming;
ically contradictory: (1) Thor is a god; (2) Gods make only - Craig was dreaming.
true statements; (3) Thor stated that Craig was not dreaming;
(4) Craig was dreaming. #v(2mm)
The contradiction is obvious. However, there is no evi-
dence that Craig at any time of his dream believed that he was The contradiction is obvious. However, there is no evidence that Craig at any time of his dream believed that he was dreaming, although at one point he wondered whether he might be dreaming. Craig presumably believed that he was awake, and this belief, though false, was perfectly consistent with the other beliefs of his dream.
dreaming, although at one point he wondered whether he
might be dreaming. Craig presumably believed that he was #v(2mm)
awake, and this belief, though false, was perfectly consistent
with the other beliefs of his dream. Curiously enough, if Craig had formulated the belief that he was dreaming, then this belief, though correct, would have created a logical inconsistency!
Curiously enough, if Craig had formulated the belief that
he was dreaming, then this belief, though correct, would have
created a logical inconsistency!
] ]

View File

@ -1,17 +0,0 @@
#import "@local/handout:0.1.0": *
#show: handout.with(
title: [Bonus: Logic Puzzles],
by: "Mark",
subtitle: [Based on Raymond Smullyan's _To Mock a Mockingbird_.],
)
#set par(first-line-indent: 5mm)
#include "parts/00 one.typ"
#pagebreak()
#include "parts/01 logician.typ"
#pagebreak()
#include "parts/02 gods.typ"

View File

@ -1,7 +0,0 @@
[metadata]
title = "Tropical Polynomials"
[publish]
handout = false
solutions = true