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

Draw the bipartite graph, The graph C n , n  ≥  3 contains n vertices and n...

The graph C n , n  ≥  3 contains n vertices and n edges creating a cycle. For what value of n is C n a bipartite graph? Draw the bipartite graph of C n to give explanation for yo

Fibonacci number, 1. Suppose n ≡ 7 (mod 8). Show that n ≠ x 2 + y 2 + z 2...

1. Suppose n ≡ 7 (mod 8). Show that n ≠ x 2 + y 2 + z 2 for any x, y, z ε Z. 2. Prove ∀n ε Z, that n is divisible by 9 if and only if the sum of its digits is divisible by 9.

Determine series is convergent or divergent by root test, Find out if the f...

Find out if the following series is convergent or divergent. Solution There really is not very much to these problems another than calculating the limit and then usin

Show that 8 - 10 + 21= 0, If A, B and P are the points (-4, 3), (0, -2) and...

If A, B and P are the points (-4, 3), (0, -2) and (α,β) respectively and P is equidistant from A and B, show that 8α - 10β + 21= 0. Ans :   AP = PB ⇒ AP 2 = PB 2 (∝ + 4) 2

Shares and dividends, I have a maths assignment as- Use a newspaper to stud...

I have a maths assignment as- Use a newspaper to study and give a report on shares and dividends.

Ravens played 25 home games how many games did they win, The Ravens played ...

The Ravens played 25 home games this year. They had 9 losses and 2 ties. How many games did they win? Eleven games are accounted for along with the losses and ties (9 + 2 = 11)

What was the us''s policy towards latin america, What was the US's policy t...

What was the US's policy towards Latin America during the 20th century? What were the motives behind this policy? Give one example of the US executing this policy?

Unipolar and bipolar boolean inputs, A 4-input Neuron has weights (1,-1,  0...

A 4-input Neuron has weights (1,-1,  0,  0.5.Calculate the network output when the following input vectors are applied. For calculation assume: a. f(net) = unipolar bina

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