GATE / CS ARCHIVE

GATE CSE 2000 / QUESTION 6(b)

Parity components of the subset graph

Discrete Mathematics · Trees & Connectivity · Full GATE CSE 2000 paper

GATE 2000, Q6(b) Descriptive
Report issue

Trees & Connectivity

Question 6(b), GATE 2000: G has one vertex for each of the 2ⁿ subsets of S={1,…,n}. Vertices A,B are adjacent iff |A△B|=2, where △ is symmetric difference.

Task: Find the number of connected components.
Question 6(b), GATE 2000: G has one vertex for each of the 2ⁿ subsets of S={1,…,n}. Vertices A,B are adjacent iff |A△B|=2, where △ is symmetric difference.

Task: Find the number of connected components.
Tap to enlarge
Shared context

G has one vertex for each of the 2ⁿ subsets of S={1,…,n}. Vertices A,B are adjacent iff |A△B|=2, where △ is symmetric difference.

Answer & solution

Answer: Two for n≥1: even-cardinality and odd-cardinality subsets; one if n=0. (no official key was published)

1. Toggling two memberships changes cardinality by −2, 0 or +2. Its parity cannot change, so no path joins an even subset to an odd subset.

2. Conversely, if A and B have the same parity, their symmetric difference has even size. Partition A△B into pairs P₁,…,Pₖ and successively toggle these pairs.

3. Every toggle is a legal edge and after k toggles the vertex is A△(A△B)=B. Thus each parity class is connected.

4. Both parity classes are nonempty when n≥1, giving exactly two components. When n=1 these are two isolated vertices. If the degenerate case n=0 is allowed, the graph has only ∅ and hence one component.

Original paper, page 7