404_HW10_F11

404_HW10_F11 - UML CS Analysis of Algorithms 91.404...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
UML CS Analysis of Algorithms 91.404 (section 201) Fall, 2011 1 of 2 Homework Set #10 Assigned: Monday, 12/5 Due: Monday, 12/12 (start of lecture) This assignment covers textbook material in Chapters 22-23. Note : Partial credit for wrong answers is only given if work is shown. For this assignment, use the BFS procedure on p. 595 of our textbook and the DFS procedure on p. 604 instead of the pseudocode in the class handout. 1 . (25 points) For the undirected, unweighted graph G1 in Figure 1: a) (3 points) Show an adjacency list representation of G1. Use lexicographic ordering. b) (2 points) Is an adjacency list representation better for G1 than an adjacency matrix? Justify your answer. c) (5 points) Draw the Breadth-First Search tree consisting of tree edges that result from a Breadth-First Search of G1 with node A as the source. d) (5 points) For each node reachable from A, show the shortest path in G1 from A to that node. Give the length (i.e. number of edges) of each such shortest
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

404_HW10_F11 - UML CS Analysis of Algorithms 91.404...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online