CS49I Approxaton Algorths The Vertex-Cover Proble Lecture Notes Xangwen L March 8th and March 3th, 00 Absolute Approxaton Gven an optzaton proble P, an algorth A s an approxaton algorth for P f, for an gven nstance x I, t returns an approxaton soluton, that s a feasble soluton A (x) Defnton Gven an optzaton proble P, for an nstance x of P and an arbtrar feasble soluton Denote ( x ) the optu value of x and ( x, ) the value of functon at feasble pont for the nstance x The absolute error of wth respect to x s defned as ( x) ( x, ) Gven an NP-hard optzaton proble, t would be ver satsfactor to have a polnoal-te approxaton algorth that s capable of provdng a soluton wth a bounded absolute error for ever nstance x Defnton Gven an optzaton proble P and an approxaton algorth A for P, we sa that A s an absolute approxaton algorth f there exsts a constant such that, for ever nstance x of P, ( x) ( x, A( x)) Exaple Let us consder the proble of deternng the nu nuber of colors needed to color a planar graph It s well-nown that a 6-colorng of a planar graph can be found n polnoal
te[] It s also nown that establshng whether the graph s -colorable (that s, the set of edges s ept) or -colorable( that s, the graph s bpartte) s decdable n polnoal te whereas the proble of decdng whether three colors are enough s NP-coplete( see [] for detal) Algorth D begn If the graph s - or -colorable, return ether a - or a -colorng of the vertces of G end else return a 6-colorng of the vertces of G Then we obtan an approxate soluton wth absolute error bounded b 3, 3 D Consder the Knapsac Proble Ths proble s characterzed b n obects O, O,,, On where each O s assocated wth a proft P and a weght W We want to choose a subset of obects to axze the proft wthout volatng the fact that the napsac has a lt weght W The Integer Prograng Forulaton s: ax n = n = w x p x W x {0,} Let g be an nstance of the Knapsac proble n tes wth profts P, P,,, P n and szes W, W,,,, Wn Suppose that the proble has a polnoal te approxaton algorth A wth absolute error and suppose that and A are the optu soluton and the approxaton soluton respectvel Then A Let be nstance of n tes wth profts
( + ) P,( + ) P,,,,( + ) P n and szes W, W,,,, Wn Suppose that ' and are the optu soluton and the approxaton soluton respectvel Then A ' ' > for A ' (for ore detal see[]) See the followng Fg >+ A A' ' Thus we have the followng theore Theore Unless P=NP, no polnoal-te absolute approxaton algorth exst for Knapsac Proble Defnton 3 Gven an optzaton proble P, for an nstance x of P and for an feasble soluton of x, the relatve error of wth respectve to x s defned as ( x, ) ( x) R ( x, ) = ax(, ) ( x) ( x, ) B the defnton, gven an nstance x of P and R, there s an algorth A such that ( x, A( x)) R ( x) Weghted Vertex Cover A vertex cover of a undrected graph G = ( V, E) s a subset V ' V such that f (u, v) s an edge of G, then ether u V ' or v V ' If a non-negatve weght w s assocated wth each vertex v, we want to fnd a vertex cover havng nu total weght We call ths proble nu weghted vertex cover Gven a weghted graph G = ( V, E), nu weghted vertex cover can be forulated as the followng nteger lnear progra ILP
n v V x + x x w x ( x, x ) E, {0,} Let LP be the lnear progra obtaned b relaxng the ntegralt constrants to sple non-negatveness constrants (e, x 0 for each v V ) Progra A begn 0 V ' = 0 ; Relax ILP to LP, b replacng the constrants x {0, } wth end x [0,] ;e x s a contnuous varable between 0 and For each v such that V ' = V ' { v } return V ' x Theore Gven a graph G wth non-negatve vertex weghts, Progra A fnds a feasble soluton of nu weghted vertex cover wth value LP (G) such that LP (G) Proof Let V ' be the soluton returned b the algorth The feasblt of V ' can be easl proved b contradcton Assue that V ' does not cover edge v, v ) Ths ples that both x ( G ) and ( x are less than 05 and hence x ( G ) + ( G ) <, a contradcton Let be the value of an optal soluton and let LP be the optal value of the relaxed lnear progra Snce the value of an optal soluton s alwas larger than the optal value of the relaxed lnear progra, we have x LP
If v V ', then x and w v V ' v V ' w x Snce V ' V, w x w x v V B the lnear progra algorth, v V ' w x Therefore the theore follows Pral-dual algorths LP The pleentaton of progra A requres the soluton of a lnear progra wth a possbl large nuber of constrans Therefore t s coputatonall expensve Another approach nown as praldual allows us to obtan an approxate soluton ore effcentl The chef dea s that an dual feasble soluton s a good lower bound on the nzaton pral proble We start wth a pral dual par (x, ), where x s a pral varable, whch s not necessarl feasble, whle s the dual varable, whch s not necessarl optal At each step of the algorth, we attept to ae ore optal and x ore feasble ; the algorth stops when x becoes feasble Gven a weghted graph G = ( V, E), the dual of the prevousl defned LP s the followng progra DLP : n ( v, v ) E ( v, v ) E w, v V 0, ( v, v ) E IP Note that the soluton n whch all are zero s a feasble soluton wth value 0 of DLP Also note that there s no dual for an nteger progra; we are tang the dual of the lnear prograng relaxaton of the pral nteger progra The pral dual algorth s descrbed the followng
Progra B begn for each dual varable do = 0 V '= 0 whle V ' s not a vertex cover do Select soe edge v, v ) not covered b V ' ; ( Increase v tll one of the end-ponts s ht e, or = w = w If = w then V ' = V ' { v } else V ' { v end whle } return V ' end Theore 3 Gven a graph G wth non-negatve weghts, progra B fnds a feasble soluton of nu weghted vertex cover wth value DLP (G) such that DLP Proof Let V ' be the soluton obtaned b the algorth B constructon V ' s a feasble soluton We observe that for ever v V ' we have = w Therefore ( v, v ) E Snce V ' V, DLP = v V ' w = v V ' ( v, v ) E
v V ' ( v, v ) E V v ( v E, v ) Snce ever edge of E counts two tes n V v ( v E, v ), Snce ( v, v ) E v V ( v E, v ) = ( v, v ) E ( G), the theore follows Randozaton Let X be a dscrete rando varable and tae the values wth probabltes p ( a ), p( a ), p( an ) The expectaton of X s defned as n E( X ) = a p( ) = Lneart propertes of Expectaton E X + X ) = E( X ) + E( ) ( X a E ( ax ) = ae( X ), where a s a postve, real nuber a, Exaple Suppose that there are 40 salors and 40 es one of whch s for one roo Suppose that each salor taes one e randol and opens hs roo wth ths e What s the Expected nuber of salors n ther own roos? Let x = f salor enters hs roo, x = 0 otherwse, a,,, an, B usng lneart of expectaton, we have 40 40 39 E( X ) = E( X ) = 40( () + (0)) = = = 40 40 We have used the fact that E X ) = p + 0( p ), snce ths s a ( bnar event Thus, E ( ) = (/ 40), for all X Exaple A Boolean expresson s sad to be n -conunctve noral for ( -SAT ) f t s the conuncton of clauses such that each clause contans exactl varables Suppose that there are clauses and n varables n the Boolean expresson The goal s to fnd an
assgnent of {True/False} to each of the varables, so that the gven Boolean expresson s satsfed The correspondng optzaton proble s to axze the nuber of clauses that are satsfed ( The optzaton proble s called MAX-SAT and s also NP-coplete ) Consder a rando assgnent of {True/False} to the varables e each varable x s set to True or False, dependng upon the rando outcoe of flppng a far con It s eas to see that the probablt that A sngle clause s not satsfed s at ost, snce n order to falsf a gven clause, all ts varables ust be set to False, n the rando assgnent Hence, wth probablt ( ), each clause s satsfed We want to now the expected nuber of clauses that are satsfed b our rando assgnent B usng lnear propertes of expectaton, we have E( X ) = E( X ) = ( ) = ( ) = = = Note that the axu nuber of clauses that can be satsfed under an assgnent s Hence, our rando assgnent s an approxaton algorth wth approxaton factor ( ) ( Exercse: Substtute varous values of and see how good the approxaton gets ) Reference: [] Borte and JVgen, Cobnatoral Optzaton, Sprnger- Verlag, 000 [] M R Gare and D S Johnson, Coputers and ntractablt a gude to the theor of NP-copleteness, 979