Está en la página 1de 2

# CS 261 - Problem Set One

## Due Date: Thursday, January 24, 2013, by end of lecture

• Please make your answers clear and concise. In most cases, you should not need more than
the equivalent of a page with size 12 font typed. You’re more likely to get points subtracted
you can.

## • Searching for answers on the Web is not allowed.

• Every time you are asked to design an algorithm, please provide proof of correctness and
compute/prove the approximation factor. Also, explain why your algorithm is polynomial-
time. Provide exact running-time analysis where required.

1. (15 points) Consider a Steiner tree problem with S being the set of special nodes. Show
that an algorithm that chooses one of the nodes in S and constructs a shortest-path tree
to all the rest of the nodes in S has high (bad) approximation factor. Can you produce an
example where the approximation factor is polynomial in n, the number of nodes in the input
graph?

2. (15 points) The non special nodes that participate in the optimum solution to the Steiner
Tree problem are called the ”Steiner Nodes”. Show that if you are given the set of Steiner
Nodes, then you can solve the Steiner Tree problem to optimality in polynomial time. One
way to view this as showing that the hardness of the Steiner Tree problem lies in ﬁnding the
Steiner Nodes.

3. (20 points) Consider a variant of the traveling salesman problem where we are given a graph
with n nodes and m edges (not necessarily complete) and want to visit all edges instead of all
vertices. Assume each edge has weight equal to 1. The underlying graph is undirected and
you are allowed to traverse an edge multiple times.

(a) (8 points) Prove that there is a tour of no more than 2m weight that visits every edge.
[Hint: recall techniques used for TSP approximation.]
(b) (12 points) Prove that there is a tour of no more than m + O(n) weight that visits
every edge. [Hint: Think how one might use a spanning tree. Observe that if you solve
the second part correctly, you do not need to solve the ﬁrst part.]

4. (20 points) Suppose we have a weighted graph that is not necessarily complete and with-
out triangle inequality. Consider a variant of TSP on this graph where we want to ﬁnd a
minimum total cost cycle that visits all the nodes, but we are allowed to revisit nodes and
edges. Explain how to modify the algorithm presented in class to obtain a 1.5-factor approx-
imation algorithm for this variant. Explain how to modify proof of correctness and of the
approximation factor.

1
5. (15 points) The general Maximum Clique (MC) problem is to ﬁnd a maximum set of nodes
in an undirected graph that form a clique, i.e. there is an edge connecting each two nodes
in the set. The decision version of this problem is ”given k, decide whether there is a clique
of size k in the input graph”. Consider the Maximum Clique problem restricted to graphs
where every vertex has degree at most 3, call it MC3.

## (a) (3 points) Is MC3 in NP ? (Explain)

(b) (5 points) What is wrong with the following proof of NP-completeness for MC3? We
know that the MC problem in general graphs is NP-complete, so it is enough to present
a reduction from MC3 to MC. Given a graph G of degree 3 and a parameter k, the
reduction leaves the graph and the parameter unchanged: clearly the output of the
reduction is a possible input for the MC problem. Furthermore, the answer is YES for
the MC problem if and and only if it was YES for the MC3 problem. This proves the
correctness of the reduction and the NP-completeness.
(c) (7 points) Give a polynomial running time algorithm for MC3.

6. (15 points) Given an algorithm (black-box) that computes a maximum cardinality matching,
explain how to obtain a minimum edge cover.