Consider the given graph Its Minimum Cost Spanning Tree is ______

2015

Consider the given graph

Its Minimum Cost Spanning Tree is ______

Attempted by 234 students.

Show answer & explanation

Construct the minimum spanning tree using Kruskal's algorithm:

  1. Sort edges by weight (ascending): 1–6 (10), 3–4 (12), 2–7 (14), 2–3 (16), 4–7 (18), 4–5 (22), 5–7 (24), 5–6 (25), 1–2 (28).

  2. Pick edges one by one, skipping any that form a cycle:

  • Choose 1–6 (10).

  • Choose 3–4 (12).

  • Choose 2–7 (14).

  • Choose 2–3 (16) — this connects the component containing 2 and 7 to the component containing 3 and 4.

  • Skip 4–7 (18) because it would create a cycle among {2,3,4,7}.

  • Choose 4–5 (22) to attach vertex 5.

  • Choose 5–6 (25) to attach {1,6} to the main component (1–6 was already chosen, so this connects that pair to the rest).

The chosen edges are:

  • 1–6 (10)

  • 3–4 (12)

  • 2–7 (14)

  • 2–3 (16)

  • 4–5 (22)

  • 5–6 (25)

Total cost = 10 + 12 + 14 + 16 + 22 + 25 = 99.

Therefore the minimum-cost spanning tree is the tree that contains exactly these edges (total weight 99).

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

Explore the full course: Coding For Placement