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

Course work2 , (b) The arity of an operator in propositional logic is the n...

(b) The arity of an operator in propositional logic is the number of propositional variables that it acts on – for example, binary operations (e.g, AND, OR, XOR…) act on two propo

#title.automotive cruise control system., What are some of the interestingm...

What are some of the interestingmodern developments in cruise control systems that contrast with comparatively basic old systems

Pert, define algorithm of pert and pert with suitable examples

define algorithm of pert and pert with suitable examples

Deflation, Deflation Indexes may be utilized to deflate time series so...

Deflation Indexes may be utilized to deflate time series so that comparisons among periods may be made in real terms. This is a process of decreases a value measured in cur

Line with rise of five and run of two is positive, Draw a graph which has s...

Draw a graph which has slope of a line with rise of five and run of two is positive.

Important points about the alternating series test, Important Points About ...

Important Points About the Alternating Series Test There are a several things to note about this test.  Very first, unlike the Integral Test and the Comparison or Limit Compari

Negative skewness-measure of central tendency, Negative Skewness It i...

Negative Skewness It is an asymmetrical curve whether the long tail extends to the left NB: In developed countries this frequency curve for the age distribution is charact

What is the volume of the frustum, If the areas of the circular bases of a ...

If the areas of the circular bases of a frustum of a cone are 4cm 2 and 9cm 2 respectively and the height of the frustum is 12cm. What is the volume of the frustum. (Ans:44cm 2 )

Combinations, Now we take up combinations and its related concepts. C...

Now we take up combinations and its related concepts. Combinations are defined as each of the groups or selections which can be made by taking some or all of the

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