The Lighthouse Fog Warning
If the FOG is low and the LIGHT is off, the ALARM must trigger. The ALARM also sounds if the LIGHT is on but the FOG is high.
Replay this puzzle All puzzles
The truth table
Inputs on the left, the output on the right. A circuit solves the puzzle when it reproduces every row.
| FOG | LIGHT | ALARM |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
What the table tells you
- ALARM is 1 in 2 of the 4 rows, a balanced function, which is what XOR-like and single-input-like rules look like. Every input matters: for each one there is a row where flipping it changes ALARM.
The smallest known circuit: 2 gates
As a formula, one line per output:
ALARM = ((NOT FOG AND NOT LIGHT) OR (LIGHT AND FOG))
As a netlist, in the order you would wire it. Each g is one gate; the last line says which signal drives the output.
g1 = NOT FOGg2 = LIGHT XOR g1ALARM = g2
The search checked every circuit with fewer gates and none matches the table, so 2 is the true minimum for the allowed gate set. 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.
← #41 Bank Vault Breach Protocol · #43 Submarine Sonar Sweep →