Fourteen of sixteen
counterexample▲▲△There are Boolean functions of two variables. Determine how many a perceptron computes, exhibit weights for AND, OR and NAND, and prove that XNOR joins XOR among the failures. Then state the general characterisation.
Hint
XNOR is the negation of XOR. What does negating a perceptron’s output do to its parameters?
Solution
Three that work.
| Function | Check | |
|---|---|---|
| AND | ; all others | |
| OR | ; all others | |
| NAND | the negation of AND, so negate every parameter |
Verify NAND fully: ; ; ; . Correct.
XNOR fails. Negating a perceptron’s output is achieved by negating all its parameters, since away from zero. So if some computed XNOR, then would compute XOR — which I.2.B04 proved impossible. Hence no perceptron computes XNOR either.
Directly, its four inequalities are the mirror image:
Adding the middle two gives ; the fourth gives ; together , so , contradicting the first.
The count. Sixteen functions, two failures, so a perceptron computes of them.
The general characterisation. A Boolean function is computable by a perceptron exactly when its true points and false points are linearly separable as subsets of the hypercube — such functions are called threshold functions. XOR and XNOR are the only two of the sixteen whose true and false sets interleave along both diagonals of the square.
The scale of the failure grows. For inputs there are Boolean functions but only about threshold functions. At the ratio is ; at it is roughly against total — already under ; and it collapses to zero as grows. The perceptron looks adequate on two variables and is arbitrarily inadequate in general, which is the honest version of the story usually told with XOR alone.
The escape, once more. Every one of these functions is computable by a network with one hidden layer, because AND, OR and NOT are, and those three compose to give all of them. That is the constructive half of the universal approximation story, and it is Chapter I.5’s business.