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

If 1/x+2, if 1/x+2, 1/x+3, 1/x+5 are in AP find x Ans 1/x+2,1/x+3, 1/x+5...

if 1/x+2, 1/x+3, 1/x+5 are in AP find x Ans 1/x+2,1/x+3, 1/x+5 are in AP find x. 1/x+3 - 1/x+2 = 1/x+5-1/x+3 =>  1/x 2 +5x+6  = 2/ x 2 +8x +15 =>  On solving we get x

How much money does she have left, Mary has $2 in her pocket. She does yard...

Mary has $2 in her pocket. She does yard work for four various neighbors and earns $3 per yard. She then spends $2 on a soda. How much money does she have left? This translates

Draw a common graph ( x - 2)2 /9+4(y + 2)2 =1, Graph     ( x - 2) 2 /9+4...

Graph     ( x - 2) 2 /9+4(y + 2) 2  = 1 Solution It is an ellipse. The standard form of the ellipse is                                                         ( x - h

Vectors and sclara, find the angel between the vectors 4i-2j+k and 2i-4j on...

find the angel between the vectors 4i-2j+k and 2i-4j online answer

Sequencing, jobs a b c d e f 1 15 8 6 14 6 26 ...

jobs a b c d e f 1 15 8 6 14 6 26 2 17 7 9 10 15 22 3 21 7 12 9 11 19 4 18 6 11 12 14 17

Net Present Value, A business has the opportunity to expand by purchasing ...

A business has the opportunity to expand by purchasing a machine at a cost of £80,000. The machine has an estimated life of 5 years and is projected to generate a cashflow of £20,0

Find homeomorphisms - complex root, All numbers refer to exercises (and not...

All numbers refer to exercises (and not "computer exercises") in Gallian. §22: 8, 16, 22, 24, 28, 36. In addition: Problem 1: Let a be a complex root of the polynomial x 6 +

Ratio and proportion, the sides of triangleare inthe ratio 2;3;4 if the per...

the sides of triangleare inthe ratio 2;3;4 if the perimeter is 72 cm. find its side.

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