Four inequalities that cannot all hold
counterexample▲▲△Exact; the argument is algebraic.
STATEMENT
Prove that no perceptron computes XOR on , by writing the four requirements as inequalities in and showing they are jointly inconsistent.
GIVEN
The XOR function:
| target | ||
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
A perceptron predicts when and otherwise.
FIND
Either parameters that work, or a proof that none exist.
STRATEGY
Substitute each of the four inputs to turn the truth table into four linear inequalities. Then add pairs of them to derive a contradiction — the point being that this is ordinary algebra, not an appeal to geometry or intuition.
SOLUTION
Step 1 — write the four requirements. Substituting each row:
Step 2 — add (2) and (3). Adding two strict inequalities of the same direction is legal and preserves strictness:
Step 3 — combine with (4). From (4), . Substituting that upper bound into (5):
so .
Step 4 — the contradiction. Step 3 concludes . Requirement (1) says . Both cannot hold. Therefore no satisfies all four, and no perceptron computes XOR.
Why this is stronger than “training fails”. Nothing here mentions an algorithm, an initialisation, a learning rate, or a quantity of data. The inequalities describe every perceptron that could ever exist. The failure is a property of the hypothesis class of Definition 3 in Chapter I.1 — XOR is simply not in it.
The geometric reading. The two positive points and lie on one diagonal of the unit square; the two negatives and lie on the other. The diagonals cross. Any straight line separating one diagonal’s endpoints must pass between them, and therefore also separates the other diagonal’s endpoints — putting one negative on each side. The algebra above is that picture with the geometry removed.
Answer
No such perceptron exists. Requirements (2) and (3) force while requirement (1) forces .
The obstruction is exactly one dimension of freedom short: adding a third feature makes the four points linearly separable in , with solving it.
Check — sanity
The proposed three-dimensional solution works. With the extra feature and :
| Input | Score | Predicted | Target |
|---|---|---|---|
| 0 | 0 | ||
| 1 | 1 | ||
| 1 | 1 | ||
| 0 | 0 |
All four correct. So the impossibility really is about the representation and not about XOR being hard.
Three of the four are satisfiable. Drop requirement (4) and satisfies (1), (2), (3). This confirms the contradiction genuinely needs all four rows, rather than arising from a slip in transcribing one of them.
AND and OR are fine. AND: . OR: . So the perceptron is not simply weak — it computes fourteen of the sixteen Boolean functions of two variables. XOR and its negation are the exceptions.
Where this breaks
The proof needs the exact convention that a score of predicts class . If ties were resolved the other way, requirement (1) becomes and requirement (4) becomes — both strict — and the same addition still yields against . The contradiction survives the convention change, which is worth checking rather than assuming: a proof that depended on the tie-breaking rule would be a proof about the rule, not about XOR.
Variation
Show that parity on three bits — output when an odd number of inputs are — is also not computable by a perceptron, by exhibiting a contradiction among its eight inequalities. Then state the general pattern.