Lesson goal: The four-statement truth and liar puzzle

Previous: The Goldbach partition gap on 126 | Home | Next: Introduction

In the 1978 MAA Annual High School Mathematics Examination (Problem #22), students encountered this self-referential logic puzzle:

"The following four statements, and only these, are found on a card:
  • Statement 1: On this card exactly one statement is false.
  • Statement 2: On this card exactly two statements are false.
  • Statement 3: On this card exactly three statements are false.
  • Statement 4: On this card exactly four statements are false.
(Assume each statement on the card is either true or false.) Among them the number of false statements is exactly: (A) 0 (B) 1 (C) 2 (D) 3 (E) 4."


Let's analyze this using pure logic:
  1. Can two or more statements be true at the same time?
    No! Each statement claims a different number of false statements (1, 2, 3, or 4). Because the actual number of false statements on the card can only be a single number, at most one statement can be true.
  2. Can all four statements be false?
    If all four statements were false, the count of false statements would be 4. But if exactly 4 statements are false, then Statement 4 ("On this card exactly four statements are false") would be TRUE! That contradicts our assumption that all four are false.
Therefore:
  • Exactly one statement on the card must be true.
  • The other $4 - 1 = 3$ statements must be false!
  • Looking at the card, which statement asserts that exactly 3 statements are false? Statement 3!
Thus, Statement 3 is the only true statement, and the number of false statements is exactly 3.

In this lesson, we write a truth-table program in Lua to test all $2^4 = 16$ possible truth value assignments, verify self-consistency, and solve logic puzzles with code!

Now you try. Replace ???? with 3 and run the code to verify that exactly 3 statements are false.

Type your code here:


See your results here: