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 exponential functions, What is Exponential Functions ? Exponent La...

What is Exponential Functions ? Exponent Laws Review: A) Ax / Ay = A(x + y) B) Ax / Ay = A(x - y) C) (ABC)x = AxBxCx D) ((Ax)y)z = Axyz E) (A/B)x = Ax /Bx Definition

Integration, Integrate ((cosx)*(sinx))/(sin(2x)) with respect to x

Integrate ((cosx)*(sinx))/(sin(2x)) with respect to x

Determine rational exponents, Evaluate following. (a) 625 3/4 Solut...

Evaluate following. (a) 625 3/4 Solution  (a) 625 3/4 Again, let's employ both forms to calculate this one.             625 3/4   =( 625 1/4 ) 3 =(5) 3   = 12

Circles, Circles In this section we are going to take a rapid look at ...

Circles In this section we are going to take a rapid look at circles.  Though, prior to we do that we have to give a quick formula that expectantly you'll recall seeing at som

Real numbers, All the number sets we have seen above put together com...

All the number sets we have seen above put together comprise the real numbers. Real numbers are also inadequate in the sense that it does not include a quantity which i

Find the are length and sketch the level curves, 1) Find the are length of ...

1) Find the are length of r(t) = ( 1/2t^2, 1/3t^3, 1/3t^3) where t is between 1 and 3 (greater than or equal less than or equal) 2) Sketch the level curves of f(x,y) = x^2-2y^2

Logarithms, We know that 2 4 = 16 and also that 2 is referred to as ...

We know that 2 4 = 16 and also that 2 is referred to as the base, 4 as the index or power or the exponent. The same if expressed in terms of logarithms would be log 2

#titleBUsiness calculus.., If $2,000 is invested in a savings account offer...

If $2,000 is invested in a savings account offering interest at a rate of 3.5% per year, compounded continuously, how fast is the balance growing after 8 years? (Round your answer

Find out the mean wait in line - probability, Example of Probability I...

Example of Probability Illustration:  It has been determined that the probability density function for the wait in line at a counter is specified by, In which t is the

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