4 ms·
> Example 2: A says: "I am a knave, but B isn't." > (...code here...) > > Thus, in this example, both A and B are knaves. Under the premise that knaves alwa
by ThePadawan 7y ago
> Example 2: A says: "I am a knave, but B isn't."
> (...code here...)
>
> Thus, in this example, both A and B are knaves.
Under the premise that knaves always lie, if A is a knave, then their statement "I am a knave" must have been a lie, thus this solution cannot be correct.
- timon999 7y agoA isn't making two statements. The (single) statement "I am a knave, but B isn't." is a conjunction that is false because it's right hand side is false.
- ThePadawan 7y agoThank you for the clarification! Still, makes me think that this could have been stated clearly instead of relying on the reader interpreting it in that manner.
- carapace 7y agoI find the biggest challenge with these kinds of logic puzzles is in translating from the English (or other human language) into symbolic logic. It's not well-documented and bug-prone. Er, (not well-documented) /\ bug-prone. Not (not (well-documented /\ bug-prone)). Like the famous Two Guardians riddle: one always lies, the other always tells the truth, you get one question, etc. There's a translation that starts "You have a wire and a NOT gate..." in which the puzzle becomes blindingly obvious. (Details omitted so as not to spoil the puzzle for anyone.) Once you have developed a facility with the special jargon of logic puzzles and know Prolog, I've found that, while some puzzles become boring ( https://swish.swi-prolog.org/p/Boring%20Sudoku.swinb https://swish.swi-prolog.org/p/Boring%20Sudoku.swinb ), many are still interesting as an art form, much like le demo scene you could imaging puzzle scene and not be too far off metaphorically.