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

Tutorial of Algorithms

Tutorial

Uploaded by

Pta Nhi
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
9 views2 pages

Tutorial of Algorithms

Tutorial

Uploaded by

Pta Nhi
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 2

Design and Analysis of Algorithms

Tutorial 6

November 14, 2024

1. Consider 6-Cycle Deletion problem, where given a graph G the goal is to delete minimum
number of vertices such that the resultant graph does not contain any cycle of length 6. Show
that 6-Cycle Deletion is NP-Complete.

2. Use the following lemma to design a 4k nO(1) randomized algorithm for the Feedback Vertex
Set problem, where k is the required solution size and n is the number of vertices in the input
graph.

Lemma 1. For a graph G and a feedback vertex set S ⊆ V (G) of G, at least half of the edges
in G are incident on S.

3. 3-Approximation Algorithm for Cluster Vertex Deletion (CVD) problem. Where, in the CVD
problem given a graph G, the goal is to delete minimum set of vertices such that the resultant
graph is a disjoint set of clusters (cliques).

4. Consider the following maximization version of the 3-Dimensional Matching Problem. Given
disjoint sets X, Y , and Z, and given a set T ⊆ X × Y × Z of ordered triples, a subset M ⊆ T
is a 3-dimensional matching if each element of X ∪ Y ∪ Z is contained in at most one of these
triples. The Maximum 3-Dimensional Matching Problem is to find a 3-dimensional matching
M of maximum size. (The size of the matching, as usual, is the number of triples it contains.
You may assume |X| = |Y | = |Z| if you want.) Give a polynomial-time algorithm that finds
a 3-dimensional matching of size at least 1/3 times the maximum possible size.

5. Consider a balls-and-bins experiment with 2n balls but only two bins. As usual, each ball
independently selects one of the two bins, both bins equally likely. The expected number of
balls in each bin is n. In this problem, we explore the question of how big their difference is
likely to be. Let X1 and X2 denote the number of balls in the two bins, respectively. (X1
and X2 are random variables.) Prove that for any ϵ > 0 there is a constant c > 0 such that

the probability P r[X1 − X2 > c n] ≤ ϵ.

6. Consider MAX-SAT Problem: Given a set of clauses C1 , . . . , Ck over a set of variables X =


{x1 , . . . , xn }, find a truth assignment satisfying as many of the clauses as possible. Each
clause has at least one term in it, and all the variables in a single clause are distinct, but
otherwise we do not make any assumptions on the length of the clauses: There may be clauses
that have a lot of variables, and others may have just a single variable.

1
(a) First consider the randomized approximation algorithm we used for MAX 3-SAT, setting
each variable independently to true or false with probability 1/2 each. Show that the
expected number of clauses satisfied by this random assignment is at least k/2, that is,
at least half of the clauses are satisfied in expectation. Give an example to show that
there are MAX SAT instances such that no assignment satisfies more than half of the
clauses.
(b) If we have a clause that consists only of a single term (e.g., a clause consisting just
of x1 , or just of x¯2 ), then there is only a single way to satisfy it: We need to set
the corresponding variable in the appropriate way. If we have two clauses such that one
consists of just the term xi , and the other consists of just the negated term x̄i , then this is
a pretty direct contradiction. Assume that our instance has no such pair of “conflicting
clauses”; that is, for no variable xi do we have both a clause C = {xi } and a clause
C ′ = {x̄i }. Modify the randomized procedure above to improve the approximation
factor from 1/2 to at least 0.6. That is, change the algorithm so that the expected
number of clauses satisfied by the process is at least 0.6k.
(c) Give a randomized polynomial-time algorithm for the general MAX-SAT Problem so
that the expected number of clauses satisfied by the algorithm is at least a 0.6 fraction
of the maximum possible.

7. Let G be an undirected graph with n nodes and m edges. For a subset X ⊆ V (G), we use
G[X] to denote the subgraph induced on X—that is, the graph whose node set is X and
whose edge set consists of all edges of G for which both ends lie in X. We are given a natural
number k ≤ n and are interested in finding a set of k nodes that induces a “dense” subgraph
of G; we’ll phrase this concretely as follows. Give a polynomial-time algorithm that produces,
for a given natural number k ≤ n, a set X ⊆ V (G) of k nodes with the property that the
induced subgraph G[X] has at least mk(k−1)
n(n−1) edges.
You may give either (a) a deterministic algorithm, or (b) a randomized algorithm that has
an expected running time that is polynomial, and that only outputs correct answers.

You might also like