CMPSCI 611: Advanced Algorithms
David Mix Barrington
Fall, 2005
Homework Assignment #5
Posted Wednesday 30 November 2005
Due on paper to the CMPSCI main office by 3:00 pm EST Wednesday 13
December 2005
(Due for off-campus students by 3:00 pm EST Wednesday 20 December 2005)
There are four questions for
100 total points. They are based on
lectures 19-25, and thus on Chapters 8 and 9 of the Adler notes.
Corrections in orange made 8 December 2005.
Corrections in purple made 12 December 2005.
Students are responsible for understanding and following
the academic honesty
policies indicated on the course main page.
Problem 5.1 (45):
(see last four slides of revised Lecture 21)
The DUAL-BIN-PACKING optimization
problem has as input a sequence of n items with their
sizes and a number b.
A valid solution is a division of the items into b
bins, the score is the total size of the items in the bin that is most full, and
the goal is to minimize the score.
- (a,5) Prove carefully that this optimization problem is NP-hard.
- (b,15) Algorithm A0 is an on-line approximation algorithm for
the special case of DUAL-BIN-PACKING with b = 2.
The inputs are considered in
order, and each input is placed in the bin that currently has less in it.
Prove that for any sequence of inputs, A0 gets a score that is at
most 3/2 times the optimal division (from an off-line algorithm). Give a
sequence of inputs on which it does this badly. (Hint: There is a solution
with fewer than six items, each with an integer size that is 3 or less.)
- (c,15) For any integer k, Algorithm Ak is a partially on-line
approximation algorithm for the b = 2 case of
DUAL-BIN-PACKING. It takes the
k largest items, finds an optimal partition of them by exhaustive search, then
considers the remaining items in the given order
and places each in the bin that currently
is least full. Prove that for any k, Ak is a (k+3)/(k+2)
approximation algorithm for this optimization problem. Describe an input
sequence that does this badly.
- (d,10) Argue that from these algorithms Ak, we can devise a
PTAS for the b = 2 case of DUAL-BIN-PACKING.
Analyze the running time in terms
of n and ε -- is this an FPTAS?
(I renamed the number of bins from "k" to "b" to avoid
possible confusion.)
Problem 5.2 (20): (adapted from Problem
35-2 in CLRS)
Let G = (V,E) be an undirected graph and let k be a positive integer.
We define the power graph Gk to have vertex set
Vk (all sequences of k elements of V, possibly with repeats) and
define there to be an edge from (e1,...,ek) to
(f1,...,fk) iff for every i, either there is an edge
(ei,fi) in E or ei = fi.
- (a,10) Prove that if the maximum clique size of G is c, then the maximum
clique size in Gk is exactly ck.
- (b,10) Suppose you have a polynomial-time
approximation algorithm for MAX-CLIQUE
that a constant ratio r with r>1. Construct
a PTAS for MAX-CLIQUE.
(Do not use the fact that approximating MAX-CLIQUE is NP-hard.)
I originally asked for an FPTAS, as CLRS does, but
the construction from (a) does not give this. You can use the PCP Theorem
to prove that an FPTAS exists, but I asked you not to apply that theorem here.
Problem 5.3 (25):
The optimization problem MIN-COLOR is to input an undirected graph with n
vertices and find a coloring with as few colors as possible. There is a
significant body of research on how well we can do in poly-time if the optimal
coloring has three colors.
- (a,5) Prove that if a graph has maximum degree d, you can produce a
coloring with at most d+1 colors in polynomial time.
- (b,10) Prove that you can color a 3-colorable graph with O(√n)
colors in polynomial time. (Hint: First show that in a 3-colorable graph,
the neighbors of any given vertex are 2-colorable. Then note that any graph
either has maximum degree √n or has a set of √n vertices that you
can take care of with only two colors. This should give you a recursive
algorithm.)
- (c,10) Suppose that the graph has only O(n) edges. Suppose we color the
graph by choosing one of √n colors uniformly and independently for each
vertex. Show that with high probability, we can adjust this random coloring
in linear time
to a valid one using O(√n) more colors. (The
correction is to prevent you from just using the solution to 5.3(b) in
polynomial time, or even finding the three-coloring if you had unlimited
time.)
Problem 5.4 (10): (from Problem 29-1 of CLRS)
The linear programming problem is to maximize or minimize a
linear function subject to a set of constraints that are linear inequalities.
The linear inequality feasibility problem takes as input a set
of m linear inequalities in n variables and asks whether there is a setting
of the variables that satisfies all the inequalities. Show that each of these
problems is Cook-reducible to the other.
Last modified 12 December 2005