Docsity

CMSC 451 HW7: Max Matching, Min Shipping, Perfect Match, Vertex Cover - Prof. Samir Khulle, Assignments of Computer Science

Toggle sidebar
bg1
Spring 2009 CMSC 451: Homework 7 Samir Khuller
Apr 28
(1) A maximal matching is a matching Msuch that no edges can be added to the match-
ing, without destroying the property that it is a matching. In other words, for any
edge e,e∪Mis not a matching. First give a linear time algorithm for finding a
maximal matching in a graph. Then prove that the size of the maximal matching is
at least half the size of a maximum matching.
(2) Design a polynomial time algorithm for the following problem. You have a directed
network, with two special vertices sand t. Each edge ehas a positive capacity c(e)
and a positive delay d(e). The time to ship σunits of data from sto ton path Pis
σ
C+Pe∈Pd(e), where C= mine∈Pc(e). Design a polynomial time algorithm to find
the path that will minimize the shipping time? You should also give an argument
that shows why your method works.
(3) Prove that a k-regular bipartite graph always has a perfect matching. (All nodes have
degree exactly k.)
(4) Let G= (X, Y, E ) be a bipartite graph. Assume for simplicity that |X|=|Y|.
A subset S⊆(X∪Y) is called a vertex cover if for each edge e= (x, y) in Eeither
x∈Sor y∈S(or both).
Let M∗be a maximum matching in G.
(a) Prove that if Sis a vertex cover then |S| ≥ |M∗|.
(b) Give a polynomial time algorithm to find the minimum cardinality vertex cover.
Give a proof for its correctness.
1

Partial preview of the text

Download CMSC 451 HW7: Max Matching, Min Shipping, Perfect Match, Vertex Cover - Prof. Samir Khulle and more Assignments Computer Science in PDF only on Docsity!

Spring 2009 CMSC 451: Homework 7 Samir Khuller

Apr 28

(1) A maximal matching is a matching M such that no edges can be added to the match- ing, without destroying the property that it is a matching. In other words, for any edge e, e ∪ M is not a matching. First give a linear time algorithm for finding a maximal matching in a graph. Then prove that the size of the maximal matching is at least half the size of a maximum matching.

(2) Design a polynomial time algorithm for the following problem. You have a directed network, with two special vertices s and t. Each edge e has a positive capacity c(e) and a positive delay d(e). The time to ship σ units of data from s to t on path P is σ C +^

∑ e∈P d(e), where^ C^ = mine∈P^ c(e). Design a polynomial time algorithm to find the path that will minimize the shipping time? You should also give an argument that shows why your method works.

(3) Prove that a k-regular bipartite graph always has a perfect matching. (All nodes have degree exactly k.)

(4) Let G = (X, Y, E) be a bipartite graph. Assume for simplicity that |X| = |Y |. A subset S ⊆ (X ∪ Y ) is called a vertex cover if for each edge e = (x, y) in E either x ∈ S or y ∈ S (or both). Let M ∗^ be a maximum matching in G.

(a) Prove that if S is a vertex cover then |S| ≥ |M ∗|. (b) Give a polynomial time algorithm to find the minimum cardinality vertex cover. Give a proof for its correctness.