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

Continuous Probability Distributions, Ask questioOn average, Josh makes thr...

Ask questioOn average, Josh makes three word-processing errors per page on the first draft of his reports for work. What is the probability that on the next page he will make a) 5

Coin problem, Explain Coin Problem? How to resolve Coin Problem? Explain br...

Explain Coin Problem? How to resolve Coin Problem? Explain brief...

Arc length with polar coordinates, Arc Length with Polar Coordinates H...

Arc Length with Polar Coordinates Here we need to move into the applications of integrals and how we do them in terms of polar coordinates.  In this part we will look at the a

Rules of game theory, Rules Of Game Theory i.   The number of competito...

Rules Of Game Theory i.   The number of competitors is finite ii.   There is conflict of interests among the participants iii.  Each of these participants has available t

Estimate the slope of a line?, Estimate the Slope of a Line? The slope o...

Estimate the Slope of a Line? The slope of a line is a measure of how steep it is. It is defined as y 2 - y 1 /x 2 -x 1 Where (x 1 , y 1 ) and (x 2 , y 2 ) are any two p

What is angle pairs, What is Angle Pairs? Two angles are adjacent angle...

What is Angle Pairs? Two angles are adjacent angles if they have the same vertex and share one side. Vertical angles are a pair of nonadjacent angles formed by two intersecting

Circle, #question when equation of tangent T=0 and why

#question when equation of tangent T=0 and why

Trignometry, how can i easily solve the trignometry question?

how can i easily solve the trignometry question?

What percent of the shirts had been sold by football booster, The football ...

The football boosters club had 80 T-shirts made to sell at football games. Through mid-October, they had only 12 left. What percent of the shirts had been sold? Denote the numb

Find the external surface area, A shuttlecock used for playing badminton ha...

A shuttlecock used for playing badminton has the shape of a frustum of a Cone mounted on a hemisphere.  The external diameters of the frustum are 5 cm and 2 cm, and the height of t

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