Skip to the entry
Virtue & Paradox

Philosophy you can do, not just read.

Logic & ParadoxesPuzzle solution

Hardest Logic Puzzle Ever: You Never Learn What 'Ja' Means

Source card

Texts this entry reads, by coordinate and edition.

  1. The Harvard Review of Philosophy 6(1), pp. 62–65George Boolos, "The Hardest Logic Puzzle Ever" (1996), bibliographic recordthe rules on this page are this site's own statement of the puzzleSource [1] · open the text
Illustration: three identical figures stand side by side, seen from behind, picturing the puzzle's three godsGenerated illustration
Three gods who look exactly alike: nothing in how they appear tells you which one is True, False or Random. Illustration: Virtue & Paradox. Generated schematic illustration — not a photograph, artwork record or historical source. © Virtue & Paradox, all rights reserved.

Three questions are enough to name all three gods, and you finish without knowing what ja means. That is the shape of the hardest logic puzzle ever, the title of a paper by George Boolos published in 1996. The solution turns on one device: a question built so that a truthful god and a lying god both answer ja exactly when a statement is true, whatever ja means. The complete steps sit in the folded solution below, and a program verified them against all 96 possible cases.

The puzzle, restated

Boolos's paper is listed on this page from its bibliographic record, so the rules below are this site's own statement of the puzzle, not a quotation from it. Three gods, A, B and C, are True, False and Random, in an arrangement you do not know. True always answers truthfully and False always answers falsely, while in the version solved here, Random answers ja or da and you are not told how it picks.

The gods understand ordinary questions but reply only with two words of their own language, ja and da. One word means yes and the other means no, and nothing in the puzzle tells you which is which. You get three yes-or-no questions in all, each put to one god. You may ask the same god twice, a later question may depend on earlier answers, and every question must have a definite yes-or-no answer for True and False.

Three identical faceless gods, A, B and C, share one speech balloon holding the puzzle's two answer words, ja and da
The setup: three gods, one each of True, False and Random in an unknown order, who answer only "ja" or "da." "Three gods and two words: the setup of the hardest logic puzzle ever" by Virtue & Paradox — https://virtueandparadox.com/puzzles/hardest-logic-puzzle-ever/ — CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

Puzzle card

The Hardest Logic Puzzle Ever title of Boolos 1996

Type
truth-value this site's classification
Earliest known source
George Boolos, "The Hardest Logic Puzzle Ever," The Harvard Review of Philosophy 6(1): 62–65 (1996); listed from its bibliographic record, and the rules on this page are this site's own statement of the puzzle Crossref record, read 2026-10-17
Difficulty (1–5)
5 this site's rating
Tools needed
Pen and paper, or code this page
How the answer is checked
Every case enumerated by a program: 6 arrangements × 2 meanings of ja × 8 patterns of Random's answers, 96 cases in all this page's enumeration

This card as CSV: hardest-logic-puzzle-ever-puzzle-card.csv

Rules card listing what True, False and Random do and the limits on the three questions
The rules of the version solved on this page, stated by this site rather than quoted from Boolos's paper. "Rules of the version solved on this page" by Virtue & Paradox — https://virtueandparadox.com/puzzles/hardest-logic-puzzle-ever/ — CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

According to their Crossref records, later papers on the puzzle appeared in the Journal of Philosophical Logic (Tim S. Roberts, 2001) and in Analysis (B. Rabern and L. Rabern, 2008; G. Uzquiano, 2010), and this page does not summarize them. This puzzle has a solution you can check. The Paradox Index covers a different kind of problem, sorting paradoxes by type and by the state of their solutions.

Why can't you just ask a god if it is Random?

Asking a god directly "Are you Random?" fails because every word you could hear fits every identity. Suppose you ask A: if A is True and ja means yes, its honest "no" comes out as da, but if ja means no, the same honest answer comes out as ja. False lies, so its words come out reversed. Random can produce either word regardless of the question.

Grid of the words god A could give when asked directly whether it is Random, for each identity and meaning of ja
Asked directly whether it is Random, god A can give either word whatever its identity, so the answer rules nothing out. "What a direct question to god A can return" by Virtue & Paradox — https://virtueandparadox.com/puzzles/hardest-logic-puzzle-ever/ — CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

Two unknowns flip the answer, and a third adds noise: the meaning of the word flips it once, the god's honesty flips it again, and Random's words carry no information at all. A successful plan has to cancel both flips and somehow cope with the noise.

Do you need to know what ja means?

You do not: in the embedded question "If you were asked S, would you say ja?", True and False both answer ja exactly when the statement S is true, under either meaning of ja. Here S stands for any yes-or-no statement, such as "A is Random." The table below works through all eight combinations of the god's identity, the truth of S and the meaning of ja.

Eight-row truth table comparing direct answers with answers to the embedded question
For True and False, the embedded question draws ja exactly when the statement is true, under both meanings of ja, while the direct answer changes with the meaning. "The embedded question: eight-row truth table" by Virtue & Paradox — https://virtueandparadox.com/puzzles/hardest-logic-puzzle-ever/ — CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

Consider False, with S true and ja meaning no. Asked S directly, False would lie and say "no," which is ja, so the statement "you would say ja" is true. False lies about that too and answers "no," which is again ja. Each flip therefore happens twice, once inside the question and once in the answer, and the two cancel out.

The same fact explains the title. Because the answer tracks S and not the meaning of ja, the answers you collect come out identical whichever meaning is true. You can verify any row by hand: choose the god, the truth of S and the meaning of ja, then follow the two steps. Random is the only god this device cannot control, since it can still give either word.

Show the solutionHide the solutionTry the puzzle first: this opens the full working.

The solution, step by step

Every question below uses the embedded form, so whenever the god asked is not Random, ja means "the statement is true," and the plan runs in four steps.

  1. Ask B: "If you were asked 'Is A Random?', would you say ja?" Ja means C is not Random, and da means A is not Random; call that god G.
  2. Ask G: "If you were asked 'Are you True?', would you say ja?" Ja means G is True, and da means G is False.
  3. Ask G: "If you were asked 'Is B Random?', would you say ja?" Ja means B is Random, and da means the god that is neither G nor B is Random.
  4. Assign the remaining identity to the remaining god.
Branch diagram of the first question and what each of its two answers rules out
Step one of the solution, with both of its branches. "Step one of the three-question solution" by Virtue & Paradox — https://virtueandparadox.com/puzzles/hardest-logic-puzzle-ever/ — CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

Step 1 is the only place Random can interfere, and it is built so that the interference does no harm. If B is True or False, the answer is reliable: ja means A is Random, so C is not, and da means A is not. If B is Random, then A and C are True and False, so "C is not Random" and "A is not Random" both hold whatever B said. Steps 2 and 3 go to G, who is never Random, so their answers are reliable.

Decision tree of all three questions and the eight answer paths, each ending in a full set of names
The complete solution as a tree: three questions, eight answer paths, and one set of names at the end of each path. "The three-question solution as a decision tree" by Virtue & Paradox — https://virtueandparadox.com/puzzles/hardest-logic-puzzle-ever/ — CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

The tree has eight leaves, and each one identifies all three gods; none of them says what ja means, because every path is reached both with ja meaning yes and with ja meaning no. The case table (CSV, hardest-logic-puzzle-ever-cases.csv) lists all 96 cases, with the god asked and the answer given at each step.

Every case, checked

A program enumerated every case: 6 arrangements of the gods, 2 meanings of ja, and both words Random could give at each of the three questions, 96 cases in all. It ran the solution on each one, and all 96 end with the three gods named correctly. Because Random's answer at every question was tried both ways, the result holds however Random picks its words.

The same run confirmed all eight rows of the embedded-question table, and replacing ja and da with two other symbols, in either order, changed nothing but the labels. It also found that the three answers come out word for word the same under both meanings of ja, for each arrangement and each set of Random's answers.

Bar chart of the 96 enumerated cases across 8 answer paths, split by the two meanings of ja
Each of the 8 answer paths is reached with ja meaning yes and with ja meaning no, so the answers never settle what ja means. "Every case checked: 96 cases on 8 answer paths" by Virtue & Paradox — https://virtueandparadox.com/puzzles/hardest-logic-puzzle-ever/ — CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

Check record cardHow the answer on this page is tested

Method
A program enumerated every case: each arrangement of the three gods, each meaning of ja, and both words Random could give at each of the three questions. It then ran the three-question solution on every case and compared the names it reached with the true arrangement. this page's enumeration
Cases enumerated
96 (6 arrangements × 2 meanings of ja × 8 patterns of Random's answers) this page's enumeration
Output summary
96 of 96 cases end with all three gods named correctly. The cases follow 8 answer paths, and each path is reached both with ja meaning yes and with ja meaning no. this page's enumeration

This card as CSV: hardest-logic-puzzle-ever-check-record.csv

No three-question plan could improve on that point. Three answers make at most 8 patterns of ja and da, while the arrangement and the meaning of ja make 12 possibilities together (6 × 2), so no plan can name the gods and pin down the word every time. That is a line of reasoning you can check, which is how the puzzle passes the dojo test, this site's gate for a full entry. How puzzle answers are checked here, and how often they are rerun, is set out in How Claims Are Tested.

In this site's view, a solution you have read but never run is only half learned, so run one case before moving on: pick an arrangement and a meaning of ja, and trace both through the eight-row table by hand.

Illustration: one forked line drawn three times, pale to dark, a brush at its end, for tracing a case by handGenerated illustration
One forked line traced three times, from pale to dark, with the brush still at its end; this section closes by asking you to trace one case by hand. Illustration: Virtue & Paradox. Generated schematic illustration — not a photograph, artwork record or historical source. © Virtue & Paradox, all rights reserved.

Practice

Off the page:

A drill for the next 24 hours, on paper:

  1. Before opening the folded solution, write down the first question you would ask and which god would receive it.
  2. Test that question against the direct-question grid and the eight-row table, and list which identities each answer would leave open.
  3. Open the solution, choose two rows of the case table with different arrangements of the gods, and trace each through the tree by hand, noting any step where your trace and the table disagree.
  4. Then try the Zebra Puzzle, another puzzle whose answer is checked case by case, or set this tree beside the decision tree in trolley problem variations, where the branches carry judgments rather than proofs.

Sources

  1. [1] George Boolos, "The Hardest Logic Puzzle Ever," The Harvard Review of Philosophy 6(1): 62–65 (1996), doi:10.5840/harvardreview1996615. doi.org/10.5840/harvardreview1996615 Consulted: bibliographic record only
  2. [2] Tim S. Roberts, "Some Thoughts about the Hardest Logic Puzzle Ever," Journal of Philosophical Logic 30(6): 609–612 (2001), doi:10.1023/a:1013344220298. doi.org/10.1023/a:1013344220298 Consulted: bibliographic record only
  3. [3] B. Rabern and L. Rabern, "A simple solution to the hardest logic puzzle ever," Analysis 68(2): 105–112 (2008), doi:10.1093/analys/68.2.105. doi.org/10.1093/analys/68.2.105 Consulted: bibliographic record only
  4. [4] G. Uzquiano, "How to solve the hardest logic puzzle ever in two questions," Analysis 70(1): 39–44 (2010; published online 2009), doi:10.1093/analys/anp140. doi.org/10.1093/analys/anp140 Consulted: bibliographic record only

Cite this page

Virtue & Paradox. “Hardest Logic Puzzle Ever: You Never Learn What 'Ja' Means.” Published 2026-10-17; last substantive revision 2026-10-17. https://virtueandparadox.com/puzzles/hardest-logic-puzzle-ever/. Accessed (the date you read it).