CS570
Analysis of Algorithms
Fall 2007
Exam I
Name: _____________________
Student ID: _________________
Maximum
Received
Problem 1
20
Problem 2
20
Problem 3
12
Problem 4
12
Problem 5
12
Problem 6
12
Problem 7
12
Note: The exam is closed book closed notes.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document1)
20 pts
Mark the following statements as
TRUE
,
FALSE
. No need to provide any
justification.
[ TRUE/FALSE ]
A greedy algorithm is any algorithm that follows the heuristic of making the locally
optimum choice at each stage with the hope of finding the global optimum.
T
[ TRUE/FALSE]
BFS can be used to find the shortest path between any two nodes in a weighted graph.
F
[ TRUE/FALSE]
DFS can be used to find the shortest path between any two nodes in a nonweighted
graph.
F
[ TRUE/FALSE]
BFS can be used to test whether a graph is bipartite
T
[ TRUE/FALSE ]
If T is a spanning tree of G and e an edge in G which is not in T, then the graph T+e
has a unique cycle.
T
[ TRUE/FALSE ]
Let T be a spanning tree of a graph G and e an edge of G which is not in T. For any
edge f that is on a cycle in graph T+e, the graph T + e
−
f is a spanning tree.
T
[ TRUE/FALSE ]
Given a graph G(V,E) with distinct costs on edges and a set S
⊆
V, let (u, v) be an
edge such that (u, v) is the minimum cost edge between any vertex in S and any
vertex in VS. Then, the minimum spanning tree of G must include the edge (u, v).
T
[ TRUE/FALSE ]
If f, g, and h are positive increasing functions with f in O(h) and g in
Ω
(h), then the
function f+g must be in
Θ
(h).
F
[ TRUE/FALSE ]
If
a divide and conquer algorithm divides the problem is half at every step, the log(n)
factor related to the depth of the recursion tree will cause the algorithm to have a
lower bound of
Ω
(n log(n))
F
[ TRUE/FALSE ]
Suppose that in an instance of the original Stable Marriage problem with n couples,
there is a man M who is last on every woman's list and a woman W who is last on
This is the end of the preview.
Sign up
to
access the rest of the document.
 Fall '06
 Shamsian
 Algorithms, Graph Theory, Shortest path problem, Divide and conquer algorithm, base station

Click to edit the document details