GATE 2024 CS (CS1) – Question 52
Consider the operators $\Diamond$ and $\square$ defined by $a\Diamond b=a+2b$, $a\square b=ab$, for positive integers. Which of the following statements is/are TRUE?
Practise this question in The GATE Grind →
Show answer and explanation
Correct answer: (B) Operator $\square$ obeys the associative law; (D) Operator $\square$ over the operator $\Diamond$ obeys the distributive law
Explanation
Multiplication is associative. $(a\Diamond b)\Diamond c=a+2b+2c$ while $a\Diamond(b\Diamond c)=a+2b+4c$, so ◊ is not associative. $a(b+2c)=ab+2ac$ gives □ distributing over ◊; the reverse fails.