Study Questions for Algorithms and Complexity | CMSC 858Y, Study notes of Computer Science

Study Questions Material Type: Notes; Professor: Khuller; Class: CMBNT OPTIMIZATION; Subject: Computer Science; University: University of Maryland; Term: Spring 2010;

Typology: Study notes

Pre 2010

Uploaded on 12/09/2010

udayankhurana
udayankhurana 🇺🇸

1 document

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Spring 2010 CMSC 858Y: Homework 1 Samir Khuller
Due in class: No official due date. Complete it before Mar 1..
(1) A maximal matching is a matching Msuch that no edges can be added to the matching,
without destroying the property that it is a matching. In other words, for any edge e,eMis
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) Consider a set of costs cij 0 on the edges of a complete graph Knwith nnodes, and let
S {v1, . . . , vn}. We wish to find a subgraph of Knthat has odd degree at nodes in S, an
even degree (possibly zero) at all other nodes, and as low cost as possible. Show that this is a
minimum weight matching problem. (Min weight matching can be solved in polynomial time
in graphs that are not necessarily bipartite.)
(3) We are given a connected graph G= (V, E) and a cost function c:EZ+. We wish to
find a walk, traversing each edge of Eat least once, such that the total cost of the walk (with
multiple traversals of an edge charged multiply) is as small as possible. Give a polynomial
time algorithm for this problem. (You may assume a solution to problem (2) even if you did
not solve problem (2).)
(4) The bmatching problem is the following: given a bipartite graph B= (V, U, E) and a
function b:VUZ+, is there a subset MEsuch that for each vVU,vis incident
upon exactly b(v) edges in M? How would one design a strongly polynomial algorithm for this
problem? (An algorithm is strongly polynomial if its running time depends only on the input
size (i.e., number of vertices or edges) and not on the particular numbers/weights. In this case
the running time should not depend on the bvalues.)
(5) Let G= (X, Y , E) be a bipartite graph. Assume for simplicity that |X|=|Y|.
A subset S(XY) is called a vertex cover if for each edge e= (x,y ) in Eeither xSor
yS(or both).
Let Mbe 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.
(6) 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 PePd(e) + σ
Cwhere
C= minePc(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.
1

Partial preview of the text

Download Study Questions for Algorithms and Complexity | CMSC 858Y and more Study notes Computer Science in PDF only on Docsity!

Spring 2010 CMSC 858Y: Homework 1 Samir Khuller

Due in class: No official due date. Complete it before Mar 1..

(1) A maximal matching is a matching M such that no edges can be added to the matching, 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) Consider a set of costs cij ≥ 0 on the edges of a complete graph Kn with n nodes, and let S ⊆ {v 1 ,... , vn}. We wish to find a subgraph of Kn that has odd degree at nodes in S, an even degree (possibly zero) at all other nodes, and as low cost as possible. Show that this is a minimum weight matching problem. (Min weight matching can be solved in polynomial time in graphs that are not necessarily bipartite.)

(3) We are given a connected graph G = (V, E) and a cost function c : E → Z+. We wish to find a walk, traversing each edge of E at least once, such that the total cost of the walk (with multiple traversals of an edge charged multiply) is as small as possible. Give a polynomial time algorithm for this problem. (You may assume a solution to problem (2) even if you did not solve problem (2).)

(4) The b − matching problem is the following: given a bipartite graph B = (V, U, E) and a function b : V ∪ U → Z+, is there a subset M ⊆ E such that for each v ∈ V ∪ U , v is incident upon exactly b(v) edges in M? How would one design a strongly polynomial algorithm for this problem? (An algorithm is strongly polynomial if its running time depends only on the input size (i.e., number of vertices or edges) and not on the particular numbers/weights. In this case the running time should not depend on the b values.)

(5) 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.

(6) 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

e∈P d(e) +^

σ C 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.