The Greenhouse Frost Alert
In the greenhouse, the ALARM sounds if COLD is true and either HEAT or HUMID is true. The system stays silent otherwise.
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.
| COLD | HEAT | HUMID | ALARM |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 0 |
| 0 | 1 | 0 | 0 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 0 | 0 |
| 1 | 0 | 1 | 1 |
| 1 | 1 | 0 | 1 |
| 1 | 1 | 1 | 1 |
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: COLD=1, HEAT=0, HUMID=1; COLD=1, HEAT=1, HUMID=0; COLD=1, HEAT=1, HUMID=1.
The smallest known circuit: 3 gates
As a formula, one line per output:
ALARM = (COLD AND (HEAT OR HUMID))
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 = COLD NAND HEATg2 = COLD NAND HUMIDg3 = g1 NAND g2ALARM = g3
The search checked every circuit with fewer gates and none matches the table, so 3 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.