CS31005 Algorithm-II MA 2016
CS31005 Algorithm-II MA 2016
1. Consider the problem of computing the minimum cardinality vertex cover in a bipartite
graph G(A U B, E) where (i) all the edges in the edge set E have one vetex in A and
another vertex in B, (ii) we are given a maximum cardinality matching M in G.
Suppose we select the vertex with larger degree in each edge of M in the proposed
minimum cardinality vertex cover; if both vertices in an edge of M have the same
degree then we choose any arbitrary one of them in the proposed vertex cover. Will
this method give us a minimum cardinality vertex cover? [The degree of a vertex is
the number of edges in G incident on the vertex.]
Justify your answer.
[10 marks]
2. The next fit 0-1 bin-packing heuristic fills bins one by one with the given set of items by
checking whether the last filled bin can accomodate the current item being considered.
If the last bin cannot accomodate the current item then the current item uses a new
bin. All bins are of capacity one and each item has size at most one. Show that the
number of bins used by this heuristic is at most twice the minimum number of bins
required for the given set of items.
[10 marks]
3. Consider the greedy algorithm for computing a weighted set cover, where positive
weights are assigned to the sets. There are n elements and n + 1 sets, where the ith
element e, has weight n-~+l' The first n sets are S, = {e.} where e, is the ith element,
is i S n. The last set is Sn+l = {el, e2, ... , en} and has weight 1 + E, where 0 S E S 1.
Here, epsilon is a constant with respect to n.
What is the weight of the set cover computed by the greedy algorithm? Is this the
minimum weight for a set cover in the above system? For what values of n with respect
to E is the weight of the minimum weighted set cover 1 + E?
Explain your answers justifying them.
[8+4+3 marks]
4. We wish to minimize L~=l Xi, where Xl, X2, X3, X4, X5, X6 are all non-negative integers
and the following seven inequalities are satisfied. Namely, Xl +X4 S I, Xl +X5 S I, Xl +
X6 S I, X2+X4 S I, X2+X5 S I, X3+X5 S I, and X2+X6 S 1. Determine the minimum
value sought above. Also, derive the dual linear program for the relaxed version of the
1
above integer linear program. Determine the maximum objective function value for
feasible solutions of this dual relaxation.
Justify and explain your answers.
[12+8 marks]
5. Precisely state the P-complete decision version problem statement for the vertex
cover problem for undirected graphs. State the decision version statement for the
independent set problem for graphs. Using the NP-compleness of the vertex cover
problem above, show that the decision version of your independent set problem too is
NP-complete.
[5+5+5 marks]
6. Given an integer n > 10 and a positive integer r , 1 :S r < n, how would you verify
that r is indeed a primitive root of the prime number n? Is your procedure efficient?
Explain. Illustrate for n = 23 for a suitable primitive root r of 23.
[5+5+5 marks]
7. Show that a network with integral capacities for all edges has a maximum flow function
fs,t for source s and sink t (s and t are vertices in the network), such that fs,t assigns
integral amounts of flow to each edge of the network.
[7 marks]
8. State the max-flow-min-cut theorem. Define the term (s, t)-cut capacity of an (s, t)-cut
in a network G(V, E, c), where sand t are the source and the sink vertices and c is the
capacity function that assigns a positive capacity c( e) to each directed edge e of the
network G.
Prove that the maximum flow from s to t in G is at most the capacity of each (s, t)-cut
in G.
[3+2+3 marks]
=====================================================