XOR with a minimum NAND countWitness truth table + complete smaller-circuit search
The problem
Find the fewest two-input NAND gates for XOR(a,b), with acyclic wiring, reusable signals, unrestricted fan-out, no constants, and one gate-output signal.
The checked result
Minimum gates: 4.
The four-gate witness yields the XOR truth table. The checker enumerates every topologically ordered circuit with fewer than four gates, identifying symmetric NAND inputs, and finds none that implements XOR.
Why the checker accepts it
- Evaluate the witness circuit in topological signal order.
- Compare its complete truth table with the target function.
- Enumerate all smaller acyclic circuits, identifying symmetric NAND inputs.
- Reject minimality if any smaller circuit implements the target.
Formal specification
{
"truth_table": 6,
"row_order": "00, 01, 10, 11; row i is bit i",
"gate_basis": "two-input NAND; repeated inputs permitted; no constants"
}Claim and evidence
{
"claim": {
"minimum_gates": 4
},
"witness": {
"gates": [
[
0,
1
],
[
0,
2
],
[
1,
2
],
[
3,
4
]
]
}
}Dataset construction
Deterministic finite fixture; full enumeration or witness replay as stated. Structured JSON; field meanings are stated in the specification. Acceptance covers 4 checker units for this record; the unit type is stated in its verification scope.
Complexity and limits
The circuit search grows rapidly with gate count. This family keeps two inputs and at most four witness gates.
Minimality is relative to this precise gate basis and wiring model. It says nothing about transistor count, delay, power, or other gate libraries.
A boundary to investigate
Gate-count minimality does not imply minimum delay, energy, area, or transistor count. Add independently checked lower bounds and additional gate libraries.