The Workshop Alarm
A master craftsman needs his ALARM to sound if either the POWER is on or the DRILL is active, but only when the SAFETY switch is not engaged. The ALARM triggers if (POWER OR DRILL) is true and SAFETY is false.
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.
| POWER | DRILL | SAFETY | ALARM |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 0 |
| 0 | 1 | 0 | 1 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 0 | 1 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 1 |
| 1 | 1 | 1 | 0 |
What the table tells you
- ALARM is 1 in 3 of the 8 rows. Every input matters: for each one there is a row where flipping it changes ALARM. The rows that turn it on: POWER=0, DRILL=1, SAFETY=0; POWER=1, DRILL=0, SAFETY=0; POWER=1, DRILL=1, SAFETY=0.
The smallest known circuit: 3 gates
As a formula, one line per output:
ALARM = ((POWER OR DRILL) AND NOT SAFETY)
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 = POWER OR DRILLg2 = NOT SAFETYg3 = g1 AND g2ALARM = g3
The search ran out of budget before it could rule out every smaller circuit, so 3 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.