The cost of writing parity

One Boolean function shows why a lower bound for disjunctive normal form does not automatically transfer to general circuits.

DNF: 2ⁿ⁻¹     ·     circuit: 4(n − 1)

The function returns one when its input contains an odd number of ones. Every implicant must fix every bit. Flipping a free bit changes parity. A disjunctive normal form therefore needs a separate term for each of the 2ⁿ⁻¹ accepting inputs.

A chain of n − 1 XOR operations computes the same function. Implementing each XOR with four AND, OR and NOT gates gives 4(n − 1) gates. With six inputs this is a 20-gate circuit and a minimum 32-term DNF. The script checks all 64 inputs of this example.

This teaching example reproduces a known representation-specific bound. P versus NP remains open.

The P versus NP problem https://www.claymath.org/millennium/p-vs-np/
