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 unreducing fractions, Q, Did you know that you can unreduce a fract...

Q, Did you know that you can unreduce a fraction? Ans. Remember, you reduce a fraction by dividing the numerator and denominator by the same numbers. Here we divide

Find how much more space than the toy it will cover, A Solid toy in the for...

A Solid toy in the form of a hemisphere surmounted by the right circular cone of height  2cm  and  diameter  of  the  base  4  cm .If  a right  circular  cylinder circumscribes the

What is the widest piece of sheetrock, A door height is 6 feet and 6 inches...

A door height is 6 feet and 6 inches and 36 inches wide. What is the widest piece of sheetrock that will ?t through the door? Round to the nearest inch. a. 114 in b. 86 in

Determine coefficient of traction, Problem 1 Work through TALPAC 10 Bas...

Problem 1 Work through TALPAC 10 Basics (refer to attached handout). Answer the set of questions at the end of tutorial module. Problem 2 Referring to both the haul cyc

Find the z-score, For a population with a mean of μ=80 and a standard devia...

For a population with a mean of μ=80 and a standard deviation of o=12, find the z-score corresponding to each of the following samples. a.    M=83 for a sample of n=4 scores b.

Describe segments, Describe Segments, Rays, Angles, and Triangles We now...

Describe Segments, Rays, Angles, and Triangles We now define some more basic geometric figures. 1. Segments Definition A segment is the set of two given points and all the

Houses having the floor , Suppose you are in the market for a new home and ...

Suppose you are in the market for a new home and are interested in a new housing community under construction in a another city. a) The sales representative informs you that the

Explain prime numbers vs. composite numbers, Normal 0 false f...

Normal 0 false false false EN-IN X-NONE X-NONE MicrosoftInternetExplorer4

The sum of the clock, how many times In a 12 hour period will he numbers ad...

how many times In a 12 hour period will he numbers add up to 6? (hint 3:00 is one answer0

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