GateAI
Graph Theory

GATE CSE 2022 · Q37

MCQ2 marksEasy

Time

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

Select one answerSingle correct

Pick an option to check

Solution

Step-by-step verified solution

Official answer: D) A3 divided by 6

Graph Theory

In an unweighted adjacency matrix AA, the entry (Ak)ii(A^k)_{ii} represents the number of closed walks of length kk starting and ending at vertex ii.

For k=3k = 3, since the graph is simple and undirected (no self-loops and no multi-edges), every closed walk of length 3 starting at vertex ii corresponds to traversing a triangle (3-cycle) containing vertex ii.

For each 3-cycle formed by vertices {u,v,w}\{u, v, w\}:

  • Vertex uu sees 22 closed walks of length 3: u→v→w→uu \to v \to w \to u and u→w→v→uu \to w \to v \to u.

  • Vertex vv sees 22 closed walks of length 3.

  • Vertex ww sees 22 closed walks of length 3.

Thus, each 3-cycle contributes 2+2+2=62 + 2 + 2 = 6 to trace(A3)=∑i(A3)ii\text{trace}(A^3) = \sum_{i} (A^3)_{ii}.

Therefore, the number of 3-cycles is given by:

Number of 3-cycles=trace(A3)6\text{Number of 3-cycles} = \frac{\text{trace}(A^3)}{6}

This matches option (D) (A3A^3 divided by 6).

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

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

Where do you stand for GATE?

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.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

Graph Theory in GATE CSE

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 Theory

More from GATE CSE 2022

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2022 · Q37 · MCQ

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

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.