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

Regarding submitting sample work, How can I submit a sample of my work in e...

How can I submit a sample of my work in either teaching online or checking homework as I am retired and doing this for the first time?

.fractions, what is the difference between North America''s part of the tot...

what is the difference between North America''s part of the total population and Africa''s part

Marketing plan and its parts, can you offer help with an entry level market...

can you offer help with an entry level marketing class and with developing charts and tables for the final marketing plan?

Discrete uniform distribution, Discrete Uniform Distribution Acme Limit...

Discrete Uniform Distribution Acme Limited is a car manufacturer. The company can paint the car in 3 possible colors: White, Black and Blue. Until the population is sampled, th

Collecting and interpreting data, Q. How to Collecting and interpreting dat...

Q. How to Collecting and interpreting data? Ans. Collecting and interpreting data is the most important job of a statistician. There are many types of studies and differe

Ogive, How many types of ogives?

How many types of ogives?

Find the slope of a line given two points on it, Finding the Slope of a Lin...

Finding the Slope of a Line, Given Two Points on it ? Find the slope of the line passing through the pairs of points (-5, -2) and (2, 4). One way to find the slope is

Calculate frequencies for two modes of vibration, A partially loaded passen...

A partially loaded passenger car has a mass of 1600 kg.  It has fully independent suspension in which each front spring has a stiffness of 19.0 kNm -1 and each rear spring has a s

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