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

Probability exercise, 1. A psychologist developed a test designed to help p...

1. A psychologist developed a test designed to help predict whether production-line workers in a large industry will perform satisfactorily. A test was administered to all new empl

The low temperature in Achorage, The low temperature in Anchorage, Alaska t...

The low temperature in Anchorage, Alaska today was negative four degrees. The low temperature in Los Angeles, California was sixty-three degreees. What is the difference in the two

Mensuration, A palm tree of heights 25m is broken by storm in such a way th...

A palm tree of heights 25m is broken by storm in such a way that its top touches the ground at a distance of 5m from its root,but is not separated from the tree.Find the height at

Judgment sampling, Judgment Sampling Here the interviewer chooses whom ...

Judgment Sampling Here the interviewer chooses whom to interview believing that their view is more fundamental because they might be directly affected for illustration, to find

Percentage, By selling a violin for $4950, giving a 10% discount on the mar...

By selling a violin for $4950, giving a 10% discount on the marked price, a trader gained $950 on his investment, Find, Cost price.

Pumping lemma for context free languages, 1. Construct a grammar G such tha...

1. Construct a grammar G such that L(G) = L(M) where M is the PDA in the previous question. Then show that the word aaaabb is generated by G. 2. Prove, using the Pumping Lemma f

Rate -categories of multiplication, Rate - when we know how many objects...

Rate - when we know how many objects are in a set, and need to find out the total number in several copies of that set. (e.g., if a child uses 4 copybooks in a year, how many co

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