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

Fraction, Ask question #Minimum 100 words accepted

Ask question #Minimum 100 words accepted

An initial species population , An initial species population is y(0) = 300...

An initial species population is y(0) = 3000. At t=0 the population starts to grow exponentially with a doubling time of 2 years. Mark the only correct statement: a)    The per

System of first order equations, Consider the Van der Pol oscillator x′′...

Consider the Van der Pol oscillator x′′- µ(1 - x 2 )x′ + x = 0 (a) Write this equation as a system of first order equations (b) Taking µ = 2, use MatLab's routine ode45 to

Travel time, you are driving on a freeway to a tour that is 500 kilometers ...

you are driving on a freeway to a tour that is 500 kilometers from your home. after 30 minutes , you pass a freeway exit that you know is 50 kilometer from your home. assuming that

Objective functions, For schedule consistency, you decide to require each o...

For schedule consistency, you decide to require each officer to report for their eight-hour shift at 12 AM, 4 AM, 8 AM, 12 PM, 4 PM, or 8 PM. As the Director of Public Safety, you

find the slope and the y intercept of the line - geometry, 1. Find the slo...

1. Find the slope and the y-intercept of the line whose equation is 5x + 6y = 7. 2. Find the equation of the line that is parallel to 2x + 5y = 7 and passes through the mid poin

Triangle, we have to find the perimeter when 1 rib is 7 cm and another rib...

we have to find the perimeter when 1 rib is 7 cm and another rib is 5 cm

Factors, What are the factors of 956

What are the factors of 956

Indicestitle.., Advantages and disadvantages of paasche indices

Advantages and disadvantages of paasche indices

Compute the derivative, Write an octave program that will take a set of poi...

Write an octave program that will take a set of points {x k , f k } representing a function and compute the derivative at the same points x k using 1. 2-point forward di erence

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