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)](../../assets/questions/CS-2006-Q50-1.webp)
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.