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
Topic-wise GATE CS PYQs with verified steps
GATE CSE 2022 · Q37
Time
Select one answerSingle correct
Solution
Official answer: D) A3 divided by 6
Graph TheoryIn an unweighted adjacency matrix , the entry represents the number of closed walks of length starting and ending at vertex .
For , since the graph is simple and undirected (no self-loops and no multi-edges), every closed walk of length 3 starting at vertex corresponds to traversing a triangle (3-cycle) containing vertex .
For each 3-cycle formed by vertices :
Vertex sees closed walks of length 3: and .
Vertex sees closed walks of length 3.
Vertex sees closed walks of length 3.
Thus, each 3-cycle contributes to .
Therefore, the number of 3-cycles is given by:
This matches option (D) ( divided by 6).
Try the question first, then check your work.
Examiner trap
Recall that counts closed walks of length 3 starting at vertex . Each triangle has 3 vertices and can be traversed in 2 directions.
This Graph Theory previous year question is Q37 of the GATE CSE 2022 paper. Find more GATE CSE PYQs on Graph Theory in Engineering Mathematics, or browse all GATE CSE PYQs.
Free diagnostic
Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related Graph Theory PYQs now with no account.
An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.
Graph Theory has 21 GATE CSE PYQs across 14 papers from 2012 to 2026. 6 of them are 2-mark MCQs like this one, and GATE CSE 2022 has 3.
How GATE tests Graph TheoryIndependent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.