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

Rationalize the denominator, Rationalize the denominator for following.  Su...

Rationalize the denominator for following.  Suppose that x is positive. Solution We'll have to start this one off along with first using the third property of radica

Simulation and Modeling, I have some sample simulation and modeling practic...

I have some sample simulation and modeling practice questions using isee Stella software.

Laplace transforms, Here is not too much to this section. We're here going ...

Here is not too much to this section. We're here going to work an illustration to exemplify how Laplace transforms can be used to solve systems of differential equations. Illus

Continuity, Continuity : In the last few sections we've been using the te...

Continuity : In the last few sections we've been using the term "nice enough" to describe those functions which we could evaluate limits by just evaluating the function at the po

Euler method for ode, y'' + 2y = 2 - e-4t, y(0) = 1 use euler''s method wit...

y'' + 2y = 2 - e-4t, y(0) = 1 use euler''s method with a step size of 0.2 to find and approximate values of y

Integration, Awhat is the meaning and application sk question #Minimum 100 ...

Awhat is the meaning and application sk question #Minimum 100 words accepted#

What is the net surface area to be painted, You are painting the surface of...

You are painting the surface of a silo that has a diameter of 16 ft and height of 50 ft. What is the net surface area to be painted? Consider the top of the silo is  1/2 a sphere

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