What is the weight of a minimum spanning tree of the following graph?

2003

What is the weight of a minimum spanning tree of the following graph?

image.png

Answer: B. 31Key idea: build a minimum spanning tree using Kruskal's algorithm: sort edges by weight and add each edge if it connects two different components (skip edges…

  1. A.

    29

  2. B.

    31

  3. C.

    38

  4. D.

    41

Attempted by 202 students.

Show answer & explanation

Correct answer: B

Key idea: build a minimum spanning tree using Kruskal's algorithm: sort edges by weight and add each edge if it connects two different components (skip edges that form cycles).

  1. Add edge a–c (weight 1).

  2. Add edge c–d (weight 2).

  3. Add edge b–g (weight 2).

  4. Add edge e–i (weight 2).

  5. Add edge b–d (weight 3) to connect the two groups containing b/g and a/c/d.

  6. Add edge h–i (weight 4).

  7. Add edge f–h (weight 4).

  8. Add edge i–j (weight 5).

  9. Finally, add edge g–h (weight 8) to connect the two main components and complete the spanning tree.

Edges included in the MST (with weights):

  • a–c: 1

  • c–d: 2

  • b–g: 2

  • e–i: 2

  • b–d: 3

  • h–i: 4

  • f–h: 4

  • i–j: 5

  • g–h: 8

Total weight: 31

Note: Some small-weight edges like a–d (2) are skipped because adding them would form a cycle with already-selected edges; Kruskal's rule avoids such cycles.

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

Explore the full course: Iocl Engineers Officers Grade A Paper 2

Loading lesson…