Consider the following weighted graph:
\"\"
Which of the following edge set is incorrect regarding Prim\’s minimum spanning tree?

(A) (IG), (GF), (GD), (GH), (DE), (EB), (FC), (CA)
(B) (IG), (GD), (DE), (EH), (EB), (GF), (FC), (CA)
(C) (IG), (GH), (GF), (GD), (DE), (EB), (FC), (CA)
(D) None of these.


Answer: (B)

Explanation: For given spanning tree:
\"\"
The minimum spanning tree will be:
\"\"
According to Prim\’s algorithm correct edge order sets will be-
1 – (IG), (GF), (GD), (GH), (DE), (EB), (FC), (CA)
2 – (IG), (GH), (GD), (GF), (DE), (EB), (FC), (CA)
3 – (IG), (GF), (GH), (GD), (DE), (EB), (FC), (CA)
4 – (IG), (GH), (GF), (GD), (DE), (EB), (FC), (CA)
5 – (IG), (GD), (GF), (GH), (DE), (EB), (FC), (CA)
6 – (IG), (GD), (GH), (GF), (DE), (EB), (FC), (CA)
Option (B) will also produce minimum spanning tree but it violates Prim\’s algorithm.
So, option (B) is correct.

Quiz of this Question


  • Last Updated : 12 Nov, 2018

Share your thoughts in the comments