~/writing/math-foundations-for-reasoning-models $ ls
XOR and the Need for Representation
XOR Classes
XOR creates two classes: matching inputs and different inputs.
~/writing/math-foundations-for-reasoning-models $ cat topic.md
XOR Classes
Definition
XOR creates two classes.
Class 0:
inputs are the same
Class 1:
inputs are different
XOR classes separate matching inputs from different inputs.
Class 0
Class 0 contains inputs where both values match.
Examples:
[0, 0] -> 0
[1, 1] -> 0
Both inputs false:
0, 0
Both inputs true:
1, 1
In both cases, XOR returns 0.
Class
0means no exclusive difference.
Class 1
Class 1 contains inputs where the values differ.
Examples:
[0, 1] -> 1
[1, 0] -> 1
Exactly one input is true.
That is the exclusive OR case.
Class
1means exactly one input is true.
Class Pattern
The four points are:
[0, 0] -> 0
[0, 1] -> 1
[1, 0] -> 1
[1, 1] -> 0
So:
class 0: [0, 0], [1, 1]
class 1: [0, 1], [1, 0]
The classes are crossed.
They do not sit cleanly on one side of a line.
XOR classes alternate across the square.
Why This Is Different From Simple Separation
Some classification problems put all class 0 examples on one side and all class 1 examples on the other.
XOR does not.
Class 0 appears in two opposite corners.
Class 1 appears in the other two opposite corners.
This is why one straight boundary cannot separate them.
XOR classes are diagonally separated, not side-separated.
Class Encoding
We can encode XOR classes as:
0 and 1
or:
-1 and 1
The encoding changes the symbols.
It does not change the class pattern.
Encoding changes representation of labels, not the underlying XOR relation.
Why XOR Classes Matter
XOR classes force us to look beyond the rule itself.
The rule is simple:
same -> 0
different -> 1
But the geometry of the classes is not linearly separable in the original 2D input space.
XOR shows that simple logical structure can create difficult geometric structure.
Final Summary
- XOR has two classes.
- Class
0means inputs match. - Class
1means inputs differ. - Class
0points are opposite corners. - Class
1points are the other opposite corners. - The classes alternate across the square.
- This creates a nonlinearly separable pattern.
~/writing/math-foundations-for-reasoning-models $ open
Continue the series.
Plotting XOR in 2D