Triple XoR - Find relation between the numbers.

229 Views Asked by At

I have

a = b^c;

b = a^c;

Is it possible to eliminate c and find a relation between a and b? I have 3 different a values and would like to find the values of corresponding b.

Thanks!

1

There are 1 best solutions below

0
On BEST ANSWER

The two equations stated in the problem are redundant because of these properties of xor:

(i) xor is commutative and associative;

(ii) $y \mbox{ xor } y=0$ for all $y$.

(iii) $y \mbox{ xor } 0 = y$ for all $y$.

Thus the second equation can be obtained from the first by xor-ing both sides of the first equation by $c$. Similarly, if you xor the second equation by $c$, you get the first.

So in effect you only have one equation; and you cannot eliminate $c$. (Any two of the values can be arbitrary; but then the third is determined.)