The Castle Gate Keeper
To open the GATE, both the LEVER and the KEY must be active, but the GUARD must not be present. The BELL rings if the LEVER is pulled without the KEY.
Replay this puzzle All puzzles
The truth table
Inputs on the left, outputs on the right. A circuit solves the puzzle when it reproduces every row.
| LEVER | KEY | GUARD | GATE | BELL |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 0 | 0 |
| 0 | 1 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 | 0 |
| 1 | 0 | 0 | 0 | 1 |
| 1 | 0 | 1 | 0 | 1 |
| 1 | 1 | 0 | 1 | 0 |
| 1 | 1 | 1 | 0 | 0 |
What the table tells you
- GATE is 1 in 1 of the 8 rows, so it is a single AND-shaped condition: one exact combination of the inputs. Every input matters: for each one there is a row where flipping it changes GATE. The rows that turn it on: LEVER=1, KEY=1, GUARD=0.
- BELL is 1 in 2 of the 8 rows. It does not depend on GUARD at all: flipping it never changes the output, so any gate reading it is wasted. The rows that turn it on: LEVER=1, KEY=0, GUARD=0; LEVER=1, KEY=0, GUARD=1.
The smallest known circuit: 5 gates
As a formula, one line per output:
GATE = ((LEVER AND KEY) AND NOT GUARD)BELL = (LEVER AND NOT KEY)
As a netlist, in the order you would wire it. Each g is one gate; the last lines say which signal drives each output.
g1 = LEVER AND KEYg2 = NOT GUARDg3 = NOT KEYg4 = g1 AND g2g5 = LEVER AND g3GATE = g4BELL = g5
The search ran out of budget before it could rule out every smaller circuit, so 5 is the best anyone found, not a proof. If you build it in fewer, the leaderboard records it. Gates that do not feed an output are never counted.
Leaderboard for the day
Nobody posted a result on the day. The circuit above is the reference.
← #14 The Baker's Scone Alert · #16 The Space Station Oxygen Scrubber →