.

Friday, March 22, 2019

COP 3530, Discrete Data Structures and Algorithms, Summer 1999, Homework 7 :: UFL Florida Computer Programming Homework

human body Notes Data Structures and AlgorithmsSummer-C Semester 1999 - M WRF 2nd Period CSE/E119, Section 7344Homework 7 -- Due Wed 21 July 1999 09.30am (Revised Date)In class, we discussed minimum spanning trees (MSTs) and the algorithmic rules that derive MSTs from a graph specification. Using your class notes as a guide, answer the interest questions.Note The graph specifications from Homework 5 have been used with gauzy modifications, to make the data structures more familiar for you.Comments in response to assimilator questions are in red typeface. * scruple 1. Write pseudocode (not Java code) for Prims algorithm that we discussed in class. Beside each step, economize the number of external I/O, retentiveness I/O, incrementation, comparison, and other types of operations employed. Note in the above interpretation that Prims algorithm (for MST) is to be used, not Dijkstras (for Shortest Path). The use of Dijkstras was a typo...my apologies... Then, constru ct a work budget for each type of operation, together with a Big-Oh visualize of complexity for each of the following graph representations (a) contiguousness matrix, (b) edge list, and (c) adjacency list. * Question 2. retell Question 1 for Kruskals algorithm that we discussed in class. * Question 3. Given the following graph specification (assume directed edges only) for G = (V,E), write out the order of edges with which Prims algorithm constructs the MST, starting at vertex a. (The ternary value (integer) in each edge triple is its weight.) (1 point each) (a) V = a,b,c,d,e,f, E = (a,b,1), (b,c,3), (a,c,2), (c,d,4), (c,e,5), (e,f,2),(b,f,3). (b) V = a,b,c,d,e,f, E = (d,a,2), (b,c,4), (a,b,2), (e,b,3), (c,e,1), (b,d,1). (c) Analyze the complexity of each baptistery ((a) and (b), above) by constructing a work budget similar to Question 1, only if for the adjacency list representation only, followed by a Big-Oh estimate. (2 points total) * Qu estion 4. cite Question 3 with b as the start vertex. * Question 5. reduplicate Question 3 for Kruskals instead of Prims, without opine to the start vertex. * Question 6. Repeat Question 3 for Kruskals instead of Prims, using the following graph specifications, without regard to the start vertex

No comments:

Post a Comment