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

#permutation, #The digits 1,2,3,4and 5 are arranged in random order,to form...

#The digits 1,2,3,4and 5 are arranged in random order,to form a five-digit number. Find the probability that the number is a. an odd number. b.less than 23,000

Basic mathematics, I need help with my homework, I am to the edge right now...

I need help with my homework, I am to the edge right now with this w=5pq/2

How organize data by circle graphs, Q. How organize data by Circle Graphs? ...

Q. How organize data by Circle Graphs? Ans. Circle graphs, or pie charts, are another way of organizing data sets into an easy-to-read format. They make it very easy to c

Differential calculus finding limits, how can i evaluate this lim of x as x...

how can i evaluate this lim of x as x approaches to a

Calculate the amount of money a person has left after death, When Ms. Jones...

When Ms. Jones retired, she received a lump sum of $1,000,000 from her pension plan.  She then invested this sum in an annuity account that would pay her an equal amount at the end

Derive expressions for the mean and variance, On each day t of n days, N cu...

On each day t of n days, N customers of a supermarket were sampled and the number Xt expressing dissatisfaction was recorded. The results suggested that there were good and bad day

Min Problem, I need help solving this question...You have to design a recta...

I need help solving this question...You have to design a rectangular flyer. The top and bottom must have 5" margins and the left and right sides must have 2" margins. If you must

How many cousins does robert have- miscellaneous math, Bonnie has twice as ...

Bonnie has twice as many cousins as Robert. George has 5 cousins, which is 11 less than Bonnie has. How many cousins does Robert have? Work backwards to find the solution. Geor

Volume of prisms, How did the teacher get 30 + 12 + 1.5 for the equation of...

How did the teacher get 30 + 12 + 1.5 for the equation of volume of rectangular prism measuring L=14.4, W= 3, and H= 5? Formula given was V= Bh. My answer was 43.5.14.5 x 3.

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