Boolosian logic
November 8, 2015 9:53 PM   Subscribe

The Hardest Logic Puzzle Ever goes like this:
Three gods A, B, and C are called, in some 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.
posted by the man of twists and turns (59 comments total) 21 users marked this as a favorite
 
Sam Hughes (previously) wrote a Javascript implementation of this puzzle to avoid any ambiguity. It's good for testing your questions to see if they actually work.
posted by Rangi at 10:28 PM on November 8, 2015 [4 favorites]


but whether Random speaks truly or falsely is a completely random matter.

This is where this gets bogged down, in particular the question of whether Random is selecting from {"true", "false"} or {"da", "ja"}.
posted by PMdixon at 10:35 PM on November 8, 2015 [1 favorite]


This wasn't hard. This is an advanced version of a plot point in a 1970s Doctor Who episode.
posted by Cool Papa Bell at 10:42 PM on November 8, 2015 [7 favorites]


This is where this gets bogged down, in particular the question of whether Random is selecting from {"true", "false"} or {"da", "ja"}.

I have to assume Random is selecting from {"true", "false"}, because otherwise the answer gives no data, and the puzzle requires that the answer to the right question, even posed to a Random, will give data.

However, looking at it exhaustively ... there's something missing from the solution that is necessary to make it work.

rot13: Gur negvpyr pynvzf gung vs lbh tb gb Tbq N naq nfx "Qbrf ‘qn’ zrna ‘lrf’ vs naq bayl vs lbh ner Gehr vs naq bayl vs O vf Enaqbz?", gura ab znggre nal bs gur haxabja inevnoyrf, trggvat n qn zrnaf gung P vf abg enaqbz naq trggvat n wn zrnaf gung O vf abg enaqbz. Ohg, qrcraqvat ba ubj pbzcbhaqrq VSSf ner fhccbfrq gb jbex, guvf zvtug abg jbex. Jr'er nfxvat, rffragvnyyl, n dhrfgvba bs gur sbezng "k vss l vss m", ohg ubj qbrf gung cebprff? Vf gurer na vzcyvrq beqre bs bcrengvbaf urer, be vf vg n guerrjnl vss naq jr trg n gehgu bhg bayl jura nyy guerr ner gehr be nyy guerr ner snyfr?

Gur nafjre vf, gurer unf gb or na beqre bs bcrengvbaf - gung vf, jr unir gb or nfxvat "(k vss l) vss m" - be gur cerfhzrq nafjre snvyf va guerr bs gur fvkgrra cbffvoyr fvghngvbaf. Gung vf arprffnel vasbezngvba gb gur senzvat bs gur dhrfgvba gung vf whfg yrsg bhg ragveryl.
posted by kafziel at 10:55 PM on November 8, 2015


Does Random know that its answers can be both true and false, in the long term?
posted by a lungful of dragon at 10:57 PM on November 8, 2015


Of course, also this all hinges on Random answering truly or falsely with the knowledge that it is itself neither true nor false but actually Random, instead of answering truly as if it were True and answering falsely as if it were False.
posted by kafziel at 11:00 PM on November 8, 2015


Some unfortunate comments on the page which come down to not understanding "if and only if". Which is easy to do! I confess that after reading the page the expression started to mean nothing at all. :)

So to help out, here's the truth table for iff (↔):

t ↔ t = t
t ↔ f = f
f ↔ t = f
f ↔ f = t

As the article says, p↔q is true when p and q are both true, or both false.

But the solution relies on statements like p↔q↔r. If you're worried, p↔(q↔r) is the same as (p↔q)↔r. But what's it mean?

It turns out that p↔q↔r is true if the number of false statements is even. That is, if there are either no false statements, or two.

Does that help? Probably not, but it would have helped at least one of the commenters, who incorrectly evaluated one of these triple statements.

(It's also the answer to kafziel's worry.)
posted by zompist at 11:01 PM on November 8, 2015 [5 favorites]


God, the size of the venom sacs on certain specimens:

"Appalling article- as always on this site. Testament to the utter inability of the author to comprehend even the simplest logical concepts.

A puzzle that has so many ambiguities in its formulation is SHAMEFUL.
1) are the 'gods' aware of each others identity?
2) does RANDOM randomly answer, or is RANDOM randomly assigned a PERMANENT 'true' or 'false' personality BEFORE the puzzle begins
3) are the other 'gods' aware of how RANDOM will answer a given question, or are they only aware of his name.
4) do we ask each 'god' one question, or do we get three questions and a free choice as to which gods get the questions.

These FOUR questions are not nit-picking, but an ESSENTIAL definition of the problem. The problem posed is so mathematically/logically ILLITERATE, it is both shocking and depressing. The author was too dumb to even comprehend how important it was to clarify the four questions I pose above. Yet the author writes articles like this in a LAUGHABLE attempt to 'prove' himself 'clever'."
posted by Cpt. The Mango at 11:38 PM on November 8, 2015 [4 favorites]


I can do it with one question posed to any of the gods:

"What is the truth value of this sentence: (this sentence is false) or (after answering in your dumb language you will then break your vows/rules whatever and truthfully tell me in plain English which god is which)."

Checkmate god.
posted by Pyry at 11:54 PM on November 8, 2015 [3 favorites]


Young people nowadays expect gods to do their logic for them; in my day we had to make do with undiscovered tribes and ancient Greeks.
posted by Segundus at 12:52 AM on November 9, 2015 [4 favorites]


"When someone asks you if you are a god, you say ja!"
posted by straight at 1:03 AM on November 9, 2015 [6 favorites]


I assume the random god answers truthfully or falsely at random, rather than answering true or false at random (so its answers are always logically consistent).
posted by It's Never Lurgi at 1:32 AM on November 9, 2015 [1 favorite]


straight: ""When someone asks you if you are a god, you say ja!""

Da!
posted by Samizdata at 3:13 AM on November 9, 2015 [1 favorite]


I'm bothered by the solution, because it is depending on the results of truth tables to solve the problem using a series of nonsense statements. Biconditionals (↔, if and only if) require an implication. That is, P↔Q can be read as "P if and only if Q," but it also can be read "P is necessary and sufficient for Q." If the statements are P "Socrates is a man" and Q "The sky is blue", that doesn't make P↔Q a true statement, because the sky could be grey and Socrates a man, or the sky could be blue and Socrates a cat. The two facts, despite being true, don't have the causal relationship to create a biconditional.

In the example, "da" means "yes" or "no" independently of the identities of the gods, so at least as given, the biconditionals are all false. An actual solution would have to have statements that are causally related.
posted by graymouser at 3:48 AM on November 9, 2015 [4 favorites]


This is a variant of the Knights and Knaves problem, I believe. TV Tropes list it under "dead horse tropes".
posted by rongorongo at 4:27 AM on November 9, 2015


I haven't read the article or solution because I wanted to try to work this out on my own, and here's what I came up with for my three questions (assuming all gods know what each of the other gods are):

Ask A: if I asked you if ja means yes, would you say da?

(in all cases with all answerers, the answer should be "no," establishing which word means "no," and therefore which word means "yes.")

Ask B: if I asked you if A is the random god would you say yes?

(if A is the Random god, both the Liar and the Truthteller god will say "yes"; if A is not the Random god, any god will say "no")

If A is the Random god, proceed to ask C any verifiable true/false question (is water wet?) to acertain if they are the truthteller or liar.

If A is not the Random god,

Ask C: If I asked you if the Truthteller god would say that A is the Liar god, would you say yes?

If A is the Truthteller god, the liar would say no, and Random god as either truthteller or liar would say no

If A is the Liar God, the liar would say yes, and Random god as either truthteller or liar would say yes
________________

Have I gone wrong with this or misunderstood the premise? I've gone over it a couple of times, but it's making me a little dizzy now.
posted by taz at 4:35 AM on November 9, 2015 [2 favorites]




Ask A: if I asked you if ja means yes, would you say da?

(in all cases with all answerers, the answer should be "no," establishing which word means "no," and therefore which word means "yes.")


How can you trust the Random god to answer no to this (or any) question?
posted by 256 at 5:07 AM on November 9, 2015 [2 favorites]


The answer, of course, is "hipster".
posted by clvrmnky at 5:31 AM on November 9, 2015


256, I'm thinking this way: the Random god answers either as a truthteller or a liar, and we don't know which. Assuming ja means yes, and da means no, If you ask the Truthteller, "if I asked you if ja(yes) means yes, would you say da(no)?" They would say no. The Liar would also say no, because the truth is that they would say "yes" -- so they lie and say that they would say the same as the truthteller; therefore Random god would also answer "no" either as truthteller or liar.

Assuming ja means no, and da means yes, and you ask "if I asked you if ja(no) means yes, would you say da(yes)?" the answer from the truthteller would still be "no," and so would the liar's answer (since they are lying, to say that they would say the same thing as the truthteller), and again, Random god would also answer "no," either as truthteller or liar.
posted by taz at 5:34 AM on November 9, 2015


taz: The way I interpreted the puzzle, I believe that the Random god essentially just flips a coin whenever you ask it a question and then says da or ja accordingly with no consideration given to the question you asked. That, of course, makes the puzzle much harder.
posted by 256 at 5:41 AM on November 9, 2015 [3 favorites]


Biconditionals (↔, if and only if) require an implication. That is, P↔Q can be read as "P if and only if Q," but it also can be read "P is necessary and sufficient for Q." If the statements are P "Socrates is a man" and Q "The sky is blue", that doesn't make P↔Q a true statement, because the sky could be grey and Socrates a man, or the sky could be blue and Socrates a cat. The two facts, despite being true, don't have the causal relationship to create a biconditional.

The truth functional conditional, which is what the "biconditional" is built with, has much, much weaker of a connection between antecedent and consequent than you are taking it to. p->q is equivalent to "not-p, or q" and it is probably best to think of it that way. In propositional logic "If the Atlantic Ocean is made of fondue, Godzilla is President of France" evaluates to true, although it is difficult to come up with any kind of story about sufficient and necessary conditions that makes this plalatable.
posted by thelonius at 5:51 AM on November 9, 2015


256: I think the puzzle requires it be possible for the Random god to provide information with its answers. If the Random God ignores the question and says ja or da at random, then there's no way to pose a question that will get information, even if it is God A.
posted by GameDesignerBen at 6:00 AM on November 9, 2015


Graymouser, I think there is an easier way to think about p↔q. Fundamentally, Boolean logic is about (potentially arbitrary) truth tables, so "is necessary and sufficient for" is just a convenient English translation of the complete logical truth table for "if and only if".

However, truth tables can be evaluated for any particular set of input values. "If and only if" itself is just an operator like an addition or multiplication. The output of that operator for a specific set of inputs doesn't imply anything about the output for other inputs.

When we look at the whole truth table of inputs and outputs, we can use the phrase "necessary and sufficient" when evaluating a coherent system on ALL of its possible input values, rather than just one pair. If we have a system with testable propositions that fulfill every output value of the "if and only if" truth table, we can then say those propositions in the form p↔q are "necessary and sufficient" for each other.

On preview, thelonius beat me to it but maybe this will still help?
posted by Nutri-Matic Drinks Synthesizer at 6:01 AM on November 9, 2015 [1 favorite]


It blows the three question rule out of the water, but I presume the only way to obtain information from the random god if they do indeed flip a coin prior to answering is to repeatedly ask a god the same question. If they give you two different answers you've established the random god.

Man, I'm bad at this.
posted by Kikujiro's Summer at 6:18 AM on November 9, 2015


This logic puzzle may be hard because of the intrinsic puzzle nature. I conject it's also hard because there's no motivation. I'm not trying to determine which path to go down, or figure out which well to drink water from so I don't die. All I'm going to do is figure out which god is which?

Da thanks.

Uh, or ja way?
posted by cardioid at 8:03 AM on November 9, 2015


I don't really get the "if and only if" construct. "Are you a knight, iff Pluto is a dwarf planet?" makes no sense to me as a question. I assume this is equivalent to "Is it true that you are a knight AND Pluto is a dwarf planet?" but I can't say for sure, since I cannot parse the original question.
posted by salmacis at 8:20 AM on November 9, 2015


Yes, it wouldn't come up, it seems, in ordinary conversation. Neither would the translation "Is it true that either you are a knight and Pluto is a dwarf planet, or that you are NOT a knight and Pluto is NOT a dwarf planet?".
posted by thelonius at 8:27 AM on November 9, 2015


Easy. Flip the first god. Wait ten minutes and then flip him back. Then flip the second god. Then go up and feel the third god to see if he is warm. If he is, it's the first god, if not, the third.
posted by sexyrobot at 8:29 AM on November 9, 2015 [8 favorites]


The use of "if and only if" is logician jargon obscuring the fact that you're cheating by asking more than one question at a time.
posted by straight at 8:36 AM on November 9, 2015 [4 favorites]


> I assume this is equivalent to "Is it true that you are a knight AND Pluto is a dwarf planet?"

Not so - it's equivalent to "Is it true that you're a knight EXACTLY IF Pluto is a dwarf planet?"

Another way to think of it is: the truth value of the statement "you are a knight" is equal to the truth value of the statement "Pluto is a dwarf planet" - either both are true OR both are false.

I used to have a reasonable amount of interest in such puzzles. Everyone should solve a few of these as they make you a better person. But I spend most of my day now solving puzzles that aren't entirely dissimilar...

I do have something to offer here - the originator of this very puzzle (I'm fairly sure) but definitely the expert on this class of puzzle, the imitable Raymond Smullyan.

It appears that Donald Knuth has one of my favorite Smullyan short stories up...
posted by lupus_yonderboy at 8:41 AM on November 9, 2015


> Three gods A, B, and C are called, in some order, True, False, and Random.

There were two little skunks named Out and In.
posted by jfuller at 8:57 AM on November 9, 2015


Actually, graymouser has absolutely a valid point of view.

“Paraconsistency” as its called in philosophy—“Barack Obama is president such that 2+2 is 4”—has a lot of people who argue that such statements have no intrinsic sense precisely because there is no intrinsic connection between the concepts and properties involved. Pluto being a dwarf planet isn’t a property that at all applies to the identities of knights or knaves, and so asking about them together is actually *not* allowed as a single question, because it’s not a true biconditional, it’s just two questions dressed up in one sentence.

I think the other (related) problem here is that asking “if and only if” about unrelated states—knight/knave and Pluto, again—doesn’t make semantic sense, unless you’ve been trained to believe via logic tables that it does. (Again, with graymouser, I would say no. But it’s possible.)

I would ask you to go out, as a social scientist, and see whether people can give even *an* answer to unrelated biconditionals, if you’re out in the world. Consider two questions:

(a) Can you drive from New York to Boston if and only if your car is silver?
(b) Can you drive from New York to Boston if and only if Pluto is a dwarf planet?

(a) has an answer for most people: no. (b), I strongly suspect, is so lacking in semantic sense that it does not have an answerable condition to the vast majority of native speakers. I'd hold that it's like constructing a grammatically correct sentence that nonetheless fails (“A verdant oncology woke the epistemology since tomorrow”). If people can't even figure out its truth possibility in order to give an answer, it's not a construction that has semantic sense to them.

What I want to suggest from that—assuming, again, that my proposed experiment goes along the lines of my intuition—is that biconditionals must actually follow everyday sense in addition to logic tables. These don’t.

On preview: Salmacis's comment above corroborates me.
posted by migrantology at 8:58 AM on November 9, 2015 [6 favorites]


Well, there is certainly a lot of room for debate as to what in our language, if anything, should be translated as truth-functional conditionals. Nevertheless, it seems to me to be pretty clear that this is a puzzle about propositional logic as limited to truth functional semantics.
posted by thelonius at 9:05 AM on November 9, 2015 [1 favorite]


> I do have something to offer here - the originator of this very puzzle (I'm fairly sure) but definitely the expert on this class of puzzle, the imitable Raymond Smullyan.

Did you RTFA? It starts: "While a doctoral student at Princeton University in 1957, studying under a founder of theoretical computer science, Raymond Smullyan would occasionally visit New York City."
posted by languagehat at 9:09 AM on November 9, 2015 [1 favorite]


> Did you RTFA?

OUCH.

sorry! I guess I just went right to the meat and missed that. Did search the page for it tho.
posted by lupus_yonderboy at 9:11 AM on November 9, 2015


.....Smullyan's involvement is the context that makes me cleave to truth-table logic here, BTW, since he published several books of that type of puzzle (even if you hate these puzzles, his book "5000 BC" is well worth a look, btw, it's about assorted philosophical topics).
posted by thelonius at 9:52 AM on November 9, 2015 [1 favorite]




Yeah, objecting to strict adherence to propositional logic in an extended knights-and-knaves problem is like asking why Eve doesn't just threaten or blackmail Bob to find out what Alice said.

The use of "if and only if" is logician jargon obscuring the fact that you're cheating by asking more than one question at a time.

Not really? I would say that conventionally, "one question" is equivalent to "gains one bit of information," though I don't think that I've ever seen that equivalence made explicitly.

All I'm going to do is figure out which god is which?

Or else the ones you've misidentified will send you to an eternity of suffering in their respective hells, served consecutively. Motivated?

I seem to recall at some point thinking that the version in which you can arbitrarily choose which god to ask each question (so you could potentially ask one god all three) was more interesting, but I forget why.
posted by PMdixon at 11:47 AM on November 9, 2015


"Another way to think of it is: the truth value of the statement "you are a knight" is equal to the truth value of the statement "Pluto is a dwarf planet" - either both are true OR both are false."

That actually helps me a lot; I was having the same trouble regarding dependencies that other people were. I was trying to go at it by the AND, which seems to have been along the same lines as the right "iff" take, but was absolutely flummoxed by my misreading of the randomness — I thought the rando was going to give a random answer, not act consistently with a TRUE or FALSE god. But that's mostly just not properly reading the question.

"Yeah, objecting to strict adherence to propositional logic in an extended knights-and-knaves problem is like asking why Eve doesn't just threaten or blackmail Bob to find out what Alice said."

Meh. It's written in natural language. Threats and blackmail require more assumptions; the "if and only if" construction used contains the same natural language that implies dependence. At best, it's needlessly confusing when it could be edited to be still correct but more clear without contradicting natural semantic usage.
posted by klangklangston at 12:43 PM on November 9, 2015


I mean, it definitely demonstrates that the semantic context of "true" in propositional logic is only as good as your propositions. I think that's why it grates on me: it's not a valid use of logic, it's a convoluted set of propositions that only exist to gain multiple bits of information from a single statement. I dislike it because it teaches about propositional logic as a game rather than as a way to determine what propositions are and aren't true.
posted by graymouser at 12:45 PM on November 9, 2015


"Do the questions 'Are you a knight' and 'is Pluto a dwarf planet' have the same answer?"

Note: falls completely apart when you're trying to ask three questions instead of two.
posted by kafziel at 1:29 PM on November 9, 2015 [1 favorite]


people always seem to be annoyed that logic puzzles involve logic
posted by thelonius at 2:04 PM on November 9, 2015 [1 favorite]


But extending the natural language version of that, couldn't you just make a list and ask "Do the questions 1,2,..,N have the same answer?"... Rather than falling apart, it makes total sense! Provided you're willing to allow an arbitrary amount of evaluation in a "single question" as long as it has a single yes or no answer at the end.

I do actually feel that stringing together multiple propositions into a single question is kind of cheating in stretching a normal interpretation of the problem, and also makes the assumption that "answers randomly" or "answers falsely" only applies to the final answer and not all the intermediate answers...
posted by Nutri-Matic Drinks Synthesizer at 4:41 PM on November 9, 2015


a lungful of dragon: I have to assume Random is selecting from {"true", "false"}, because otherwise the answer gives no data, and the puzzle requires that the answer to the right question, even posed to a Random, will give data.

Surprisingly, I think you're wrong about that. You get data, it's just that your data takes the form of "either P is true or the god I asked is Random" for some proposition P. For example, if you ask "Are you False?", and the god answers "Ja", then you have determined beyond any possible doubt that it is that case that either "ja" means "no" or the god you asked the question is Random.

To illustrate how this sort of data can be enough, et me describe a simpler but closely related riddle:

The king has three daughters. The oldest never lies, the youngest never tells the truth, and the middle daughter answers "yes" or "no" to any question asked of her completely at random, without any regard to the question asked. It's doubtful that she even understands language. She's generally regarded as completely insane.

Now, the king promised the hero the hand of one of his daughters, of the hero's choice, and also promised that he would get a chance to meet and talk with them before making that choice. The hero thinks that marrying either the oldest or youngest would be okay, but doesn't want the insane one. But the king has gotten worried about ever marrying her off, so he's meeting his promises in the barest possible way: the hero will be shown into a room where all three princesses are standing in a row, and he will be allowed to ask one yes/no question of one princess. Not one question per princess, not one question that all three princesses will answer. One question, one answer. Once the princess answers, the hero will have to make his choice. The hero knows all of the above. How does he avoid marrying the middle daughter?

The marvelous thing about this riddle is that it's very easy to convince yourself that it's completely impossible. No matter what answer you get, it might be from the random princess, in which case it gives you no information at all, right? But it can be done. The main thing you have to realize is that, because you can't tell if the princess you're addressing is the random one or not, you should under no circumstances marry her. You need a question that lets you choose between the two princesses you don't ask. That way, if you ask the random daughter, it doesn't matter which of the other two you pick!

Anyway, I haven't worked out the details yet, but I can imagine similar tricks working here. The main goal of the first question would be to just find one god who isn't Random, and the remaining questions would be addressed to that god.
posted by baf at 8:04 PM on November 9, 2015 [4 favorites]


I rot-13'd my answer to baf's puzzle:

"Cevaprff N: vs V nfxrq Cevaprff O vs fur'f vafnar, jbhyq fur fnl lrf?"

Vs Cevaprff N vf noyr gb nafjre gur dhrfgvba, gura Cevaprff O vf abg vafnar.
posted by rifflesby at 9:13 PM on November 9, 2015


Very nice, baf! I put my answer on pastebin (let me know if it's confusing!), and will now go check out rifflesby's rot13 to see if we came up with similar/same solutions.

Regarding the original link did we clarify 256's point above, re the Random god? Is the Random god either a truthteller or a liar, randomly, or does the Random god simply answer ja or da randomly, like the princess problem?
posted by taz at 4:46 AM on November 10, 2015


baf, that puzzle is pretty much described in the original post.
posted by salmacis at 6:28 AM on November 10, 2015


taz, that answer doesn't seem to work. If you ask the liar, she'll say "no" in either situation and that doesn't give you enough information to tell which of the others is safe to marry.

I made a faulty assumption for some reason. The problem doesn't say the princesses can only answer yes or no, which is why rifflesby's solution works.
posted by straight at 11:32 AM on November 10, 2015


Ya'll are brutalizing the concept of a "truth value". The truth value of a statement is based on whether or not the statement can, in premise, be true. Not whether or not it actually IS true.

Any yes or no question has a "truth value", regardless of whether the answer is yes or no. A truth value doesn't have a value itself, it just exists or it doesn't.

"God exists" has a truth value, even if you don't know the answer.

But the entire concept is that you can progress from a statement regardless of whether or not you know the answer. It's one of the most basic logical tools... the concept of "if P then Q" doesn't exist unless P has a truth value. If P doesn't have a truth value then there's no concept of "if P" to proceed from.
"Another way to think of it is: the truth value of the statement "you are a knight" is equal to the truth value of the statement "Pluto is a dwarf planet" - either both are true OR both are false."
That's not a "truth value", what you're looking for is "truth". These are two inherently different things.
If it's truth you're interested in, Doctor Tyree's Philosophy
class is right down the hall.
posted by Blue_Villain at 1:04 PM on November 10, 2015


The truth value of a statement is based on whether or not the statement can, in premise, be true. Not whether or not it actually IS true.

So a statement without truth value is one that can neither be false nor true? So a nonsense statement? What's an example of a statement without truth value?
posted by straight at 3:55 PM on November 10, 2015




Oh. I failed reading comprehension. The puzzle does say that only yes or no answers are allowed, so rifflesby's solution probably doesn't work, but that one from 256 does.

But 256 made me realize there's another answer that's a little simpler.
posted by straight at 9:04 AM on November 11, 2015 [3 favorites]


OK, I think I've got a solution that has the following advantages:
It makes no assumptions about how Random operates, and will work even in the least-information case, where Random completely ignores what is being asked.
It does not rely on trying to ask questions that the gods may not be able to answer without logical contradiction.
The questions are in plain English, without any messy biconditionals or order-of-evaluation problems.
It does not in any sense involve trying to "gain multiple bits of information from a single statement", as graymouser put it. The information you gain from each question is in fact very simple: the first question tells us the answer to the question "Which of B and C isn't Random?", the second tells us "Is that god True or False?", and the third tells us "Is A Random?" -- which, put together, is enough to identify all three gods.

My questions do, however, lean heavily on hypotheticals about what the people would answer to other questions. I haven't seen any objection to such things here, but I've seen people complain about them in connection with other logic puzzles in the past. Well, you can't please everybody.

So, here are my questions:

1. Ask A: If I were to ask the other two gods "Do you exist?", would B be more likely than C to answer "ja"?

("Do you exist?" is just meant to be a trivial question whose correct answer is obviously "yes". You can substitute some other question if you prefer.)

To explain how this works, let's for the moment forget about True and False and instead classify the gods as "the god who responds 'ja' when the true answer is 'yes'" and "the god who responds 'da' when the true answer is 'yes'" -- call them "Ja-for-yes" and "Da-for-yes" for short. Maybe Ja-for-yes is True and Da-for-yes is False, maybe the other way around. But for the moment, the concepts of Ja-for-yes and Da-for-yes are more useful.

If A is Ja-for-yes, the other two gods are Da-for-yes and Random. Da-for-yes definitely would not respond "ja" to the trivial question, but Random might. So the true answer to Question 1 would be "no" if B is not Random and "yes" if C is not Random. A, being Ja-for-yes, will reply "da" if B is not Random and "ja" if C is not Random.

If A is Da-for-yes, the other two gods are Ja-for-yes and Random. Ja-for-yes will definitely respond "ja" to the trivial question, but Random might not. So the correct answer to question 1 would be "yes" if B is not Random and "no" if C is not Random. A, being Da-for-yes, will reply "da" if B is not Random and "ja" if C is not Random.

If A is Random, then neither B nor C is Random. So if A responds "da", then B is not random (and neither is C), and if A responds "ja", then C is not random (and neither is B).

In all three cases, if A answers "da", then B is not random, and if A answers "ja", then C is not random. Whichever god you've identified as non-random gets the next two questions.

2. Does "ja" mean "yes"?

If "ja" means"yes", then the true answer to this question is "yes", which is to say, "ja". If "ja" means "no", then the true answer is "no", which is to say "ja". So no matter what "ja" means, the true answer is "ja". If the god responds "ja", then that god is True, and if "da", then False.

So now you know whether the god you're addressing is True or False.

3. If I were to ask you "Is A Random?", would you answer "ja"?

"Would you answer 'ja' to question X" is a way to get information without knowing what "ja" and "da" mean. If the correct answer to X is "yes", then True would honestly answer "ja", meaning either "Yes, I would answer 'yes'" or "No, I would not answer 'no'". If the correct answer is "no", then True would answer "da", meaning either "Yes, I would answer 'no'" or "No, I would not answer 'yes'". False would give exactly the opposite answer to X, but if asked "Would you answer 'ja' to X?", will lie about what that answer would be. The two lies effectively cancel out, producing the same answers as True. So either way, "ja" tells you that A is Random and "da" tells you that A is not Random.

I'm a little unsatisfied with the last question, because it doesn't take advantage of the information gained in question 2. I feel like there must be a more elegant question that gives you the same information if you know whether you're talking to True or False but still don't know what 'ja' and 'da' mean.

And incedentally, it's essential that you don't learn what 'ja' and 'da' means. There are six permutations of the identites of the gods; combine that with the two possible meanings of 'ja' and you have twelve possible combinations. But three yes/no questions is only enough to distinguish between eight possibilities.

Now to read the article!
posted by baf at 11:21 AM on November 11, 2015 [7 favorites]


baf: you have me convinced! Those are great questions and I actually particularly like the last one. It also never occurred to me that trying to figure out the meanings of ja and da was a dead end.
posted by 256 at 2:13 PM on November 11, 2015


baf, I don't know if you would find this more satisfying, but you could also ask your first question twice, the second time to the god you've identified as non-random. That tells you which god is random and then you finish with the beautiful, "Does ja mean yes?" to distinguish between the other two.
posted by straight at 8:04 PM on November 11, 2015


I also thought of another answer to the princess puzzle which works the same basic way as the others but is, I think, the most elegant and doesn't require knowledge about their ages (that the truthful princess is older, etc.).
posted by straight at 8:08 PM on November 11, 2015 [1 favorite]


So a statement without truth value is one that can neither be false nor true? So a nonsense statement?
Not a nonsense statement, just one that can neither be factually true or false;
What's an example of a statement without truth value?
Green is the best color. Jones deserved the win more than Smith. George is the strangest person I've ever met.

None of these things refer to objective truths, thus they do not have truth values.
posted by Blue_Villain at 2:12 PM on November 12, 2015


Blue_Villain, if I understand you correctly, you are claiming that the question "Does statement X have a truth value?" uses the term properly, but the questions "What is the truth value of statement X?", "Is the truth value of statement X true or false?", and "Is the truth value of statement X the same as the truth value of statement Y?" do not.

If so, I think you are mistaken. Just googling the phrase "truth value" yields no sources that agree with you and a whole page of sources that agree with everyone else on this thread: that "true" and "false" are truth values, and that if a statement has a truth value, then its truth value is either "true" or "false". And these are not just random internet commenters; the top hits are all from various encyclopedias and university logic departments.
posted by baf at 11:15 AM on November 14, 2015


« Older "with the door locked; because of the morals of...   |   "We were to become paymasters for the CIA around... Newer »


This thread has been archived and is closed to new comments