# solve an xor'd linear equation

• Jul 18th 2012, 10:51 PM
MathGeek1983
solve an xor'd linear equation
hello,
i have 6 variables
a=5
b=10
c=7
d=9
x=1
y=2
when i solve this equation using gauss-jordan it gives me wrong answer
a⊕0⊕c⊕0⊕0⊕0=2
0⊕b⊕0⊕d⊕0⊕0=3

a⊕0⊕0⊕0⊕x⊕0=4
0⊕b⊕0⊕0⊕0⊕y=8

0⊕0⊕c⊕0⊕x⊕0=6
0⊕0⊕0⊕d⊕0⊕y=11

⊕ is XOR

thanks for your help :)
• Jul 19th 2012, 06:14 AM
emakarov
Re: solve an xor'd linear equation
The initial augmented matrix is
Code:

1 0 1 0 0 0 = 2
0 1 0 1 0 0 = 3
1 0 0 0 1 0 = 4
0 1 0 0 0 1 = 8
0 0 1 0 1 0 = 6
0 0 0 1 0 1 = 11

Replace row 3 by the sum of row 1 and row 3 (in the future, 3 := 1 + 3).

Code:

1 0 1 0 0 0 = 2
0 1 0 1 0 0 = 3
0 0 1 0 1 0 = 6
0 1 0 0 0 1 = 8
0 0 1 0 1 0 = 6
0 0 0 1 0 1 = 11

4 := 2 + 4

Code:

1 0 1 0 0 0 = 2
0 1 0 1 0 0 = 3
0 0 1 0 1 0 = 6
0 0 0 1 0 1 = 11
0 0 1 0 1 0 = 6
0 0 0 1 0 1 = 11

5 := 3 + 5

Code:

1 0 1 0 0 0 = 2
0 1 0 1 0 0 = 3
0 0 1 0 1 0 = 6
0 0 0 1 0 1 = 11
0 0 0 0 0 0 = 0
0 0 0 1 0 1 = 11

6 := 4 + 6

Code:

1 0 1 0 0 0 = 2
0 1 0 1 0 0 = 3
0 0 1 0 1 0 = 6
0 0 0 1 0 1 = 11
0 0 0 0 0 0 = 0
0 0 0 0 0 0 = 0

The last two equations are superfluous

Code:

1 0 1 0 0 0 = 2
0 1 0 1 0 0 = 3
0 0 1 0 1 0 = 6
0 0 0 1 0 1 = 11

2 := 4 + 2

Code:

1 0 1 0 0 0 = 2
0 1 0 0 0 1 = 8
0 0 1 0 1 0 = 6
0 0 0 1 0 1 = 11

1 := 3 + 1

Code:

1 0 0 0 1 0 = 4
0 1 0 0 0 1 = 8
0 0 1 0 1 0 = 6
0 0 0 1 0 1 = 11

This is a reduced row echelon form. Given the values of x and y we can find a, b, c and d. In particular, for x = 1 and y = 2,

d + 2 = 11; d = 9
c + 1 = 6; c = 7
b + 2 = 8; b = 10
a + 1 = 4; a = 5
• Jul 19th 2012, 06:26 AM
MathGeek1983
Re: solve an xor'd linear equation
Thanks for the reply, emakarov
but what if x and y werent given ?? what will i do ?
• Jul 19th 2012, 06:44 AM
emakarov
Re: solve an xor'd linear equation
This is an underdetermined system, so it has infinitely many solutions. For each value of x and y, there is a unique solution for a, b, c and d. For example, for x = 2 and y = 1 we have a = 6, b = 9, c = 4 and d = 10.
• Jul 19th 2012, 10:18 AM
MathGeek1983
Re: solve an xor'd linear equation
Thank you so much emakarov! you are a life saver! :)