sarvesh.
P vs NP: Small Circuits

P vs NP: Small Circuits · Boolean circuits

Why two fixed rows force 29 gates

A straightforward 29-gate circuit answers all 131,072 inputs to this grid problem. Each of its six rows combines four incident lines with three OR gates and checks the point for that row with an AND. Could sharing wires elsewhere save one gate while two of those ordinary rows still reach the output?

Spend the budget on the untouched rows

Two standard rows account for eight distinct gates. Set the two point inputs that guard those rows to zero. Because the two row outputs were live, that restriction saves at least two more positions. A putative 28-gate solution must now compute the remaining four rows within 18 gates, even with the reusable wires the reduction grants it.

Cover every choice of rows

There are 15 ways to choose two rows from six. Across those choices, 494 sets of line inputs survived the preliminary reductions. Two exhaustive searches ruled out every one. That proves the restricted optimum is 29 and tells us exactly which layouts a search for 28 can skip. A circuit with at most one intact standard row escapes this argument.

Proof and verification

Written reduction and two exhaustive finite searches.