A Combinatorial Approach to Orthogonal Placement Problems
Total Page:16
File Type:pdf, Size:1020Kb
A Combinatorial Approach to Orthogonal Placement Problems Gunnar Werner Klau RS IVE ITA N S U S A IS R S AVIEN Universität des Saarlandes Saarbrücken, Germany A Combinatorial Approach to Orthogonal Placement Problems A Combinatorial Approach to Orthogonal Placement Problems Gunnar Werner Klau Dissertation zur Erlangung des Grades Doktor der Ingenieurwissenschaften (Dr.–Ing.) der Naturwissenschaftlich–Technischen Fakultät I der Universität des Saarlandes RS IVE ITA N S U S A IS R S AVIEN Universität des Saarlandes Saarbrücken, Germany Datum des Kolloquiums: 3. September 2001 Dekan der Naturwissenschaftlich–Technischen Fakultät I: Prof. Dr. Rainer Schulze–Pillot–Ziemen Gutachter: Prof. Dr. Petra Mutzel, Technische Universität Wien, Österreich Prof. Dr. Kurt Mehlhorn, Max–Planck–Institut für Informatik, Saarbrücken v Short Abstract We study two families of NP-hard orthogonal placement problems that arise in the area of information visualization both from a theoretical and a practical point of view. This thesis contains a common combinatorial framework for compaction problems in orthogo- nal graph drawing and for point-feature labeling problems in computational cartography. Compaction problems are concerned with performing the conversion from a dimension- less description of the orthogonal shape of a graph to an area-eYcient drawing in the orthogonal grid with short edges. The second family of problems deals with the task of attaching rectangular labels to point-features such as cities or mountain peaks on a map so that the placement results in a legible map. We present new combinatorial formulations for these problems employing a path- and cycle-based graph-theoretic property in an asso- ciated problem-specific pair of constraint graphs. The reformulation allows us to develop exact algorithms for the original problems. Extensive computational studies on real-world benchmarks show that our linear programming–based algorithms are able to solve large in- stances of the placement problems to provable optimality within short computation time. Furthermore, we show how to combine the formulations for compaction and labeling problems and present an exact algorithmic approach for a graph labeling problem. Often, our new algorithms are the first exact algorithms for the respective problem variant. Kurzzusammenfassung Wir betrachten zwei Familien von NP–schwierigen orthogonalen Platzierungsproblemen aus dem Bereich der Informationsvisualisierung von einem theoretischen und praktischen Standpunkt aus. Diese Arbeit enthält ein gemeinsames kombinatorisches Gerüst für Kom- paktierungsprobleme aus dem Bereich des orthogonalen Graphenzeichnens und Beschrif- tungsprobleme von Punktmengen aus dem Gebiet der Computer–Kartografie. Bei den Kompaktierungsproblemen geht es darum, eine gegebene dimensionslose Beschreibung der orthogonalen Form eines Graphen in eine orthogonale Gitterzeichnung mit kurzen Kanten und geringem Flächenverbrauch zu transformieren. Die Beschriftungsprobleme haben zur Aufgabe, eine gegebene Menge von rechteckigen Labels so zu platzieren, dass eine lesbare Karte entsteht. In einer klassischen Anwendung repräsentieren die Punkte bei- spielsweise Städte einer Landkarte, und die Labels enthalten die Namen der Städte. Wir präsentieren neue kombinatorische Formulierungen für diese Probleme und verwenden dabei eine pfad- und kreisbasierte graphentheoretische Eigenschaft in einem zugehörigen problemspezifischen Paar von Constraint–Graphen. Die Umformulierung ermöglicht es uns, exakte Algorithmen für die Originalprobleme zu entwickeln. Umfassende experimen- telle Studien mit Benchmark–Instanzen aus der Praxis zeigen, dass unsere Algorithmen, die auf linearer Programmierung beruhen, in der Lage sind, große Instanzen der Platzie- rungsprobleme beweisbar optimal und in kurzer Rechenzeit zu lösen. Ferner kombinieren wir die Formulierungen für Kompaktierungs– und Beschriftungsprobleme und präsentie- ren einen exakten algorithmischen Ansatz für ein Graphbeschriftungsproblem. Oftmals sind unsere neuen Algorithmen die ersten exakten Algorithmen für die jeweilige Problem- variante. vi Acknowledgments Many people have taught, encouraged, supported, helped, and advised me during the time in which I worked on this thesis. I wish to express my deepest gratitude to all of them. First of all, I would like to thank my advisor, Prof. Petra Mutzel, for providing a per- fect balance of scientific guidance and scientific freedom. Petra has been a great source of motivation and I am grateful to her for having me introduced to the fascinating research areas of graph drawing and map labeling, for teaching me many things about combinato- rial optimization, and for guiding my research work that led to this thesis. Setting up our private Doktorandenseminar at MPI Saarbrücken and its continuation in Vienna proved to be a very good idea, and I am indebted to all of its participants, in particular to René Weiskircher and Thomas Ziegler, for interesting discussions. I also wish to thank Prof. Kurt Mehlhorn. Kurt is responsible for the highly enjoy- able scientific and international atmosphere at the Max Planck Institute für Informatik in Saarbrücken and an enthusiastic teacher. Much of what I know about algorithms and data structures I learned in Saarbrücken and, in particular, at MPI. I consider it an honor and privilege to have had the possibility to meet so many inspiring people in the algorithm and complexity group of this institute and to do my first research steps in such conducive con- ditions. In Saarbrücken I experienced how much fun teaching can be, and I owe much of this discovery to the diploma students I had the pleasure to advise. In particular, I am grateful to Karsten Klein, who is also a co-author on a paper in experimental graph drawing and who contributed to the computational study on compaction algorithms. Particular thanks to Prof. Matteo Fischetti for helpful and enlightening discussions concerning the relation between the zero-one and the extended polytopes, to Prof. Gerhard Woeginger for lessons in complexity theory, to Prof. Andrew V. Goldberg for his negative cycle detection code, and to Alexander WolV for the real-world labeling data and the support in the conversion to our data format. Moreover, I have appreciated the possibility of temporarily using the facilities of the Discrete Optimization group at the University of Heidelberg, for which I would like to thank Prof. Gerhard Reinelt and his group. Further, I like to thank the German Federal Ministry of Research (BMBF) for finan- cially supporting the project “Automatisiertes Zeichnen von Zustandsgraphen”, and Prof. Ulrich Lauther, Siemens AG, for cooperation. Thanks to my proof-readers René Weiskircher, Thomas Ziegler, Sebastian Leipert, Karsten Klein, Marco Lübbecke, Birgit and Knut Reinert, Hedwig, Ragnar, and Arne Klau, to Solofo Ramangalahy for sharing his TEX wisdom, and to Martin Gruber for technical support. Very special thanks to my family and to Stéphanie Dagron. CONTENTS 1. Introduction ¡ ¡ ¡ ¢ £ ¢ ¢ £ ¢ ¡ ¡ ¡ ¢ £ ¢ ¡ ¢ £ ¢ ¢ £ ¢ ¡ ¡ ¡ ¢ £ ¢ ¡ ¡ ¡ ¢ 1 1.1 Graph Drawing . 3 1.1.1 The Topology-Shape-Metrics Scheme . 5 1.1.2 The Compaction Phase . 6 1.1.3 A New Approach to Two-Dimensional Compaction . 7 1.2 Map Labeling . 9 1.2.1 A New Approach to Map Labeling Problems . 10 1.3 Combining Drawing and Labeling: Graph Labeling . 12 1.4 Overview . 13 2. Preliminaries ¢ £ ¢ ¢ £ ¢ ¡ ¡ ¡ ¢ £ ¢ ¡ ¡ ¡ ¢ ¢ £ ¢ ¡ ¡ ¡ ¢ £ ¢ ¡ ¡ ¡ ¢ £ ¢ ¢ 15 2.1 Graph Theory . 15 2.2 Graph Drawing . 17 2.3 Linear Programming . 21 2.4 Combinatorial Optimization . 23 3. Constraint Graphs ¢ £ ¢ ¡ ¡ ¡ ¢ £ ¢ ¡ ¡ ¡ ¢ ¢ £ ¢ ¡ ¡ ¡ ¢ £ ¢ ¡ ¡ ¡ ¢ £ ¢ ¢ 27 3.1 Computing Minimal Assignments . 30 3.2 Computing ¤ -Minimal Assignments . 34 3.3 Computing Minimax-Assignments . 37 4. Compaction in Graph Drawing ¡ ¡ ¢ £ ¢ ¢ ¡ ¡ ¡ ¢ £ ¢ ¡ ¡ ¡ ¢ £ ¢ ¢ £ ¢ ¡ 39 4.1 Compaction Problems . 40 4.2 Combinatorial Characterization . 43 4.2.1 Segments and Placement Graphs . 44 4.2.2 Shape Graphs . 45 4.2.3 Completeness . 47 4.2.4 Constructive Heuristics . 53 4.2.5 Improvement Heuristics . 61 4.2.6 Compaction Reformulated . 72 4.3 Exact Compaction Algorithms . 77 4.3.1 Compacting Uniquely Completable Representations . 77 4.3.2 Integer Linear Programming Formulation . 80 4.3.3 Branch-and-Bound and Branch-and-Cut Algorithm . 88 4.3.4 Related Work in vlsi Design . 92 viii Contents 4.4 Experimental Study . 94 4.4.1 Implementations . 94 4.4.2 Experimental Settings . 96 4.4.3 Computational Results . 98 4.4.4 Conclusions . 111 5. Map Labeling ¡ ¡ ¢ £ ¢ ¢ £ ¢ ¡ ¡ ¡ ¢ £ ¢ ¡ ¢ £ ¢ ¢ £ ¢ ¡ ¡ ¡ ¢ £ ¢ ¡ ¡ ¡ ¢ 113 5.1 Labeling Problems . 114 5.1.1 Discrete Models . 117 5.1.2 Slider Models . 119 5.2 Combinatorial Characterization . 121 5.2.1 Labeling Graphs . 121 5.2.2 Combinatorial Reformulations . 128 5.3 Integer Linear Programming Formulations . 130 5.3.1 The Labeling Polytope and the Labeling Problem . 131 5.3.2 Zero-One Formulation for lab . 132 5.3.3 Complexity of Finding Positive Cycles . 133 5.3.4 Extended Formulation . 135 5.3.5 Label Number Maximization . 138 5.4 Exact Labeling Algorithms . 141 5.4.1 Implementations . 145 5.5 Computational Experiments . 146 6. Application to a Graph Labeling Problem ¢ ¢ £ ¢ ¡ ¡ ¡ ¢ £ ¢ ¡ ¡ ¡ ¢ £ ¢ ¢ 157 6.1 Graph Labeling . 157 6.2 The Combined Compaction and Labeling Problem . 158 6.3 An Exact Algorithm for the Combined Compaction and Labeling Problem 160 6.3.1 Unifying the Combinatorial Formulations . 161 6.3.2 Integer Linear Programming Formulation . 162 6.3.3 Branch-and-Bound Algorithm . 163 7. Discussion and