Algorithms for Graphs of Small Treewidth
Total Page:16
File Type:pdf, Size:1020Kb
Algorithms for Graphs of Small Treewidth Algoritmen voor grafen met kleine boombreedte (met een samenvatting in het Nederlands) PROEFSCHRIFT ter verkrijging van de graad van doctor aan de Universiteit Utrecht op gezag van de Rector Magnificus, Prof. Dr. J.A. van Ginkel, ingevolge het besluit van het College van Decanen in het openbaar te verdedigen op woensdag 19 maart 1997 des middags te 2:30 uur door Babette Lucie Elisabeth de Fluiter geboren op 6 mei 1970 te Leende Promotor: Prof. Dr. J. van Leeuwen Co-Promotor: Dr. H.L. Bodlaender Faculteit Wiskunde & Informatica ISBN 90-393-1528-0 These investigations were supported by the Netherlands Computer Science Research Founda- tion (SION) with financial support from the Netherlands Organization for Scientific Research (NWO). They have been carried out under the auspices of the research school IPA (Institute for Programming research and Algorithmics). Contents Contents i 1 Introduction 1 2 Preliminaries 9 2.1GraphsandAlgorithms.............................. 9 2.1.1Graphs................................... 9 2.1.2GraphProblemsandAlgorithms..................... 11 2.2TreewidthandPathwidth............................. 13 2.2.1PropertiesofTreeandPathDecompositions............... 15 2.2.2ComplexityIssuesofTreewidthandPathwidth............. 19 2.2.3DynamicProgrammingonTreeDecompositions............. 20 2.2.4FiniteStateProblemsandMonadicSecondOrderLogic......... 24 2.2.5ForbiddenMinorsCharacterization.................... 28 2.3RelatedGraphClasses.............................. 29 2.3.1ChordalGraphsandIntervalGraphs................... 30 2.3.2Bandwidth................................. 31 2.3.3Series-ParallelGraphs........................... 32 3 The Structure of Partial Two-Paths 37 3.1Preliminaries................................... 37 3.2BiconnectedPartialTwo-Paths.......................... 38 3.3TreesofPathwidthTwo............................. 44 3.4GeneralGraphs.................................. 50 3.5FindingtheStructureofaPartialTwo-Path................... 68 3.5.1BiconnectedGraphs............................ 68 3.5.2Trees.................................... 69 3.5.3GeneralGraphs.............................. 69 4 DNA Physical Mapping 71 4.1 Introduction .................................... 71 4.2IntervalizingSandwichGraphs.......................... 75 4.2.1Three-IntervalizingSandwichBlocks................... 76 4.2.2Four-IntervalizingSandwichGraphs................... 81 4.3Unit-IntervalizingSandwichGraphs....................... 85 i Contents 4.3.1Three-Unit-IntervalizingBiconnectedSandwichGraphs......... 87 4.3.2Three-Unit-IntervalizingBiconnectedColoredGraphs.......... 92 5 Reduction Algorithms 95 5.1ReductionAlgorithmsforDecisionProblems.................. 96 5.1.1ReductionSystems............................ 96 5.1.2AnEfficientReductionAlgorithm.................... 98 5.1.3 Decision Problems for Graphs of Bounded Treewidth . ......104 5.2ReductionAlgorithmsforOptimizationProblems................108 5.2.1 Reduction-Counter Systems and Algorithms . .............108 5.2.2 Optimization Problems for Graphs of Bounded Treewidth . ......110 5.3ParallelReductionAlgorithms..........................112 5.3.1DecisionProblems............................112 5.3.2OptimizationProblems..........................115 5.4AdditionalResults................................116 6 Constructive Reduction Algorithms 121 6.1DecisionProblems................................122 6.1.1ConstructiveReductionSystemsandAlgorithms............122 6.1.2 Construction Problems for Graphs of Bounded Treewidth . ......125 6.2OptimizationProblems..............................131 6.2.1 Constructive Reduction-Counter Systems and Algorithms . ......131 6.2.2 Constructive Optimization Problems for Graphs of Bounded Treewidth . 133 6.3ParallelConstructiveReductionAlgorithms...................138 6.3.1ConstructionProblems..........................138 6.3.2ConstructiveOptimizationProblems...................140 6.4AdditionalResults................................141 7 Applications of Reduction Algorithms 143 7.1PositiveResults..................................143 7.2NegativeResults.................................155 8 Parallel Algorithms for Series-Parallel Graphs 161 8.1PreliminaryResults................................162 8.2ASpecialParallelConstructiveReductionSystem...............166 8.2.1ASafeSetofReductionRules......................166 8.2.2TheConstructionAlgorithms.......................173 8.2.3 A Lower Bound on the Number of Matches . .............174 8.2.4 A Lower Bound on the Number of Discoverable Matches . ......179 8.3Algorithms....................................181 ii Contents 9 Parallel Algorithms for Treewidth Two 187 9.1PreliminaryResults................................188 9.2ASpecialParallelConstructiveReductionSystem...............189 9.2.1ASafeSetofReductionRules......................190 9.2.2 A Lower Bound on the Number of Matches . .............192 9.2.3 A Lower Bound on the Number of Discoverable Matches . ......201 9.2.4TheConstructionAlgorithms.......................204 9.3Algorithms....................................210 10 Conclusions 213 A Graph Problems 217 References 223 Acknowledgments 231 Samenvatting 233 Curriculum Vitae 237 Index 239 iii Contents iv Chapter 1 Introduction This thesis is concerned with the design of efficient sequential and parallel algorithms for problems on graphs of bounded treewidth. Many real-life problems can be modeled as op- timization or decision problems on graphs. Consider for instance the problem in which a courier has to deliver a number of packages at different addresses, and the courier’s company wants him to follow the shortest route visiting all addresses, starting and ending at the com- pany’s address. This problem is known as the traveling salesman problem. The input can be modeled as a weighted graph in which the vertices represent the addresses that have to be visited, including the company’s address, and an edge between two vertices represents the road between the corresponding addresses. Each edge has a weight that corresponds to the length of the road between the corresponding addresses. The problem is then to find a cycle in the graph which contains all vertices and has minimum weight. Unfortunately, many graph problems that model real-life problems are hard in the sense that there are (probably) no efficient algorithms which solve these problems. More formally, these problems are NP-hard. The traveling salesman problem is such a problem. A way of overcoming this disadvantage is to discover a special structure in the graphs modeling the real-life problem which may help in finding a more efficient algorithm for the problem. For instance, the input graphs may have a special structure that assures that the problem at hand is easy to solve. Another possibility is that the problem can be decomposed into subproblems, and that the structure of the input graphs assures that some of these subproblems are easy to solve. This might help in finding a more efficient algorithm that computes an optimal solution for the complete problem, or in finding an efficient algorithm that computes a good approximation of the optimal solution. One suitable structure is the tree-structure: it appears that many graph problems that are hard in general, are efficiently solvable on trees. As an example, consider the maximum independent set problem, in which we search for a subset I of the vertices of G for which there is no edge between any two vertices of I, and the cardinality of I is as large as possible. This problem is NP-hard, but if the input graph is a tree, then we can easily solve the problem to optimality as follows. Let T be a rooted tree with root r. For each node v of T,let Tv denote the subtree of T rooted at v. For each node v, we compute integers nv and mv which denote the size of a maximum independent set of Tv that contains v, and the size of a maximum independent set of Tv that does not contain v, respectively. It follows that the size of a maximum independent set of T is the maximum of nr and mr. A particular instance is 1 Chapter 1 Introduction shown in part I of Figure 1.1: each node v of the tree is labeled with the pair nv ; mv.Thesize of a maximum independent set in T is ten. level 4 r 9; 10 r ; ; 3 5 6 1 0 3; 2 ; ; ; 2 1 044 1 0 1; 2 ; 1 1; 310 ; 1; 010 0 ; ; 1; 01010 III Figure 1.1. A rooted tree in which each node v is labeled with the pair nv ; mv (part I), and a maximum independent set of the tree, denoted by the white nodes (part II). For each node v of T, we can compute nv and mv from the values of nu and mu of all children u of v. This implies that we can perform dynamic programming on T to find the size of a maximum independent set of T: first compute the numbers of the nodes that are at the lowest level of the tree (these nodes have no children). Next rise one level in the tree, and compute the numbers for the nodes on that level, by using the numbers for the nodes one level down. This step is repeated until the numbers nr ; mr of the root are computed. We can also find a maximum independent set of T, by using the computed numbers. Part II of Figure 1.1 shows a maximum independent set of the tree in part I (the nodes in the independent set are white). Sequentially, the above algorithm can be made to run in On time, where n denotes the number of nodes of the tree. In a parallel algorithm, we can perform the computations of different nodes on the same level in parallel, which gives a faster algorithm. A similar dynamic programming approach as described above can be