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

Tangent, A tangent to a curve at a point is a straight line which tou...

A tangent to a curve at a point is a straight line which touches but does not intersect the curve at that point. A slope of the curve at a point is defined as the

Trignometry, Sin3x ? Solution) THE FORMULA IS RIGHT ,SO sin3x=3sin...

Sin3x ? Solution) THE FORMULA IS RIGHT ,SO sin3x=3sinx-4sin 3 x

Congruence, a) Let n = (abc) 7 . Prove that n ≡ a + b + c (mod 6). b) U...

a) Let n = (abc) 7 . Prove that n ≡ a + b + c (mod 6). b) Use congruences to show that 4|3 2n   - 1 for all integers n ≥ 0.

Hours, jeff left hartford at 2:15 pm and arrived in boston at 4:45 pm how l...

jeff left hartford at 2:15 pm and arrived in boston at 4:45 pm how long did the drive take him?

Proof of constant times a function, Proof of Constant Times a Function: ...

Proof of Constant Times a Function: (cf(x))′ = cf ′(x) It is very easy property to prove using the definition given you a recall, we can factor a constant out of a limit. No

Continuous compounding, If r per annum is the rate at which the princ...

If r per annum is the rate at which the principal A is compounded annually, then at the end of k years, the money due is          Q = A (1 + r) k Suppose

Differentiation, how to write assignment of the application of differentiat...

how to write assignment of the application of differentiation in science

Parabola, If the point (a,2a) is an interior point of the region bounded by...

If the point (a,2a) is an interior point of the region bounded by the parabola y2=16x and the double ordinate through the focus then a belongs to

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