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

, What is 124 out of 300 in percent

What is 124 out of 300 in percent ?

Multiplication and division , In multiplication and division we have 1) ...

In multiplication and division we have 1) Suggested ways of conveying the meaning of multiplication and division to children. These operations have to be taught as an activit

Complex number, The points A,B,C and D represent the numbers Z1,Z2,Z3 and Z...

The points A,B,C and D represent the numbers Z1,Z2,Z3 and Z4.ABCD is rhombus;AC=2BD.if  Z2=2+i ,Z4=1-2i,find Z1 and Z3 Ans) POI of diagonals: (3-i)/2. Using concept of rotation:

What is the length of one side of the square, The area of a square is 64 cm...

The area of a square is 64 cm 2 . What is the length of one side of the square? To find out the area of a square, you multiply the length of a side through itself, because all

Geometry, prove angle MJL is congruent to angle KNL

prove angle MJL is congruent to angle KNL

Analytical geometry, convert the equation 4x^2+4y^2-4x-12y+1=0 to standard ...

convert the equation 4x^2+4y^2-4x-12y+1=0 to standard form and determine the center and radius of the circle. sketch the graph.

Estimate percent of the original price will the customer pay, Bikes are on ...

Bikes are on sale for 30% off the original price. What percent of the original price will the customer pay if he gets the bike at the sale price? The original price of the bike

Fourier series - partial differential equations, Fourier series - Partial D...

Fourier series - Partial Differential Equations One more application of series arises in the study of Partial Differential Equations.  One of the more generally employed method

Arithmetic mean, When three quantities are in A.P., then the middle...

When three quantities are in A.P., then the middle one is said to be the arithmetic  mean of the other two. That is, if a, b and c are in A.P., then b is th

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