CS70_Midterm_1_Sum_ 2008_Solution

CS70_Midterm_1_Sum_ 2008_Solution - CS570 Analysis of...

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

View Full Document Right Arrow Icon
CS570 Analysis of Algorithms Summer 2008 Exam I Name: _____________________ Student ID: _________________ ____4:00 - 5:40 Section ____6:00 – 7:40 Section Maximum Received Problem 1 20 Problem 2 20 Problem 3 10 Problem 4 15 Problem 5 10 Problem 6 10 Problem 7 15 Total 100 2 hr exam Close book and notes
Background image of page 1

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

View Full DocumentRight Arrow Icon
1) 20 pts Mark the following statements as TRUE or FALSE . No need to provide any justification. [ TRUE/FALSE ] There exist a perfect matching and a corresponding preference list such that every man is part of an instability, and every woman is part of an instability. FALSE [ TRUE/FALSE ] A greedy algorithm always returns the optimal solution. FALSE [ TRUE/FALSE ] The function 100n + 3 is O(n^2) FALSE [ TRUE/FALSE ] You are given n elements to insert into an empty heap. You could directly call heap insert n times. Or you could first sort the elements and then call heap insert n times. In either case, the asymptotic time complexity is the same. TRUE [ TRUE/FALSE ] If a problem can be solved correctly using the greedy strategy, there will only be one greedy choice (e.g. “choose the object with highest value to weight ratio”) for that problem that leads to the optimal solution. FALSE [ TRUE/FALSE ] The Depth First Search algorithm can not be used to test whether a directed graph is strongly-connected. FALSE [ TRUE/FALSE ] Consider an undirected graph G=(V, E) with non-negative edge weights. Suppose all edge weights are different. Then the edge of maximum weight can be in the minimum spanning tree. TRUE [ TRUE/FALSE ]
Background image of page 2
Consider a perfect matching S where Mike is matched to Susan. Suppose Mike prefers Winona to Rachel. Then the pair (Mike, Rachel) can never be an instability with respect to S. FALSE
Background image of page 3

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

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

Page1 / 6

CS70_Midterm_1_Sum_ 2008_Solution - CS570 Analysis of...

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

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