1 / 55

Linear Programming and Parameterized Algorithms

Linear Programming and Parameterized Algorithms. Linear Programming. n real- valued variables, x 1 , x 2 , … , x n . Linear objective function . Linear (in) equality constraints . Solvable in polynomial time. Maximize x + y 3x + 2y y – x = 8 0 x,y 10.

ada
Download Presentation

Linear Programming and Parameterized Algorithms

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Linear Programming and Parameterized Algorithms

  2. Linear Programming n real-valued variables, x1, x2, … , xn. Linear objectivefunction. Linear (in)equalityconstraints. Solvable in polynomial time. Maximizex + y 3x + 2y y – x = 8 0 x,y 10

  3. Integer Linear Programming n integer-valuedvariables, x1, x2, … , xn. Linear objectivefunction. Linear (in)equalityconstraints. NP-complete. Lingo:Linear Programs (LP’s),Integer Linear Programs (ILP’s) Easy to encode3-SAT (Exercise!)

  4. Vertex Cover In:G, k Question:such that every edge in G has an endpoint in S? Have seen a kernelwithO(k2)vertices, willsee a kernelwith2kvertices.

  5. Vertex Cover (I)LP In:G, k Question: such that every edge in G has an endpoint in S? Minimize Z OPTLP OPT

  6. Nemhauser Trotter Theorem • There is always an optimal solution to Vertex Cover LP that sets variables to . • For anyoptimal –solution there is a matching from the 1-vertices to the0-vertices, saturating the 1-vertices.

  7. Matchings and Hall Sets A matching in a graph is a setofedgesthat do not shareanyendpoints. A matching saturatesa vertexsetSifeveryvertex in S is incident to a matching edge. A vertexsetS is a Hall setif it is independentand |N(S)| < |S|. A Hall setmay never be saturated!

  8. Hall’s Theorem Theorem: A bipartite graph has a matching such that every left hand side vertex is saturated ⇔ there is no Hall set on the left hand side.

  9. Hall’sTheoremExample Matching (so no Hall set) Hall set (so no matching)

  10. Nemhauser Trotter Theorem • There is always an optimal solution to Vertex Cover LP that sets variables to . • For any –solution there is a matching from the 1-vertices to the 0-vertices, saturating the 1-vertices.

  11. Nemhauser Trotter Proof Right + + - - - Left This clearly proves (a), butwhydoes it prove (b)?

  12. Reduction Rule If exists optimal LP solution that sets xv to 1, then exists optimal vertex cover that selects v. • Remove v from G and decreasek by 1. Correctness follows from Nemhauser Trotter Polynomial time by LP solving.

  13. Kernel Suppose reduction rule can not be applied and consider any optimal solution to LP. No vertex is 0(remove isolated vertices) No vertex is 1. All vertices are . OPTLPk. n 2k

  14. Above LP Vertex Cover So far we have only seen the solutionsize, k, as the parameterfor vertex cover. Alternative parameter k – OPTLP Note that can be very small even ifk is big!

  15. Vertex Cover Above LP In:G, k. Question:Does there exist a vertex cover S of size at most k? Parameter: where OPTLPis the value of an optimum LP solution. Now FPT means f()nc time!

  16. Reduction Rule Recall the reductionrules from the kernel for Vertex Cover: • If exists optimal LP solution that sets xv to 1, then exists optimal vertex cover that selects v. • Remove v from G and decrease k by 1. • Removeverticesofdegree0. Now the unique LP optimum sets all vertices to

  17. Reductionaffectsk-OPTLP? Reduction rule: If exists optimal LP solution that sets xv to 1 Remove v and decrease k by 1. OPTLP decreases by exactly 1. Why? Feasible LP Solution to G\u 1 v k-OPTLP is unchanged!

  18. Branching Pick an edge uv. Solve (G\u, k-1) and (G\v, k-1). since otherwise there is an optimal LP solution for G that sets u to 1. Then

  19. Branching - Analysis OPTLP– kdrops by ½ ... in both branches! Total time: 4k-OPTLP nO(1)

  20. Vertex Cover recap Using LP’swecanget • a kernelwith2kvertices, • an algorithmthat runs in time 4k-OPTLPnO(1). Is thisusefulwhencompared to a 1.38kalgorithm?

  21. Almost 2-SAT In:2-SAT formula, integer k Question: Can weremove*k variables from and make it satisfiable? *Remove all clausesthatcontainthe variable

  22. Odd Cycle Transversal (OCT) In:G, k Question: such that G\S is bipartite? Will givealgorithmsfor Almost 2-SAT and OCT, usingFPT-reductions to Vertex Cover above LP!

  23. Odd Cycle Transversal  Almost 2-Sat x y x y z z

  24. Almost 2-SAT Vertex Cover/k-LP

  25. Consequences 4knO(1) time algorithms for Almost 2-SAT and Odd Cycle Transversal. A ck-OPTLPnO(1)algorithm for Vertex Cover automaticallygivesck-OPTLPnO(1)algorithm for Almost 2-SAT and Odd Cycle Transversal. Canget a 2.32k-OPTLPnO(1)algorithm for Vertex Cover by improvingthebranching.

  26. LP versus ILP Wesaw an applicationofLP’s in parameterizedalgorithms. ILP solving is NP-hard. Uselessfor algorithms? No! Wecanuseparameterizedalgorithms for Integer Linear Programming.

  27. Integer Linear Programming Theorem: k4.5kpoly(L) time algorithm, wherek is thenumberof variables, and L is thenumberof bits encodingtheinstance.

  28. ClosestString Input: nstringss1…sn over an alphabetA, all of same lengthL, and an integerk. Question: Is there a string s suchthat for everyi, d(s, si) k? Parameter: n Note: the parameter is thenumberofstrings, not k

  29. ClosestString as Hit & Miss For everyposition, need to choosethe letter ofsolutionstrings. For all stringssdiffers from at thatposition, increasedistance by one. Can’tmissanystring more thank times.

  30. ClosestStringAlphabetReduction Canassumethatalphabetsize is at most n. 1111111111111111 1234123412342222 3214321443322114 1 1 2 1 2 2 1 2 1 1 2 2 111111111111 122212222222 221223232113

  31. Column Types 1 1 2 1 1 2 1 1 2 1 1 2 111111111111 122212222222 221223232113 4 1 2 3 5 112 122 113 122 121

  32. ClosestString ILP Afteralphabetreduction, thereare at most nncolumn types. Countthenumberofcolumnsofeachcolumn type.

  33. ILP For eachcolumn type, make n variables, one for each letter. = numberofcolumnsof typetwherethesolutionpicksthe letter a. Constraints: For eachcolumn type t, thechosen letters add up to thenumberof type t.

  34. ObjectiveFunction For a stringsi and column type t, letsi[t] be the letter ofsi in columnsof type t. For eachstringsi, itsdistance from thesolutionstrings is Objectiveis Minimize Max di

  35. Algorithm for ClosestString Number of variables in the ILP is nnn so the final running time is FPTin n. (double exponential)

  36. Conclusions (Integer) Linear Programming is a usefultoolfor parameterizedalgorithms. Has not yetbeenexploredin greatdepth

  37. Exercises Show thatILP is NP-hard. Show thattheclausedeletionversionofAlmost 2-SAT is FPT by reductionto Almost 2-SAT. Book: 3.20, 3.23

  38. Thank You?

  39. Surplus The surplusof an independent set I is |N(I)| – |I|. The surplus can be negative! In any -LP solution, the total weight is n/2 + surplus(V0)/2. Solving the Vertex Cover LP is equivalent to finding an independent set I of minimum surplus.

  40. Surplus

  41. Surplus and Reductions If «all ½» is the unique LP optimum then surplus(I) > 0 for all independent sets. Can we say anything meaningful for independent sets of surplus 1? 2? k?

  42. Surplus Branching Lemma Let I be an independent set in G with minimum surplus. There exists an optimal vertex cover C that either containsI or avoidsI.

  43. Surplus Branching Lemma Proof I N(I) R

  44. BranchingRule Find an independentsetIof minimum surplus. Branch:Eitherput all ofIintosolution, or put all of N(I)intosolution. Correct by branching lemma. Need to analyzemeasuredropin bothbranches.

  45. Branching Rule Find an independent set I of minimum surplus. Solve (G\I, k-|I|) and (G\N(I), k-|N(I)|). LP(G\I) > LP(G) - |I|, since otherwise LP(G) has an optimal solution that sets I to 1. So k-LP drops by at least ½.

  46. Branching Rule Analysis Cont’d Analyzing the (G\N(I), k-N(I)) side: So k-LP drops by at least 1/2 = Best LPwith = 0 = FeasibleLP with = 0 v I N(I) 0 1

  47. Branching Summary The measure k-LP drops by (½, surplus(I)/2). Will see that independent sets of surplus 1 can be reduced in polynomial time! Measure drops by (½,1) giving a time algorithm for Vertex Cover

  48. Reducing Surplus 1 sets. Lemma: If surplus(I) = 1, I has minimum surplus and N(I) is not independent then there exists an optimum vertex cover containing N(I). I N(I) R

  49. ReducingSurplus 1 Sets If surplus(I) = 1, I has minimum surplus and N(I) is notindependent, deleteN[I] and decreasek by |N(I)|. LPdecreases by at most |N(I)|(why?) So k - doesnot increase.

  50. Reducing Surplus 1 sets. Reduction Rule: If surplus(I) = 1, I has minimum surplus and N(I) is independent then solve (G’,k-|I|)where G’ is G with N[I] contracted to a single vertex v. OPTLPdecreases by at most |I| (why?) I N(I) R

More Related