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

Free Assignment Test Online, Well, my uncle want me to tutor him in mathema...

Well, my uncle want me to tutor him in mathematics. But, the problem is I don''t know what he already knows about math. It for his Compass Test when he go back to school in the spr

Multiplication of two unlike terms with opposite signs, The product on mult...

The product on multiplying - 4bc with 2a is - 8abc. That is, a term with minus sign multiplied with a term having a positive term gives a product which has a minus sign. On the

Parabola, please i need the answers to x^_7x+10 i want the vertex,axis of s...

please i need the answers to x^_7x+10 i want the vertex,axis of semetery,y intersect and the x intercept

Construct the finite automaton for state transition table, Construct the fi...

Construct the finite automaton for the state transition table given below. Ans: The finite automata is displayed below. The initial state is marked along with arrow sign a

SOLID MENSURATION, The base of an isosceles triangle and the altitude drawn...

The base of an isosceles triangle and the altitude drawn from one of the congruent sides are equal to 18cm and 15cm, respectively. Find the lengths of the sides of the triangle.

Find out all the critical points for the function, Find out all the critica...

Find out all the critical points for the function. Solution To determine the derivative it's probably simple to do a little simplification previous to we in fact diffe

Solve following 4e1+3 x - 9e5-2 x = 0 logarithms, Solve following 4e 1+3 x...

Solve following 4e 1+3 x - 9e 5-2 x  = 0 . Solution Here the first step is to get one exponential on every side & then we'll divide both sides by one of them (that doesn'

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