The Automated Sorter Machine
In the sorting room, the SORT signal turns on only if both COIN and SCALE are active, but not when the JAM sensor is triggered. The ERROR light must activate whenever either the JAM sensor or the COIN input fails to match the SCALE status.
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.
| COIN | SCALE | JAM | SORT | ERROR |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 1 |
| 0 | 0 | 1 | 0 | 0 |
| 0 | 1 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 | 1 |
| 1 | 0 | 0 | 0 | 0 |
| 1 | 0 | 1 | 0 | 1 |
| 1 | 1 | 0 | 1 | 1 |
| 1 | 1 | 1 | 0 | 0 |
What the table tells you
- SORT 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 SORT. The rows that turn it on: COIN=1, SCALE=1, JAM=0.
- ERROR is 1 in 4 of the 8 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 ERROR. The rows that turn it on: COIN=0, SCALE=0, JAM=0; COIN=0, SCALE=1, JAM=1; COIN=1, SCALE=0, JAM=1; COIN=1, SCALE=1, JAM=0.
The smallest known circuit: 14 gates
As a formula, one line per output:
SORT = ((COIN AND SCALE) AND NOT JAM)ERROR = (JAM XOR NOT (COIN XOR SCALE))
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 = COIN NAND SCALEg2 = JAM NAND JAMg3 = SCALE NAND SCALEg4 = COIN NAND COINg5 = g1 NAND g1g6 = COIN NAND g3g7 = SCALE NAND g4g8 = g5 NAND g2g9 = g6 NAND g7g10 = g8 NAND g8g11 = g9 NAND g9g12 = JAM NAND g9g13 = g2 NAND g11g14 = g12 NAND g13SORT = g10ERROR = g14
The search ran out of budget before it could rule out every smaller circuit, so 14 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.
← #30 The Spaceship Cargo Lock · #32 Garden Sprinkler Schedule →