Apply depth-first-search to find out the spanning tree, Mathematics

Assignment Help:

Apply depth-first-search to find out the spanning tree for the subsequent graph with vertex d as the starting vertex.       

1410_Apply depth-first-search to find out the spanning tree.png

Ans: Let us begin with node'd'. Mark d as visited node. Node'd' comprises two child 'e' and 'f'. After that Visit node 'e' and mark it as visited. Select edge (d, e) and add it to spanning tree T. So, T = {(d, e)}  Now e has e has two children: c and f. Visit c, add (e, c) to T, and mark c as visited. After that visit a and after that b. Mark them visited node and add arcs (c, a) and (c, b) to T. Up to here 

T = {(d, e), (e, c), (c, a), (c, b)}

Now here c has one more child e, which is previously visited, so exit recursion and go up to e that one more unvisited child f. Visit it, mark it as visited and we add (e, f) to T.  f comprise three (3) children: d, g and h. d is visited so leave it. Visit g, and doing the basic work of marking as visited and adding the arc utilized to visit the node in T, we at last get T as 

T = {(d, e), (e, c), (c, a), (c, b), (e, f), (f, g), (g, h), (h, i), (h, k), (k, j)}


Related Discussions:- Apply depth-first-search to find out the spanning tree

Math, Verify Louisville''s formula for y "-y" - y'' + y = 0 in (0, 1) quest...

Verify Louisville''s formula for y "-y" - y'' + y = 0 in (0, 1) question..

What is the probability that the card is a queen, Five cards - the ten, jac...

Five cards - the ten, jack, queen, king and ace, are well shuffled with their face downwards. One card is then picked up at random. (i)  What is the probability that the card is

How many pages can it print in 4 minutes, Tammi's latest printer can print ...

Tammi's latest printer can print 13.5 pages a minute. How many pages can it print in 4 minutes? Multiply 13.5 by 4 to ?nd out the number of copies made; 13.5 × 4 = 54 copies.

Polynomials in two variables, Polynomials in two variables Let's take a...

Polynomials in two variables Let's take a look at polynomials in two variables.  Polynomials in two variables are algebraic expressions containing terms in the form ax n y m

Simultaneous linear equations (graphical method), Steps in solving graphica...

Steps in solving graphical method of simultaneous linear equations

Differential equation - variation of parameters, Variation of Parameters ...

Variation of Parameters Notice there the differential equation, y′′ + q (t) y′ + r (t) y = g (t) Suppose that y 1 (t) and y 2 (t) are a fundamental set of solutions for

Integration variable, Integration variable : The next topic which we have ...

Integration variable : The next topic which we have to discuss here is the integration variable utilized in the integral. In fact there isn't actually a lot to discuss here other

Equal-sharing-categories of situations requiring division , Equal-sharing ...

Equal-sharing - situations in which we need to find out how much each portion Multiplication and Division contains when a given quantity is shared out into a number of equal porti

Hypergeometric distribution, Hypergeometric Distribution Consider the p...

Hypergeometric Distribution Consider the previous example of the batch of light bulbs. Suppose the Bernoulli experiment is repeated without replacement. That is, once a bulb is

Some simple equation, divide 50 into two parts such that if 6 is subtracted...

divide 50 into two parts such that if 6 is subtracted from one part and 12 is added to the second part,we get the same 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