600.363/463 Final Exam
8:20-9:50 Monday 12/8/03
1 Set-covering problem (20 points)
A dominating set in a graph G = (V, E ) is a subset D V of
vertices, such that for every vertex v V , either v D or there is
a neighbor u of v that belongs to D. A minimum
Solution to Homework 1
2.3-3
Induction base case: for k=1, which means n=2. nlogn gives 2log2=2, which means the
base case holds.
Hyposthesis: suppose the solution holds for k,
Induction Step: For k+1, which means n=2 k +1 , we have:
T(2 k +1 )=2T(2 k +1
600.363/463 Solution to Homework 3
Due: Wednesday, 10/1
7.3-2
In the worst case, when RANDOMIZED-PARTITION partition the array into
n-1 elements and 0 elements. Number of call to RANDOM = Number of call
to RANDOMIZED-PARTITION.
T (n) = T (n 1) + 1 So we k
600.363/463 Homework 5 Solution
Posted: 10/16/03
Due: Wednesday, 10/22/03
22.1-5
Let A be the adjacency matrix of the graph G and B the adjacency
matrix of the graph G2 . B [i, j ] = 1 i k s.t.A[i, k ] = 1andA[k, j ] = 1
by denition. To compute B , multip
600.363/463 Solution to homework 6
Posted: 10/22/03
Due: Wednesday, 10/29/03
22.5-6
Let C1 , C2 , , Ck (k 1) be the strongly connected components
of G. Let Cl = cfw_v1 , v2 , , vi . Now in G , add one edge between
cfw_vj modi , vj +1modi , j = 1, 2, i fro
600.363/463 Solution to Homework 7
Posted: 10/29/03
Due: Wednesday, 11/5/03
24.1-3
The proof of Lemma 24.2 shows that for every v , d[v ] has attained
its nal value after length (any shortest-weight path to v ) iterations
of BELLMAN-FORD. Thus after m pas
600.363/463 Solution to Homework 9
Posted: 11/14/03
Due: Wednesday, 11/20/03
26.3-3
By denition, an augmenting path is simple path s ; t in the residual graph Gf . Since G has no edges between vertices in L and no
edges between vertices in R, neither does
600.363/463 Solution to Homework 10
Due: Wednesday, 12/2/2003
1 Floating source height
Imagine that the souces height would be oating, just like
the other vertices. ( Which means its height is not xed to |V |.)
Hower, we set a cap of |V | on the height of
600.363/463 Solution to Homework 11
Posted: 12/2/03
Due: Wednesday, 12/5/03
1. Weighted set-covering problem
In the original set-covering problem, it assumes the cost of adding
each set into the set cover is 1. Now lets consider another case.
For each set
600.363/463 Solution to Homework 8
Posted: 11/5/03
Due: Wednesday, 11/12/03
26.1-6
f1 + f2 satises skew symmetry and ow conservation, but might
violate the capacity constraint.
26.1-7
Prove it by verifying it satises all the three properties:
Capacity: f