CMPSCI 611x: Advanced Algorithms
David Mix Barrington
Spring, 2006
Homework Assignment #5
Posted Thursday 11 May 2006
Due by fax to 413-545-1249, attention "Prof. Barrington", by 4:00 pm EST
Friday 26 May 2006
There are four questions for 100 total points. All are based on
lectures 19-25, and thus on Chapters 8 and 9
of the Adler notes.
Students are responsible for understanding and following
the academic honesty
policies indicated on the course main page.
Problem 5.1 (25):
(cf. Kleinberg-Tardos Exercise 11.3) Consider the optimization version of the
SUBSET-SUM problem where we are given n items, each with an integer size, and
an integer target, and we want to get as close to the target as possible
without exceeding it.
- (a,10) A natural greedy algorithm is to consider each item in turn and
take it iff it fits with the items taken already. How badly could this
perform? Specifically, what is the largest constant α you can find so
that this greedy algorithm will always get at least α times the weight
of the optimal set of items that will fit?
- (b,15) Now consider the same algorithm where the items have been sorted,
heaviest first, before we consider each in turn. Again, find the largest
α such that this algorithm always achieves at least α times the
optimal score.
Problem 5.2 (25): (cf. Kleinberg-Tardos Exercise 11.4)
Consider a set of items A, each with a positive integer weight, and a family
of subsets B1,..., Bm. A hitting set for the
B's is a set of items that contains at least one item in each Bi.
Our optimization problem is to find a hitting set of minimum total weight.
- (a,10) Prove that this optimization problem is NP-hard.
- (b,15) Describe and validate a poly-time algorithm that finds a hitting
set of total weight b times the optimal weight, where b is the maximum number
of elements in any of the sets Bi.
- Problem 5.3 (25): (cf, Kleinberg-Tardos exercise 11.10)
An n by n grid graph has n2 vertices (i,j), where
0 ≤ i,j < n, and edges from (i,j) to (i+1,j), (i-1,j), (i,j+1), and (i,
j-i) whenever these vertices exist. Consider a grid graph where each vertex
has a distinct non-negative integer weight. Our optimization problem is to
find an independent set of maximum total weight. Describe a poly-time
algorithm that will find a set with at least 1/4 the optimum weight. (Hint:
Use a greedy algorithm, and show that given any node s, either s or a heavier
neighbor of s is chosen by the algorithm.)
- Problem 5.4 (25): Linear programming is useful for showing that an
optimization problem is solvable in polynomial time.
- (a,15) The fractional knapsack problem has the same input as
the knapsack problem, but we are allowed to consider solutions where some
fraction t of an item is chosen, where 0 ≤ t ≤ 1. The fraction t of
item i has weight tw(i) and value tv(i). Show that this problem can be
formulated as a linear program. Describe a simple algorithm that achieves the
optimal value for a given weight target.
- (b,10) (cf. CLRS Exercise 29.2-7) In the minimum-cost multicommodity
flow problem we have a directed graph where each edge has a non-negative
capacity c(u,v) and a cost a(u,v). We have k commodities to be routed, each
with a source, a destination, and a demand. We need to route all k flows on
the same graph so that the total flow of all commodities over each edge is at
most equal to the capacity of the edge. The cost we pay on each edge is
a(u,v)f(u,v), where f(u,v) is the total flow of all commodities. Our goal
is to route all the flows with minimum total cost. Argue that this optimization
problem can be formulated as a linear programming problem and is thus solvable
in poly-time.
Last modified 11 May 2006