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

Integers, The set of whole numbers also does not satisfy all our requ...

The set of whole numbers also does not satisfy all our requirements as on observation, we find that it does not include negative numbers like -2, -7 and so on. To

NUMERABILITY, AFIGURE THIS OUT(3) (14) (17) (20) (25)= 8 WHAT ARE THE PROC...

AFIGURE THIS OUT(3) (14) (17) (20) (25)= 8 WHAT ARE THE PROCEDURES (-)(+)(x)(div) BETWEEN EACH NUMBER TO COME UP WITH 8 ?

Evaluating functions, Next we have to talk about evaluating functions.  Eva...

Next we have to talk about evaluating functions.  Evaluating a function is in fact nothing more than asking what its value is for particular values of x. Another way of looking at

Focal chord of the parabola, show that the circle described on any focal c...

show that the circle described on any focal chord of the parabola touches the directrix

What is this distance expressed in standard notation, The distance from the...

The distance from the sun to the earth is approximately 9.3 × 10 7 miles. What is this distance expressed in standard notation? In order to convert this number to standard not

Geometric progression (g.p.), Learning geometric progression ...

Learning geometric progression vis-á-vis arithmetic progression should make it easier. In geometric progression also we denote the first t

Determine the volume of the hollow solid, A solid is formed by cutting the ...

A solid is formed by cutting the top off of a cone with a slice parallel to the base, and then cutting a cylindrical hole into the resulting solid. Determine the volume of the holl

What are natural numbers and whole numbers, What are Natural Numbers and Wh...

What are Natural Numbers and Whole Numbers? Natural numbers are the numbers that you "naturally" use for counting: 1, 2, 3, 4, ... The set of whole numbers is the set of

Marvin helping teachers plan trip what is the minimum no, Marvin is helping...

Marvin is helping his teachers plan a ?eld trip. There are 125 people going on the ?eld trip and each school bus holds 48 people. What is the minimum number of school buses they wi

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