Solutions for the Exam 9 January 2012

Similar documents
ACO Comprehensive Exam 9 October 2007 Student code A. 1. Graph Theory

Optimization Methods MIT 2.098/6.255/ Final exam

w (1) ˆx w (1) x (1) /ρ and w (2) ˆx w (2) x (2) /ρ.

IP Reference guide for integer programming formulations.

Some special clique problems

Graph Theory and Optimization Integer Linear Programming

The picture in figure 1.1 helps us to see that the area represents the distance traveled. Figure 1: Area represents distance travelled

Lecture #20. n ( x p i )1/p = max

Definitions and Theorems. where x are the decision variables. c, b, and a are constant coefficients.

Math 61CM - Solutions to homework 3

# fixed points of g. Tree to string. Repeatedly select the leaf with the smallest label, write down the label of its neighbour and remove the leaf.

(A sequence also can be thought of as the list of function values attained for a function f :ℵ X, where f (n) = x n for n 1.) x 1 x N +k x N +4 x 3

University of Colorado Denver Dept. Math. & Stat. Sciences Applied Analysis Preliminary Exam 13 January 2012, 10:00 am 2:00 pm. Good luck!

Lecture 20. Brief Review of Gram-Schmidt and Gauss s Algorithm

Complex Numbers Solutions

Math 778S Spectral Graph Theory Handout #3: Eigenvalues of Adjacency Matrix

Alternating Series. 1 n 0 2 n n THEOREM 9.14 Alternating Series Test Let a n > 0. The alternating series. 1 n a n.

CHAPTER 2 NEIGHBORHOOD CONNECTED PERFECT DOMINATION IN GRAPHS

On Random Line Segments in the Unit Square

Axioms of Measure Theory

BI-INDUCED SUBGRAPHS AND STABILITY NUMBER *

4.1 Sigma Notation and Riemann Sums

Chapter 6 Infinite Series

Davenport-Schinzel Sequences and their Geometric Applications

Homework Set #3 - Solutions

Test One (Answer Key)

MASSACHUSETTS INSTITUTE OF TECHNOLOGY 6.436J/15.085J Fall 2008 Lecture 19 11/17/2008 LAWS OF LARGE NUMBERS II THE STRONG LAW OF LARGE NUMBERS

15.083J/6.859J Integer Optimization. Lecture 3: Methods to enhance formulations

Square-Congruence Modulo n

Lemma Let f(x) K[x] be a separable polynomial of degree n. Then the Galois group is a subgroup of S n, the permutations of the roots.

Optimization Methods: Linear Programming Applications Assignment Problem 1. Module 4 Lecture Notes 3. Assignment Problem

Math 451: Euclidean and Non-Euclidean Geometry MWF 3pm, Gasson 204 Homework 3 Solutions

A class of spectral bounds for Max k-cut

Read carefully the instructions on the answer book and make sure that the particulars required are entered on each answer book.

TEACHER CERTIFICATION STUDY GUIDE

On Algorithm for the Minimum Spanning Trees Problem with Diameter Bounded Below

Basic Sets. Functions. MTH299 - Examples. Example 1. Let S = {1, {2, 3}, 4}. Indicate whether each statement is true or false. (a) S = 4. (e) 2 S.

Department of Informatics Prof. Dr. Michael Böhlen Binzmühlestrasse Zurich Phone:

A New Solution Method for the Finite-Horizon Discrete-Time EOQ Problem

NICK DUFRESNE. 1 1 p(x). To determine some formulas for the generating function of the Schröder numbers, r(x) = a(x) =

Optimally Sparse SVMs

Problem Set 2 Solutions

Weakly Connected Closed Geodetic Numbers of Graphs

Polynomial identity testing and global minimum cut

Product measures, Tonelli s and Fubini s theorems For use in MAT3400/4400, autumn 2014 Nadia S. Larsen. Version of 13 October 2014.

Lecture 2 Clustering Part II

ECE-S352 Introduction to Digital Signal Processing Lecture 3A Direct Solution of Difference Equations

MIDTERM 3 CALCULUS 2. Monday, December 3, :15 PM to 6:45 PM. Name PRACTICE EXAM SOLUTIONS

Dynamic Programming. Sequence Of Decisions

Dynamic Programming. Sequence Of Decisions. 0/1 Knapsack Problem. Sequence Of Decisions

Universal Subsets of Z n, Linear Integer Optimization, and Integer Factorization

It is often useful to approximate complicated functions using simpler ones. We consider the task of approximating a function by a polynomial.

Math 113, Calculus II Winter 2007 Final Exam Solutions

Math 155 (Lecture 3)

Linear Programming! References! Introduction to Algorithms.! Dasgupta, Papadimitriou, Vazirani. Algorithms.! Cormen, Leiserson, Rivest, and Stein.

1. By using truth tables prove that, for all statements P and Q, the statement

Math 220B Final Exam Solutions March 18, 2002

MATH 205 HOMEWORK #2 OFFICIAL SOLUTION. (f + g)(x) = f(x) + g(x) = f( x) g( x) = (f + g)( x)

Disjoint Systems. Abstract

Simple Polygons of Maximum Perimeter Contained in a Unit Disk

If a subset E of R contains no open interval, is it of zero measure? For instance, is the set of irrationals in [0, 1] is of measure zero?

subject to A 1 x + A 2 y b x j 0, j = 1,,n 1 y j = 0 or 1, j = 1,,n 2

Chapter 4. Fourier Series

Lecture 4: April 10, 2013

CALCULUS BASIC SUMMER REVIEW

Solutions. Number of Problems: 4. None. Use only the prepared sheets for your solutions. Additional paper is available from the supervisors.

PAPER : IIT-JAM 2010

[ 11 ] z of degree 2 as both degree 2 each. The degree of a polynomial in n variables is the maximum of the degrees of its terms.

10-701/ Machine Learning Mid-term Exam Solution

The Boolean Ring of Intervals

Introduction to Optimization Techniques. How to Solve Equations

MATH 10550, EXAM 3 SOLUTIONS

Problem Set 4 Due Oct, 12

62. Power series Definition 16. (Power series) Given a sequence {c n }, the series. c n x n = c 0 + c 1 x + c 2 x 2 + c 3 x 3 +

Lecture 9: Hierarchy Theorems

Linear Programming and the Simplex Method

September 2012 C1 Note. C1 Notes (Edexcel) Copyright - For AS, A2 notes and IGCSE / GCSE worksheets 1

1 Approximating Integrals using Taylor Polynomials

MAT1026 Calculus II Basic Convergence Tests for Series

Some remarks for codes and lattices over imaginary quadratic

On comparison of different approaches to the stability radius calculation. Olga Karelkina

Feedback in Iterative Algorithms

CSE 202 Homework 1 Matthias Springer, A Yes, there does always exist a perfect matching without a strong instability.

Lecture 19. sup y 1,..., yn B d n

Exercises Advanced Data Mining: Solutions

Large holes in quasi-random graphs

Integrable Functions. { f n } is called a determining sequence for f. If f is integrable with respect to, then f d does exist as a finite real number

Math 4707 Spring 2018 (Darij Grinberg): homework set 4 page 1

Basic Sets. MTH299 - Examples. Example 1. Let S = {1, {2, 3}, 4}. Indicate whether each statement is true or false. (a) S = 4

On the behavior at infinity of an integrable function

Recursive Algorithms. Recurrences. Recursive Algorithms Analysis

Formulas for the Number of Spanning Trees in a Maximal Planar Map

Linearly Independent Sets, Bases. Review. Remarks. A set of vectors,,, in a vector space is said to be linearly independent if the vector equation

Analysis of Algorithms. Introduction. Contents

Matriculation number: You have 90 minutes to complete the exam of InformatikIIb. The following rules apply:

PROBLEM SET 5 SOLUTIONS 126 = , 37 = , 15 = , 7 = 7 1.

6.003 Homework #3 Solutions

Introduction to Computational Biology Homework 2 Solution

MA131 - Analysis 1. Workbook 3 Sequences II

Lecture 2: Uncomputability and the Haling Problem

Transcription:

Mastermath ad LNMB Course: Discrete Optimizatio Solutios for the Exam 9 Jauary 2012 Utrecht Uiversity, Educatorium, 15:15 18:15 The examiatio lasts 3 hours. Gradig will be doe before Jauary 23, 2012. Studets iterested i checkig their results ca make a appoitmet by e-mail (g.schaefer@cwi.l). The examiatio cosists of six problems. The maximum umber of poits to be gaied o the differet parts are displayed i the followig table: 1(a) (j) 2 3(a) 3(b) 3(c) 4 5 6(a) 6(b) 6(c) 20 (2 each) 10 5 5 5 15 15 5 10 10 100 The grade for the exam is obtaied by dividig the total umber of poits by 10. This implies that 55 poits are eeded to pass. Durig the examiatio oly the Lecture Notes of the course without ay additioal leaflets are allowed to be o your desk ad all electroic equipmet must be switched off. Please be short, clear ad precise i your aswers. If you use results from the Lecture Notes, please provide the respective refereces. Please had i your aswers together with the exam sheet. Wishig you a Happy New Year 2012 ad Good Luck! Discrete Optimizatio: Exam 9 Jauary 2012 Page 1/8

Problem 1 (20 poits (2 poits each)). State for each of the claims below whether it is true of false. Note: You eed ot to justify or proof your aswers here. (a) = Ω(). (b) Let G = (V,E) be a bipartite graph ad defie I = {M E M is a matchig of G}. The (E,I) is a matroid. (c) Give a spaig tree T of a graph G = (V,E), let deg T (u) refer to the umber of edges i T that are icidet to u V. The u V deg T (u) = 2 1. (d) A graph is bipartite if ad oly if it does ot cotai a odd legth cycle. (e) Give a directed graph G = (V,E) with edge costs c : E R, oe ca determie i polyomial time whether G cotais a cycle of egative cost. (f) If Π 1 P ad Π 2 Π 1, the Π 2 P. (g) If Π 1 is NP-complete ad Π 1 Π 2, the Π 2 is NP-complete. (h) If there exists a NP-complete problem Π such that Π P, the P = NP. (i) If there is a pseudo-polyomial time algorithm for a optimizatio problem Π, the Π P. (j) There exists a 3 2-approximatio algorithm for TSP. Solutio: (a) false (b) false (c) false (d) true (e) true (f) true (g) false (h) true (i) false (j) false (uless P = NP) Problem 2 (10 poits). Let M 1 = (S,I 1 ) ad M 2 = (S,I 2 ) be two matroids over the same groud set S. The itersectio M 1 M 2 of M 1 ad M 2 is defied as the idepedet set system (S,I 1 I 2 ). Let G = (L R,E) be a bipartite graph ad defie I = {M E M is a matchig of G}. Show that the idepedet set system (E, I) is the itersectio of two matroids. (Hit: A L-sided matchig of G is a subset M E such that each ode u L has at most oe edge i M icidet to it.) Discrete Optimizatio: Exam 9 Jauary 2012 Page 2/8

Solutio: We first show that the pair (E,I L ) with I L = {M E M is a L-sided matchig of G} costitutes a matroid. First, ote that /0 I L. Secod, let M I L ad M M. Clearly, because M is a L-sided matchig, every ode u L has at most oe edge i M icidet to it. Thus M I L. Fially, let M,M I L ad assume M < M. The there is a ode u L that is matched i M ad umatched i M. By addig the matchig edge e M icidet to u to M we obtai a ew L-sided matchig M + e I L. Thus, (E,I L ) is a matroid by Defiitio 3.2 of the Lecture Notes. We proceed exactly the same way to show that (E,I R ) with I L = {M E M is a R-sided matchig of G} is a matroid. (A R-sided matchig of G is a subset M E such that each ode u R has at most oe edge i M icidet to it.) Fially, we prove that M E is a matchig of G if ad oly if M I L I R. Clearly, if M is a matchig the M is both a L-sided ad a R-sided matchig by defiitio. To show the coverse, suppose for the sake of a cotradictio that M I L I R ad M is ot a matchig. Because M is ot a matchig, there must two edges e 1 ad e 2 that share a commo edpoit, say u. Suppose u L (the case u R follows aalogously). But the two edges are icidet to u ad M is thus ot a left-sided matchig, which is a cotradictio to the assumptio that M I L. Problem 3 (5+5+5 poits). I the miimum-weight edge cover problem we are give a udirected graph G = (V,E) with edge weights w : E R +. A edge cover E E of G is a subset of the edges such that each ode u V is covered by at least oe edge i E, i.e., for every ode u V there is a edge (u,v) E. The goal is to compute a edge cover E of miimum total weight w(e ) = e E w(e). (a) Formulate the miimum-weight edge cover problem as a iteger liear program ad derive the respective LP relaxatio. (b) Show that the set of feasible solutios of this LP is a itegral polytope if G is bipartite. (c) Give a example that shows that a optimal solutio to this LP might be o-itegral if G is ot bipartite. Solutio: (a) The iteger programmig formulatio of the miimum-weight edge cover problem is as follows: We have a idicator variable x e {0,1} for every edge e E with x e = 1 Discrete Optimizatio: Exam 9 Jauary 2012 Page 3/8

iff e belogs to the edge cover E. miimize subject to w(e)x e e E x e 1 e=(u,v) E x e {0,1} u V e E (1) The LP relaxatio is miimize subject to w(e)x e e E x e 1 e=(u,v) E x e 0 u V e E (2) Note that the costraits x e 1 e E are redudat because of the miimizatio objective. (b) Cosider LP (2). We ca rewrite this LP as follows: miw T x s.t. Ax 1, x 0 where A is the icidece matrix of a udirected bipartite graph. By Corollary 8.1 of the Lecture Notes, A is totally uimodular. As a cosequece, A is also totally uimodular (multiplyig by 1 does ot chage the absolute value of the determiat). Also, 1 is itegral ad thus the polytope P = {x Ax 1, x 0} is itegral by Theorem 8.8 of the Lecture Notes. (c) Cosider a cycle of legth 3 with every edge havig uit weight. A optimal solutio to LP (2) is x e = 1 2 for every edge e E with total weight 2 3. This solutio is ot itegral. Problem 4 (15 poits). Cosider the followig miimum shortest-path-cut problem: We are give a directed graph G = (V,E) with edge costs c : E R +, a source ode s V ad a target ode t V. The goal is to fid a subset C E of miimum cardiality such that every shortest s,t-path P (with respect to c) is cut by C, i.e., P C /0. Derive a algorithm that solves this problem, prove its correctess ad aalyze its ruig time. Solutio: The algorithm is as follows: First ote that the algorithm termiates. The correctess of the algorithm follows from the followig lemma: Lemma 1. P is a shortest s,t-path i G if ad oly if P is a s,t-path i G. Proof. First ote that the distace fuctio δ is well defied because edge costs are oegative. Suppose P is a shortest s,t-path i G. The all edges of P must be tight Discrete Optimizatio: Exam 9 Jauary 2012 Page 4/8

Iput: A directed graph G = (V,E) with edge costs c : E R +, a source ode s V ad a target ode t V. Output: Subset C E of miimum size that cuts every shortest s,t-path. 1 Solve the SSSP problem with s as source ode to determie distaces δ(u) for every u V. 2 Costruct the subgraph of G that cotais all tight edges with respect to δ. Remove from this graph all edges that do ot lie o a s,t-path. Let the resultig graph be G = (V,E ). 3 Compute a miimum capacity s,t-cut (X, X) (with respect to uit capacities) of G ad let C be the set of directed edges from X to X. 4 Output C. (Lemma 4.4. of the Lecture Notes) ad thus P is part of G. Next cosider a arbitrary s,t-path P = s = v 1,v 2,...,v k = t i G. The cost of this path is c(p) = Thus P is a shortest s,t-path. k 1 k 1 c(v i,v i+1 ) = δ(v i+1 ) δ(v i ) = δ(t) δ(s) = δ(t). I light of Lemma 1, the goal ow is to determie a subset of edges C E of miimum cardiality such that after removig C form G, s ad t are discoected i G. Let (X, X) be a miimum capacity s,t-cut of G, where each edge e E has uit capacity. Defie C = {(u,v) E u X, v X}. By Theorem 5.3 of the Lecture Notes, C cuts every s,t-path i G ad has miimum size. We ext aalyze the ruig time of the algorithm: We ca use Dijkstra s algorithm i Step 1 because edge costs are o-egative. This takes O(m + log) time. Step 2 requires that we check for every edge e E whether e is tight. This takes time O(m). We ca determie (i) all odes that are reachable from s ad (ii) all odes from which t is reachable i time O(+m) by ruig oe depth-first search from s ad oe depth-first search from t (o the graph with all edge directios reversed). Step 2 thus takes O(+m) time i total. Computig a miimum capacity s,t-cut i Step 3 ca be doe by a max-flow computatio (see Theorem 5.3 of the Lecture Notes) which takes time O(m 2 ) if we use the Edmods-Karp algorithm. Idetifyig the edges i the cut requires O( + m) time. The overall ruig time of the algorithm is domiated by the max-flow computatio ad is thus O(m 2 ). Problem 5 (15 poits). The decisio variat of the kapsack problem is as follows: We are give a set N = {1,...,} of items with each item i N havig a profit p i Z + ad a weight w i Z +, a kapsack capacity B Z + ad a parameter K Z +. The goal is to determie whether there exists a subset X N such that w(x) = i X w i B ad p(x) = i X p i K. Prove that the kapsack problem is NP-complete. (Hit: Use that the followig subset Discrete Optimizatio: Exam 9 Jauary 2012 Page 5/8

sum problem is NP-complete: Give o-egative itegers s 1,...,s ad a parameter L, determie whether there is a subset of these umbers whose total sum is L.) Solutio: We first argue that kapsack NP. A certificate of a yes-istace is a subset X of N with w(x) B ad p(x) K. Both coditios ca be checked i liear time (i ). I order to prove NP-completeess, we show that subset sum kapsack. The claim the follows because the subset sum problem is NP-complete. Let I = (s 1,...,s,L) be a istace of the subset sum problem. Defie a istace I of the kapsack problem as follows: N = {1,...,} ad for every i N: p i = w i = s i. Moreover, let B = K = L. This trasformatio takes liear time (i ). We claim that I is a yes-istace of the subset sum problem iff I is a yes-istace of the kapsack problem. Let S N such that i S s i = L. The the weight ad profit of the correspodig kapsack X = S is w(x) = B ad p(x) = K, respectively. Thus X is a yesistace of the kapsack problem. Let X N be a yes-istace of the kapsack problem. The w(x) B ad p(x) K. Because p i = w i = s i for all items i ad B = K = L, we have w(x) = p(x) = L. Thus, with S = X, i S s i = L ad thus I is a yes-istace of the subset sum problem. Problem 6 (5+10+10 poits). A atural greedy algorithm to compute a solutio for the kapsack problem is as follows: Iput: A set N = {1,...,} of items with a profit p i Z + ad a weight w i Z + for every item i N ad a kapsack capacity B Z +. Output: Subset X N of items. 1 Sort the items by o-icreasig profit per weight ratio ad re-idex the items such that p 1 p 2 p. w 1 w 2 w 2 Let k be the smallest idex such that k+1 w i > B. 3 Output X = {1,...,k}. (a) Give a example that shows that the approximatio ratio of the above algorithm ca be arbitrarily large. (b) Let OPT be the profit of a optimal solutio. Prove that the followig relatio holds: OPT k p i + B k w i p k+1. w k+1 (Hit: Formulate the kapsack problem as a iteger liear program, derive the LP relaxatio ad characterize its optimal solutios.) (c) Obtai a 2-approximatio algorithm for the kapsack problem by adaptig the above algorithm ad show that the approximatio ratio is tight. Discrete Optimizatio: Exam 9 Jauary 2012 Page 6/8

Solutio: (a) Suppose we have two items with p 1 = 2 ad w 1 = 1 ad p 2 = B = w 2. The above greedy algorithm picks item 1 with a total profit of 2. A optimal solutio picks item 2 with total profit B. The approximatio ratio B/2 becomes arbitrarily large as B. (b) The followig is a atural iteger liear programmig formulatio of the kapsack problem: maximize p i x i subject to w i x i B (3) The LP relaxatio of (3) is: x i {0,1} i {1,...,} maximize subject to p i x i w i x i B 0 x i 1 i {1,...,} (4) Note that the costraits x i 1 i {1,...,} are ot redudat here. Let OPT ad OPT LP refer to the total profit of a optimal solutio for (3) ad (4), respectively. Because (4) is the LP relaxatio of (3), we have OPT OPT LP. We claim the followig: Lemma 2. The followig solutio x is a optimal solutio to LP (4): 1 if i {1,...,k} x B i = k w i w k+1 if i = k+ 1 0 otherwise Proof. Clearly, 0 x i 1 for every i N ad the total weight of the solutio x is i N w i x i = B. Thus, x is feasible. Moreover, x is a optimal solutio because the items are chose accordig to o-icreasig profit per weight ratio (this follows from a exchage argumet). We coclude OPT OPT LP = p i + B k w i p k+1. w k+1 (c) We adapt the give algorithm by returig the more profitable set of items amog {1,...,k} ad {k+ 1}. Note that the algorithm outputs a feasible solutio (we assume that w i B for every i N). Moreover, the algorithm has polyomial ruig time: Sortig the items by their profit per weight ratio takes O(log). The idex k i Step 2 ca be determied i time O(). Altogether the algorithm eeds O(log) time. It remais to be show that the algorithm achieves a approximatio ratio of 2: Discrete Optimizatio: Exam 9 Jauary 2012 Page 7/8

The total profit of the solutio X output by the algorithm satisfies: 2p(X) k p i + p k+1 OPT. Here the secod iequality follows from part (b) because OPT p i + B k w i p k+1 w k+1 p i + p k+1. The claim follows. The followig example shows that the approximatio ratio of 2 is tight: Cosider three items with p 1 = 2 ad w 1 = 1 ad p 2 = p 3 = 2 1B = w 2 = w 3. The algorithm selects items 1 ad 2 of total profit 2 1 B+2. A optimal solutio chooses items 2 ad 3 of total profit B. Thus the approximatio ratio for this istace is B/( 1 2 B+2) 2 as B. Discrete Optimizatio: Exam 9 Jauary 2012 Page 8/8