Discrete Mathematics with Graph Theory (3rd Edition) 352

Discrete Mathematics with Graph Theory (3rd Edition) 352 -...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 350 Solutions to Exercises 7. (a) [BB] Each time the procedure terminates, start it again with an unlabeled vertex. The number of connected components is equal to the number of times the procedure terminates. (b) Depth-first search assigns the labels 1,2,3,4 to the vertices VI, V2, Vu, V6 respectively and then terminates. The next search assigns the labels 1,2,3 to vertices V3, Vs, VI3 respectively and ter- minates. The next search assigns the labels 1,2,3,4,5,6 to the vertices V4, V5, VIO, V7, Vg, VI2 respectively and terminates. At this point, all the vertices have been labeled. There are three components. 8. The graph shows a spanning tree which results from one possible depth-first search applied to a graph for this problem (formed in the same way that the graph in the solution to Problem 5 was formed). Vertex (a, b, c) indicates the state where there are a ounces in the 12-ounce flagon, b ounces in the eight-ounce flagon and c ounces in the five-ounce flagon. Various graphs are possible, but all should eight-ounce flagon and c ounces in the five-ounce flagon....
View Full Document

Ask a homework question - tutors are online