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

Lorie, A bourbon that is 51 proof is 25.5% alcohol by volume while one that...

A bourbon that is 51 proof is 25.5% alcohol by volume while one that is 82 proof is 41% alcohol. How many liters of 51 proof bourbon must be mixed with 1.0 liter of 82 proof bourbo

Progressions, what value of k is he sequence 2k+4,3k-7,k+12 are in an arith...

what value of k is he sequence 2k+4,3k-7,k+12 are in an arithmetic sequence is

Inequalities, seven more than a number is less than or equal to -18

seven more than a number is less than or equal to -18

People fit, How many people ca fi in a small cars without seats?

How many people ca fi in a small cars without seats?

Linear Equations, Tommy has a Nexus 4 that charges poorly. He placed his ph...

Tommy has a Nexus 4 that charges poorly. He placed his phone to charge,after 20 minutes the phone was 27% and after 85 minutes the phone was at 66%. Find how many percentage the p

How far apart are the two boats, Two boats leave the same port at the same ...

Two boats leave the same port at the same time. One travels at a constant speed of 30 km/hr at a bearing of 50° and the other on a bearing of 110° at a constant speed of 26 km/hr.

#change of ratio, #in a picnic the ratio of boys to girls is 3:4. when 6 bo...

#in a picnic the ratio of boys to girls is 3:4. when 6 boys joined the group the ratio became even. how many boys were there before? how many children were there before? how many b

Operations research, Solve the following Linear Programming Problem using S...

Solve the following Linear Programming Problem using Simple method. Maximize Z= 3x1 + 2X2, Subject to the constraints: X1+ X2 = 4 X1+ X2 = 2 X1, X2 = 0

Statistics, The winning team''s score in 21 high school basketball games wa...

The winning team''s score in 21 high school basketball games was recorded. If the sample mean is 54.3 points and the sample standard deviation is 11.0 points, find the 90% confiden

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