GATE / CS ARCHIVE

GATE CSE 1994 / QUESTION 2.2

An associative noncommutative operation

Discrete Mathematics · Algebraic Structures · Full GATE CSE 1994 paper

GATE 1994, Q2.2 Other
Report issue

Algebraic Structures

Question 2.2, GATE 1994: Give a binary operation on nonnegative integers that is associative but not commutative.
Tap to enlarge
Answer & solution

Answer: x⋆y=x (left projection) (no official key was published)

Define x⋆y to return its first operand. The result is always a nonnegative integer, establishing closure. Then (x⋆y)⋆z=x⋆z=x, while x⋆(y⋆z)=x⋆y=x, so associativity holds for all triples. But 0⋆1=0 and 1⋆0=1, proving noncommutativity. This constructed example avoids subtraction, which is not closed on the nonnegative integers and is not associative. The question asks for an example, not a unique familiar arithmetic operation.

Original paper, page 3