Consider a simple undirected unweighted graph with at least three vertices. If…

2022

Consider a simple undirected unweighted graph with at least three vertices. If A is the adjacency matrix of the graph, then the number of 3-cycles in the graph is given by the trace of

  1. A.

    A3

  2. B.

    A3 divided by 2

  3. C.

    A3 divided by 3

  4. D.

    A3 divided by 6

Attempted by 283 students.

Show answer & explanation

Correct answer: D

Key idea: relate closed walks of length three to 3-cycles.

(A^3)_{ii} counts the number of walks of length three that start and end at vertex i.

  1. Each triangle (3-cycle) with vertices u, v, w produces closed walks of length three.

  2. For a given triangle, there are three choices of starting vertex (u, v, or w).

  3. For each starting vertex there are two directions to traverse the triangle (clockwise and counterclockwise).

  4. Therefore each triangle contributes 3 × 2 = 6 closed walks of length three, so it contributes 6 to the trace of A^3.

Summing over all vertices, trace(A^3) equals the total number of closed walks of length three, which is 6 times the number of distinct 3-cycles.

Conclusion: the number of 3-cycles = trace(A^3) / 6.

Note: This holds for a simple undirected graph without self-loops or multiple edges; the adjacency matrix is symmetric and has zeros on the diagonal.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Gate Guidance By Sanchit Sir