Write prim's algorithm, Mathematics

Assignment Help:

Write Prim's Algorithm.  

Ans: Prim's algorithm to find out a minimum spanning tree from a weighted graph in step by step form is given below. 

Let G = (V, E) be graph and S = (VS, ES) be the spanning tree to be found from G.

Step 1: Choose a vertex v1 of V and initialize 

VS = {v1} and

ES

= {}

Step 2: Choose a nearest neighbor of vi from V that is adjacent to some vj∈VS and that edge (vi, vj) does not form a cycle with members edge of ES. Set

VS = VS ∪{vi} and

ES = ES ∪{(vi, vj)}  

Step 3: Again Repeat step2 until |Es| = |V| - 1.


Related Discussions:- Write prim's algorithm

Explain what is symmetry in maths, Symmetry Definition : A line of sy...

Symmetry Definition : A line of symmetry divides a set of points into two halves, each being a reflection of the other. Each image point is also a point of the set. Defin

Algebra, Evaluate: 30 - 12÷3×2 =

Evaluate: 30 - 12÷3×2 =

Ratio , 5:9 and 3:5 then find a:b:c

5:9 and 3:5 then find a:b:c?

Numbers, use the distributive law to write each multiplication in a differe...

use the distributive law to write each multiplication in a different way. then find the answer. 12x14 16x13 14x18 9x108 12x136 20x147

Decmals, just want to go over it

just want to go over it

Word problem, tom has 150 feet of fencing to enclose a rectangular garden. ...

tom has 150 feet of fencing to enclose a rectangular garden. if the length is to be 5 feet less than three the width, find the area of the garden

Completely factored polynomial, Factoring polynomials Factoring polynom...

Factoring polynomials Factoring polynomials is done in pretty much the similar manner.  We determine all of the terms which were multiplied together to obtain the given polynom

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd