GATE 2013 CS (CS1) – Question 11
On the integers define $x\oplus y=x^2+y^2$. Which property holds?
Practise this question in The GATE Grind →
Show answer and explanation
Correct answer: (A) Commutative but not associative
Explanation
Swapping x,y leaves x²+y² unchanged, so the operation is commutative. For associativity take x=1,y=0,z=0: (1⊕0)⊕0=1 and 1⊕(0⊕0)=1 does not distinguish; instead use x=2,y=1,z=0. The left side is 25 and the right side 5, proving nonassociativity. Thus A.