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

Logic, INSTRUCTIONS: Construct a regular proof to derive the conclusion of ...

INSTRUCTIONS: Construct a regular proof to derive the conclusion of the following argument: 1. H v (~T > R) 2. Hv (E > F) 3. ~T v E 4. ~H & D / R v F INSTRUCTIONS: Con

How many times must he mow across the width of the lawn, Allan has been hir...

Allan has been hired to mow the school soccer field that is 180 ft wide through 330 ft long. If his mower mows strips which are 2 feet huge, how many times must he mow across the w

Why is the steepness of a curve partially calculate, Can you explain why is...

Can you explain why is the steepness of a curve partially calculated by the units of measurement?

How much will she owe the fabulous fence company, Kelly plans to fence in h...

Kelly plans to fence in her yard. The Fabulous Fence Company charges $3.25 per foot of fencing and $15.75 an hour for labor. If Kelly requires 350 feet of fencing and the installer

What is the probability that the card is a queen, Five cards - the ten, jac...

Five cards - the ten, jack, queen, king and ace, are well shuffled with their face downwards. One card is then picked up at random. (i)  What is the probability that the card is

Example of least common denominator, Example of Least Common Denominator: ...

Example of Least Common Denominator: Example: Add 1/7 +2 /3 + 11/12 + 4/6 Solution: Step 1:             Find out primes of each denominator. 7 = 7 (already is

Example to compute limit, calculates the value of the following limit. ...

calculates the value of the following limit. Solution Now, notice that if we plug in θ =0 which we will get division by zero & so the function doesn't present at this

Product rule (f g)' = f ' g + f g', Product Rule: (f g)′ = f ′ g + f g′ ...

Product Rule: (f g)′ = f ′ g + f g′ As with above the Power Rule, so the Product Rule can be proved either through using the definition of the derivative or this can be proved

Finding the equation of a line, Finding the Equation of a line, Given a Slo...

Finding the Equation of a line, Given a Slope and a Point ? Find the equation of a line with slope m = 2, which passes through the point (-1, -3). Solution: Use the po

Find relative extrema f ( x ) = x2 on [-2, Recognizes the absolute extrema...

Recognizes the absolute extrema & relative extrema for the given function.  f ( x ) = x 2        on                  [-2, 2] Solution Following is the graph for this fun

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