Can you solve what an MIT professor once called 'the hardest logic puzzle ever'?

Logic puzzles can teach reasoning in a fun way that doesn't feel like work.

neurons firing in brain
Credit: Shutterstock
  • Logician Raymond Smullyan devised tons of logic puzzles, but one was declared by another philosopher to be the hardest of all time.
  • The problem, also known as the Three Gods Problem, is solvable, even if it doesn't seem to be.
  • It depends on using complex questions to assure that any answer given is useful.

Despite the general dislike of mathematics that most profess to have, many people enjoy logic puzzles. This is strange, as many logic puzzles are just variations of math problems. Gleefully ignorant of this fact, many mathaphobes will try to solve riddles and puzzles of tremendous difficulty using reasoning tools they fear to employ when the subject is an equation.

Today, we'll look at a puzzle, the polymath who devised it, and why you should consider picking up a book of logical puzzles next time you are at the library.

This puzzle was written by the brilliant logician Raymond Smullyan. Born in New York 101 years ago, Smullyan earned his undergraduate degree at the University of Chicago and his doctorate in mathematics at Princeton, where he also taught for a few years.

An extremely prolific writer, he published several books on logic puzzles for popular consumption and an endless stream of textbooks and essays for an academic audience on logic. His puzzle books are well regarded for introducing people to complex philosophical ideas, such as Gödel's incompleteness theorems, in a fun and non-technical way.

Skilled in close-up magic, Smullyan once worked as a professional magician. He was also an accomplished pianist and an amateur astronomer who built his own telescope. Besides his interest in logic, he also admired Taoist philosophy and published a book on it for a general audience.

He also found the time to appear on Johnny Carson, where, as in many of his books, he argued that people who like his puzzles claim to dislike math only because they don't realize that they are one and the same.

The Three Gods Problem

One of the more popular wordings of the problem, which MIT logic professor George Boolos said was the hardest ever, is:

"Three gods A, B, and C are called, in no particular order, True, False, and Random. True always speaks truly, False always speaks falsely, but whether Random speaks truly or falsely is a completely random matter. Your task is to determine the identities of A, B, and C by asking three yes-no questions; each question must be put to exactly one god. The gods understand English, but will answer all questions in their own language, in which the words for yes and no are da and ja, in some order. You do not know which word means which."

Boolos adds that you are allowed to ask a particular god more than one question and that Random switches between answering as if they are a truth-teller or a liar, not merely between answering "da" and "ja."

Give yourself a minute to ponder this; we'll look at a few answers below. Ready? Okay.

George Boolos' solution focuses on finding either True or False through complex questions.

In logic, there is a commonly used function often written as "iff," which means "if, and only if." It would be used to say something like "The sky is blue if and only if Des Moines is in Iowa." It is a powerful tool, as it gives a true statement only when both of its components are true or both are false. If one is true and the other is false, you have a false statement.

So, if you make a statement such as "the moon is made of Gorgonzola if, and only if, Rome is in Russia," then you have made a true statement, as both parts of it are false. The statement "The moon has no air if, and only if, Rome is in Italy," is also true, as both parts of it are true. However, "The moon is made of Gorgonzola if, and only if, Albany is the capitol of New York," is false, because one of the parts of that statement is true, and the other part is not (The fact that these items don't rely on each other is immaterial for now).

In this puzzle, iff can be used here to control for the unknown value of "da" and "ja." As the answers we get can be compared with what we know they would be if the parts of our question are all true, all false, or if they differ.

Boolos would have us begin by asking god A, "Does "da" mean yes if and only if you are True if and only if B is Random?" No matter what A says, the answer you get is extremely useful. As he explains:

"If A is True or False and you get the answer da, then as we have seen, B is Random, and therefore C is either True or False; but if A is True or False and you get the answer ja, then B is not Random, therefore B is either True or False… if A is Random and you get the answer da, C is not Random (neither is B, but that's irrelevant), and therefore C is either True or False; and if A is Random...and you get the answer ja, B is not random (neither is C, irrelevantly), and therefore B is either True or False."

No matter which god A is, an answer of "da" assures that C isn't Random, and a response of "ja" means the same for B.

From here, it is a simple matter of asking whichever one you know isn't Random questions to determine if they are telling the truth, and then one on who the last god is. Boolos suggests starting with "Does da mean yes if, and only if, Rome is in Italy?" Since one part of this is accurate, we know that True will say "da," and False will say "ja," if faced with this question.

After that, you can ask the same god something like, "Does da mean yes if, and only if, A is Random?" and know exactly who is who by how they answer and the process of elimination.

If you're confused about how this works, try going over it again slowly. Remember that the essential parts are knowing what the answer will be if two positives or two negatives always come out as a positive and that two of the gods can be relied on to act consistently.

Smullyan wrote several books with other logic puzzles in them. If you liked this one and would like to learn more about the philosophical issues they investigate, or perhaps if you'd like to try a few that are a little easier to solve, you should consider reading them. A few of his puzzles can be found with explanations in this interactive.

A brief history of human dignity

What is human dignity? Here's a primer, told through 200 years of great essays, lectures, and novels.

Credit: Benjavisa Ruangvaree / AdobeStock
Sponsored by the Institute for Humane Studies
  • Human dignity means that each of our lives have an unimpeachable value simply because we are human, and therefore we are deserving of a baseline level of respect.
  • That baseline requires more than the absence of violence, discrimination, and authoritarianism. It means giving individuals the freedom to pursue their own happiness and purpose.
  • We look at incredible writings from the last 200 years that illustrate the push for human dignity in regards to slavery, equality, communism, free speech and education.
Keep reading Show less

Mathematical model shows how the Nazis could have won WWII's Battle of Britain

With just a few strategical tweaks, the Nazis could have won one of World War II's most decisive battles.

Photo: Heinrich Hoffmann/ullstein bild via Getty Images
Politics & Current Affairs
  • The Battle of Britain is widely recognized as one of the most significant battles that occurred during World War II. It marked the first major victory of the Allied forces and shifted the tide of the war.
  • Historians, however, have long debated the deciding factor in the British victory and German defeat.
  • A new mathematical model took into account numerous alternative tactics that the German's could have made and found that just two tweaks stood between them and victory over Britain.
Keep reading Show less

We’ve mapped a million previously undiscovered galaxies beyond the Milky Way. Take the virtual tour here.

See the most detailed survey of the southern sky ever carried out using radio waves.

Photo by Štefan Štefančík on Unsplash
Surprising Science

Astronomers have mapped about a million previously undiscovered galaxies beyond the Milky Way, in the most detailed survey of the southern sky ever carried out using radio waves.

Keep reading Show less

New data reveals Earth closer to a black hole and is moving 16,000 mph faster

A new study shows our planet is much closer to the supermassive black hole at the galaxy's center than previously estimated.

Position and velocity map of the Milky Way Galaxy.

Credit: NAOJ
Surprising Science
  • A Japanese radio astronomy project revealed Earth is 2,000 light years closer to the supermassive black hole at the Milky Way's center.
  • The data also showed the planet is moving 7 km/s or 16,000 mph faster in orbit around the Galactic Center.
  • The findings don't mean Earth is in more danger from the black hole but reflect better modeling of the galaxy.
  • Keep reading Show less
    Technology & Innovation

    How has technology changed — and changed us — in the past 20 years?

    Apple sold its first iPod in 2001, and six years later it introduced the iPhone, which ushered in a new era of personal technology.

    Scroll down to load more…
    Quantcast