All Exams Test series for 1 year @ ₹349 only
Question

Let $G$ be any undirected graph with positive edge weights, and $T$ be a minimum spanning tree of $G$. For any two vertices, $u$ and $v$, let $d_1(u, v)$ and $d_2(u, v)$ be the shortest distances between $u$ and $v$ in $G$ and $T$, respectively. Which ONE of the options is CORRECT for all possible $G$, $T$, $u$ and $v$?

The correct answer is

$d_1(u, v) \leq d_2(u, v)$

Understanding the Problem: Shortest Paths in Graphs and MSTs

We are given an undirected graph, let's call it G, where all edges have positive weights.

A Minimum Spanning Tree (MST), denoted as T, is a special selection of edges from G that connects all the vertices together, forming a tree structure (no cycles), and having the minimum possible total edge weight among all such connecting trees.

We need to compare two types of distances between any two vertices, say u and v:

  • $d_1(u, v)$: The shortest path distance between u and v in the original graph G. This path can use any edge from G.
  • $d_2(u, v)$: The shortest path distance between u and v specifically within the Minimum Spanning Tree T. Since T is a tree, there's only one unique simple path between any two vertices in T.

The question asks for the correct relationship between $d_1(u, v)$ and $d_2(u, v)$ that holds true for any graph G, its MST T, and any pair of vertices u and v.

Analyzing the Paths

Consider the unique path between vertices u and v within the Minimum Spanning Tree T. Let the sum of the weights of the edges along this path be $W_T(u, v)$. By definition, $d_2(u, v) = W_T(u, v)$.

Now, think about the original graph G. This path existing in T is also a valid path between u and v in the larger graph G, because all edges in T are also edges in G.

The shortest distance $d_1(u, v)$ in G is defined as the minimum distance among *all* possible paths between u and v in G.

Since the path in T (with distance $d_2(u, v)$) is just one of the many possible paths in G, the shortest path in G ($d_1(u, v)$) cannot be longer than this path. It must be either shorter or equal in length.

Therefore, we can conclude that $d_1(u, v) \leq d_2(u, v)$.

Illustrative Example

Imagine a graph with 4 vertices: A, B, C, D. Edges and weights:

  • (A, B) with weight 1
  • (B, C) with weight 1
  • (C, D) with weight 1
  • (A, D) with weight 4

An MST (T) could consist of the edges {(A, B), (B, C), (C, D)}. The total weight is 3.

Let's find the distances between A and D:

  • In T: The unique path is A -> B -> C -> D. The distance $d_2(A, D)$ is $1 + 1 + 1 = 3$.
  • In G: The paths are A -> B -> C -> D (distance 3) and the direct edge A -> D (distance 4). The shortest path is A -> B -> C -> D. So, $d_1(A, D) = 3$. In this case, $d_1(A, D) = d_2(A, D)$.

Now, consider another edge:

  • (A, C) with weight 1.5

Graph edges: (A, B, 1), (B, C, 1), (C, D, 1), (A, D, 4), (A, C, 1.5). A possible MST (T) could be {(A, B, 1), (A, C, 1.5), (C, D, 1)}. Total weight = 3.5.

Distances between A and D:

  • In T: The unique path is A -> C -> D. The distance $d_2(A, D)$ is $1.5 + 1 = 2.5$.
  • In G: Paths include:
    • A -> C -> D (distance 2.5)
    • A -> B -> C -> D (distance 1 + 1 + 1 = 3)
    • A -> D (distance 4)
    The shortest path is A -> C -> D. So, $d_1(A, D) = 2.5$. Again, $d_1(A, D) = d_2(A, D)$.

Consider one more edge:

  • (A, D) with weight 2

Graph edges: (A, B, 1), (B, C, 1), (C, D, 1), (A, D, 2). An MST (T) could be {(A, B, 1), (B, C, 1), (C, D, 1)}. Total weight = 3.

Distances between A and D:

  • In T: The unique path is A -> B -> C -> D. The distance $d_2(A, D)$ is $1 + 1 + 1 = 3$.
  • In G: Paths include:
    • A -> B -> C -> D (distance 3)
    • A -> D (distance 2)
    The shortest path is A -> D. So, $d_1(A, D) = 2$. Here, $d_1(A, D) < d_2(A, D)$.

These examples show that the shortest distance in the original graph G ($d_1$) can be less than or equal to the distance in the MST ($d_2$).

Conclusion

The path between u and v in the MST T is just one possible path in the original graph G. The shortest path distance $d_1(u, v)$ in G considers all paths, including potentially shorter ones than the path in T. Therefore, the shortest distance in G must be less than or equal to the distance of the path in T.

The correct relationship is: $ d_1(u, v) \leq d_2(u, v) $

Was this answer helpful?

Important Questions from Spanning Tree

  1. The maximum value of 𝑥 such that the edge between the nodes B and C is included in every minimum spanning tree of the given graph is _________ . (answer in integer)

  2. Given below are two statements: one is labelled as Assertion A and the other is labelled as Reason R 

    Assertion A: Kruskal's algorithm and Prim's algorithm always produce minimum spanning tree (MST). 

    Reason R: Every connected graph has a unique MST. 

    In the light of the above statements, choose the most appropriate answer from the options given below

Need Expert Advice?

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App