Graph Embedding Algorithms
Total Page:16
File Type:pdf, Size:1020Kb
Graph Embedding Algorithms by ANDREI GAGARIN A Thesis Submitted to the Faculty of Graduate Studies in Partial Fblfillment of the Requirements for the Degree of DOCTOR OF PHILOSOPHY Department of Computer Science University of Manitoba Winnipeg, Manitoba, Canada @ Copyright by Andrei Gagarin, 2003 June 11, 2003 THE UNIVERSITY OF MANITOBA FACULTY OF GRADUATE STUDIES *t*** COPYRIGHT PERMISSION PAGE GRAPH EMBEDDING ALGORITHMS BY ANDREI GAGARIN A Thesis/Practicum submitted to the Faculty of Graduate Studies of The University of Manitoba in partial fulfillment of the requirements of the degree of Doctor of Philosophy ANDREI GAGARIN @ 2OO3 permission has been granted to the Library of The University of Ma¡ritoba to lend or sell copies of this thesis/practicum, to the National Library of Canada to microfilm this thesis and to lend or sell copies of the film, and to University Microfilm Inc. to publish an abstract of this thesis/practicum. The author reserves other publication rights, and neither this thesis/practicum nor exteruive extracts from it may be printed or otherwise reproduced without the author's written permission. Abstract A topologi,cal surface,S can be obtained from the sphere by adding a number of handles and/or cross-caps. Any topological surface can be represented as a polygon whose sides are identified in pairs. The projectiue plane can be represented as a circular disk with opposite pairs of points on its boundary identified. The torus can be represented as a rectangle with opposite sides of its boundary identified. is possible to Given a graph G and a topological surface ^9, we ask whether it draw the graph on the surface without edge crossings. Such a drawing of G on the surface is called an embeddi,ng of. G in S. It divides the surface into connected regions called faces. An embedding is 2-cell if each face is equivalent to an open disk. Efficient embedding algorithms for the plane are well-known. By Kuratowski's Theorem, a non-planar graph G contains a subdivision of K5 or K3,3 as a subgraph. The objective of this thesis is to devise efficient practical embedding algorithms for the projective plane and torus. The major contributions of the thesis are: o A new linear time algorithm to detect a projective planar graph; Given a K5-subdivision in G, a linear time algorithm to determine if G is toroidal or to provide a K3,3-subdivision in G; o Simple methods to transform a planar embedding into a 2-cell projective planar or toroidal embedding. The known linear time algorithm for the projective plane in [28] appears to be infeasible and it is not clear if the approach is correct. The practical linear time projective planarity algorithm of the thesis improves the O(n2) time algorithm of [30]. The algorithm for the torus permits to reduce toroidality testing to a constant number of planarity checks or to a Ks,g-subdivision in the graph. It runs in linear time and can be used to simplify algorithms presented in [21] and [31]. 1ll Acknowledgements I am very thankful to my advisor, Professor William Kocay, for invoiving me in algorithmic and topological graph theory research. Without his experience, intuition, calm, confidence and understanding this thesis definitely would not be possible. I hope we will collaborate on these nice problems in the future. I would like to thank: my parents and friends overseas for their direct or indirect moral support and encouragement; my former scientific advisors, Professors Igor E. Zverovich, Regina I. Tyshkevich, Pierre Duchet, Charles Payan and Lynn Batten for showing me the taste of real research and for introducing me to such a wonderful research area as Graph Theory and Combinatorics; The Department of Mathematics at the University of Manitoba for pro- viding me the opportunity to study in Winnipeg; The Fields Institute (University of Toronto) and the Department of Com- binatorics and Optimization (University of Waterloo) for inviting me to the Special Year 1999-2000 on Graph Theory and Combinatorial Opti- mization at The Fields Institute; o Professor Helen Cameron and Administrative Assistant Lynne Romuld 1V (Department of Computer Science) for their understanding and help in difiÊcult situations during my studies at the University of Manitoba. List of Figures 2.L The polygonal representation of the sphere 8 2.2 The polygonal representation of the projective plane . I 2.3 The polygonal representation of the torus . 10 2.4 The plane drawing of the cylinder 10 2.5 An embedding of Ks,s on the projective plane T4 3.1 DFS-tree and digraph G'with low points 25 3.2 Embedding chords around a DFS-cycle C 45 4.I Essential and contractible cycles on the projective plane 52 vt 4.2 Cutting the torus surface into a 2-cell 54 4.3 The torus cut into a 2-cell 54 4.4 Planar embedding of G on the projective plane 56 4.5 2-cell embedding of planar G on the projective plane 57 4.6 d-subgraph in a planar embedding of G 58 4.7 Converting a planar embedding into a 2-cell toroidal . 59 5.1 Embedding of Ks,s on the projective plane 63 5.2 Embeddings of K5 on the projective plane 63 5.3 Edge ur overused by toroidal constraints 77 5.4 Embedding for a cyclic set of toroidal constraints 78 5.5 Cylinder embedding for G cut along cycle C 80 5.6 Two edge disjoint paths to cut the cylinder face 81 6.1 K3,3 created by short cut P 86 6.2 K3,3 created by short cut P 86 vlr 6.3 K3,3 created by short cut P 87 6.4 K3,3 created by 3-corner vertex z 87 7.I K5 on the projective plane 94 7.2 K3,3 and its embedding on the projective plane 97 ntr.() The dual graph of the projective planar embedding of Ks,s 97 7.4 Unfolded faces of an embedding of TKs,s 98 7.5 Möbius band cut along a side 99 7.6 The six labelled embeddings of TKs3 101 7.7 Two chords crossing in a face t02 7.8 The unique embedding of G: TKs,s U {"t, ez,es} 105 7.9 The pattern of 1-face chords r07 7.10 The pattern of 3-face chords 108 7.11 The pattern of quadragon 2-face chords 111 7.I2 The pattern of parallel and perpendicular 2-f.ace chords 113 vlll 7.13 Three matched diagonal compatible Möbius bands . i15 7.I4 A pair of matched corner compatible Möbius bands 116 7.L5 3-face chord in the hexagon 119 ^ 7.16 Chords in conflict r22 7.17 Disjoint perpendicular chords t23 7.18 Adjacent perpendicular chords r23 7.I9 non-embeddable component C of M(H) 726 ^ 7.20 A 1-way embeddable component C of M(H) 126 7.27 A Z-way embeddable component 127 7.22 Embedding of component C1 flips component C2 128 7.23 l-way components with perpendicular chords crossing 130 7.24 Independent 2-way components 131 8.1 Möbius band labeling . 134 8.2 Configuration of perpendicular chords in the Möbius band 139 IX 8.3 An optimal placement of a 2-way bundle I4l 8.4 Perpendicular chord e2 flipped by er via parallel chords €',€" 743 8.5 The flip interval for chord e 745 8.6 Consecutive chords in a bundle r46 8.7 Flipping a bundle 747 8.8 Four combinations of perpendicular stars in a bundle t49 8.9 Flipping bundles to embed a parallel chord 151 8.10 DFS-ordering of sides and face labelling of.TKz,s 155 8.1i DFS-ordering of the quadragon facial boundaries 156 8.12 DFS-ordering of the hexagon facial boundary . 161 8.13 The embedding of.TK3p used to calculate a rotation system 169 8.14 The line graph of the Petersen graph 776 8.15 A projective planar embedding example 777 8.16 A projective planar embedding example 178 8.17 Non-projective configuration example 778 9.1 The embeddings of K5 on the torus 180 9.2 A face with one repeated vertex 782 9.3 A face with two repeated vertices 183 9.4 A face with three repeated vertices 184 9.5 A face with four repeated vertices . 185 9.6 Non-toroidal graphs ¡ú, Ng r87 ^¡2, 9.7 Toroidal graph M 188 9.8 Non-toroidal graphs 191 10.1 The two embeddings of Kg,s on the torus 200 X1 Contents 1 Introduction 2 Graphs and Surfaces: Basic Notation and Results 6 n 2.I Basic Notation and Definitions I 2.2 Overview of the Related Results 15 3 Planarity Testing 20 oe 3.1 Cycle and Paths Decomposition Lù 3.2 Properties of the Path Decomposition 30 3.2.1 Path Properties 31 xlt .).) 3.2.2 Segments ùù 3.3 Main Features of the Embedding Algorithm 35 3.3.1 Embedding the First Path of a Segment 36 3.3.2 Recursion 38 3.3.3 Data Structures 39 3.3.4 Complexity of the Algorithm 42 3.4 Summary of the Hopcroft-Tarjan Planarity Algorithm . 43 3.4.I A Spanning initial Cycle 43 3.4.2 Recursion for taversing a Non-Spanning Initial Cycle 46 4 Essential Cycles on the Projective Plane and Torus 50 4.I Embedding Cycles on the Projective Plane 51 4.2 Embedding Cycles on the Torus 53 4.3 2-Cell Embeddings of Planar Graphs on the Projective Plane and Torus 55 xlll Graph Embedding Algorithms Currently Implemented for the Projective Plane and Torus 61 5.1 Practical Projective Planarity Testing 62 5.i.1 Basic Ideas 64 5.7.2 3-Face Bridges 65 5.1.3 Conflicts Between Bridges and 2-SAT Problem 68 5.7.4 Outline of the Quadratic Projective Planarity Algorithm 7I 5.1.5 Analysis and Complexity of the Algorithm 72 5.2 Practical Toroidality Testing 74 5.2.I Flat Cycles and Non-Toroidal Graph Constraints 74 5.2.2 Essential Cycles and Toroidality Testing 79 6 Graphs Containing K5-Subdivisions 83 6.1 Short Cuts and 3-Corner Vertices 84 6.2 Side Components 88 xtv 6.3 Augmented Side Components 90 7 Embedding Graphs on the Projective Plane 92 7.I Ks-Subdivisions and Planarity 92 7.7.I Characterization for Projective Planarity Checking 93 7.I.2 Graphs with a Ks-Subdivision 95 7.2 A Spanning K¡,s-Subdivision .