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

Ogive, How many types of ogives?

How many types of ogives?

Combined mean and standard deviation, Combined Mean And Standard Deviation ...

Combined Mean And Standard Deviation Occasionally we may need to combine 2 or more samples say A and B. Therefore it is essential to identify the new mean and the new standard

expected value, Describe the distribution of sample means shapefor samples...

Describe the distribution of sample means shapefor samples of n=36 selected from a population with a mean of μ=100 and a standard deviation of o=12.  , expected value, and standard

Find the value of given equations in polynomial , If α & ß are the zeroes ...

If α & ß are the zeroes of the polynomial 2x 2 - 4x + 5, then find the value of a.α 2 + ß 2   b. 1/ α + 1/ ß  c. (α - ß) 2 d. 1/α 2 + 1/ß 2    e.  α 3 + ß 3 (Ans:-1, 4/5 ,-6,

Which of the following could not be the translation, If the expression 9y -...

If the expression 9y - 5 represents a certain number, which of the following could NOT be the translation? a. five less than nine times y b. five less than the sum of 9 and y c

Compound interest, you have RM5O,OOO to invest,and two fund that you''d li...

you have RM5O,OOO to invest,and two fund that you''d like to invest in.The You-Risk-It Fund yields 14% interest.The Extra-Dull Fund yields 6% interest.Besause of college financial-

Project, report on shares and dividend using newspaper

report on shares and dividend using newspaper

Geometry , Solving for X in isosceles triangles

Solving for X in isosceles triangles

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