basic techniques ii iterative compression
play

Basic Techniques II: Iterative Compression Marek Cygan Institute - PowerPoint PPT Presentation

Basic Techniques II: Iterative Compression Marek Cygan Institute of Informatics University of Warsaw 18th August 2014, Bdlewo Marek Cygan Iterative compression 1/36 What iterative compression is? Iterative compression - jist Recursive


  1. FVS in tournaments Lemma If a tournament contains a cycle, then it contains a 3-cycle. This lemma implies a simple 3 k n O ( 1 ) branching algorithm. By using iterative compression we will see how to improve the running time to 2 k n O ( 1 ) . Marek Cygan Iterative compression 14/36

  2. FVS in tournaments Start with the recursive trick, reducing the problem to its compression version. Marek Cygan Iterative compression 15/36

  3. FVS in tournaments Start with the recursive trick, reducing the problem to its compression version. Feedback Vertex Set (FVS) in Tournaments Compression Input : a tournament (oriented clique) T , integer k a FVS Z ⊆ V ( T ) of size at most k + 1 Question : is there a subset X ⊆ V ( T ) of size at most k , such that T \ X is acyclic Marek Cygan Iterative compression 15/36

  4. FVS in tournaments Start with the recursive trick, reducing the problem to its compression version. Feedback Vertex Set (FVS) in Tournaments Compression Input : a tournament (oriented clique) T , integer k a FVS Z ⊆ V ( T ) of size at most k + 1 Question : is there a subset X ⊆ V ( T ) of size at most k , such that T \ X is acyclic Lemma f ( k ) n c time algorithm for FVST Compression implies f ( k ) n c + 1 time algorithm for FVST. Marek Cygan Iterative compression 15/36

  5. FVS in tournaments Pf: this time we use induction (loop) - alternative to recursion. Let V ( T ) = { v 1 , . . . , v n } . Marek Cygan Iterative compression 16/36

  6. FVS in tournaments Pf: this time we use induction (loop) - alternative to recursion. Let V ( T ) = { v 1 , . . . , v n } . We want to solve FVST ( T [ V i ] , k ) for i = 1 , . . . , n , where V i = { v 1 , . . . , v i } . Marek Cygan Iterative compression 16/36

  7. FVS in tournaments Pf: this time we use induction (loop) - alternative to recursion. Let V ( T ) = { v 1 , . . . , v n } . We want to solve FVST ( T [ V i ] , k ) for i = 1 , . . . , n , where V i = { v 1 , . . . , v i } . Set X 1 = ∅ , which is a solution for FVST ( T [ v 1 ] , k ) . Marek Cygan Iterative compression 16/36

  8. FVS in tournaments Pf: this time we use induction (loop) - alternative to recursion. Let V ( T ) = { v 1 , . . . , v n } . We want to solve FVST ( T [ V i ] , k ) for i = 1 , . . . , n , where V i = { v 1 , . . . , v i } . Set X 1 = ∅ , which is a solution for FVST ( T [ v 1 ] , k ) . For 2 � i � n do Z i = X i − 1 ∪ { v i } , let X i be a solution to FVST Compression ( T [ V i ] , k , Z i ) . if no solution found for T [ V i ] , then return NO. Marek Cygan Iterative compression 16/36

  9. FVS in tournaments Feedback Vertex Set (FVS) in Tournaments Compression Input : a tournament (oriented clique) T , integer k a FVS Z ⊆ V ( T ) of size at most k + 1 Question : is there a subset X ⊆ V ( T ) of size at most k , such that T \ X is acyclic By guessing a partition Z = X Z ⊎ W , we get to the disjoint version. Marek Cygan Iterative compression 17/36

  10. FVS in tournaments Feedback Vertex Set (FVS) in Tournaments Compression Input : a tournament (oriented clique) T , integer k a FVS Z ⊆ V ( T ) of size at most k + 1 Question : is there a subset X ⊆ V ( T ) of size at most k , such that T \ X is acyclic By guessing a partition Z = X Z ⊎ W , we get to the disjoint version. Disjoint FVS in Tournaments Compression Input : a tournament (oriented clique) T , integer k a FVS W ⊆ V ( T ) of size at most k + 1 Question : is there a subset X ⊆ V ( T ) of size at most k , disjoint with W, such that T \ X is acyclic Marek Cygan Iterative compression 17/36

  11. FVS in tournaments Disjoint FVS in Tournaments Compression Input : a tournament (oriented clique) T , integer k a FVS W ⊆ V ( T ) of size at most k + 1 Question : is there a subset X ⊆ V ( T ) of size at most k , disjoint with W, such that T \ X is acyclic Lemma Poly time algorithm for Disjoint FVST Compression implies 2 k n O ( 1 ) time algorithm for FVST Compression. Marek Cygan Iterative compression 17/36

  12. Disjoint FVS in tournaments Observation For an acyclic tournament, there is a single topological ordering. Marek Cygan Iterative compression 18/36

  13. Disjoint FVS in tournaments Simple reduction rules: Marek Cygan Iterative compression 19/36

  14. Disjoint FVS in tournaments Simple reduction rules: Reduction 1 If T [ W ] is not acyclic, then answer NO. Marek Cygan Iterative compression 19/36

  15. Disjoint FVS in tournaments Simple reduction rules: Reduction 1 If T [ W ] is not acyclic, then answer NO. Let A = V ( T ) \ W (removable set). Reduction 2 If for v ∈ A the graph T [ W ∪ { v } ] contains a cycle, then remove v and reduce k by one. Marek Cygan Iterative compression 19/36

  16. Disjoint FVS in tournaments W A = V ( T ) \ W Marek Cygan Iterative compression 20/36

  17. Disjoint FVS in tournaments 0 1 2 3 4 5 W A = V ( T ) \ W Marek Cygan Iterative compression 20/36

  18. Disjoint FVS in tournaments 0 1 2 3 4 5 W A = V ( T ) \ W Marek Cygan Iterative compression 20/36

  19. Disjoint FVS in tournaments 0 1 2 3 4 5 W A = V ( T ) \ W Marek Cygan Iterative compression 20/36

  20. Disjoint FVS in tournaments 0 1 2 3 4 5 W A = V ( T ) \ W 2 Marek Cygan Iterative compression 20/36

  21. Disjoint FVS in tournaments 0 1 2 3 4 5 W A = V ( T ) \ W 0 0 5 3 1 1 2 2 3 1 5 2 5 Marek Cygan Iterative compression 20/36

  22. Disjoint FVS in tournaments 0 1 2 3 4 5 W A = V ( T ) \ W 3 2 Marek Cygan Iterative compression 20/36

  23. Disjoint FVS in tournaments 0 1 2 3 4 5 W A = V ( T ) \ W 3 2 Marek Cygan Iterative compression 20/36

  24. Disjoint FVS in tournaments 0 1 2 3 4 5 W A = V ( T ) \ W 3 2 Marek Cygan Iterative compression 20/36

  25. Disjoint FVS in tournaments 0 1 2 3 4 5 W A = V ( T ) \ W 0 0 1 1 2 2 3 5 5 Marek Cygan Iterative compression 20/36

  26. Disjoint FVS in tournaments 0 1 2 3 4 5 W A = V ( T ) \ W 0 0 1 1 2 2 3 5 5 Marek Cygan Iterative compression 20/36

  27. Disjoint FVS in tournaments 0 1 2 3 4 5 W A = V ( T ) \ W 0 0 1 1 2 2 3 5 5 Consequently Disjoint FVST Compression may be reduced to finding longest nondecreasing subsequence. Marek Cygan Iterative compression 20/36

  28. General framework Iterative compression schema: By using induction we can assume that a solution Z ⊆ V ( G ) , | Z | � k + 1 is given as part of input. Marek Cygan Iterative compression 21/36

  29. General framework Iterative compression schema: By using induction we can assume that a solution Z ⊆ V ( G ) , | Z | � k + 1 is given as part of input. Branch into 2 | Z | cases, guessing what part of Z should be in a solution. Marek Cygan Iterative compression 21/36

  30. General framework Iterative compression schema: By using induction we can assume that a solution Z ⊆ V ( G ) , | Z | � k + 1 is given as part of input. Branch into 2 | Z | cases, guessing what part of Z should be in a solution. Solve a disjoint version of the problem, where given a solution W ⊆ V ( G ) we look for X ⊆ V ( G ) \ W of size at most k . Marek Cygan Iterative compression 21/36

  31. General framework Iterative compression schema: By using induction we can assume that a solution Z ⊆ V ( G ) , | Z | � k + 1 is given as part of input. Branch into 2 | Z | cases, guessing what part of Z should be in a solution. Solve a disjoint version of the problem, where given a solution W ⊆ V ( G ) we look for X ⊆ V ( G ) \ W of size at most k . c k n O ( 1 ) time algorithm for the disjoint version implies ( 2 c ) k n O ( 1 ) time algorithm for the general problem. Marek Cygan Iterative compression 21/36

  32. General framework Lemma c k n O ( 1 ) time algorithm for the disjoint version implies ( c + 1 ) k n O ( 1 ) time algorithm for the general problem. Marek Cygan Iterative compression 22/36

  33. General framework Lemma c k n O ( 1 ) time algorithm for the disjoint version implies ( c + 1 ) k n O ( 1 ) time algorithm for the general problem. k + 1 � k + 1 � c k −| X | = c k − i 1 i = ( c + 1 ) k + 1 / c � � i X ⊆ Z i = 0 Marek Cygan Iterative compression 22/36

  34. General framework Remarks: To make induction work, we need to find a solution (answering YES/NO is not enough). Marek Cygan Iterative compression 23/36

  35. General framework Remarks: To make induction work, we need to find a solution (answering YES/NO is not enough). By default iterative compression adds n factor to the running time. Marek Cygan Iterative compression 23/36

  36. General framework Remarks: To make induction work, we need to find a solution (answering YES/NO is not enough). By default iterative compression adds n factor to the running time. Ex: show that for VC and FVST this factor can be reduced to O ( k ) (hint: use O ( 1 ) -approximation). Marek Cygan Iterative compression 23/36

  37. General framework Remarks: To make induction work, we need to find a solution (answering YES/NO is not enough). By default iterative compression adds n factor to the running time. Ex: show that for VC and FVST this factor can be reduced to O ( k ) (hint: use O ( 1 ) -approximation). Some natural problems are not vertex deletion closed. Marek Cygan Iterative compression 23/36

  38. General framework Remarks: To make induction work, we need to find a solution (answering YES/NO is not enough). By default iterative compression adds n factor to the running time. Ex: show that for VC and FVST this factor can be reduced to O ( k ) (hint: use O ( 1 ) -approximation). Some natural problems are not vertex deletion closed. Ex: reduce Connected Vertex Cover (CVC) to CVC-Compression. Marek Cygan Iterative compression 23/36

  39. FVS Feedback Vertex Set (FVS) Input : undirected G , integer k Question : is there a subset X ⊆ V ( G ) of size at most k , such that G \ X is a forest Marek Cygan Iterative compression 24/36

  40. FVS FVS is vertex deletion closed, so we can apply iterative compression schema and solving the following problem in time c k n O ( 1 ) leads to ( c + 1 ) k n O ( 1 ) time algorithm for FVS. Marek Cygan Iterative compression 25/36

  41. FVS FVS is vertex deletion closed, so we can apply iterative compression schema and solving the following problem in time c k n O ( 1 ) leads to ( c + 1 ) k n O ( 1 ) time algorithm for FVS. Disjoint FVS Compression Input : undirected G , integer k a FVS W ⊆ V ( G ) of size at most k + 1 Question : is there a subset X ⊆ V ( G ) of size at most k , disjoint with W, such that G \ X is a forest Marek Cygan Iterative compression 25/36

  42. FVS - reduction rules Reduction 0 If G [ W ] contains a cycle, return NO. Marek Cygan Iterative compression 26/36

  43. FVS - reduction rules Reduction 0 If G [ W ] contains a cycle, return NO. W (forest) A (forest) Marek Cygan Iterative compression 26/36

  44. FVS - reduction rules Reduction 0 If G [ W ] contains a cycle, return NO. W (forest) A (forest) v We want v to have � 2 incident edges going to W . Marek Cygan Iterative compression 26/36

  45. FVS - reduction rules Reduction 1 Remove all degree at most 1 vertices from G . Marek Cygan Iterative compression 27/36

  46. FVS - reduction rules Reduction 2 If there is v ∈ A with deg ( v ) = 2 and at least one neighbor in A , then add an edge between neighbours of v (even if there was one) and remove v . Marek Cygan Iterative compression 28/36

  47. FVS - reduction rules W (forest) v ( deg A ( v ) � 1 ) A (forest) Marek Cygan Iterative compression 29/36

  48. FVS - one more reduction rule W (forest) v A (forest) Marek Cygan Iterative compression 30/36

  49. FVS - one more reduction rule W (forest) v A (forest) Reduction 3 If for v ∈ A = V ( G ) \ W the graph G [ W ∪ { v } ] contains a cycle, then remove v and decrease k by one. Marek Cygan Iterative compression 30/36

  50. FVS - one more reduction rule W (forest) v A (forest) Reduction 3 If for v ∈ A = V ( G ) \ W the graph G [ W ∪ { v } ] contains a cycle, then remove v and decrease k by one. Marek Cygan Iterative compression 30/36

  51. FVS branching W (forest) v A (forest) v v Marek Cygan Iterative compression 31/36

  52. FVS branching Formally, we branch into instances: ( G \ { v } , k − 1 , W ) , ( G , k , W ∪ { v } ) . Marek Cygan Iterative compression 32/36

  53. FVS branching Formally, we branch into instances: ( G \ { v } , k − 1 , W ) , ( G , k , W ∪ { v } ) . Observation A potential π ( I ) = k + # cc ( G [ W ]) decreases in each branch. W (forest) v A (forest) v v Marek Cygan Iterative compression 32/36

  54. FVS branching Formally, we branch into instances: ( G \ { v } , k − 1 , W ) , ( G , k , W ∪ { v } ) . Observation A potential π ( I ) = k + # cc ( G [ W ]) decreases in each branch. Lemma Disjoint FVS Compression can be solved in time 4 k n O ( 1 ) , consequently there is 5 k n O ( 1 ) time algorithm for FVS. Marek Cygan Iterative compression 32/36

  55. OCT Odd Cycle Transversal (OCT) Input : undirected G , integer k Question : is there a subset X ⊆ V ( G ) of size at most k , such that G \ X is bipartite Marek Cygan Iterative compression 33/36

  56. OCT The heart of the solution for OCT by iterative compression is the following problem, which can be solved in polynomial time! Annotated Bipartite Coloring Input : bipartite G = ( V 1 , V 2 , E ) , integer k , a partial coloring f 0 : V ( G ) → { 1 , 2 , ? } Question : is there a subset X ⊆ V ( G ) of size at most k , and a proper coloring f of G \ X consistent with f 0 . Marek Cygan Iterative compression 34/36

  57. OCT Annotated Bipartite Coloring Input : bipartite G = ( V 1 , V 2 , E ) , integer k , a partial coloring f 0 : V ( G ) → { 1 , 2 , ? } Question : is there a subset X ⊆ V ( G ) of size at most k , and a proper coloring f of G \ X consistent with f 0 . V 1 V 2 Marek Cygan Iterative compression 34/36

  58. OCT Annotated Bipartite Coloring Input : bipartite G = ( V 1 , V 2 , E ) , integer k , a partial coloring f 0 : V ( G ) → { 1 , 2 , ? } Question : is there a subset X ⊆ V ( G ) of size at most k , and a proper coloring f of G \ X consistent with f 0 . 1 2 ? V 1 1 2 ? V 2 Marek Cygan Iterative compression 34/36

  59. OCT 1 2 ? V 1 1 2 ? V 2 Marek Cygan Iterative compression 34/36

  60. OCT 1 2 V 1 ? 1 2 V 2 ? each blue vertex is either removed or recolored wrt V 1 ⊎ V 2 , Marek Cygan Iterative compression 34/36

  61. OCT 1 2 V 1 ? 1 2 V 2 ? each blue vertex is either removed or recolored wrt V 1 ⊎ V 2 , each green vertex is removed or maintains color wrt V 1 ⊎ V 2 , Marek Cygan Iterative compression 34/36

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend