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

Derivatives of exponential and logarithm functions, Derivatives of Exponent...

Derivatives of Exponential and Logarithm Functions : The next set of functions which we desire to take a look at are exponential & logarithm functions. The most common exponentia

What is fibonacci sequence, what is Fibonacci Sequence? The most famous...

what is Fibonacci Sequence? The most famous sequence in mathematical history is called the Fibonacci sequence, discovered by the 12th-century mathematician Leonardo Fibonacci o

Pre-operational stage-development learning maths, Pre-operational Stage : ...

Pre-operational Stage :  This period of a child's cognitive development usually begins at the age of 2, and lasts until about the age of 6. Thus, it usually coincides with the pre

Question, Hi I have a maths question related to construction as its a cons...

Hi I have a maths question related to construction as its a construction management course...i could send some example sheets too...could it be done?

Solve for x and y liner equation, Solve for x , y (x + y - 8)/2   ...

Solve for x , y (x + y - 8)/2   =( x + 2  y - 14)/3 = (3 x + y - 12 )/ 11   (Ans: x=2, y=6) Ans :     x+ y - 8/2  =   x + 2y - 14 /3  =    3x+ y- 12/11

Angles, samuel left mauritius at 22:30 on saturday and travelled to london ...

samuel left mauritius at 22:30 on saturday and travelled to london (GMT) for 14h30min he had a stopover for 4 h in london and he continued to travel to toronto for another 6h20min

The mode -measures of central tendency, The mode - It is one of the me...

The mode - It is one of the measures of central tendency. The mode is defined as a value in a frequency distribution that has the highest frequency. Occasionally a single valu

find an explicit formula, (a) The generating function G(z) for a sequence ...

(a) The generating function G(z) for a sequence g n is given by G(z) = 1 - 2z/(1 + 3z)3 Give an explicit formula for g n . (b) For the sequence gn in the previous part co

Determine differential equation from direction field, Thus, just why do we ...

Thus, just why do we care regarding direction fields? Two nice pieces of information are there which can be readily determined from the direction field for a differential equation.

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