mt2(2) - CS 373 Midterm 2 (April 3, 2001) Spring 2001 1....

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

View Full Document Right Arrow Icon
CS 373 Midterm 2 (April 3, 2001) Spring 2001 1. Using any method you like, compute the following subgraphs for the weighted graph below. Each subproblem is worth 3 points. Each incorrect edge costs you 1 point, but you cannot get a negative score for any subproblem. (a) a depth-Frst search tree, starting at the top vertex; (b) a breadth-Frst search tree, starting at the top vertex; (c) a shortest path tree, starting at the top vertex; (d) the maximum spanning tree. 8 7 5 6 0 3 9 10 12 2 1 4 11 2. (a) [4 pts] Prove that a connected acyclic undirected graph with V vertices has exactly V - 1 edges. (“It’s a tree!” is not a proof.) (b) Describe and analyze an algorithm that determines whether a given undirected graph is a tree, where the graph is represented by an adjacency list. (c) [2 pts] What is the running time of your algorithm from part (b) if the graph is repre- sented by an adjacency matrix? 3. Suppose we want to sketch the Manhattan skyline (minus the interesting bits like the Empire
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.

This note was uploaded on 12/15/2009 for the course 942 cs taught by Professor A during the Spring '09 term at University of Illinois at Urbana–Champaign.

Page1 / 2

mt2(2) - CS 373 Midterm 2 (April 3, 2001) Spring 2001 1....

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