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

first person drawn was named the class president, Consider a class of 55 s...

Consider a class of 55 students. The student names are placed in a hat & 3 names are randomly drawn without replacement. a)     If the first person drawn was named the class presi

NUMERABILITY, AFIGURE THIS OUT(3) (14) (17) (20) (25)= 8 WHAT ARE THE PROC...

AFIGURE THIS OUT(3) (14) (17) (20) (25)= 8 WHAT ARE THE PROCEDURES (-)(+)(x)(div) BETWEEN EACH NUMBER TO COME UP WITH 8 ?sk question #Minimum 100 words accepted#

Calculate the regular monthly payments, A washing machine, cash price $ 850...

A washing machine, cash price $ 850 is available on the following terms: A deposit of $ 100 followed by equal payments at the end of each month for the next 18 months, if intere

3, LAST COST METHOD

LAST COST METHOD

Describe laws of cosines, Q. Describe Laws of Cosines? The law of cosin...

Q. Describe Laws of Cosines? The law of cosines is used to find the missing piece of a triangle if we are given either 1. Two sides and the included angle (SAS) or  2. All t

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

Trignometery., using the formula sin A =under root 1+ cos2A /2 . find value...

using the formula sin A =under root 1+ cos2A /2 . find value of 30 degree, it is being given that cos 60 degree =1/2.

Objectives of addition and subtraction, Objectives After going throu...

Objectives After going through this unit, you should be able to 1. explain the processes involved ih addition and subtraction; 2. plan and execute activities that woul

Operation research, approximate the following problem as a mixed integer pr...

approximate the following problem as a mixed integer program. maximize z=e-x1+x1+(x2+1)2 subject to x12+x2 =0

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