Skip to content
Related Articles
Open in App
Not now

Related Articles

GATE | GATE CS 2013 | Question 1

Improve Article
Save Article
Like Article
  • Difficulty Level : Easy
  • Last Updated : 28 Jun, 2021
Improve Article
Save Article
Like Article

A binary operation \oplus on a set of integers is defined as x \oplus y = x2 + y2. Which one of the following statements is TRUE about \oplus?
(A) Commutative but not associative
(B) Both commutative and associative
(C) Associative but not commutative
(D) Neither commutative nor associative


Answer: (A)

Explanation:

Associativity:

A binary operation ∗ on a set S is said to be associative if it satisfies the associative law:

a ∗ (b ∗c) = (a ∗b) ∗c for all a, b, c ∈S.

Commutativity:

A binary operation ∗ on a set S is said to be commutative if it satisfies the condition:

a ∗b=b ∗a for all a, b, ∈S.

In this case, the order in which elements are combined does not matter.

Solution:

Here a binary operation on a set of integers is defined as x⊕ y = x2 + y2.
for Commutativity: x ⊕y= y ⊕x.

LHS=> x ⊕y= x^2+ y^2
RHS=> y ⊕x= y^2+x^2
LHS = RHS. hence commutative.

for Associativity: x ⊕ (y ⊕ z) =(x ⊕ y) ⊕ z

LHS=> x ⊕ (y⊕ z) = x ⊕ ( y^2+z^2)= x^2+(y^2+z^2)^2

RHS=> (x ⊕y) ⊕z= ( x^2+y^2) ⊕z=(x^2+y^2)^2+z^2

So, LHS ≠ RHS, hence not associative.

Reference:
http://faculty.atu.edu/mfinan/4033/absalg3.pdf

This solution is contributed by Nitika Bansal

Another Solution :
\oplus commutative as x\oplusy is always same as y\oplusx.

\oplus is not associative as (x\oplusy)\oplusz is (x^2 + y^2)^2 + z^2, but x\oplus(y\oplusz) is x^2 + (y^2 + z^2)^2.


Quiz of this Question

My Personal Notes arrow_drop_up
Like Article
Save Article
Related Articles

Start Your Coding Journey Now!