Graph Theory

Answer & solution
Official answer: B
Approach: Convert the inverse equation to A²=I and count length-two walks.
1. Derivation. A=A⁻¹ implies A²=I. For a simple undirected graph, diagonal entry(A²)ᵥᵥ counts the neighbors of v, so every vertex has degree 1. Thus the graph is a disjoint union of edges covering all vertices, a perfect matching. Conversely each two-vertex edge adjacency block squares to identity. Answer B.
2. Explanation and checks. Because A is symmetric with entries 0 or 1, (A²)vv=sum_u A_vu A_uv=sum_u A_vu=degree(v). The identity matrix has diagonal 1, forcing every degree to be exactly one. Following the sole edge from any vertex reaches a partner whose sole edge comes back, so components are isolated two-vertex edges. Such graphs exist whenever the number of vertices is even; they need not form one cycle or a complete graph.