Which Boolean functions can one MP neuron implement? To answer that we stop doing arithmetic and look at geometry.
Two inputs: a line
Take OR with two inputs. The neuron fires when . Replace the inequality with an equality and you get , which is a straight line. It passes through and .
Only four input points exist, since the inputs are binary: , , and . Put them on a plane.
The line divides the plane into two half-spaces:
- where , the positive half-space, the neuron fires (output 1),
- where , the negative half-space, it stays silent (output 0).
For OR, three points fall in the positive half-space and only in the negative. That is exactly OR's truth table.
For AND the inequality is . Only satisfies it. For the always-1 function, and all four points are on the firing side.
It is tempting to say "the neuron fires for points above the line". That depends on how the line is written and which way it leans. The reliable definition is the inequality: a point is in the positive half-space if the expression is and in the negative half-space if it is .
Three inputs: a plane
With three inputs the same idea gives a plane. For 3-input OR, the plane separates the origin, which is the only point below it, from the other seven corners of the cube, which are on or above it.
For inputs you get a hyperplane. You cannot draw it, but the statement is the same: points on one side give 1 and points on the other give 0.
Move the threshold and watch the dividing line and the classification change.
Linear separability
A Boolean function is linearly separable if some line (or plane, or hyperplane) puts every input with output 1 on one side and every input with output 0 on the other.
A single MP neuron can implement exactly the linearly separable Boolean functions, and no others. AND, OR, NOT and the always-1 function all qualify.
That raises two questions. Are there Boolean functions that are not linearly separable? And what do we do about them? "Where One Perceptron Fails" answers the first, and "A Network of Perceptrons" the second.