Logic Puzzles

Cheryl’s Birthday Problem Epistemic Logic, Modal Reasoning, and Backward Elimination

⚖ THE PUZZLE CHALLENGE

The Singapore Olympiad Epistemic Enigma

Albert and Bernard have just met Cheryl and want to know her birthday. Cheryl presents a list of 10 candidate dates: May 15, May 16, May 19, June 17, June 18, July 14, July 16, August 14, August 15, August 17. Cheryl whispers the month secretly to Albert, and the day secretly to Bernard. The following dialogue ensues:
Albert: “I don’t know when Cheryl’s birthday is, but I know that Bernard doesn’t know either.”
Bernard: “At first I didn’t know, but now I know.”
Albert: “Then I also know when Cheryl’s birthday is.”
What is the exact date of Cheryl’s birthday?

When Problem 24 from the Singapore and Asian Schools Math Olympiad (SASMO 2015) leaked online, it ignited an international debate. Casual solvers found the dialogue contradictory; to mathematicians, it was a textbook demonstration of Epistemic Modal Logic—the mathematical study of knowledge states, knowledge about another agent’s knowledge, and dynamic state-space pruning.

1. Epistemic Modal Logic and Kripke Semantics

To solve the problem with absolute mathematical rigor, we define an epistemic model using Kripke semantics. Let the set of possible worlds be the Cartesian domain of valid dates: \( W = \{w_1, w_2, \dots, w_{10}\} \), where each world \( w = (m, d) \) represents an ordered pair of month \( m \in \{ ext{May}, ext{June}, ext{July}, ext{August}\} \) and day \( d \in \{14, 15, 16, 17, 18, 19\} \).

We define knowledge operators for agents Albert (\( K_A \)) and Bernard (\( K_B \)). In epistemic modal logic, the formula \( K_i \phi \) denotes “Agent \( i \) knows proposition \( \phi \)”. The accessibility relation \( \sim_i \) partitions the set of worlds into equivalence classes representing indistinguishable states for agent \( i \):

  • Albert knows only the month: \( (m_1, d_1) \sim_A (m_2, d_2) \iff m_1 = m_2 \). Albert’s information partition is:
    $$[\text{May}] = \{15, 16, 19\}, \quad [\text{June}] = \{17, 18\}, \quad [\text{July}] = \{14, 16\}, \quad [\text{August}] = \{14, 15, 17\}$$
  • Bernard knows only the day: \( (m_1, d_1) \sim_B (m_2, d_2) \iff d_1 = d_2 \). Bernard’s information partition is:
    $$[14] = \{\text{Jul}, \text{Aug}\}, \quad [15] = \{\text{May}, \text{Aug}\}, \quad [16] = \{\text{May}, \text{Jul}\}, \quad [17] = \{\text{Jun}, \text{Aug}\}, \quad [18] = \{\text{Jun}\}, \quad [19] = \{\text{May}\}$$

2. The State Space Matrix and Frequency Distribution

We visualize the 10 candidate worlds across months and days in the following scenario matrix:

Day Number (\(d\)) May June July August Day Frequency (\(|\sim_B|\))
14 — — July 14 August 14 2 (Ambiguous)
15 May 15 — — August 15 2 (Ambiguous)
16 May 16 — July 16 — 2 (Ambiguous)
17 — June 17 — August 17 2 (Ambiguous)
18 — June 18 — — 1 (Unique!)
19 May 19 — — — 1 (Unique!)

3. Mathematical Elimination Step 1: Albert’s First Assertion

Albert makes a two-part compound statement: “I don’t know when Cheryl’s birthday is, but I know that Bernard doesn’t know either.”

In formal epistemic syntax: \(
eg K_A (w) \wedge K_A (
eg K_B (w)) \).

The first clause, \(
eg K_A (w) \), is trivially true for all candidate months because every month contains at least two possible days (May has 3, June has 2, July has 2, August has 3). No month uniquely identifies the date on its own.

The crucial inferential power lies in the second clause: \( K_A (
eg K_B (w)) \)—”Albert knows with certainty that Bernard does not know the birthday.” How could Bernard know the birthday immediately upon receiving his number? Bernard could only know if the day given to him appeared exactly once in the entire candidate set! Looking at the matrix:

  • Day 18 appears exclusively in June (June 18). If Bernard had 18, he would know the birthday instantly.
  • Day 19 appears exclusively in May (May 19). If Bernard had 19, he would know the birthday instantly.

If Albert had been given the month May, it would be possible that the day was 19, in which case Bernard would know. Albert could not claim with certainty that Bernard does not know. Similarly, if Albert had been given June, it would be possible that the day was 18. The fact that Albert is 100% certain that Bernard is ignorant proves that Albert’s month cannot be May and cannot be June!

\( W_1 = W \setminus \{ ext{May}, ext{June}\} = \{ ext{July 14}, ext{July 16}, ext{August 14}, ext{August 15}, ext{August 17}\} \)

4. Mathematical Elimination Step 2: Bernard’s Epistemic Update

Bernard listens to Albert’s public statement. Bernard is an optimal rational agent possessing full access to the deductive logic applied in Step 1. Bernard immediately performs the same elimination: he deduces that May and June are impossible.

Bernard now declares: “At first I didn’t know, but now I know.”

In formal syntax: \(
eg K_{B, t_0} (w) \wedge K_{B, t_1} (w) \). Bernard’s knowledge state has transitioned from ignorance to certainty within the restricted state space \( W_1 \). For Bernard to know the exact date, his day number must appear exactly once within the remaining five candidates:

  • If Bernard holds day 14, the possible remaining worlds are July 14 and August 14. Bernard would still be in a state of uncertainty!
  • If Bernard holds day 15, the only remaining world is August 15.
  • If Bernard holds day 16, the only remaining world is July 16.
  • If Bernard holds day 17, the only remaining world is August 17.

Because Bernard asserts that he now knows, day 14 is eliminated! The remaining state space contracts to precisely three possible dates:

\( W_2 = W_1 \setminus \{d = 14\} = \{ ext{July 16}, ext{August 15}, ext{August 17}\} \)

5. Mathematical Elimination Step 3: Albert’s Concluding Revelation

Albert now speaks for the second time: “Then I also know when Cheryl’s birthday is.”

Albert’s information partition is based on months. He observes the remaining three worlds in \( W_2 \):

  • If Albert holds the month August, there are two remaining candidate dates: August 15 and August 17. Albert would be unable to distinguish between them!
  • If Albert holds the month July, there is exactly one candidate date remaining: July 16.

Because Albert can assert with complete certainty that he knows, his secret month must be July. The unique, deterministic solution is:

Cheryl’s Birthday is July 16.

6. Public Announcements in Multi-Agent Epistemology

Cheryl’s Birthday is a prime pedagogical model for Public Announcement Logic (PAL), a subfield of theoretical computer science and game theory. In PAL, a truthful public announcement \( !\psi \) does not merely convey information; it dynamically prunes the Kripke frame by restricting accessibility relations to sub-models satisfying \( \psi \).

When an agent says “I don’t know,” that statement appears to convey negative information (an absence of knowledge). However, in multi-agent distributed systems, the public announcement of an agent’s ignorance acts as a powerful constraint that collapses the possibility space for other observing agents. This phenomenon forms the foundational basis of cryptographic key exchange, distributed consensus protocols (such as Paxos and Raft), and Byzantine fault tolerance.

7. Dynamic Epistemic Logic (DEL) and Kripke Frame Transitions

In modern formal logic, Cheryl’s Birthday is analyzed through Dynamic Epistemic Logic (DEL) utilizing product update operators. Let $\mathcal{M} = (W, \sim_A, \sim_B, V)$ be the initial epistemic Kripke model containing the 10 candidate worlds. Each public utterance by Albert and Bernard is modeled as an action model $\mathcal{E}$ that induces an epistemic update:

\mathcal{M}’ = \mathcal{M} \otimes \mathcal{E}

Albert’s first statement acts as an epistemic filter, eliminating any world $w$ where the equivalence class $[w]_A$ contains a world $w’$ that is a singleton under Bernard’s accessibility relation $[w’]_B$. Bernard’s subsequent statement eliminates any world $w$ that is not a singleton in the updated frame. Finally, Albert’s second announcement eliminates any world that is not a singleton under the second updated frame. DEL proves that the solution July 16 is the unique invariant survivor of these iterated modal frame projections.

8. Complexity Analysis of Multi-Agent Communication Protocols

Cheryl’s Birthday illustrates how distributed agents coordinate belief states over minimal communication channels. In theoretical computer science, evaluating whether a specific property $\phi$ can become common knowledge across $n$ communicating processes is PSPACE-complete. The problem proves that structured communication protocols can transmit complex state updates without transmitting the raw data itself, illustrating the core mechanics of epistemic coordination in distributed systems.

JV

Hollie Lewis

Lead Puzzle Analyst & Chief Editor

Lead Puzzle Analyst & Chief Editor at PuzzleArena. Specializes in decision theory, Bayesian probability, and axiomatic logic.