GATE / CS ARCHIVE

GATE CSE 2006 / QUESTION 50

Set represented by Boolean exclusive-or

Discrete Mathematics · Sets, Relations & Functions · Full GATE CSE 2006 paper

GATE 2006, Q50 2 marks · MCQ
Report issue

Sets, Relations & Functions

Question 50, GATE 2006: Represent X,Y⊆{0,…,n−1} with Boolean membership arrays x,y. For each i set z[i]=(x[i]∧¬y[i])∨(¬x[i]∧y[i]). Which set does z represent?
Options:
(A) X∪Y
(B) X∩Y
(C) (X−Y)∩(Y−X)
(D) (X−Y)∪(Y−X)
Tap to enlarge
Your answer
Answer & solution

Answer: D (no official key was published)

1. The assignment is z[i]=(x[i] AND NOT y[i]) OR (NOT x[i] AND y[i]). It is true exactly when i belongs to one of X and Y but not both.

2. Hence Z=(X−Y)∪(Y−X), option D.

3. Teaching check: The two terms are disjoint: one means membership in X only, the other membership in Y only. If both input bits are zero or both are one, z is zero. This is Boolean exclusive-or and set symmetric difference, not ordinary union.

Original paper, page 7