GATE CS 2024 Set 2 — Question 17

MCQ+1 / -0.33MediumMatchingGraph Theory (Math)Engineering MathematicsMatrices & DeterminantsLinear AlgebraAdjacency Matrix & List

Engineering Mathematics → Graphs (Data Structure) → Adjacency Matrix & List

Last updated

Question

Let AA be the adjacency matrix of a simple undirected graph GG. Suppose AA is its own inverse. Which one of the following statements is always TRUE?
A.
GG is a cycle
B.
GG is a perfect matching
C.
GG is a complete graph
D.
There is no such graph GG

Correct answer

(B) G is a perfect matching

Solution

Let AA be the adjacency matrix of a simple undirected graph GG. Since GG is simple, the diagonal entries of AA are all 0 (Aii=0A_{ii} = 0). Since GG is undirected, AA is symmetric (A=ATA = A^T).
Given that AA is its own inverse, we have A=A1A = A^{-1}, which implies A2=IA^2 = I (the identity matrix).
The diagonal entries of A2A^2 represent the degree of each vertex in the graph. Specifically:(A2)ii=kAikAki=k(Aik)2(A^2)_{ii} = \sum_{k} A_{ik} A_{ki} = \sum_{k} (A_{ik})^2Since Aik{0,1}A_{ik} \in \{0, 1\}, (Aik)2=Aik(A_{ik})^2 = A_{ik}. Thus, (A2)ii(A^2)_{ii} is the sum of the entries in row ii, which is the degree of vertex ii.
Since A2=IA^2 = I, we must have (A2)ii=1(A^2)_{ii} = 1 for all ii. Therefore, every vertex in GG has a degree of exactly 1.
A graph where every vertex has a degree of 1 is a collection of disjoint edges covering all vertices, which corresponds to a perfect matching.

More questions on Graphs (Data Structure)

Practice GATE CS PYQs with adaptive difficulty

Timed practice, skill tracking, and AI explanations — free to start.

Start practicing free