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

Hcf, the length of three pieces of ropes are 140cm,150cm and 200cm.what is ...

the length of three pieces of ropes are 140cm,150cm and 200cm.what is the greatest possible length to measure the given pieces of a rope?

Creating input- output tables, How do I create an input-output table with t...

How do I create an input-output table with the rule -12

Application of statistics-economic order quantities (eoq), economic order q...

economic order quantities (EOQ) Statistics may be utilized in ordering or making economic order quantities as EOQ. It is significant for a business manager to understand that

Example of fraction, Example  Reduce 24/36 to its lowest terms. 2...

Example  Reduce 24/36 to its lowest terms. 24/36=12/18=6/9=2/3. In the first step we divide the numerator and the denominator by 2. The fraction gets reduced

Concepts, what are core concepts of marketing?

what are core concepts of marketing?

Explain how we converting fractions to percents, Explain how we Converting ...

Explain how we Converting Fractions to Percents ? To convert a fraction to a percent: 1. Convert the fraction to a decimal using long division. 2. Move the decimal point two p

How did they go about "modernizing" the region, What were the two main poli...

What were the two main political parties that formed in the majority of the new nations of Latin America post independence? In what ways were they different? Which party ascended t

SAT question, In a certain class, one half of the male students and two thi...

In a certain class, one half of the male students and two thirds of the female students speak French. If there are three fourths as many girls as boys in the class. What fraction o

Find out the mean time, 1 . The probability that a couple will have a child...

1 . The probability that a couple will have a child with black hair is 0.6. If this couple has 7 children what is (a) the probability that exactly 3 of these children have bl

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