This preview shows page 1. Sign up to view the full content.
Unformatted text preview: i do if mark[w] = 0 then begin mark[w]=1; count=count1 e n d if count = 1 then print(YES) else print(NO) 8.[10] Sort the below graph topologically. Illustrate all major steps. A solution at the end 9.[40] In the graph from Question 4 replace arrows by lines, i.e. translate it into a graph which is indirected. Assume ordering as in 4.b. a.[10] Find a minimumcost spanning tree by Prims algorithm. b.[10] Find a minimumcost spanning tree by Kruskals algorithm. c.[10] Find a depthfirst spanning tree starting at a. d.[10] Find a breadthfirst spanning tree starting at a. Give all steps. Solutions at the end...
View
Full
Document
This note was uploaded on 12/10/2009 for the course CAS 2c03 taught by Professor Janicki during the Spring '03 term at McMaster University.
 Spring '03
 janicki

Click to edit the document details