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

Solve-|x2-5x+4/x2-4|

x^2-5x+4 can written in roots as (x-1)*(x-4) x^2-4 can be written interms of (x-2)(x+2).so [(x-1)(x-4)/(x-2)(x+2)]

Basic Stat, You have been research for your statistics class on how nervous...

You have been research for your statistics class on how nervous the American adults are in general, you have decided to use HINTS 2007 data set that has a scale (going from 0 to 24

Fermat''s theorem, Fermat's Theorem : If  f ( x ) contain a relative extre...

Fermat's Theorem : If  f ( x ) contain a relative extrema at x = c & f ′ (c ) exists then x = c is a critical point of f ( x ) . Actually, it will be a critical point such that f

Think smarter, compare: 643,251; 633,512; and 633,893. the answer is 633,51...

compare: 643,251; 633,512; and 633,893. the answer is 633,512. what is the question?

I need help with math, can i get help with math just with fractions i want ...

can i get help with math just with fractions i want to catch up with my class

Calculate values of the derivative, First, see that the right hand side of ...

First, see that the right hand side of equation (2) is a polynomial and thus continuous. This implies that this can only change sign if this firstly goes by zero. Therefore, if the

Difference between experiment and outcome, Difference Between Experiment an...

Difference Between Experiment and Outcome Experiment is an operation that produces outcomes which can be observed. Outcome/Event is the result of an experiment.

Price cutter sold 85 beach towels what were the total sales, Price Cutter s...

Price Cutter sold 85 beach towels for $6.95 each. What were the total sales? You must multiply the number of towels sold through the price of each towel; 85 × $6.95 = $590.75.

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