Skip to content
Official PYQ · 2015

GATE CS 2015 Set 1 Q28 — Sets, Relations and Functions

Explain with AI

The binary operator ≠\neq is defined by the following truth table.

pqp≠q000011101110\begin{array}{|l|l|l|} \hline \textbf{p} & \textbf{q}& \textbf{p} \neq \textbf{q}\\ \hline \text{0} & \text{0}& \text{0}\\ \hline \text{0} & \text{1}& \text{1}\\ \hline \text{1} & \text{0}& \text{1}\\ \hline \text{1} & \text{1}& \text{0}\\ \hline \end{array}

Which one of the following is true about the binary operator ≠\neq ?

Choose one option
View worked solution

Answer: A

The given truth table defines the standard Exclusive-OR (XOR) operator, commonly denoted as ⊕\oplus. Let us analyze its properties:

1. Commutativity

An operator ≠\neq is commutative if p≠q=q≠pp \neq q = q \neq p for all possible values of pp and qq.

  • 0≠1=10 \neq 1 = 1 and 1≠0=1  ⟹  0≠1=1≠01 \neq 0 = 1 \implies 0 \neq 1 = 1 \neq 0
  • 0≠0=00 \neq 0 = 0 and 1≠1=01 \neq 1 = 0

Since the output is symmetric with respect to the inputs, the operator is commutative.

2. Associativity

An operator ≠\neq is associative if (p≠q)≠r=p≠(q≠r)(p \neq q) \neq r = p \neq (q \neq r) for all p,q,r∈{0,1}p, q, r \in \{0, 1\}.

Since this operator is equivalent to the logical XOR (⊕\oplus), we can verify associativity algebraically or by evaluating the truth values:

  • For p=0,q=1,r=1p = 0, q = 1, r = 1:
    • (0≠1)≠1=1≠1=0(0 \neq 1) \neq 1 = 1 \neq 1 = 0
    • 0≠(1≠1)=0≠0=00 \neq (1 \neq 1) = 0 \neq 0 = 0
  • For p=1,q=1,r=1p = 1, q = 1, r = 1:
    • (1≠1)≠1=0≠1=1(1 \neq 1) \neq 1 = 0 \neq 1 = 1
    • 1≠(1≠1)=1≠0=11 \neq (1 \neq 1) = 1 \neq 0 = 1

In general, p⊕q⊕rp \oplus q \oplus r is 11 if and only if an odd number of variables are 11. Since this condition is symmetric for any grouping, the operator is associative.

Therefore, the binary operator ≠\neq is both commutative and associative.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Sets, Relations and Functions questions