GateAI
Discrete Mathematics

GATE CSE 2021 Set 1 · Q36

MCQ2 marksMedium

Time

Let G=(V,E)G = (V, E) be an undirected unweighted connected graph. The diameter\textit{diameter} of GG is defined as: diam(G)=max⁡u,v∈V{the length of shortest path between u and v}\text{diam}(G) = \max_{u,v \in V} \{\text{the length of shortest path between } u \text{ and } v\} Let MM be the adjacency matrix of GG. Define graph G2G_2 on the same set of vertices with adjacency matrix NN, where Nij={1if Mij>0 or Pij>0, where P=M20otherwiseN_{ij} = \begin{cases} 1 & \text{if } M_{ij} > 0 \text{ or } P_{ij} > 0, \text{ where } P = M^2 \\ 0 & \text{otherwise} \end{cases} Which one of the following statements is true?

Select one answerSingle correct

Pick an option to check

Solution

Step-by-step verified solution

Official answer: A) diam(G2) ≤ ⌈ diam(G)/2 ⌉

Discrete Mathematics

In an unweighted graph GG:

  • Mij>0M_{ij} > 0 indicates that there is a path of length 11 between vertex ii and vertex jj.

  • Pij=(M2)ij>0P_{ij} = (M^2)_{ij} > 0 indicates that there is a walk of length 22 between vertex ii and vertex jj.

Thus, an edge (i,j)(i, j) exists in graph G2G_2 if and only if the shortest path distance between ii and jj in GG satisfies 1≤dG(i,j)≤21 \le d_G(i, j) \le 2.

For any two vertices u,v∈Vu, v \in V, let dG(u,v)=kd_G(u, v) = k be the shortest path distance between them in GG. Along this shortest path of length kk, we can jump up to 22 edges per step in G2G_2. Therefore, the shortest path distance between uu and vv in G2G_2 satisfies:

dG2(u,v)≤⌈k/2⌉=⌈dG(u,v)/2⌉d_{G_2}(u, v) \le \lceil k/2 \rceil = \lceil d_G(u, v)/2 \rceil

Taking the maximum over all pairs u,v∈Vu, v \in V:

diam(G2)=max⁡u,v∈VdG2(u,v)≤max⁡u,v∈V⌈dG(u,v)2⌉=⌈diam(G)2⌉\text{diam}(G_2) = \max_{u, v \in V} d_{G_2}(u, v) \le \max_{u, v \in V} \left\lceil \frac{d_G(u, v)}{2} \right\rceil = \left\lceil \frac{\text{diam}(G)}{2} \right\rceil

Hence, diam(G2)≤⌈diam(G)/2⌉\text{diam}(G_2) \le \lceil \text{diam}(G)/2 \rceil, which matches Option (A).

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 Discrete Mathematics previous year question is Q36 of the GATE CSE 2021 Set 1 paper. Find more GATE CSE PYQs on Discrete Mathematics 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 Discrete Mathematics 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.

Discrete Mathematics in GATE CSE

Discrete Mathematics has 50 GATE CSE PYQs across 23 papers from 2011 to 2026. 11 of them are 2-mark MCQs like this one, and GATE CSE 2021 Set 1 has 3.

How GATE tests Discrete Mathematics

More from GATE CSE 2021 Set 1

Share this solution

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

GateAI solution cardGATE CSE 2021 Set 1 · Q36 · MCQ

Let G = (V, E) be an undirected unweighted connected graph. The diameter of G is defined as: diam(G) = maxu,v ∈ V {the length of shortest path between u and v} Let M be the adjacency matrix of G. Define graph G2 on the same set of vertices with adjacency matrix N, where Nij = 1 & if Mij > 0 or Pij > 0, where P = M2 0 & otherwise Which one of the following statements is true?

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.