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

Halm''s differential equation, please i need the solution for halm''s diffe...

please i need the solution for halm''s differential equation

Area and perimeter, if perimeter is 300m length is 100m.find the breadth

if perimeter is 300m length is 100m.find the breadth

Invertible Matrices - Logical equivalence, 10 statements must be shown to b...

10 statements must be shown to be logically equivalent to the Statement the nxn matrix is invertible.

What is graphing statistics explain , What is Graphing Statistics explain ?...

What is Graphing Statistics explain ? The number of times that an event occurs is called its frequency. One of the ways that you can compare or display different frequencies is

Measurement of the sampling distribution, Caterer determines that 87% of p...

Caterer determines that 87% of people who sampled the food thought it was delicious. A random sample of 144 out of population of 5000 taken. The 144 are asked to sample the food. I

Speed, Town x and town y were 270km apart. a car started from town x toward...

Town x and town y were 270km apart. a car started from town x towards town y at a uniform speed of 60km/hr, while a motorcycle started from town y to town x at a uniform speed of 9

What is the value of m+n, Every point (x,y) on the curve y=log2 3x is trans...

Every point (x,y) on the curve y=log2 3x is transferred to a new point by the following translation (x',y')=(x+m,y+n), where m and n are integers. The set of (x',y') form the curve

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