0% found this document useful (0 votes)
9 views2 pages

Sheet-13

Uploaded by

Vishakha Agarwal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views2 pages

Sheet-13

Uploaded by

Vishakha Agarwal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

COL351: Analysis and Design of Algorithms Fall 2024

Practice Sheet 13
Announced on: Nov 15 (Thu)

1. Recall that in the V ERTEX C OVER problem, we are given an undirected graph G = (V, E) and
an integer k. The goal is to compute a subset of vertices S ⊆ V such that |S| ⩽ k and for every
edge e ∈ E, there exists a vertex v ∈ S such that e is incident to v. If no such subset exists,
declare “no solution”.
Suppose you have algorithm A, which, given a graph G and a number k, outputs YES if and
only if G has a vertex cover of size at most k. Assuming that A runs in polynomial time, show
that you can find a vertex cover of minimum size in polynomial time.

2. The D IRECTED H AMILTONIAN C YCLE problem is as follows: Given a directed graph G, is


there a cycle that contains all the vertices? Suppose you have a polynomial-time algorithm
for this problem. Show that you can also find such a cycle (if it exists) in polynomial time.

3. The U NDIRECTED H AMILTONIAN C YCLE problem can be defined similarly as above for
undirected graphs. The U NDIRECTED H AMILTONIAN PATH problem is as follows: Given an
undirected graph G, is there a path that contains all the vertices? Show that U NDIRECTED
H AMILTONIAN PATH reduces to U NDIRECTED H AMILTONIAN C YCLE.

4. Suppose you are consulting for a group that manages a high-performance real-time system in
which asynchronous processes use shared resources. Thus, the system has a set of n processes
and a set of m resources. At any given point in time, each process specifies a set of resources
that it requests to use. Many processes might request each resource at once; but it can only be
used by a single process at a time. Your job is to allocate resources to processes that request
them. If a process is allocated all the resources it requests, then it is active; otherwise, it is
blocked. You want to perform the allocation to maximize the number of active processes. Thus,
we phrase the R ESOURCE R ESERVATION problem as follows: Given a set of processes and
resources, the set of requested resources for each process, and a number k, is it possible to
allocate resources to processes so that at least k processes will be active? Show that R ESOURCE
R ESERVATION is NP-hard.
Hint: Show a reduction from I NDEPENDENT S ET.

5. Given an undirected graph G = (V, E), a feedback vertex set is a set X ⊆ V with the property
that G − X has no cycles. The U NDIRECTED F EEDBACK V ERTEX S ET problem asks the
following question: Given an undirected graph G and an integer k, does G contain a feedback

1
Tutorial Sheet 13:

vertex set of size at most k? Prove that the U NDIRECTED F EEDBACK V ERTEX S ET is NP-hard.
Hint: Show a reduction from V ERTEX C OVER.

6. Consider a set A = { a1 , . . . , an } and a collection B1 , B2 , . . . Bm of subsets of A. (That is, Bi ⊆ A


for each i.) We say that a set H ⊆ A is a hitting set for the collection B1 , B2 , . . . , Bm if H
contains at least one element from each Bi , i.e., if H ∩ Bi is nonempty for each i. We now
define the H ITTING S ET problem as follows: We are given a set A = { a1 , . . . , an }, a collection
B1 , B2 , . . . , Bm of subsets of A, and a number k. We are asked whether there exists a hitting
set H ⊆ A for B1 , B2 , . . . , Bm so that the size of H is at most k? Prove that H ITTING S ET is
NP-hard.
Hint: Show a reduction from V ERTEX C OVER.

7. In an undirected graph G = (V, E), we say a subset D ⊆ V is a dominating set if every v ∈ V


is either in D or adjacent to at least one member of D. In the D OMINATING S ET problem, the
input is a graph and a number k, and the aim is to find a dominating set in the graph of size
at most k, if one exists. Prove that this problem is NP-hard.
Hint: Show a reduction from V ERTEX C OVER.

8. Consider a greedy algorithm for V ERTEX C OVER that repeatedly picks a vertex that “covers”
the most uncovered edges. Show that there exist bipartite graphs on n vertices for which the
size of the vertex cover produced by the greedy algorithm can be at least Ω(log2 n) times the
size of the optimal vertex cover.

You might also like