Wednesday, March 6, 2019

Darklands Puzzle #2

Your path is blocked by a grim iron door. Embossed onto it is a legend:
Yep, all of these images are going to be equally shitty
Five knobs are labeled "5" to "9" consecutively. The wrong knob may (will. ed.) release a trap. Which numeral does the letter "E" stand for? You select...
...5.
...6.
...7.
...8.
...9.
(Source: Darklands cluebook by MicroProse software)

The key is the value of "F", which is carried over from the addition of the second leftmost column. Does two or any larger value ever carry over? No, it's always one. Working from right to left, "L" is two and "O" is four. "E" needs to add together with "E" so that a one carries over and the remainder is "O" (i.e. 4). The appropriate value is of course seven.

Tuesday, March 5, 2019

Darklands Puzzle #1

Since I've decided to resurrect my puzzle blog that no one reads, I'm going to be doing puzzles from the 1992 historical fantasy RPG Darklands, set in the Holy Roman Empire of the late 15th century.
Ironic given that when I played the game, Gretchen had the sword and Gunther had the hammer
The puzzles are thrown at the player by Dwarves occupying human-owned mines in order to proceed further in resolving the issues behind the occupation, as the Dwarves of Darklands, in addition to being portrayed as clever, mineral-obsessed and apparently allergic to Christian symbols, are also skilled logicians and mathematicians. (Ha-ha, very funny, laugh it up, MicroProse. I'm sure you got your jollies from stereotypes.) I only ever encountered a fraction of the puzzles I am presenting here while in-game and am taking ones I like from the cluebook. The first of these:
Your way is blocked by dark iron door. Carved above it are the words:
FACES SPEAK EITHER WHOLLY LIES OR WHOLLY TRUTH.
TOUCH A FACE WHICH SPEAKS WHOLLY TRUTH TO OPEN THE DOOR.
On the door are three metal faces: lead, gold, silver. As you ponder, the
lead face speaks, "Pape mimer aleppe."
What could he mean? The gold face translates, "Lead said he always
lies." The silver face cries, "Do not believe Gold! HE is the liar!" Which
face speaks truth? You think, then touch...
...the gold face.
...the silver face.
(Source: Darklands cluebook by MicroProse Software)

So, this is essentially a knights-and-knaves type of puzzle. Perhaps Darklands mines have become a sort of afterlife for the late Raymond Smullyan.

What the lead face is saying is a canard. There is no point in trying to interpret it. What is important is the incoherent assertion of the gold face: if lead is a "knight" then he would never claim to lie, which is equally true if he is a "knave". Neither will ever claim to lie. The gold face is then a "knave". So the silver face is telling the truth.

Wednesday, October 4, 2017

Six Languages

At a recent international conference English was the principal language spoken, but interpreters were also present who could, if required, translate what was said into French, German, Dutch, Spanish, Arabic, and Turkish. Mr. Polyglot, of the Foreign Office, went to the trouble of engaging  interpreters whose surnames corresponded to these six foreign tongues. Each of his six interpreters spoke two of the six foreign languages; no two of them spoke the same two languages; each of the six languages was spoken by just two of them. And none of them spoke the language of which he is the namesake.

Mr. Spanish, for example, could speak Dutch and German, while one of his colleagues (his brother-in-law) spoke Dutch and Arabic. Mr. French and Mr. Dutch, between them, spoke all four of the languages of which neither is the namesake. Of the two languages spoken by Mr. Dutch, both the namesakes spoke French.

Neither of the German-speaking interpreters had any knowledge of Arabic.

What two languages were offered by Mr. Turkish?
(Source: My Best Puzzles in Logic and Reasoning by Hubert "Caliban" Phillips)

An initial tabulation shows everything given:

French German Dutch Spanish Arabic Turkish
Mr. French ✗ ✗
Mr. German ✗
Mr. Dutch ✗ ✗
Mr. Spanish ✗ ✓ ✓ ✗ ✗ ✗
Mr. Arabic ✗
Mr. Turkish ✗

The most productive thing to do next is to focus in on the proposition: "Of the two languages spoken by Mr. Dutch, both the namesakes spoke French." Only three of the translators can possibly speak French. Of them, there are three pairs:
  1. Mr. German and Mr. Arabic
  2. Mr. German and Mr. Turkish
  3. Mr. Arabic and Mr. Turkish
The first possibility is excluded by virtue of the fact that none of the two German interpreters speaks Arabic. But consider what happens when Mr. Dutch speaks German and Turkish and consequently also when Mr. German and Mr. Turkish both speak French:

French German Dutch Spanish Arabic Turkish
Mr. French ✗ ✗ ✗
Mr. German ✓ ✗
Mr. Dutch ✗ ✓ ✗ ✗ ✗ ✓
Mr. Spanish ✗ ✓ ✓ ✗ ✗ ✗
Mr. Arabic ✗ ✗ ✗
Mr. Turkish ✓ ✗ ✗

It was said that somebody has got to speak both Dutch and Arabic. Obviously, because of the name, it can't be Mr. Arabic. It can't be Mr. Turkish either, because one of his two slots is already taken up by French. That leaves Mr. German:

French German Dutch Spanish Arabic Turkish
Mr. French ✗ ✗ ✗
Mr. German ✓ ✗ ✓ ✓
Mr. Dutch ✗ ✓ ✗ ✗ ✗ ✓
Mr. Spanish ✗ ✓ ✓ ✗ ✗ ✗
Mr. Arabic ✗ ✗ ✗ ✗
Mr. Turkish ✓ ✗ ✗ ✗

But now Mr. German speaks three languages, which was stipulated not to be possible. The only remaining possibility of the three named earlier is that Mr. Dutch speaks Arabic and Turkish and consequently that Mr. Arabic and Mr. Turkish both speak French:

French German Dutch Spanish Arabic Turkish
Mr. French ✗ ✗
Mr. German
✗



Mr. Dutch ✗ ✗ ✗ ✗ ✓ ✓
Mr. Spanish ✗ ✓ ✓ ✗ ✗ ✗
Mr. Arabic ✓ ✗
Mr. Turkish ✓ ✗

It was stated that one of the interpreters speaks both Dutch and Arabic. It can't be Mr. Arabic for the obvious reason of his name. Nor can it be Mr. Turkish because one of his two slots is already taken up by French. The others were ruled out at the outset. That leaves only Mr. German:

French German Dutch Spanish Arabic Turkish
Mr. French ✗ ✗ ✗
Mr. German ✗ ✗ ✓ ✗ ✓ ✗
Mr. Dutch ✗ ✗ ✗ ✗ ✓ ✓
Mr. Spanish ✗ ✓ ✓ ✗ ✗ ✗
Mr. Arabic ✓ ✗ ✗
Mr. Turkish ✓ ✗ ✗ ✗

It was also stated that "Mr. French and Mr. Dutch, between them, spoke all four of the languages of which neither is the namesake.". This means that Mr. French speaks German and Spanish and, with this information, the last cells can be filled in:

French German Dutch Spanish Arabic Turkish
Mr. French ✗ ✓ ✗ ✓ ✗ ✗
Mr. German ✗ ✗ ✓ ✗ ✓ ✗
Mr. Dutch ✗ ✗ ✗ ✗ ✓ ✓
Mr. Spanish ✗ ✓ ✓ ✗ ✗ ✗
Mr. Arabic ✓ ✗ ✗ ✗ ✗ ✓
Mr. Turkish ✓ ✗ ✗ ✓ ✗ ✗

Final answer: Mr. Turkish speaks French and Spanish.

Friday, August 11, 2017

Not Remarkably Rich

Annette, Bernice, and Claudia are three remarkable women, each having some remarkable characteristics.
  1. Just two are remarkably intelligent, just two are remarkably beautiful, just two are remarkably artistic, and just two are remarkably rich.
  2. Each has no more than three remarkable characteristics.
  3. Of Annette it is true that:
    if she is remarkably intelligent, she is remarkably rich.
  4. Of Bernice and Claudia it is true that:
    if she is remarkably beautiful, she is remarkably artistic.
  5. Of Annette and Claudia it is true that:
    if she is remarkably rich, she is remarkably artistic.
Who is not remarkably rich?
(Source: Test Your Logic: 50 Puzzles in Deductive Reasoning by George J. Summers)

This looks pretty difficult because, in themselves, implications with false antecedents don't tell us anything about the truth of their consequents. This means, for example, that if Annette is not remarkably intelligent, whether or not she is remarkably rich is still up in the air. Fortunately, there really is enough structure here to determine the truth. One can start with the assumption that Annette is remarkably intelligent. If she is remarkably intelligent then she is also remarkably rich. If she is remarkably rich, then she is also remarkably artistic. Additionally, because two of the women have to be remarkably beautiful, and none of them have more than three remarkable traits, the two remarkably beautiful women must be Bernice and Claudia. This implies in turn that they are both remarkably artistic:

Intelligent Beautiful Artistic Rich
Annette ✓ ✓ ✓
Bernice ✓ ✓
Claudia ✓ ✓

Uh-oh! We already have a problem. Fortunately, the problem stems entirely from the single assumption that Annette is remarkably intelligent; nothing further needed to be added and so this assumption can in no sense be seen as "protected", which is a good thing, because we already have some solid truth about what is the case: Annette is not remarkably intelligent and, because two of the women must be remarkably intelligent, Bernice and Claudia are. All further calculations must then start with these facts:

Intelligent Beautiful Artistic Rich
Annette ✗

Bernice ✓

Claudia ✓


After I reached this point, I had to pause for a while to figure out my next step. It turned out that it was fruitful to assume that Annette is remarkably rich, which in turn implied that she is remarkably artistic:

Intelligent Beautiful Artistic Rich
Annette ✗ ✓ ✓
Bernice ✓

Claudia ✓


This is a good assumption to try because it means that exactly one of Bernice and Claudia can (and must) be remarkably beautiful, but not both, because remarkable beauty in either also implies remarkable artistry for the same woman, and that would leave us with three remarkably artistic women, which is a no-no. Moreover, because only one of Bernice and Claudia can be remarkably beautiful, this assumption also means that Annette has to pick up the slack for the remaining slot, which may as well be added now:

Intelligent Beautiful Artistic Rich
Annette ✗ ✓ ✓ ✓
Bernice ✓

Claudia ✓


Of Bernice and Claudia, which is remarkably beautiful? What if it's Bernice? If Bernice is remarkably beautiful, then she is remarkably artistic. This confers three remarkable qualities on Bernice and so she can't be remarkably rich. This means Claudia must be remarkably rich and, if Claudia is remarkably rich, then she is also remarkably artistic:

Intelligent Beautiful Artistic Rich
Annette ✗ ✓ ✓ ✓
Bernice ✓ ✓ ✓ ✗
Claudia ✓ ✗ ✓ ✓

Déjà vu! We have a problem again. As before, all three women are now remarkably artistic, which is not possible. This means that, under the current assumption, Claudia must be remarkably beautiful. Can it work or do we have to go back to the drawing board? If Claudia is remarkably beautiful, then she is also remarkably artistic. That means Claudia now has three remarkable traits and cannot have a fourth of being remarkably rich. Bernice must then be remarkably rich and here is our completed tableau:

Intelligent Beautiful Artistic Rich
Annette ✗ ✓ ✓ ✓
Bernice ✓ ✗ ✗ ✓
Claudia ✓ ✓ ✓ ✗

This tableau indeed fulfills all the criteria set out in the beginning. Exactly two of the women have each of the four traits and none has more than three. Remembering that only implications with true antecedents need to be checked, it is equally true that, if Claudia is remarkably beautiful, she is remarkably artistic and that, if Annette is remarkably rich, she is remarkably artistic. Which leaves Claudia without remarkable wealth, but I suppose if she really wanted it she could go into consulting or modeling or the like with her other assets.

Final answer: Claudia is not remarkably rich.

Tuesday, July 25, 2017

De Morgan and Another

Augustus De Morgan, the mathematician who died in 1871, used to boast that he was $x$ years old in the year $x^2$. Jasper Jenkins [possibly not a real person], wishing to improve on this, told me in 1925 that he was $a^2 + b^2$ in $a^4 + b^4$; that he was $2m$ in the year $2m^2$; and that he was $3n$ years old in the year $3n^4$. Can you give the years in which De Morgan and Jenkins were respectively born?
(Source: 536 Curious Problems and Puzzles by Henry Ernest Dudeney)

Squaring away the year of birth for De Morgan is pretty easy. The maximum value possible for $x$ is the floor of the square root of 1871, which is 43. 43 squared is 1849, which seems like a reasonable value. This would mean that De Morgan was born in 1806, which is correct.

The second part seems harder because it contains information that is extraneous to getting the solution (though I suppose one might consider the extra statements "bonus rounds"). But really all that one need focus on is the last statement, that he was $3n$ years old in the year $3n^4$. In other words:

\[ y + 3n = 3n^4 \]

Or:

\[ y = 3n(n^3 - 1) \]

Where $y$ is the year of his birth. This one is the easiest to work with because there is only one variable and the cubic term blows up quickly, meaning only a few values of $n$ need to be tried. Reformulating a little, one has to try different values of the function:

\[ y(n) = 3n(n^3 - 1) \]

Starting at zero, these are:

\begin{align*}
y(0) &= 0 \\
y(1) &= 0 \\
y(2) &= 42 \\
y(3) &= 234 \\
y(4) &= 756 \\
y(5) &= 1860 \\
y(6) &= 3870
\end{align*}

Like I said, the cubic term has let us dash through Antiquity, jump over the Early Middle Ages and land right in the Victorian era before going almost two millennia into the future. (By comparison, the naive guess-and-check method used here, but with the second statement that involves only a squared term, requires thirty-two iterations, starting from zero, to get the right answer.) 1860 is indeed the right answer and it can be verified by noting that, in this instance, the third statement means that he was 15 ($3n$) in 1875 ($3n^4$).

Final answer: De Morgan was born in 1806; Jenkins, in 1860.

Wednesday, July 12, 2017

The Logic Question Almost Everyone Gets Wrong

Jack is looking at Anne, but Anne is looking at George. Jack is married, but George is not. Is a married person looking at an unmarried person? [Possible answers: yes, no, cannot be determined]
(Source: an article in The Guardian by Alex Bellos)

This is the sort of question like the one about the cost of a bat and a ball where a reflexive answer will tend to be wrong. Because Anne's marital status has not been given upfront, as it has with Jack and George, one might immediately suspect that it cannot be determined. But consider that "being married" is an obviously binary predicate. So look at both possibilities: if Anne is married, then a married person (Anne) is looking at an unmarried one (George) and if Anne is unmarried then a married person (Jack) is still nonetheless looking at an unmarried person (Anne). Anne's marital status is irrelevant, so the answer is yes.

Wednesday, June 21, 2017

Will You Crack the Code?


(Source: all over the place; no idea about exact origin)

First, note that an implicit assumption in the problem is that no digits will be repeated in the solution. Then start with the first triplet, 682. One (and presumably only one) digit is correct and well-placed. It can't be six because then the description of the second triplet could not be true. Nor can it be eight, because the fourth triple, 738, is described as having nothing correct. This means that two is correct and in the right place.

Next, focus on the last two triplets. The "intersection" of the two, as it were, is seven and eight, that is, the two digits they have in common. Because everything is wrong in the fourth triplet, this means that the one correct, but wrongly placed digit is zero.

It is already known that the zero can't occupy the third position of the triplet, because two already has that. Additionally, the third triplet and its description tell us the middle position cannot be occupied by zero, leaving us with 0-2. The only task remaining is to find out the middle digit.

All but two candidates can be ruled out. Zero and two have already been used up. Three, seven and eight are explicitly ruled out. Six was implicitly ruled out in the first paragraph of this solution. That leaves one and four. If the missing digit is one, then the description of the second triplet is false. All that leaves is four.

Final answer: 042. (Don't panic?)