What is a good way to implement a Gaussian exception when the operators are user operators and not standard arithmetic?
Here are the operators:
Addition:
0 + 0 = 0 0 + 1 = 1 1 + 1 = 0
Subtraction:
0 - 0 = 0 0 - 1 = 1 1 - 1 = 0
Multiplication:
0 * 0 = 0 0 * 1 = 0 1 * 1 = 1
Section:
0 / 0 = illegal 0 / 1 = 0 1 / 1 = 1
Here is an example system of equations as an extended matrix with RHS in the right column:
1, 1, 0, 1, 0, 0, 0, 0, 0, 1 0, 1, 0, 1, 1, 0, 0, 0, 0, 1 0, 1, 1, 0, 0, 1, 0, 0, 0, 1 1, 0, 0, 1, 0, 0, 0, 0, 0, 1 0, 1, 0, 1, 1, 0, 0, 0, 0, 1 0, 0, 0, 0, 0, 1, 0, 0, 0, 1 0, 0, 0, 1, 0, 0, 1, 0, 0, 1 0, 0, 0, 1, 1, 0, 1, 1, 0, 1 0, 0, 0, 0, 0, 1, 0, 0, 1, 1
The solution for this kit is:
x1 = 1 x2 = 0 x3 = 0 x4 = 0 x5 = 1 x6 = 1 x7 = 1 x8 = 1 x9 = 0
The Gauss exception failed for me as I tried this on this set.
Equations will have 9, 16, 25, or 36 members. It would be great if the algorithm could easily expand to large squares, to 100. I am looking for an algorithm, preferably in pseudo-code or JavaScript.