The Coffee Machine Brew
When COFFEE and WATER are both active, the BREW light shines, but only if the STEAM is not present. The ALERT light activates whenever either COFFEE or STEAM is missing.
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.
| COFFEE | WATER | STEAM | BREW | ALERT |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 1 |
| 0 | 0 | 1 | 0 | 1 |
| 0 | 1 | 0 | 0 | 1 |
| 0 | 1 | 1 | 0 | 1 |
| 1 | 0 | 0 | 0 | 1 |
| 1 | 0 | 1 | 0 | 0 |
| 1 | 1 | 0 | 1 | 1 |
| 1 | 1 | 1 | 0 | 0 |
What the table tells you
- BREW 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 BREW. The rows that turn it on: COFFEE=1, WATER=1, STEAM=0.
- ALERT is 1 in 6 of the 8 rows. It does not depend on WATER at all: flipping it never changes the output, so any gate reading it is wasted.
The smallest known circuit: 4 gates
As a formula, one line per output:
BREW = ((COFFEE AND WATER) AND NOT STEAM)ALERT = (NOT COFFEE OR NOT STEAM)
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 = COFFEE AND WATERg2 = COFFEE AND STEAMg3 = NOT g2g4 = g1 AND g3BREW = g4ALERT = g3
The search checked every circuit with fewer gates and none matches the table, so 4 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.
← #43 Submarine Sonar Sweep · #45 The Greenhouse Nutrient Pump →