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

What is the expected value of perfect information, Question: The follow...

Question: The following payoff table shows profit for a decision analysis problem with two decision alternatives and three states of nature. (a) Construct a decision tr

Identify the surface for the equation , Identify the surface for each of th...

Identify the surface for each of the subsequent equations. (a) r = 5 (b) r 2 + z 2 = 100 (c) z = r Solution (a)  In two dimensions we are familiar with that this

Maths, f all the permutations of the letters of the word chalk are written ...

f all the permutations of the letters of the word chalk are written in a dictionary the rank of this word will be?

Probability, You''ve decided you want a plant for your room. At the gardeni...

You''ve decided you want a plant for your room. At the gardening store, there are 444 different kinds of plants (tulip, fern, cactus, and ficus) and 444 different kinds of pots to

GEOMETRIC PROGRESSION, THE FIRST AND THIRD TERM OF A G.P ARE 8 AND 18 RESPE...

THE FIRST AND THIRD TERM OF A G.P ARE 8 AND 18 RESPECTIVELY AND THE COMMON RATIO IS POSITIVE.FIND THE COMMON RATIO

Consumer behaviour, what is consumer behaviour according to accounting

what is consumer behaviour according to accounting

Properties of radicals, If n is positive integer greater than 1 and a & b b...

If n is positive integer greater than 1 and a & b both are positive real numbers then, Consider that on occasion we can let a or b to be negative and yet have these propert

Venn Diagram, In a group of 85 people, 33 own a microwave, 28 own a DVD pla...

In a group of 85 people, 33 own a microwave, 28 own a DVD player and 38 own a computer. In addition, 6 people own both a microwave and a DVD player, 9 own both a DVD player and a c

Counters and registers, design a synchronous, recycling, MOD-12 counter wit...

design a synchronous, recycling, MOD-12 counter with D FF''s. Use the states 0000 through 1011 in the counter.

Perceny, 72 is 75% what number

72 is 75% what number

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