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

Learning to count in maths, Here we learn: 1) Discussed what counting me...

Here we learn: 1) Discussed what counting means, and stressed that it is not the ability to recite number names. 2) Talked about the need for a child to understand several pr

speed of the truck , A man travels 600km partly by train and partly by tru...

A man travels 600km partly by train and partly by truck. If he  covers 120km by train and the rest by truck, it takes him eight hours. But, if he travels 200km by train and the res

Quantitative Technique in Marketing, a company''s advertising expenditures ...

a company''s advertising expenditures average $5,000 per month. Current sales are $29,000 and the saturation sales level is estimated at $42,000. The sales-response constant is $2,

Developing an understanidng of multiplication, DEVELOPING AN UNDERSTANIDNG ...

DEVELOPING AN UNDERSTANIDNG OF MULTIPLICATION :  The most important aspect of knowing multiplication is to understand what it means and where it is applied. It needs to be first i

Functions, Question Solve the following functions for x (where x is a r...

Question Solve the following functions for x (where x is a real number). Leave your answers in exact form, that is, do not use a calculator, show all working. (a) 3 x 3 x2 3

Lori, rewrite the problem so that the divisor is a whole number...8.5/2.3

rewrite the problem so that the divisor is a whole number...8.5/2.3

Run a chi-square test, Download the data on Gas Mileage.  This is a sample ...

Download the data on Gas Mileage.  This is a sample of 81 passenger cars with information about gas consumption and other technical details.     a.        Estimate the following

What is plotting points, What is Plotting Points ? How would you go abo...

What is Plotting Points ? How would you go about drawing the graph of y = x2 ? One way to do it is by plotting points. (Your graphing calculator uses this method.) This is

Homework, joey asked 30 randomly selected students if they drank milk, juic...

joey asked 30 randomly selected students if they drank milk, juice, or bottled water with their lunch. He found that 9 drank milk, 16 drank juice, and 5 drank bottled water. If the

Hi, how do you find the distance between the sun and earth

how do you find the distance between the sun and earth

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