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

Conditional probability: independent events, Conditional Probability: Indep...

Conditional Probability: Independent Events If the probability of an event is subject to a restriction on the sample space, the probability is said to be conditional. Co

Geometry, how do we rotate an object 90 counterclockwise?

how do we rotate an object 90 counterclockwise?

Marketing management , Draw the typical profile(s) of Shoppers'' Stop custo...

Draw the typical profile(s) of Shoppers'' Stop customers segments.

Prove complement of element in boolean algebra is unique, Prove that, the c...

Prove that, the complement of each element in a Boolean algebra B is unique.     Ans:  Proof: Let I and 0 are the unit and zero elements of B correspondingly. Suppose b and c b

Hello, I am here to tell you, Alex has a cold.

I am here to tell you, Alex has a cold.

Mr F.D, how you divide 100 by 10 and then x by 10

how you divide 100 by 10 and then x by 10

Determine the measure of a base angle, The angle calculate of the base angl...

The angle calculate of the base angles of an isosceles triangle are shown by x and the vertex angle is 3x + 10. Determine the measure of a base angle. a. 112° b. 42.5° c.

Trigonometry, can you explain it to me please

can you explain it to me please

Models of energy production, Find models of energy production and energy us...

Find models of energy production and energy usage from 2 different countries, each on a different continent, which predict future energy production and demands. How was data collec

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