August 6, 2025 in PuzzlOR

Who is Guilty in the Land of Alice? Only the Model Knows

An Example of Boolean Logic from AI

SHARE: PRINT ARTICLE:print this page https://doi.org/10.1287/LYTX.2025.03.16

Arguably, we are in the third artificial intelligence (AI) wave impacting supply chain management (SCM), the first being in the 1980s. To understand the potential value of AI in SCM, it is critical to understand it within the evolution of information and decision technology and recognize it is a moving target. A critical part of the AI wave in the 1980s was logical inference. These methods are making a quiet comeback as limits of pure large language models (LLMs) become apparent. The purpose of this article is to present an entertaining puzzle from the 1980s that illustrates the power of logical Boolean inference.

The Puzzle

The following logic puzzle is adapted from Raymond Smullyan’s book “Alice in Puzzle-Land.” The jam had been stolen, and the three suspects are the March Hare, the Mad Hatter and the Dormouse. It is possible none of them stole the jam or any combination of them (including all three) stole the jam. 

They were all initially arrested, and each made one statement.

  • March Hare: I am not guilty.
  • Mad Hatter: I am not guilty.
  • Dormouse: At least one of the others speaks the truth.

Further investigation produced the following conclusions (facts known to be true).

  1. Only one of the suspects is guilty.
  2. The March Hare and Dormouse did not both tell the truth.

With this information, the challenge is to determine who is guilty, who is not guilty or whether we lack sufficient information to make a clear determination. We will first outline the process without explicit use of binary computations and then demonstrate this fun and powerful computational approach.

The Solution Process 

Step 1: Identify All Possible Solutions

In “math-speak,” this is a “state-space.” Table 1 shows the eight possible solutions ranging from all of them being not guilty (Option 1) to all of them being guilty (Option 8). There is one row for each option and one column for each character, where the value in the cell is the “guilt status” of this character in this option. A character can be “not guilty” (0) or guilty (1). The column “Option status” indicates whether, given the information available, this option is still possible (1) or has been moved to “not possible” (0). For now, all eight options are possible.

Our goal is to use the clues to move as many options as we can from the “possible state (1)” to the “not possible state (0).” If, after using all the information from our clues, we can have only one option left as possible (1), then we will know which characters stole the jam and have solved the mystery.

Table 1: Initial State Space of Guilty and Not Guilty Options with Current Status of Each Option (not possible or possible)
Option MARCH_HARE MAD_HATTER DOOR_MOUSE Option Status
001 NOT GUILTY NOT GUILTY NOT GUILTY possible
002 NOT GUILTY NOT GUILTY GUILTY possible
003 NOT GUILTY GUILTY NOT GUILTY possible
004 NOT GUILTY GUILTY GUILTY possible
005 GUILTY NOT GUILTY NOT GUILTY possible
006 GUILTY NOT GUILTY GUILTY possible
007 GUILTY GUILTY NOT GUILTY possible
008 GUILTY GUILTY GUILTY possible


Step 2: Use Fact 1 to Move Options from Possible to Not Possible

Fact 1 states exactly one suspect is guilty. How can we use information to eliminate some options as possible? Only an option (row) with one value of “guilty” fits this fact. These options are 2, 3 and 5, as indicated in Table 2. Options 1, 4, 6, 7 and 8 are now classified as not possible.

Table 2: State Space of Guilty and Not Guilty Option Status after Applying Fact 1 (Only one character is guilty)
Option MARCH_HARE MAD_HATTER DOOR_MOUSE Option Status Based on Fact 1
001 NOT GUILTY NOT GUILTY NOT GUILTY not possible
002 NOT GUILTY NOT GUILTY GUILTY possible
003 NOT GUILTY GUILTY NOT GUILTY possible
004 NOT GUILTY GUILTY GUILTY not possible
005 GUILTY NOT GUILTY NOT GUILTY possible
006 GUILTY NOT GUILTY GUILTY not possible
007 GUILTY GUILTY NOT GUILTY not possible
008 GUILTY GUILTY GUILTY not possible


Step 3: Use Fact 2 to Move Options from Possible to Not Possible – More Complicated

Fact 2 states that the March Hare and Dormouse didn’t both tell the truth – this fact is met when:

  1. The March Hare has stated the truth and the Dormouse has lied.
  2. The March Hare has lied and the Dormouse has stated the truth.
  3. The March Hare has lied and the Dormouse has lied.

What is not possible is the fourth combination:

  1. The March Hare has stated the truth and the Dormouse has stated the truth.

Therefore, any combination that makes the statement of the March Hare true and the statement of the Dormouse true is eliminated. Table 3 summarizes this result.

Table 3: Which Combinations are Possible for Fact 2
March Hare Statement Dormouse Statement Status
True Lie possible
Lie True possible
Lie Line possible
True True not possible

Our next task is to determine which options make the March Hare statement true and which options make the Dormouse’s statement true! Table 4 extends Table 2 with columns on whether one of the eight options makes the March Hare statement true (Column 5) and the Dormouse statement true (Column 6).

Which options make the March Hare statement true? The March Hare stated he is not guilty; therefore, any option in which the March Hare is not guilty makes his statement true, and any option in which he is guilty makes his statement false. Column 5 in Table 4 tells us if this option makes the March Hare statement true.

  • March Hare statement true – Options 1, 2, 3 and 4 – value in March Hare column is “not guilty.”
  • March Hare statement false – Options 5, 6, 7 and 8 – value in March Hare column is “guilty.”

Which options make the Dormouse statement true? The Dormouse stated, “At least one of the others speaks the truth.” The others are the March Hare and Mad Hatter. Each stated he was not guilty. Therefore, any option in which the March Hare is not guilty, the Mad Hatter is not guilty or both are not guilty makes the Dormouse statement true. However, if both are guilty, then the Dormouse statement is false. Column 6 in Table 4 classifies each option.

  • Dormouse statement true – Options 1, 2, 3, 4, 5 and 6
  • Dormouse statement false – Options 7 and 8 – the value in the March Hare column and Mad Hatter column for these options is “guilty”

Apply Fact 2 to move options from possible to “not possible.” Fact 2 states the March Hare and Dormouse both didn’t tell the truth. Any option in which the statement by the March Hare and Dormouse both are true is not permitted based on Fact 2. Column 7 in Table 4 has “yes” if both are true and “no” otherwise. The last column shows whether this option is possible based on just Fact 2 – Options 5, 6, 7 and 8 are possible – because the value in Column 7 is “no.”

Table 4: Which options are still possible after applying Fact 2?

Option

MARCH_HARE

MAD_HATTER

DORMOUSE

Whether this option makes the March Hare statement true or false

Whether this makes the Dormouse statement true or false

March Hare and Dormouse statements both true

Option 2 status based on Fact 2 – If the statements by the March Hare and Dormouse are both true, then this option is not possible

001

NOT GUILTY

NOT GUILTY

NOT GUILTY

True

True

yes

not possible

002

NOT GUILTY

NOT GUILTY

GUILTY

True

True

yes

not possible

003

NOT GUILTY

GUILTY

NOT GUILTY

True

True

yes

not possible

004

NOT GUILTY

GUILTY

GUILTY

True

True

yes

not possible

005

GUILTY

NOT GUILTY

NOT GUILTY

False

True

no

possible

006

GUILTY

NOT GUILTY

GUILTY

False

True

no

possible

007

GUILTY

GUILTY

NOT GUILTY

False

False

no

possible

008

GUILTY

GUILTY

GUILTY

False

False

no

possible

The March Hare’s statement is “I am not guilty.”

The Dormouse’s statement becomes “At least one of the other two (March Hare and Mad Hatter) is not guilty.”

Fact 2 says at least one of the two (March Hare and Mad Hatter) is lying.

 

Step 4: Combine Information from Fact 1 and Fact 2 to Solve the Mystery

For a candidate to be guilty, the option must be possible under Fact 1 and Fact 2.

  • Table 2 identifies Options 2, 3 and 5 are possible based on Fact 1.
  • Table 4 identifies Options 5, 6, 7 and 8 are possible based on Fact 2.
Table 5: State Space of Guilty and Not Guilty Option Status after Applying Fact 1 and Fact 2
Option MARCH_HARE MAD_HATTER DOOR_MOUSE Option Status based on Fact 1 Option Status based on Fact 2 Option Status based on Fact 1 and Fact 2 possible
001 NOT GUILTY NOT GUILTY NOT GUILTY not possible not possible not possible
002 NOT GUILTY NOT GUILTY GUILTY possible not possible not possible
003 NOT GUILTY GUILTY NOT GUILTY possible not possible not possible
004 NOT GUILTY GUILTY GUILTY not possible not possible not possible
005 GUILTY NOT GUILTY NOT GUILTY possible possible possible
006 GUILTY NOT GUILTY GUILTY not possible possible not possible
007 GUILTY GUILTY NOT GUILTY not possible possible not possible
008 GUILTY GUILTY GUILTY not possible possible not possible

Table 5 adds one column to Table 2 with the possible/not possible status based on Fact 2. The only option in the possible lists for Fact 1 and Fact 2 is Option 5 – the March Hare is guilty and the other two characters not guilty. The mystery is solved – the March Hare stole the jam and acted alone. 

What is a Computational Method to Solve the Mystery?

The Binary/Boolean Computational Model

Mathematical models much prefer numbers over characters. A favorite approach to problems like our mystery in which there are two possible states for a value (true/false, not guilty/guilty, possible/not possible) is the use of the values 0 and 1 – referred to as Boolean, or binary. Here, we outline the use of this computational model approach to our puzzle using Array Programming Language with its general array structures and functions.

Step 1: Convert Table 1 to a Binary Table

Table 6 has the same information as Table 1, but in binary form. For the character columns, “0” is not guilty, and “1” is guilty. For the option status column, “0” is not possible, and “1” is possible.

Table 6: Initial State Space of Guilty and Not Guilty Options with Current Status in Binary or Boolean (0/1) form
Option MARCH_HARE MAD_HATTER DOOR_MOUSE Option Status
001 0 0 0 1
002 0 0 1 1
003 0 1 0 1
004 0 1 1 1
005 1 0 0 1
006 1 0 1 1
007 1 1 0 1
008 1 1 1 1
For each character row, 0 is not guilty, 1 is guilty.
For option status column, 0 is not possible, 1 is possible.

 

Step 2: Use Fact 1 to Move Options from Possible to Not Possible

Fact 1 states exactly one suspect is guilty. Computationally, this can be expressed as: If the sum of each row over the three characters is 1, then this option is possible (1). If not, “this option is not possible” (0). Table 7 shows these computations. There is a value of 1 in the option status column for Options 2, 3 and 5. In Table 2, these same options have the value “possible.”

Table 7: State Space of Guilty and Not Guilty Options after Fact 1, If sum is 1, still possible (1)
Option MARCH HARE MAD HATTER DOOR_MOUSE Sum of each row across Characters (Columns 2, 3 and 4) Option Status based on Fact 1
001 0 0 0 0 0
002 0 0 1 1 1
003 0 1 0 1 1
004 0 1 1 2 0
005 1 0 0 1 1
006 1 0 1 2 0
007 1 1 0 2 0
008 1 1 1 3 0
For each character row, 0 is not guilty, 1 is guilty.
For option status column, 0 is not possible, 1 is possible.
Fact 1: Only one character is guilty; Possible Options are those where the row sum is 1.


Step 3: Use Fact 2 to Move Options from Possible to Not Possible – A Tad More Complicated

Fact 2 states that the March Hare and Dormouse didn’t both tell the truth. This eliminates any option in which the March Hare and Dormouse are both telling the truth.

Which options make the March Hare statement true? March Hare stated he is not guilty. Any option in which the value in the March Hare cell is 0 is an option in which the March Hare has told the truth. These are Options 1, 2, 3 and 4. Table 8, Column 5 has this computation; the value of 1 indicates for this option that the March Hare is telling the truth.

Which options make the Dormouse statement true? Any option in which the March Hare and Mad Hatter are both guilty (1) makes the Dormouse statement not true. If we apply the logical operator “and” (˄) between the March Hare column and Mad Hatter column, any option with a 0 value is an option in which the Dormouse is telling the truth. This is shown in Column 6. We want 1 to be the value where the Dormouse is telling the truth. Column 7 has this value using Column 6 = 0. A value of 1 in Column 6 indicates this option has the Dormouse telling the truth (1 to 6); a 0 indicates the Dormouse is not telling the truth. 

Applying Fact 2 to move options from possible to not possible. Any option in which the statements by the March Hare and Dormouse are both true (value 1) is not permitted based on Fact 2. If Column 5 is 1 and Column 7 is 1, then the value in Column 8 is 0. Computationally, an option remains possible when {0 = (col_5˄col_7)}. Column 8 shows options still possible (value of 1): Options 5, 6, 7 and 8.

Table 8: Options Possible based on Fact 2 and Component Calculations
col_1 col_2 col_3 col_4 col_5 col_6 col_7 col_8
Option MARCH HARE MAD HATTER DOOR MOUSE Options make March Hare statement true (1) is (0 = col_1) March Hare and Mad Hatter both guilty  (col_2^col_3) Option makes Door Mouse Statement True, (col_6 = 0) Options possible with Fact 2, at least one is lying 0 = (March Hare True ^ Door Mouse True)
001 0 0 0 1 0 1 0
002 0 0 1 1 0 1 0
003 0 1 0 1 0 1 0
004 0 1 1 1 0 1 0
005 1 0 0 0 0 1 1
006 1 0 1 0 0 1 1
007 1 1 0 0 1 0 1
008 1 1 1 0 1 0 1
For each character row, 0 is not guilty, 1 is guilty.
For option status column, 0 is not possible, 1 is possible.
For statement false/true status, 0 is false, 1 is true.
Column 5 - March Hare stated he is not guilty (0), statement true (1) when value in March Hare col_2 is 0
Dormouse stated at least one of the group March Hare and Mad Hatter are not guilty, both cannot be guilty.
Column 6 is the logical and (^) applied to March Hare Column and Mad Hatter Column, 1 says both guilty.
Column 7, Dormouse statement is true when column 6 has value 0.
Column 8, option is possible if at least one is lying, 0 = col_5^col_7.


Step 4: Combine Information from Facts 1 and 2 to Solve the Mystery

For a candidate to be guilty, the option must be possible under Fact 1 and Fact 2. If we apply the logical operation and (^) between the last column of Table 7 (0 1 1 0 1 0 0 0) and the last column of Table 8 (0 0 0 0 1 1 1 1), then we get (0 0 0 0 1 0 0 0). This is summarized in Table 9.

Table 9: Guilty and Not Guilty Status from Fact 1 and Fact 2
Option MARCH_HARE MAD_HATTER DOOR_MOUSE Option status Fact 1 Option status Fact 2 Option status true for both facts, Fact 1^Fact 2
001 0 0 0 0 0 0
002 0 0 1 1 0 0
003 0 1 0 1 0 0
004 0 1 1 0 0 0
005 1 0 0 1 1 1
006 1 0 1 0 1 0
007 1 1 0 0 1 0
008 1 1 1 0 1 0
For each character row, 0 is not guilty, 1 is guilty.
For option status column, 0 is not possible, 1 is possible.

The 1 in the fifth position of Column 7 tells us this is the only option that is possible for Fact 1 (Table 7) and Fact 2 (Table 8). This is the computational method to determine which options are possible for both facts. 

This logic requires only a few lines of code in APL.

Logic for who is guilty using few lines of code in APL

Takeaway

Binary methods involve computations in which the only values permitted are 0 and 1. Although these methods date back to the 1960s, they are powerful in supporting the development of very helpful models that capture a diverse set of real-world situations in which the option is yes/no, on/off, success/failure … as well as solving fun puzzles.

Another powerful computational mechanism is vector of integers, but we’ll save this topic for another time.

Ken Fordyce

SHARE:

INFORMS site uses cookies to store information on your computer. Some are essential to make our site work; Others help us improve the user experience. By using this site, you consent to the placement of these cookies. Please read our Privacy Statement to learn more.