angular schematization in graph drawing · dissertation,julius-maximilians-universitätwürzburg...

179
Philipp Kindermann Angular Schematization in Graph Drawing

Upload: others

Post on 26-Oct-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Philipp Kindermann

Angular Schematization in Graph Drawing

Page 2: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz
Page 3: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Philipp Kindermann

Angular Schematizationin Graph Drawing

Page 4: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Dissertation, Julius-Maximilians-Universität WürzburgFakultät für Mathematik und Informatik, 2015Gutachter: Prof. Dr. Alexander Wolff, Prof. Dr. André Schulz

Impressum

Julius-Maximilians-Universität WürzburgWürzburg University PressUniversitätsbibliothek WürzburgAm HublandD-97074 Würzburgwww.wup.uni-wuerzburg.de

© 2015 Würzburg University PressPrint on Demand

ISBN 978-3-95826-020-7 (print)ISBN 978-3-95826-021-4 (online)URN urn:nbn:de:bvb:20-opus-112549

This document—excluding the cover—is licensed under theCreative Commons Attribution-ShareAlike 3.0 DE License (CC BY-SA 3.0 DE):http://creativecommons.org/licenses/by-sa/3.0/de/

The cover page is licensed under the Creative CommonsAttribution-NonCommercial-NoDerivatives 3.0 DE License (CC BY-NC-ND 3.0 DE):http://creativecommons.org/licenses/by-nc-nd/3.0/de/

Page 5: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

0Preface

Page 6: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz
Page 7: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

0ContentsPreface v

1 Introduction 11.1 Outline of the Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

1.1.1 Placement of Boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.1.2 Visual Guidance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51.1.3 Crossings with Large Angles . . . . . . . . . . . . . . . . . . . . . . . 7

2 Preliminaries 112.1 Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112.2 Graph Drawing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132.3 Complexity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

I Placement of Boxes 19

3 Multi-Sided Boundary Labeling 213.1 Structure of Two-Sided Planar Solutions . . . . . . . . . . . . . . . . . . . . . 243.2 Algorithm for the Two-Sided Case . . . . . . . . . . . . . . . . . . . . . . . . 303.3 Extensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

3.3.1 Sliding Ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363.3.2 Maximizing the Number of Labeled Sites . . . . . . . . . . . . . . . . 363.3.3 Minimizing the total leader length . . . . . . . . . . . . . . . . . . . . 37

3.4 The Three- and Four-Sided Cases . . . . . . . . . . . . . . . . . . . . . . . . . 393.4.1 Structure of Three- and Four-Sided Planar Solutions . . . . . . . . . 393.4.2 Algorithm for the Three-Sided Case . . . . . . . . . . . . . . . . . . . 443.4.3 Algorithm for the Four-Sided Case . . . . . . . . . . . . . . . . . . . 49

3.5 Concluding Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

4 Approximation Algorithms for Box Contact Representations 534.1 Some Basic Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

4.1.1 A Combination Lemma . . . . . . . . . . . . . . . . . . . . . . . . . . 574.1.2 Improvement on Existing Approximation Algorithms . . . . . . . . 57

4.2 The Weighted Case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 594.3 The Unweighted Case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 624.4 The Model with Point Contacts . . . . . . . . . . . . . . . . . . . . . . . . . . 65

4.4.1 Weighted Bipartite and General Graphs . . . . . . . . . . . . . . . . . 664.4.2 Unweighted General Graphs . . . . . . . . . . . . . . . . . . . . . . . 66

Page 8: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Contents

4.5 APX-Completeness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 664.6 Concluding Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68

II Visual Guidance 69

5 Smooth Orthogonal Layouts of Planar Graphs 715.1 Smooth Layouts for Biconnected Maxdeg-4 Planar Graphs . . . . . . . . . . 735.2 Smooth Layouts for Arbitrary Maxdeg-4 Planar Graphs . . . . . . . . . . . . 775.3 SC1-Layouts of Biconnected Maxdeg-4 Outerplane Graphs . . . . . . . . . . 815.4 A Lower Bound for the Area Requirement of SC1-Layouts . . . . . . . . . . . 845.5 Biconnected Graphs without SC1-Layouts . . . . . . . . . . . . . . . . . . . . 855.6 Concluding Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88

6 Monotone Drawings of Trees 896.1 Building Blocks: Primitive Vectors . . . . . . . . . . . . . . . . . . . . . . . . 916.2 Monotone Grid Drawings with Large Angles . . . . . . . . . . . . . . . . . . 926.3 Strongly Monotone Drawings . . . . . . . . . . . . . . . . . . . . . . . . . . . 976.4 Concluding Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103

III Crossings with Large Angles 105

7 Simultaneous Drawing of Planar Graphs with Right-Angle Crossings 1077.1 RacSim Drawings of General Graphs . . . . . . . . . . . . . . . . . . . . . . . 1097.2 RacSim and RacSefe Drawings with One Bend per Edge . . . . . . . . . . . 1137.3 RacSefe Drawings with Two Bends per Edge . . . . . . . . . . . . . . . . . . 1217.4 Concluding Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125

8 Recognizing and Drawing IC-Planar Graphs 1278.1 Straight-line drawings of IC-planar graphs . . . . . . . . . . . . . . . . . . . . 1298.2 Recognizing IC-planar graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . 1328.3 IC-planarity and Rac graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1428.4 Conclucing Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151

Conclusion 153

Bibliography 157

viii

Page 9: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

1 Introduction

In Graph Theory, a graph is an abstract structure that represents a set of objects, calledvertices, and a set of pairs of vertices, called edges. Graphs are a frequently used tool to modelnetwork data. For example, a social network can be modeled by a graph whose verticescorrespond to persons, and whose edges correspond to relationships between these persons.Similarly, in integrated circuit design for the production of computer components such asmicroprocessors or memory systems, vertices represent the electronic components and edgesrepresent connections. A wide range of problems can be solved efficiently by modeling as agraph, and then using graph algorithms to solve the underlying problem. For instance, a routebetween two positions computed by a navigation system can be found by finding a shortestpath in the graph that represents the street network. The term “graph” has been introduced bySylvester [Syl78].

Graph Drawing. The area of visualizing graphs is called Graph Drawing. Graphs areusually drawn as node-link diagrams in the Euclidean plane. In such diagrams, the verticesare represented as geometric objects such as points, disks, or boxes, and the edges are drawnas Jordan curves, for example, line segments, polygonal lines, or circular arcs. A drawingshould be readable, that is, the human eye should be able to easily follow the edges andthus understand the relationship between the objects in the graph at first glance. In a gooddrawing, simple tasks can be answered quickly, for example, finding a shortest path betweentwo vertices. Various properties that define a good drawing have been studied.A very common approach is to draw graphs such that they induce no crossing between

edges; or, if this is not possible, to minimize the number of crossings. Another commonlydesired feature is the minimization of the drawing area, usually defined as the area of thesmallest bounding box containing the drawing under the restriction that the vertices areplaced on the integer grid. Recently, researchers have reconsidered the problem how to drawgraphs with angular restrictions.

Angular Schematization. The problem of angular schematization deals with computingdrawings of graphs under angular restrictions. In many network layouts, the directions ofthe edges are restricted, for example, any edge in an orthogonal layout consists exclusively ofhorizontal and vertical segments. These layouts are constructed in a wide range of researchcommunities: graph drawing, geographic information science, information visualization,VLSI layout, computational geometry, and underground mining. Most fields of applicationrequire large angles between edges that meet at a common vertex or a crossing point. Clearly,it is hard to follow an edge if there are many edges that are drawn close to each other witha small angle between them. We distinguish between two types of angles: vertex angles andcrossing angles. Another possible requirement in angular schematization ismonotonicity, that

Page 10: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 1 Introduction

is, for each pair of vertices there exists some direction such that the drawing contains a paththat connects the vertices and is increasing in this direction.

Vertex Angles. A vertex angle is the angle formed by two edges that meet at a commonvertex of the drawing. The angular resolution of a drawing is the smallest vertex angle. Angularresolution was first defined by Formann et al. [FHH+93] for straight-line drawings. Drawingswith small angular resolution make it difficult for the viewer to tell lines apart. Thus, animportant aesthetic criterion is to have high angular resolution, preferably perfect angularresolution, that is, the edges are equally spaced around each vertex. Clearly, in a graph withmaximum degree d, the angular resolution is bounded by 2π/d. For trees, this bound can beachieved in polynomial area. However, even for outerplanar graphs, perfect angular resolutioncannot always be achieved with straight-line edges, since the edges of a vertex on the convexhull of the drawing cannot be spaced equally. Moreover, for some planar graphs, the optimalangular resolution of a planar straight-line drawing of maximum degree d is Θ(1/d3) [GT94].We deal with drawings for planar graphs of maximum degree 4 with perfect angular resolutionin Chapter 5, and with drawings of trees with close-to-perfect angular resolution in Chapter 6.

Crossing Angles. A crossing angle is the angle formed by two crossing edges in theircommon crossing point. Similar to vertex angles, small crossing angles can make a viewerfollow the wrong edge after encountering a crossing. In a user study by Huang et al. [HHE08],it has been shown that crossings with large angles are much less harmful to the readability ofdrawings than shallow crossings. Thus, not only the minimization of the number of crossings,but also the maximization of the crossing angles are important in the visualization of graphs.Furthermore, even more planar graphs it may be beneficial to allow some crossings if theyinduce right angles [vK11]. Such drawings are called right-angle crossing (Rac) drawings. Ingeneral, it is NP-hard to decide whether a given graph admits a Rac drawing with straightedges, and the maximum number of edges in such a drawing is 4n − 10. However, if bendsare allowed, this number increases to 6.5n (one bend per edge) and 74.2n (two bends peredge). Every graph as a Rac drawing with three bends per edge. In Chapter 7, we produceRac drawings (with bends) for two planar graphs on a common vertex set, and in Chapter 8we show that every graph with independent crossing edges admits a Rac drawing.

Contact Representations. A contact representation describes an approach in visualizinggraphs different from node-link diagrams. In such a representation, vertices are drawn asnon-overlapping geometric objects of a given type such as disks, rectangles or polygons. Incontrast to node-link diagrams, an edge is represented as a common region of two objects,that is, if two objects touch, then an edge between their corresponding vertices exists inthe underlying graph. By a classical results of Koebe [Koe36], the class of graphs that arerepresentable by touching disks in the plane is exactly the class of planar graphs. However, ifthe shape and area of the objects are prescribed, in general it is NP-hard to decide whether agraph admits a contact representation. We deal with contact representations of rectangleswith given width and height in Chapter 4. Since not every graph admits such a drawing, weseek to maximize the number of represented edges.

2

Page 11: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Outline of the Book Section 1.1

Map Labeling. The placement of labels on a map is an important field of visualization thatis related to graph drawing. In this problem, the task is to place the names (labels) of specificsites, for example towns or points of interest, on a map such that the reader can immediatelyidentify which name describes which site. Usually, labels are represented by the smallestbounding rectangle containing the text in a given font. For readability, labels have to be placedwithout overlaps and close to their corresponding sites. If labels are too large to be placedon the map, they are usually placed into the margin, and connected to the sites by so-calledleaders. We study this problem, called boundary labeling, in Chapter 3. In terms of graphdrawing, this problem can be interpreted as drawing a matching between sites and labels withgiven coordinates of the sites and a specified region into which the labels have to be placed.

1.1 Outline of the Book

This book consists of three parts, each dealing with different types of angular restrictions. InPart I, we deal with the placement of boxes. In this setting, vertices are associated with a text,and are represented by the bounding rectangle of the words. The edges are represented bycommon horizontal or vertical segments of the rectangles. Part II is devoted to visual guidance,that is, planar drawings with high angular resolution and edges that are appealing and easy tofollow. Finally, Part III deals with non-planar graphs that are drawn with crossings with largeangles. In these drawings, crossing edges induce exclusively right angles, such that the readerdoes not inadvertently “jump” to another edge when encountering a crossing. Before startingwith the main part of this book, we give a short introduction into the terminology that weuse; see Chapter 2.

1.1.1 Placement of Boxes

In Part I of this book, we deal with the placement of boxes representing text. We considertwo different problems. First, the boxes are used to label important sites on a map withtext that is too large to be placed directly next to the corresponding site. Thus, we place theboxes in the margin of the map and connect them to the labeled points by so-called leaders.Second, we want to create semantic word clouds, that is, word clouds in which related words(according to some semantic) are placed next to each other. More formally, the task is tocreate a non-overlapping box contact representation of an underlying graph such that twoboxes touch if there is an edge between the corresponding vertices.

Multi-Sided Boundary Labeling

In Chapter 3, we study the Multi-Sided Boundary Labeling problem, with labels lying onat least two sides of the enclosing rectangle; see Figure 1.1 for an illustration. We present apolynomial-time algorithm that computes a crossing-free leader layout if one exists. So far,such an algorithm has only been known for the cases in which labels lie on one side or ontwo opposite sides of R. In both cases, a crossing-free solution always exists. The case wherelabels may lie on adjacent sides is more difficult. We present an efficient algorithm for testingthe existence of a crossing-free leader layout that labels all sites. We also study the problem

3

Page 12: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 1 Introduction

KinderhausKunterbunt

EvangelischerKindergarten

EvangelischeKindertagesstatte

KindertagesstatteSt. Stephan

EvangelischerKindergarten

KindergartenMarienhaus

EvangelischerKindergarten

TagegruppeSterntaler

KatholischeKindertagesstatte

StadtischerKindergarten

StadtischerKindergarten

KindergartenMarienstraße

Figure 1.1: Boundary Labeling for kindergartens in Karlsruhe, Germany.

of maximizing the number of labeled sites in a crossing-free leader layout. For two-sidedboundary labeling with adjacent sides, we show how to minimize the total leader length in acrossing-free layout.

This chapter is based on joint work with Benjamin Niedermann, Ignaz Rutter, MarcusSchaefer, André Schulz, and Alexander Wolff [KNR+13].

Approximation Algorithms for Box Contact Representations

In Chapter 4, we study the following geometric representation problem: Given a graphwhose vertices correspond to axis-aligned rectangles with fixed dimensions, arrange therectangles without overlaps in the plane such that two rectangles touch if the graph containsan edge between them; see Figure 1.2 for an example. This problem was named ContactRepresentation ofWord Networks (Crown) since it formalizes the geometric problembehind drawing word clouds in which semantically related words are close to each other.Crown is known to be NP-hard, and there are approximation algorithms for certain graphclasses for the optimization version, Max-Crown, in which realizing each desired adjacencyyields a certain profit.

We present the first O(1)-approximation algorithm for the general case, when the input is acomplete weighted graph, and for the bipartite case. Since the subgraph of realized adjacenciesis necessarily planar (if we insist on non-trivial contacts), we also consider several planargraph classes (namely stars, trees, outerplanar, and planar graphs), improving upon the knownresults. For some graph classes, we also describe improvements in the unweighted case, whereeach adjacency yields the same profit. Finally, we show that the problem is APX-hard even onbipartite graphs of bounded maximum degree.

This chapter is based on joint work withMichael A. Bekos, Thomas C. vanDijk, Martin Fink,Stephen Kobourov, Sergey Pupyrev, Joachim Spoerhase, and Alexander Wolff [BvDF+14].

4

Page 13: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Outline of the Book Section 1.1

Figure 1.2: A semantic word cloud representing the 20 most frequentlyused words in this book, excluding common English words; available athttp://wordcloud.cs.arizona.edu/cloud.html?id=715.

1.1.2 Visual Guidance

In Part II of this book, we seek to create drawings of specific subclasses of planar graphsthat visually guide the viewer, that is, it is easy for the human eye to continuously follow anedge and to find a path between to vertices. Naturally, bends interrupt the eye movementof the viewer, as it has to abruptly change the direction it follows. Thus, we seek to drawedges with straight-line segments and circular arcs that induce no bends. For circular arcs,we consider its tangent at the touching point with another segment to determine whether abend occurs. In straight-line drawings, the task is to draw them in a way that a path betweentwo vertices can be found by linearly following a specific direction, preferably the directionbetween the two endpoints of the path. The drawings computed by our algorithms haveperfect or close-to-perfect angular resolution.

Smooth Orthogonal Layouts of Planar Graphs

Chapter 5 is devoted to smooth orthogonal layouts of planar graphs. In these layouts, everyedge is an alternating sequence of axis-aligned segments and circular arcs with commonaxis-aligned tangents; see Figure 1.3 for some example drawings. In this chapter, we studythe problem of finding smooth orthogonal layouts of low edge complexity, that is, with fewsegments per edge. We say that a graph has smooth complexity k—for short, an SCk-layout—ifit admits a smooth orthogonal drawing with at most k segments per edge.

Our main result is that every planar graph of maximum degree 4 has an SC2-layout. Whileour drawings may have super-polynomial area, we show that for planar graph of maximumdegree 3, cubic area suffices. We also show that any biconnected outerplane graph ofmaximumdegree 4 has an SC1-layout. On the negative side, we construct two infinite families ofbiconnected planar graphs of maximum degree 4 that (1) require exponential area for anSC1-layout and (2) do not admit an SC1-layout.

This chapter is based on joint work with Md. Jawaherul Alam, Michael A. Bekos, MichaelKaufmann, Stephen G. Kobourov, and Alexander Wolff [ABK+14].

5

Page 14: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 1 Introduction

Figure 1.3: An orthogonal layout (left) and a smooth orthogonal layout (right) of the samegraph.

Monotone Drawings of Trees

In Chapter 6, we investigatemonotone drawings. A crossing-free straight-line drawing of agraph is monotone if there is a monotone path between any pair of vertices with respect tosome direction. We show how to construct a monotone drawing of a tree with n vertices ona section of size O(n1.5) × O(n1.5) of the integer grid such that the angles at a vertex v arebounded from below by roughly 1/deg(v). Our drawings are convex, that is, if every edgeto a leaf is substituted by a ray, the (unbounded) faces form convex regions. It is known thatconvex drawings are monotone and, in the case of trees, crossing-free.A monotone drawing is strongly monotone if, for every pair of vertices, the direction that

witnesses the monotonicity comes from the vector that connects the two vertices. We showthat every tree admits a strongly monotone drawing; see Figure 1.4 for an example drawing.For biconnected outerplanar graphs, this is easy to see. On the other hand, we present asimply-connected graph that does not have a strongly monotone drawing in any embedding.

This chapter is based on joint work with André Schulz, Joachim Spoerhase, and AlexanderWolff [KSSW14].

Figure 1.4: A monotone (and strictly convex) drawing of a tree.

6

Page 15: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Outline of the Book Section 1.1

Figure 1.5: A RacSim drawing of a tree (solid edges) and a matching (dashed edges).

1.1.3 Crossings with Large AnglesIn Part III of this book, we consider non-planar graphs. If a drawing of these graphs inducessmall crossing angles, the reader may follow the wrong edge after a crossing point. To avoidthis, angles at edge crossings should be large. We deal with drawings of non-planar graphs inwhich all crossings form right angles (Rac). In simultaneous embeddings, two planar graphsare drawn on the same point set such that each graph is plane, and the crossings betweenthe two graphs are Rac. Since only few classes of graphs admit such drawings, we allow aconstant number of bends per edge. Then, we consider IC-planar graphs, that is, graphs thathave a drawing in which every edge is crossed at most once and every vertex is incident toat most one crossing edge. We prove that every IC-planar graph admits a straight-line Racdrawing. If we drop the restriction of only one crossing edge per vertex, the graphs are called1-planar graphs and cannot always be drawn Rac.

Simultaneous Drawing of Planar Graphs with Right-Angle Crossings

In Chapter 7, we study the Rac simultaneous drawing problem. Given two planar graphsthat are defined on the same set of vertices, a Rac simultaneous drawing is one in whicheach graph by itself is drawn planar, there are no edge overlaps and the crossings between thetwo graphs form right angles. The geometric version restricts the problem to straight-linedrawings. It is known, however, that there exists a wheel and a matching which do not admita geometric Rac simultaneous drawing.In order to enlarge the class of graphs that admit Rac simultaneous drawings, we allow

bends when drawing the edges; see Figure 1.5. We prove that two planar graphs alwaysadmit a Rac simultaneous drawing with six bends per edge, in quadratic area. For morerestricted classes of planar graphs (that is, matchings, paths, cycles, outerplanar graphs, andsubhamiltonian graphs), we manage to significantly reduce the required number of bends peredge while keeping the drawing area quadratic.

7

Page 16: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 1 Introduction

Figure 1.6: A drawing of an IC-planar graph.

This chapter is based on joint work with Michael A. Bekos, Thomas C. van Dijk, AlexanderWolff [BvDKW15].

Recognizing and Drawing IC-Planar Graphs

In Chapter 8, we consider a subclass of 1-planar graphs, so-called IC-planar graphs. A graph iscalled 1-planar if it can be drawn in the plane such that each edge is crossed at most once, andis called IC-planar if the crossings are independent and no vertex is incident to more thanone crossing edge; see Figure 1.6 for an example graph. A Rac graph is a graph that admits astraight-line right-angle crossing drawing. It has been shown by Eades and Liotta [EL13] thatnot every 1-planar graph is a Rac graph and vise versa. They have stated the open problemof characterizing the intersection between the class of 1-planar graphs and the class of Racgraphs. We prove that the class of IC-planar graphs lies in this intersection.We show that every IC-planar graph admits a straight-line drawing in polynomial area

that can be computed in linear time. However, we observe that quadratic area is sometimesnecessary for straight-line IC-planar drawings. Further, the angles formed by crossing anglesin this drawing might be small. We present an algorithm that, given an embedded IC-planargraph, computes a Rac drawing of the given graph. Our drawings need exponential area. Wealso show that there is a family of graphs that cannot be drawn in polynomial area. For a planetriangulated graph, it can be tested in polynomial time whether a disjoint set of matchingedges can be added to form an IC-planar graph. However, testing IC-planarity of a graph isNP-complete, even if the graph is given with a rotation system.

8

Page 17: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Outline of the Book Section 1.1

This chapter is based on joint work with Franz J. Brandenburg, Walter Didimo, William S.Evans, Giuseppe Liotta, and Fabrizio Montecchiani.

Acknowledgements

My first acknowledgments go to my advisor Alexander “Sascha” Wolff. My interest in graphdrawing awoke as soon as he came to Würzburg and I attended his lecture on AlgorithmicGraph Theory. In Germany, the advisor is called a doctor father, and Sascha fulfilled this rolein the very best way. He does a great job in giving his students insight into research activitiesand in giving them the possibility to travel to a wide range of conferences, workshops, andresearch visits. Particularly, I want to thank him for the fun he puts at doing research, keepinga strong personal connection to his colleagues, and answering every question at any time ofthe day.

I would further like to thank all the (former) members of our research group in Würzburgfor interesting discussions and for having fun together at lunch, during coffee breaks, or atdifferent activities outside of working hours. To me, they were not only co-workers, but ratherfriends that I had the pleasure to work with: Benedikt Budig, Thomas van Dijk, Martin Fink,Krzysztof Fleszar, Jan-Henrik Haunert, Fabian Lipp, Dongliang Peng, Nadine Schwartges,and Joachim Spoerhase.I am also grateful to my coauthors from other universities. I had a great time working

with them and they gave me the opportunity of learing a lot: Jawaherul Alam, Michael Bekos,Franz Brandenburg, Walter Didimo, William Evans, Michael Kaufmann, Stephen Kobourov,Giuseppe Liotta, Fabrizio Montecchiani, Benjamin Niedermann, Sergey Pupyrev, Ignaz Rutter,Marcus Schaefer, and André Schulz.

Of these, I would like to especially thank Michael Bekos for our interesting and successfulcollaboration. I really enjoyed his enthusiasm and commitment when working together,whether it was while he visited Würzburg, when he invited me to join his research group inAthens, or when meeting him at several other occasions. It is a pleasure to me that I met youand now am able to call you a friend.

Nothing I did would be possible without my lovely family. My father, Dieter Kindermann,has always been my role model and was the one who awakened my interest in math byteaching me even before school. My mother, Gertraud Kuhn, has been very supportive inall my decisions in life. She helped me with all kind of advice wherever she could. My olderbrother, Fabian Kindermann, has always been a person I could look up to. My younger sister,Anne Kindermann, has been my best friend during my whole childhood.

My special thanks go out to Andrea Jansohn. She has been the most inspirational part ofmy life, supported me in every thing I did, kept me in touch with the “real” world outside ofresearch, and was always there for me when I needed her. I am more than happy for knowingher.Finally, the financial support of my research via the European Science Foundation (ESF)

EuroGIGA project “Graph Drawings and Representations” (GraDR) is gratefully acknowl-edged. Particularly, I would like to thank Jan “Honza” Kratochvíl for managing the projectand for the annual invites to the Homonolo Workshop.

9

Page 18: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz
Page 19: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

2 Preliminaries

This chapter contains the most important preliminaries and definitions of graphs, graphdrawing, and complexity of algorithms. We seek to give a small introduction to the notationand the techniques used in this book. For an extended introduction into these fields, we referto books designated to this matter.A basic introduction to graph theory is given in the book Introduction to Graph Theory

by Trudeau [Tru93]. A more algorithmic approach is used in Algorithmic Graph Theory byGibbons [Gib85]. The basic concepts and algorithms for graph drawing are presented inGraphDrawing: Algorithms for the Visualization of Graphs by Di Battista et al. [BETT99], DrawingGraphs: Methods and Models by Kaufmann and Wagner (editors) [KW01], and Planar GraphDrawing by Nishizeki and Rahman [NR04]. These works are complemented by the recentlypublished Handbook of Graph Drawing and Visualization by Tamassia (editor) [Tam13]. Foran introduction to the basic design and analysis of algorithms, we refer to Introduction toAlgorithms by Cormen et al. [CLRS09]. Regarding approximation algorithms, more infor-mation can be found in Approximation Algorithms by Vazirani [Vaz03] an The Design ofApproximation Algorithms by Williamson and Shmoys [WS11].

2.1 Graphs

A directed graph is defined by a tupel G = (V , E) of a non-empty set of vertices V and a setof directed edges E ⊆ V × V = (u, v) ⊆ V ∣ u ≠ v. We say that an edge e = (u, v) startsin u and ends in v. We call u and v the endpoints of e. We call e an outgoing edge of u andan incoming edge of v. We forbid so-called loops, that is, edges where the two endpoints arethe same. We denote the number of vertices by n = ∣V ∣ and the number of edges by m = ∣E∣.Clearly, m ≤ (n2) = n(n − 1)/2.

An undirected graph is defined by a tupel G = (V , E) of a non-empty set of vertices V anda set of undirected edges E = u, v ⊆ V ∣ u ≠ v. The notation e = (u, v) is often used forundirected edges, too. In this case, we identify (u, v) and (v , u). If not specified otherwise,we assume graphs to be undirected.

In a graphG = (V , E), two verticesu, v ∈ V are called adjacent orneighbors if (u, v) ∈ E. Wedenote the set of vertices that are adjacent to a vertex u ∈ V by Adj(u) ∶= v ∈ V ∣ (u, v) ∈ E.Given an edge (u, v) ∈ E, we say that the vertices u and v are incident to (u, v).For a vertex v of an undirected graph, we define the degree deg(v) ∶= ∣Adj(v)∣ of v as the

number of adjacent vertices. Themaximum degree of a graph, which we denote by ∆, is themaximum of the degrees over all vertices, that is, ∆ = maxv∈V deg(v). For a vertex v of andirected graph, we define the outdegree outdeg(v) ∶= ∣u ∈ V ∣ (v , u) ∈ E∣ as the number ofedges leaving v and the indegree indeg(v) ∶= ∣u ∈ V ∣ (u, v) ∈ E∣ as the number of edgesentering v.

Page 20: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 2 Preliminaries

We call G′ = (V ′ , E′) a subgraph of a graph G = (V , E) if V ′ ⊆ V and E′ ⊆ E. We saythat G′ is induced by V ′ if E′ contains exactly the edges of G whose endpoints are both in V ′,that is, if E′ = (u, v) ∈ E ∣ u, v ∈ V ′. This graph is denoted by G[V ′].

A subdivision of a graph G is a graph G′ that is obtained by replacing every edge by a pathof arbitrary length. We call this operation subdividing an edge. The inverse operation, that is,replacing a path by an edge, is called smoothing out (the vertices on) the path. Similarly, andedge (u, v) can be contracted, that is, it is replaced by a single vertex w that is adjacent to theneighbors of u and v.A path P of length k is a graph P = (V , E) with V = v0 , v1 , . . . , vk and E = (v i , v i+1) ∣

0 ≤ i ≤ k − 1. We also denote a path by the sequence of its vertices P = ⟨v0 , v1 , . . . , vk⟩, or byits endpoints v0 → vk . A path is called simple if all vertices are pairwise different. We say thatthere is a path from u to v in a graph G if there is a subgraph P = ⟨u, . . . , v⟩ of G. A cycle oflength k is a path Ck = ⟨v0 , v1 , . . . , vk⟩ of length k with v0 = vk and k > 1 for directed graphs,and k > 2 for undirected graphs. A cycle is called simple if all vertices are pairwise different,with the exception of v0 = vk .

A graphG = (V , E) is connected if for every for every pair of vertices u, v ∈ V there is a pathfrom u to v in G; otherwise, G is disconnected. A connected component of G is a connectedsubgraphG[V ′] induced by amaximal subsetV ′ ⊆ V , that is, for everyV ′′ withV ′ ⊊ V ′′ ⊆ V ,G[V ′′] is not connected. Thus, G[V] = G is the only connected component of G if G isconnected.A Hamiltonian path is a path that visits every vertex exactly one. Correspondingly, a

Hamiltonian cycle is the augmentation of a path to a cycle. A graph is called Hamiltonian if itcontains a Hamiltonian cycle.A graph G is called k-vertex-connected or k-connected if G remains connected after the

removal of any k − 1 vertices. Correspondingly, G is called k-edge-connected if G remainsconnected after the removal of any k − 1 edges. A vertex cut is a set of vertices whose re-moval renders G disconnected, and an edge cut is a set of edges whose removal renders Gdisconnected. For 2-connected and 3-connected graphs, we also use the terms biconnectedand triconnected, respectively. If a vertex cut consists of a single vertex, we refer to it as acutvertex. Analogously, if an edge cut consists of a single edge, we refer to it as a bridge. If anedge cut forms a cycle, we refer to it as separating cycle. A separating cycle of length 3 is calledseparating triangle.

A graph that contains no simple cycle is called a forest. A connected forest is known as a tree.It is well-known that a tree contains exactly n − 1 edges, and that there is a unique simple pathbetween every pair of vertices. A tree T = (V , E) is usually considered as rooted in a root r ∈ V .In a rooted tree, the edges are directed such that indeg(r) = 0 and indeg(v) = 1 for everyother vertex v ∈ V ∖ r. A vertex v ∈ V is called a leaf if indeg(v) = 1 and outdeg(v) = 0.If (u, v) is an edge of T , we call u a parent of v and v a child of u. Similarly, we call u anancestor of v and v a successor of u if there exists a (directed) path from u to v. We define asubtree T[v] of a tree to be the induced subgraph T[V ′] with V ′ = u ∣ u is a successor of v.Consequently, v is the root of T[v].

A caterpillar is a tree that consists of a path, called spine, and a set of leaves that are connectedto the spine. An edge between a leaf and a spine vertex is called a leg. Another subclass oftrees are stars, which consist of a set of leaves and a single vertex that is connected to all leaves,called center. A wheel consists of a star and a cycle that connects all leaves of the star.

12

Page 21: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Graph Drawing Section 2.2

Figure 2.1: Two different IC-planar embeddings of the same graph with the same rotationsystem.

A graph G = (V , E) is called bipartite if the set of vertices can be decomposed into twodisjoint sets V1 and V2 with V = V1 ∪ V2 and V1 ∩ V2 = ∅, such that all edges are incident to avertex of each set: E ⊆ (u, v) ∣ u ∈ V1 , v ∈ V2. Amatching is a bipartite graph of maximumdegree 1.

2.2 Graph Drawing

A drawing of a graph G = (V , E) is a mapping Γ of G into the plane R2. Each vertex v ∈ V ismapped to a distinct point Γ(v), that is, Γ(u) ≠ Γ(v) for any other vertex u ≠ v. Each edge e =(u, v) ∈ E is mapped to a simple Jordan curve Γ(e) between the endpoints Γ(u) and Γ(v)of e. The relative interior of the curve Γ(e) does not contain Γ(w) for any vertex w ∈ V .We say that two edges e1 and e2 cross in a drawing Γ if the relative interiors of Γ(e1)

and Γ(e2) share a point. We call e1 and e2 crossing edges and the common point a crossingpoint. We do not allow edges to overlap, that is, to share an infinite number of points. Adrawing is planar if edges do not cross, and 1-planar if each edge is crossed at most once. AnIC-planar drawing is a special case of a 1-planar drawing where each vertex is incident to atmost one crossing edge. Following Euler’s formula, a planar graph has at most 3n − 6 edges, a1-planar graph has at most 4n − 8 edges, and an IC-planar graph has at most 13n/4 − 6 edges.A drawing Γ of a graph G induces an embedding E(G), which is the class of topologically

equivalent drawings. An embedding specifies faces, whose boundary consists of a cyclicsequence of edges between two vertices and of segments of edges from a vertex to a crossingpoint or from a crossing point to a crossing point. We say that a vertex u is incident to a face fin E(G) if u lies on the boundary of f . Incident edges are defined analogously. A triconnectedplanar graph has a unique planar embedding: the faces of the embedding are exactly thenon-separating cycles of the graph.An embedding can also be defined by a rotation system, that is, the circular order of the

incident edges around a vertex. Note that both definitions are equivalent for planar graphs.For non-planar graphs, the rotation system can directly be retrieved from a drawing or anembedding. The converse does not necessarily hold, as shown in Figure 2.1.In every drawing, there is exactly one face of infinite area, called the outer face. All other

faces, called inner faces, are bounded by their surrounding edges. In outerplanar graphs, thereis an embedding in which all vertices are incident to the outer face. Note that every drawing

13

Page 22: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 2 Preliminaries

induces a unique embedding, but for every embedding there is an infinite number of realizingdrawings.

The planarization G× of an embedding with crossings is obtained by treating the crossingpoints of two edges as specialized vertices of degree at least 4 and the edge segments as newedges. The planar embedding ofG× is inherited from E(G), and the embeddings can be takenas synonyms, in particular for an algorithmic treatment. In general, we assume that no morethan two edges cross in a single point.

Let G be a graph property, for example, planar, 1-planar, IC-planar, or Rac. An embeddingis maximal-G if no further edge can be added without violating G. We call the operationof adding edges to make a graph maximal-G amaximal-G augmentation. A graph G ∈ G ismaximal-G if every G-embedding is maximal-G. Such graphs are maximally dense since theaddition of an edge destroys the defining property.An embedding E(G) of a planar graph G, called primal graph, induces a dual graph G∗.

The dual graph consists of a vertex corresponding to each face in E(G), and an edge betweeneach pair of neighboring faces. This property is symmetric, meaning that G is the dual graphof G∗. Since any triconnected graph has a unique embedding, it induces a unique dual graph.A weak dual is the subgraph of the dual graph after removal of the vertex corresponding tothe outer face. The weak dual can be used to get an alternative definition for outerplanargraphs: A graph is outerplanar if and only if its weak dual is a tree. Similarly, we can define anouterpath as a graph whose weak dual is a path.

The drawing style or layout determines the types of curves used to draw the edges. Instraight-line or geometric drawings, every edge is represented by the straight-line segment thatconnects the representation of its endpoints. In polyline drawings, each edge consists of afinite number of edge segments. The touching points of these segments are called bends. Aspecial type of polyline drawings are orthogonal drawings, in which every segment has to behorizontal or vertical. Note that orthogonal drawings restrict vertex degrees to at most 4. Incircular-arc drawings, every edge is drawn as a segment of a circle. A (strictly) convex drawingis a drawing in which every face is (strictly) convex. Amonotone drawing is a straight-linedrawing such that, for every pair of vertices, there exists a path that monotonically increaseswith respect to some direction. A drawing is strongly monotone if this direction is the vectorbetween the representation of the two vertices.For planar graphs, many quality measures are well-studied. The most common measure

is the drawing area. If a graph is drawn such that all its vertices lie on the integer grid, thearea is defined by the width, that is, the difference between the extremal x-coordinates, andthe height, that is, the difference between the extremal y-coordinates. If the vertices are notdrawn on the integer grid, the area can be measured as the maximum distance over all pairsof vertices over the minimum distance over all pairs of vertices. Note that the area is boundedfrom below by the ratio between the length of the longest and the length of the shortest edgein the drawing. Another important quality measure is the angular resolution of a drawing.The angular resolution measure is defined as the smallest angle formed by any pair of edgesthat meet at a common vertex. For a graph with maximum degree d, a drawing has perfectangular resolution if the angular resolution is 2π/d.For non-planar graphs, there are different approaches to make the drawing appealing. In

general, a drawing with many crossings is harder to comprehend than a drawing with fewercrossings. However, minimizing the number of crossings is NP-hard [GJ83], even for graphs

14

Page 23: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Complexity Section 2.3

that become planar after removal of a single edge [CM13]. Another optimization criterion isthe maximization of crossing angles, that is, the angles between two edges in a crossing point.A drawing in which all crossing angles are optimal, that is, 90, is called a right-angle crossing(Rac) drawing.

2.3 Complexity

For algorithms and problems on graphs, we often analyze the complexity. There are twofundamental types of problems. Decision problems are yes-or-no questions, for example,whether a graph is planar. In optimization problems, we do not look for the existence of asolution, but for a best solution according to a given target function, for example, a drawing ofa graph with the minimum number of crossings. In amaximization problem, a best solution isone that maximizes the value of the target function. Analogously, in aminimization problem,a best solution is one that minimizes the value of the target function.When talking about the running time of an algorithm, we usually analyze the asymptotic

running time, which is described by the big O notation. Let f ∶N→ N be a function that mapsthe input size of a problem to the time that the algorithm requires to solve the problem. Then,we denote by

O( f ) = д∶N→ N ∣ ∃c > 0, n0 ∈ N ∀n ≥ n0∶ д(n) ≤ c ⋅ f (n)

the class of functions that asymptotically grow at most as fast as f . We say that the runningtime д of an algorithm lies in the order of f if д ∈ O( f ).If the running time of an algorithm lies in O(nk) for some constant k > 0, then the

algorithm is called a polynomial-time or efficient algorithm. The class P consists of all decisionproblems for which a deterministic algorithm exists that solves the problem in polynomialtime. Similarly, the class NP consists of all decision problems for which a nondeterministicalgorithm exists that solves the problem in polynomial time. It holds that P ⊆ NP, however, itis a long standing open problem whether P = NP or P ⊊ NP.

A problem A is NP-hard if every problem B ∈ NP can be reduced to A in polynomial time.A reduction from B to A is a transformation that maps any instance J of B to an instance I of Asuch that there is a valid solution for J if and only if there is a valid solution for I. Consequently,if we can solve one NP-hard problem in polynomial time, then we can solve every problemin NP efficiently. Since the common conjecture is that P ≠ NP, most people do not expectthat an NP-hard problem can be solved efficiently. A problem is NP-complete if it is NP-hardand in NP.An NP-hard problem is weakly NP-hard if there is an algorithm for the problem with

running time polynomial in the dimension of the problem and the magnitude of the inputnumbers if they are encoded in unary. Such an algorithm is called pseudo-polynomial; seeGarey and Johnson [GJ79]. On the contrary, a problem is strongly NP-hard if it remainsNP-hard even when the magnitude of the input numbers are encoded in unary; see Gareyand Johnson [GJ78]. Weak and strong NP-completeness are defined analogously.Usually, NP-hardness is proven by a reduction from a known NP-hard problem. In this

book, we use the following NP-hard problems for NP-hardness proofs.

15

Page 24: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 2 Preliminaries

Sat The Boolean satisfiability problem (Sat) is the first problem known to be NP-complete,and is used as a starting point for proving NP-hardness of any other problem [Coo71]. A Satformula is built from Boolean variables, the operators AND (denoted by ∧), OR (denotedby ∨), and NOT (denoted by ¬). A Sat formula is called satisfiable if it is true for someassignment of Boolean values to the variables. Sat is the problem of deciding whether a givenSat formula is satisfiable.

A literal l is either a variable x or the negation of a variable ¬x. A clause c is a disjunctionof literals l1 , . . . , kk , that is, c = (l1 ∨ . . . ∨ lk). A formula F is in conjunctive normal form ifit is a conjunction of clauses c1 , . . . , cm , that is, F = c1 ∧ . . . ∧ cm . It is known that every Satformula can be converted into an equivalent formula in conjunctive normal form. However,the size of the formula can rise exponentially by this conversion.

3Sat The 3-satisfiability problem (3Sat) is a special version of Sat. A 3Sat formula is aformula in conjunctive normal form in which every clause consists of at most three literals.This problem is also NP-complete; see Karp’s famous list of 21 NP-complete problems [Kar72].On the other hand, the 2-satisfiability problem (2Sat), in which every clause consists of atmost two literals, can be solved efficiently; see Krom [Kro67].

Planar-3Sat The planar 3-satisfiability problem (Planar-3Sat) is a version of 3Sat thatis often used to prove NP-hardness of planar graph drawing problems. An instance of 3Satwith a set X of variables and a set C of clauses is in Planar-3Sat if and only if the bipartitegraph GXC = (X ∪ C , EXC) with

EXC = (x , c) ∣ x ∈ c or ¬x ∈ c, x ∈ X , c ∈ C

is planar. Thus, there is an edge connecting a variable x ∈ X to a clause c ∈ C if x or ¬x is aliteral of c.

1-Planarity testing 1-Planarity testing is the problem of testing whether a given graphis 1-planar. It was shown by Grigoriev and Bodlaender [GB07] to be NP-complete. Theproblem remains NP-complete even if the input graph is a maximal planar graph with oneadditional edge [CM13].

Recall that NP-hard problems are not expected to admit efficient algorithms. However, foroptimization problems, we can still try to find a feasible solution that is close to optimal.

A usual approach for this is an approximation algorithm. For an instance I of an optimizationproblem Π, suppose that the value of an optimal solution is OPTI , and there is an algorithmthat finds a solution with value ALGI . If Π is a minimization problem, then this algorithmis an α-approximation algorithm if there is a factor α > 1 such that ALGI ≤ α ⋅ OPTI forevery instance I of Π. Analogously, if Π is a maximization problem, then this algorithm isan α-approximation algorithm if there is a factor 0 < α < 1 such that ALGI ≥ α ⋅OPTI forevery instance I of Π. We call the algorithm an α-approximation, and α is the approximationfactor of the algorithm. Note that α does not necessarily have to be a constant; there are alsoapproximation algorithm whose approximation factor depends on the input size. If α is aconstant, we call the algorithm a constant-factor approximation algorithm.

16

Page 25: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Complexity Section 2.3

A polynomial-time approximation scheme (PTAS) is an approximation algorithm that,given an instance of an optimization problem and a factor ε > 0, solves the problem withapproximation factor 1 + ε. The running time of a PTAS is required to be polynomial in theinput size for every fixed ε. Usually, the running time heavily depends on ε. For example, aPTAS can have a running time of nO(1/ε). The term PTAS can also be used to refer to the classof optimization problems that have a PTAS.

The class APX is the set of optimization problems for which a constant-factor approximationalgorithm with polynomial running time exists. A problem A is called APX-hard if there is aPTAS reduction from every problem B ∈ APX to A, that is, a transformation that maps anyinstance J of B to an instance I of A such that a (1 + ε)-approximation to I yields a (1 + f (ε))-approximation to J, for some surjective function f ∶R+ → R+. A problem is APX-complete if itis APX-hard and in APX. Under the assumption that P ≠ NP, it holds that PTAS ≠ APX, thatis, no APX-hard problem has a PTAS. In this book, we use the following APX-hard problemsas starting points of APX-hardness reduction.

Gap The Generalized Assignment Problem (Gap) is defined as follows. Given a set X ofitems x1 , . . . , xn and a set B of bins b1 , . . . , bn . Each bin b i is associated with a budget w i , andeach item x j has a profit p ij and a weight w ij depending on the bin it is placed in. A solutionto Gap is an assignment of each item into at most one bin, such that, for each bin b i , thesum of the weights w ij of the items that are assigned to the bin does not exceed its budget w i .The profit of a solution is the sum of the profits p ij for each item–bin assignment. The goalis to find a solution with maximum profit. Chekuri and Khanna [CK05] proved that Gap isAPX-hard.

3DM The 3-dimensional matching problem (3DM) is a generalization of the efficiently solv-able bipartite matching problem, that is, finding a maximummatching in a bipartite graph.In 3DM, the input is not a graph as we know it, but a 3-dimensional hypergraph, that is, anedge does not connect two but three vertices. The value of a solution is the number of pickedhyperedges. More formally, an instance of this problem is given by three disjoint sets X ,Y , Zwith cardinalities ∣X∣ = ∣Y ∣ = ∣Z∣ = k and a set E ⊆ X × Y × Z of hyperedges. The objectiveis to find a matching M ⊆ E, such that no element of V = X ∪ Y ∪ Z is contained in morethan one hyperedge in M and such that ∣M∣ is maximized. This problem was shown to beAPX-hard by Fleischer et al. [FGMS11].

17

Page 26: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz
Page 27: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Part I

Placement of Boxes

Page 28: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz
Page 29: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

3 Multi-Sided Boundary Labeling

Label placement is an important problem in cartography and, more generally, informationvisualization. Features such as points, lines, and regions in maps, diagrams, and technicaldrawings often have to be labeled so that users understand better what they see. Even veryrestricted versions of the label-placement problem are NP-hard [vKSW99], which explainswhy labeling a map manually is a tedious task that has been estimated to take 50% of totalmap production time [Mor80]. The ACM Computational Geometry Impact Task Forcereport [Cc99] identified label placement as an important research area. The point-labelingproblem in particular has received considerable attention, from practitioners and theoreticiansalike. The latter have proposed approximation algorithms for various objectives (label numberversus label size), label shapes (such as axis-parallel rectangles or disks), and label-placementmodels (so-called fixed-position models versus slider models).

The traditional label-placement models for point labeling require that a label is placedsuch that a point on its boundary coincides with the point to be labeled, the site. This canmake it impossible to label all sites with labels of sufficient size if some sites are very closetogether. For this reason, Freeman et al. [FMC96] and Zoraster [Zor97] advocated the useof leaders, (usually short) line segments that connect sites to labels. In order to ensure thatthe background image or map remains visible even in the presence of large labels, Bekoset al. [BKSW07] took a more radical approach. They introduced models and algorithmsfor boundary labeling, where all labels are placed beyond the boundary of the map and areconnected to the sites by straight-line or rectilinear leaders (see Figure 3.1).

Problem statement. Following Bekos et al. [BKSW07] we define the Boundary Label-ing problem as follows. We are given an axis-parallel rectangle R = [0,W] × [0,H], whichis called the enclosing rectangle, a set P ⊂ R of n points p1 , . . . , pn , called sites, within therectangle R, and a set L of m ≤ n axis-parallel rectangles ℓ1 , . . . , ℓm of equal size, called labels.The labels lie in the complement of R and touch the boundary of R. No two labels overlap. Wedenote an instance of the problem by the triplet (R, L, P). A solution of a problem instance isa set ofm curves c1 , . . . , cm in the interior of R, called leaders, that connect sites to labels suchthat the leaders

a) induce a matching between the labels and (a subset of) the sites,

b) touch the associated labels on the boundary of R.

Following previous work, we do not define labels as the text associated with the sites, but asthe empty rectangles into which that text will be placed (during a post-processing step). Thisapproach is justified by our assumption that all label rectangles have the same size.A solution is planar if the leaders do not intersect. We call an instance solvable if a planar

solution exists. Note that we do not prescribe which site connects to which label. The endpoint

Page 30: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 3 Multi-Sided Boundary Labeling

KinderhausKunterbunt

EvangelischerKindergarten

EvangelischeKindertagesstatte

KindertagesstatteSt. Stephan

EvangelischerKindergarten

KindergartenMarienhaus

EvangelischerKindergarten

TagegruppeSterntaler

KatholischeKindertagesstatte

StadtischerKindergarten

StadtischerKindergarten

KindergartenMarienstraße

(a) straight-line leaders

KinderhausKunterbunt

EvangelischerKindergarten

EvangelischeKindertagesstatte

KindertagesstatteSt. Stephan

EvangelischerKindergarten

KindergartenMarienhaus

EvangelischerKindergarten

TagegruppeSterntaler

KatholischeKindertagesstatte

StadtischerKindergarten

StadtischerKindergarten

KindergartenMarienstraße

(b) opo-leadersKinderhausKunterbunt

EvangelischerKindergarten

EvangelischeKindertagesstatte

KindertagesstatteSt. Stephan

EvangelischerKindergarten

KindergartenMarienhaus

EvangelischerKindergarten

TagegruppeSterntaler

KatholischeKindertagesstatte

StadtischerKindergarten

StadtischerKindergarten

KindergartenMarienstraße

(c) po-leaders

Figure 3.1: Labeling of kindergartens in Karlsruhe, Germany. The pictures show differenttypes of leaders with labels on adjacent sides of the map. For better readability, we havesimplified the label texts.

of a curve at a label is called a port. We distinguish two versions of the Boundary Labelingproblem: either the position of the ports on the boundary of R is fixed and part of the input,or the ports slide, that is, their exact location is not prescribed.We restrict our solutions to po-leaders, that is, starting at a site, the first line segment of a

leader is parallel (p) to the side of R touching the label it leads to, and the second line segmentis orthogonal (o) to that side; see Figure 3.1c. (Figure 3.1b shows a labeling with so-called opo-leaders, which were investigated by Bekos et al. [BKSW07]). Bekos et al. [BKPS10, Figure 16]observed that not every instance admits a planar solution with po-leaders in which all sitesare labeled (even if m = n).

Previous and related work. For po-labeling, Bekos et al. [BKSW07] gave a simplequadratic-time algorithm for the one-sided case that, in a first pass, produces a labelingof minimum total leader length by matching sites and ports from bottom to top. In a secondpass, their algorithm removes all intersections without increasing the total leader length. Thisresult was improved by Benkert et al. [BHKN09] who gave an O(n log n)-time algorithm forthe same objective function and an O(n3)-time algorithm for a very general class of objectivefunctions, including, for example, bend minimization. They extend the latter result to the

22

Page 31: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Figure 3.2: Length-minimal solutions may have crossings. By increasing ∆, we can make theratio between the length-minimal matching and the length-minimal crossing-free matchingarbitrarily small.

two-sided case (with labels on opposite sides of R), resulting in an O(n8)-time algorithm. Forthe special case of leader-length minimization, Bekos et al. [BKSW07] gave a simple dynamicprogram running in O(n2) time. All these algorithms work both for fixed and sliding ports.Leaders that contain a diagonal part have been studied by Benkert et al. [BHKN09] and

by Bekos et al. [BKNS10]. Recently, Nöllenburg et al. [NPS10] have investigated a dynamicscenario for the one-sided case, Gemsa et al. [GHN11] have usedmulti-layer boundary labelingto label panorama images, and Fink et al. [FHS+12] have boundary labeled focus regions, forexample, in interactive on-line maps. Lin et al. [LKY08] consider boundary labeling wheremore than one site may be labeled by the same label. Lin [Lin10] and Bekos et al. [BCF+13]study hyperleaders that connect each label to a set of sites.

At its core, the boundary labeling problem asks for a non-intersecting perfect (ormaximum)matching on a bipartite graph. Note that an instance may have a planar solution, althoughall of its leader-length minimal matchings have crossings. In fact, the ratio between a length-minimal solution and a length-minimal crossing-free matching can be arbitrarily bad; seeFigure 3.2. When connecting points and sites with straight-line segments, the minimumEuclideanmatching is necessarily crossing-free. For this case anO(n2+ε)-timeO(n1+ε)-spacealgorithm exists [AES99].

Boundary labeling can also be seen as a graph-drawing problem where the class of graphsto be drawn is restricted to matchings. The restriction concerning the positions of the graphvertices (that is, sites and ports) has been studied for less restricted graph classes under thename point-set embeddability (PSE), usually following the straight-line drawing conventionfor edges [GMPP91]. For polygonal edges, Bastert and Fekete [BF96] proved that PSE withminimum number of bends or minimum total edge length is NP-hard, even when the graphis a matching. For minimizing the total edge length and the same graph class, Liebling etal. [LMM+95] introduced heuristics and Chan et al. [CHKL13] presented approximationalgorithms. Chan et al. also considered paths and general planar graphs. PSE has also beencombined with the ortho-geodesic drawing convention [KKRW10], which generalizes po-labeling by allowing edges to have more than one bend. The case where the mapping betweenports and sites is given has been studied in VLSI layout [RCS86].

Our contribution. In the first part of the chapter, we investigate the problem Two-SidedBoundary Labeling with Adjacent Sides where all labels lie on two adjacent sides of R,without loss of generality, on the top and right side. Note that point data often comes in acoordinate system; then it is natural to have labels on adjacent sides (for example, oppositethe coordinate axes). We argue that this problem is more difficult than the case where labels

23

Page 32: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 3 Multi-Sided Boundary Labeling

lie on opposite sides, which has been studied before: with labels on opposite sides, (a) thereis always a solution where all sites are labeled (if m = n) and (b) a feasible solution can beobtained by considering two instances of the one-sided case.We present an algorithm that, given an instance with n labels with fixed ports and n sites,

decides whether a planar solution exists where all sites are labeled and, if yes, computes alayout of the leaders (see Section 3.2). Our algorithm uses dynamic programming to “guess” apartition of the sites into the two sets that are connected to the leaders on the top side and onthe right side. The algorithm runs in O(n2) time and uses O(n) space.We study several extensions of our main result (see Section 3.3). First, we show that our

approach for fixed ports can also be made to work for sliding ports. Second, we optimallysolve the label-number maximization problem (in O(n3 log n) time using O(n) space). Thisis interesting if the position of the sites and labels does not allow for a perfect matching orif there are more sites than labels. Finally, we present a modification of our algorithm thatminimizes the leader length (in O(n8 log n) time and O(n6) space).In the second part of the chapter, we investigate the problems Three-Sided Boundary

Labeling and Four-Sided Boundary Labeling where the labels may lie on three or evenall four sides of R, respectively. To that end we generalize the concept of partitioning the siteslabeled by leaders of different sides. In this way we obtain subinstances that we can solveusing the algorithm for the two-sided case. We obtain an algorithm solving the four-sidedcase in O(n9) time and O(n) space and an algorithm solving the three-sided case in O(n4)time and O(n) space. Except for the leader-length minimization, all extensions presentedpreviously extend to the three- and four-sided case, of course with a corresponding impacton the running time and space requirements.

Notation. We call the labels that lie on the right (left / top / bottom) side of R right (left /top / bottom) labels. The type of a label refers to the side of R on which it is located. The typeof a leader (or a site) is simply the type of its label. We assume that no two sites lie on thesame horizontal or vertical line, and no site lies on a horizontal or vertical line through a portor an edge of a label.For a solution L of a boundary labeling problem, we define several measures that will be

used to compare different solutions. We denote the total length of all leaders inL by length(L).Moreover, we denote by ∣L∣x the total length of all horizontal segments of leaders that connect aleft or right label to a site. Similarly, we denote by ∣L∣y the total length of the vertical segments ofleaders that connect top or bottom labels to sites. Note that generally, ∣L∣x + ∣L∣y ≠ length(L).

We denote the (uniquely defined) leader connecting a site p to a port t of a label ℓ by λ(p, t).We denote the bend of the leader λ(p, t) by bend(p, t). In the case of fixed ports, we identifyports with labels and simply write λ(p, ℓ) and bend(p, ℓ), respectively.

3.1 Structure of Two-Sided Planar Solutions

In this section, we tackle the two-sided boundary labeling problem with adjacent sides bypresenting a series of structural results of increasing strength. We assume that the labels arelocated on the top and right sides of R. For simplicity, we assume that we have fixed ports.By identifying the ports with their labels, we use L to denote the set of ports of all labels. For

24

Page 33: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Structure of Two-Sided Planar Solutions Section 3.1

p′

p

` `′

K ′

K

p′

p

` `′

K ′

K

Figure 3.3: Illustration of the proof of Lemma 3.1. Rerouting λ(p, ℓ) and λ(p′ , ℓ′) to λ(p, ℓ′)and λ(p′ , ℓ) changes leaders only on the boundary of K′

sliding ports, we can simply fix all ports to the bottom-left corner of their correspondinglabels. First we show that a planar two-sided solution admits a transformation sustainingplanarity such that the result of the transformation can be split into two one-sided solutions byconstructing an xy-monotone, rectilinear curve from the top-right to the bottom-left cornerof R; see Figure 3.4. Afterwards, we provide a necessary and sufficient criterion to decidewhether there exists a planar solution for a given separation. This will form the basis of ourdynamic programming algorithm, which we present in Section 3.2.

Lemma 3.1. Consider a solution L for (R, L, P) and let P′ ⊆ P be sites of the same type.Let L′ ⊆ L be the set of labels of the sites in P′. Let K ⊆ R be a rectangle that contains all bendsof the leaders of P′. If the leaders of P ∖ P′ do not intersect K, then we can rematch P′ and L′such that the resulting solution L′ has the following properties:

(i) all intersections in K are removed,

(ii) there are no new intersections of leaders outside of K,

(iii) ∣L′∣x = ∣L∣x , ∣L′∣y = ∣L∣y , and

(iv) length(L′) ≤ length(L).

Proof. Without loss of generality, we assume that P′ contains top sites; the other cases aresymmetric. We first prove that, no matter how we change the assignment between P′ and L′,new intersection points can arise only in K. This enables us to construct the required solution.

Claim 1. Let ℓ, ℓ′ ∈ L′ and p, p′ ∈ P′ such that ℓ labels p and ℓ′ labels p′. Changing thematching by rerouting p to ℓ′ and p′ to ℓ does not introduce new intersections outside of K.

Let K′ ⊆ K be the rectangle spanned by bend(p, ℓ) and bend(p′ , ℓ′). When rerouting, wereplace λ(p, ℓ) ∪ λ(p′ , ℓ′) restricted to the boundary of K′ by its complement with respect tothe boundary of K′; see Figure 3.3 for an example. Thus, any changes concerning the leadersoccur only in K′. The statement of the claim follows.Since any rerouting can be seen as a sequence of pairwise reroutings, the above claim

shows that we can rematch L′ and P′ arbitrarily without running the risk of creating newconflicts outside of K. To resolve the conflicts inside K, we use the length-minimizationalgorithm for one-sided boundary labeling by Benkert et al. [BHKN09], with the sites andports outside K projected onto the boundary of K. Thus, we obtain a solution L′ satisfyingproperties (i)–(iv).

25

Page 34: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 3 Multi-Sided Boundary Labeling

C

R

r

p

C q

(P1)

pr

qC

(P2)

pq

rC

(P3)

C

qr

p

(P4)

Figure 3.4: An xy-separating curve of aplanar solution.

Figure 3.5: A planar solution that contains any of the abovefour patterns P1–P4 is not xy-separated.

Definition 3.1. We call an xy-monotone, rectilinear curve connecting the top-right to thebottom-left corner of R an xy-separating curve. We say that a planar solution to Two-SidedBoundary Labeling with Adjacent Sides is xy-separated if and only if there exists anxy-separating curve C such that

a) the sites that are connected to the top side and all their leaders lie on or above Cb) the sites that are connected to the right side and all their leaders lie below C.

It is not hard to see that a planar solution is not xy-separated if there exists a site p thatis labeled to the right side and a site q that is labeled to the top side with x(p) < x(q) andy(p) > y(q). There are exactly four patterns in a possible planar solution that satisfy thiscondition; see Figure 3.5. In Lemma 3.2, we show that these patterns are the only ones thatcan violate xy-separability.

Lemma 3.2. A planar solution is x y-separated if and only if it does not contain any of thepatterns P1–P4 in Figure 3.5.

Proof. Obviously, the planar solution is not xy-separated if one of these patterns occurs. Letus assume that none of these patterns exists. We construct an xy-monotone curve C fromthe top-right corner of R to its bottom-left corner. We move to the left whenever possible,and down only when we reach the x-coordinate of a site p that is connected to the top, orwhen we reach the x-coordinate of a port of a top label, labeling a site p. If we have to movedown, we move down as far as necessary to avoid the corresponding leader, namely down tothe y-coordinate of p. Finally, when we reach the left boundary of R, we move down to thebottom-left corner of R. If C is free of crossings, then we have found an xy-separating curve.(For an example, see curve C in Figure 3.4.)

Assume for a contradiction, that a crossing arises during the construction, and considerthe topmost such crossing. Note that, by the construction of C, crossings can only occur withleaders that connect a site p to a right port r. We distinguish two cases, based on whether thecrossing occurs on a horizontal or a vertical segment of the curve C.If C is crossed on a vertical segment, then this segment belongs to a leader connecting a

site q to a top port t, and we have reached the x-coordinate of either the port or the site. Hadwe, however, reached the x-coordinate of the port, this would imply a crossing between λ(p, r)and λ(q, t). Thus, we have reached the x-coordinate of q. This means that p lies to the left ofand above q, and we have found one of the patterns (P1) and (P2); see Figure 3.5.

26

Page 35: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Structure of Two-Sided Planar Solutions Section 3.1

If C is crossed on a horizontal segment, then pmust lie above r. Otherwise, there wouldbe another crossing of C with the same leader, which is above the current one. This wouldcontradict the choice of the topmost crossing. Consider the previous segment of C, whichis responsible for reaching the y-coordinate of the current segment. This vertical segmentbelongs to a leader connecting a site q to a top port t. Since leaders do not cross, q is tothe right of p, and the crossing on C implies that q is below p. We have found one of thepatterns (P3) and (P4); see Figure 3.5.

Observe that patterns (P1) and (P2) can be transformed into patterns (P3) and (P4), respec-tively, by mirroring the instance diagonally. Next, we prove constructively that, by reroutingpairs of leaders, any planar solution can be transformed into an xy-separated planar solution.

Proposition 3.1. If there exists a planar solution L to Two-Sided Boundary Labeling withAdjacent Sides, then there exists an xy-separated planar solution L′ with length(L′) ≤length(L), ∣L′∣x ≤ ∣L∣x , and ∣L′∣y ≤ ∣L∣y .Proof. Let L be a planar solution of minimum total leader length. We show that L is xy-separated. Assume, for the sake of contradiction, that L is not xy-separated. Then, byLemma 3.2, L contains one of the patterns (P1)–(P4). Without loss of generality, we canassume that the pattern is of type (P3) or (P4). Otherwise, we mirror the instance diagonally.

Consider all patterns (p, q) in L of type (P3) or (P4) such that p is a right site (with port r)and q is a top site (with port t). Among all such patterns, consider the ones where p isrightmost and among these pick one where q is bottommost. Let A be the rectangle spannedby p and t; see Figure 3.6.. Let A′ be the rectangle spanned by bend(q, t) and p. Let B be therectangle spanned by q and r. Let B′ be the rectangle spanned by q and bend(p, r). Then weclaim the following:

(i) Sites in the interiors of A and A′ are connected to the top.(ii) Sites in the interiors of B and B′ are connected to the right.

Property (i) is due to the choice of p as the rightmost site involved in such a pattern. Similarly,property (ii) is due to the choice of q as the bottommost site that forms a pattern with p. Thissettles our claim.Our goal is to change the labeling by rerouting p to t and q to r, which decreases the

total leader length, but may introduce crossings. We then use Lemma 3.1 to remove thecrossings without increasing the total leader length. Let L′′ be the labeling obtained from Lby rerouting p to t and q to r. We have ∣L′′∣y ≤ ∣L∣y − (y(p) − y(q)) and ∣L′′∣x = ∣L∣x −(x(q) − x(p)). Moreover, length(L′′) ≤ length(L) − 2(y(p) − y(q)), as at least twice thevertical distance between p and q is saved; see Figure 3.6. Since the original labeling wasplanar, crossings may only arise on the horizontal segment of λ(p, t) and on the verticalsegment of λ(q, r).By properties (i) and (ii), all leaders that cross the new leader λ(p, t) have their bends

inside A′, and all leaders that cross the new leader λ(q, r) have their bends inside B′. Thus,we can apply Lemma 3.1 to the rectangles A′ and B′ to resolve all new crossings. The resultingsolution L′ is planar and has length less than length(L). This is a contradiction to the choiceof L.

Since every solvable instance of Two-Sided Boundary Labeling with Adjacent Sidesadmits an xy-separated planar solution, it suffices to search for such a solution. Moreover, an

27

Page 36: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 3 Multi-Sided Boundary Labeling

q

B′

A↑

→B→

p

t

r

A′↑

(a) pattern (P3)

p

r

t

q

B′→ B→

A↑

A′ ↑

(b) pattern (P4)

Figure 3.6: Types (top= ↑ / right =→) of the sites inside rectangles A, A′, B, and B′.

xy-separated planar solution that minimizes the total leader length is a solution of minimumlength. In Lemma 3.3 we provide a necessary and sufficient criterion to decide whether, for agiven xy-monotone curve C, there is a planar solution that is separated by C. We denote theregion of R above C by RT and the region of R below C by RR. We do not include C in eitherRT or RR, so these regions are open at C.

For any point a ∈ R, we define the rectangle Ra , spanned by the top-right corner of R and a.We define Ra such that it is closed but does not contain its top-left corner. In particular, weconsider the port of a top label as contained in Ra , only if it is not the upper left corner.A rectangle Ra is valid if the number of sites of P above C that belong to Ra is at least as

large as the number of ports on the top side of Ra . The central idea is that the labels on the topside of a valid rectangle Ra can be connected to the sites in Ra by leaders that are completelycontained inside that rectangle. We are now ready to present the strip condition.

Condition 1. The horizontal strip condition of the point b ∈ C is satisfied if there exists apoint a ∈ RT with y(a) = y(b) and x(a) ≤ x(b) such that Ra is valid.

Without loss of generality we may assume that the curve C is rectilinear. The condition isnamed after the horizontal segments through points in C.We now prove that, for a given xy-monotone curve C connecting the top-right corner to

the bottom-left corner of R, there exists a planar solution in RT for the top labels if and only ifall points of C satisfy the strip condition.

Lemma 3.3. Let C be an xy-monotone curve from the top-right corner of R to the bottom-leftcorner of R. Let P′ ⊆ P be the sites that are in RT. There is a planar solution that uses all toplabels of R to label sites in P′ in such a way that all leaders are in RT if and only if each pointof C satisfies the strip condition.

Proof. For the proof we call a region S ⊆ R balanced if it contains the same number of sitesas it contains ports. To show that the conditions are necessary, let L be a planar solution forwhich all top leaders are above C. Consider a point b ∈ C. If y(p) ≥ y(b) for all sites p ∈ P′,

28

Page 37: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Structure of Two-Sided Planar Solutions Section 3.1

C

Ra

b

ph

a

(a)

C

h1

hl

hk

Sl

S1

h0S0

Sk

(b)

aiai−1

Rai−1

Chi

Si

Ci−1Ci

h

K

(c)

Figure 3.7: The strip condition. (a) The horizontal strip condition of b is satisfied by a. (b) Thehorizontal segments of C partition the strips S0 , S1 , . . . , Sk . (c) Constructing a planar labelingfrom a sequence of valid rectangles.

rectangle Ra with a = (0, y(b)) is clearly valid, and thus the strip condition for b is satisfied.Hence, assume that there is a site p ∈ P′ with y(p) < y(b) that is labeled by a top label; seeFigure 3.7a. Then, the vertical segment of this leader crosses the horizontal line h through b.Let a denote the rightmost such crossing of a leader of a site in P′ with h. We claim that Rais valid. To see this, observe that all sites of P′ top-right of a are contained in Ra . Since noleader may cross the vertical segment defining a, the number of sites in Ra ∩ RT is balanced,that is, Ra is valid.

Conversely, we show that if the conditions are satisfied, then a corresponding planar solutionexists. For each horizontal segment of C consider the horizontal line through the segment.We denote the part of these lines within R by h1 , . . . , h l , respectively, and let h0 be the top sideof R. The line segments h1 , . . . , h l partition RT into l strips, which we denote by S1 , . . . , S lfrom top to bottom, such that strip S i is bounded by h i from below for i = 1, . . . , l ; seeFigure 3.7b. Additionally, we define S0 to be the empty strip that coincides with h0. Let Skbe the last strip that contains sites of P′. For i = 0, . . . , k − 1, let a′i denote the rightmostpoint of h i ∩ RT such that Ra′i is valid. Such a point exists since the leftmost point of h i ∩ Csatisfies the strip condition. We define a i to be the point on h i ∩ RT, whose x-coordinateis min j≤ix(a′j). Note that Ra i is a valid rectangle, as, by definition, it completely containssome valid rectangle Ra′j with x(a′j) = x(a i). Also by definition the sequence formed by thepoints a i has decreasing x-coordinates, that is, the Ra i grow to the left; see Figure 3.7c.We prove inductively that, for each i = 0, . . . , k, there is a planar labeling Li that matches

the labels on the top side of Ra i to points contained in Ra i , in such a way that there existsan xy-monotone curve C i from the top-left to the bottom-right corner of Ra i that separatesthe labeled sites from the unlabeled sites without intersecting any leaders. Then Lk is therequired labeling.For i = 0, L0 = ∅ is a planar solution. Consider a strip S i with 0 < i ≤ k; see Figure 3.7c.

By the induction hypothesis, we have a curve C i−1 and a planar labeling Li−1, which matchesthe labels on the top side of Ra i−1 to the sites in Ra i−1 above C i−1. To extend it to a planarsolution Li , we additionally need to match the remaining labels on the top side of Ra i andconstruct a corresponding curve C i . Let Pi denote the set of unlabeled sites in Ra i . By thevalidity of Ra i , this number is at least as large as the number of unused ports at the top sideof Ra i . We arbitrarily match these ports to the topmost sites of Pi that are not labeled in Li−1.

29

Page 38: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 3 Multi-Sided Boundary Labeling

We denote the resulting labeling byL′i . We observe that no leader ofL′i crosses the curve C i−1,and hence such leaders cannot cross leaders in Li−1. Let h be the topmost horizontal line suchthat all labeled sites of L′i lie above h. Further, let K be the rectangle that is spanned by thetop-left corner of Ra i−1 and the intersection of h with the left side of Ra i . Since the ports of L′ilie on the top side of K, any leader’s bend of L′i lies in K. We apply Lemma 3.1 on L′i to obtaina planar labeling L′′i , which has no crossings with Li−1. Hence, the set Li = L′′i ∪Li−1 is therequired labeling.It remains to construct the curve C i . For this, we start at the top-left corner of Ra i and

move down vertically, until we have passed all labeled sites. We then move right until weeither hit C i−1 or the right side of R. In the former case, we follow C i−1 until we arrive atthe right side of R. Finally, we move down until we arrive at the bottom-right corner of Ra i .Note that all labeled sites are above C i , unlabeled sites are below C i , and no leader is crossedby C i . This is true since we first move below the new leaders and then follow the previouscurve C i−1.

A symmetric strip condition (with vertical strips) can be obtained for the right region RRof a partitioned instance. The characterization is completely symmetric.In the following we observe two properties of the strip condition. The first observation

states that the horizontal strip condition at (x , y) is independent of the exact shape of thecurve between the top-right corner r of R and (x , y), as long as the number of sites above thecurve remains the same. This is crucial for using dynamic programming to test the existenceof a suitable curve. The second observation states that the horizontal strip condition can onlybe violated when the curve passes the x-coordinate of a top site. This enables us to discretizethe problem.

Observation 3.1. The horizontal strip condition for a point a ∈ C depends only on the numberof sites in Ra above C, in the following sense: Let C and C′ be two xy-monotone curves from rto a with u sites in Ra above C and C′, respectively. Then, a satisfies the strip condition for C ifand only if it satisfies the strip condition for C′.

Observation 3.2. Let a, b ∈ C , x(a) ≤ x(b) such that there is no top site ℓ with x(a) < x(ℓ) ≤x(b). Then, a satisfies the horizontal strip condition for C if and only if b satisfies the horizontalstrip condition for C.

Symmetric statements hold for the vertical strip condition. In the following, we say that apoint (x , y) on a curve C satisfies the strip condition if it satisfies both the horizontal and thevertical strip condition.

3.2 Algorithm for the Two-Sided Case

How can we find an xy-monotone curve C that satisfies the strip conditions? For that pur-pose we only consider xy-monotone curves contained in some graph G that is dual to therectangular grid induced by the sites and ports of the given instance. Note that this is nota restriction since all leaders are contained in the grid induced by the sites and ports. Thus,every xy-monotone curve that does not intersect the leaders can be transformed into anequivalent xy-monotone curve that lies on G.

30

Page 39: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Algorithm for the Two-Sided Case Section 3.2

t

s s+ 1

t+ 1

B↑(s, t)

B↓(s, t)

B→(s, t)B←(s, t)

r = (N,M)

(0, 0)

Figure 3.8: The four boxes B↑(s, t), B↓(s, t), B←(s, t) and B→(s, t) defined by gridpoint (s, t).

When traversing an edge e of G, we pass the x- or y-coordinate of exactly one entity of ourinstance; either a site (site event) or a port (port event). When passing a site, the position ofthe site relative to e (above/below e or right/left of e) decides whether the site is connected tothe top or to the right side. Clearly, there is an exponential number of possible xy-monotonetraversals through the grid. In the following, we describe a dynamic program that finds anxy-separating curve in O(n3) time.Let mR and mT be the numbers of ports on the right and top side of R, respectively. Also,

let N = n +mT + 2 and M = n +mR + 2, then the grid G has size N ×M. We define the gridpoints as G(s, t), 0 ≤ s ≤ N , 0 ≤ t ≤ M with G(0, 0) being the bottom-left and r ∶= G(N ,M)being the top-right corner of R. Finally, let Gx(s) ∶= x(G(s, 0)) and Gy(t) ∶= y(G(0, t)).

For each grid point (s, t) that is neither on the topmost row nor on the rightmost column,we define four boxes B↑(s, t), B↓(s, t), B←(s, t) and B→(s, t) as follows; see Figure 3.8 for anillustration.

1. B↑(s, t) = (x , y) ∈ R ∣ Gx(s) ≤ x ≤ Gx(s + 1) ∧ y ≥ Gy(t)2. B↓(s, t) = (x , y) ∈ R ∣ Gx(s) ≤ x ≤ Gx(s + 1) ∧ y ≤ Gy(t)3. B←(s, t) = (x , y) ∈ R ∣ Gy(t) ≤ y ≤ Gy(t + 1) ∧ x ≤ Gx(s)4. B→(s, t) = (x , y) ∈ R ∣ Gy(t) ≤ y ≤ Gy(t + 1) ∧ x ≥ Gx(s)

Wedefine a table T[(s, t), u, b] that assigns to each grid position (s, t) and number of points uand b a Boolean value. We define T[(s, t), u, b] to be true if and only if there exists an xy-monotone curve C satisfying the following conditions.

(i) Curve C starts at r and ends at G(s, t).(ii) Inside the rectangle spanned by r and G(s, t), there are u sites of P above C and b sites

of P below C.(iii) For each grid point on C, the strip condition holds.

These conditions together with Proposition 3.1 and Lemma 3.3 imply that the instanceadmits a planar solution if and only if T[(0, 0), u, b] = true for some u and b.We define a Boolean function S[(s, t), u, b] that is true if and only if the strip condition

at (s, t) is satisfied for some xy-monotone curve C (and thus by Observation 3.1 for all suchcurves) from r to G(s, t) with u sites above and b sites below C. The following lemma gives a

31

Page 40: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 3 Multi-Sided Boundary Labeling

recurrence for T , which is essentially a disjunction of two values, each of which is determinedby distinguishing three cases.

Lemma 3.4. For s = N and t = M, it holds that T[(s, t), 0, 0] = true. For s ∈ [0,N − 1] andt ∈ [0,M − 1], it holds that

⎧⎪⎪⎪⎨⎪⎪⎪⎩

T[(s + 1, t), u, b] ∧ S[(s, t), u, b] L ∩ B↑(s, t) ≠ ∅T[(s + 1, t), u − 1, b] if P ∩ B↑(s, t) ≠ ∅T[(s + 1, t), u, b] P ∩ B↓(s, t) ≠ ∅

⎫⎪⎪⎪⎬⎪⎪⎪⎭T[(s, t), u, b] = ⋁

⎧⎪⎪⎪⎨⎪⎪⎪⎩

T[(s, t + 1), u, b] ∧ S[(s, t), u, b] L ∩ B→(s, t) ≠ ∅T[(s, t + 1), u, b − 1] if P ∩ B→(s, t) ≠ ∅T[(s, t + 1), u, b] P ∩ B←(s, t) ≠ ∅

⎫⎪⎪⎪⎬⎪⎪⎪⎭.

Proof. We show equivalence of the two terms. Let C be an xy-monotone curve from r to (s, t).Let e be the last segment of C and let C′ = C − e. Since C is xy-monotone, C′ ends eitherat the grid point (s + 1, t) or at (s, t + 1). Without loss of generality, we assume that C′ endsat (s + 1, t). We show that T[(s, t), u, b] = true if and only if the first term of the right handside is true. Analogous arguments apply for C′ ending at (s, t + 1) and the second term. Notethat, by construction, property (i) is satisfied for C and C′.We distinguish cases based on whether the traversal along the segment e from (s + 1, t)

to (s, t) is a port event or a site event.Case 1: Traversal of e is a port event. Since e passes a port, all sites that lie in the rectangle

spanned by r and G(s, t) also lie in the rectangle spanned by r and G(s + 1, t). Thus, thenumbers u and b of such sites above and below C is the same as the numbers of sites aboveand below C′, respectively. Hence, property (ii) holds for C if and only if it holds for C′.Because C′ is a subset of C, the strip condition holds for every point of C if and only if it

holds for every point of C′ and for (s, t). Thus, property (iii) is satisfied for C if and only if itis satisfied for C′ and S[(s, t), u, b] = true.Case 2: Traversal of e passes a site p. For property (iii), observe that, since the traversal of e

is a site event, the strip conditions for (s, t) and (s + 1, t) are equivalent by Observation 3.2.For property (ii), note that, except for p, the sites that lie in the rectangle spanned by r

and G(s, t) also lie in the rectangle spanned by r and G(s + 1, t). If p lies above e, there are usites above and b sites below C if and only if there are u − 1 sites above and b sites below C′,respectively. Symmetrically, if p lies below e, there are u sites above and b sites below C if andonly if there are u sites above and b − 1 sites below C′, respectively. In either case, C satisfiescondition (ii) if and only if C′ does.

Clearly, the recurrence from Lemma 3.4 can be used to compute T in polynomial timevia dynamic programming. Note that it suffices to store u, as the number of sites below thecurve C can directly be derived from u and all sites that are contained in the rectangle spannedby r and G(s, t). Thus, in the following we work with T[(s, t), u]. The running time cruciallyrelies on the number of strip conditions that need to be checked. We show that after a O(n2)preprocessing phase, such queries can be answered in O(1) time.

To implement the test of the strip conditions, we use a table BT, which stores in BT[s, t] howlarge a deficit of sites to the right can be compensated by sites above and to the left of G(s, t).

32

Page 41: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Algorithm for the Two-Sided Case Section 3.2

That is, BT[s, t] is the maximum value k such that there exists a rectangle KBT[s ,t] with lowerright corner G(s, t) whose top side is bounded by the top side of R, and that contains k moresites in its interior, than it has ports on its top side. Once we have computed this matrix, it ispossible to query the strip condition in the dynamic program that computes T in O(1) timeas follows: Assume we have an entry T[(s, t), u], and we wish to check its strip condition.Consider a curve C from r to G(s, t) such that u sites are above C. The strip condition issatisfied if and only if u + BT[s, t] is at least as large as the number of top ports to the rightof G(s, t). This is true if the rectangle spanned by the lower left corner of KBT[s ,t] and rcontains at least u + BT[s, t] sites, which is an upper bound on the number of ports on thetop side of that rectangle.

We now show how to compute BT in O(n2) time. We compute each row separately, startingfrom the left side. We initialize BT[0, t] = 0 for t = 0, . . . ,M, since in the final column, nodeficit can be compensated. Thematrix B can be filled by a horizontal sweep. The entry BT[s, t]can be derived from the already computed entry BT[s − 1, t]. If the step from s − 1 to s is asite event, the amount of the deficit we can compensate increases by 1. If it is a port eventthe amount of the deficit we can compensate decreases by 1. Moreover, the compensationpotential never goes below 0. We obtain

BT[s, t] =⎧⎪⎪⎨⎪⎪⎩

BT[s − 1, t] + 1 if step is site event,maxBT[s − 1, t] − 1, 0 if step is port event.

The table can be clearly filled out in O(n2) time. A similar matrix BR can be computed forthe vertical strips. Altogether, this yields an algorithm for Two-Sided Boundary Labelingwith Adjacent Sides that runs in O(n3) time and uses O(n3) space. However, the entriesof each row and column of T depend only on the previous row and column, which allows usto reduce the storage requirement to O(n2). Using Hirschberg’s algorithm [Hir75], we canstill backtrack the dynamic program and find a solution corresponding to an entry in the lastcell in the same running time. We have the following theorem.

Theorem 3.1. Two-Sided Boundary LabelingwithAdjacent Sides can be solved in O(n3)time using O(n2) space.

Our next goal is to improve the performance of our algorithm by reducing the number ofdimensions of the table T by 1. As a first step, we show that for any search position c = (s, t),the set of all u with T[c, u] = true is an interval.

Lemma 3.5. Let T[c, u] = T[c, u′] = true with u < u′. Then T[c, u′′] = true for u ≤ u′′ ≤u′.

Proof. Let C be a curve corresponding to the entry T[c, u]. That is C connects r to c suchthat any point on C satisfies the strip condition. Similarly, let C′ be a curve correspondingto T[c, u′]; see Figure 3.9.

Since u and u′ differ, there is a rightmost site p, such that p is below C and above C′. Let vand v′ be the grid points ofC andC′ that are immediately to the left of p. Note that v is above v′since C is above p and C′ is below it. Consider the curve C′′ that starts at r and follows Cuntil v, then moves down vertically to v′, and from there follows C′ to p. Obviously C′′ is an

33

Page 42: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 3 Multi-Sided Boundary Labeling

xy-monotone curve, and it has above it the same sites as C′, except for p, which is below it.Thus there are u′′ = u′ − 1 sites above C′′ in the rectangle spanned by p and r. If all pointsof C′′ satisfy the strip condition, then this implies T[c, u′′] = true.We show that indeed the strip condition is satisfied for any point on C′′. Let C1 be the

subcurve of C′′ that connects r to v, let C2 be the segment vv′ and let C3 be the subcurveof C′′ that connects v′ to c. Since C1 is also a subcurve of C and it starts at r, it directlyfollows that any point of C1 satisfies the strip condition. For the points on C2 we can argue asfollows. Since C2 lies below C and any point of C satisfies the horizontal strip condition, anypoint of C2 must satisfy the horizontal strip condition. Analogously, because C2 lies above C′and any point of C′ satisfies the vertical strip condition, each point of C2 must satisfy thevertical strip condition. Finally, since C3 is a subcurve of C′, any point of C′ satisfies the stripcondition and any point of C1 and C2 satisfies the strip condition, it directly follows that anypoint of C3 satisfies the strip condition.

Using Lemma 3.5, we can reduce the dimension of the table T by 1. It suffices to store ateach entry T[c] the boundaries of the u-interval. This reduces the amount of storage toO(n2)without increasing the running time. Using Hirschberg’s algorithm, the storage for T evendecreases to O(n). Tables BT and BR still have size O(n2), however.Our next goal is to reduce the running time to O(n2). An entry in BT[s, t] tells us which

deficits can be compensated. This can also be interpreted as a lower bound on the numberof sites a curve from r to G(s, t)must have above it, in order to satisfy the horizontal stripcondition. Namely, let τs ,t denote the number of ports on the top side of the rectanglespanned by G(s, t) and r. Then u ≥ τs ,t − BT[s, t] is equivalent to satisfying the horizontalstrip condition for the strip directly above G(s, t). Similarly, the corresponding entry BR[s, t]gives a lower bound on the number of sites below such a curve, which in turn, together withthe number of sites contained in the rectangle spanned by G(s, t) and r implies an upperbound on the number of sites above the curve. Thus, BT, BR, and the information on howmany sites, top ports and right ports are in the rectangle spanned by G(s, t) and r togetherimply a lower and an upper bound, and thus an interval of u-values, for which the horizontaland vertical strip conditions at G(s, t) is satisfied. Hence the program can simply intersectthis interval with the union of the intervals obtained from T[(s, t)−∆c], where ∆c has exactlyone non-zero entry, which is 1. Consequently, the amount of work per entry of T is still O(1).Note that by Lemma 3.5 the result of this computation is again an interval.Now, we turn to the space consumption. Hirschberg’s algorithm [Hir75] immediately

reduces the space consumption of T to O(n). We would like to apply the same trick to BT andto BR. Recall that BT is computed from left to right and BR from bottom to top. Unfortunately,this is opposite to the order we use for computing T , where we proceed from top-right tobottom-left. We can fix this problem by running the dynamic programs for computing BTand BR backwards, by precomputing the entries of BT and BR on the top and right side, andthen running the updates backwards. This allows us to use Hirschberg’s algorithm, and thealgorithms can run in a synchronized manner such that at any point in time the required datais available, using only O(n) space.

A new issue, however, appears. The update BT[s, t] = maxBT[s − 1, t] − 1, 0 is not easilyreversible. When running the dynamic program backwards, it is not clear whether BT[s, t] =0 implies BT[s − 1, t] = 0 or BT[s − 1, t] = 1 at a port step. To remedy this issue, fix a

34

Page 43: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Extensions Section 3.3

p

c

C ′′

C

C ′

v

v′

s

t0

BT[s− 1, t] = 0

K

p

p′

C

λ(p, `)

λ(p′, `′)

`

`′

Figure 3.9: Sketch forthe proof of Lemma 3.5.

Figure 3.10: The gap t0 is defined suchthat we have BT[s − 1, t] = 0 forany t ≥ t0, and BT[s − 1, t] > 0 forany t < t0.

Figure 3.11: Sketch forthe proof of Lemma 3.6

column s of the table corresponding to a port event and consider the circumstances underwhich BT[s − 1, t] − 1 = −1, that is, BT[s − 1, t] = 0. This implies that, for any rectangle Kwith lower right corner G(s − 1, t) whose top side is contained in the top side of R, thereare at most as many sites in K as there are ports in the top side of K. Assume that this isthe case for some fixed value t0, that is, BT[s − 1, t0]. Since the possible rectangles for anentry BT[s − 1, t] with t ≥ t0 contain at most as many sites as the ones for BT[s − 1, t0],this implies BT[s − 1, t0] = BT[s − 1, t] = 0 for all t ≥ t0. If on the other hand, t0 is suchthat BT[s − 1, t0] > 0, then the rectangles corresponding to BT[s − 1, t] for t < t0 containat least as many sites as the ones for BT[s − 1, t0], and we have BT[s − 1, t] ≥ BT[s − 1, t0]for t < t0. Thus, there is a single gap t0 such that, for any t ≥ t0, we have BT[s − 1, t] = 0 and,for any t < t0, we have BT[s − 1, t] > 0; see Figure 3.10. Storing this gap for each column s thatis a port event allows us to efficiently reverse the dynamic program. Note that storing onevalue per column only incurs O(n) space overhead. Of course, the same approach works forthe dynamic program computing BR. Overall, we have shown the following theorem.

Theorem3.2. Two-Sided Boundary LabelingwithAdjacent Sides can be solved in O(n2)time using O(n) space.

3.3 Extensions

The techniques we used to obtain Theorem 3.2 can be applied to solve a variety of differentextensions of the two-sided labeling problem with adjacent sides. We now show how to

a) generalize to sliding ports instead of fixed ports,

b) maximize the number of labeled sites, and

c) minimize the total leader length in a planar solution.

35

Page 44: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 3 Multi-Sided Boundary Labeling

3.3.1 Sliding PortsFirst, observe that Proposition 3.1, which guarantees the existence of an xy-separated planarsolution, also holds for sliding ports. The same proofs apply by conceptually fixing the ports ofa given planar solution when applying the rerouting operations. The following lemma showsthat, without loss of generality, we can simply fix all ports at the bottom-left corner of theircorresponding labels. This immediately solves the problem.

Lemma 3.6. If there exists an xy-separated planar solution L for the two-sided boundarylabeling problem with adjacent sides and sliding ports, then there also exists an xy-separatedplanar solution L′ in which the ports are fixed at the bottom left corners of the labels.

Proof. We show how to transform L into L′. Let C be the xy-monotone curve that separatesthe top leaders from the right leaders ofL. We move the ports induced byL to the bottom-leftcorner of their corresponding labels such that the assignment between labels and sites remains;see Figure3.11. Obviously, the bends of the leaders connected to the right side only movedownwards. Thus, the leaders lie entirely below C. Symmetrically, the bends of the leadersconnected to the top side only move to the left and thus these leaders lie entirely above C.Consequently, only conflicts between the same type of leaders can arise. Consider the

topmost intersection of two leaders λ(p, ℓ) and λ(p′ , ℓ′) connected to the right side andassume that p lies to the left of p′. Let K be the rectangle that is spanned by the bendsof λ(p, ℓ) and λ(p′ , ℓ′). Due to moving the ports downwards, the leaders lie entirely below Cand the bend of λ(p′ , ℓ′)must lie below λ(p, ℓ). Hence, K lies completely in RR. In order toresolve the conflict, we reroute p to ℓ′ and p′ to ℓ using the bottom-left corners of ℓ and ℓ′as ports. Obviously, the leaders only change on ∂K. Therefore, new conflicts can only ariseon the left and bottom sides of K. In particular, only the leader of ℓ′ can be involved in newconflicts, while the leader of ℓ is free of any conflict. Thus, after finitely many such steps wehave resolved all conflicts, from top to bottom. Symmetric arguments apply for the leadersconnected to the top side.

Theorem 3.3. Two-Sided Boundary Labeling with Adjacent Sides and Sliding Portscan be solved in O(n2) time using O(n) space.

3.3.2 Maximizing the Number of Labeled SitesSo far our algorithm only returns a leader layout if there is a planar solution that matcheseach label to a site. As Bekos et al. [BKPS10, Figure 16] observed, this need not always be thecase, so it becomes important to be able to maximize the number of labels connected to sitesin a planar solution. We achieve this by removing labels from a given instance and using ouralgorithm to decide whether a crossing-free solution exists.

Lemma 3.6 shows that we canmove top ports to the left and right ports to the bottomwithoutmaking a solvable instance unsolvable. Thus, it suffices to remove the rightmost top labelsand the topmost right labels. Let k be the number of labels we want to use with kT of thembeing top labels and kR right labels, so that kT + kR = k. For a given k, we can decide whethera crossing-free solution that uses exactly k labels exists by removing the mT − kT rightmosttop labels and the mR − kR topmost right labels for any possible kT and kR. We thereforestart with kT = mink,mT and kR = k − kT. We keep decreasing kT and increasing kR by 1,

36

Page 45: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Extensions Section 3.3

KG(s, t)

(a)

K

FT

G(s, t) G(s−1, t)

(b)

Figure 3.12: Illustration of the curve C and the rectangle K spanned by G(s, t) and the top-right corner of R. (a) There are more sites than ports in K above C. The unlabeled sites areconnected to a dummy port located at the top-left corner of K. The dummy port is illustratedas a square. (b) There are more ports than sites in K above C. The unlabeled ports are labeledto sites that lie to the left of K, which induce the front with bottom-left point FT.

until a crossing-free solution is found or kR = mink,mR. In the latter case, no crossing-freesolution that uses exactly k labels exists. With this approach we can use binary search tofind the maximum k, using our algorithm up to k times per step. Since k ≤ n, this yields analgorithm for Two-Sided Boundary Labeling with Adjacent Sides that maximizes thenumber of labeled sites that runs in O(n3 log n) time and uses O(n) space.

Theorem 3.4. Two-Sided Boundary Labeling with Adjacent Sides can be solved inO(n3 log n) time using O(n) space such that the number of labeled sites is maximized.

Assume that t sites cannot be labeled. Then Two-Sided Boundary Labeling withAdjacent Sides can be solved in O(n2 t log t) time using O(n) space and such that thenumber of labeled sites is maximized. To that end we use the following approach. We checkfor h = 2i with i = 0, 1, 2, . . . whether there is a planar solution with h unlabeled sites. Westop this procedure when we have found such a solution, which takes place after ⌈log(t)⌉steps. Using the approach described above, we need O(n2 t) time for each test. We thenknow that h

2 < t ≤ h. We apply a binary search to determine t. Overall, this approachneeds O(n2 t log t) time.

3.3.3 Minimizing the total leader length

Recall that, by Proposition 3.1, there always exists a length-minimal planar solution that isxy-separated. To obtain a length-minimal planar solution, we mainly change the table Tused by the dynamic program given in Section 3.2. Let C be an xy-monotone curve C thatstarts at r and ends at G(s, t). We assign to every table entry the length of the leaders that areconnected to the ports in the rectangle K spanned by r and G(s, t).

If there are more sites than top ports in K above C, we have to connect some of these sitesto ports that lie to the left of K; see Figure 3.12a. The vertical lengths of their leaders, however,are fixed. We imagine a dummy top port at the left border of K and connect all unlabeledsites to this port. When traversing the grid horizontally, this dummy port moves to the left. Inorder to update the total length of the leaders in K, we only have to keep track of the number

37

Page 46: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 3 Multi-Sided Boundary Labeling

of unlabeled sites and increase the horizontal length of their leaders. The sites in K below Care handled analogously.

If there are more top ports than sites in K above C, we have to connect these ports to sitesthat lie to the left of K; see Figure 3.12b. In order to remember which sites are already labeled,we store the top front as the rectangle with top-right corner r that includes all sites that arealready connected to a top port inside K, and the right front as the rectangle with top-rightcorner r that includes all sites that are already connected to a right port inside K.

Let FT = (xT , yT) be the bottom-left point of the top front for a given xy-monotone curveCthat starts at r and ends at G(s, t). Similarly, let FR = (xR , yR) be the right front for C. Wedefine T[c = (s, t), u, FT , FR] = (l , дT , дR) if there exists an xy-monotone curveC and leadersinside K ∪ FT ∪ FR such that the following conditions hold, otherwise it contains (−1, 0, 0).

(i) Curve C starts at the top-right corner r of R and ends at G(s, t).(ii) Inside the rectangle K spanned by r and G(s, t), there are u sites of P above C.(iii) For each strip in the two regions RT and RR defined by C the strip condition holds.(iv) The sites in K ∪ FT ∪ FR are connected to the ports on the border of K ∪ FT ∪ FR such

that the induced solution is planar, length-minimal, the sites above C or in FT are onlyconnected to top ports, and the sites below C or in FR are only connected to right ports.

(v) There are дT unlabeled top sites and дR unlabeled right sites in K.Note that дT and дR depend on s, t, u and can be precomputed, but to make the algorithm

more intuitive, we update these values on-line and store them in T . We first describe howto handle the top front while traversing the grid. Initially, FT = G(s, t). As long as wehave more top sites than top ports in K, we can connect all ports to sites and thus canmaintain FT = G(s, t). Once we have exactly the same number of top ports and top sites in Kand we encounter a port event for a top port, we have to check the strip condition and findthe rightmost point FT with y(FT) = Gy(t) such that the rectangle RFT spanned by FT and ris valid. By storing FT, we know that all ports to the right of x(FT) are already connected toa site, all sites to the top-right of FT are already connected to a port, and all top sites to thebottom-left of FT have to be connected to a port that lies to the left of x(FT). Thus, we do nothave to check new strip conditions until s < x(FT). We handle FR similarly.

We now look at the length of the top leaders, the length of the right leaders can be handledsimilarly. Note that by moving from t to t − 1, the length of the top leaders does not change.If дT > 0, we imagine an additional port at x(FT) that can be connected to дT top sites. Whenmoving from s to s− 1, we add дT ⋅(Gx(s)−Gx(s− 1)) to l . When we calculate a new value FTby checking the strip condition, we can immediately connect all top sites inside the top frontto top ports, and add the corresponding leader length to l . Thus, we only encounter site eventsfor sites that are a) inside FT ∖ K or b) have to be connected to a top port that lies to the leftof x(FT). In case a) we do not change l , in case b) we connect the site to the imaginary port,add the length of the corresponding leader to l and increase дT by 1. When we encounter aport event, if the port lies inside FT ∖ K, we do not change l , otherwise we can connect any ofthe unlabeled sites to this port. We add the horizontal distance between Gx(s) and the portto l and decrease дT by 1. Note that by choosing any unlabeled site, the resulting solution maynot be planar. However, because the bends of all unconnected sites will be above C, we canuse Lemma 3.1 to remove the crossings without changing the total leader length.

Since the matrix now has four additional fields, the running time and storage is increasedby a factor of n4 over the algorithm from Theorem 3.1. Additionally, we need O(n log n) time

38

Page 47: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

The Three- and Four-Sided Cases Section 3.4

o

C1

C2

C3

C4

Figure 3.13: The curves C1, C2, C3 and C4 meeting at the point o partition the rectangle intofour regions.

to check the strip condition and to compute a length-minimal solution for the sites and portsinside FT ∖ K and FR ∖ K.

Theorem 3.5. Two-Sided Boundary Labeling with Adjacent Sides can be solved inO(n8 log n) time using O(n6) space such that the total leader length is minimized.

Using an appropriate data structure to precompute the fronts, it may be possible to decreasethe running time slightly.

3.4 The Three- and Four-Sided Cases

In this section, we also allow labels on the bottom and the left side of R. In order to solvean instance of the three- and four-sided case, we adapt the techniques we developed for thetwo-sided case. We assume that the ports are fixed and the number of labels and sites is equal.In Section 3.4.1 we first analyze the structure of planar solutions obtaining a result similar toProposition 3.1. In Sections 3.4.2 and 3.4.3, we present algorithms for the three- and four-sidedcases.

3.4.1 Structure of Three- and Four-Sided Planar Solutions

Similar to our approach to two-sided boundary labeling, we pursue the idea that if there existsa planar solution, then we can also find a planar solution such that there are four xy-monotonecurves connecting the four corners of R to a common point o, and such that these curvesseparate the leaders of the different label types from each other; see Figure 3.13. To that end,we first show that leaders of left and right labels can be separated vertically and leaders of topand bottom labels can be separated horizontally. Afterwards, we apply the result of Lemma 3.2in order to resolve the remaining overlaps, for example, between top and right leaders. Wefirst introduce some notions.

Definition 3.2. A planar solution for the four-sided boundary labeling problem is

39

Page 48: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 3 Multi-Sided Boundary Labeling

pR

pL`

r

A

S

λR

λL

(a) empty rectangle

pR

pL`

r

pT

λT

λL

qR

qT

K1

K2

λ′Rλ′T

λR

λ

λ′

(b) case 1

pR

pL`

r

pT

λT

λL

λR

∅B

K1

pB

λB

K2

(c) case 2.1

pR

pLpT

λ′T

λ′L

λ′R

∅pB

λ′B

K1

K2

K3

K4

qB

qR

qT

qL

(d) case 2.2

Figure 3.14: Different constellations of leaders intersecting the rectangleA. (a)The rectangleAis empty. (b)–(d) Different cases where A is intersected by a top leader. A is not explicitlyillustrated, but spanned by bend(λR) and bend(λL).

(i) x-separated if there exists a vertical line ℓ such that the sites that are labeled to the leftside are to the left of ℓ and the sites that are labeled to the right side are to the right of ℓ,and

(ii) y-separated if there exists a horizontal line ℓ such that the sites that are labeled to thetop side are above ℓ and the sites that are labeled to the bottom side are below ℓ.

A left leader λ and a right leader λ′ overlap if x(bend(λ)) > x(bend(λ′)). Analogously, abottom leader λ and a top leader λ′ overlap if y(bend(λ)) > y(bend(λ′)). Hence, a planarsolution L is both x-separated and y-separated if and only if no left and right leaders overlap,and no bottom and top leaders overlap. We are now ready to prove that we can always find aplanar solution that is both x-separated and y-separated, if a solution exists.

Lemma 3.7. If there exists a planar solution for the four-sided boundary labeling problem, thenthere exists a planar solution L that is both x-separated and y-separated.

Proof. Among all planar solutions letL be one that minimizes ∣L∣x + ∣L∣y . We prove that thenL is x- and y-separated by showing that otherwise we could reroute some leaders and obtaina planar solution L′ with ∣L′∣x + ∣L′∣y < ∣L∣x + ∣L∣y .

40

Page 49: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

The Three- and Four-Sided Cases Section 3.4

Assume that L is not x-separated. Symmetric arguments hold for the case that L is noty-separated. Then there exist sites pR and pL with x(pR) < x(pL), such that pR is labeled by aright port r, and pL is labeled by a left port ℓ; see Figure 3.14a. Without loss of generality, assumethat the horizontal segment of λR = λ(pR , r) is above the horizontal segment of λL = λ(pL , ℓ),otherwise we mirror the instance vertically.We choose pL and pR as a closest pair in the sense that the horizontal segments of their

leaders have minimum vertical distance among all such pairs. Let A be the rectangle spannedby bend(λL) and bend(λR). By the minimality of pL and pR, that rectangle can only beintersected by top and bottom leader, but not by left or right leaders. If no such leaderintersects A, we reroute pR to the port of λL and pL to the port of λR, which decreases ∣L∣xwithout increasing ∣L∣y ; see Figure 3.14a. It does not introduce any crossings.

In the following we assume that some leaders intersect A. Without loss of generality weassume that there is a top leader λT that intersects A; otherwise we rotate the instance by 180.We denote its site by pT. Let S be the rectangle spanned by the ports ℓ and r; see Figure 3.14a.Depending on the leaders intersecting S, we distinguish two cases. Note that in particular λTintersects S.Case 1: For any top leader λ intersecting S and for any bottom leader λ′ intersecting S such

that λ and λ′ overlap, the site of λ lies to the left of the site of λ′; see Figure 3.14b. Let qRdenote the bottommost site that is connected by a right leader, and that lies in the rectanglespanned by bend(λT) and pR. Since pR lies in that rectangle, the site qR exists. We denote theleader of qR by λ′R. Further, let qT be the topmost site that is connected by a top leader andthat lies in the rectangle spanned by bend(λ′R) and the bottom-right corner of R. Since pTlies in that rectangle, the site qT exists. We denote its leader by λ′T.

We now define two rectangles that we use to reroute leaders such that ∣L∣x+∣L∣y is decreasedand arising crossings can be resolved. The rectangle K1 is spanned by bend(λ′R) and qT, andthe rectangle K2 is spanned by bend(λ′T) and qR.

Claim 2.(1) K1 is only intersected by right leaders whose bends are contained in K1,(2) K2 is only intersected by top leaders whose bends are contained in K2, and(3) K1 and K2 are internally disjoint.

Assuming that the claim holds, we can reroute the sites as follows; we illustrate this reroutingby dash-dotted lines in Figure 3.14b. The site qT is rerouted to the port of λ′R creating crossingsonly on the right side of K1. The site qR is rerouted to the port of λ′T creating crossings onlyon the top side of K2. Each rerouting decreases either ∣L∣x or ∣Ly ∣ increasing the other one.Further, only crossings between leaders of the same type are created. We apply Lemma 3.1 toresolve the conflicts without increasing ∣L∣x or ∣Ly ∣. In the remainder of this case we showthat the stated claim holds.First, we show that K1 is only intersected by right leaders whose bends lie in K1. It is not

intersected by any bottom leader, because such a leader would overlap λ′T, and its site wouldlie to the left of qT—a contradiction to the assumption of this case. It is not intersected by anyleft leader, because such a leader would intersect λ′T. It is not intersected by any top leader,because such a leader would either intersect λ′R or contradict the choice of λ′T. Hence, K1 canonly be intersected by right leaders. Further, all those leaders have their bend in K1, because

41

Page 50: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 3 Multi-Sided Boundary Labeling

the bottom-right corner is a site connected by a top leader. That leader would be intersected ifa right leader intersecting K1 had its bend outside of K1.Next, we show that K2 is only intersected by top leaders whose bends lie in K2. It is not

intersected by any right leader, because such a leader would contradict the choice of λ′R orintersect λT. It is not intersected by any bottom leader, because such a leader would overlap λ′T,and its site would lie to the left of qT—a contradiction to the assumption of this case. It is notintersected by any left leader, because such a leader would intersect λ′T. Hence, K2 can onlybe intersected by top leaders. Further, all those leaders have their bend in K2, because thetop-right corner is a site connected by a right leader.Finally, the rectangles K1 and K2 are internally disjoint, because K1 lies to the right of the

vertical line through qR, while K2 lies to the left of that line.Case 2: There exist a top leader λT intersecting S and a bottom leader λB intersecting S

such that they overlap and the site of λT lies to the right of the site of λB; see Figure 3.14c.Among all such pairs we choose λT and λB such that their horizontal segments have minimalvertical distance. We denote the site of λT by pT and the site of λB by pB. Due to the choiceof λT and λB, the open rectangle that is spanned by pB and pT is intersected by no leader. Theopen rectangle spanned by bend(λT) and bend(λB) is denoted by B. Depending on the sitesthat are contained in B, we distinguish four cases.Case 2.1: The rectangle B contains no sites that are connected by left of right leaders;

see Figure 3.14c. Let K1 be the rectangle spanned by bend(λT) and pB, and let K2 be therectangle spanned by bend(λB) and pT. While K1 is only intersected by left leaders, K2 isonly intersected by right leaders. Further, both rectangles are disjoint. We reroute pB to theport of λT and pT to the port of λB. Obviously, this decreases ∣L∣y without increasing ∣L∣x . Byapplying Lemma 3.1, we resolve the arising conflicts.Case 2.2: The rectangle B contains sites that are connected by left leaders as well as sites

that are connected by right leaders; see Figure 3.14d. Let qR be the bottommost site in Bthat is connected to the right. We denote the leader of qR by λ′R. Let qB be the leftmostsite with y(qB) ≥ y(pB) and x(qB) ≤ x(pB) that is connected to the bottom. Since pB alsosatisfies these requirements, the site qB exists. Similarly, we denote the leader of qB by λ′B.Let qL be the topmost site in B that is connected to the left. We denote the leader of qL by λ′L.Finally, let qT be the rightmost site with y(qT) ≤ y(pT) and x(qT) ≥ x(pT) that is connectedto the top. Since pT also satisfies these requirements, the site qT exists. We denote the leaderof qT by λ′T.

We nowdefine four rectangles that we use to reroute leaders such that ∣L∣x+∣L∣y is decreasedand arising crossings can be resolved. The rectangle K1 is spanned by bend(λ′R) and qB, therectangle K2 is spanned by bend(λ′B) and qL, the rectangle K3 is spanned by bend(λ′L) and qT,and the rectangle K4 is spanned by bend(λ′T) and qR. Note that the rectangles K3 and K4 arerotationally symmetric to K1 and K2, respectively.

Claim 3.(1) K1 is only intersected by right leaders whose bends are contained in K1,(2) K2 is only intersected by bottom leaders whose bends are contained in K2,(3) K3 is only intersected by left leaders whose bends are contained in K3,(4) K4 is only intersected by top leaders whose bends are contained in K4, and(5) K1, K2, K3 and K4 are pairwise internally disjoint.

42

Page 51: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

The Three- and Four-Sided Cases Section 3.4

Assuming that the claim holds, we can reroute the sites in a circular fashion as follows; weillustrate the rerouting as dash-dotted lines in Figure 3.14d. The site qB is rerouted to the portof λ′R creating crossings only on the right side of K1. The site qL is rerouted to the port of λ′Bcreating crossings only on the bottom side of K2. The site qT is rerouted to the port of λ′Lcreating crossing only on the left side of K3. Finally, the site qR is rerouted to the port of λ′Tcreating crossings only on the top side of K4. Each rerouting decreases either ∣L∣x or ∣Ly ∣without increasing the other one. Further, only crossings between leaders of the same type arecreated. We apply Lemma 3.1 to resolve the conflicts. In the remainder of this case we showthat the stated claim holds.First, we show that K1 is only intersected by right leaders whose bends lie in K1. This

rectangle is not intersected by any bottom leader, because qB is the leftmost site with y(qB) ≥y(pB) and x(qB) ≤ x(pB) that is connected to the bottom. It is not intersected by any topleader, because such a leader would intersect λ′R whose site lies below qB. Finally, it is notintersected by any left leader, because such a leader would intersect λ′T whose site lies to theright of qB. Hence, only right leaders intersect K1. In particular, all those leaders have theirbend in K1, because the bottom-right corner of K1 is the site of a bottom leader. That leaderwould be intersected if a right leader intersecting K1 had its bend outside of K1. Since K3is rotationally symmetric to K1, we can use symmetric arguments to prove that K3 is onlyintersected by left leaders whose bends are contained in K3

Next, we show that K2 is only intersected by bottom leaders whose bends lie in K2. Thisrectangle is not intersected by any left leader, because such a leader would contradict the choiceof qL. It is also not intersected by any top leader, because such a leader would intersect λ′Ror contradict the choice of λT and λB. Finally, it cannot be intersected by any right leader,because such a leader would intersect λ′B. Hence, K2 is only intersected by bottom leaders.Further, all those leaders have their bend in K2, because the bottom-left corner of K2 is a siteconnected to a left leader. That leader would be intersected if a bottom leader intersecting K2had its bend outside of K2. Since K4 is rotationally symmetric to K2, we can use symmetricarguments to prove that K4 is only intersected by top leaders whose bends are containedin K4.

Finally, we show that the rectangles K1, K2, K3 and K4 are pairwise internally disjoint. Fora site p let v(p) denote the vertical line through p and let h(p) denote the horizontal linethrough p. By construction we have that h(qB) lies above h(qT), K1 lies above h(qB), and K3lies below h(qT). Hence, the rectangles K1 and K3 are internally disjoint. Analogously, wehave that v(qL) lies to the right of v(qR), K2 lies to the right of v(qL), and K4 lies to theleft of v(qR). Hence, the rectangles K2 and K4 are internally disjoint. Further, the sites qLand qR lie in between h(qB) and h(qT), because both lie in B. Consequently, K1 and K3 donot intersect K2 and K4, respectively.

Case 2.3: The rectangle B contains only sites connected by right leaders. We apply the sameprocedure as in the previous case. However, we do not need to consider left leaders. Hence, K3is removed and K2 is the rectangle that is spanned by bend(λ′B) and pT. By the choice of B,the rectangle K2 is only intersected by right leaders whose bend is contained in K2. Further,the remaining rectangles K1, K2 and K4 are pairwise internally disjoint. The reroutings areagain done in a circular fashion decreasing ∣L∣x + ∣L∣y . Finally, we apply Lemma 3.1 to resolvecrossings.

43

Page 52: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 3 Multi-Sided Boundary Labeling

Case 2.4: The rectangle B contains only sites connected by left leaders. This case can behandled analogously to the previous case by mirroring the instance vertically.

This lemma shows that, when searching for a planar solution of the labeling problem, wecan restrict ourselves to solutions that are x-separated and y-separated. Let L denote such asolution, and let ℓv and ℓh be the lines separating the sites labeled by left and right labels, andthe ones labeled by top and bottom labels, respectively. Let o ∈ R denote the intersection of ℓvand ℓh , called center point. Let r1 , . . . , r4 denote the corners of R, named in counterclockwiseordering, and such that r1 is the top-right corner. Consider the rectangles that are spannedby o and r i for i = 1, . . . , 4. Each of them contains only two types of leaders. For example,the top-right rectangle contains only top and right leaders. An x- and y-separated planarsolution is partitioned if, for each rectangle spanned by o and one of the corners r i of R, thereexists an xy-monotone curve C i from r i to o that separates the two different types of leaderscontained in that rectangle; see Figure 3.13. Our next step is to show that a planar solutioncan be transformed into a partitioned solution without increasing ∣L∣x and ∣L∣y .

Proposition 3.2. If there exists a planar solution L for Four-Sided Boundary Labeling,then there exists a partitioned solution L′.

Proof. By Lemma 3.7, we can assume that L is x- and y-separated. Let o be the center pointas defined above and let ℓv be the vertical line through o. We show how to ensure that thearea K of R right of ℓv admits an xy-monotone curve from the top-right corner of R to o thatseparates the top leaders from the right leaders inside K. The remaining cases are symmetric.Essentially, we proceed as in the proof of Proposition 3.1 to remove the obstructions of

types (P1)–(P4); see Figure 3.5. We note that in the rerouting, we only shorten verticalsegments of top leaders and right segments of right leaders; hence the solution remains x-and y-separated. Moreover, in each step we decrease both ∣L∣x and ∣L∣y . Hence, after finitelymany steps all patterns between top and right leaders have been removed without creatingnew patterns with other types of leaders.After all patterns have been removed, an xy-monotone curve connecting the top-right

corner of R to o, separating the top labels from the right labels, can be found as in the proofof Lemma 3.2.

3.4.2 Algorithm for the Three-Sided Case

In the three-sided case, we assume that the ports of the given instance I are located on threesides of R; without loss of generality, on the left, top and right side of R. Basically, we solve athree-sided instance by splitting the instance into two two-sided L-shaped instances that canbe solved independently; see Figure 3.15a.Let G be the dual of the grid that is induced by the sites and ports of the given instance.

The idea is that each grid point s of G induces two two-sided L-shaped instances with someuseful properties. We will show that there is a planar solution for I if and only if there is agrid point s of G such that its induced two-sided instances both have planar solutions. Thus,considering all O(n2) grid points of G the problem reduces to solve those L-shaped instancesof the two-sided case. By means of a simple adaption of the dynamic program presented inSection 3.2 we solve these instances in O(n2) time achieving O(n4) running time in total.

44

Page 53: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

The Three- and Four-Sided Cases Section 3.4

hsIsI ′s s

R1

R2

p

(a)

hsIsI ′s s

R1

R2

CC ′

A1

A2

(b)

Figure 3.15: (a) The three-sided instance partitioned into two two-sided L-shaped instances Isand I′s . The instances are induced by the grid point s of G and are balanced. (b) Illustrationof the proof for Lemma 3.8. Assuming that the grid point s of G, the balanced instances Isand I′s , and the curves C and C′ are given, a planar solution for the whole instance can beconstructed.

In the following we call horizontal and vertical lines through grid points of G horizontaland vertical grid lines, respectively. We now define the two two-sided L-shaped instances Isand I′s of a grid point s of G formally. To that end, let R1 be the rectangle that is spanned bythe top-right corner of R and s, and let R2(p) be the rectangle that is spanned by a point pon the horizontal grid line h through s and the bottom-right corner of R; see Figure 3.15a.The instance Is(p) contains all sites and ports in R1 ∪ R2(p) and I′s(p) contains all sitesand ports in R ∖ (R1 ∪ R2(p)). We say that Is(p) and I′s(p) are balanced if all right ports liein R1∪R2(p), all left ports lie in R∖(R1∪R2(p)) and R1∪R2(p) contains the same number ofsites as it contains ports. Since the number of ports and sites in I is equal, this directly impliesthat R ∖ (R1 ∪ R2(p)) contains the same number of sites as it contains ports. In particular,the choice of balanced instances Is(p) and I′s(p) for a grid point s of G is unique with respectto the contained sites and ports; only the location of pmight differ. We can therefore write Isand I′s for balanced instances and R1 and R2 for their defining rectangles. For any solutionof Is and any solution of I′s , we require that all leaders are completely contained in R1 ∪ R2and in R ∖ (R1 ∪ R2), respectively. The next lemma states that a three-sided instance I has aplanar solution if and only if it can be partitioned into two two-sided L-shaped instances thathave planar solutions. To that end let hs denote the horizontal grid line through s. Figure 3.15illustrates the lemma.

Lemma 3.8. There is a planar solution L for a three-sided instance I if and only if there is agrid point s of G with balanced instances Is and I′s over rectangles (R1 , R2), an xy-monotonecurve C from the top-right corner to the bottom-left corner of R and an xy-monotone curve C′from the top-left corner to the bottom-right corner of R such that

1. each point on C satisfies the strip condition with respect to the ports and sites in Is ,

45

Page 54: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 3 Multi-Sided Boundary Labeling

IsI ′s s

R1

R2

v′

C2C1

λT λRh

v

(a)

IsI ′s s

R1

R2

v′

C2C1 C

x

C ′

h

v

(b)

Figure 3.16: Illustration of the proof for Lemma 3.8. It is assumed that the partitioned planarsolution L for the three-sided instance is given. (a) By Proposition 3.2, we can assume that Lis partitioned by the curves C1 and C2. The extremal top leader λT induces the site s andthe extremal right leader λR induces the line v′. (b) Based on C1, C2, h and v′, the curves Cand C′ can be constructed such that they do not cross any leader of L.

2. C contains the top-left corner of R2 and the intersection of hs with the left segment of R,3. each point on C′ satisfies the strip condition with respect to the ports and sites in I′s ,4. C′ contains the top-left corner of R2 and the intersection of hs with the right segment of R.

Proof. First, assume that s, Is , I′s , (R1 , R2), C and C′ exist as required; see Figure 3.15b. Thecurve C partitions R into two regions; we denote the region above C by A1 and the regionbelow C by A2. By Lemma 3.3, there is a planar solution L1 for the sites and ports in A1 suchthat all leaders of L1 lie in A1. Since C contains the top-left corner of R2 and does not cross hsuntil it reaches the intersection point of hs with the left segment of R, we know that all leadersof L1 are contained in R1 ∪ R2. Analogously, there is a planar solution L2 for the sites andports in A2 such that all leaders of L2 lie in A2. Consequently, we can combine L1 and L2into a planar solutionLs for the sites and ports in Is . Using symmetric arguments, we obtain aplanar solution L′s for I′s . As Is and I′s are defined over complementary areas, the solutions Lsand L′s can be combined into a planar solution of I.Assume that there is a planar solution L for a three-sided instance I; see Figure 3.16.

First, note that we can imagine an instance of Three-Sided Boundary Labeling as adegenerated instance of Four-Sided Boundary Labeling with no bottom ports. Thus,Proposition 3.2 also holds for the three-sided case, when assuming that the four xy-monotonecurves partitioning the solution meet on the bottom segment of R. Hence, without loss ofgenerality, we assume thatL is also partitioned by four xy-monotone curvesC1, C2, C3 andC4.In particular, let C1 denote the curve that starts at the top-right corner of R and let C2 denotethe curve that starts at the top-left corner of R; see Figure 3.16a. The curves C3 and C4 arecompletely contained in the bottom side of R and can therefore be omitted. We first showhow to construct the grid point s and the instances Is and I′s such that they are balanced.

46

Page 55: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

The Three- and Four-Sided Cases Section 3.4

Afterwards, we explain how to obtain C and C′ from C1 and C2, respectively. Finally, we provethat each point on C and C′ satisfies the strip condition with respect to Is and I′s , respectively.Let λT be the top leader in L with the longest vertical segment of all top leaders in L. In

case the site of λT lies to the right of bend(λT), let v be the rightmost vertical grid line that liesto the left of λT, and otherwise if the site of λT lies to the left of bend(λT), let v be the leftmostvertical grid line that lies to the right of λT. Furthermore, let h be the topmost horizontal gridline that lies below bend(λT); see Figure 3.16a. Due to the choice of h and v all top leaderslie above h and none of them intersects h or v. Furthermore, no right or left leader of Lintersects v above h. The desired grid point s is then the intersection point of h and v.

Now, let λR be the right leader inL with longest horizontal segment among all right leadersin L and let v′ be the rightmost vertical grid line that lies to the left of bend(λR). Note that v′cannot be intersected by a left or a right leader, because both leader types are x-separated.We define R1 to be the rectangle that is spanned by the top-right corner of R and s. Also, wedefine R2 to be the rectangle spanned by the bottom-right corner of R and the intersectionpoint of v′ and h. The instance Is is defined by R1∪R2 and the instance I′s by R∖(R1∪R2). Weshow that Is and I′s are balanced. To that end, we prove that a leader of L is either completelycontained in R1 ∪ R2 or in R ∖ (R1 ∪ R2), that R1 ∪ R2 contains only right and top leaders, andthat R ∖ (R1 ∪ R2) contains only left and top leaders.Due to the choice of v′, all right leaders lie to the right of v′. Moreover, all right leaders

whose site or port lies above h, must lie to the right of v, because by definition of v no rightleader intersects v above h (otherwise it would intersect λT), and because otherwise C1 couldnot be an xy-monotone curve separating right and top leaders. Thus, all right leaders liein R1 ∪ R2. For left leaders we can argue similarly. Since left and right leaders of L are x-separated, all left leaders lie to the left of v′. All left leaders whose site or port lies above h, mustlie to the left of v, because by definition of v no left leader intersects v above h, and becauseotherwise C2 could not be an xy-monotone curve separating left from top leaders. Thus, allleft leaders lie in R ∖ (R1 ∪R2). Finally, consider the top leaders in L. By definition of h and v,none of the top leaders intersects h or v. In particular all top leaders lie above h and cannotintersect R2. Consequently, each top leader is either contained in R1 or in R ∖ (R1 ∪ R2). Thisconcludes the argument that Is and I′s are balanced.We are left with the construction of the curves C and C′; see Figure 3.16b. The curve C is

derived from C1 as follows. Starting at the top-right corner of R, the curve C coincides with C1until C1 intersects h or v′ above h. If C intersects v′ above h, it follows v′ downwards untilit hits h. Then, in both cases, it follows h until h intersects the left segment of R. Finally, Cfollows the left segment of R to the bottom-left corner of R. The curve C′ is constructedsymmetrically.By construction, C contains the top-left corner of R2 and the intersection point of h with

the left segment of R. Symmetrically, C′ contains the top-left corner of R2 and the intersectionpoint of h with the right segment of R. We finally show that each point on C satisfies the stripcondition with respect to the sites and ports in Is . Using symmetric arguments we can provethe analogous statement for C′ and I′s .By the previous reasoning, we know that each leader of L either lies completely inside or

completely outside of R1 ∪ R2. Each leader that lies in R1 ∪ R2 is either a top or a right leaderand does not intersect C. Otherwise, if such a leader intersected C, it would also intersect C1or the segment x of v′ that is contained in C. In particular, x cannot be intersected by any

47

Page 56: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 3 Multi-Sided Boundary Labeling

t

s

Figure 3.17: There are no balanced instances Is and I′s for the grid point s. However, byLemma 3.8 there must be another grid point t with balanced instances It and I′t if the instancehas a planar solution.

leader because it lies to the left of all right leaders and below C1. Thus, the leaders in R1 ∪ R2form a planar solution for Is without intersecting C. Hence, the claim directly follows fromLemma 3.3.

Our approach now works as follows. For each grid point s of G we compute the instances Isand I′s such that they are balanced. Then, by Lemma 3.8, we can apply our algorithm presentedin Section 3.2 in order to solve Is and I′s independently. To that end, we slightly adapt thedynamic program such that it only considers curves satisfying the properties required byLemma 3.8. If both instances can be solved, we combine these solutions into one solution andreturn that solution as the final result. Otherwise, we continue with the next grid point of G.If all grid points of G have been explored without finding a planar solution, the algorithmdecides that there is no planar solution.Note that it may happen that, for a grid point s, there are no balanced instances Is and I′s ;

for an example see Figure 3.17. However, in that case, if I has a solution, we also know byLemma 3.8 that there is another grid point t such that for t we find balanced instances. Hence,we can refrain from considering s.

Creating the two instances Is and I′s for a grid point s takes linear time, if we assume that thesites are sorted by their x-coordinates. By Theorem 3.2 we then need O(n2) time and O(n)space to solve Is and I′s . Consequently, we need O(n2) time and O(n) space to process asingle grid point s. Since we consider O(n2) grid points, the following theorem follows.

Theorem 3.6. Three-Sided Boundary Labeling can be solved in O(n4) time using O(n)space.

Note that, except for the length minimization, our approach for the three-sided case alsocarries over to the extensions from Section 3.3, because we only solve subinstances of Two-Sided Boundary Labeling with Adjacent Sides. In particular with corresponding impacton the running time we can soften the restriction that the number of labels and sites is equal.

48

Page 57: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

The Three- and Four-Sided Cases Section 3.4

3.4.3 Algorithm for the Four-Sided CaseIn this section, we consider the case that the ports lie on all four sides of R. The main idea is toseek a partitioned solution, which exists by Proposition 3.2. For a given partitioned solutionL,we call a leader extremal if all other leaders of the same type in L have shorter orthogonalsegments; recall that the orthogonal segment of a po-leader is the segment connecting thebend to the port. The algorithm consists of two steps. First, we explore all choices of (non-overlapping) extremal leaders λL and λR for the left and the right side of R, respectively, plus ahorizontal line h that separates the top leaders and the bottom leaders. This information splitsthe instance into two independent three-sided instances; see Figure 3.18a. There are, however,two crucial differences from a usual three-sided instance. First, one side of the instance isnot a straight-line segment but an x-monotone orthogonal curve C that is defined by λL , λRand h. Second, the extremal positions of λL and λR imply a separation of the points that arelabeled from the left and the right side. Let I31 be the three-sided instance above C and let I32be the three-sided instance below C. The algorithm solves I31 and I32 independently from eachother. If for at least one of the two instances there is no solution, the algorithm continueswith the next choice of λL, λR and h. Otherwise, it combines the planar solutions of I31 and I32into one planar solution and returns this solution. In case that all choices of λL, λR and hhave been explored without finding a solution, the algorithm returns that there is no planarsolution.We next describe how to solve the three-sided instance I31 . A symmetric approach can be

applied to I32 . The algorithm explores all choices of the extremal leader λT for the top sideof R. This extremal leader partitions the instance into two two-sided subinstances I21 and I22 asfollows. Let AT,R be the rectangle that is spanned by bend(λT) and the top-right corner of R;see Figure 3.18b. Analogously, let AT,L be the rectangle that is spanned by bend(λT) and thetop-left corner of R. Analogously, for λR we define the area AR,T to be the rectangle that isspanned by bend(λR) and the top-right corner of R, and AR,B to be the rectangle spannedby bend(λR) and the bottom-right corner of R. For the leader λL we define AL,B to be therectangle spanned by bend(λL) and the bottom-left corner of R, and AL,T to be the rectanglespanned by bend(λL) and the top-left corner of R. We assume that the port p of λT is onlycontained in that area A ∈ AT,R ,AT,L that also contains the site of λT. We make analogousassumptions for λL and λR.

The instance I21 consists of all ports and sites in A1 = (AR,T ∪AT,R)∖ (AT,L ∪AR,B), and I22consists of all ports and sites inA2 = (AL,T∪AT,L)∖(AT,R∪AL,B); see Figure 3.18c. We solve I21and I22 independently from each other using the dynamic program introduced in Section 3.2for each instance. However, we enforce that it only considers xy-monotone curves that excludetop leaders crossing the horizontal line through bend(λT), left leaders crossing the verticalline through bend(λL) and right leaders crossing the vertical line through bend(λR). If for atleast one of the two instances there is no solution, the algorithm continues to explore the nextchoice of λT. Otherwise, it combines the solutions of I21 and I22 into one solution and returnsthe result as the solution of I31 . In case that all choices of λT have been explored withoutfinding a solution, the algorithm returns that there is no solution for the given three-sidedinstance. The following lemma shows that the algorithm is correct.

Lemma 3.9. Given an instance I of Four-Sided Boundary Labeling, the following twostatements are true.

49

Page 58: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 3 Multi-Sided Boundary Labeling

λT

λL

λR

λB

hC

I31

I32

(a)

λT

λL

λR

AT,L

AR,T

AT,R

AL,T

AL,B

AR,B

(b)

λT

λL

λR

A2 A1

(c)

Figure 3.18: (a) The right leader λL, the left leader λR and the horizontal line h split theinstance into two three-sided instances I31 and I32 . (a) Sketch of the areas AT,L, AT,R, AR,T,AR,B, AL,T and AL,B. (c) The leaders λL, λR and λT split the three-sided instance into twotwo-sided instances.

1. If there is no planar solution for I, the algorithm states this.2. If there is a planar solution for I, the algorithm returns such a solution.

Proof. In case the algorithm returns a solution, it has been constructed from planar solutionsof disjoint instances of Two-Sided Boundary Labeling with Adjacent Sides. As theunion of these two-sided instances contains all sites and ports of I, the algorithm returns aplanar solution of I, which shows the first statement.Conversely, assume that I has a planar solution L. By Proposition 3.2, we may assume

that L is partitioned. In particular, let λT, λL, λB and λR be the extremal leaders in L of thetop, left, bottom and right side of R, respectively, and let h be a horizontal line that separatesthe top leaders from the bottom leaders.

Obviously, λL, λR and h split the instance into two three-sided instances I31 and I32 . As thealgorithm systematically explores all choices of extremal right leaders, extremal left leadersand horizontal lines partitioning the set of sites, it must find λL, λR and a horizontal line h′that separates the same sets of sites as h. Thus, I31 and I32 are considered by the algorithm.Let I31 be the instance above the curve defined by λL, λR and h′, and let I32 be the instance

below that curve. We now show that the algorithm finds a planar solution for I31 . Symmetricarguments hold for I32 . As the algorithm explores all choices of extremal top leaders in I31 , italso considers λT to be the extremal top leader. This leader partitions the area of I31 into thetwo disjoint areas A1 = (AR,T∪AT,R)∖(AT,L∪AR,B) and A2 = (AL,T∪AT,L)∖(AT,R∪AL,B);see Figure 3.18a. It directly follows from the extremal choice of λR, λT and λL that there isno leader in L that intersects both A1 to A2. In particular, no left leader intersects A1 andno right leader intersects A2. Thus, A1 and A2 split L into independent planar solutions L1and L2 of two two-sided instances I21 and I22 induced by A1 and A2, respectively. Note thatthe algorithm considers the same two-sided instances independently from each other. As I21has a solution, namely L1, we know that the dynamic program finds a solution L2

1 for I21 . Inparticular, all leaders of L2

1 lie in A1.

50

Page 59: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Concluding Remarks Section 3.5

Applying symmetric arguments for I22 , the algorithm yields a planar solution L22 that stays

in A2. Consequently, combiningL21 andL2

2 into one solution yields a planar solutionL31 for I31 .

Analogously, we obtain a planar solution L32 for I32 . Obviously, due to the separation by λL, λR

and h′, the union of L31 and L3

2 is also planar, which is the overall solution returned by thealgorithm. This proves the second statement of the lemma.

Let us analyze the running time of the algorithm. Obviously, there are O(n5) possiblecombinations of left and right extremal leaders and a horizontal line separating the top andbottom-labeled sites. For each combination, we independently solve two three-sided instances.For such a three-sided instance, we consider O(n2) choices for the extremal leader λT andindependently solve two independent two-sided instances with Theorem 3.2 in O(n2) time.This implies that solving one three-sided instances takesO(n4) time. Thus, the overall runningtime is O(n9). The following theorem summarizes this result.

Theorem 3.7. Four-Sided Boundary Labeling can be solved in O(n9) time using O(n)space.

Note that, except for the length minimization, our approach for the four-sided case alsocarries over to the extensions from Section 3.3, because we only solve subinstances of Two-Sided Boundary Labeling with Adjacent Sides. In particular with corresponding impacton the running time we can soften the restriction that the number of labels and sites is equal.

3.5 Concluding Remarks

In this chapter, we have studied the problem of testing whether an instance of Two-SidedBoundary Labeling with Adjacent Sides admits a planar solution. We have given thefirst efficient algorithm for this problem, running in O(n2) time.

Our algorithm can also be used to solve a variety of different extensions of the problem. Wehave shown how to generalize to sliding ports instead of fixed ports without increasing therunning time and how to maximize the number of labeled sites such that the solution is planarin O(n3 log n) time. We further have given an extension to the algorithm that minimizes thetotal leader length in O(n8 log n) time.With some additional work, our approach can also be used to solve Three-Sided and

Four-Sided Boundary Labeling in polynomial time. We have introduced an algorithmsolving the three-sided case in O(n4) time and the four-sided case in O(n9) time. Also,except for the length minimization, all extensions carry over. It remains open whether aminimum length solution of Three-Sided and Four-Sided Boundary Labeling can becomputed in polynomial time.

51

Page 60: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz
Page 61: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

4 Approximation Algorithmsfor Box Contact Representations

In the last few years, word clouds have become a standard tool for abstracting, visualizing,and comparing text documents. For example, word clouds were used in 2008 to contrast thespeeches of the US presidential candidates Obama and McCain. More recently, the Germanmedia used them to visualize the newly signed coalition agreement and to compare it to asimilar agreement from 2009; see Figure 4.1. A word cloud of a given document consists ofthe most important (or most frequent) words in that document. Each word is printed in agiven font and scaled by a factor roughly proportional to its importance (the same is donewith the names of towns and cities on geographic maps, for example). The printed words arearranged without overlap and tightly packed into some shape (usually a rectangle). Tag cloudslook similar; they consist of keyword metadata (tags) that have been attributed to resourcesin some collection such as web pages or photos.Wordle [VWF09] is a popular tool for drawing word or tag clouds. The Wordle website

allows users to upload a list of words and, for each word, its relative importance. The user canfurther select font, color scheme, and decide whether all words must be placed horizontallyor whether words can also be placed vertically. The tool then computes a placement of thewords, each scaled according to its importance, such that no two words overlap. Generally,the drawings are very compact and aesthetically appealing.In the automated analysis of text one is usually not just interested in the most important

words and their frequencies, but also in the connections between these words. For example,if a pair of words often appears together in a sentence, then this is often seen as evidencethat this pair of words is linked semantically [Li02]. In this case, it makes sense to placethe two words close to each other in the word cloud that visualizes the given text. This iscaptured by an input graph G = (V , E) of desired contacts. We are also given, for each vertexv ∈ V , the dimensions (but not the position) of a box Bv , that is, an axis-aligned rectangle.We denote the height and width of Bv by h(Bv) and w(Bv), respectively, or, more briefly, byh(v) andw(v). For each edge e = (u, v) of G, we are given a positive number p(e) = p(u, v),that corresponds to the profit of e. For ease of notation, we set p(u, v) = 0 for any non-edge(u, v) ∈ V 2 ∖ E of G.Given a box B and a point q in the plane, let B(q) be a placement of B with lower left

corner q. A representation of G is a map λ∶V → R2 such that for any two vertices u ≠ v,it holds that Bu(λ(u)) and Bv(λ(v)) are interior-disjoint. Boxes may touch, that is, theirboundaries may intersect. If the intersection is non-degenerate, that is, a line segment ofpositive length, we say that the boxes are in contact. We say that a representation λ realizes anedge (u, v) of G if boxes Bu(λ(u)) and Bv(λ(v)) are in contact.

This yields the problem Contact Representation of Word Networks (Crown): Given an edge-weighted graph G whose vertices correspond to boxes, find a representation of G with thevertex boxes such that every edge of G is realized. In this chapter, we study the optimizationversion of Crown, Max-Crown, where the aim is to maximize the total profit (that is, the

Page 62: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 4 Approximation Algorithms for Box Contact Representations

Figure 4.1: Der Koalitionsvertrag im Schnellcheck (Quick overview of the [new German]coalition agreement), Spiegel Online, Nov. 27, 2013, [Wei13] (Click on “Fotos”).

sum of the weights) of the realized edges. We also consider the unweighted version of theproblem, where all desired contacts yield a profit of 1.

PreviousWork. Barth et al. [BFK+14] recently introduced Max-Crown and showed thatthe problem is strongly NP-hard even for trees and weakly NP-hard even for stars. Theypresented an exact algorithm for cycles and approximation algorithms for stars, trees, planargraphs, and graphs of constant maximum degree; see the first column of Table 4.1. Some oftheir solutions use an approximation algorithm with ratio α = e/(e − 1) ≈ 1.58 [FGMS11] forthe Generalized Assignment Problem (Gap). Recall that Gap is defined as follows: Givena set of bins with capacity constraints and a set of items that possibly have different sizes andvalues for each bin, pack a maximum-valued subset of items into the bins. The problem isAPX-hard [CK05].

Max-Crown is related to finding rectangle representations of graphs, where vertices arerepresented by axis-aligned rectangles with non-intersecting interiors and edges correspondto rectangles with a common boundary of non-zero length. Every graph that can be repre-sented this way is planar and every triangle in such a graph is a facial triangle. These twoconditions are also sufficient to guarantee a rectangle representation [BGPV08]. Rectanglerepresentations play an important role in VLSI layout, cartography, and architecture (floorplanning). In a recent survey, Felsner [Fel13] reviews many rectangulation variants. Severalinteresting problems arise when the rectangles in the representation are restricted. Eppstein etal. [EMSV12] consider rectangle representations which can realize any given area-requirementon the rectangles, so-called area-preserving rectangular cartograms, which were introducedby Raisz [Rai34] already in the 1930s. Unlike cartograms, in our setting there is no inherentgeography, and hence, words can be positioned anywhere. Moreover, each word has fixeddimensions enforced by its importance in the input text, rather than just fixed area. Nöllenburget al. [NPR13] recently considered a variant where the edge weights prescribe the length ofthe desired contacts.

54

Page 63: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Figure 4.2: Semantics-preserving word cloud for the 35 most “important” words in thissection. Following the text processing pipeline of Barth et al. [BKP14], these are the wordsranked highest by LexRank [ER04], after removal of stop words such as “the”. The edge profitsare proportional to the relative frequency with which the words occur in the same sentences.The layout algorithm of Barth et al. [BKP14] first extracts a heavy star forest from the weightedinput graph as in Theorem 4.5 and then applies a force-directed post-processing.

Finally, the problem of computing semantics-aware word clouds is related to classic graphlayout problems, where the goal is to draw graphs so that vertex labels are readable and Eu-clidean distances between pairs of vertices are proportional to the underlying graph distancebetween them. Typically, however, vertices are treated as points and label overlap removal isa post-processing step [DMS05, GH10]. Most tag cloud and word cloud tools such as Wor-dle [VWF09] do not show the semantic relationships between words, but force-directed graphlayout heuristics are sometimes used to add such functionality [BKP14, CWL+10, PTT+12,WPW+11]. For an example output of such a tool, see Figure 4.2.

Model. We consider two different models. In Sections 4.2 and 4.3, we do not count pointcontacts, that is, we consider two boxes in contact only if their intersection is a line segmentof positive length. Hence, the contact graph of the boxes is planar. This model is used in mostwork on rectangle contact representations. In Section 4.4, we describe how to modify ouralgorithms to guarantee O(1)-approximations also in the model that allows and rewards pointcontacts. We allow words only to be placed horizontally.

Our Contribution. Known results and our contributions to Max-Crown are shown inTable 4.1. Note that the results of Barth et al. [BFK+14] in column 1 are simply based onexisting decompositions of the respective graph classes into star forests or cycles.

Our results rely on a variety of algorithmic tools. First, we devise sophisticated decomposi-tions of the input graphs into heterogeneous classes of subgraphs, which also requires a moregeneral combination method than that of Barth et al. Second, we use randomization to obtaina simple constant-factor approximation for general weighted graphs. Previously, such a resultwas not even known for unweighted bipartite graphs. Third, to obtain an improved algorithmfor the unweighted case, we prove a lower bound on the size of a matching in a planar graphof high average degree. Fourth, we use a planar separator result of Frederickson [Fre87] toobtain a polynomial-time approximation scheme (PTAS) for degree-bounded planar graphs.

55

Page 64: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 4 Approximation Algorithms for Box Contact Representations

Weighted Unweighted

Graph class Ratio [BFK+14] Ratio [new] Theorem Ratio Theorem

cycle, path 1star α 1 + ε 4.1tree 2α 2 + ε 4.1 2 4.6

NP-hardmax-degree ∆ ⌊(∆ + 1)/2⌋planar max-deg. ∆ 1 + ε 4.7outerplanar 3 + ε 4.2planar 5α 5 + ε 4.1bipartite APX-complete 4.11without p. contacts ≈ 8.4 4.3with p. contacts ≈ 9.5 4.9

generalwithout p. contacts ≈ 16.9 (rand.) 4.4 ≈ 13.4 4.8

≈ 21.1 (det.) 4.5with p. contacts ≈ 19 (rand.) 4.9 ≈ 16.5 4.10

≈ 22.1 (det.) 4.9

Table 4.1: Previously known and new results for the unweighted and weighted versions ofMax-Crown (for α ≈ 1.58 and any ε > 0). The exact approximation factors are denoted inthe corresponding theorems.

Our othermain result is the use of the combination lemma, which, among others, yielded thefirst approximation algorithms for bipartite and for general graphs; see Section 4.2. For generalgraphs, we present a simple randomized solution (based on the solution for bipartite graphs)and a more involved deterministic algorithm. For trees, planar graphs of constant maximumdegree, and general graphs, we have improved results in the unweighted case; see Section 4.3.For the model with point contacts, we show how to adjust the approximation algorithms forbipartite and general graphs; see Section 4.4. Finally, we show APX-completeness for bipartitegraphs of maximum degree 9 (see Section 4.5) and list some open problems (see Section 4.6).

Runtimes. Most of our algorithms involve approximating a number of Gap instancesas a subroutine, using either the PTAS [BKV11] if the number of bins is constant or theapproximation algorithmof Fleischer et al. [FGMS11] for general instances. Because of this, theruntime of our algorithms consists mostly of approximating Gap instances. Both algorithmsto approximate Gap instances solve linear programs, so we refrain from explicitly stating theruntime of these algorithms.For practical purposes, one can use a purely combinatorial approach for approximating

Gap [CKR06], which utilizes an algorithm for the Knapsack problem as a subroutine. Thealgorithm translates into a 3-approximation for Gap running in O(NM) time (or a (2 + ε)-approximation running in O(MN log 1/ε +M/ε4) time), where N is the number of itemsand M is the number of bins. In our setting, the simple 3-approximation implies a ran-

56

Page 65: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Some Basic Results Section 4.1

domized 32-approximation (or a deterministic 40-approximation) algorithm with runningtime O(∣V ∣2) for Max-Crown on general weighted graphs.

4.1 Some Basic Results

In this section, we present two technical lemmas that will help us to prove our main results inthe following two sections where we treat the weighted and unweighted cases of Max-Crown.The second lemma immediately improves the results of Barth et al. [BFK+14] for stars, trees,and planar graphs.

4.1.1 A Combination LemmaSeveral of our algorithms cover the input graph with subgraphs that belong to graph classesfor which the Max-Crown problem is known to admit good approximations. The followinglemma allows us to combine the solutions for the subgraphs. We say that a graph G = (V , E)is covered by graphs G1 = (V , E1), . . . ,Gk = (V , Ek) if E = E1 ∪ ⋅ ⋅ ⋅ ∪ Ek .

Lemma 4.1. Let graph G = (V , E) be covered by graphs G1 ,G2 , . . . ,Gk . If, for i = 1, 2, . . . , k,weighted Max-Crown on graph G i admits an α i-approximation, then weighted Max-Crownon G admits a (∑k

i=1 α i)-approximation.

Proof. Our algorithm works as follows. For i = 1, . . . , k, we apply the α i-approximationalgorithm to G i and report the result with the largest profit as the result for G. We showthat this algorithm has the claimed performance guarantee. For the graphs G ,G1 , . . . ,Gk , letOPT,OPT1 , . . . , OPTk be the optimum profits and let ALG, ALG1 , . . . , ALGk be the profitsof the approximate solutions. By definition, ALGi ≥ OPTi /α i for i = 1, . . . , k. Moreover,OPT ≤ ∑k

i=1OPTi because the edges of G are covered by the edges of G1 , . . . ,Gk . Assume,without loss of generality, that OPT1 /α1 = maxi(OPTi /α i). Then,

ALG = ALG1 ≥OPT1

α1≥ ∑

ki=1OPTi

∑ki=1 α i

≥ OPT∑k

i=1 α i.

4.1.2 Improvement on Existing Approximation AlgorithmsThe approximation algorithms for stars, trees and planar graphs provided byBekos et al. [BFK+14]use an α-approximation algorithm forGAP instances. We prove that these instances require only a constant number of bins andthus can be approximated using the PTAS of Briest et al. [BKV11].

Lemma 4.2 ([BKV11]). For any ε > 0, there is a (1+ ε)-approximation algorithm for Gap witha constant number of bins. The algorithm takes nO(1/ε) time.

Using Lemmas 4.1 and 4.2, we improve the approximation algorithms of Barth et al. [BFK+14].

Theorem 4.1. Weighted Max-Crown admits a (1 + ε)-approximation algorithm on stars,a (2 + ε)-approximation algorithm on trees, and a (5 + ε)-approximation algorithm on planargraphs.

57

Page 66: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 4 Approximation Algorithms for Box Contact Representations

uh2

u

uc1 uc

2

uc3uc

4uh

2

uv1 uv

2

Figure 4.3: Notation for the PTAS for stars.

Proof. By Lemma 4.1, the claim for stars implies the other two claims since a tree can becovered by two star forests and a planar graph can be covered by five star forests in polynomialtime [HMS96].We now show that we can use Lemma 4.2 to get a PTAS for stars. First, we give the PTAS

for the model with point contacts.Let u be the center vertex of the star. We create eight bins: four corner bins uc

1 , uc2 , uc

3,and uc

4 modeling adjacencies on the four corners of the box u, two horizontal bins uh1 and uh

2modeling adjacencies on the top and bottom side ofu, and two vertical bins uv

1 anduv2 modeling

adjacencies on the left and right side of u; see Figure 4.3. The capacity of the corner bins is 1,the capacity of the horizontal bins is the width w(u) of u, and the capacity of the vertical binsis the height h(u) of u. Next, we introduce an item i(v) for any leaf vertex v of the star. Thesize of i(v) is 1 in any corner bin, w(v) in any horizontal bin, and h(v) in any vertical bin.The profit of i(v) in any bin is the profit p(u, v) of the edge (u, v).

Note that any feasible solution to the Max-Crown instance can be normalized so that anybox that touches a corner of u has a point contact with u. Hence, the above is an approximation-preserving reduction from weighted Max-Crown on stars (with point contacts) to Gap. ByLemma 4.2, we obtain a PTAS.We first assume that all boxes have integral edge lengths, which can be accomplished by

scaling. Consider a feasible solution without point contacts. We now modify the solution asfollows. Each box that touches a corner of u is moved so that it has a point contact with thiscorner. Afterwards, we move some of the remaining boxes until all corners of u have pointcontacts or until we run out of boxes. This yields a solution with point contacts in which thereare two opposite sides of u—say the two horizontal sides—which either do not touch anybox or from which we removed one box during the modification. Now observe that, if weshrink the two horizontal sides by an amount of 1/2, then all contacts can be preserved sincethere was a slack of at least 1 at both horizontal sides. Conversely, observe that any feasiblesolution with point contacts to the modified instance with shrunken horizontal sides can betransformed into a solution without point contacts since we always have a slack of at least 1/2on both horizontal sides. This shows that there is a correspondence between feasible solutionswithout point contacts and feasible solutions with point contacts to a modified instance where

58

Page 67: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

The Weighted Case Section 4.2

we either shrink the horizontal or the vertical sides by 1/2. The PTAS for Max-Crown onstars consists in applying a PTAS to two instances of Max-Crown with point contacts wherewe shrink the horizontal or vertical sides, respectively, and in outputting the better of the twosolutions.

4.2 TheWeighted Case

In this section, we provide new approximation algorithms for more involved classes of(weighted) graphs than in the previous section. Recall that α = e/(e − 1) ≈ 1.58. First, we givea (3 + ε)-approximation for outerplanar graphs. Then, we present a 16α/3-approximation forbipartite graphs. For general graphs, we provide a simple randomized 32α/3-approximationand a deterministic 40α/3-approximation.

Theorem 4.2. Weighted Max-Crown on outerplanar graphs admits a (3 + ε)-approximation.

Proof. It is known that the star arboricity of an outerplanar graph is 3, that is, it can bepartitioned into at most three star forests [HMS96]. Here we give a simple algorithm forfinding such a partitioning.

Any outerplanar graph has degeneracy at most 2, that is, it has a vertex of degree at most 2.We prove that any outerplanar graph G can be partitioned into three star forests such thatevery vertex of G is the center of only one star. Clearly, it is sufficient to prove the claim formaximal outerplanar graphs in which all vertices have degree at least 2. We use induction onthe number of vertices of G. The base of the induction corresponds to a 3-cycle for whichthe claim clearly holds. For the induction step, let v be a degree-2 vertex of G and let (v , u)and (v ,w) be its incident edges. The graphG−v ismaximal outerplanar and thus, by inductionhypothesis, it can be partitioned into star forests F1, F2, and F3 such that u is the center of astar in F1 and w is the center of a star in F2. Now we can cover G with three star forests: weadd (v , u) to F1, we add (v ,w) to F2, and we create a new star centered at v in F3.Applying Lemma 4.1 and Theorem 4.1 to the star forests completes the proof.

Theorem 4.3. Weighted Max-Crown on bipartite graphs admits a 16α/3(≈ 8.4)-approx-imation.

Proof. Let G = (V , E) be a bipartite input graph with V = V1 ∪ V2 and E ⊆ V1 × V2.Using G, we build an instance of Gap as follows. For each vertex u ∈ V1, we create eightbins uc

1 , uc2 , uc

3 , uc4 , uh

1 , uh2 , uv

1 , uv2 and set the capacities exactly as we did for the star center in

Theorem 4.1. Next, we add an item i(v) for every vertex v ∈ V2. The size of i(v) is, again, 1 inany corner bin, w(v) in any horizontal bin, and h(v) in any vertical bin. For u ∈ V1, the profitof i(v) is p(u, v) in any bin of u.

It is easy to see that solutions to theGap instance are equivalent toword cloud solutions (withpoint contacts) in which the realized edges correspond to a forest of stars with all star centersbeing vertices of V1. Hence, we can find an approximate solution of profit ALG′1 ≥ OPT′1 /αwhere OPT′1 is the profit of an optimum solution (with point contacts) consisting of a starforest with centers in V1.

We now show how to get a solution without point contacts. If the three bins on the top sideof a vertex u (two corner bins and one horizontal bin) are not completely full, we can slightly

59

Page 68: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 4 Approximation Algorithms for Box Contact Representations

G

(a) The graph G⋆ realized byan optimum solution is pla-nar and bipartite.

H1 H2

(b) G⋆ can be decomposed into two forests H1 and H2 and furtherinto four star forests S1 , S2 (black) with centers in V1 (disks)and S′1 , S′2 (dashed) with centers in V2 (boxes).

Figure 4.4: Partitioning the optimum solution in the proof of Theorem 4.3.

move the boxes in the corners so that point contacts are avoided. Otherwise, we removethe lightest item from one of these bins. We treat the three bottommost bins analogously.Note that in both cases we only remove an item if all three bins are completely full. Theresulting solution can be realized without point contacts. We do the same for the three leftand three right bins and choose the heavier of the two solutions. It is easy to see that we loseat most 1/4 of the profit for the star center u: Assume that the heaviest solution results fromremoving weight w1 from one of the upper and weight w2 from one of the lower bins. Aswe remove the lightest items only, the remaining weight from the upper and lower bins is atleast 2(w1 +w2). On the other hand, the weight in the two vertical at least w1 +w2; otherwise,dropping everything from these vertical bins would be cheaper. Hence, we keep at least weight3(w1 +w2).

If we do so for all star centers, we get a solutionwith profitALG1 ≥ 3/4⋅ALG′1 ≥ 3OPT′1 /(4α)≥ 3OPT1 /(4α) where OPT1 is the profit of an optimum solution (without point contacts)consisting of a star forest with centers in V1.Similarly, we can find a solution of profit ALG2 ≥ 3OPT2 /(4α) with star centers in V2,

where OPT2 is the maximum profit that a star forest with centers in V2 can realize. Amongthe two solutions, we pick the one with larger profit ALG = max ALG1 , ALG2.Let G⋆ = (V , E⋆) be the contact graph realized by a fixed optimum solution, and let

OPT = p(E⋆) be its total profit. We now show that ALG ≥ 3OPT /(16α). As G⋆ is a planarbipartite graph, ∣E⋆∣ ≤ 2n − 4. Hence, we can decompose E⋆ into two forests H1 and H2 usinga result of Nash-Williams [NW64]; see Figure 4.4. We can further decompose H1 into twostar forests S1 and S′1 in such a way that the star centers of S1 are in V1 and the star centersof S′1 are in V2. Similarly, we decompose H2 into a forest S2 of stars with centers in V1 and aforest S′2 of stars with centers in V2. As we decomposed the optimum solution into four starforests, one of them—say S1—has profit p(S1) ≥ OPT /4. On the other hand, OPT1 ≥ p(S1).Summing up, we get

ALG ≥ ALG1 ≥ 3OPT1 /(4α) ≥ 3p(S1)/(4α) ≥ 3OPT /(16α).

Theorem 4.4. Weighted Max-Crown on general graphs admits a randomized 32α/3 (≈ 16.9)-approximation.

Proof. Let G = (V , E) be the input graph and let OPT be the weight of a fixed optimumsolution. Our algorithm works as follows. We first randomly partition the set of vertices

60

Page 69: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

The Unweighted Case Section 4.3

into V1 and V2 = V ∖V1, that is, the probability that a vertex v is included in V1 is 1/2. Now weconsider the bipartite graph G′ = (V1 ∪ V2 , E′) with E′ = (v1 , v2) ∈ E ∣ v1 ∈ V1 and v2 ∈ V2that is induced by V1 and V2. By applying Theorem 4.3 on G′, we can find a feasible solutionfor G with weight ALG ≥ 3OPT′ /(16α), where OPT′ is the weight of an optimum solutionfor G′.

Any edge of the optimum solution is contained in G′ with probability 1/2. Let OPT be thetotal weight of the edges of the optimum solution that are present in G′. Then, E[OPT] =OPT /2. Hence,

E[ALG] ≥ 3E[OPT′]/(16α) ≥ 3E[OPT]/(16α) = 3OPT /(32α).

Theorem 4.5. Weighted Max-Crown on general graphs admits a 40α/3(≈ 21.1)-approx-imation.

Proof. Let G = (V , E) be the input graph. As in the proof of Theorem 4.3, our algorithmconstructs an instance of Gap based on G. The difference is that, for every vertex v ∈ V , wecreate both eight bins and an item i(v). Capacities and sizes remain as before. The profit ofplacing item i(v) in a bin of vertex u, with u ≠ v, is p(u, v).

Let OPT be the value of an optimum solution of Max-Crown forG, and let OPTGAP be thevalue of an optimum solution for the constructed instance of Gap. Since any optimum solutionof Max-Crown, being a planar graph, can be decomposed into five star forests [HMS96], thereexists a star forest carrying at least OPT /5 of the total profit. Such a star forest correspondsto a solution of Gap for the constructed instance; therefore, OPTGAP ≥ OPT /5. Now wecompute an α-approximation for the Gap instance, which results in a solution of total profitALGGAP ≥ OPTGAP /α ≥ OPT /(5α). Next, we show how our solution induces a feasiblesolution of Max-Crown where every vertex v ∈ V is either a bin or an item.Consider the directed graph GGAP = (V , EGAP) with (u, v) ∈ EGAP if and only if the item

corresponding to u ∈ V is placed into a bin corresponding to v ∈ V . A connected componentin GGAP with n′ vertices has at most n′ edges since every item can be placed into at most onebin. If n′ = 2, we arbitrarily make one of the vertices a bin and the other an item. If n′ > 2,the connected component is a 1-tree, that is, a tree and an edge. In this case, we partitionthe edges into two subgraphs; a star forest and the disjoint union of a star forest and a cycle;see Figure 4.5. Note that both subgraphs can be represented by touching boxes if we allowpoint contacts. This is due to the fact that the stars correspond to a solution of GAP. Hence,choosing a subgraph with larger weight and post-processing the solution as in the proof ofTheorem 4.3 results in a feasible solution of Max-Crown with no point contacts. Initially, wediscarded at most half of the weight and the post-processing keeps at least 3/4 of the weight,so ALG ≥ 3ALGGAP /8. Therefore, ALG ≥ 3OPT /(40α).

4.3 The Unweighted Case

In this section, we consider the unweightedMax-Crown problem, that is, all desired contactshave profit 1. Thus, we want to maximize the number of edges of the input graph realized bythe contact representation. We present approximation algorithms for different graph classes.First, we give a 2-approximation for trees. Then, we present a PTAS for planar graphs ofbounded degree. Finally, we provide a (5 + 16α/3)-approximation for general graphs.

61

Page 70: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 4 Approximation Algorithms for Box Contact Representations

Figure 4.5: Partitioning a 1-tree into a star forest (gray) and the union of a cycle and a starforest (black).

Theorem 4.6. Unweighted Max-Crown on trees admits a 2-approximation.

Proof. Let T be the input tree. We first decompose T into edge-disjoint stars as follows. If Thas at most two vertices, then the decomposition is straight-forward. So, we assume withoutloss of generality that T has at least three vertices and is rooted at a non-leaf vertex. Let u be avertex of T such that all its children, say v1 , . . . , vk , are leaf vertices. If u is the root of T , thenthe decomposition contains only one star centered at u. Otherwise, denote by π the parentof u in T , create a star Su centered at u with edges (u, π), (u, v1), . . . , (u, vk) and call theedge (u, π) of Su the anchor edge of Su . The removal of u, v1 , . . . , vk from T results in a newtree. Therefore, we can recursively apply the same procedure. The result is a decompositionof T into edge-disjoint stars covering all edges of T .

We next remove, for each star, its anchor edge from T . We apply the PTAS of Theorem 4.1to the resulting star forest and claim that the result is a 2-approximation for T . To prove theclaim, consider a star S′u of the new star forest, centered at u with edges (u, v1), . . . , (u, vk)and let ALG be the total number of contacts realized by the (1 + ε)-approximation algorithmon S′u . We consider the following two cases.(a) 1 ≤ k ≤ 4: Since it is always possible to realize four contacts of a star, ALG ≥ k. Note

that an optimal solution may realize at most k + 1 contacts (due to the absence of theanchor edge from S′u). Hence, our algorithm has approximation ratio (k + 1)/k ≤ 2.

(b) k ≥ 5: Since it is always possible to realize four contacts of a star, we have ALG ≥ 4. Onthe other hand, an optimal solution realizes at most (1 + ε)ALG+1 contacts. Thus, theapproximation ratio is ((1 + ε)ALG+1)/ALG ≤ (1 + ε) + 1/4 < 2.

The theorem follows from the fact that all edges of T are incident to the star centers.

Next, we develop a PTAS for bounded-degree planar graphs. Our construction needs twolemmas, the first of which was shown by Barth et al. [BFK+14].

62

Page 71: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

The Unweighted Case Section 4.3

Lemma 4.3 ([BFK+14]). If the input graph G = (V , E) has maximum degree ∆ thenOPT ≥ 2∣E∣/(∆ + 1).

The second lemma provides an exponential-time exact algorithm for Max-Crown.

Lemma 4.4. There is an exact algorithm for unweighted Max-Crown with running time2O(n log n).

Proof. Consider a placement which assigns a position [ℓB , rB] × [bB , tB] to every box B,with ℓB + w(B) = rB and bB + h(B) = tB . For the x-axis, this gives a (possibly non-strict)linear order on the values ℓB and rB , where some might be equal. An order on the y-axis isimplied similarly. Together, these two orders fully determine the combinatorial structure ofoverlaps and contacts: for contact, two boxes must have a side of equal value and a side withoverlap.

The algorithm enumerates all possible combinations of two such orders using the represen-tation sketched above. On a single axis, this is a permutation of 2n variables and, betweenevery two variables adjacent in this permutation, whether they are equal or the second vari-able has strictly larger value. This representation demonstrates that the number of distinctorders in one dimension is bounded by O((2n)! ⋅ 22n), which is 2O(n log n). The number ofcombinations of two such orders also satisfies this bound.For any given pair of orders, it can be determined if they imply overlaps and what the

objective value is by counting the number of profitable contacts. If there are no overlaps, theexistence of an actual placement realizing the orders is tested using linear programming. Asthese tests run in polynomial time, an optimal placement can be found in 2O(n log n) time.

Theorem 4.7. Unweighted Max-Crown on planar graphs with maximum degree ∆ admits aPTAS. More specifically, for any ε > 0 there is an (1 + ε)-approximation algorithm with linearrunning time n2(∆/ε)

O(1).

Proof. Let r be a parameter to be determined later. Frederickson [Fre87] showed that we canfind a vertex set X ⊆ V (called r-division) of size O(n/

√r) such that the following holds. The

vertex set V ∖ X can be partitioned into n/r vertex sets V1 , . . . ,Vn/r such that (i) ∣Vi ∣ ≤ r fori = 1, . . . , n/r and (ii) there is no edge running between any two distinct vertex sets Vi and Vj .In what follows, we assume without loss of generality that G is connected, as we can apply thePTAS to every connected component separately.We apply the result of Frederickson to the input graph and compute an r-division X. By

removing the vertex set X from the graph, we remove O(n∆/√r) edges from G. Now, we

apply the exact algorithm of Lemma 4.4 to each of the induced subgraphs G[Vi] separately.The solution is the union of the optimum solutions to G[Vi].

Since no edge runs between the distinct sets Vi and Vj , the subgraphs G[Vi] cover G − X.Let E⋆ be the set of edges realized by an optimum solution to G, let OPT = ∣E⋆∣, and letOPT′ = ∣E⋆∩E(G−X)∣. By Lemma 4.3, we have thatOPT ≥ 2(n−1)/(∆+1) = Ω(n/∆). Whenwe removed X from G, we removed O(n∆/

√r) edges. Hence, OPT = OPT′ +O(n∆/

√r)

and OPT′ = Ω(n(1/∆ − ∆/√r)).

Since we solved each sub-instance G[Vi] optimally and since these sub-instances coverG − X, the solution created by our algorithm realizes at least OPT′ many edges. Using this

63

Page 72: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 4 Approximation Algorithms for Box Contact Representations

fact and the above bounds on OPT and OPT′, the total performance of our algorithm can bebounded by

OPTOPT′

= OPT′ +O(n∆/√r)

OPT′= 1 + O ( n∆/

√r

n(1/∆ − ∆/√r)) = 1 + O ( ∆2

√r − ∆2 ) .

We want this last term to be smaller than 1 + ε for some prescribed error parameter 0 < ε ≤ 1.It is not hard to verify that this can be achieved by letting r = Θ(∆4/ε2). Since each of thesubgraphs G[Vi] has at most r vertices, the total running time for determining the solution isn2(∆/ε)

O(1).

Before tackling the case of general graphs, we need a lower bound on the size of maximummatchings in planar graphs in terms of the numbers of vertices and edges.

Lemma 4.5. Any planar graph with n vertices and m edges contains a matching of size at least(m − 2n)/3.

Proof. Let G be a planar graph. Our proof is by induction on n. The claim clearly holdsfor n = 1.For the inductive step, assume that n > 1. If G is not connected, the claim follows by

applying the inductive hypothesis to every connected component. Now assume that G hasa vertex u of degree less than 3. Consider the graph G′ = G − u with n′ = n − 1 vertices andm′ ≥ m − 2 edges. By the inductive hypothesis G′ (and hence, G, too) has a matching of sizeat least

(m′ − 2n′)/3 ≥ ((m − 2) − 2(n − 1))/3 = (m − 2n)/3.It remains to tackle the case where G is connected and has minimum degree 3. Nishizeki

and Baybars [NB79] showed that any connected planar graph with at least n ≥ 10 vertices andminimum degree 3 has a matching of size at least

⌈(n + 2)/3⌉ ≥ n/3.

This shows the claim for n ≥ 10 since m ≤ 3n − 6.In the remaining cases, G has n ≤ 9 vertices. Due to planarity, we have

(m − 2n)/3 ≤ (n − 6)/3 ≤ 1.

Hence, any nonempty matching is large enough.

We are now ready to present an approximation algorithm for general graphs.

Theorem 4.8. Unweighted Max-Crown on general graphs admits a (5 + 16α/3) (≈ 13.4)ap-proximation.

Proof. The algorithm first computes a maximal matchingM in G. Let V ′ be the set of verticesmatched by M, let G′ be the subgraph induced by V ′, and let E′ be the edge set of G′. Notethat G = G − E′ is a bipartite graph with partition (V ′ ,V ∖V ′). This is because the matchingM is maximal, which implies that every edge in E ∖ E′ is incident to a vertex in V ′ and to a

64

Page 73: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

The Model with Point Contacts Section 4.4

V ′

V \V ′

G

G′

(a) G is covered by G (bipartite, gray) and G′; perfect matching M (gray, bold)

(b) maximum matching M′′ (gray/black)in G′′ = G′−M

(c) optimum solution to G′: graph G∗ (black)and part of M (gray)

Figure 4.6: Partitioning the input graph and the optimumsolution in the proof ofTheorem4.8.

vertex not in V ′; see Figure 4.6a. Hence, we can compute a 16α/3- approximation to G usingthe algorithm presented in Theorem 4.3.

Consider the graph G′′ = (V ′ , E′ ∖M) and compute a maximum matching M′′ in G′′; seeFigure 4.6b. The edge setM ∪M′′ is a set of vertex-disjoint paths and cycles and can thereforebe completely realized [BFK+14]. The algorithm realizes this set. Below, we argue that thisrealization is in fact a 5-approximation for G′, which completes the proof (due to Lemma 4.1and since G is covered by G′ and G).Let n′ = ∣V ′∣ be the number of vertices of G′. Let E∗ be the set of edges realized by an

optimum solution to G′, and let OPT = ∣E∗∣. Consider the subgraph G∗ = (V ′ , E∗ ∖ M)of G′′; see Figure 4.6c. Note that G∗ is planar and contains at least OPT−n′/2 many edges.Applying Lemma 4.5 to G∗, we conclude that the maximummatching M′′ of G′′ has size atleast (OPT−5n′/2)/3. Hence, by splitting OPT appropriately, we obtain

OPT = (OPT−5n′/2) + 5n′/2 ≤ 3∣M′′∣ + 5∣M∣ ≤ 5∣M′′ ∪M∣ .

4.4 TheModel with Point Contacts

In the model with point contacts, adjacencies between boxes may be realized by a point contact,that is, if two boxes touch each other in two corners. Note that the algorithms that use thePTAS of Lemma 4.2 also hold for this model without any modification.

65

Page 74: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 4 Approximation Algorithms for Box Contact Representations

4.4.1 Weighted Bipartite and General GraphsFor these graph classes, we do, on the one hand, no longer need the post-processing that weapplied in Theorems 4.3 and 4.5 (and implicitly also in Theorem 4.4). This post-processingcost us up to a quarter of the total profit. Hence, we can (for now) replace α by 3α/4, whichimproves the approximation factors for these cases.On the other hand, a realized graph is now not necessarily planar as four boxes can meet

in a point and both diagonals correspond to edges of the input graph. It is, however, easy tosee that the graphs that can be realized are 1-planar. This means that an optimal solution hasat most 4n − 8 edges in the case of general graphs and at most 3n − 6 edges in the case ofbipartite graphs. Furthermore, Ackerman [Ack14] showed very recently that a 1-planar graphcan be covered by a planar graph and a tree. Hence, we can cover a 1-planar graph with sevenstar forests and a bipartite 1-planar graph with six star forests (via a bipartite planar graph anda tree).If our approximation algorithm for bipartite graphs uses this decomposition into six star

forests, we easily get a 6α-approximation for this case. As a consequence, we get (as inTheorem 4.4) a randomized 12α-approximation for general graphs. Similarly, decomposingan optimum 1-planar solution into seven star forests (instead of five star forests for planargraphs), we get a deterministic 14α-approximation for general graphs.

Theorem 4.9. Weighted Max-Crown in the model with point contacts admits a 6α (≈ 9.5)-approximation algorithm on bipartite graphs, a randomized 12α(≈ 19)-approximation algorithmon general graphs, and a deterministic 14α (≈ 22.1)-approximation algorithm on general graphs.

4.4.2 Unweighted General GraphsIn order to modify the algorithm for the unweighted case, we use the new decompositionof bipartite graphs. It is easy to prove that any 1-planar graph with m edges and n verticescontains a matching of size at least (m − 3n)/3: we planarize the graph (by removing at mostn edges) and then apply Lemma 4.5. This results in a (7 + 6α)-approximation for unweightedgeneral graphs.

Theorem 4.10. Weighted Max-Crown in the model with point contacts admits a (7 + 6α)(≈16.5)-approximation algorithm on unweighted general graphs.

4.5 APX-Completeness

In this section, we prove APX-completeness of weighted Max-Crown by giving a reductionfrom 3-dimensional matching. This reduction works both in the model without and in themodel with point contacts.

Theorem 4.11. Weighted Max-Crown is APX-complete even if the input graph is bipartite ofmaximum degree 9, each edge has profit 1, 2 or 3, and each vertex corresponds to a square of oneout of three different sizes.

Proof. We give a reduction from 3-dimensional matching (3DM). Recall that an instance ofthis problem is given by three disjoint sets X ,Y , Z with cardinalities ∣X∣ = ∣Y ∣ = ∣Z∣ = k and a

66

Page 75: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

APX-Completeness Section 4.5

e?

e2

e3

e4 e6

e7

e8e1

e5

(a) profit 7 ⋅ 3 + 2 = 23

e?

e2

e3

e4 e6

e7

e8zx y

e5

(b) profit 7 ⋅ 3 + 3 ⋅ 1 = 24

Figure 4.7: The two possible configurations of a hyperedge e = (x , y, z) in the proof ofTheorem 4.11.

set E ⊆ X × Y × Z of hyperedges. The objective is to find a set M ⊆ E, calledmatching, suchthat no element of V = X ∪ Y ∪ Z is contained in more than one hyperedge in M and suchthat ∣M∣ is maximized.

The problem is known to be APX-hard [FGMS11]. More specifically, for the special caseof 3DM where every v ∈ V is contained in at most three hyperedges (hence ∣E∣ ≤ 3k) it isNP-hard to decide whether the maximummatching has cardinality k or only k(1 − ε0) forsome constant 0 < ε0 < 1. We reduce from this special case of 3DM to Max-Crown.

To this end, we construct the following Max-Crown instance from a given 3DM instance.We create, for each v ∈ V , a square of side length 1. For each hyperedge e ∈ E, we createnine squares e⋆ , e1 , . . . , e8 where e⋆ has side length 3.5 and e1 , . . . , e8 have side length 3. Inthe desired contact graph, we create an edge (e⋆ , e1) of profit 2 and, for i = 2, . . . , 8, an edge(e⋆ , e i) of profit 3. We also create an edge (e⋆ , v) of profit 1 if v is incident to e in the 3DMinstance.

Consider an optimum solution to the above Max-Crown instance. It is not hard to verifythat, for any hyperedge e = (x , y, z), the solution will realize the edges (e⋆ , e i) for i = 2, . . . , 8.Moreover, we can assume without loss of generality that the solution either realizes all threeadjacencies (e⋆ , x), (e⋆ , y), and (e⋆ , z) of total profit 3 or the adjacency (e⋆ , e1) of profit 2;see Figure 4.7. We call such a solution well-formed.Assume that there is a solution M to the 3DM instance of cardinality k. Then this can be

transformed into a well-formed solution toMax-Crown of profit (7 ⋅3+2)∣E∣+ ∣M∣ = 23∣E∣+k.Conversely, suppose that themaximummatching has cardinality atmost (1−ε0)k. Consider

an optimumsolution to the respectiveMax-Crown instance. Wemay assume that the solutionis well-formed. Let M be the set of hyperedges e = (x , y, z) for which all three adjacencies(e⋆ , x), (e⋆ , y), (e⋆ , z) are realized. Then, the profit of this solution is (7 ⋅ 3 + 2)∣E∣ + ∣M∣ =23∣E∣ + ∣M∣. Note that M is in fact a matching because the solution to Max-Crown waswell-formed. Thus, the optimum profit is bounded by 23∣E∣ + (1 − ε0)k.

Hence, it is NP-hard to distinguish between instances with OPT ≥ 23∣E∣ + k and instanceswith OPT ≤ 23∣E∣ + (1 − ε0)k. Using ∣E∣ ≤ 3k, this implies that there cannot be any approxi-

67

Page 76: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 4 Approximation Algorithms for Box Contact Representations

mation algorithm of ratio less than

23∣E∣ + k23∣E∣ + (1 − ε0)k

= 1 + ε0k23∣E∣ + (1 − ε0)k

≥ 1 + ε0k(70 − ε0)k

= 1 + ε070 − ε0

,

which is a constant strictly larger than 1.

4.6 Concluding Remarks

In this chapter, we have presented approximation algorithms for the Max-Crown problem,which can be used for constructing semantics-preserving word clouds. Apart from improvingapproximation factors for various graph classes, many open problems remain. Most of ouralgorithms are based on covering the input graph by subgraphs and packing solutions for theindividual subgraphs. Both subproblems—covering graphs with special types of subgraphsand packing individual solutions together—are interesting problems in their own right whichmay lead to algorithms with better guarantees. Practical variants of the problem are also ofinterest, for example, restricting the heights of the boxes to predefined values (determinedby font sizes), or defining more than immediate neighbors to be in contact, thus consideringnon-planar “contact” graphs. Another interesting variant is when the bounding box of therepresentation has a certain fixed size or aspect ratio.

68

Page 77: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Part II

Visual Guidance

Page 78: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz
Page 79: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

5 Smooth Orthogonal Layoutsof Planar Graphs

In the visualization of technical networks such as the structure of VLSI chips [Lei80], floorplans [SFK11], or UMLdiagrams [See97], there is a strong tendency to draw edges as rectilinearpaths. The problem of laying out networks in such a way is called orthogonal graph drawingand has been studied extensively. For drawings of (planar) graphs to be readable, special careis needed to keep the number of bends small. In a seminal work, Tamassia [Tam87] showedthat one can efficiently minimize the total number of bends in orthogonal layouts of embeddedmaxdeg-4 planar graphs, that is, planar graphs of maximum degree 4 whose combinatorialembedding (the cyclic order of the edges around each vertex) is given. In contrast to this,minimizing the number of bends over all embeddings of a maxdeg-4 planar graph is NP-hard [GT01]. Biedl and Kant [BK98] and Liu et al. [LMS98] have independently shown thatany planar embedding of a maxdeg-4 planar graph admits a drawing on the (n × n)-gridwith at most 2n + 2 bends in total and at most 2 bends per edge, with the exception of theoctahedron, that requires one edge with 3 bends. Bläsius et al. [BKRW14] gave an algorithmthat, given an embedded maxdeg-4 planar graph and a function flex∶ E → N≥1, computes adrawing with at most flex(e) bends for every edge e ∈ E, if one exists.In a so far unrelated line of research, circular-arc drawings of graphs have become a

popular matter of research in the last few years. Inspired by American artist Mark Lombardi(1951–2000), Duncan et al. [DEG+12] introduced and studied Lombardi drawings, which arecircular-arc drawings with the additional requirement of perfect angular resolution, that is,for each vertex, all pairs of consecutive edges form the same angle. Among others, Duncanet al. treat drawings of d-regular graphs, that is, graphs in which every vertex has degree d,where all vertices have to lie on one circle. They show that, under this restriction, Lombardidrawings can be constructed efficiently for some subclasses, whereas the problem is NP-hardfor other subclasses. They also show that ordered trees can always be Lombardi drawn inpolynomial area, whereas straight-line drawings with perfect resolution may need exponentialarea [DEG+13].

Very recently, Bekos et al. [BKKS13] introduced the smooth orthogonal graph layout problemthat combines the two worlds; the rigidity and clarity of orthogonal layouts with the artisticstyle and aesthetic appeal of Lombardi drawings. Formally, a smooth orthogonal drawing of agraph is a drawing on the plane where

(i) each vertex is drawn as a point

(ii) edges leave and enter vertices horizontally or vertically, and

(iii) each edge is drawn as an alternating sequence of axis-aligned line segments and circular-arc segments such that consecutive segments have a common horizontal or verticaltangent at their intersection point.

In the case of (maxdeg-4) planar graphs, it is additionally required that

Page 80: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 5 Smooth Orthogonal Layouts of Planar Graphs

161 480

500

500

534

480

153

533

533

GmundenSeebahnhof

GmundenTraundorf

Viecht-wang Ort

Lemberg-weg

Engel-hof

Baumgarten-Waldbach

Gschwandt-Rabersberg

GschwandtSchule

St. KonradB120/Abzw Ort

Scharn-stein GHLidau

Grünau im AlmtalBahnhof

Traxenbichl

UntermWald

Steinfelden Abzw Ort

Kothmühle

ScharnsteinMühldorf

Viecht-wang

Grünauim AlmtalGemeindeamt

AlmtalNaturwildpark

Grünauim AlmtalPostamt

ScharnsteinAlmbrücke

Figure 5.1: Clipping of the public transport map Gmunden – Vöcklabruck – Salzkammergut,Austria [Wal12].

(iv) there are no edge-crossings.

Note that, by construction, (smooth) orthogonal drawings of maxdeg-4 planar graphs haveangular resolution within a factor of two of optimal.Figure 5.1 shows a real-world example: a smooth orthogonal drawing of an Austrian

regional bus and train map. Extending our model, the map has (multi-) edges that entervertices diagonally (as in Grünau im Almtal Postamt; bottom right).

For usability, it is important to keep the visual complexity of such drawings low. In a(smooth) orthogonal drawing, the complexity of an edge is the number of segments it consistsof, that is, the number of inflection points plus one. Then, a natural optimization goal is tominimize, for a given (embedded) planar graph, the edge complexity of a drawing, whichis defined as the maximum complexity over all edges. We say that a graph has orthogonalcomplexity k if it admits an orthogonal drawing of edge complexity at most k, for short, anOCk-layout. Accordingly, we say that a graph has smooth complexity k if it admits a smoothorthogonal drawing of edge complexity at most k, for short, an SCk-layout. We seek fordrawings of maxdeg-4 planar graphs with low smooth complexity.

Our Contribution. Known results and our contributions to smooth orthogonal drawingsare shown in Table 5.1. Themain result of this chapter is that anymaxdeg-4 planar graph admitsan SC2-layout (see Sections 5.1 and 5.2). Our upper bound of 2 for the smooth complexityof maxdeg-4 planar graphs improves the previously known bound of 3 and matches thecorresponding lower bound [BKKS13]. In contrast to the known algorithm for SC3-layout

72

Page 81: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Smooth Layouts for Biconnected Maxdeg-4 Planar Graphs Section 5.1

graph class our contribution Bekos et al.complexity area Theorem [BKKS13]

biconnected SC2 super-poly 5.1 SC3maxdeg-4 planarmaxdeg-4 planar SC2 super-poly 5.2maxdeg-3 planar SC2 ⌊n2/4⌋ × ⌊n/2⌋ 5.3biconnected SC1 exponential 5.4maxdeg-4 outerplanetriconnected SC1maxdeg-3 planarHamiltonian SC1maxdeg-3 planarmaxdeg-4 planar, /⊇SC1 5.5poly-areaOC3, octahedron /⊆SC1OC2 /⊆SC1 5.6

Table 5.1: Comparison of our results to the results of Bekos et al. [BKKS13].

[BKKS13], which is based on an algorithm for OC3-layout of Biedl and Kant [BK98], weuse an algorithm of Liu at al. [LMS98] for OC3-layout, which avoids S-shaped edges (seeFigure 5.2b, top). Such edges are undesirable since they force their endpoints to lie on a line ofslope ±1 in a smooth orthogonal layout (see Figure 5.2b, bottom). Our construction requiressuper-polynomial area. Hence, we have made no effort in proving a concrete bound.Further, we prove that every biconnected maxdeg-4 outerplane graph admits an SC1-

layout (see Section 5.3), expanding the class of graphs with SC1-layout from triconnectedor Hamiltonian maxdeg-3 planar graphs [BKKS13]. Note that in our result the outerplaneembedding can be prescribed, while in the other results the algorithms need the freedom tochoose an appropriate embedding.

We complement our positive results by two negative results. First, we show that there is aninfinite family of graphs that admit SC1-layouts but require exponential area; see Section 5.4.Second, we show that there is an infinite family of graphs that admit OC2-layouts but do notadmit SC1-layouts; see Section 5.5.

5.1 Smooth Layouts for BiconnectedMaxdeg-4 PlanarGraphs

In this section, we prove that any biconnected maxdeg-4 planar graph admits an SC2-layout.Given a biconnected maxdeg-4 planar graph, we first compute an OC3-layout, using analgorithm of Liu et al. [LMS98]. Then, we turn the result of their algorithm into an SC2-layout.Liu et al. choose two vertices s and t and compute an st-ordering of the input graph.

An st-ordering is an ordering (s = 1, 2, . . . , n = t) of the vertices such that every vertex j(2 < j < n − 1) has neighbors i and k with i < j < k. Then, they go through all vertices as

73

Page 82: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 5 Smooth Orthogonal Layouts of Planar Graphs

OC3

SC2

(a) vertical (b) S-shapes (c) horizontal (d) L-shapes (e) C-shapes (f) U-shape

Figure 5.2: Converting shapes from the OC3-layout to SC2.

prescribed by the st-ordering, placing vertex i in row i. Calling an edge of which exactly oneendpoint is already drawn an open edge, they maintain the following invariant:

(I1) In each iteration, every open edge is associated with a column (a vertical grid line).

We define an L-shaped edge (for short, an L-shape) to be composed of a quarter-circle and ahorizontal or vertical line-segment; see Figure 5.2d. A C-shaped edge (for short, a C-shape) iscomposed of a semicircle and (optionally) a vertical line segment; see Figure 5.2e. Similarly, aU-shaped edge (for short, a U-shape) is composed of a semicircle and (optionally) a horizontalline segment; see Figure 5.2f. Finally, an S-shaped edge (for short, an S-shape) is composed oftwo quarter-circles; see Figure 5.2b (bottom); they are undesirable as they force their endpointsto lie on a line of slope ±1.

The algorithm of Biedl and Kant [BK98] yields an OC3-layout similar to that of Liu et al.However, Liu et al. additionally show how to modify their algorithm such that it producesOC3-layouts without the undesirable S-shapes.In their modified algorithm, Liu et al. search for paths in the drawing that consist only of

S-shapes; every vertex lies on at most one such path. They place all vertices on such a pathin the same row, without changing their column. This essentially converts all S-shapes intohorizontal edges. Now, every edge (except (1, 2) and (1, n)) is drawn as a vertical segment,horizontal segment, L-shape, or C-shape; see Figure 5.2. The edge (1, 2) is drawn as a U-shape and the edge (1, n), if it exists, is either drawn as a C-shape or (only in the case of theoctahedron) as a three-bend edge that uses the left port of vertex 1 and the top port of vertex n.We convert the output of the algorithm of Liu et al. from OC3 to SC2. The coordinates of

the vertices and the port assignment of their drawing define a (non-planar) SC2-layout usingthe conversion table in Fig 5.3. In order to avoid crossings, we carefully determine new vertexpositions scanning the drawing of Liu et al. from bottom to top.We now introduce our main tool for the conversion: a cut, for us, is a y-monotone curve

consisting of horizontal, vertical, and circular segments that divides the current drawing intoa left and a right part, and only intersects horizontal segments and semicircles of the drawing.In the following, we describe how one can find such a cut from any starting point at the topof the drawing; see Figure 5.4. In spite of the fact that we define the cut going from top tobottom, “to its right” will, as usually, mean “with larger x-coordinate”.

When such a cut encounters a vertex u to its right with an outgoing edge associated with itsleft port, then the cut continues by passing through the segment incident to u. On the other

74

Page 83: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Smooth Layouts for Biconnected Maxdeg-4 Planar Graphs Section 5.1

port(v)po

rt(u)

left

top

righ

tbo

ttom

left toprightbottom

∆x < 0 = > s < −1 = > s < 1 = >

s < 1 = > s < −1 = >

∆x < 0 = >s < 1 = >

∆y < 0 =

∆x<0 ∆x>0

Figure 5.3: Cases for drawing the edge (u, v) based on the port assignment. In each case,u is the lower of the two vertices (y(u) < y(v)). As shorthand, we use ∆x = x(u) − x(v),∆y = y(u) − y(v), and s = slope(u, v) = ∆x/∆y.

hand, if the port has an incoming L-shaped or C-shaped edge, the cut just follows the edge.The case when the cut encounters a vertex to its left is handled symmetrically.

Let v be a vertex incident to two incoming C-shapes (u, v) and (w , v). If y(w) ≤ y(u)we call the C-shape (u, v) protected by (w , v); otherwise, we call it unprotected. In order toensure that a cut passes only through horizontal segments and that our final drawing is planar,our algorithm will maintain the following new invariants:

(I2) An L-shape never contains a vertical segment (as in Figure 5.2d right); it always containsa horizontal segment (as in Figure 5.2d left) or a single quarter-circle.

(I3) An unprotected C-shape never contains a horizontal segment incident to its top vertex(as in Figure 5.2e right); it always contains a horizontal segment incident to its bottomvertex (as in Figure 5.2e left) or no straight-line segment.

(I4) The subgraph induced by the vertices that have already been drawn has the sameembedding as in the drawing of Liu et al.

Below, we treat L- and C-shapes of complexity 1 as if they had a horizontal segment oflength 0 incident to their bottom vertex. Note that we always cut around protected C-shapes,so we will never end up in their interior. Now, we are ready to state the main theorem of thissection by presenting our algorithm for SC2-layouts.

Theorem 5.1. Every biconnected maxdeg-4 planar graph admits an SC2-layout.

Proof. In the drawing Γ of Liu et al., vertices are arranged in rows. Let V1 , . . . ,Vr be thepartition of the vertex set V in rows 1, . . . , r. Following Liu et al., the vertices in each such setinduce a path in G. We place vertices in the order V1 , . . . ,Vr . In this process, we maintain a

75

Page 84: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 5 Smooth Orthogonal Layouts of Planar Graphs

u

(a) open edge

uu

(b) L-shape

u u

(c) C-shape

v

u

v

u

(d) maintaining I2

Figure 5.4: Finding a cut.

planar drawing Γ′ and the invariants I1 to I4. As Liu et al., we place the vertices on the integergrid. We deal with the special edges (1, 2) and (1, n) at the end, leaving their ports, that is, thebottom and left port of vertex 1 and the top port of vertex n, open.For invariant I1, we associate each open edge with the column on which the algorithm of

Liu et al. places it. If their algorithm draws the first segment of the open edge horizontally(from the source vertex to the column), we use the same segment for our drawing. We usethe same ports for the edges as their algorithm. Thus, our drawing keeps the embedding ofLiu et al., maintaining invariant I4.

Assume that, for some 1 ≤ i ≤ n, we have placed V1 , . . . ,Vi−1 and that the vertices in Vi arev1 , . . . , vc in left-to-right order (the case v1 = vc is possible; this is the only case in which avertex can have incoming L- or C-shapes at both its left and right port). Vertex v j (1 ≤ j ≤ c) isplaced in the column with which the edge entering the bottom port of v j is associated. If theleft port of v1 is used by an incoming L- or C-shape e = (u1 , v1), we place v1 (and the othervertices in Vi) on a row high enough such that a smooth drawing of e does not create anycrossings with edges lying on the right side of e in Γ; see Figure 5.5b.In order to make sure that the new drawing of e does not create crossings with edges on

the left side of e in Γ, we need to “push” those edges to the left of e. We do this by computinga cut that starts from v1, separates the vertices and edges that lie on the left side of e in Γ fromthose on the right side, passes u1 slightly to the left, and continues downwards as describedabove; see Figure 5.5c. Since, by invariant I4, our drawing so far is planar and each edge isdrawn y-monotone, we can find a cut that is also y-monotone. We move everything on theleft side of the cut further left such that e has no more crossings. Note that the cut intersectsonly horizontal edge segments. These will simply become longer by the move.Let ∆x i = x(v i) − x(u i) and ∆y i = y(v i) − y(u i) for i = 1, . . . , c. It is possible that the

drawing of e violates invariant I3—if u1 lies to the left of v1. We consider two cases. First,assume that the edge (u1 , v1) is the only incoming C-shape at v1. Note that this is always thecase if c > 1. In this case, we simply define a cut that starts slightly to the right of v1, follows e,intersects e slightly to the left of u1, and continues downwards. Then, we move everything onthe left side of the cut by ∆x1 + 1 units to the left.

Next, assume that c = 1 and there is another C-shape (w1 , v1) entering the right port of v1;see Figure 5.5e. We assume, without loss of generality, that y(w1) ≤ y(u1). Let (x1 , v1) be theedge incident to the bottom port of v1. In this case, we first find a cut that starts slightly to theright of v1, follows (x1 , v1), passes x1 slightly to the right, and continues downwards. Then, wemove everything on the right side of the cut by y(v1) − y(x1) units to the right. Thus, thereis an empty square to the right of (x1 , v1) of side length y(v1) − y(x1). Now, we place v1 at

76

Page 85: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Smooth Layouts for Arbitrary Maxdeg-4 Planar Graphs Section 5.2

v1

u1

e

(a) OC3-layout (b) move v1 up (c) find a cut (d) SC2-layout (e) & (f) protected C-shape

v1

u1w1

x1

v1

u1w1

x1

v1

Figure 5.5: Handling C-shapes.

the intersection of the slope-1 diagonal through x1 and the vertical line through w1. Due tothis placement, we can draw (x1 , v1) using two quarter-circles with a common horizontaltangent in the top right corner of the empty square; see Figure 5.5f. Note that the edge (u1 , v1)is protected by (w1 , v1), so it can have a horizontal segment incident to v1. This establishes I3.It is also possible that the drawing of e violates invariant I2—if slope(u1 , v1) > 1. In this

case, we define a cut that starts slightly to the left of v1, intersects e and continues downwards.Then, we move everything on the left side of the cut by ∆y1 units to the left. We treat vc , therightmost vertex in the current row, symmetrically to v1. This establishes I2.For the case that v1 does not have incoming C-shapes at both its left and right port, we

still have to treat the edges entering vertices v1 , . . . , vc from below. Note that these edges canonly be vertical or L-shaped. Vertical edges can be drawn without violating the invariants.However, invariant I2 may be violated if an edge e i = (u i , v i) entering the bottom port ofvertex v i is L-shaped; see Figure 5.4d. Assume that x(u i) < x(v i). In this case, we find acut that starts slightly to the left of v i , follows e i , intersects e i slightly to the right of u i , andcontinues downwards. Then, we move everything on the left side of the cut by ∆y i units tothe left. We handle the case x(u i) > x(v i) symmetrically. This establishes I2.We thus place the vertices row by row from bottom to top and draw the incoming edges

for the newly placed vertices, copying the embedding of the current subgraph from Γ. Thiscompletes the drawing of G − (1, 2), (1, n). Note that vertex 1 has no incoming edge andvertex 2 has only one incoming edge, that is, (1, 2). Thus, the bottom port of both vertices isstill unused. We draw the edge (1, 2) as a U-shape. Finally, we finish the layout by drawingthe edge (1, n), if it exists. By construction, the left port of vertex 1 is still unused. Note thatvertex n has no outgoing edges, so the top port of n is still free. Hence, we can draw theedge (1, n) as a horizontal or vertical segment followed by a three-quarter-circle. To avoidcrossings, we may have to move vertex n upwards. This way, we will get a horizontal segmentat vertex 1, and the three-quarter-circle will completely lie outside of the rest of the drawing.This completes the proof of Theorem 5.1.

5.2 Smooth Layouts for Arbitrary Maxdeg-4 PlanarGraphs

In this section, we describe how to create SC2-layouts for arbitrarymaxdeg-4 planar graphs. Toachieve this, we decompose the graph into biconnected components, embed them separately,

77

Page 86: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 5 Smooth Orthogonal Layouts of Planar Graphs

and then connect them. For the connection, it is important that one of the connector verticeslies on the outer face of its component. Within each component, the connector vertices havedegree at most 3; if they have degree 2, we must make sure that their incident edges do notuse opposite ports; otherwise, we cannot connect two components with a common connectorvertex. Following Biedl and Kant [BK98], we say that a degree-2 vertex v is drawn with rightangle if the edges incident to v use two neighboring ports.

Lemma 5.1. Any biconnected maxdeg-4 planar graph admits an SC2-layout such that alldegree-2 vertices are drawn with right angle.

Proof. Let v be a degree-2 vertex. We now show how to adjust the algorithm of Section 5.1such that v is drawn with right angle. By construction, the top and the bottom ports of v areused. Let (u, v) be the edge entering v from below (we allow v = 1 and u = 2). We modify thealgorithm such that (u, v) uses the left or right rather than the bottom port of v. We considerthree cases; (u, v) is either L-shaped, U-shaped, or vertical. These cases are handled when vis inserted into the smooth orthogonal drawing.First, we assume that (u, v) is L-shaped; see Figure 5.6a. Then, we can simply move v to

the same row as u, making the edge horizontal.Second, we assume that (u, v) is U-shaped; see Figures 5.6b, 5.6c. Then, u = 1 and v = 2 or

vice versa. If both have degree 2, we move the higher vertex to the row of the lower vertex(if necessary) and replace the U-shaped edge by a horizontal edge. Otherwise, we move thevertex with degree 2, say v, downwards to row y(u)−∆x such that we can replace the U-shapeby an L-shape.Finally, we assume that (u, v) is vertical; see Figure 5.6d. Then, we compute a cut that

starts slightly below v, follows (u, v) downwards, and passes u slightly to its left. We move allvertices (including u, but not v) that lie on the right side of this cut by at least ∆y to the right.Then, we can draw (u, v) as an L-shape that uses the right port of v.

Observe that, in each of the three cases, we redraw all affected edges with SC2. Hence,the modified algorithm still yields an SC2-layout. At the same time, all degree-2 vertices aredrawn with right angle as desired.

Now, we describe how to connect the biconnected components. Recall that a bridge is anedge whose removal disconnects a graph G. We call the two endpoints of a bridge bridgeheads. A cut vertex is a vertex whose removal disconnects the graph, but is not a bridge head.

Theorem 5.2. Any maxdeg-4 planar graph admits an SC2-layout.

Proof. Let G0 be some biconnected component of G, and let v1 , . . . , vk be the cut vertices andbridge heads of G in G0. For i = 1, . . . , k, if v i is a bridge head, let v′i be the other head of thebridge; otherwise, let v′i = v i . Let G i be the subgraph of G containing v′i and the connectedcomponents of G − v′i not containing G0. Following Lemma 5.1, G0 can be drawn such thatall degree-2 vertices are drawn with right angle.

The algorithm of Section 5.1 that we modified in the proof of Lemma 5.1 places the lastvertex n at the top of the drawing and thus on the outer face. When drawing G i , we choose v′ias this vertex. By induction, G i can be drawn such that all degree-2 vertices are drawn withright angle.

78

Page 87: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Smooth Layouts for Arbitrary Maxdeg-4 Planar Graphs Section 5.2

uu v

v

(a) an L-shape becomes a horizontal edge

v

vu u

(b) a U-shape becomes a horizontal edge

u

v

v

u

(c) a U-shape becomes an L-shape

v v

u u

(d) a vertical edge becomes an L-shape

Figure 5.6: Modification of the placement of degree-2 vertices.

In order to connect G i to G0, we make G0 large enough such that we can fit G i into theface that contains the free ports of v i . This face is unique because v i is drawn with right angle.We may have to rotate G i by a multiple of 90 to achieve the following. If v i is a cut vertex,we make sure that v′i uses the ports of v i that are free in G0. Then, we identify v i and v′i .Otherwise, we make sure that a free port of v i and a free port of v′i are opposite. Then, wedraw the bridge (v i , v′i) horizontally or vertically. This completes our proof.

For an example run of our algorithm, see Figure 5.7.For graphs of maximum degree 3, we can make our drawings more compact. This is due to

the fact that we can avoid C-shaped edges (and hence cuts) completely. In the presence ofL-shapes only, it suffices to stretch the orthogonal drawing by a factor of n.

Theorem 5.3. Every biconnected maxdeg-3 planar graph with n vertices admits an SC2-layoutusing area ⌊n2/4⌋ × ⌊n/2⌋.

Figure 5.8: SC1-layoutof K4.

Proof. It is known that every biconnected maxdeg-3 planar graphexcept K4 has an OC2-layout using area ⌊n/2⌋ × ⌊n/2⌋ fromKant [Kan96]. Now, we use the same global stretching as Bekos etal. [BKKS13, Theorem 2] when they showed that every OC2-layoutcan be transformed into an SC2-layout: we stretch the drawing hor-izontally by the height of the drawing, that is, by a factor of ⌊n/2⌋.This makes sure that we can replace every bend by a quarter-circlewithout introducing crossings. Figure 5.8 shows an SC1-layoutof K4, completing our proof.

79

Page 88: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 5 Smooth Orthogonal Layouts of Planar Graphs

(a) input graph (b) biconnected subgraphs

(c) st-ordering (d) eliminating S-shapes

(e) drawing degree-2 vertices with right angle (f) drawing subgraphs with SC2

(g) connecting second and fourth part by us-ing the bridge (third part)

(h) connecting first and second part

Figure 5.7: An example-run of our Algorithm for SC2-layout. The circle vertices of compo-nent i correspond to the cut vertex v′i . The square vertices correspond to cut vertices of othercomponents.

80

Page 89: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

SC1-Layouts of Biconnected Maxdeg-4 Outerplane Graphs Section 5.3

5.3 SC1-Layouts of BiconnectedMaxdeg-4 OuterplaneGraphs

In this section, we considermaxdeg-4 outerplane graphs, that is, maxdeg-4 outerplanar graphswith an outerplanar embedding. We prove that any biconnected maxdeg-4 outerplane graphadmits an SC1-layout. To do so, we first prove the result for a subclass of maxdeg-4 outerplanegraphs, which we call (2, 3)-restricted outerplane graphs; then, we generalize to maxdeg-4outerplane graphs. We call a maxdeg-4 outerplane graph (2, 3)-restricted if it contains a pair xand y of consecutive vertices on the outer face with deg(x) = 2 and deg(y) ≤ 3. Recall thatthe weak dual of a plane graph is the subgraph of the dual graph whose vertices correspond tothe bounded faces of the primal graph.

Lemma 5.2. Any biconnected (2, 3)-restricted maxdeg-4 outerplane graph admits an SC1-layout.

Proof. Let x and y be two consecutive vertices on the outer face of the given graph G withdeg(x) = 2 and deg(y) ≤ 3. Let also T be the weak dual tree of G rooted at the node v∗of T corresponding to the bounded face f ∗ that contains both x and y. We construct theSC1-layout Γ of G by traversing T , starting with v∗. When we traverse a node of T , we drawthe corresponding face of G with SC1.Consider the case that we have constructed a drawing Γ(H) for a connected subgraph H

of G and we want to add a new face f to Γ(H). For each vertex u of H, we denote by pu =(x(u), y(u)) the point at which u is drawn in Γ(H). The remaining degree of u is the numberof vertices adjacent to u in G −H. Since we construct Γ(H) face by face, the remaining degreeof each vertex in H is at most two. We call the ports of u that are not occupied by an edge of Hin Γ(H) free ports. During the construction of Γ, we maintain the following four invariants:

(J1) Γ(H) is an SC1-layout that preserves the planar embedding of G, and each edge isdrawn either as an axis-parallel line segment or as a quarter-circle in Γ(H). (Note thatwe do not use semi- and 3/4-circles.)

(J2) For each vertex u of H, the free ports of u in Γ(H) are consecutive around u, and theypoint to the outer face of Γ(H).

(J3) Vertices with remaining degree exactly 2 are incident to an edge drawn as a quarter-circle.

(J4) If an edge (u, v) is drawn as an axis-parallel segment, then at least one of u and v hasremaining degree at most 1. If (u, v) is vertical and y(u) < y(v), then u has remainingdegree at most 1 and the free port of u in Γ(H) is horizontal; see Figures. 5.9a, 5.9dand 5.9g. Symmetrically, if (u, v) is horizontal and x(u) < x(v), then u has remainingdegree at most 1 and the free port of u in Γ(H) is vertical; see Figures 5.9b, 5.9e and5.9h.

We now show how to add the drawing of the new face f to Γ(H). Since G is biconnectedand outerplanar, and due to the order in which we process the faces of G, f has exactly twovertices u and v which have already been drawn at pu and pv , respectively. The two vertices

81

Page 90: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 5 Smooth Orthogonal Layouts of Planar Graphs

v

u`−1u

v

u `−1u

f

`∞u

`0v

v

`−1u

`−1v,ε

u

ε

u v

u v

f

`+1u

`∞v

v

`−1v,ε

u

`+1u

v

u

v

f`0v

`+1u

u

v

u

f`−1v,ε

`+1u

ε

(a) (b)

(e)

(h)

(c)

(f)

(i)

(d)

(g)

f

u

Lu,v

v

(k)

Figure 5.9: (a)-(i) Different cases that arise when drawing face f of G. (k) A sample drawing.

are adjacent. Depending on how the edge (u, v) is drawn in Γ(H), we draw the remainingvertices and edges of f , as follows.

Let k ≥ 3 be the number of vertices on the boundary of f . The slope of the line segment pu pvis in −1, 0,+1,∞, where∞means that pu pv is vertical. For s ∈ −1, 0,+1,∞, we denoteby ℓsu the line with slope s through pu . Similarly, we denote by ℓsu ,ε the line with slope sthrough the point (x(u) + ε, y(u)), for some ε > 0. Figures 5.9d–5.9f show the drawing of ffor k = 3, and Figures 5.9g–5.9i for any k ≥ 4.Note that the lengths of the line segments and the radii of the quarter-circles that form f

are equal (except for the radii of the bold-drawn quarter-circles of Figures 5.9g and 5.9h whichare determined by the remaining edges of f ). Hence, the lengths of the line segments and theradii of the quarter-circles that form any face that is descendant of face f in T are smaller thanor equal to the lengths of the line segments and the radii of the quarter-circles that form f .

Our construction ensures that all vertices of the subgraph of G induced by the subtree of Trooted in f lie in the interior or on the boundary of the diagonal semi-strip Luv delimitedby ℓ+1u , ℓ+1v , and pu pv ; see Figure 5.9k. The only edges of this subgraph that are drawn in thecomplement of Luv—and are potentially involved in crossings—are incident to two verticesthat both lie on the boundary of Luv . In this particular case, however, the degree restrictionimplies that Luv is surrounded from above and/or below by two empty diagonal semi-strips ofat least half the width of the semi-strip Luv , which suffices to ensure planarity for the following

82

Page 91: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

SC1-Layouts of Biconnected Maxdeg-4 Outerplane Graphs Section 5.3

two reasons.First, any face that is descendant of face f in T is formed by line segments and quarter-

circles that are at most as long as the corresponding ones of face f . Second, due to the degreerestrictions, if two neighboring children of f are triangles, the left one cannot have a rightchild, and vice versa.Let us summarize. Figures 5.9d–5.9i show that the drawing of f ensures that the invari-

ants (J1)–(J4) of our algorithm are satisfied for H ∪ f . We begin by drawing the rootface f ∗. Since G is (2, 3)-restricted, f ∗ has two vertices x and y consecutive on the outer facewith deg(x) = 2 and deg(y) ≤ 3. We draw the edge (x , y) as a vertical line segment. Then,the remaining degrees of x and y are 1 and 2, respectively, which satisfies the invariants forface f ∗. Hence, we complete the drawing of f ∗ as in Figure 5.9d or 5.9g. Traversing T inpre-order, we complete the drawing of G.

Suppose that the input graph G is not (2, 3)-restricted. As the following lemma asserts, wecan always construct a biconnected (2, 3)-restricted maxdeg-4 outerplane graph by deleting avertex of degree 2 from G.

Lemma 5.3. Let G = (V , E) be a non-(2, 3)-restricted biconnected maxdeg-4 outerplane graph.Then, G has a degree-2 vertex whose removal yields a (2, 3)-restricted biconnected maxdeg-4outerplane graph.

Proof. The proof is by induction on the number of vertices. The base case is a maximalbiconnected outerplane graph on six vertices, which is the only non-(2, 3)-restricted graphwith six or less vertices. It is easy to see that in this case the removal of any degree-2 vertexyields a biconnected (2, 3)-restricted maxdeg-4 outerplane graph. Now, assume that thehypothesis holds for any biconnected maxdeg-4 outerplane graph with k ≥ 6 vertices.

Let Gk+1 be a biconnected maxdeg-4 outerplane graph on k + 1 vertices which is not (2, 3)-restricted. Let F be a face of Gk+1 that is a leaf in its weak dual. Then, F contains only oneinternal edge and exactly two external edges since, if it contained more than two externaledges, Gk+1 would be (2, 3)-restricted. Therefore,F consists of three consecutive vertices a, band c on the outer face with deg(a) = deg(c) = 4 and deg(b), since, otherwise, Gk+1 wouldbe (2, 3)-restricted. By removing b, we obtain a new graph Gk on k vertices. If a or c isincident to a degree-2 vertex in Gk , then Gk is (2, 3)-restricted. Otherwise, by our inductionhypothesis, Gk has a degree-2 vertex whose removal yields a (2, 3)-restricted outerplanargraph. Since this vertex is neither adjacent to a nor c, the removal of this vertex makes Gk+1also (2, 3)-restricted.

Now, we are ready to deal with general biconnected maxdeg-4 outerplane graphs.

Theorem 5.4. Any biconnected maxdeg-4 outerplane graph admits an SC1-layout.

Proof. If the given graph G is (2, 3)-restricted, the result follows from Lemma 5.2. Thus,assume that G is not (2, 3)-restricted. Then, G contains a degree-2 vertex b whose removalyields a biconnected (2, 3)-restricted maxdeg-4 outerplane graph G′. Hence, we can applythe algorithm of Lemma 5.2 to G′ and obtain an outerplanar SC1-layout Γ(G′) of G′. Sincethis algorithm always maintains consecutive free ports for each vertex, and the neighborsof b lie on the outer face of Γ(G′), we can insert b and its two incident edges to obtain an

83

Page 92: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 5 Smooth Orthogonal Layouts of Planar Graphs

(a) (b)

Figure 5.10: (a) A graphwith anOC2-layout using polynomial area (left) and (b) an SC1-layoutusing exponential area (right).

SC1-layout Γ(G) of G as follows. Let a and c be the neighbors of b and assume, without lossof generality, that c is drawn above a. If the edge (a, c) is drawn as a quarter-circle, then a3/4-circle arc from pc to pb and a quarter-circle from pb to pa suffice. Otherwise, we can usethe line segment pa pb and a quarter-circle from pb to pc . This concludes our proof.

5.4 A Lower Bound for the Area Requirement ofSC1-Layouts

In this section, we demonstrate an infinite family of maxdeg-4 planar graphs that requireexponential area if they are drawn with SC1. Bekos et al. [BKKS13] presented such a familyof graphs for the rather restricted setting where both the embedding of the graph and theport assignment of the edges are fixed. Here, we strengthen this result. Consider the graphdepicted in Figure 5.10a. This graph consists of several layers. Each layer consists of a cycle offour pairs of adjacent triangles. The SC1-layout of this graph in Figure 5.10b obviously requiresexponential area since every layer uses more than twice the area of the previous layer. We willnow show that this is the only SC1-layout of the graph, up to translation, rotation and scaling.First, we show that there are only two ways to draw one of the triangles of each layer. In

Figure 5.11, we show all 16 possible ways to get an SC1-layout of a triangle. However, in ourgraph all free ports have to lie on the outer face. There are only two SC1-layouts of a trianglethat have this property, marked by a dashed circle.Next, we build a pair of adjacent triangles. In Figure 5.12, we show that there are three

ways to combine two triangles that share an edge. Finally, we combine four pairs of adjacenttriangles to one layer of the graph. Using careful case analysis, it can be shown that thereare only two ways to draw one of the layers with SC1; see Figure 5.13. However, it is easy to

84

Page 93: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Biconnected Graphs without SC1-Layouts Section 5.5

Figure 5.11: All possible ways to get an SC1-layout of a triangle. Only two of these drawings(enclosed by dashed red circles) have all their ports on the outer face.

see that it is impossible to connect the drawing shown in Figure 5.13c to another layer. Thus,the SC1-layout shown in Figure 5.10b is the only way to draw this graph, which proves thefollowing theorem.

Theorem 5.5. There is an infinite family of graphs that require exponential area if they aredrawn with SC1.

5.5 Biconnected Graphs without SC1-Layouts

In this section, we demonstrate an infinite family of biconnected maxdeg-4 planar graphsthat admit OC2-layouts, but do not admit SC1-layouts. Bekos et al. [BKKS13] presented sucha family of graphs assuming a rather restricted setting in which the choice of the outer faceis fixed and always corresponds to a triangle. Here, we strengthen this result by providing

Figure 5.12: There are three ways to draw two adjacent triangles.

85

Page 94: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 5 Smooth Orthogonal Layouts of Planar Graphs

(a) (b) (c)

Figure 5.13: (a) One layer of the graph in Figure 5.10. (b) & (c) The only two ways to draw thesubgraph depicted in (a) with SC1.

(a) the graph G

1

2

3

4

5

(b) the important subgraph H in detail

Figure 5.14: A graph G that admits an OC2-layout, but does not admit an SC1-layout.

an infinite family of biconnected maxdeg-4 planar graphs that admit no SC1-layout in anyembedding. We start with the following lemma.

Lemma 5.4. There exists a biconnected maxdeg-4 planar graph that admits an OC2-layout,but does not admit an SC1-layout.

Proof. Let G be the graph of Figure 5.14a. We prove that G has no SC1-layout. First, notethat G contains two copies of the graph depicted in Figure 5.14b. We denote this graph by H.We first prove that H has no SC1-layout with the given embedding. In particular, we showthat the subgraph of H induced by the vertices on or inside the black cycle cannot be drawnwith SC1.

Consider edge e = (1, 2) of H. This edge can be drawn as a straight-line segment, quarter-circle, semicircle or 3/4-circle. Figure 5.15a illustrates the case that e is drawn as a horizontalline segment. In this case, the ports for the edges are fixed due to the given embedding andit is not possible to complete the drawing. The case that e is drawn as a vertical segment isanalogous. Similarly, we show that there is no SC1-layout for H if e is drawn as a quarter-circle in Figures 5.15b–5.15c, as a semicircle in Figures 5.15d–5.15g and as a 3/4-circle inFigures 5.15h–5.15l. Thus, there is no SC1-layout for this fixed embedding of H.

86

Page 95: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Biconnected Graphs without SC1-Layouts Section 5.5

12 43

1

2

4

3

1

2

4

3

12

43

(a) (b) (c) (d)

12

4

3

12

43

12

4

31

2

4

3

(d) (e) (f) (g)

1

2

4

3

1

2

4

31

2

4

3

1

2 4

3

(h) (i) (j) (k)

Figure 5.15: Illustration for the proof of Lemma 5.4.

Next, we claim that there is no SC1-layout for any embedding of H where the vertices 2, 3,4, and 5 define the outer cycle. Indeed, if the outer face is fixed, then the only way to find adifferent embedding is to find a separating pair u, v in H and “flip” one of the componentsofH−u, v. There are two possible separating pairs inH: (i) vertex 1 and the red vertex; then,the flip with respect to this pair gives an isomorphic graph due to symmetry; and (ii) vertices 2and 4; then, the flip with respect to this pair again gives an isomorphic graph by interchangingthe role of 3 and 5. Thus, with the fixed outer cycle (2, 3, 4, 5), all possible embeddings of Hare isomorphic. Since G contains two copies of H, in any embedding of G, at least one of thecopies will retain its outer cycle. Hence, there is no SC1-drawing for any embedding of G.

Graph G of Figure 5.14a uses a few short paths to connect two copies of H. Obviously, wecan add an arbitrary number of vertices to these paths such that the augmented graph remainsbiconnected and maxdeg-4 planar. This proves the following theorem.

Theorem 5.6. There is an infinite family of biconnected maxdeg-4 planar graphs that admitOC2-layouts but do not admit SC1-layouts.

87

Page 96: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 5 Smooth Orthogonal Layouts of Planar Graphs

5.6 Concluding Remarks

In this chapter, we have presented several new results about smooth orthogonal drawings ofmaxdeg-4 planar graphs. However, many problems remain open. We have shown that maxdeg-3 planar graphs can be drawn in polynomial area with SC2, but it is unknown for maxdeg-4planar graphs, as our algorithm requires exponential area. The graph classes admitting SC1-layouts have not been fully characterized. It was already known that Hamiltonian maxdeg-3planar and triconnected maxdeg-3 planar graphs always admit a SC1-layout, and we extendedthese results to biconnected maxdeg-4 outerplane graphs. It remains open whether there arelarger classes of graphs that admit SC1-layouts, such as maxdeg-4 outerplanar or maxdeg-3planar graphs. We strongly conjecture that it is NP-hard to decide whether a maxdeg-4 planargraph has an SC1-layout, but we struggled with some details in our attempt for a proof.

88

Page 97: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

6 Monotone Drawings of Trees

A natural requirement for the layout of a connected graph is that between any source vertexand any target vertex, there should be a source–target path that approaches the target accordingto some distance measure. A large body of literature deals with problems of this type; variousmeasures have been studied. For example, in a greedy drawing you can find a path to a targetvertex by iteratively selecting a neighbor that is closer to the target. In amonotone drawing,the distance between vertices (on the desired source-target path) is measured with respect totheir projections on some line, which may be different for any source–target pair. We say thata path P ismonotone with respect to a vector v if the orthogonal projection of the vertices of Pon every line with direction vector v appear on the line in the order induced by P. We alsorefer to v as a direction. In strongly monotone drawings, that line is always the line from sourceto target, and in upward drawings, the line is always the vertical line, directed upwards.In this chapter, we focus on monotone and strongly monotone drawings of trees with

additional aesthetic properties such as convexity or small area. Given a tree, we call the edgesincident to the leaves leaf edges and all other edges interior edges. Given a straight-line drawingof a tree, we substitute each leaf edge by a ray whose initial part coincides with the edge. Theembedding of the tree defines a combinatorial embedding of the tree, that is, the order of theedges around every vertex. The faces are then specified by this combinatorial embedding asleaf–leaf paths. If the faces of the augmented drawing are realized as convex non-overlapping(unbounded) polygonal regions, then we call the original drawing a convex drawing. If everyregion is strictly convex (that is, all interior angles are strictly less than π), we also call thedrawing strictly convex. Note that a convex drawing is also monotone [ACM89, ACB+12], buta monotone drawing is not necessarily convex. Strict convexity forbids vertices of degree 2.In this chapter, when we talk about (strongly) monotone drawings, this always includesthe planarity requirement. Otherwise, as Angelini et al. [ACB+12] observed, drawing anyspanning tree of the given graph in a (strongly) monotone way and inserting the remainingedges would yield a (strongly) monotone drawing of the graph.

Previous Work. Rao et al. [RRP+03] introduced the concept of greedy drawings for acoordinate-based routing algorithm that does not rely on location information. While any3-connected plane graph has a greedy drawing in the Euclidean plane [LM10] (even withoutcrossing [Dha10]), this is, unfortunately, not true for trees. Nöllenburg and Prutkin [NP13]gave a complete characterization for the tree case, which shows that no tree with a vertex ofdegree 6 or more admits a greedy drawing.

Alamdari et al. [ACG+13] studied a subclass of greedy drawings, so-called self-approachingdrawings which require that there always is a source–target path such that the distance de-creases for any triplet of intermediate points on the edges, not only for the vertices on the path.These drawings are based on the concept of self-approaching curves [IKL95].

Page 98: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 6 Monotone Drawings of Trees

Carlson and Eppstein [CE07] studied convex drawings of trees. They give linear-timealgorithms that optimize the angular resolution of the drawings, both for the fixed- andthe variable-embedding case. They observe that convexity allows them to pick edge lengthsarbitrarily, without introducing crossings.For monotone drawings, Angelini et al. [ACB+12] studied the variable-embedding case.

They showed that any n-vertex tree admits a straight-line monotone drawing on a grid ofsize O(n1.6) × O(n1.6) (using a BFS-based algorithm) or O(n) × O(n2) (using a DFS-basedalgorithm). They also showed that any biconnected planar graph has a monotone drawing(using exponential area). Further, they observed that not every planar graph admits a mono-tone drawing if its embedding is fixed. They introduced the concept of strong monotonicityand showed that there is a drawing of a planar triangulation that is not strongly monotone.Hossain and Rahman [HR14] improve some of the results of Angelini et al. by showing thatevery connected planar graph admits a monotone drawing of size O(n) × O(n2) and thatsuch a drawing can be computed in linear time.Both the BFS- and the DFS-based algorithms of Angelini et al. precompute a set of n − 1

vectors in decreasing order of slope by using two different partial traversals of the so-calledStern–Brocot tree, an infinite tree whose vertices are in bijection with the irreducible positiverational numbers. Such numbers can be seen as primitive vectors in 2d, that is, vectors withpairwise different slopes. Then, both algorithms do a pre-order traversal of the input tree.Whenever they hit a new edge, they assign to it the steepest unused vector. They place theroot of the input tree at the origin and draw each edge (u, v) by adding its assigned vector tothe position of u. They call such tree drawings slope-disjoint. We will not formally define thisnotion here, but it is not hard to see that it implies monotonicity.Angelini, with a different set of co-authors [ADK+13], investigated the fixed-embedding

case. They showed that, on the O(n) × O(n2) grid, every connected plane graph admits amonotone drawing with two bends per edge and any outerplane graph admits a straight-linemonotone drawing.

Our contribution. We present two main results. First, we show that any n-vertex treeadmits a strictly convex and, hence, monotone drawing on the O(n1.5) × O(n1.5) grid (seeSection 6.2). As the drawings of Angelini et al. [ACB+12], our drawings are slope-disjoint, butwe use a different set of primitive vectors (based on Farey sequences), which slightly decreasesthe grid size. (This also works for the BFS-based algorithm of Angelini et al.) Instead ofpre-order, we use a kind of in-order traversal (first child – root – other children) of the inputtree, which helps us to achieve convexity. Our ideas can be applied to modify the optimalangular resolution algorithm of Carlson and Eppstein [CE07] such that a drawing on anO(n1.5)×O(n1.5) grid is constructed at the expense of missing the optimal angular resolutionby a constant factor. Second, we show that any tree admits a stronglymonotone drawing (seeSection 6.3). So far, no positive results have been known for strongly monotone drawings.In the case of proper binary trees, our drawings are additionally strictly convex. For

biconnected outerplanar graphs, it is easy to construct strongly monotone drawings. Onthe other hand, we present a simply-connected planar graph that does not have a stronglymonotone drawing in any embedding.

90

Page 99: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Building Blocks: Primitive Vectors Section 6.1

Figure 6.1: The 13 primitive vectors obtained fromF6. The smallest angle of ≈ 1.14 is realizedbetween the vectors (4, 5) and (5, 6) marked with white dots; the best possible angularresolution in this case is 45/12 = 3.75.

6.1 Building Blocks: Primitive Vectors

The following algorithms require a set of integral vectors with distinct directed slopes andbounded length. In particular, we ask for a set of primitive vectors Pd = (x , y) ∣ gcd(x , y) ∈1, d, 0 ≤ x ≤ y ≤ d. Our goal is to find the right value of d such that Pd contains at least kprimitive vectors, where k is a number that we determine later. We can then use the reflectionson the lines x = y, y = 0 and x = 0 to get a sufficiently large set of integer vectors with distinctdirected slopes. The edges of the monotone drawings in Section 6.2 are translates of thesevectors; each edge uses a different vector.

Assume that we have fixed d and want to generate the set Pd . If we consider each entry(x , y) of Pd to be a rational number x/y and order these numbers by value, we get the FareysequenceFd (see, for example, Hardy andWright’s book [HW79]). The Farey sequence is wellunderstood. In particular, it is known that ∣Fd ∣ = 3d2/π2 +O(d log d) [HW79, Theorem 331].Furthermore, the entries of Fd can be computed in time O(∣Fd ∣). We remark that theset ⋃d Fd coincides with the entries of the Stern–Brocot tree. However, collecting the latterlevel by level is not the most effective method to build a set of primitive vectors for ourpurpose.To obtain a set of k primitive vectors, we use the first k entries of the Farey sequence Fd ,

for d ∶= 4⌈√k⌉, replacing each rational by its corresponding two-dimensional vector. We

select exactly k primitive vectors from this set which we denote by Vk ; see Figure 6.1.If we wish to have more control over the aspect ratio in our final drawing, we can pick

a set of primitive vectors contained inside a triangle spanned by the grid points (0, 0),(mx , 0), (mx ,my). By stretching the triangle and keeping its area fixed, we may end upwith fewer primitive vectors. This will result in an (only slightly) smaller constant compared tothe case mx = my . As proven by Bárány and Rote [BR06, Theorem 2], any such triangular do-main contains at leastmxmy/4 primitive vectors. This implies that we can adapt the algorithmeasily to control the aspect ratio by selecting the box for the primitive vectors accordingly. Forthe sake of simplicity, we detail our algorithms only for the most interesting case (mx = my).

91

Page 100: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 6 Monotone Drawings of Trees

Lemma 6.1. Let P ⊆ Pd be a set of k = ∣Pd ∣/c primitive vectors with no coordinate greaterthan d for some constant c ≥ 1. Then, any two primitive vectors of P are separated by an angleof Ω(1/k).

Proof. Since ∣Pd ∣ = 3d2/π2 + O(d log d), we have that 2d2 ≈ 2π2ck/3. Any line with slope mencloses an angle α with the x-axis, such that tan(α) = m. Let m1 and m2 be the slopes oftwo lines and let α1 and α2 be the corresponding angles with respect to the x-axis. By thetrigonometric addition formulas we have that the separating angle of these two lines equals

tan ϕ ∶= tan(α1 − α2) =tan α1 − tan α2

1 + tan α1 tan α2= m1 −m2

1 +m1m2.

For any two neighboring entries p/q and r/s in the Farey sequence, it holds that qr − ps =1 [HW79, Theorem 3.1.2], and therefore p/q and r/s differ by exactly (qr − ps)/(qs) = 1/(qs).As a consequence, tan ϕ = 1/(pr+qs). The angle ϕ isminimized if pr+qs ismaximized. Clearly,we have that pr+ qs < 2d2 ≈ 2π2ck/3. By the Taylor expansion, arctan(x) = x − x2ξ/(1+ ξ2)2for some value 0 ≤ ξ ≤ x. Substituting x with 3/(2π2ck) yields, for k ≥ 2, that

ϕ ≥ 32π2ck

− 9ξ4π4c2k2(1 + ξ2)2 >

32π2ck

− 94π4c2k2

∈ Ω(1/k).

Since the best possible resolution for a set of k primitive vectors is 2π/k, Lemma 6.1 showsthat the resolution of our set differs from the optimum by at most a constant. To estimate thisconstant, let us assume we use k = ∣Pd ∣ primitive vectors (that is, c = 1 in Lemma 6.1). Then,the smallest angle ϕ spanned by these vectors is, according to the proof of the previous lemma,at least 3/(2π2k) − 9/(16π4) for any k > 1. This value should be compared to opt = π/(4k)since the primitive vectors span an angle of π/4 in total. We obtain that the ratio ϕ/opt issmaller than 6.

6.2 Monotone Grid Drawings with Large Angles

In this section, we present a simplemethod for drawing a tree on a grid in a strictly convex, andtherefore monotone way. Lemma 6.2 shows that this drawing is automatically crossing-free.We name our strategy the inorder-algorithm. We start by ensuring that convex tree drawingsare crossing-free. This has already been stated by Carlson and Eppstein [CE07].

Lemma 6.2. Any convex straight-line drawing of a tree is crossing-free.

Proof. Let T be a tree and Γ a convex straight-line drawing of T . Assume that two edges e =(a, b) and e′ = (a′ , b′) are crossing in Γ in some point q, see Figure 6.2. Let w be the lowestcommon ancestor of b and b′, let πq be the pathw → q via a, and let π′q the pathw → q via a′.Let us assume that the children in w are ordered such that πq starts before π′q . Let Aq be theregion bounded by πq and π′q .We can assume that Aq is of minimum area with respect to other crossings we may have

chosen (and, hence, Aq has a connected interior). Now, we consider two paths starting fromw.

92

Page 101: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Monotone Grid Drawings with Large Angles Section 6.2

πq π′q

q

π`πr

p

Aq

Ap

w

e′ eb′ b

a

a′

Figure 6.2: An illustration of the situation in the proof of Lemma 6.2.

The first one, πℓ , starts with the first edge of πq and then always continues via the last childuntil it reaches a leaf. The second path, πr , starts with the first edge of π′q and continues alwaysusing the first child. Note that the polygonal chain πℓ together with πr forms a face fq of thegiven convex drawing of the tree. Hence, the face is convex, which means that πℓ and πr onlymeet in w. Furthermore, we either have πℓ /= πq or we have πr /= π′q since otherwise fq isself-intersecting. As a consequence, at least one of the two paths, say πℓ , enters and leaves Aq .Let p be the point where πℓ crosses πq for the first time, and let Ap be the polygon that isbounded by the parts of πq and πℓ betweenw and p. Then Ap has smaller area than Aq , whichcontradicts our assumption that Aq has minimum area.

Our inorder-algorithm first computes a reasonable large set of primitive vectors, thenselects a subset of these vectors, and finally assigns the slopes to the edges. The drawing isthen generated by translating the selected primitive vectors. In the following, an extendedsubtree will refer to a subtree including the edge leading into the subtree (if the subtree is notthe whole tree).

Wewill assign a number s(e) to every edge e. This number will refer to the rank of the edge’sslope (in circular order) in the final assignment. The rank assignment is done in a recursivefashion. At any time, let s be 1 plus the maximum rank s(e) assigned so far. Initially, s = 1.Let e = (u, v) be an edge (directed away from the root), and let v1 , v2 , . . . , vℓ be the childrenof v ordered from left to right. We recursively set the ranks of all edges in the extended subtreerooted at v1. Then, we set s(e) = s (which increases s by one). Finally, for i = 2, . . . , ℓ, we setthe ranks of the edges in the extended subtree rooted at v i . For an example of a tree with itsedge ranks, see Figure 6.3a.

Second, we assign actual slopes to the edges. Let e be an edge with s(e) = j. Then, we assignsome vector s j ∈ Z2 to e and draw e as a translate of s j . We pick the vectors s1 , s2 , . . . , sn−1 byselecting a sufficiently large set of primitive vectors and their reflections in counterclockwiseorder; see Section 6.1. Our drawing algorithm has the following requirements:

(R1) Edges that are incident to the root and consecutive in circular order are assigned tovectors that together span an angle less than π.

(R2) In every extended subtree hanging off the root, the edges (including the edge incidentto the root) are assigned to a set of vectors that spans an angle less than π.

93

Page 102: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 6 Monotone Drawings of Trees

1

2

4

3

5 7

6

8

9

10 12

11

13

14 15

(a) a tree with edge numbers s(⋅)

1

2

3

5

7

6

8

9

10

12

11

13 14

15

4

(b) our grid drawing of the tree

Figure 6.3: A strictly convex drawing of a tree.

These requirements can always be fulfilled, as the following lemma shows.

Lemma 6.3. We can select n − 1 vectors with distinct directed slopes from a [−d , d] × [−d , d]grid with d = 4⌈

√n⌉ such that the requirements (R1) and (R2) are fulfilled.

Proof. We first preprocess our tree by adding temporary edges at some leaves. These edgeswill receive slopes, but are immediately discarded after the assignment.

First, our objective is to ensure that the tree can be split up into three parts that all have nedges. In particular, we adjust the sizes of the extended subtrees hanging off the root by addingtemporary edges such that we can partition them into three sets of consecutive extendedsubtrees which all contain n edges. Note that we have to add 2n + 1 edges to achieve this.

Second, we define three cones C1, C2, and C3; see Figure 6.4. Each cone has its apex at theorigin and spans an angle of π/4. The angular ranges are C1 = [0, π/4], C2 = [3π/4, π], andC3 = [3π/2, 7π/4]; angles are measured from the x-axis pointing in positive direction. Notethat C2 is separated from the two other cones by an angle of π/2. As mentioned in Section 6.1,the set Vn contains n primitive vectors in the [0, d]× [0, d] grid. When reflected on the x = yline, these vectors lie in C1. Reflecting the vectors in C1, we further generate n vectors in C2and n vectors in C3. In every cone, we “need” at most n − 3 edges. Hence, we can remove thevectors on the boundary of each cone. After removing the temporary edges, the number ofvectors will drop from 3n to n − 1.

Now, we observe the following. Every two consecutive edges incident to the root lie inthe interiors of our cones. Given the sizes and angular distances of the cones, this yieldsrequirement (R1). Furthermore, any extended subtree is assigned slopes from a single cone.This yields (R2).

For the example tree of Figure 6.3a, it suffices to pick the 16 vectors that one gets fromreflecting the primitive vectors from the [0, 2] × [0, 2] grid. These vectors already fulfillrequirements (R1) and (R2). Hence, we do not have to apply the more involved slope selectionas described in Lemma 6.3. The resulting drawing is shown in Figure 6.3b.

Every face in the drawing contains two leaves. The leaves are ordered by their appearancein some DFS-sequenceD respecting some rooted combinatorial embedding of T . For a face f ,

94

Page 103: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Monotone Grid Drawings with Large Angles Section 6.2

C1

π/2

π/2

π/4

C2

C3

Figure 6.4: The cones that contain the slopes used in the algorithm.

we call the leaf that comes first inD the left leaf and the other leaf of f the right leaf of f . Theonly exception is the face whose leaves are the first and last child ofD. Here, we call the firstvertex inD the right leaf and the last vertex inD the left leaf.

Lemma 6.4. Let u be the left leaf, and let v be the right leaf of a face of T. Further, let w bethe lowest common ancestor of u and v. The above assignment of slope ranks s to the tree edgesimplies the following.

(a) If edge e1 is on the path w → u and edge e2 is on the path w → v, then s(e1) < s(e2).

(b) The ordered sequence of edges on the path w → u is increasing in s(⋅).

(c) The ordered sequence of edges on the path w → v is decreasing in s(⋅).

Proof. Let a be an edge that links the parent p to its child u, let b be the edge that links u to itsleftmost child, and let c be the edge that links u to its rightmost child; see Figure 6.5b. In theassignment, we first picked the slope in the subtree rooted at the leftmost children of u, then weselected the slope for a, and later we picked the slopes for the subtree rooted at the rightmostchildren of u. Since we select the slopes in their radial order, we have s(b) < s(a) < s(c).Now, note that the slopes on the path w → u have been assigned before the slopes on the

path w → v, which proves (a). When traversing the path w → u, we follow the rightmost chil-dren, except maybe for w’s child; see Figure 6.5a. Hence, the sequence of slopes is increasing,and (b) follows. Statement (c) follows by a similar argument: We traverse the path w → vby taking the leftmost child, except maybe for w’s child. Hence, the sequence of slopes isdecreasing.

We now prove the correctness of our algorithm.

Theorem 6.1. Given an embedded tree with n vertices (none of degree 2), the inorder-algorithmproduces a strictly convex and crossing-free drawing with angular resolution Ω(1/n) on a gridof size O(n1.5) × O(n1.5). The algorithm runs in O(n) time.

Proof. We first show that no face in the drawing is incident to an angle larger than π. Let fbe a face, let e and e′ be two consecutive edges on the boundary of f , and let α be the angle

95

Page 104: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 6 Monotone Drawings of Trees

w

p

u v

(a) paths spanned by u, v ,w

a

b c

(b) local assignments in the proof

Figure 6.5: Situation analyzed in Lemma 6.4.

formed by e and e′ in the interior of f . If e and e′ are incident to the root, requirement (R1)implies α < π. If both edges contain the lowest common ancestor of the leafs belonging to f ,then, by requirement (R2), also α < π. In the remaining case, e and e′ both lie on a path tothe left leaf of f , or both lie on a path to the right leaf of f . At vertex v, we have at least twooutgoing edges. Let e1 be the first outgoing edge and e2 be the last outgoing edge at v—one ofthe edges is e′. By the selection of the slope ranks, we have s(e1) < s(e) < s(e2). Consequently,the supporting line of e separates e1 and e2, and hence both faces containing e have an angleless than π at v. Therefore, it holds that α < π.Next, we show that the edges and rays of a face do not intersect. Then, by Lemma 6.2, no

edges will cross. Assume that there are two edges/rays ℓ and r in a common face that intersectin some point x. Let t be the lowest common ancestor of ℓ and r, and assume that ℓ lies on thepath to the left leaf and r on the path to the right leaf. We define a closed polygonal chain Pas follows. The chain starts with the path t → ℓ, continues via x to r, and finally returns to t.We direct the edges according to this walk (for measuring the directed slopes) and call theme1 , e2 , . . . , ek . We may assume that P is simple; otherwise, we find another intersection point.By Lemma 6.4, the slopes are monotone when we traverse P. For i = 1, . . . , k − 1, let α i be thedifference between the directed slopes of the edges e i and e i+1. Then, the sum∑i<k α i equalsthe angle between the slopes of e1 and ek . Due to requirement (R2), this angle is less than π.Let β i = π − α i be the angle between e i and e i+1 in P, and let β0 > 0 be the “interior” angleat t. We have that

∑0≤i<k

β i = β0 + ∑1≤i<k(π − α i) > 0 + (k − 1)π − π = (k − 2)π.

This, however, contradicts the fact that the angle sum of the polygon with boundary P is(k − 2)π. Thus, our assumption that two edges/rays cross was wrong.Since the drawing is assembled from n − 1 vectors whose absolute coordinates are at

most O(√n), the complete drawing uses a grid of dimension O(n1.5) × O(n1.5). Since

all vectors are reflections of (a subset of) vectors defined by a Farey sequence with at most nentries, Lemma 6.1 yields that the angular resolution is bounded by Ω(1/n).

We conclude this section with comparing our result with the drawing algorithm of Carlsonand Eppstein [CE07]. Their algorithm produces a drawing with optimal angular resolution. It

96

Page 105: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Strongly Monotone Drawings Section 6.3

draws trees convex, but, in contrast to our algorithm, not necessarily strictly convex. Allowingparallel leaf edges can have a great impact on the angular resolution. However, our ideascan be applied to modify the algorithm of Carlson and Eppstein. For the leaf edges, theiralgorithm uses a set of k slopes and picks the slopes such that they are separated by an angleof 2π/k. The slopes of interior edges have either one of the slopes of the leaf edges, or arechosen such that they bisect the wedge spanned by their outermost child edges. However,it suffices to assure that the slope of an interior edge differs from the extreme slopes in thefollowing subtree by at least 2π/(2k).We can now modify the algorithm as follows. We pick 2k/8 primitive vectors and reflect

them such that they fill the whole angular space with 2k distinct integral vectors. We use everyother vector of this set for the leaf edges. For an interior edge, we take any vector from ourpreselected set whose slope lies in between the extreme slopes of the edges in its subtree. Sincewe have sufficiently spaced out our set of primitive vectors, we can always find such a vector.Thus, we obtain a drawing on the O(n1.5) × O(n1.5) grid. Clearly, the drawing does not haveoptimal angular resolution. However, since we use 2k integral vectors having, by Lemma 6.1,an angular resolution of Ω(1/k), we differ from the best possible angular resolution 2π/k onlyby a constant factor.See Figure 6.6 for a comparison between our approach with that of Carlson and Epp-

stein [CE07] and that of Angelini et al. [ACB+12].

6.3 Strongly Monotone Drawings

In this section, we show how to draw trees in a strongly monotone fashion. We first show howto draw any proper binary tree, that is, any internal vertex has exactly two children. We nameour strategy the disk-algorithm. Then, we generalize our result to arbitrary trees. Further, weshow that connected planar graphs do not necessarily have a strongly monotone drawing.Finally, we show how to draw biconnected outerplanar graphs in a strongly monotone fashion.Note that the drawings computed by our algorithms require exponential area. However,Nöllenburg et al. [NPR14] have recently shown that exponential area is required for stronglymonotone drawings of trees, which justifies this area bound.Let T be a proper binary tree, let D be any disk with center c, and let C be the boundary

of D. Recall that a strictly convex drawing cannot have a vertex of degree 2. Thus, we considerthe root of T a dummy vertex and ensure that the angle at the root is π. We draw T inside D.We start by mapping the root of T to c. Then, we draw a horizontal line h through c and placethe children of the root on h ∩ int(D) such that they lie on opposite sites relative to c. Wecut off two circular segments by dissecting D with two vertical lines running through pointsrepresenting the children of the root. We inductively draw the right subtree of T into the rightcircular segment and the left subtree into the left circular segment.In any step of the inductive process, we are given a vertex v of T , its position in D (which

we also denote by v) and a circular segment Dv ; see Figure 6.7a. The preconditions for ourconstruction are that

(i) v lies in the relative interior of the chord sv that delimits Dv , and(ii) Dv is empty, that is, the interiors of Dv and Du are disjoint for any vertex u that does

not lie on a root–leaf path through v.

97

Page 106: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 6 Monotone Drawings of Trees

a

b

c d e f

g h

i j

k

l

m n o p

(a) tree with two dummy vertices

a

k

p

l

om

n

b

f cd

e

h gi

j

(b) drawing by Angelini et al. [ACB+12]

ba

c d

e

f

g

h

i

j

kl

m

n

o p

(c) drawing by Carlson and Eppstein [CE07]

a

k

b

c d

e

f

g

h

i

j

lp

on m

(d) drawing by our algorithm

Figure 6.6: Example tree of Angelini et al. [ACB+12], drawn by various algorithm. We treatthe degree-2 vertices as dummy vertices because of the degree restriction.

In order to place the two children l and r of v (if any), we shoot a ray v from v perpendicularto sv into Dv . Let v′ be the point where v hits C. Consider the chords that connect theendpoints of sv to v′. The chords and sv form a triangle with height vv′. The height iscontained in the interior of the triangle and splits it into two right subtriangles. The chordsare the hypotenuses of the subtriangles. We construct l and r by connecting v to these chordsperpendicularly. Note that, since the subtriangles are right triangles, the heights lie inside thesubtriangles. Hence, l and r lie in the relative interiors of the chords. Further, note that thecircular segments D l and Dr delimited by the two chords are disjoint and both are containedin Dv . Hence, D l and Dr are empty, and the preconditions for applying the above inductiveprocess to r and l with D l and Dr are fulfilled. See Figure 6.7b for the output of our algorithmfor a tree of height 3.

Lemma 6.5. For a proper binary tree rooted in a dummy vertex, the disk-algorithm yields astrictly convex drawing.

Proof. Let T be a proper binary tree and let f be a face of the drawing generated by the

98

Page 107: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Strongly Monotone Drawings Section 6.3

v

v′

l r

sv

Dv

Dr

Dl

(a) sketch of the inductive step

b

a

cv′

f

III

III IV

d

v

(b) output of our algorithm for a tree of height 3

Figure 6.7: Strongly monotone drawings of proper binary trees.

algorithm described above. Clearly, f is unbounded. Let a and b be the leaves of T that areincident to the two unbounded edges of f , and let v be the lowest common ancestor of aand b; see Figure 6.7b. Consider the two paths v → a and v → b. We assume that the pathfrom v through its left child ends in a and the path through its right child ends in b.Due to our inductive construction that uses disjoint disk sections for different subtrees, it

is clear that the two paths do not intersect. Moreover, each vertex on the two paths is convex,that is, the angle that such a vertex forms inside f is less than π. This is due to the fact that wealways turn right when we go from v to a, and we always turn left when we go to b. Vertex vis also convex since the two edges from v to its children lie in the same half-plane (boundedby sv).

It remains to show that the two rays a and b (defined analogously to v above) don’t intersect.To this end, recall that v′ = v ∩ C. By our construction, a and b are orthogonal to two chordsof C that are both incident to v′. Clearly, the two chords form an angle of less than π in v′.Hence, the two rays diverge, and the face f is strictly convex.

For the proof that the algorithm described above yields a strongly monotone drawing,we need the following tools. Let v1 and v2 be two vectors. We say that v3 lies between v1and v2 if v3 is a positive linear combination of v1 and v2. For two vectors v and w, wedefine ⟨v , w⟩ = ∣v∣∣w∣ cos(v , w) as the scalar product of v and w.Lemma 6.6. If a path p is monotone with respect to two vectors v1 and v2, then it is monotonewith respect to any vector v3 between v1 and v2.

Proof. Let v3 = λ1v1 + λ2v2 with λ1 , λ2 > 0. Assume that the path p is given by the sequenceof vectors w1 , w2 , . . . , wk . Since p is monotone with respect to vectors v1 and v2, we have that⟨v1 , w i⟩ > 0 and ⟨v2 , w i⟩ > 0 for all i ≤ k. This yields, for all i ≤ k,

⟨v3 , w i⟩ = ⟨λ1v1 + λ2v2 , w i⟩ = λ1⟨v1 , w i⟩ + λ2⟨v2 , w i⟩ > 0,

since λ1 , λ2 > 0. It follows that p is monotone with respect to v3.

Lemma 6.7. For a proper binary tree rooted in a dummy vertex, the disk-algorithm yields astrongly monotone drawing.

99

Page 108: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 6 Monotone Drawings of Trees

ab

d

ai−1

ai

AiA′i

A

B

Bm

Figure 6.8: Illustration of case 3 in the proof of Lemma 6.7.

Proof. We split the drawing into four sectors: I, II, III and IV; see Figure 6.7b. Let a and bbe two vertices in the graph. We will show that the path a → b in the output drawing ofour algorithm is strongly monotone. Let c be the root of the tree. Without loss of generality,assume that a lies in sector III. Then, we distinguish three cases.

Case 1: a and b lie on a common root–leaf path; see a and v in Figure 6.7b. Obviously, b liesin sector III. Without loss of generality, assume that b lies on the path a → c. By construction,all edges in sector III, seen as vectors directed towards c, lie between x = (0, 1) and y = (1, 0).Thus, all edges on the path a → b, and in particular ab, lie between x and y. Since x isperpendicular to y, the path a → b is monotone with respect to x and y. Following Lemma 6.6,the path a → b is monotone with respect to

Ð→ab, and thus strongly monotone.

Case 2: b lies in sector I; see a and d in Figure 6.7b. In Case 1, we have shown that the alledges on the path a → c lie between x = (0, 1) and y = (1, 0). Analogously, the same holdsfor the path c → b. Thus, the path a → b is monotone with respect to x and y and, followingLemma 6.6, strongly monotone.Case 3: a and b do not lie on a common root–leaf path, and b does not lie in sector I; see a

and b in Figure 6.7b. Let d be the lowest common ancestor of a and b. Let ⟨a = a0 , a1 , . . . , ak =d⟩ be the path d → a to a. Further, let ⟨d = b0 , b1 , . . . , bm = b⟩ be the path d → b. Finally, letp = ⟨ak , ak−1 , . . . , a0 , b1 , . . . , bm−1 , bm⟩ be the path a → b.Below, we describe how to rotate and mirror the drawing such that any vector ÐÐÐÐ→a i , a i−1,

1 ≤ i ≤ k lies between x = (0, 1) and y = (1, 0), and any vectorÐÐÐ→b j−1 , b j , 1 ≤ j ≤ m lies

between x and − y. This statement is equivalent to x(a i) < x(d) < x(b j), 1 ≤ i ≤ k, 1 ≤ j ≤ mand y(ak) < . . . < y(a1) < y(d) > y(b1) > . . . > y(bm); see Figure 6.8. If b lies in sectorIV, then d = c and this statement is true by construction. If b lies in sector II, then d is achild of c. We rotate the drawing by π/2 in counterclockwise direction and then mirror ithorizontally. If b lies in sector III, let p(d) be the parent of d. We rotate the drawing suchthat the edge (p(d), d) is drawn vertically. Recall that, by construction, the ray from d indirection

ÐÐÐ→p(d)d = − y separates the subtrees of the two children of d; see Figure 6.7a. Further,

the angle between any edge (directed away from d) in the subtree of d andÐÐÐ→p(d)d = − y is at

most π/2, that is, they are directed downwards.Let A i , 1 ≤ i ≤ k be the straight line through a i perpendicular to ÐÐÐ→a i−1a i . Let A′i be the

parallel line to A i that passes through a. Due to the x-monotonicity of p, the point a lies

100

Page 109: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Strongly Monotone Drawings Section 6.3

below A i . During the construction of the tree, the line A i defined a circular sector in whichthe subtree rooted at a i including a was exclusively drawn. It follows that a and b lie onopposite sites of A i . Thus, b lies above A i and also above A′i . Let B j , 1 ≤ j ≤ m be the straightline through b j perpendicular to

ÐÐÐ→b j−1b j . Let B′j be the parallel line to B j that passes through a.

By construction, b lies below B j and a lies above B j . Thus, b lies below B′j .Let A be the line A′i with maximum slope and let B be the line B′j with minimum slope.

First, we will show that the path is monotone with respect to the unit vector A on A directed tothe right. By choice of A, the angle between any edge (a i , a i−1), 1 ≤ i ≤ k and A is at most π/2.Recall that any vectorÐÐÐÐ→a i , a i−1, 1 ≤ i ≤ k, lies between x and y. Since A is perpendicular to oneof these edges and directed to the right, it lies between x and − y. Since any vectorÐÐÐ→b j−1 , b j ,1 ≤ j ≤ m, also lies between x and − y, the angle between A and these edges is at most π/2.Because the angle between A and any edge on the path a → b is at most π/2, the path ismonotone with respect to A.

Analogously, it can be shown that the path is monotone with respect to B. Recall that b liesabove A and below B. Hence, the vector

Ð→ab lies between A and B. Following Lemma 6.6, the

path is monotone with respect toÐ→ab and, thus, strongly monotone.

Lemmas 6.5 and 6.7 immediately imply the following.

Theorem 6.2. Any proper binary tree rooted in a dummy vertex has a strongly monotone andstrictly convex drawing.

Next, we (partially) extend this result to arbitrary trees.

Theorem 6.3. Any tree has a strongly monotone drawing.

Proof. Let T be a tree. If T has a vertex of degree 2, we root T in this vertex. Otherwise, wesubdivide any edge by creating a vertex of degree 2, which we pick as root. Then, we add aleaf to every vertex of degree 2, except the root. Now, let v be a vertex with out-degree k > 2.Let (v ,w1), . . . , (v ,wk) be the outgoing edges of v ordered from right to left. We substitute vby a path ⟨v = v1 , . . . , vk+1⟩, where v i+1 is the left child of v i , for i = 1, . . . , k. Then, wesubstitute the edges (v ,w i) by (v i ,w i), i = 2, . . . , k; see Figure 6.9.Let T ′ be the resulting proper binary tree. Clearly, all vertices of T ′, except its root, have

degree 1 or 3, so T ′ is a proper binary tree. We use Theorem 6.2 to get a strongly monotonedrawing ΓT′ of T ′. Then, we remove the dummy vertices inserted above and draw the edgesthat have been subdivided by a path as a straight-line. This yields a drawing ΓT of T that iscrossing-free since the only new edges form a set of stars that are drawn in disjoint areas ofthe drawing.Now, we show that ΓT is strongly monotone. Let (v ,w) be an edge in T . Let p = ⟨v =

v1 , . . . , vm = w⟩ be the path v → w in T ′. Suppose p is monotone with respect to somedirection d. Thus,∠ÐÐÐ→v iv i+1 , d < π/2 for 1 ≤ i ≤ m− 1. Clearly,Ð→vw = ∑m−1

i=1ÐÐÐ→v iv i+1 is a positive

linear combination of ÐÐÐ→v iv i+1 , i = 1, . . . ,m and, hence, ∠Ð→vw , d < π/2. It follows that thepath a → b for some vertices a, b in T is monotone with respect to a direction d in ΓT if thepath a → b is monotone to d in ΓT′ . With d =Ð→ab, it follows that ΓT is strongly monotone.

101

Page 110: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 6 Monotone Drawings of Trees

v

wk w1wi

(a) a tree T

v = v1

w1

wi

wk

vi

vk

vk+1

(b) the subdivided tree T ′

Figure 6.9: Subdivision of a vertex v with k outgoing edges.

We add to this another positive result concerning biconnected outerplanar graphs.

Theorem 6.4. Any biconnected outerplanar graph has a strongly monotone and strictly convexdrawing.

Proof. Let G be a biconnected outerplanar graph with outer cycle ⟨v1 , . . . , vn , v1⟩. We placethe vertices v2 , . . . , vn−1 in counterclockwise order on a quarter circle C that has v1 = (0, 0)and vn = (1, 1) as its endpoints; see Figure 6.10. Since the outer cycle is drawn strictly convex,the drawing is planar and strictly convex. Clearly, the path ⟨v1 , . . . , vn⟩ is x- and y-monotone.Also, every vectorÐ→v iv j , j > i lies between x = (0, 1) and y = (1, 0). Thus, by Lemma 6.6, thedrawing is strongly monotone.

We close with a negative result. Note that the graphs in the family that we construct areneither outerplanar nor biconnected.

Theorem 6.5. There is an infinite family of connected planar graphs that do not have a stronglymonotone drawing in any combinatorial embedding.

Proof. Let C be the graph that arises by attaching to each vertex of K4 a “leaf ”; see Figure 6.11.Let v1 , . . . , v4 be the vertices of K4. For K4 to be crossing-free, one of its vertices, say v1,

lies in the interior. Let w be the leaf incident to v1. Because of planarity, w has to beplaced inside a triangular face incident to v1. Without loss of generality, assume that wis placed in the face (v1 , v2 , v3). If the drawing is strongly monotone, then∠(Ð→wv2 ,Ð→wv1) < π/2and∠(Ð→wv1 ,Ð→wv3) < π/2, and thus∠(Ð→wv3 ,Ð→wv2) > π. However, this means that w does not lieinside the triangle (v1 , v2 , v3), which is a contradiction to the assumption. Thus, C does nothave a strongly monotone drawing in any combinatorial embedding. We create an infinitefamily from C by adding more leaves to the vertices of K4.

102

Page 111: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Concluding Remarks Section 6.4

C

v1

vn

Figure 6.10: A strongly monotone draw-ing of a biconnected outerplanar graph.

v1

v2 v3w

v4

Figure 6.11: A planar graph without anystrongly monotone drawing.

6.4 Concluding Remarks

We have shown that any tree has a monotone drawings on a grid with area O(n3) and astrongly monotone drawing, but several problems remain open. It is a common questionwhether we can combine the features in our two algorithms, that is, whether any tree has astronglymonotone drawing on a grid of polynomial size. Angelini et al. [ACB+12, Figure 18(b)]have constructed a drawing of a triangulation that is not strongly monotone. It is still openwhether there is also a triconnected (or biconnected) planar graph that does not have anystrongly monotone drawing. If yes, it is interesting whether this can be tested efficiently. Ifwe could show that our drawings for general trees are not just strongly monotone but alsoconvex (as in the proper binary case), then all Halin graphs would automatically have convexand strictly monotone drawings, too.

103

Page 112: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz
Page 113: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Part III

Crossings with Large Angles

Page 114: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz
Page 115: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

7 Simultaneous Drawing of PlanarGraphs with Right-Angle Crossings

A simultaneous embedding of two planar graphs embeds each graph in a planar way—usingthe same vertex positions for both embeddings. Edges of one graph are allowed to intersectedges of the other graph. There are two versions of the problem: In the first version, calledSimultaneous Embedding with Fixed Edges (Sefe), edges that occur in both graphs must beembedded in the same way in both graphs (and hence, cannot be crossed by any other edge).In the second version, simply called Simultaneous Embedding, these edges can be drawndifferently for each of the graphs. Both versions of the problem have a geometric variantwhere edges must be drawn using straight-line segments.

Simultaneous embedding problems have been investigated extensively over the last fewyears, starting with the work of Brass et al. [BCD+07] on simultaneous straight-line drawingproblems. Bläsius et al. [BKR13b] recently surveyed the area. For example, it is possible todecide in linear time whether a pair of graphs admits a Sefe or not, if the common graph is bi-connected [ABF+12] or if it has a fixed planar embedding [ABF+10]. Furthermore, Sefe can bedecided in polynomial time if each connected component of the common graph is biconnectedor subcubic [Sch13], or if it is outerplanar with cutvertices of degree at most 3 [BKR13a].

When actually drawing these simultaneous embeddings, a natural choice is to use straight-line segments. It is NP-hard to decide whether two planar graphs admit a geometric simul-taneous embedding [EBGJ+08]. This negative results holds even if one of the input graphsis a matching [CvL+11]. In fact, only very few graphs can be drawn in this way and someexisting results require exponential area. For instance, there exist a tree and a path whichcannot be drawn simultaneously with straight-line segments [AGKN12], and the algorithmfor simultaneously drawing a tree and a matching [CvL+11] does not provide a polynomialarea bound.

A way to overcome the restrictions of straight-line drawings is to allow edges to bend. Theresulting polyline drawings have been investigated by Haeupler et al. [HJL13]. They showedthat if the common graph is biconnected, then a drawing can be found in which one inputgraph has no bends at all and in the other input graph the number of bends per edge isbounded by the number of common vertices. Erten and Kobourov [EK05b] showed thatthree bends per edge and quadratic area suffice for any pair of planar graphs (without fixededges), and that one bend per edge suffices for pairs of trees. Kammer [Kam06] reduced therequired number of bends per edge to two for the general case of planar graphs. Grilli etal. [GHKR14] proved that every Sefe embedding of two graphs admits a drawing with nobends in the common edges and at most nine bends per exclusive edge. If the common graphis biconnected, they can reduce the number of bends to three per exclusive edge. In theseresults, however, the crossing angles can be very small.In this chapter, we suggest a new approach that overcomes the aforementioned problems.

We insist that crossings occur at right angles, thereby “taming” them. We do this while drawingall vertices and all bends on an integer grid of sizeO(n)×O(n) for any pair of planar n-vertexgraphs. In a way, our results give a measure for the geometric complexity of simultaneous

Page 116: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 7 Simultaneous Drawing of Planar Graphs with Right-Angle Crossings

Graph classes Number of bends Ref. Model

planar + planar 6 + 6 Theorem 7.1 RacSimsubhamiltonian + subhamiltonian 4 + 4 Corollary 7.1 RacSimouterplanar + outerplanar 3 + 3 Theorem 7.2 RacSim

cycle + cycle 1 + 1 Theorem 7.3 RacSefecaterpillar + cycle 1 + 1 Theorem 7.4 RacSefefour matchings 1 + 1 + 1 + 1 Theorem 7.5 RacSimtree + matching 1 + 0 Theorem 7.6 RacSefe

wheel + matching 2 + 0 Theorem 7.7 RacSefeouterpath + matching 2 + 1 Theorem 7.8 RacSefe

Table 7.1: A short summary of our results

embeddability for various combinations of graph classes, some of which can be combinedmore easily (that is, with fewer bends) and some not as easily (that is, with more bends).

LetG1 = (V , E1) andG2 = (V , E2) be two planar graphs defined on the same vertex set andlet n = ∣V ∣. We say that G1 and G2 admit a RAC simultaneous drawing (or, RacSim drawingfor short) if we can place the vertices on the plane such that:

(i) each edge is drawn as a polyline,

(ii) both graphs are drawn planar, and

(iii) crossings between edges in E1 and E2 occur at right angles.

G1 and G2 admit a RAC simultaneous drawing with fixed edges (or, RacSefe drawing forshort) if they admit a RacSim drawing and additionally:

(iv) common edges are represented by the same polylines.

Argyriou et al. [ABKS13] introduced and studied the geometric version of the RacSimdrawing problem. In particular, they proved that any pair of a cycle and a matching admits ageometric RacSim drawing on an integer grid of quadratic size, while there exist a wheel anda cycle that do not admit a geometric RacSim drawing. The problem that we study in thischapter was left as an open problem.

Closely related to the RacSim drawing problem is the problem of simultaneously drawinga (primal) embedded graph and its dual, so that the primal-dual edge crossings form rightangles. Brightwell and Scheinermann [BS93] proved that this is always possible if the inputgraph is triconnected planar. Erten and Kobourov [EK05a] presented anO(n)-time algorithmthat computes a simultaneous drawing of a triconnected planar graph and its dual on aninteger grid of size O(n) × O(n), where n is the total number of vertices in the graph and itsdual; their drawings, however, can have non-right angle crossings.

Our contribution. Our main result is that any pair of planar graphs admits a RacSimdrawing with at most six bends per edge. For pairs of subhamiltonian graphs and pairs of

108

Page 117: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

RacSim Drawings of General Graphs Section 7.1

outerplanar graphs, we can reduce the required number of bends per edge to four and three,respectively; see Section 7.1. (Recall that a subhamiltonian graph is a subgraph of a planarHamiltonian graph.) Then, we turn our attention to pairs of more restricted graph classeswhere we can guarantee RacSim and RacSefe drawings with one bend per edge or two bendsper edge; see Sections 7.2 and 7.3, respectively. Table 7.1 summarizes our results. Note that allour algorithms run in linear time, with the exception of the algorithm for an outerpath and amatching (see Theorem 7.8), which runs in O(n log n) time. The produced drawings fit oninteger grids of quadratic size. The main approach of all our algorithms is to find linear orderson the vertices of the two graphs and then to compute the exact coordinates of the vertices ofboth graphs based on these orders. These drawings may contain non-rectilinear segments(referred to as slanted segments, for short), but all crossings in our drawings appear betweenhorizontal and vertical edge segments and are therefore at right angle.

7.1 RacSim Drawings of General Graphs

In this section, we study general planar graphs and show how to efficiently construct RacSimdrawings in quadratic area, with few bends per edge. We prove that two planar graphs ona common set of vertices admit a RacSim drawing with six bends per edge (Theorem 7.1).We lower the required number of bends per edge to 4 for pairs of subhamiltonian graphs(Corollary 7.1), and to 3 for pairs of outerplanar graphs (Theorem 7.2). Note that the class ofsubhamiltonian graphs is equal to the class of 2-page book-embeddable graphs, and the classof outerplanar graphs is equal to the class of 1-page book-embeddable graphs [BK79].Central to our approach is an algorithm by Kaufmann and Wiese [KW02] that embeds

any planar graph such that vertices are mapped to points on a horizontal line (the so-calledspine) and each edge crosses the spine at most once; see Figure 7.1a. If one replaces each spinecrossing with a dummy vertex, then a linear order of the vertices (both original and dummy) isobtained with the property that every edge is either completely above or completely below thespine. In order to determine the exact locations of the vertices of the two given graphs in ourproblem, we use the linear order induced by the first graph to compute the x-coordinates andthe linear order induced by the second graph to compute the corresponding y-coordinates.(Note that this approach has been used for simultaneous drawing problems before [EK05b].)Then, we draw the edges of both graphs, so that all edges-crossings

(i) are restricted between vertical and horizontal edge-segments, that is, slanted edge-segments are crossing-free, and

(ii) appear in the interior of the smallest axis-aligned rectangle containing all vertices.

Theorem 7.1. Two planar graphs on a common set of n vertices admit a RacSim drawing onan integer grid of size (14n − 26) × (14n − 26) with six bends per edge. The drawing can becomputed in O(n) time.

Proof. Let G1 = (V , E1) and G2 = (V , E2) be planar graphs. For m ∈ 1, 2, let ξm be anembedding of Gm according to the algorithm of Kaufmann andWiese [KW02]; see Figure 7.1a.As explained before, we subdivide all edges of Gm that cross the spine in ξm by introducing adummy vertex at the point where it crosses the spine. LetG′m = (V ′m , E′m) = (V∪Vm ,Am∪Bm)

109

Page 118: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 7 Simultaneous Drawing of Planar Graphs with Right-Angle Crossings

(a)

vi

vi+1

(b)

Figure 7.1: (a) A drawing of a planar graph by Kaufmann and Wiese [KW02]. (b) Reservingadditional columns between two vertices.

be the resulting graph, whereVm is the set of dummy vertices in G′m , Am is the set of edges thatare drawn completely above the spine and Bm is the set of edges that are drawn completelybelow the spine. Let ξ′m be the embedding of G′m .Now we show how to determine the x-coordinates of the vertices in V ′1 by assigning the

vertices to the columns of a grid; the y-coordinates of the vertices in V ′2 are determinedanalogously. Let n′1 be the number of vertices in V ′1 and let v1 → v2 → ⋅ ⋅ ⋅→ vn′1 be the linearorder of the vertices of V ′1 along the spine in ξ′1. We start by placing v1. Between any twoconsecutive vertices v i and v i+1, we reserve several columns for the bends of the edges incidentto v i and v i+1. These are used as follows (in order); see Figure 7.1b.

(i) A column for the first bend on all edges in A2 leaving v i .

(ii) A column for each edge (v i , v j) ∈ E′1 with j > i.

(iii) A column for each edge (vk , v i+1) ∈ E′1 with k ≤ i.

(iv) A column for the last bend on all edges in B2 entering v i+1.

Note that we can save some columns reserved for ((ii)) and ((iii)), because an edge in A1 andan edge in B1 can use the same column for their bend.

With this procedurewe fully specify the x-coordinates of the vertices inV ′1 ; the y-coordinatesof the vertices in V ′2 are determined analogously. Let R be the smallest axis-aligned rectanglethat contains all vertices of the common vertex set of G′1 and G′2 (the gray rectangle of Fig-ure 7.2a). Note that the y-coordinates of the dummy vertices of V ′1 and the x-coordinates ofthe dummy vertices of V ′2 have not been determined by the algorithm so far. They can be setarbitrarily, as long as the corresponding vertices are inside R.

We proceed to describe how to draw the edges of graph G′1 with at most four bends per edgesuch that all edge segments of G′1 in R are either vertical or of y-length exactly 1; see Figure 7.2b.The edges of graph G2 are drawn analogously. First, we draw the edges (v i , v j) ∈ A1 with i < jin a nested order: When we draw the edge (v i , v j), there is no edge (vk , v l) ∈ A1 with k ≤ iand l ≥ j that has not already been drawn. Recall that the first column to the right and thefirst column to the left of every vertex is reserved for the edges in E2, hence we assume thatthey are already used. We draw (v i , v j) with at most four bends as follows. We start with aslanted segment incident to v i that has its other endpoint in the row above v i and in the firstunused column that does not lie to the left of v i . We follow with an upward vertical segment

110

Page 119: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

RacSim Drawings of General Graphs Section 7.1

25

29

1

5

9

21

13

17

211713951 25 29

R

(a) The graph of Figure 7.1a drawn by our algo-rithm with at most six bends per edge.

R

(b) The RacSim drawing of two planar graphs byour algorithm

Figure 7.2: A RacSim drawing of two planar graphs. The edges that cross the spine are drawndashed; the dummy vertices on these edges are drawn as squares.

that leaves R. We add a horizontal segment above R; the row of this segment is determined bythe nesting in the book embedding of G′1 . In the last unused column that does not lie to theright of v j , we add a vertical segment that ends one row above v j . We finish the edge with aslanted segment that has its endpoint in v j . We draw the edges in B1 symmetrically, with thehorizontal segment below R.

Note that this algorithm always uses the top and the bottom port of a vertex v if there is atleast one edge incident to v in A1 and B1 respectively. The edges incident to a dummy vertexuse precisely the top and the bottom port: Dummy vertices have exactly one incident edgein A1 and one in B1. We create a drawing of G1 and G2 with at most 6 bends per edge bybypassing (that is, smoothing out) the dummy vertices. This does not change the drawing.By construction, all edge segments of E1 inside R are either vertical segments or slanted

segments of y-length 1. Symmetrically, all segments of E2 inside R are either horizontalsegments or slanted segments of x-length 1. Thus, the slanted segments cannot intersect. Allcrossings inside R occur between a horizontal and a vertical segment, and thus form rightangles. Also, there are no segments in E1 that lie to the left or to the right of R, and there areno segments in E2 that lie above or below R. Hence, there are no crossings outside R, whichguarantees that the constructed drawing of G1 and G2 is a RacSim drawing.

We now count the columns used by the drawing. For the leftmost and the rightmost vertex,we reserve one additional column for its incident edges in E2; for the remaining vertices, wereserve two such columns. For each edge in E1, we use up to three columns: one for eachendpoint of the slanted segment at each vertex and one for the vertical segment that crossesthe spine, if it exists. Recall that at least one edge per vertex does not need a slanted segment.For each edge in E2, we need at most one column for the vertical segment to the side of R.Since there are at most 3n−6 edges, we need at most 3n−2+3 ⋅(3n−6)−n+3n−6 = 14n−26columns. By symmetry we need the same number of rows.

111

Page 120: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 7 Simultaneous Drawing of Planar Graphs with Right-Angle Crossings

The algorithm of Kaufmann and Wiese computes a drawing with at most 3 bends peredge in O(n) time. We can compute the nested order of the edges in linear time from theembedding, as the circular order of the edges around a vertex gives a hierarchical order onthe edges that describes the nested order of the edges. Thus, our algorithm also runs in O(n)total time.

We can improve the result of Theorem 7.1 for subhamiltonian graphs, which admit 2-pagebook embeddings inwhich no edges cross the spine [BK79]. Since those edges are the only onesthat need six bends, the number of bends per edge is reduced to four. The number of columnsand rows are also reduced by one per edge. This is summarized in the following corollary. Note,however, that it is NP-hard to decide whether a given planar graph is subhamiltonian, evenfor maximal planar graphs [Wig82]. A 2-page book embedding can be found in linear time,if the ordering of the vertices along the spine is given [HS99]. Several classes of graphs areknown to be (sub)hamiltonian, for example 4-connected planar graphs [NC08], planar graphswithout separating triangles [KO07], Halin graphs [CNP83], planar graphs with maximumdegree 3 or 4 [Hea85, BGR14].

Corollary 7.1. Two subhamiltonian graphs on a common set of n vertices admit a RacSimdrawing on an integer grid of size (11n−32)×(11n−32) with four bends per edge. The algorithmruns in O(n) time if the subhamiltonian cycles of both graphs are given.

We use even fewer bends for a RacSim drawing of two outerplanar graphs. This is basedon a decomposition of each of the graphs into two forests. The following lemma shows thatwe can do this in linear time.

Lemma 7.1. Every outerplanar graph can be decomposed into two forests. This decompositioncan be computed in linear time.

Proof. It follows by Nash-Williams’ formula [NW64] that every outerplanar graph has ar-boricity 2, that is, it can be decomposed into two forests. To prove the linear running time,we first assume biconnectivity and augment the input graph to a maximal outerplanar graph.Now, if we add a new vertex that is incident to all vertices of the graph, the result is a maximalplanar graph which can be decomposed into three trees [Fel04], so that one of them is a starincident to the newly added vertex. Hence, the removal of this vertex yields a decompositioninto two trees. The desired decomposition into two forests follows from the removal of theedges added to augment the graph to maximal outerplanar. For an outerplanar graph thatis not biconnected, we have to compute the aforementioned decomposition for each of itsbiconnected components individually. This forms a tree (a so-called BC-tree) and thereforedoes not affect the structure of the overall decomposition: It still consists of two forests. Theoverall the decomposition can be done in linear time, since both the decomposition of amaximal planar graph into three trees, and the computation of the biconnected componentsof the input outerplanar graph can be done in linear time.

With this lemma, we can further improve the required number of bends per edge to threefor outerplanar graphs. (Recall that all outerplanar graphs are 1-page book embeddable.) Wewill use the order of the vertices on the spine of a 1-page book embedding to compute a 2-pagebook embedding in which every edge uses a rectilinear port at one of its endpoints, enablingus to omit one of its bends.

112

Page 121: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

RacSim and RacSefe Drawings with One Bend per Edge Section 7.2

Theorem 7.2. Two outerplanar graphs on a common set of n vertices admit a RacSim drawingon an integer grid of size (7n − 10) × (7n − 10) with three bends per edge. The drawing can becomputed in O(n) time.

Proof. LetO1 = (V , E1) andO2 = (V , E2) be the given outerplanar graphs. We will embedO1 andO2 on two pages with one forest per page.To do so, we first create 1-page book embeddings forO1 and forO2 using the linear time

algorithm ofHeath [Hea87]. This gives the orders of the vertices of both graphs along the spine.It follows by Corollary 7.1 that, by using the algorithm described in the proof of Theorem 7.1,we can create a RacSim drawing ofO1 andO2 with at most four bends per edge. We will nowshow how to adjust the algorithm to reduce the number of bends by one.We decomposeO1 into two forests A1 and B1 according to Lemma 7.1. We will draw the

edges of A1 above the spine and the edges B1 below the spine. By rooting the trees in A1 inarbitrary vertices, we can direct each edge such that every vertex has exactly one incomingedge. Recall that, in the drawing produced in Theorem 7.1, one edge per vertex can use its topport. We adjust the algorithm such that every directed edge (v ,w) enters vertex w from itstop port. To do so, we draw the edge as follows. We start with a slanted segment of y-length 1.We follow with a vertical segment to the top, a horizontal segment that ends directly above w,and finish the edge with a vertical segment that enters w in the top port. We use the sameapproach for the edges in B1, using the bottom port and treat the second outerplanar graphO2analogously.Since every port of a vertex is only used once, the drawing has no overlaps. We now

analyze the number of columns used. For every vertex except for the leftmost and rightmost,two additional columns are reserved for the edges in E2; for the remaining two vertices,we reserve a single additional column. The edges in E1 now only need one column for thebend of the single slanted segment. For every edge in E2, we need up to one column forthe vertical segment to the side of R. Since there are at most 2n − 4 edges, our drawingneeds 3n−2+2n−4+2n−4 = 7n− 10 columns. Analogously, we can show that the algorithmneeds 7n − 10 rows. Since the decomposition can be computed in O(n) time, our algorithmalso requires O(n) time.

7.2 RacSim and RacSefe Drawings with One Bend perEdge

In this section, we study simple classes of planar graphs and show how to efficiently constructRacSim and/or RacSefe drawings with one bend per edge in quadratic area. In particular, weprove that two cycles (four matchings, resp.) on a common set of n vertices admit a RacSefe(RacSim, resp.) drawing on an integer grid of size 2n × 2n; see Theorem 7.3 (Theorem 7.5,resp.). If the input to our problem is a caterpillar and a cycle, then we can compute a RacSefedrawing with one bend per edge on an integer grid of size (2n − 1) × 2n; see Theorem 7.4. Fora tree and a cycle, we can construct a RacSefe drawing with one bend per tree edge and nobends in the matching edges on an integer grid of size n × (n − 1); see Theorem 7.6.

Lemma 7.2. Two paths on a common set of n vertices admit a RacSefe drawing on an integergrid of size 2n × 2n with one bend per edge. The drawing can be computed in O(n) time.

113

Page 122: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 7 Simultaneous Drawing of Planar Graphs with Right-Angle Crossings

1

3

5

7

9

11

1197531

v1

v2

v4

v6

v5

v3

(a) Two paths: P1 (solid) and P2 (dashed)

1

3

5

7

9

11

1197531

v1

v2

v4

v6

v5

v3

(b) Two cycles: C1 (solid) and C2 (dashed). Theclosing edges are drawn in bold.

Figure 7.3: RacSefe drawings with one bend per edge

Proof. Let P1 = (V , E1) and P2 = (V , E2) be the given paths. To keep the descriptionsimple, we first assume that P1 and P2 do not share edges. Following standard practicesfrom the literature (see for example Brass et al. [BCD+07]), we draw P1 x-monotone and P2y-monotone. This ensures that the drawing of the paths will individually be planar. We willnow describe how to compute the exact coordinates of the vertices and how to draw the edgesof P1 and P2, such that all crossings are at right angles and, more importantly, that no edgesegments overlap.

For m ∈ 1, 2 and any vertex v ∈ V , let πm(v) be the position of v in Pm . Then, v is drawnat the point p(v) = (2π1(v) − 1, 2π2(v) − 1); see Figure 7.3a. It remains to be determinedwhere the bend is in each edge e = (v , v′). First, assume that e ∈ E1 and e is directed fromits left endpoint, say v, to its right endpoint, say v′. Then we place the bend to the left of v′,and one row above or below it depending on which direction the edge is coming from. Tobe exact, we place it at p(v′) − (2, sgn(y(v′) − y(v))). Second, assume that e ∈ E2 and e isdirected from its bottom endpoint, say v, to its top endpoint, say v′. Then, we place the bendat p(v′) − (sgn(x(v′) − x(v)), 2).

The area required by the drawing is (2n− 1)×(2n− 1). An edge ofP1 leaves its left endpointvertically and enters its right endpoint with a slanted segment of x-length 1 and y-length 2.Similarly, an edge of P2 leaves its bottom endpoint horizontally and enters its top endpointwith a slanted segment of x-length 2 and y-length 1. Hence, the slanted segments cannot beinvolved in crossings or overlaps. Since P1 and P2 are x- and y-monotone, respectively, itfollows that all crossings must involve a vertical edge segment of P1 and a horizontal edgesegment of P2, which is at right angle. The runtime is clearly linear.Finally, we show that our algorithm supports the Sefemodel. Assume that P1 = (V , E1)

and P2 = (V , E2) share edges, and let e = (v , v′) be an edge that belongs to both input paths.Our algorithm automatically places v and v′ at consecutive x- and y-coordinates and draws e

114

Page 123: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

RacSim and RacSefe Drawings with One Bend per Edge Section 7.2

as a diagonal of x- and y-length 2 in both graphs, which cannot be involved in a crossing.

We say that an edge uses the bottom/left/right/top port of a vertex if it enters the vertexfrom the bottom/left/right/top.

Theorem 7.3. Two cycles on a common set of n vertices admit a RacSefe drawing on an integergrid of size 2n× 2n with at most one bend per edge. The drawing can be computed in O(n) time.

Proof. Let C1 = (V , E1) and C2 = (V , E2) be the given cycles and assume first that C1 and C2 donot share edges. Let v ∈ V be an arbitrary vertex. We temporarily delete one edge (v ,w1) ∈ E1from C1 and one edge (v ,w2) ∈ E2 from C2 (refer to the bold-drawn edges of Figure 7.3b).This results into two paths P1 = ⟨v , . . . ,w1⟩ and P2 = ⟨v , . . . ,w2⟩. We use the algorithmfrom Lemma 7.2 to construct a RacSim drawing of P1 and P2 on an integer grid of size(2n − 1) × (2n − 1). Since v is the first vertex in both paths, it is placed at the bottom-leftcorner of the bounding box containing the drawing. Sincew1 andw2 are the last vertices inP1and P2, respectively, w1 is placed on the right side, and w2 on the top of the bounding box.By construction, the bottom port of w1 and the left port of w2 are both unoccupied. Hence,the edges (v ,w1) and (v ,w2) that form C1 and C2 can be drawn with a single bend at points(2n− 1, 0) and (0, 2n− 1) respectively; see Figure 7.3b. Since both edges are completely outsideof the bounding box containing the drawing, neither is involved in crossings. The total area ofthe drawing gets larger by a single unit in each dimension. The runtime bound is unaffected.

It remains to consider the case that C1 and C2 share edges. Since P1 and P2 already supportthe Sefemodel, it suffices to consider the case that a closing edge (v ,w1) or (v ,w2) is alsocontained in the other graph. Since the closing edges are drawn planar, we can simply usetheir drawing in both graphs and remove the corresponding edge from the path. Thus, thedrawing supports the Sefemodel.

Theorem 7.4. A caterpillar and a cycle on a common set of n vertices admit a RacSefe drawingon an integer grid of size (2n − 1)× 2n with one bend per edge. The drawing can be computed inO(n) time.

Proof. Let A = (V , EA) be the given caterpillar and C = (V , EC) the given cycle. Similarto the previous proofs, we will first prove thatA and C admit a RacSim drawing, assumingthat they do not share edges. We postpone the case whereA and C share edges for later. Acaterpillar can be decomposed into a path, called its spine, and a set of leaves connected to thepath, called its legs. Let v1 , v2 , . . . , vn be the vertex set ofA ordered as follows (see Figure 7.4):Starting from an endpoint of the spine ofA, we traverse the caterpillar such that we visit alllegs incident to a spine vertex before moving on to the next spine vertex. This order definesthe x-order of the vertices in the output drawing.

As in the proof ofTheorem 7.3, we temporarily delete an edge of C incident to v1 (see the bolddashed edge in Figure 7.4) and obtain a path which we denote by P = (V , EP). For any vertexv i ∈ V , let π(v i) be the position of v i in P . The map π determines the y-order of the verticesin our drawing. For i ∈ 1, 2, . . . , n, we draw vertex v i at point p(v i) = (2i − 1, 2π(v i)− 1). Itremains to be determined where the bend is in each edge e = (v , v′). First, assume that e ∈ EPand e is directed from its bottom endpoint, say v, to its top endpoint, say v′ (see the thindashed edges in Figure 7.4). Then, we place the bend at p(v)+(sgn(x(v′)−x(v)), 2). Second,

115

Page 124: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 7 Simultaneous Drawing of Planar Graphs with Right-Angle Crossings

1

3

5

7

9

21

19

11

13

15

17

23

1197531 13 15 17 19 21 23

v2

v3

v4

v6

v7

v8

v9v10

v12

v11

v5

v1

Figure 7.4: A RacSefe drawing of a caterpillar (solid; its spine is drawn bold) and a cycle(dashed)

assume that e ∈ EA and e is directed from its left endpoint, say v, to its right endpoint, say v′(see the solid edges in Figure 7.4). Then, we place the bend at (x(v′), y(v)+sgn(y(v′)− y(v)).

The approach described above ensures that P is drawn y-monotone, hence planar. Thespine of A is drawn x-monotone. The legs of a spine vertex of A are drawn to the right oftheir parent spine vertex and to the left of the next vertex along the spine. Hence,A is drawnplanar as well. The slanted segments ofA have y-length 1, while the slanted segments of Phave x-length 1. Thus, they cannot be involved in crossings, which implies that all crossingsform right angles.It remains to draw the edge e in EC ∖ EP . Recall that e is incident to v1, which lies at the

bottom-left corner of the bounding box containing our drawing. Let v j be the other endpointof e. Since π(v j) = n, vertex v j lies at the top of the bounding box. As the top port of v1 is notused, we can draw the first segment of e vertical, bending at (1, 2n); see the bold dashed edgein Figure 7.4.

To complete the proof of this theorem, it remains to show that our algorithm supports theSefe model. Suppose that there is an edge e = (v , v′) that belongs to both A and C. Ouralgorithm places v and v′ at consecutive y-coordinates. Thus, the drawing of e inA consistsof a slanted and a vertical segment of y-length 1 each. This drawing of e inA is not crossed byany edge of EC , so e can be drawn in the same way for both graphs.

Clearly, the total area required by the drawing is (2n− 1)×2n and the runtime is linear.

Theorem 7.5. Four matchings on a common set of n vertices admit a RacSim drawing on aninteger grid of size 2n × 2n with at most one bend per edge. The drawing can be computed inO(n) time.

Proof. LetM1 = (V , E1),M2 = (V , E2),M3 = (V , E3) andM4 = (V , E4) be the givenmatchings. Without loss of generality, we assume that all matchings are perfect; otherwise,

116

Page 125: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

RacSim and RacSefe Drawings with One Bend per Edge Section 7.2

1197531 13 15 17 19 21 23

1

3

5

7

9

21

19

11

13

15

17

23

v2

v3

v4

v6

v7

v8

v9

v10

v12

v11

v5

v1

Figure 7.5: A RacSim drawing of four matchings M1 (solid-plain), M2 (solid-bold),M3 (dashed-plain) andM4 (dashed-bold)

we augment them to perfect matchings. LetM1,2 = (V , E1 ∪ E2) andM3,4 = (V , E3 ∪ E4).SinceM1 andM2 are defined on the same vertex set,M1,2 is a 2-regular graph. Thus, eachconnected component ofM1,2 corresponds to a cycle of even length which alternates betweenedges ofM1 andM2; see Figure 7.5. The same holds forM3,4. We will determine thex-coordinates of the vertices fromM1,2, and the y-coordinates fromM3,4.We start by choosing an arbitrary vertex v ∈ V . Let C be the cycle ofM1,2 containing

vertex v. We determine the x-coordinates of the vertices of C by traversing it in some direction,starting from vertex v. For each vertex u in C, let π1(u) be the discovery time of u accordingto this traversal, with π1(v) = 0. We set x(u) = 2π1(u) + 1. After doing this, we determinethe y-coordinates of all vertices that lie on cycles inM3,4 that contain at least one vertex of C(that is, cycles inM3,4 that contain a vertex for which the x-coordinate has been determined).Call these cycles C1 , . . . , Ck , ordered as follows. For i ∈ 1, . . . , k, let a i be the anchorof Ci , that is, the vertex with the smallest determined x-coordinate of all vertices in Ci .Then, x(a1) < . . . < x(ak). In what follows, we start with the first cycle C1 of the computedorder and determine the y-coordinates of its vertices. To do so, we traverseC1 in some direction,starting from its anchor vertex a1. For each vertex u in C1, let π2(u) be the discovery timeof u according to this traversal, with π2(a1) = 0. Then, we set y(u) = 2π2(u) + 1. We proceedanalogously with the remaining cycles Ci , i = 2, . . . , k, setting π2(a i) = maxu∈Ci−1 π2(u) + 1.

After this step, there are no vertices for which only the x-coordinate has been determined.However, there might exist vertices where only the y-coordinate has been determined. If thisis the case, we repeat the aforementioned procedure to determine the x-coordinates of thevertices of all cycles ofM1,2 ∖ C that have at least one vertex with a determined y-coordinate,but without determined x-coordinates. If there are no vertices with only one determinedcoordinate left, either all coordinates are determined, or we restart this procedure with another

117

Page 126: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 7 Simultaneous Drawing of Planar Graphs with Right-Angle Crossings

arbitrary vertex that has no determined coordinates. Thus, our algorithm guarantees that thex- and y-coordinate of all vertices are eventually determined.Note that for each cycle inM1,2 there is exactly one edge e = (v , v′)with π1(v′) > π1(v)+ 1.

We call this the closing edge. Analogously, for each cycle inM3,4, there is exactly one closingedge e = (u, u′) with π2(u′) > π2(u) + 1.It remains to be determined where the bend is in each edge e = (v , v′). First, assume

that e ∈ E1∪E2 and e is directed from its left endpoint, say v, to its right endpoint, say v′. If e isnot a closing edge, we place the bend at (x(v′)− 2, y(v′)− sgn(y(v′)− y(v)). Otherwise, weplace the bend at (x(v′), y(v)− 1). Second, assume that e ∈ E3 ∪ E4 and e is directed from itsbottom endpoint, say v, to its top endpoint, say v′. If e is not a closing edge, we place the bendat (x(v′)− sgn(x(v′)− x(v)), x(v′)− 2). Otherwise, we place the bend at (x(v)− 1, y(v′));see Figure 7.5.Our choice of coordinates guarantees that the x-coordinates of the cycles ofM1,2 and

the y-coordinates of the cycles ofM3,4 form disjoint intervals. Thus, the area below a cycleofM1,2 and the area to the left of a cycle ofM3,4 are free from vertices. Hence, the slantedsegments of the closing edges cannot have a crossing that violates the RAC restriction. Thetotal area required by the drawings is 2n × 2n. The running time is linear.

Theorem 7.6. A tree and a matching on a common set of n vertices admit a RacSefe drawingon an integer grid of size n × (n − 1) with one bend per tree edge and no bends on matchingedges. The drawing can be computed in O(n) time.

Proof. We use an algorithm inspired by the algorithm for drawing a geometric simultaneousembedding of a tree and a matching by Cabello et al. [CvL+11]; see Figure 7.6. We first considerthe case where the input graphs do not share edges. We root the given tree in an arbitrary leaf,getting a directed tree T . We will obtain the x-coordinates of the vertices from a particularpost-order traversal of this directed tree. As a consequence, all children of a vertex are placedto its left, and disjoint subtrees are placed in disjoint x-intervals. We augment the givenmatching to a perfect matchingM by adding dummy edges. After the algorithm terminates,these dummy edges can be safely removed.Each edge ofM is drawn horizontally at a unique odd y-coordinate between 1 and n − 1.

The coordinates are determined as follows. In every step, our algorithm picks an edge andputs it either into the top group, or into the bottom group. Within the top group, the edgesare assigned to odd rows, from top to bottom, starting from row n − 2 if n is odd, or n − 1otherwise. In the bottom group, the edges are also assigned to odd rows, but from bottomto top, starting from row 1. In this way, a matching edge is always assigned to an odd rowbetween 1 and n− 1. Once this procedure assigned an edge to a row, the edge and its endpointsare called placed.

Our algorithm starts by putting the matching edge containing the root of the tree in the topgroup and then proceeds as follows. We partition the edges of the tree into a set of subtrees,called ropes, by removing the edges between two placed vertices. If there exists a subtreewith three placed vertices, we call the vertex that lies on all three paths between these placedvertices a splitter; see Figure 7.7a. If the algorithm encounters a splitter, it selects the matchingedge incident to the splitter, and places it next. Since a splitter is, by definition, unplaced, thatedge can always be picked. If there is no splitter, the algorithm finds an unplaced vertex thathas a tree edge to a placed vertex, and adds its matching edge to the top group: This creates

118

Page 127: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

RacSim and RacSefe Drawings with One Bend per Edge Section 7.2

1197531 13 15 17 19 21 23

1

3

5

7

9

21

19

11

13

15

17

23

Figure 7.6: A RacSefe drawing of a tree (solid) and a matching (dashed)

v

(a) The placed vertices (black) in-duce three ropes, v is a splitter.

v

vwTj(v)

w

Tj(v)

(b) Vertex w has been placed at the top in the previous step,creating a splitter v which is now placed at the bottom.

Figure 7.7: Definition and placement of a splitter.

at most one splitter, since one of the placed vertices is adjacent to a vertex that was alreadyplaced.

It has been shown by Cabello et al. [CvL+11] that placing a vertex creates at most one splitter,and that placing a splitter does not create a new one. In every step of the algorithm, we placetwo vertices. The first one is either a splitter, or adjacent to a placed vertex; thus, it cannotcreate a new splitter. Hence, when we place a new matching edge, there will be at most onesplitter in the graph.

First, we describe how to determine whether to add a matching edge that contains a splitterto the top, or the bottom group. Assume that vertex v is a splitter. Since we start by drawingthe root, every vertex lies in a subtree that has its local root placed. Let T1(v), . . . , Tk(v)be the subtrees rooted in the children of v. Then, v is a splitter if and only if there are twosubtrees Ti(v) and Tj(v) with at least one placed vertex, one of which has been placed in thelast step. Without loss of generality, let w ∈ Ti(v) be this vertex. If w was added to the topgroup, we add v to the bottom group; otherwise, we add it to the top group. Thus, the verticesof all trees Tl(v) with l ≠ j will be placed on the same side (with respect to the y-coordinate)of v; see Figure 7.7b.

119

Page 128: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 7 Simultaneous Drawing of Planar Graphs with Right-Angle Crossings

Second, we describe how to determine the x-coordinates of the vertices, which happensinductively. To that end we will compute, for each non-leaf vertex, an order for the subtreesthat are rooted in the children of this vertex. This order determines the disjoint intervalson the x-coordinates that the vertices in these subtrees will use. Let v be a vertex that isplaced in an induction step. We traverse the path from v to the root of the rope it lies on. Forevery vertex u on this path, we determine the order of the subtrees of its children as follows.Let T1(u), . . . , Tk(u) be the subtrees rooted in the children of u, with v ∈ T1(u). If v is theonly placed successor of vertex u, then we assign the order x(T1(u)) < . . . < x(Tk(u)) onthe x-coordinates of the subtrees; otherwise, an order has already been determined. Whenthe algorithm is done, we know the order of the subtrees for every vertex on this path, andparticularly the x-interval the subtree rooted in v lies in. We assign the highest x-coordinateof this interval to v.Now, we show how to draw the edges. Let (u, v) be a directed edge of T . We draw (u, v)

with one slanted segment of y-length 1 at vertex u, and a vertical segment at vertex v. Since wedraw the edges of the matching horizontally without bends, and since the slanted segmentsare drawn between two consecutive horizontal grid lines, there can only be crossings betweenvertical segments of the tree and horizontal segments of the matching. Thus, all crossingsbetween the tree and the matching are at right angle.It remains to show that the drawing of the tree is itself planar. Since the drawing of the

tree consists of vertical segments and slanted segments of y-length 1, any intersection has tobe between a slanted and a vertical segment. Let v be a vertex of the tree. We will show thatthe outgoing edges of v do not induce a crossing. Since the subtree rooted in v is assignedan x-interval that contains no vertices that do not lie in its subtree, crossing can only occurbetween edges of this subtree. Consider the step of the algorithm in which v is placed.First, assume that v is not a splitter. If no successor of v has been placed so far, then all

successors of v will be placed on the same side of v, with respect to the y-coordinate, andtherefore do not induce a crossing. Otherwise, let T1(v), . . . , Tk(v) be the subtrees rootedin the children of v. By construction, all placed successors of v are located in the samesubtree T1(v), and T1(v) is placed to the left of the other subtrees rooted in a child of v. Thus,no edge incident to v is drawn inside the x-interval assigned to Ti(v), with 2 ≤ i ≤ k. Thevertices in the other subtrees are yet to be placed, so they will all be on the same side of v,with respect to the y-coordinate, and therefore not induce a crossing.

Now, assume that v is a splitter. Then, there is a vertex u that was placed in the previousstep and lies in the same rope as v. Further, there is one subtree T1(v) rooted in a child of v inwhich at least one vertex has been placed before u. By construction, T1(v) is placed to theleft of the other subtrees rooted in a child of v. Recall that v is placed in the group oppositeof u. Thus, u and all unplaced successors of v lie on the same side of v and therefore will notinduce a crossing. This concludes the proof of planarity.

Nowwe show that our algorithm supports the Sefemodel. Suppose that there is an edge e =(v , v′) that belongs to both input graphs. Without loss of generality, assume that x(v′) > x(v).Our algorithm places v and v′ at the same y-coordinate. Thus, the drawing of e in T consistsof a slanted segment that starts at v′ and ends at v − (0, 1), followed by a vertical segmentof y-length 1. Following the proof above, this edge is not crossed by any tree edge. Sincethe matching edges are drawn horizontally between two vertices, there is also no crossingbetween e and a matching edge. Thus, this drawing can be used for both graphs.

120

Page 129: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

RacSefe Drawings with Two Bends per Edge Section 7.3

Finally, we prove the area and running time bounds. We place each matching edge in aunique odd row between 1 and (n− 1). Thus, our drawing needs at most (n− 1) rows. In everycolumn, we place exactly one vertex, so the drawing needs n columns. As for the runningtime, the algorithm to place the vertices clearly requires only constant time per vertex, withthe exception of traversing the tree upwards to determine the x-order of the subtrees. Forthat, however, we traverse every edge only once, since we stop at the first placed vertex. Thus,the running time of the algorithm is linear.

7.3 RacSefe Drawings with Two Bends per Edge

In this section, we study slightly more complex classes of planar graphs, and show howto efficiently construct RacSefe drawings with two bends per edge, in quadratic area. Inparticular, we prove that a wheel and a matching on a common set of n vertices admit aRacSefe drawing on an integer grid of size (1.5n − 1) × (n + 2) with two bends per wheeledge and no bends on matching edges; see Theorem 7.7. An outerpath (that is, an outerplanargraph whose weak dual is a path) and a matching admit a RacSefe drawing with two bendsper outerpath edge and one bend per matching edge. They also need a slightly larger grid,namely one of size (3n − 2) × (3n − 2); see Theorem 7.8.

Theorem 7.7. A wheel and a matching on a common set of n vertices admit a RacSefe drawingon an integer grid of size (1.5n − 1) × (n + 2) with two bends per wheel edge and no bends onmatching edges, respectively. The drawing can be computed in O(n) time.

Proof. LetW = (V , EW) be the given wheel andM = (V , EM) the given matching. A wheelcan be decomposed into a cycle, called its rim, a center vertex, called its hub, and a set ofedges that connect the hub to the rim, called its spikes. First, we consider the simpler caseaccording to whichW andM do not share edges (clearly, in this case the hub of the wheelcannot be incident to a matching edge). Let V = v1 , v2 , . . . , vn, such that v1 is the hub ofW and C = ⟨v2 , v3 , . . . , vn , v2⟩ is the rim ofW in this order. Thus, EW = (v i , v i+1) ∣ i =1, . . . , n − 1 ∪ (vn , v2) ∪ (v1 , v i) ∣ i = 2, . . . , n. LetM′ = (V , EM′) be the matchingMwithout the edge incident to v1.

We first compute the x-coordinates of the vertices. We do this such that C − (vn , v2)is x-monotone; see Figure 7.8. More precisely, for i ∈ 2, . . . , n, we set x(v i) = 2i − 3. They-coordinates of the vertices are computed based on the matchingM′ as follows. Let EM′ =e1 , . . . , ek be the matching edges, indexed such that v2 is incident to e1. For j ∈ 1, . . . , k,we assign the y-coordinate 2 j−1 to the endpoints of e j . Next, we assign the y-coordinate 2k+1to the vertices incident to the rim without a matching edge inM′. Finally, the hub v1 ofW islocated at point (1, 2k + 3).

It remains to place the bend of each edge e ∈ EW ; the edges inM′ are drawn without bends.First, let e = (v1 , v i), i ∈ 3, . . . , n be a spike. Then, we place the bend at (x(v i), 2k + 2).Since both v1 and v2 are located in column 1, we can save the bend of the spike (v1 , v2). Second,let e = (v i , v i+1), i ∈ 2, . . . , n − 1 be an edge of the rim C. We place the bend according tothe following case distinction.

(i) If y(v i+1) > y(v i), we place the bend at (x(v i+1), y(v i) + 1).

121

Page 130: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 7 Simultaneous Drawing of Planar Graphs with Right-Angle Crossings

1

3

5

7

9

11

13

1197531 13 15 17

v1

v2

vn

Figure 7.8: A RacSefe drawing of a wheel (solid; its rim is drawn in bold) and a matching(dashed)

(ii) If y(v i−1) > y(v i) > y(v i+1), we place the bend at (x(v i+1), y(v i) − 1).(iii) If y(v i) > maxy(v i−1), y(v i+1), by (i) the bottom port at v i is already used; see

the edge e in Figure 7.8. Thus, we draw e with two bends; at (x(v i) + 1, y(v i) − 1)and (x(v i) + 1, y(v i+1) + 1).

Now, let e = (vn , v2) be the remaining edge of the rim. We place its bend at (2n − 2, 0).Our approach ensures that C − (vn , v2) is drawn x-monotone, hence planar. The last

edge (vn , v2) of C is the only edge drawn outside of the bounding box that contains all vertices.Therefore, also the last edge is crossing-free. The spikes are not involved in crossings with therim, as they are outside of the bounding box containing the rim edges. Hence, the drawingofW is planar. All edges ofM′ are drawn as horizontal, non-overlapping line segments, soM′ is drawn planar as well. The slanted segments ofW − (vn , v2) are of y-length 1, so theycannot be crossed by the edges ofM′. As the edge (vn , v2) is not involved in crossings, itfollows that all crossings betweenW andM′ form right angles.

Finally, we have to insert the matching edge (v1 , v i) incident to the hub. Note that this edgealso exists inW as a spike. Since v i is not incident to a matching edge inM′, it is placedabove all matching edges. Therefore, the copy of (v1 , v i) inW does not cross a matching edge,and we can use the same layout for the copy of (v1 , v i) inM.We now show that our algorithm supports the Sefe model. Suppose that there is an

edge e = (v , v′) that belongs to both the rim C and the matchingM. If e is the closing edgeof the rim, then it is drawn planar in C. Thus, this drawing can be used for both graphs.Otherwise, our algorithm places v and v′ at consecutive x-coordinates and at the same y-coordinate. Then, we can draw e as a horizontal edge of length 1 in both graphs, and such anedge cannot be crossed.

We now prove the area bound of the drawing algorithm. To that end, we remove all columnsthat contain neither a vertex, nor a bend. First, we count the rows used. Since we remove thematching edge incident to v1, the matchingM′ has k ≤ n/2 − 1 matching edges. We placethe bottommost vertex in row 1 and the topmost vertex (that is, vertex v1) in row 2k + 3. We

122

Page 131: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

RacSefe Drawings with Two Bends per Edge Section 7.3

v1 v2 v3 v4 v5

v6v7v8v9v10

(a) A non-planar drawing

v2

v3v5

v4

v9

v7

v8

v1

v6

211713951 25

1

5

9

13

17

29

v103

7

11

15

19

3 7 11 15 19 23 27

(b) A RacSefe drawing

Figure 7.9: Two drawings of the same outerpath and matching. In both figures, the outerpathis drawn solid, the upper and the lower path are drawn in bold, the spine of the spanningcaterpillar is drawn extra bold and the matching is drawn dashed.

add one extra bend in row 0 for the edge (vn , v2). Thus, our drawing uses 2k + 3 + 1 ≤ n + 2rows. Next, we count the columns used. The vertices v2 , . . . , vn are each placed in their owncolumn. Every spike has exactly one bend in the column of a vertex. An edge (v i , v i+1) of rimW has exactly one bend in a vertex column, except for the case that y(v i) > y(v i−1), y(v i+1).In this case it needs an extra bend between v i and v i+1, i = 1, . . . , n − 1. Clearly, there can be atmost n/2 − 1 vertices satisfying this condition. Since the edge (vn , v2) uses an extra columnto the right of vn , our drawing uses (n − 1) + (n/2 − 1) + 1 = 1.5n − 1 columns.

Theorem 7.8. An outerpath and a matching on a common set of n vertices admit a RacSefedrawing on an integer grid of size (3n − 2) × (2n − 1) with two bends per outerpath edge andone bend per matching edge. The drawing can be computed in O(n log n) time.

Proof. Let Z = (V , EZ) be the given outerpath andM = (V , EM) the given matching.Recall that an outerpath is a biconnected outerplanar graph whose weak dual is a path oflength at least two; see Figure 7.9a. Furthermore, assume initially that Z andM do not shareedges. Let V = v1 , v2 , . . . , vn, indexed such that ⟨v1 , v2 , . . . , vn , v1⟩ is the outer face of Z .We start by augmenting Z to a maximal outerpath Z ′ = (V , EZ′) by triangulating its

bounded faces. As Z ′ is internally-triangulated, it contains exactly two vertices of degreetwo, each of which lies on a face that is an endpoint of the dual path. We assume, withoutloss of generality, that deg(vn) = deg(v j) = 2 for some j with 1 < j < n; see v10 and v6 inFigure 7.9a. We call the path Pu = (Vu , Eu) = ⟨v1 , v2 , . . . , v j−1⟩ the upper path of Z ′, and thepath Pl = (Vl , El) = ⟨v j , v j+1 , . . . , vn⟩ the lower path of Z ′. Observe that V = Vu ∪ Vl. If weremove Eu ∪ El from EZ′ , then the resulting graph is a caterpillar C that spans V and whosespine alternates between vertices of Vu and Vl.We first compute the left-to-right order of the vertices of caterpillar C = (VC , EC) as

described by the algorithm supporting Theorem 7.4. Then, the x-coordinate of the ith vertexin this order is 3i − 2, i = 1, 2, . . . , n; see Figure 7.9b.

123

Page 132: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 7 Simultaneous Drawing of Planar Graphs with Right-Angle Crossings

In order to compute the y-coordinates of the vertices, we first partitionM into threematchingsMll = (Vll , Ell),Muu = (Vuu , Euu) andMul = (Vul , Eul) as follows. Let (v , v′) ∈EM. Then,

(i) (v , v′) ∈ Ell if v , v′ ∈ Vl,

(ii) (v , v′) ∈ Euu if v , v′ ∈ Vu,

(iii) (v , v′) ∈ Eul if v ∈ Vu and v′ ∈ Vl.

Since V = Vu ∪ Vl, it holds that EM = Ell ∪ Euu ∪ Eul. In the resulting layout, the edges in Ellwill be drawn below the edges in Eul, which in turn will be drawn below the ones of Euu; seeFigure 7.9b. Thus, they will not cross each other.Let mll = ∣Ell∣ and Ell = e1 , . . . , em ll. We draw the edges from bottom to top, starting

from row 1. For i = 1, . . . ,mll, let e i = (u i , u′i) with x(u i) < x(u′i). We set y(u i) = 4i − 1 andy(u′i) = 4i − 3. Edge e i is drawn with a bend at (x(u i), y(u′i)). Our approach ensures thatthere are no crossings between edges ofMll, as they are drawn in different horizontal strips ofthe drawing. Similarly, we draw the edges in Euu from top to bottom, starting from row 2n − 1.Let muu = ∣Euu∣. By construction, the topmost vertex of Vll is drawn in the row 4mll − 1 andthe bottommost vertex of Vuu is drawn in the row 2n + 1 − 4muu. The vertices of Vul will bedrawn between these rows; see Figure 7.9b.In order to draw the edges in Eul, we process the vertices of the set Vul from left to right

and assign y-coordinates to both endpoints of the incident matching edge. Let mul = ∣Eul∣and Eul = ε1 , . . . , εmul. For k ∈ 1, . . . , µ, let εk = (wk ,w′k) and assume without loss ofgenerality that x(wk) < x(w′k) and x(w1) < . . . < x(wµ). We place the vertices in Vl frombottom to top and the vertices in Vu ∩ Vul from top to bottom. If wk ∈ Vu, we assign they-coordinate 4mll−1+3k towk and the y-coordinate 2n+1−4muu tow′k ; ifwk ∈ Vl, we switchthe y-coordinates. Edge εk is drawn with a bend at (x(wk), y(w′k)). Further, every edgeε l ∈ Eul with l > k has its endpoints to the right of wk and in the horizontal strip defined bythe lines y = y(wk) and y = y(w′k). Hence, it will not be involved in crossings with (wk ,w′k).This guarantees that the drawing ofM is planar.

It remains to be determined where the bend is in each edge e = (v , v′) ∈ Z ′. Without lossof generality, let e be directed from its left endpoint, say v, to its right endpoint, say v′. First,assume that e ∈ Eu ∪El belongs to the outercycle. Then, we place its bends at (x(v′)−2, y(v))and (x(v′) − 2, y(v′) − sgn(y(v′) − y(v))). Second, assume that e ∈ EC belongs to theinner caterpillar. Then, we place its bends at (x(v′) − 1, y(v) + sgn(y(v) − y(v′))) and(x(v′) − 1, y(v′) − sgn(y(v′) − y(v))).Since Pu and Pl are drawn x-monotone, both are drawn planar. Following similar argu-

ments as in the proof of Theorem 7.4, we can show that C is drawn planar as well. Since C isdrawn between Pu and Pl, it follows that Z ′ is drawn planar, as desired. It now remains toprove that all (potential) crossings between Z ′ andM only involve rectilinear edge segmentsof Z ′, asM consists exclusively of rectilinear segments. As all slanted segments of Z ′ are ofy-length 1, no horizontal segment ofM can cross them. The same holds for vertical segmentsofMuu ∪Mll, as they are drawn above and below Pl and Pu, respectively. The only possiblenon-rectilinear crossings are between a vertical segment of a matching edge (u, v) ∈ Eul anda long slanted segment of C incident to a spine vertex w. This crossing can only occur if w

124

Page 133: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Concluding Remarks Section 7.4

lies to the left of the vertical segment of (u, v). By construction, w is never drawn between uand v, with respect to the y-coordinate. Thus, such crossings cannot occur, which implies allcrossings between Z ′ andM form right angles.We now show that our algorithm supports the Sefemodel. Assume thatM and Z share

edges, and let e = (v , v′) be an edge that belongs to both input graphs. If e ∈ El, thenalso e ∈ Ell. Our algorithm places v and v′ at consecutive y-coordinates and determines theirx-coordinates such that no other vertex of Vl lies between them. Thus, edge e is drawn in thematching as a vertical segment of length 2 and a horizontal segment that has no vertex belowit. Hence, the drawing of e in the matching is planar and can be used for both graphs. Thecase e ∈ Eu is analogous.If e ∈ EC , then also e ∈ Eul. In this case, we observe that the topological routing of e is the

same in both graphs with an offset of one unit to avoid overlaps. Thus, every other edge eithercrosses both or none of the drawings of e. Since each drawing of e forbids crossings by edgesof one of the input graphs, actually none of the two drawings can have a crossing. Hence, wecan draw e the same way in both graphs.

By the choice of the coordinates, the area requirement of our algorithm is (3n−2)×(2n−1).Since we have to sort the edges in Eul by the x-coordinates of the incident vertices, ouralgorithm runs in O(n log n) time. To complete the proof of this theorem, observe that theextra edges that we introduced when augmenting Z to Z ′ can be safely removed from theconstructed layout, affecting neither the crossing angles nor the area of the layout.

7.4 Concluding Remarks

In this chapter, we have studied Rac simultaneous drawings with few bends per edge. We haveproven that two planar graphs always admit a Rac simultaneous drawing with at most sixbends per edge. Formore restricted classes of graphs, we have drastically improved the numberof bends per edge. All of these drawings are within quadratic area. The results presented in thischapter raise several questions that remain open. For the classes of graphs that we presentedin this chapter, it is interesting whether the number of bends per edge can be reduced. Further,we would like to extend the results to additional graph classes that admit a RacSim drawingwith a small number of bends. As a variant of the problem, it might be possible to reduce therequired number of bends per edge by relaxing the strict constraint that edge intersectionsare at right angles and instead ask for drawings that have close to optimal crossing resolution.Furthermore, the computational complexity of the general problem remains open, that is,given two or more planar graphs on the same set of vertices and a non-negative integer k,whether there is a RacSim drawing in which each graph is drawn with at most k bends peredge and the crossings are all at right angles. Finally, achieving sub-quadratic area for specialsubclasses of planar graphs if we increase the allowed number of bends might be possible.

125

Page 134: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz
Page 135: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

8 Recognizing and DrawingIC-Planar Graphs

The study of graphs that are, in some sense, “nearly-planar”, is an emerging topic in graphtheory, graph algorithms, and network visualization. The general framework is to relax theplanarity constraint by allowing edge crossings but still forbidding those configurations thatwould affect the readability of the drawing too much. Different types of forbidden edge-crossing configurations give rise to different families of nearly-planar graphs. For example, ifthe number of crossings per edge is bounded by a constant k, we have the family of k-planargraphs (see, for example, [ABK13, HELP12, PT97, Rin65, Tho88]). The k-quasi-planar graphsadmit drawings with no k pairwise crossing edges (see, for example, [DDLM12, FPS13]).Rac (Right Angle Crossing) graphs can be drawn such that edges cross only at right angles(see, for example, [DEL11, EL13]). Generalizations of Rac drawings are ACEα and ACLαdrawings, where the edges can cross only at an angle that is exactly α or at least α, respectively,where α ∈ (0, π/2]; see [DL12] for a survey. Further families of nearly-planar graphs arefan-crossing free graphs [CHKK13] and fan-planar graphs [BCG+14, BDD+14, KU14]. Most ofthe existing literature on nearly-planar graphs can be classified according to the study of thefollowing problems (see also [Lio14] for additional references).

Previous work. Previous work on related graph classes can be categorized into differenttypes of problems.

Coloring Problem: While the chromatic number of planar graphs is four, it is rathernatural to ask what restrictions on the crossing configurations force the chromaticnumber of a graph to be relatively small. For example, Ringel [Rin65] proves thatthe chromatic number of 1-planar graphs is seven and he conjectures that it can beimproved to six; this conjecture was then proved to be correct by Borodin [Bor84].See also [BKRS01] for more papers that study the coloring problems of nearly-planargraphs.

Turán-type Problem: The question here is to determine how many edges a nearly-planargraph can have. In particular, it is known that all the families of nearly-planar graphsmentioned above are rather sparse (see, for example, [Ack09, AT07, AAP+97, BEG+12,Did13, KU14, PT97, Val98, VBSW83]).

Recognition Problem: In contrast to testing for planarity, recognizing a nearly-planargraph has often been proved to be NP-hard. This is, for example, the case for 1-planargraphs [KM13], Rac graphs [ABS12], and fan-planar graphs [BCG+14, BDD+14]. Forsome constrained classes of nearly-planar graphs, polynomial-time tests exist (forexample, [ABB+13, EHK+13, HEK+14]).

Drawing Algorithms: Some recent papers describe drawing algorithms for different fami-lies of nearly-planar graphs; the majority of them focuses on drawings with straight-line

Page 136: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 8 Recognizing and Drawing IC-Planar Graphs

v

e1 e2

(a) a 1-planar drawing that is not IC-planar

v

e1 e2

(b) an IC-planar drawing

Figure 8.1: Two drawings of the same graph.

edges and often considers the interplay with other readability constraints, such ascompact area. A limited list of examples includes [ABK13, DDEL14, DDLM13].

Inclusion/intersection relationships: The relationships between different classesof nearly-planar graphs are also proved, as a fundamental step towards developing acomprehensive theory of graph drawing beyond planarity (see, for example, [BDD+14,EL13]), or between nearly-planar graphs and graphs that admit specific types of visualrepresentations [Bra14, EKL+13].

This chapter studies IC-planar graphs, which stands for Independent Crossings graphs, i.e.,graphs that admit a drawing where no two crossed edges share an end-vertex and each edge iscrossed at most once. See Figure 8.1 for an example. For instance, the drawing of Figure 8.1ais not IC-planar because the two edges e1 and e2 are both crossed and they share vertex v; thedrawing of Figure 8.1b is IC-planar. In other words, IC-planar graphs are 1-planar graphs withthe additional property that all edge crossings are independent from one another. Král andStacho [KS10] exploited the independence of the edge crossings to show that IC-planar graphshave chromatic number at most five. Albertson [Alb08] has showm that IC-planar graphshave chromatic number at most six; the chromatic number of IC-planar graphs was thenproved to be at most five by Zhang and Liu [ZL13]. Zhang and Liu also study the Turán-typeproblem and prove that IC-planar graphs have at most 13n/4−6 edges, which is a tight bound.

Our contribution. We extend the theory on IC-planarity beyond the already studiedcoloring and Turán-type problems. We investigate drawing algorithms, the complexity ofthe recognition problem, and the interplay between IC-planar graphs and other families ofnearly-planar graphs. Our results are as follows.

(i) We present an O(n)-time algorithm that computes a straight-line drawing of an IC-planar graph with n vertices in O(n2) area, which is worst-case optimal (Theorem 8.1).It may be worth recalling that not all 1-planar graphs admit a straight-line drawing andthat there are embedded 1-planar graphs that require Ω(2n) area [HELP12].

(ii) We prove that IC-planarity testing is NP-complete both in the variable embeddingsetting (Theorem 8.2) and when the rotation system of the graph is fixed (Theorem 8.3).Note that 1-planarity testing is already known to be NP-complete in general [KM13],even if the rotation system is fixed [ABGR15]. In addition to the hardness result, we

128

Page 137: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Straight-line drawings of IC-planar graphs Section 8.1

(a) (b) (c)

a

b

cd

(d)

Figure 8.2: (a) An IC-planar drawing. (b) Two different IC-planar embeddings of the samegraph with the same rotation system. (c) An X-configuration. (d) A B-configuration.

present a polynomial-time algorithm that tests whether a set of matching edges canbe added to a triangulated plane graph such that the resulting graph is IC-planar(Theorem 8.4). We remark that in any IC-planar drawing the set of crossing edges forma matching.

(iii) We study the interplay between IC-planar graphs and Rac graphs. Namely, we show thatevery IC-planar graph is a Rac graph (Theorem 8.5), which sheds new light on an openproblem about the relationship between 1-planar graphs and Rac graphs [EL13]. Wealso prove that a straight-line Rac drawing of an IC-planar graph may require Ω(qn)area, for a suitable constant q > 1 (Theorem 8.6).

Notation. We consider simple undirected graphsG. Recall that a drawing Γ ofG is planar ifno edges cross, and 1-planar if each edge is crossed at most once. Γ is IC-planar if it is 1-planarand there are no crossing edges that share a vertex (see Figure 8.2a). Further, recall that arotation systemR(G) of a graph G describes a possible cyclic ordering of the edges aroundthe vertices. R(G) is planar (1-planar, IC-planar) if G admits a planar (1-planar, IC-planar)embedding that preservesR(G). Observe thatR(G) can directly be retrieved from a drawingor an embedding. The converse does not necessarily hold, as shown in Figure 8.2b.A kite K is a graph isomorphic to K4 with an embedding such that all the vertices are on

the boundary of the outer face, the four edges on the boundary are planar, and the remainingtwo edges cross each other; see Figure 8.2c. Thomassen [Tho88] characterized the possiblecrossing configurations that occur in a 1-planar drawing. This characterization applied toIC-planar drawings gives rise to the following property, where an X-crossing is of the typedescribed in Figure 8.2c, and a B-crossing is of the type described in Figure 8.2d (the boldsedges only).

Property 8.1. Every crossing of an IC-planar drawing is either an X- or a B-crossing.

8.1 Straight-line drawings of IC-planar graphs

We show that every IC-planar graph admits an IC-planar straight-line grid drawing inquadratic area, and this area is worst-case optimal (Theorem 8.1). The result is based on

129

Page 138: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 8 Recognizing and Drawing IC-Planar Graphs

a

b

w1w2w3w4

f f ′

(a)

a

b

w1w2w3w4

f ′1 f ′2f

(b)

a

b

w1w2w3

w4

f

(c)

Figure 8.3: Illustration for the proof of Lemma 8.1.

first using a new technique that possibly augments the input graph to a maximal IC-planegraph (the resulting embedding might be different from the original one) with specific proper-ties (Lemma 8.1), and then on suitably applying on the augmented graph a drawing algorithmby Alam et al. for triconnected 1-plane graphs [ABK13] on the augmented graph.

Lemma 8.1. Let G = (V , E) be an IC-plane graph with n vertices. There exists an O(n)-timealgorithm that computes a planar-maximal IC-plane graph G+ = (V , E+) with E ⊆ E+ suchthat the following conditions hold:

(c1) The four endvertices of each pair of crossing edges induce a kite.

(c2) Let C be the set of crossing edges in G+. Let C∗ ⊂ C be the subset containing only one edgefor each pair of crossing edges. Then G+ ∖ C∗ is plane and triangulated.

(c3) The outer face of G+ is a 3-cycle of non-crossed edges.

Proof. Let G be an IC-plane graph; we augment G by adding edges such that for each pair ofcrossing edges (a, c) and (b, d) the subgraph induced by vertices a, b, c, d is isomorphicto K4; see the dashed edges in Figs. 8.2c and 8.2d. Note that this is not sufficient to satisfy (c1),as this subgraph might be not embedded as a kite in case of a B-configuration (Figure 8.2d).However, it is always possible to convert a B-configuration into an X-configuration. Indeed,sinceG is IC-planar, it has no two B-configurations sharing an edge (a, b). Thus, we remove aB-configuration with vertices a, b, c, d by rerouting the edge (a, b) to follow the edge (a, c)from vertex a until the crossing point, then edge (b, d) until vertex b, as shown by the dottededge in Figure 8.2d. This is always possible, because edges (a, c) and (b, d) only cross eachother, hence, following their curves, we do not introduce any new crossing. The resultingIC-plane graph is denoted by G′, and it satisfies (c1) (recall that, by Property 8.1, only X- andB-configurations are possible).

We now augmentG′ toG+, such that (c2) is satisfied. Let C be the set of all pairs of crossingedges in G′. Let C∗ be the subset constructed from C by keeping only one (arbitrary) edge foreach pair of crossing edges. The graph G′ ∖C∗ is clearly plane. To ensure (c2), graph G+ ∖C∗must be plane and triangulated. Each removed edge spans two faces in G′ ∖ C∗; we mark allsuch pairs of faces, and then add edges to G′ ∖C∗ as follows. We first process all marked faces,and then the unmarked faces. Let f be amarked face that is a k-cycle, for some k > 3; f has twovertices a and b that belong to its boundary and were part of a kite inG′. Consider the vertices

130

Page 139: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Straight-line drawings of IC-planar graphs Section 8.1

w1 , . . . ,wk (for k ≥ 1) that belong to the boundary of f and that are clockwise between aand b on the boundary of f . Since edge (a, b) exists, a, b is a split pair, which separates thegraph into distinct components: one of them is the path induced by vertices w1 , . . . ,wk (seeFigure 8.3a. This path can be flipped to the opposite side of edge (a, b), thus placed inside aface f ′ that is not marked by definition of IC-planarity; see Figure 8.3b. In this way, f ′ is splitinto two not marked faces f ′1 and f ′2 , while face f is now a triangle.

We then handle not marked faces. Each of them can be internally triangulated by pickingany vertex on its boundary and connecting it to all other vertices (avoiding multiple edges) ofthe boundary; see Figure 8.3c. Graph G+ is then obtained by reinserting the edges in C∗ inthe marked faces. At this point, G+ satisfies both (c1) and (c2). To satisfy (c3), note that G+ isIC-plane, hence, it has a face f whose boundary contains only non-crossed edges. Also, f is a3-cycle by construction. Thus, we can re-embed G+ so that f is the outer face.It remains to prove that the described algorithm runs in O(n) time. Namely, let m be the

number of edges of G, augmenting the graph such that for each pair of crossing edges theirend-vertices induce a subgraph isomorphic to K4 can be done in O(m) time (the numberof added edges is O(n)). Similarly, rerouting some edges to remove all B-configurationsrequires O(m) time. Also, triangulating graph G′ ∖ C∗ can be done in time proportional tothe number of faces of G′ ∖C∗, which is O(n +m). Since IC-planar graphs are sparse [ZL13],the time complexity follows.

Theorem 8.1. There is an O(n)-time algorithm that takes an IC-plane graph G with n verticesas input and constructs an IC-planar straight-line grid drawing of G in O(n)×O(n) area. Thisarea is worst-case optimal.

Proof. Augment G into a planar-maximal IC-plane graph G+ in O(n) time using Lemma 8.1.Graph G+ is triconnected, as it contains a triangulated plane subgraph. Draw G+ with thealgorithm by Alam et al. [ABK13] which takes as input a 1-plane triconnected graph with nvertices and computes a 1-planar drawing on the (2n − 2) × (2n − 3) grid in O(n) time; thisdrawing is straight-line, but for the outer face, which may contain a bent edge if it has twocrossing edges. Since by Lemma 8.1 the outer face ofG+ has no crossed edges, Γ is straight-lineand IC-planar. Dummy edges are then removed from Γ.

It remains to prove that the area bound of the algorithm is worst-case optimal. To this aim,we show that for every n ≥ 2 there exists an IC-planar graph G with Θ(n) vertices, such thatevery IC-planar straight-line grid drawing of G requires Ω(n2) area. Dolev et al. [DLT84]described an infinite family of planar graphs, called nested triangle graphs, such that everyplanar straight-line drawing of an n-vertex graph G (for n ≥ 6) of this family requires Ω(n2)area. We augment G as follows. For every edge (u, v) of G, we add a vertex cuv , and twoedges (u, cuv) and (cuv , v). Denote by G+ the resulting augmented graph, which clearlyhas Θ(n) vertices. We now show that in every possible IC-planar straight-line drawingof G+ there are no two edges of G that cross each other. Suppose, by contradiction, that twoedges (u, v) and (w , z) of G cross each other in an IC-planar straight-line drawing Γ of G+.Observe that the subgraph induced by the vertices u, v , cuv is a 3-cycle. Clearly, either wor z lies inside this 3-cycle, while the other one lies outside, as otherwise (u, v) would becrossed twice (or it would not be crossed). Thus, it immediately follows that the IC-planaritycondition cannot be respected, since either an edge of the 3-cycle is crossed twice or two edges

131

Page 140: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 8 Recognizing and Drawing IC-Planar Graphs

u

v

(a) G

u

vauv avu

cuv

cvu

(b) G∗

Figure 8.4: Illustration of the proof of Theorem 8.2.

are crossed once, violating the IC-planarity condition. Hence, the subgraph G must be drawnplanar and this implies that Γ requires Ω(n2) area.

8.2 Recognizing IC-planar graphs

The IC-planarity testing problem askswhether a given graphG admits an IC-planar embedding.We first show that this problem is NP-complete in the general case and even if the rotationsystem is given. Then, we give an O(n3)-time algorithm that decides whether the union of atriangulated plane graph and a set of crossing edges is IC-planar and, if so, draws the graph.

Theorem 8.2. IC-planarity testing is NP-complete.

Proof. IC-planarity is in NP, as one can guess an embedding and check whether it is IC-planar [GJ83]. For the hardness proof, the reduction is from the 1-planarity testing problem,which asks whether a given graph is 1-planar or not. The reduction uses a 3-cycle gadget andexploits the fact that at most one edge of a 3-cycle is crossed in an IC-planar drawing. Wetransform an instance G of 1-planarity testing into an instance G∗ of IC-planarity testing, byreplacing each edge (u, v) of G with a graph Guv consisting of two 3-cycles, Tuv and Tvu , withvertices u, cuv , auv and v , cvu , avu, respectively, plus edge (auv , avu), called the attachingedge of u and v; see Figure 8.4.

Let Γ be a 1-planar drawing of G. An IC-planar drawing Γ∗ of G∗ can be easily constructedby replacing each curve representing an edge (u, v) in Γ with a drawing of Guv where Tuvand Tvu are drawn planar and sufficiently small, such that the possible crossing that occurson the edge (u, v) in Γ occurs on the attaching edge (auv , avu) in Γ∗. Hence, since all theattaching edges are independent, Γ∗ is IC-planar.

Let Γ∗ be an IC-planar drawing of G∗. We show that it is possible to transform the drawingin such a way that all crossings occur only between attaching edges. Once this conditionis satisfied, in order to construct a 1-planar drawing Γ of G, it suffices to remove, for eachedge (u, v), the vertices cuv and cvu , and to replace auv and avu with a bend point. Namely,as already observed, no more than one edge can be crossed for every gadget Tuv of G∗.

132

Page 141: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Recognizing IC-planar graphs Section 8.2

u

cuv

auv

u auv

cuv

(a)

u

u

v

w

v

w

(b)

Figure 8.5: Illustration of the proof of Theorem 8.2. (a) Rerouting the crossed edge (u, auv)via cuv to be planar. (b) Rerouting the crossing edges (u, v) and (u,w) to be planar.

In order to complete the proof, we need to take care of the following particular case. Twoattaching edges auv and auw that cross and that are connected to two gadgets Tuv and Tuwwith a common vertex u represent a valid configuration in Γ∗, while they give rise to acrossing between two adjacent edges in Γ, which is not allowed since Γ must be a simpledrawing. However, this case can be easily solved by rerouting the two edges in Γ as shown inFigure 8.5b.

The NP-hardness proof of IC-planarity testing for graphs with fixed rotation system usesa reduction from planar-3SAT. We exploit the membrane technique introduced by Auer etal. [ABGR15] for the hardness proof of 1-planarity testing with fixed rotation system. Themain issue is to design suitable gadgets for IC-planar graphs. We now prove NP-hardnessof IC-planarity testing for graphs with a given rotation system. We rely on the membranetechnique introduced by Auer et al. [ABGR15] to prove the NP-hardness of 1-planarity testingfor graphs with a given rotation system. In particular, we design particular gadgets that makeit possible to use the membrane technique in the case of IC-planar graphs.First, we replace the U-graphs [ABGR15] by M-graphs, calledmesh graphs. These graphs

have a unique embedding with a fixed rotation system. Namely, an M-graph is a mesh, wherecells are filled with two crossing edges, following a checkerboard pattern to ensure independentcrossings; see Figure 8.6. To see that with a given rotation system, an M-graph has a uniqueembedding, observe that each subgraph isomorphic to K4 can be embedded planarly or as akite, and this is determined by the rotation system [Kyn09]. The rotation system defined bythe drawing in Figure 8.6 implies that each subgraph isomorphic to K4 is embedded as a kite,and therefore the embedding of an M-graph is unique.

Let M be an M-graph with a given fixed embedding. At its bottom line, M has sufficientlymany free vertices which are not incident with a crossing edge in M. These vertices are

133

Page 142: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 8 Recognizing and Drawing IC-Planar Graphs

(a) (b)

Figure 8.6: (a) The structure of an M-graph and (b) and its abbreviation.

consecutively ordered, say from left to right. The edges on the bottom line are not crossed inany IC-planar embedding of M, so they are crossing-free in the given embedding. Finally, Mcannot be crossed by any path from a free vertex. In what follows, we attach further gadgetsto M by connecting these gadgets to consecutive free vertices. If there are several gadgets,then they are separated and placed next to each other.

General Construction. Consider an instance α of planar-3SAT with its correspondingplane graph G and its dual G∗. Recall that the vertices of G represent variables x and clauses c,also, there is an edge (x , c) if x or its negation occurs as a literal in c; see Figure 8.7a. Wetransform G∗ into anM-supergraph G∗α as follows.Each vertex of G∗, corresponding to a face of the embedded graph G, is replaced by a

sufficiently large M-graph. Further, each edge of G∗ is replaced by a barrier of l parallel edgesfrom/to l free consecutive vertices on the boundary of the M-graph. These edges will becrossed by paths that are called ropes. The size of l will be determined later. The M-graphmust have sufficiently many free vertices for the edges from the gadgets and barriers. Thesmallest bound can easily be computed from the embedding of G and the attached gadgets;see Figure 8.7b.For each variable x, we construct a V-gadget γ(x), and similarly we build a C-gadget for

each clause. These gadgets are described below.Each vertex u of G lies in a face f ∗ of G, which corresponds to a vertex of G∗. We attach

the gadget γ(u) of u to a M-graph of a vertex of G∗ on the boundary of f ∗ such that γ(u) liesin f ∗. To that end, it does not matter which vertex of f ∗ is chosen. Similarly, each edge e of Gbetween a variable and a clause is replaced by a rope of length 2l + 3. Since e is crossed by itsdual edge, the rope is crossed by a barrier. A rope acts as a communication line that “passes” acrossing at a V-gadget across a barrier to a C-gadget. We denote by amembrane (similarlyas in [ABGR15]) a path between free vertices on the boundary of a M-graph, or betweenparticular vertices of a variable gadget. We call a vertex IN if it placed inside the region ofa membrane and the boundary of the M-graph in an IC-drawing, and OUT otherwise. INand OUT are exactly defined by edges which cross the membrane. Note that the framework isbasically a simultaneous embedding of G and G∗ by means of our gadgets, M-graphs, barriersand ropes. The subgraph without V- and C-gadgets is 3-connected, since the M-graphs are3-connected and the barriers have size l for l ≥ 3, and it has a unique planar embedding ifone edge from each pair of crossing edges in each M-graph is removed.

134

Page 143: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Recognizing IC-planar graphs Section 8.2

a

b

c

(a) (b)

Figure 8.7: (a) The planar graph G (solid) and its dual G∗ (dotted) corresponding to theplanar-3SAT formula (a ∨ b ∨ ¬c) ∧ (a ∨ ¬b ∨ c). (b) The corresponding M-supergraph G∗αwith the clause gadgets (vertical) and the variable gadgets (horizontal).

Constructionof theC-gadgets. The C-gadget c = (l1 , l2 , l3)with three literals l1, l2 and l3is attached to eight consecutive free boundary vertices of an M-graph M, say v1 , . . . , v8. Foreach literal l i , there are three vertices u i , a i and b i , and four edges (u i , a i), (u i , b i), (a i , v2i)and (b i , v2i+1), where u i is the initial vertex of the rope towards the corresponding variablegadget. There is a membrane of nine edges from v1 to v8, see Figure 8.8a.By construction, at most two vertices among u1, u2 and u3 can be moved outside the

membrane, and at least one initial vertex of a rope (and maybe all) must be IN. IN shallcorrespond to the value true of the literal and thus of the clause.

Construction of the V-gadgets. Let x be a variable and let v be the vertex correspondingto x in G. Suppose that the literal x occurs in k clauses for some k ≥ 1, which are orderedby the embedding of G. Denote this sequence by x1 , . . . xk , where each x i corresponds to xor ¬x. The V-gadget of x is γ(x) = γ(t l), γ(x1), . . . , γ(xk), γ(tr). This gadget is connectedto 7k + 14 free consecutive vertices on the border of the M-graph M to which it is attached;see Figure 8.8b for an illustration. The gadgets γ(t l) and γ(tk) are called the (left and right)terminal gadgets and each γ(x i) is called a literal gadget. They are similar to clause gadgetsand are each connected to seven consecutive free variables v1 , . . . , v7 on the boundary of M.

The terminal gadget γ(t l) has two primary vertices x+0 and x−0 . The primary vertex x+0 isconnected to v2, v3 and v4, and the other primary vertex x−0 is connected to v5 , v6 by pathsof length two, respectively. Analogously, the terminal gadget has two primary vertices x+k+1and x−k+1, with the same requirements.. There is a local membrane of seven edges from v1 tov7. The gadget γ(x) has an outer membrane of length 2k + 1 from x+0 to x−k+1.For each literal gadget γ(x i), consider two cases. If x i is positive, then γ(x i) has two

primary vertices x+i and x−i , where x+i is attached to three free vertices v2, v3 and v4 of M,and x−i is attached to two free vertices v5 and v6 by two paths of length two, respectively. Therope to the literal begins at x+i . Otherwise, if x i is negated, then the gadget is reflected, such

135

Page 144: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 8 Recognizing and Drawing IC-Planar Graphs

u1 u2 u3

(a) the clause gadget (b) the variable gadget

Figure 8.8: The two gadgets for the NP-hardness reduction.

that x+i has two, and x−i has three paths of length two to the M-graph. The rope to the literalbegins at x+i . In both cases, there is a local membrane of length seven from v1 to v7. The ropeis a path of 2l + 3 edges from vertex x±i of the V-gadget to the vertex u i of the clause gadget.

The rotation system of the gadgets it retrieved from the drawing and the ordering of thevertices on the border of M-graphs.

Correctness. Wewill now prove several lemmas on the structure of our construction. Withthese lemmas, we will show that an IC-planar drawing to the resulting graph Gα immediatelyyields a valid solution to the underlying planar-3SAT probLemma First, we show that theM-graph is not crossed.

Lemma 8.2. The boundary edges of a M-graph (with a fixed rotation system) are never crossedin an IC-planar drawing of Gα .

Proof. This lemma follows directly from the construction. Each K4 must be embedded as akite, and further edge crossings violate IC-planarity.

Consequently, the following corollary holds.

Corollary 8.1. A path from a free boundary vertex cannot cross any M-graph.

Now, we show that every clause, terminal and literal gadget has at least one primary vertexthat is not OUT.

Lemma 8.3. In every IC-planar drawing of Gα , at most two of the primary vertices u1, u2 and u3of a clause gadget can be OUT, and at most one of the primary vertices x+i , x−i of a terminal or aliteral gadget can be OUT of the local membrane.

Proof. Assume that u1, u2 and u3 all are OUT. Then, the membrane must cross five edges. Thus,the membrane has a length of at least nine. However, from the construction, the membraneonly has length seven, which is a contradiction. The proof for terminal and literal gadgetsworks analogously.

Next, we show that the outer membrane crosses each rope.

Lemma 8.4. In every IC-planar drawing of Gα , each rope is crossed by the outer membrane ofthe variable gadget.

136

Page 145: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Recognizing IC-planar graphs Section 8.2

Proof. In order to avoid a crossing, the outer membrane must be drawn around the C-gadget.Then, the membrane must cross at least one barrier, which is impossible in an IC-planardrawing if the size of a barrier is chosen to be too large, that is,

l ≥ maxk ∣ a variable x occurs in at most k clauses of α + 2.

The fact that a rope propagates a truth value is due to the fact that its length is tight, as thefollowing lemma shows.Lemma 8.5. In every IC-planar drawing of Gα , respecting the rotation system, the endpoint ofa rope at a gadget is OUT if the endpoint at the vertex is IN.

Proof. By construction of M-graphs, they cannot be crossed by a rope. Thus, the rope mustcross a barrier of l edges. In any IC-planar embedding, this costs (at least) 2l − 1 edges. Inaddition, a rope is crossed by the outer membrane of the variable gadget. If the endpoint atthe vertex is IN, then the rope is crossed by the membrane, which costs two edges. Hence, itcannot cross another membrane, since its length is 2k + 3.

The consistency of the truth assignment of the variable is granted by the following lemma.Lemma 8.6. In every IC-planar drawing of Gα , and every variable x, if x−0 is OUT, then each x−iis OUT and all x+j are IN for i = 1, . . . , k + 1 and j = 1, . . . , k + 1. The reversed statement alsoholds.

Proof. If x−0 is OUT, then the local membrane crosses two edges of the paths of length twofro x−0 to the border of M. Thus, by Lemma 8.3, x−0 is OUT and the local membrane must crossan edge of the path of length two from x+0 to x−1 . This implies that the local membrane of thefirst literal gadget cannot cross this path, and therefore must cross the paths from x−1 to theM-graph. It follows by induction that all x−i are OUT and all x+i are IN. Conversely, if x+k+1 isOUT, then we proceed from right to left. Now, all x+i are OUT and all x−i are IN.

With these lemmas, we can finally prove the following theorem.Theorem 8.3. IC-planarity testing with given rotation system is NP-complete.

Proof. We have already stated in the proof of Theorem 8.2 that IC-planarity is in NP. Wereduce from planar-3SAT and show that an expression α is satisfiable if and only if theconstructed graph G∗α has a IC-planar drawing. If α is satisfiable, then we draw the V- andC-gadgets according to the assignment, such that the initial vertex of each rope from thegadget of a variable x is IN at the C-gadget if the literal is assigned the value true. The resultingdrawing is IC-planar by construction. If G∗α has an IC-planar drawing, then we obtain thetruth assignment of α from the drawing. Thus, IC-planarity with a given rotation system isNP-complete.

Note that the construction for the proof ofTheorem 8.3 also holds in the variable embeddingsetting, since the used graphs have an almost fixed IC-planar embedding. From this, we canobtain an alternative NP-completeness proof of IC-planarity testing.We now describe an algorithm to test whether a graph G = (V , ET ∪ EM) that consists

of a triangulated plane graph T = (V , ET) and a matching M = (VM , EM) with VM ⊆V , EM ∩ ET = ∅ admits an IC-planar drawing that preserves the embedding of T . An outlineof the algorithm is as follows.

137

Page 146: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 8 Recognizing and Drawing IC-Planar Graphs

v

u∗

(a)

v∗

u∗

(b)

Figure 8.9: (a) A triconnected Graph T (solid) and its dual T∗ (dotted), (b) The extendedgraph T∗ ∪ u∗ , v∗ and the three length-3 paths between u∗ and v∗ (bold).

(1) Check for every matching edge if there is a way to draw it such that it crosses only oneedge of T .

(2) Split T into subgraphs that form a hierarchical tree structure.

(3) Traverse the 4-block tree bottom-up and solve a 2SAT formula for each tree node.

In order to check whether there is a valid placement for each matching edge (u, v) ∈ M, wehave to find two adjacent faces, one of which is incident to u, while the other one is incidentto v. To this end, we consider the dual T∗ of T that contains a vertex for each face in T that isnot incident to a vertex w ∈ VM ∖ u, v, and an edge for each edge in T that separates twofaces. Further, we add two additional vertices u∗ and v∗ to T∗ that are connected to all facesthat are incident to u and v, respectively. In the resulting graph T∗ ∪ u∗ , v∗, we look forall paths of length 3 from u∗ to v∗. These paths are equivalent to routing (u, v) through twofaces that are separated by a single edge. Note that no path of length 1 or 2 can exist, since(i) by construction u∗ and v∗ are not connected by an edge and (ii) if there was a path oflength 2 between u∗ and v∗, then u and v would lie on a common face in the triangulatedgraph T ; thus, the edge (u, v) would exist both in ET and in EM , which is not possible sinceET ∩ EM = ∅. See Figure 8.9 for an illustration. If there is an edge that has no valid placement,then G is not IC-planar and the algorithm stops. Otherwise, we save each path that we foundas a possible routing for the corresponding edge in M.Now, we make some observations on the structure of the possible routings in a drawing

of an edge (u, v) ∈ M that we can use to get a hierarchical tree structure of the graph T .Every routing is uniquely represented by an edge that separates a face incident to u and aface incident to v and that might be crossed by (u, v). We call these edges routing edges.Let there be k routing edges for the pair (u, v). Each of these edges forms a triangular facewith u. From the embedding, we can enumerate the edges by the counterclockwise orderof their corresponding faces at u. This gives an ordering e1 , . . . , ek of the routing edges. Lete1 = (luv , l ′uv) and ek = (r′uv , ruv) such that the edge (u, luv) comes before the edge (u, l ′uv),

138

Page 147: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Recognizing IC-planar graphs Section 8.2

u

v

luv ruve1 e2 ei ek

Figure 8.10: The ordered routing edges e1 , . . . , ek lie inside the quadrangle (u, luv , v , ruv).

and the edge (u, r′uv) comes before (u, ruv) in the counterclockwise order at u. Then, alledges e1 , . . . , ek lie within the routing quadrangle (u, luv , v , ruv); see Figure 8.10. Note thatthere may be more complicated structures between the edges, but they do not interfere withthe ordering. Denote by Quv = (u, luv , v , ruv) the routing quadrilateral of the matchingedge (u, v) ∈ M. We define the interior Iuv = (Vuv , Euv) as the maximal subgraph of T suchthat, for all vertices v ∈ Vuv , each path from v to a vertex on the outer face of T contains u,luv , v, or ruv . Consequently, Quv ∈ Vuv . We will now show that two interiors cannot overlap.

Lemma 8.7. For each pair of interiors Iuv , Iab , exactly one of the following conditions holds:

(a) Iuv ∩ Iab = ∅

(b) Iuv ⊂ Iab

(c) Iab ⊂ Iuv

(d) Iuv ∩ Iab = Quv ∩ Qab .

Proof. Assume that neither of the condition holds. Recall thatQuv andQab are the boundariesof the interiors. Note that Iuv ∩ Iab = ∅ corresponds to disjointness, Iuv ⊂ Iab and Iab ⊂ Iuvcorrespond to inclusion, and Iuv∩Iab = Quv∩Qab corresponds to touching in their boundaryof the two interiors Iuv and Iab . Thus, if the conditions do not hold, the interiorsmust properlyintersect, that is, without loss of generality, there is a vertex c ∈ Quv that lies in Iab ∖ Qab ,and a vertex d ∈ Quv that does not lie in Iab . Hence, the other two vertices of Quv lie in Qab .Clearly, c and d are opposite vertices in Quv . By definition of IC-planar graphs, it holdsthat a, b ∩ u, v = ∅.First, assume that c = luv . Then, u and v must lie in Qab . More specifically, by definition

of IC-planar graphs u, v = lab , rab. Without loss of generality, assume that u = raband v = lab . Since the edges (u, c) and (v , c) have to lie in Iab , this leads to the situationdepicted in Figure 8.11a. However, this implies that that there are only two routing edgesfor (a, b) with one of them incident to u, and the other one is incident to v. Thus, the routingedges are not valid. The case that c = ruv works analogously.Second, assume that c = u. Then, luv and ruv must lie in Qab . If luv and ruv are adjacent

on Qab , say luv = b and ruv = rab , then there is only a single routing edge for (u, v) that is

139

Page 148: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 8 Recognizing and Drawing IC-Planar Graphs

a

b

v = lab u = rabc = luv

ruv

(a) luv lies in Iab ∖ Qab

a

b = luv

lab

rab = ruvc = u

v

(b) luv and ruv are adjacent in Qab

a = ruv

b = luv

lab rabc = u

v

(c) luv , ruv = a, b

a

b

luv = lab ruv = rabc = u

v

(d) luv , ruv = lab , rab

Figure 8.11: Illustration of the proof of Lemma 8.7. The routing quadrilateral Qab is drawnbold, and Quv is drawn gray.

incident to b and thus not valid; see Figure 8.11b. Otherwise, there are two cases. If luv , ruv =a, b, say ruv = a and luv = b, then there are only two routing edges for (u, v) with one ofthem incident to a, and the other one incident to b; see Figure 8.11c. If luv , ruv = lab , rab,say luv = lab and ruv = rab , then both routing edges of (u, v) are incident to b; see Figure 8.11d.The case that c = v works analogously.

This proves that, if there is a proper intersection between two routing quadrilaterals, thanat least one of the corresponding matching edges has no valid routing edge. Thus, one of theconditions must hold.

By using Lemma 8.7, we can find a hierarchical structure on the routing quadrilaterals.We construct a directed graph H = (VH , EH) with VH = Iuv ∣ (u, v) ∈ M ∪ G. For eachpair Iuv , Ix y , EH contains a directed edge (Iuv , Ix y) if and only if Vuv ⊂ Vx y and there is nomatching edge (a, b) with Vuv ⊂ Vab ⊂ Vx y . Finally, we add an edge from each subgraph thathas no outgoing edges to G. Each vertex but G only has one outgoing edge. Obviously, thisgraph contains no (undirected) cycles. Thus, H is a tree.We will now show how to construct a drawing of G based on H in a bottom-up fashion.

We will first look at the leaves of the graph. Let Iuv be a vertex of H whose children are allleaves. Let Iu iv i , . . . , Iukvk be these leaves. Since these interiors are all leaves in H, we can pickany of their routing edges. However, the interiors may touch on their boundary, so not everycombination of routing edges can be used. Assume that a matching edge (u i , v i), 1 ≤ i ≤ k hasmore than two valid routing edges. Then, we can always pick amiddle one, that is, a routingedge that is not incident to lu iv i and ru iv i , since this edge will not interfere with a routing edgeof another matching edge.

140

Page 149: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Recognizing IC-planar graphs Section 8.2

Now, we can create a 2SAT formula to check whether there is a valid combination of routingedges as follows. For the sake of clarity, we will create several redundant variables and formulas.These can easily be removed or substituted by shorter structures to improve the running time.For each matching edge (u i , v i), 1 ≤ i ≤ k, we create two binary variables l i and r i , such that l iis true if and only if the routing edge incident to lu iv i is picked, and r i is true if and only if therouting edge incident to ru iv i is picked. If (u i , v i) has only one routing edge, then it is obviouslyincident to lu iv i and ru iv i , so we set lu iv i = ru iv i = true by adding the clauses lu iv i ∨ false

and ru iv i ∨ false. If (u i , v i) has exactly two routing edges, the picked routing edge has to beincident to either lu iv i or ru iv i , so we add the clauses lu iv i ∨ ru iv i and ¬lu iv i ∨¬ru iv i . If (u i , v i)has more than two routing edges, we can pick a middle one, so we set lu iv i = ru iv i = false byadding the clauses ¬lu iv i ∨ false and ¬ru iv i ∨ false. Next, we have to add clauses to forbidpairs of routing edges that can not be picked simultaneously, that is, they share a commonvertex. Consider a pair of matching edges (u i , v i), (u j , v j), 1 ≤ i , j ≤ k. If ru iv i=lu jv j , we addthe clause ¬r i ∨ ¬l j . For the other three cases, we add an analogue clause.

Now, we use this 2SAT to decide whether the subgraph Iuv is IC-planar, and which routingedges can be used. For each routing edge (a, b) of Iuv , we solve the 2SAT formula givenabove with additional constraints that forbid the use of routing edges incident to a and b.To that end, add the following additional clauses: If lu iv i = a, add the clause ¬l i ∨ false.For the other three cases, we add an analogue clause. If this 2SAT formula has no solution,then the subgraph Iuv is not IC-planar. Otherwise, there is a solution where you pick therouting edges corresponding to the binary variables. To decide whether a subgraph Iuv whosechildren are not all leaves is IC-planar, we first compute which of their routing edges can bepicked by recursively using the 2SAT formula above. Then, we use the 2SAT formula for Iuvto determine the valid routing edges of Iuv . Finally, we can decide whether G is IC-planarand, if yes, get a drawing by solving the 2SAT formula of all children of G.

Hence, we give the following theorem.

Theorem 8.4. Let T = (V , ET) be a triangulated plane graph with n vertices and let M =(V , EM) be a matching. There exists an O(n3)-time algorithm to test if G = (V , ET ∪ EM)admits an IC-planar drawing that preserves the embedding of T. If the test is positive, thealgorithm computes a feasible drawing.

Proof. We need to prove that the described algorithm runs in O(n3) time. Indeed, for eachsubgraph Iuv , we have to run a 2SAT formula for each routing edge. Once we have determinedthe valid routing edges, we do not have to look at the children anymore. Let cuv be the numberof children of Iuv . Each of these 2SAT formula contains 2cuv variables and up to 2cuv + 2c2uvclauses. Since every edge of G can only be a routing edge for exactly one matching edge, wehave to solve at most n 2SAT formulas. The tree H consists of at most n/2+ 1 vertices (one foreach matching edge), so a very conservative estimation is that we have to solve O(n) 2SATformulas with O(n) variables and O(n2) clauses each. Aspvall et al. [APT79] showed howto solve 2SAT in time linear in the number of clauses. We can use the linear-time algorithmof Section 8.1 to draw the IC-planar graph corresponding to the IC-planar embedding bypicking the routing edges corresponding to the binary variables. Thus, our algorithm runsin O(n3) time.

141

Page 150: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 8 Recognizing and Drawing IC-Planar Graphs

8.3 IC-planarity and Rac graphs

It is known that everymaximally dense Rac graph is 1-planar, and that there exist both 1-planargraphs that are not Rac and Rac graphs that are not 1-planar [EL13]. Additionally, every1-planar graph drawable with all vertices on the outer face is Rac [DE12]. Here, we furtherinvestigate the intersection between the classes of 1-planar and Rac graphs, showing that allIC-planar graphs are Rac graphs. To this aim, we describe a polynomial-time constructivealgorithm. The computed drawingsmay require exponential area, which is however worst-caseoptimal; indeed, we exhibit IC-planar graphs that require exponential area in any possibleIC-planar straight-line Rac drawing. Our construction is based on extending the linear-timealgorithm by de Fraysseix et al. that computes a planar straight-line grid drawing of a maximal(that is, triangulated) plane graph in quadratic area [dFPP90]; we call this algorithm the dFPPalgorithm. For completeness, we recall the idea behind dFPP before describing our extension.

AlgorithmdFPP. Let G be a maximal plane graph with n ≥ 3 vertices. The dFPP algorithmfirst computes a suitable linear ordering of the vertices of G, called a canonical ordering of G,and then incrementally constructs a drawing of G using a technique called shift method. Thismethod adds one vertex per time, following the computed canonical ordering and shiftingvertices already in the drawing when needed. Namely, let σ = (v1 , v2 , . . . , vn) be a linearordering of the vertices of G. For each integer k ∈ [3, n], denote by Gk the plane subgraphof G induced by the k vertices v1 , v2 , . . . , vk (Gn = G) and by Ck the boundary of the outerface of Gk , called the contour of Gk . Ordering σ is a canonical ordering of G if the followingconditions hold for each integer k ∈ [3, n]:

(i) Gk is biconnected and internally triangulated;

(ii) (v1 , v2) is an outer edge of Gk ; and

(iii) if k + 1 ≤ n, vertex vk+1 is located in the outer face of Gk , and all neighbors of vk+1 in Gkappear on Ck consecutively.

We call lower neighbors of vk all neighbors v j of vk for which j < k. Following the canonicalordering σ , the shift method constructs a drawing of G one vertex per time. The drawing Γkcomputed at step k is a drawing of Gk . Throughout the computation, the following invariantsare maintained for each Γk , with 3 ≤ k ≤ n:

(I1) pv1 = (0, 0) and pv2 = (2k − 4, 0);

(I2) x(w1) < x(w2) < ⋅ ⋅ ⋅ < x(wt), where w1 = v1 ,w2 , . . . ,wt = v2 are the vertices thatappear along Ck , going from v1 to v2.

(I3) Each edge (w i ,w i+1) (for i = 1, 2, . . . , t − 1) is drawn with slope either +1 or −1.

More precisely, Γ3 is constructed placing v1 at (0, 0), v2 at (2, 0), and v3 at (1, 1). The additionof vk+1 to Γk is executed as follows. Letwp ,wp+1 , . . . ,wq be the lower neighbors of vk+1 orderedfrom left to right. Denote by µ(wp ,wq) the intersection point between the line with slope +1passing throughwp and the line with slope−1 passing throughwq . Point µ(wp ,wq) has integercoordinates and thus it is a valid placement for vk+1. With this placement, however, (vk+1 ,wp)

142

Page 151: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

IC-planarity and Rac graphs Section 8.3

w1 = v1 wt = v2

w2wp

wqwt−1

wp+1wq−1

Gk

vk+1

µ(wp, wq)

(a)

w1 = v1 wt = v2

w2wp

wqwt−1

wp+1wq−1

Gk

vk+1

(b)

Figure 8.12: Illustration of the shift algorithm at the addition step of vk+1. The shift operationchanged the slopes of the edges drawn bold. (a) Placing vk+1 at µ(wp ,wq) would createoverlaps. (b) After the shift operation, vk+1 can be placed at µ(wp ,wq) without overlaps.

and (vk+1 ,wq)may overlap with (wp ,wp+1) and (wq−1 ,wq), respectively; see Figure 8.12a.To avoid this, a shift operation is applied: wp+1, wp+2,. . . ,wq−1 are shifted to the right by 1 unit,andwq ,wq+1 , . . . ,wt are shifted to the right by 2 units. Then vk+1 is placed at point µ(wp ,wq)with no overlap; see Figure 8.12b. We recall that, to keep planarity, when the algorithm shiftsa vertex w i (p + 1 ≤ i ≤ t) of Ck , it also shifts some of the inner vertices together with it; formore details on this point refer to [CP95, dFPP90]. By Invariants (I1) and (I3), the area of thefinal drawing is (2n − 4) × (n − 2).

Our extension. Let G be an IC-plane graph, and assume that G+ is the planar-maximalIC-plane graph obtained from G by applying the technique of Lemma 8.1. Our drawingalgorithm computes an IC-planar drawing of G+ with right-angle crossings, by extendingalgorithm dFPP. It adds to the classical shift operationmove and lift operations to guaranteethat the one of the crossing edges of a kite is vertical and the other one is horizontal. We nowgive an idea of our technique, which we call RAC-drawer. Details are given in the proof ofTheorem 8.5. Let σ be a canonical ordering constructed from the underlying maximal planegraph of G+. Vertices are incrementally added to the drawing, according to σ , following thesame approach as for dFPP.

143

Page 152: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 8 Recognizing and Drawing IC-Planar Graphs

6

5

4

2

1

7

3

8

(a)

6

7

5

4

2

3

1

(b)

6

5

4

21

7

3

8

(c)

7

21

4

3

6

5

(d) (e)

Figure 8.13: Example run of our algorithm on an IC-planar graphG with a separating triangle.The crossing edges are drawn bold, the edges inside the separating triangle are drawn gray.(a) Input graph G. (b) Output of dFPP after vertex 7. (c) Output of dFPP after vertex 8. (d)Lifting 3 to the level of 7. (e) Moving 8 directly above 6.

However, suppose that K = (a, b, c, d) is a kite of G+, and that a and d are the first and thelast vertex of σ among the vertices in K, respectively. Once d has been added to the drawing,the algorithm applies a suitable combination of move and lift operations to the vertices of thekite to rearrange their positions so to guarantee a right-angle crossing. Note that, following thedFPP technique, a was placed at a y-coordinate smaller than the y-coordinate of d. A moveoperation is then used to shift d horizontally to the same x-coordinate as a (that is, (a, d)becomes a vertical segment in the drawing); a lift operation is used to vertically shift the lowerbetween b and c, such that these two vertices get the same y-coordinates. Both operations areapplied so to preserve planarity and to maintain Invariant (I3) of dFPP; however, they do notmaintain Invariant (I1), thus the area can increase more than in the dFPP algorithm and maybe exponential. The application of move/lift operations on the vertices of two distinct kites donot interfere each other, as the kites do not share vertices in an IC-plane graph. Figure 8.13shows a running example of our algorithm.

Theorem 8.5. There is a O(n3)-time algorithm that takes an IC-plane graph G with n verticesas input and constructs a straight-line IC-planar Rac grid drawing of G.

Proof. Let G+ be the augmented graph constructed from G by using Lemma 8.1. Call G′ thesubgraph obtained from G+ by removing one edge from each pair of crossing edges; G′ is amaximal plane graph (see condition (c2) of Lemma 8.1). We apply onG′ the shelling procedureused by de Fraysseix et al. to compute a canonical ordering σ of G′ in O(n) time [dFPP88]; itgoes backwards, starting from a vertex on the outer face of G′ and successively removing avertex per time from the current contour. However, during this procedure, some edges of G′

144

Page 153: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

IC-planarity and Rac graphs Section 8.3

bc

a

Al(b)

(a)

a

Al(b) b c

(b)

Figure 8.14: The lift operation: (a) Vertex b is r units below c. (b) The lift operation on b.

can be replaced with some other edges of G+ that were previously excluded, although G′remains maximal planar. Namely, whenever the shelling procedure encounters the firstvertex d of a kite K = (a, b, c, d), it marks d as top(K), and considers the edge e of K that ismissing in G′. If e is incident to d in K, the procedure reinserts it and removes from G′ theother edge of K that crosses e in G+. If e is not incident to d, the procedure continues withoutvarying G′.

We then compute a drawing ofG+ by using the RAC-drawer algorithm. Let vertex v = vk+1be the next vertex to be placed according to σ . Let U(v) be the set of lower neighborsof v, and let λ(v) and ρ(v) be the leftmost and the rightmost vertex in U(v), respectively.Also, denote by Al(v) the vertices to the top-left of v, and by Ar(v) the vertices to thetop-right of v. If v is not top(K) for some kite K, then v is placed by following the rules ofdFPP, that is, at the intersection of the ±1 diagonals through λ(v) and ρ(v) after applyinga suitable shift operation. If v = top(K) for some kite K, the algorithm proceeds as follows.Let K = (a, b, c, d) with v = d = top(K). The remaining three vertices of K are in Gkand are consecutive along the contour Ck , as they all belong to U(d) (recall that, G′ hasbeen computed in such a way that it contains edge (a, d)). W.l.o.g., assume that they areencountered in the order b, a, c from left to right. Two cases are now possible:Case 1: a ≺ b and a ≺ c in σ . This implies that a = ρ(b) and a = λ(c). The edges (a, b)

and (a, c) have slope −1 and +1, respectively, as they belong to Ck . We now aim at having band c at the same y-coordinate, by applying a lift operation. Suppose first that r = y(c)−y(b) >0; see Figure 8.14a. We apply the following steps:

(i) Temporarily undo the placement of b and of all vertices inAl(b).

(ii) Apply the shift operation to vertex ρ(b) = a by 2r units to the right, which implies thatthe intersection of the diagonals through λ(v) and ρ(v) is moved by r units to the rightand by r units above their former intersection point. Hence, b and c are placed at thesame y-coordinate; see also Figure 8.14b in.

(iii) Reinsert the vertices ofAl(b) and modify σ accordingly. Namely, by definition, eachvertex inAl(b) does not belong to U(b) and it is not an inner vertex below b; therefore,vertices inAl(b) can be safely removed. Hence, σ can be modified by moving all ofthem after b.

If r = y(c) − y(b) < 0, a symmetric operation is applied:

145

Page 154: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 8 Recognizing and Drawing IC-Planar Graphs

b ca

d

(a)

b ca

d

(b)

Figure 8.15: The move operation: (a) Vertex d is s units to the left of b. (b) Moving d.

(i) Undo the placement of c and of all vertices inAr(c).

(ii) Apply the shift operation to vertex ρ(c) by 2r additional units to the right.

(iii) Reinsert the vertices ofAr(c).

Finally, we place d vertically above a. To this aim, we may need to apply a move operation;see Figure 8.15a. If s = x(d) − x(a) > 0, then we apply the shift operation to vertex ρ(d) = cby 2s units to the right and then place d (see Figure 8.15b. If s = x(d) − x(a) < 0, then asymmetric operation is applied. Namely, we apply the shift operation to vertex λ(d) = b by 2sunits to the left and then place d (clearly, the shift operation can be used to operate in the leftdirection with a procedure that is symmetric to the one that operates in the right direction).

Edges (a, d) and (b, c) are now vertical and horizontal, respectively. In the next steps, theirslopes do not change, as their endvertices are shifted only horizontally (they do not belong toother kites); also, a is shifted along with d, as it belongs to U(d).

Case 2: b ≺ a ≺ c ≺ d. This case occurs if there is a separating triangle τ = (u, b, d) thathas a and c (and possibly other vertices) in its interior. A separating triangle is a 3-cyclesuch that by removing its three vertices we disconnect the graph in two components. Onecomponent embedded inside the triangle and one component embedded outside the triangle.Let z1 ≺ . . . ≺ zr be the sequence of r ≥ 1 neighbors of b inside τ, with a = zr and b = λ(z i),with 1 ≤ i ≤ r, as shown in Figure 8.16.

Suppose these vertices are inAr(b), since the case when they are inAl(b) is symmetric.Consider the slopes α i of the edges (z i , z i+1) for 1 ≤ i < r, and let αmin be the negative slopewith the least absolute value among them; see the bold edge in Figure 8.16. Let s be the(negative) slope of the edge (b, ρ(b)). We aim at obtaining a drawing where ∣s∣ ≤ ∣αmin ∣. Tothis aim we apply the shift operation on ρ(b) by x units to the right, which stretches andflattens the edge (b, ρ(b)). If ∣αmin ∣ = h/w, and ∣s∣ = h′/w′, then the value of x is the firsteven integer such that x ≥ (h′w − hw′)/h. The fact that x is even preserves the even length ofthe edges on the contour. This preliminary operation will be useful in the followingNext, let ∆(b) = y(b) − y(ρ(b)) > 0, and let ∆(c) = y(c) − y(b) > 0 , that is, b lies ∆(b)

rows above ρ(b), and c lies ∆(c) rows above b, where the edges (b, a) and (a, c) have slope+1.We apply the following procedure to lift b at the same y-coordinate of c.

(i) We undo the placement of all vertices inAl(b).

146

Page 155: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

IC-planarity and Rac graphs Section 8.3

b

u

d

a=zr

z1

c

z2

τ

Figure 8.16: Illustration for the proof of Theorem 8.5. The edge with slope αmin is thicker.

(ii) If ∆(c) is not a multiple of ∆(b), say ∆(b) + δ = q ⋅ ∆(c) for some integer q, then weshift ρ(c) by 2δ units to the right. This implies that c moves by (δ, δ) above its formerposition.

(iii) We set the y-coordinate of vertex b equal to the y-coordinate of c. To that end, westretch the edge (ρ(b), b) by the factor q. Let w′ be the width and h′ be the heightof the edge (ρ(b), b). The new edge has the same slope as before, and has width qw′and height qh′. This implies shifting all vertices ρ(b), z1 , . . . , zr−1 , a, c by (q − 1)w′units to the right. Vertex b may need a further adjustment by a single unit left shiftif b = λ(d) and the intersection point of the ±1 diagonals through λ(d) and ρ(d) isnot a grid point. Also, we apply the shift operation on λ(b) by (q− 1)h′ units to the left.This particular lifting operation applied on vertex b preserves planarity, which could beviolated only by edges incident to b. Namely, if vertexw is a neighbor of b in U(b), thenthe edge (w , b) is vertically stretched by (q − 1)h′ units. This cannot enforce a crossing,since it means a vertical shift of w. Clearly, b can see ρ(b), since the edge was stretched.Consider the upper right neighbors z1 , . . . , zr with zr = a of b. The edges (b, z i) changedirection from right upward to right downward. Since the absolute value of the slopeof the edge (b, ρ(b)) is bounded from above by αmin , the new position of b is below orto the left of the edges (z i , z i+1) for 1 ≤ i < r. Hence, b can see each such neighbor z i ,including a = zr . The lifting of b has affected all vertices v ∈ Al(b) with y(v) < y(d).

(iv) We re-insert the vertices inAl(b), by changing σ accordingly, as already explained forCase 1.

Finally, we place d = top(K). First, we place d at the intersection point of the ±1 diagonalsthrough λ(d) and ρ(d). Then, we adjust d such that it lies vertically above a. If the preliminaryposition of d is t units to the left (right) of a, then we apply the shift operation on ρ(d) by 2tunits to the right (on λ(d) by 2t units to the left).

To conclude the proof we need to consider the first edge of the construction, which is drawnhorizontal. Since the lift operation requires an edge that does not have slope 0, we may need tointroduce dummy vertices and edges. Namely, if there is a kite including the base edge (v1 , v2),

147

Page 156: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 8 Recognizing and Drawing IC-Planar Graphs

u

l1

l2r1

r2

lk rk

(a) the graph G

ααa

√22 a

α− 45

b

dc

l1 r1

l2 r2

c1

4545

(b) proof that γ = 45 is optimal

α

l1 r1

l2 r2

αa

γ 90 − γ

180 − α− γ

p

(c) analysis of the edge lengths

Figure 8.17: An IC-planar graph G that requires exponential area if drawn Rac.

then we add two dummy vertices 1′ , 2′ below it that form a new base edge (v′1 , v′2). We add theadditional edges (v′1 , v1), (v′1 , v2), (v′1 , vn), (v′2 , v2) and (v′2 , vn) to make the graph maximalplanar. These dummy vertices and edges will be removed once the last vertex vn is placed.

In terms of time complexity,G+ can be computed inO(n) time, by Lemma 8.1. Furthermore,each shift, move and the lift operation can be implemented inO(n) time, hence the placementof a single vertex costs O(n) time. However, in some cases (in particular, when we areplacing the top vertex of a kite), we may need to undo the placement of a set of verticesand re-insert them afterwards. Since when we undo and reinsert a set of vertices we alsoupdate σ accordingly, this guarantees that the placement of the same set of vertices will notbe undone anymore. Thus, the reinsertion of a set of O(n) vertices costs O(n2). Hence, wehave∑n

i=1 O(n + n2) which gives an O(n3) time complexity.

Theorem 8.5 and the fact that there exist n-vertex Rac graphs with 4n − 10 edges [DEL11]while an n-vertex IC-planar graph has at most 13n/4 − 6 edges [ZL13] imply that IC-planargraphs are a proper subfamily of Rac graphs.

We now show that exponential area is required for Rac drawings of IC-planar graphs. Sincethe vertices are not drawn on the integer grid, the drawing area is measured as the proportionbetween the longest and the shortest edge.

Theorem 8.6. There exists an infinite family G of graphs such that every IC-planar straight-lineRac drawing of an n-vertex graph G ∈ G requires area Ω(qn), for some constant q > 1.

Proof. Consider the family G depicted in Figure 8.17a. Let G ∈ G with n vertices. Then, Gconsists of (n − 1)/4 kites that are sequentially connected by two triangles. More specifi-cally, the graph consists of an augmented k = l(n − 1)/2-ladder. We denote the verticeson the left rail by l1 , l2 , . . . , lk and the vertices on the right rail by r1 , r2 , . . . , rk . For everyface (l i , r i , r i+1 , l i+1) with even i, we add the edges (l i , r i+1) and (r i , l i+1) to form a kite. Forevery face (l i , r i , r i+1 , l i+1) with odd i, we add the edge (l i , r i+1) to triangulate it. Then, everyvertex of this augmented ladder is connected to a universal vertex u.

This graph is constructed such that, if we remove one edge for each pair of crossing edges,the resulting planar graph is a triangulation. Thus, there is only one planar embedding (up to

148

Page 157: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

IC-planarity and Rac graphs Section 8.3

the choice of the outer face). Furthermore, the removed crossing edges can only be inserted atone position. Hence, up to the choice of the outer face, the embedding depicted in Figure 8.17ais the only IC-planar embedding. We consider the graph embedded such that vertices u, l1and r1 are on the boundary of the outer face and the circular order of the vertices around u isl1, l2,. . ., lk , rk , rk−1, . . ., r1.Without loss of generality, we assume that the edge (l1 , r1) is drawn horizontally, otherwise

we rotate the drawing to make the edge horizontal. Clearly, the area of the drawing is minimalif and only if x(l1) < x(u) < x(r1). For sake of simplicity, we assume that x(u) = (x(l1) +x(r1))/2, such that the triangle (l1 , r1 , u) is isosceles. Otherwise, the proof works analogously,but with more complicated formulas.Consider the first kite K = (l1 , r1 , r2 , l2) depicted in Figure 8.17b. Let a be the length of

the edge (l1 , r1), and let α be the angle at l1 spanned by (u, l1 , r1) which is equivalent to theangle at r1 spanned by (l1 , r1 , u). Since we have to place a crossing pair with a pair of edgesthat form a Rac inside the kite, it holds that α > 45. The task is to maximize the area of thetriangle (l2 , r2 , u) that contains the rest of the drawing. Obviously, this triangle has maximumarea if l2 and r2 are as close to the edges (l1 , u) and (r1 , u) as possible, respectively. Thus, wewant to minimize the area of the kite K with l2 on (l1 , u) and r2 on (r2 , u).

We now argue that the area of K is minimal if the edge (l2 , r2) is drawn horizontally. Let pbe the length of the diagonal (l1 , r2) and let q be the length of the diagonal (r1 , l2). The areaof a kite is known to be (p ⋅ q)/2. Since α > 45, the length p and q increases with ascendingy-coordinate of r2 and l2, respectively. Since the crossing has to be Rac, if we move r2 furtherup, then we have to move l2 further down, and vice versa. Let γ be the angle at l1 spannedby (r2 , l1 , r2). Then, the angle at r2 spanned by (lr , r2 , l1) is 180 − α − γ. By the solution iftriangles, it holds that

p = a sin α/ sin(180 − α − γ) = a sin α/ sin(α + γ)= a sin α/(sin α cos γ + cos α sin γ).

Analogously, it holds that

q = a sin α/ sin(α + 90 − γ) = a sin α/ cos(γ − α)= a sin α/(cos α cos γ + sin α sin γ).

Making use of trigonometric functions, we get that the product is

pq = a2 sin2 α/( sin α cos α cos2 γ + cos2 α sin γ cos γ+ sin2 α sin γ cos γ + sin α cos α sin2 γ)

= 12a2 sin2 α/( sin(2α) cos2 γ + cos2 α sin(2γ)

+ sin2 α sin(2γ) + sin(2α) sin2 γ)

= 14a2 sin2 α/( sin(2α)(1 + cos(2γ)) + (1 + cos(2α)) sin(2γ)

+ (1 − cos(2α)) sin(2γ) + sin(2α)(1 − cos(2γ)))

= 18a2 sin2 α/(sin(2α) + sin(2γ))

149

Page 158: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 8 Recognizing and Drawing IC-Planar Graphs

Since a and α are given, the product is minimal if sin(2γ) is maximal. As the sine function hasits maximum at sin(90), the area of the kite is minimal for γ = 45, and thus, the edge (l2 , r2)is drawn horizontally.Now, we show that the area of the triangle (l2 , r2 , u) is a fraction of the area of the tri-

angle (l1 , r1 , u) that depends only on α and a. Consider the kite depicted in Figure 8.17c.Let c1 be the crossing point of the edges (l1 , r2) and (r1 , l2). Since γ = 45, the length ofthe edge (l1 , c1) is

√2a/2. Let b be the length of the edge (c1 , l2). The angle at l1 spanned

by (c1 , l1 , l2) is α − 45. The tangent of this angle is defined as

tan(α − 45) = b√2a/2

= 2 b√2a

.

Further, from the subtraction theorem of tangent follows

tan(α − 45) = tan α − tan 45

1 + tan α tan 45= tan α − 1tan α + 1

Combining these equations, we get that

b = a√22

tan α − 1tan α + 1

.

Let d be the length of the edge (l2 , r2). Consider the triangle spanned by l2, c1 and themidpointof the edge. This triangle has a hypotenuse of length b and two catheti of length c = d/2.Using the Pythagorean theorem, we obtain

2c2 = b2 ⇒ c = b√2= a2tan α − 1tan α + 1

and thus

d = 2c = a tan α − 1tan α + 1

.

Since α > 45, this fraction is smaller than 1.Now, consider another kite K i = (l2i−1 , r2i−1 , r2i , l2i), 2 ≤ i ≤ k. Letting d i be the length of

the edge (l2i , r2i), it holds that

d i = d i−1tan α − 1tan α + 1

.

This leads us to

dk = a (tan α − 1tan α + 1

)k.

If we impose dk = 1, we have that a = qk , with q = tan α+1tan α−1 > 1. Since k ∈ O(n), we have that the

ratio between the longest and the shortest segment of the drawing is Ω(qn), which concludesour proof.

150

Page 159: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Conclucing Remarks Section 8.4

8.4 Conclucing Remarks

We have shown that every IC-planar graph can be drawn straight-line in quadratic area,although the angle formed by any two crossing edges can be small. Conversely, straight-lineRac drawings of IC-planar graphs may require exponential area. It would be interestingto design algorithms that draw IC-planar graphs in polynomial area by relaxing the strictconstraint that edge intersections are at right-angles and instead asking for drawings that haveclose to and good crossing resolution. Also, although IC-planar graphs are both 1-planar andRac, characterizing the intersection between these two classes is still an open problem.

151

Page 160: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz
Page 161: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

8ConclusionIn this thesis, we have investigated three aspects of angular schematization in graph drawing:placement of boxes, visual guidance, and crossings with large angles. We have presentedseveral efficient algorithms that provided visually appealing drawings with large angles. Forsome problems, we have also given NP-hardness results and approximation algorithms. Wewill now browse through a short overview on the results stated in this thesis and state someproblems that are still open.

In Chapter 3, we have given the first polynomial-time algorithms of testing and computinga solution to the Boundary Labeling problem with two adjacent sides, three sides, and foursides. We have also presented an efficient algorithm to maximize the number of labeled sitesand, for the two-sided case, to minimize the total leader length. The latter problem remainsopen for the three- and four-sided case.

OpenProblem 1. Can aminimum-length solution of Three-Sided and Four-SidedBound-ary Labeling be computed in polynomial time?

In Chapter 4, we have presented approximation algorithms for representing planar graphs ascontact graphs of boxes with given dimensions. We have given the first constant-factor approx-imations for general graphs. For several graph classes, we have improved the approximationfactor. Further, we have shown that the problem is APX-complete even for bipartite graphsof bounded degree. Basically, we acquired these algorithms by reduction to our solution forstars. This leads us to the following open problems.

Open Problem 2. Is there any other graph class (except paths and cycles) that admit a directapproximation algorithm in Max-Crown?

Open Problem 3. Can we find constant-factor approximation algorithms if the total widthand height of the representation is given?

In Chapter 5, we have given an algorithm to draw any planar of maximum degree 4 graphwith smooth complexity 2. If the input graph is planar of maximum degree 3 , then thealgorithm only requires polynomial area. Further, we have presented an algorithm that drawsbiconnected outerplane graphs of maximum degree 4 with smooth complexity 1. We havealso shown that planar graphs of maximum degree 4 require exponential area if drawn withsmooth complexity 1, and that there is an infinite family of graphs that cannot be drawnwith smooth complexity 1, although they only require one bend in an orthogonal layout. Thefollowing problems remain open.

Open Problem 4. Can any planar graph of maximum degree 4 be drawn in polynomial areawith smooth complexity 2?

Open Problem 5. Can we identify larger classes of graphs admitting smooth complexity 1layouts, for example, does any (not necessarily biconnected) outerplanar graph of maximumdegree 4 or any planar graph of maximum degree 3 admit a smooth complexity 1 layout?

Page 162: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Chapter 8 Recognizing and Drawing IC-Planar Graphs

Open Problem 6. Is it NP-hard to decide whether a given planar graph of maximum degree 4admits a smooth complexity 1 layout?

In Chapter 6, we have introduced two algorithms for monotone drawings of trees. First,we have given a linear-time algorithm that draws any n-vertex tree on the O(n1.5) × O(n1.5)grid in a monotone fashion and close-to-perfect angular resolution. Second, we have shownthat any tree admits a strongly monotone drawing. For proper binary trees, the drawing isalso strictly convex. Several questions remain open.

Open Problem 7. Does any tree admit a strongly monotone drawing on a grid of polynomialsize?

Open Problem 8. Are there biconnected (or triconnected) planar graphs that do not admit astrongly monotone drawing? If yes, can this be tested efficiently?

Open Problem 9. Are our drawings for general trees not just strongly monotone but alsoconvex?

In Chapter 7, we have considered the problem of simultaneously drawing planar graphswith right-angle crossings and a constant number of bends per edge. Our main result was thattwo planar graphs always admit a Rac simultaneous drawing with at most six bends per edge.Further, we have given betters bounds on the number of bends per edge for more restrictedgraph classes. All drawings can be computed efficiently and require quadratic area. Someinteresting problems remain open.

Open Problem 10. What other non-trivial classes of graphs admit a RacSim drawing withless than six bends per edge?

Open Problem 11. Can we reduce the number of bends per edge if we do not insist onright-angle crossings, but allow angles that are close to right angles?

Open Problem 12. Given two or more planar graphs on the same set of vertices and a non-negative integer k, can we test whether there is a RacSim drawing in which each graph isdrawn with at most k bends per edge?

Open Problem 13. Can we achieve sub-quadratic area for special subclasses of planar graphsif we increase the number of bends?

In Chapter 8, we have studied IC-planar graphs. We have shown that every IC-planar graphadmits a drawing on the O(n)×O(n) grid that can be computed in linear time. If we restrictthe crossings to Rac, then we can compute drawings in exponential area. Both area boundsare asymptotically tight. Deciding whether a given graph is IC-planar is NP-complete even ifthe rotation system is given. Given, however, a triangulated planar graph, we can efficientlytest whether the graph can be made IC-planar by adding a matching. The following questionsremain open.

Open Problem 14. Can we efficiently test whether a graph with given rotation system ismaximal IC-planar?

154

Page 163: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Conclucing Remarks Section 8.4

Open Problem 15. Can we achieve polynomial-size IC-planar drawings by using crossingangles that are close to right angles?

Open Problem 16. Do larger graph classes that lie in the intersection of the class of 1-planargraphs and the class of Rac graphs?

155

Page 164: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz
Page 165: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

8Bibliography[AAP+97] Pankaj K. Agarwal, Boris Aronov, János Pach, Richard Pollack, andMicha Sharir.

Quasi-planar graphs have a linear number of edges. Combinatorica, 17(1):1–9,1997. [see page 127]

[ABB+13] Christopher Auer, Christian Bachmaier, Franz J. Brandenburg, AndreasGleißner, Kathrin Hanauer, Daniel Neuwirth, and Josef Reislhuber. Recognizingouter 1-planar graphs in linear time. In Stephen K. Wismath and AlexanderWolff, editors, Proc. 21st Int. Symp. Graph Drawing (GD’13), volume 8242 ofLecture Notes Comput. Sci., pages 107–118. Springer-Verlag, 2013. [see page 127]

[ABF+10] Patrizio Angelini, GiuseppeDi Battista, Fabrizio Frati, Vít Jelínek, Jan Kratochvíl,Maurizio Patrignani, and Ignaz Rutter. Testing planarity of partially embeddedgraphs. In Moses Charikar, editor, Proc. 21st Ann. ACM-SIAM Symp. DiscreteAlgorithms (SODA’10), pages 202–221. SIAM, 2010. [see page 107]

[ABF+12] Patrizio Angelini, Giuseppe Di Battista, Fabrizio Frati, Maurizio Patrignani, andIgnaz Rutter. Testing the simultaneous embeddability of two graphs whoseintersection is a biconnected or a connected graph. J. Discrete Algorithms, 14:150–172, 2012. [see page 107]

[ABGR15] Christopher Auer, Franz J. Brandenburg, Andreas Gleißner, and Josef Reislhu-ber. 1-planarity of graphs with a rotation system. J. Graph Algorithms Appl.,19(1):67–86, 2015. [see pages 128, 133, and 134]

[ABK13] Md. Jawaherul Alam, Franz J. Brandenburg, and Stephen G. Kobourov. Straight-line grid drawings of 3-connected 1-planar graphs. In Stephen K. Wismath andAlexander Wolff, editors, Proc. 21st Int. Symp. Graph Drawing (GD’13), volume8242 of Lecture Notes Comput. Sci., pages 83–94. Springer-Verlag, 2013. [seepages 127, 129, and 131]

[ABK+14] Md. Jawaherul Alam, Michael A. Bekos, Michael Kaufmann, Philipp Kinder-mann, StephenG.Kobourov, andAlexanderWolff. Smooth orthogonal drawingsof planar graphs. In A. Pardo and A. Viola, editors, Proc. 13th Latin Am. Symp.Theor. Inform. (LATIN’14), volume 8392 of Lecture Notes Comput. Sci., pages144–155. Springer-Verlag, 2014. [see page 5]

[ABKS13] Evmorfia N. Argyriou, Michael A. Bekos, Michael Kaufmann, and AntoniosSymvonis. Geometric RAC simultaneous drawings of graphs. J. Graph Algo-rithms Appl., 17(1):11–34, 2013. [see page 108]

Page 166: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Bibliography

[ABS12] Evmorfia N. Argyriou, Michael A. Bekos, and Antonios Symvonis. The straight-line RAC drawing problem is NP-hard. J. Graph Algorithms Appl., 16(2):569–597,2012. [see page 127]

[ACB+12] Patrizio Angelini, Enrico Colasante, Giuseppe Di Battista, Fabrizio Frati, andMaurizio Patrignani. Monotone drawings of graphs. J. Graph Algorithms Appl.,16(1):5–35, 2012. [see pages 89, 90, 97, 98, and 103]

[ACG+13] Soroush Alamdari, Timothy M. Chan, Elyot Grant, Anna Lubiw, and VinayakPathak. Self-approaching graphs. In Walter Didimo and Maurizio Patrignani,editors, Proc. 20th Int. Symp. Graph Drawing (GD’12), volume 7704 of LectureNotes Comput. Sci., pages 260–271. Springer-Verlag, 2013. [see page 89]

[Ack09] Eyal Ackerman. On the maximum number of edges in topological graphs withno four pairwise crossing edges. Discrete Comput. Geom., 41(3):365–375, 2009.[see page 127]

[Ack14] Eyal Ackerman. A note on 1-planar graphs. Discrete Appl. Math., 175:104–108,2014. [see page 66]

[ACM89] EstherM.Arkin, Robert Connelly, and Joseph S. B.Mitchell. Onmonotone pathsamong obstacles with applications to planning assemblies. In Kurt Mehlhorn,editor, Proc. 5th Ann. ACM Symp. Comput. Geom. (SoCG’89), pages 334–343.ACM, 1989. [see page 89]

[ADK+13] Patrizio Angelini, Walter Didimo, Stephen Kobourov, Tamara Mchedlidze, Vin-cenzo Roselli, Antonios Symvonis, and Stephen Wismath. Monotone drawingsof graphs with fixed embedding. Algorithmica, pages 1–25, 2013. [see page 90]

[AES99] Pankaj K. Agarwal, Alon Efrat, and Micha Sharir. Vertical decomposition ofshallow levels in 3-dimensional arrangements and its applications. SIAM J.Comput., 29(3):912–953, 1999. [see page 23]

[AGKN12] Patrizio Angelini, Markus Geyer, Michael Kaufmann, and Daniel Neuwirth.On a tree and a path with no geometric simultaneous embedding. J. GraphAlgorithms Appl., 16(1):37–83, 2012. [see page 107]

[Alb08] Michael O. Albertson. Chromatic number, independence ratio, and crossingnumber. Ars Math. Contemp., 1(1):1–6, 2008. [see page 128]

[APT79] Bengt Aspvall, Michael F. Plass, and Robert Endre Tarjan. A linear-time al-gorithm for testing the truth of certain quantified boolean formulas. Inform.Process. Lett., 8(3):121–123, 1979. [see page 141]

[AT07] Eyal Ackerman and Gábor Tardos. On the maximum number of edges inquasi-planar graphs. J. Comb. Theory, Series A, 114(3):563–571, 2007. [seepage 127]

158

Page 167: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Bibliography

[BCD+07] Peter Brass, Eowyn Cenek, Cristian A. Duncan, Alon Efrat, Cesim Erten, Dan P.Ismailescu, Stephen G. Kobourov, Anna Lubiw, and Joseph S. B. Mitchell. Onsimultaneous planar graph embeddings. Comput. Geom. Theory Appl., 36(2):117–130, 2007. [see pages 107 and 114]

[BCF+13] Michael A. Bekos, Sabine Cornelsen, Martin Fink, Seokhee Hong, MichaelKaufmann, Martin Nöllenburg, Ignaz Rutter, and Antonios Symvonis. Many-to-one boundary labeling with backbones. In Stephen Wismath and AlexanderWolff, editors, Proc. 21st Int. Sympos. Graph Drawing (GD’13), volume 8242 ofLecture Notes Comput. Sci., pages 244–255. Springer-Verlag, 2013. [see page 23]

[BCG+14] Michael A. Bekos, Sabine Cornelsen, Luca Grilli, Seok-Hee Hong, and MichaelKaufmann. On the recognition of fan-planar and maximal outer-fan-planargraphs. In Christian A. Duncan and Antonios Symvonis, editors, Proc. 22ndInt. Symp. Graph Drawing (GD’14), volume 8871 of Lecture Notes Comput. Sci.,pages 198–209. Springer-Verlag, 2014. [see page 127]

[BDD+14] Carla Binucci, Emilio Di Giacomo, Walter Didimo, Fabrizio Montecchiani,Maurizio Patrignani, and Ioannis G. Tollis. Fan-planar graphs: Combinato-rial properties and complexity results. In Christian A. Duncan and AntoniosSymvonis, editors, Proc. 22nd Int. Symp. Graph Drawing (GD’14), volume 8871 ofLecture Notes Comput. Sci., pages 186–197. Springer-Verlag, 2014. [see pages 127and 128]

[BEG+12] Franz-Josef Brandenburg, David Eppstein, Andreas Gleißner, Michael T.Goodrich, Kathrin Hanauer, and Josef Reislhuber. On the density of maxi-mal 1-planar graphs. In Walter Didimo and Maurizio Patrignani, editors, Proc.20th Int. Symp. Graph Drawing (GD’12), volume 7704 of Lecture Notes Comput.Sci., pages 327–338. Springer-Verlag, 2012. [see page 127]

[BETT99] Giuseppe Di Battista, Peter Eades, Roberto Tamassia, and Ioannis G. Tollis.Graph Drawing: Algorithms for the Visualization of Graphs. Prentice Hall, 1999.[see page 11]

[BF96] Oliver Bastert and Sándor P. Fekete. Geometrische Verdrahtungsprobleme.Technical Report 96–247, Universität zu Köln, 1996. [see page 23]

[BFK+14] Lukas Barth, Sara Irina Fabrikant, Stephen Kobourov, Anna Lubiw, MartinNöllenburg, Yoshio Okamoto, Sergey Pupyrev, Claudio Squarcella, TorstenUeckerdt, and AlexanderWolff. Semantic word cloud representations: Hardnessand approximation algorithms. In Alberto Pardo and Alfredo Viola, editors,Proc. 11th Latin American Symp. Theor. Inform. (LATIN’14), volume 8392 ofLecture Notes Comput. Sci., pages 514–525. Springer-Verlag, 2014. [see pages 54,55, 56, 57, 62, 63, and 65]

[BGPV08] Adam L. Buchsbaum, Emden R. Gansner, Cecilia Magdalena Procopiuc, andSuresh Venkatasubramanian. Rectangular layouts and contact graphs. ACMTrans. Algorithms, 4(1):8:1–8:28, 2008. [see page 54]

159

Page 168: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Bibliography

[BGR14] Michael A. Bekos, Martin Gronemann, and Chrysanthi N. Raftopoulou. Two-page book embeddings of 4-planar graphs. In Ernst W. Mayr and NatachaPortier, editors, Proc. 31st Int. Symp. Theor. Aspects Comput. Sci. (STACS’14),volume 25 of LIPIcs, pages 137–148. Schloss Dagstuhl - Leibniz-Zentrum fuerInformatik, 2014. [see page 112]

[BHKN09] Marc Benkert, Herman J. Haverkort, Moritz Kroll, and Martin Nöllenburg.Algorithms for multi-criteria boundary labeling. J. Graph Algorithms Appl.,13(3):289–317, 2009. [see pages 22, 23, and 25]

[BK79] Frank Bernhart and Paul C. Kainen. The book thickness of a graph. J. Comb.Theory, Series B, 27(3):320–331, 1979. [see pages 109 and 112]

[BK98] Therese Biedl and Goos Kant. A better heuristic for orthogonal graph drawings.Comput. Geom. Theory Appl., 9(3):159–180, 1998. [see pages 71, 72, 74, and 78]

[BKKS13] Michael A. Bekos, Michael Kaufmann, Stephen G. Kobourov, and AntonisSymvonis. Smooth orthogonal layouts. In Walter Didimo and Maurizio Pa-trignani, editors, Proc. 20th Int. Symp. Graph Drawing (GD’12), volume 7704 ofLecture Notes Comput. Sci., pages 150–161. Springer-Verlag, 2013. [see pages 71,72, 73, 79, 84, and 85]

[BKNS10] Michael A. Bekos, Michael Kaufmann,MartinNöllenburg, andAntonios Symvo-nis. Boundary labeling with octilinear leaders. Algorithmica, 57(3):436–461,2010. [see page 23]

[BKP14] Lukas Barth, Stephen Kobourov, and Sergey Pupyrev. Experimental comparisonof semantic word clouds. In Joachim Gudmundsson and Jyrki Katajainen,editors, Proc. 13th Int. Symp. Experimental Algorithms (SEA’14), volume 8504 ofLecture Notes Comput. Sci., pages 247–258. Springer-Verlag, 2014. [see page 55]

[BKPS10] Michael A. Bekos, Michael Kaufmann, Katerina Potika, and Antonios Symvonis.Area-feature boundary labeling. Comput. J., 53(6):827–841, 2010. [see pages 22and 36]

[BKR13a] Thomas Bläsius, Annette Karrer, and Ignaz Rutter. Simultaneous embedding:Edge orderings, relative positions, cutvertices. In Stephen Wismath and Alexan-der Wolff, editors, Proc. 21st Int. Symp. Graph Drawing (GD’13), volume 8242 ofLecture Notes Comput. Sci., pages 220–231. Springer-Verlag, 2013. [see page 107]

[BKR13b] Thomas Bläsius, Stephen G. Kobourov, and Ignaz Rutter. Simultaneous embed-ding of planar graphs. In Roberto Tamassia, editor,Handbook of Graph Drawingand Visualization, chapter 11, pages 349–381. CRC Press, 2013. [see page 107]

[BKRS01] Oleg V. Borodin, Alexandr V. Kostochka, André Raspaud, and Eric Sopena.Acyclic colouring of 1-planar graphs. Discrete Appl. Math., 114(1-3):29–41, 2001.[see page 127]

160

Page 169: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Bibliography

[BKRW14] Thomas Bläsius, Marcus Krug, Ignaz Rutter, and Dorothea Wagner. Orthogonalgraph drawing with flexibility constraints. Algorithmica, 68(4):859–885, 2014.[see page 71]

[BKSW07] Michael A. Bekos, Michael Kaufmann, Antonios Symvonis, and AlexanderWolff. Boundary labeling: Models and efficient algorithms for rectangular maps.Comput. Geom. Theory Appl., 36(3):215–236, 2007. [see pages 21, 22, and 23]

[BKV11] Patrick Briest, Piotr Krysta, and Berthold Vöcking. Approximation techniquesfor utilitarian mechanism design. SIAM J. Comput., 40(6):1587–1622, 2011. [seepages 56 and 57]

[Bor84] O. V. Borodin. Solution of the Ringel problem on vertex-face coloring of planargraphs and coloring of 1-planar graphs. Metody Diskret. Analiz., 41:12–26, 108,1984. [see page 127]

[BR06] Imre Bárány and Günter Rote. Strictly convex drawings of planar graphs. Doc.Math., 11:369–391, 2006. [see page 91]

[Bra14] Franz J. Brandenburg. 1-visibility representations of 1-planar graphs. J. GraphAlgorithms Appl., 18(3):421–438, 2014. [see page 128]

[BS93] Graham Brightwell and Edward R. Scheinerman. Representations of planargraphs. SIAM J. Discrete Math., 6(2):214–229, 1993. [see page 108]

[BvDF+14] Michael A. Bekos, Thomas C. van Dijk, Martin Fink, Philipp Kindermann,Stephen Kobourov, Sergey Pupyrev, Joachim Spoerhase, and Alexander Wolff.Improved approximation algorithms for box contact representations. In An-dreas S. Schulz and Dorothea Wagner, editors, Proc. 22nd Europ. Symp. Al-gorithms (ESA’14), volume 8737 of Lecture Notes Comput. Sci., pages 87–99.Springer-Verlag, September 2014. [see page 4]

[BvDKW15] Michael A. Bekos, Thomas C. van Dijk, Philipp Kindermann, and AlexanderWolff. Simultaneous drawing of planar graphs with right-angle crossings and fewbends. In M. Sohel Rahman and Etsuji Tojima, editors, Proc. 9th Int. Workshopon Algorithms and Computation (WALCOM’15), volume 8973 of Lecture NotesComput. Sci., pages 222–233. Springer-Verlag, February 2015. [see page 8]

[Cc99] Bernard Chazelle and 36 co-authors. The computational geometry impact taskforce report. In B. Chazelle, J. E. Goodman, and R. Pollack, editors, Adv. Dis-crete and Comput. Geom., volume 223, pages 407–463. American MathematicalSociety, Providence, RI, 1999. [see page 21]

[CE07] Josiah Carlson and David Eppstein. Trees with convex faces and optimal angles.In Michael Kaufmann and Dorothea Wagner, editors, Proc. 14th Int. Symp.Graph Drawing (GD’06), volume 4372 of Lecture Notes Comput. Sci., pages77–88. Springer-Verlag, 2007. [see pages 90, 92, 96, 97, and 98]

161

Page 170: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Bibliography

[CHKK13] Otfried Cheong, Sariel Har-Peled, Heuna Kim, and Hyo-Sil Kim. On thenumber of edges of fan-crossing free graphs. In Leizhen Cai, Siu-Wing Cheng,and TakWah Lam, editors, Proc. 24th Int. Symp. Algorithms Comput. (ISAAC’13),volume 8283 of Lecture Notes Comput. Sci., pages 163–173. Springer-Verlag, 2013.[see page 127]

[CHKL13] TimothyM. Chan, Hella-FranziskaHoffmann, StephenKiazyk, andAnna Lubiw.Minimum length embedding of planar graphs at fixed vertex locations. InStephen K. Wismath and Alexander Wolff, editors, Proc. 21st Int. Symp. GraphDrawing (GD’13), volume 8242 of Lecture Notes Comput. Sci., pages 376–387.Springer-Verlag, 2013. [see page 23]

[CK05] Chandra Chekuri and Sanjeev Khanna. A polynomial time approximationscheme for the multiple knapsack problem. SIAM J. Comput., 35(3):713–728,2005. [see pages 17 and 54]

[CKR06] Reuven Cohen, Liran Katzir, and Danny Raz. An efficient approximation for thegeneralized assignment problem. Inform. Process. Lett., 100(4):162–166, 2006.[see page 56]

[CLRS09] Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein.Introduction to Algorithms. MIT Press and McGraw-Hill, third edition edition,2009. [see page 11]

[CM13] Sergio Cabello and Bojan Mohar. Adding one edge to planar graphs makescrossing number and 1-planarity hard. SIAM J. Comput., 42(5):1803–1829, 2013.[see pages 15 and 16]

[CNP83] Gérard Cornuéjols, Denis Naddef, and William R. Pulleyblank. Halin graphsand the travelling salesman problem. Math. Program., 26(3):287–294, 1983. [seepage 112]

[Coo71] Stephen A. Cook. The complexity of theorem-proving procedures. InMichael A.Harrison, Ranan B. Banerji, and Jeffrey D. Ullman, editors, Proc. 3rd Ann. ACMSymp. Theory Comput. (STOC’71), pages 151–158. ACM, 1971. [see page 16]

[CP95] Marek Chrobak and Thomas H. Payne. A linear-time algorithm for drawing aplanar graph on a grid. Inform. Process. Lett., 54(4):241–246, 1995. [see page 143]

[CvL+11] Sergio Cabello, Marc van Kreveld, Giuseppe Liotta, Henk Meijer, Bettina Speck-mann, and Kevin Verbeek. Geometric simultaneous embeddings of a graphand a matching. J. Graph Algorithms Appl., 15(1):79–96, 2011. [see pages 107, 118,and 119]

[CWL+10] Weiwei Cui, Yingcai Wu, Shixia Liu, Furu Wei, Michelle X. Zhou, and HuaminQu. Context-preserving dynamic word cloud visualization. Comput. Graph.Appl., 30(6):42–53, 2010. [see page 55]

162

Page 171: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Bibliography

[DDEL14] Emilio Di Giacomo, Walter Didimo, Peter Eades, and Giuseppe Liotta. 2-layerright angle crossing drawings. Algorithmica, 68(4):954–997, 2014. [see page 127]

[DDLM12] Emilio Di Giacomo, Walter Didimo, Giuseppe Liotta, and Fabrizio Montecchi-ani. h-quasi planar drawings of bounded treewidth graphs in linear area. InMartin Charles Golumbic, Michal Stern, Avivit Levy, and Gila Morgenstern,editors, Proc. 38th Int. Workshop Grapth-Theor. Concepts Comput. Sci. (WG’12),volume 7551 of Lecture Notes Comput. Sci., pages 91–102. Springer-Verlag, 2012.[see page 127]

[DDLM13] Emilio Di Giacomo, Walter Didimo, Giuseppe Liotta, and Fabrizio Montecchi-ani. Area requirement of graph drawings with few crossings per edge. Comput.Geom., 46(8):909–916, 2013. [see page 127]

[DE12] Hooman Reisi Dehkordi and Peter Eades. Every outer-1-plane graph has a rightangle crossing drawing. Int. J. Comput. Geom. Appl., 22(06):543–557, 2012. [seepage 142]

[DEG+12] Christian A. Duncan, David Eppstein, Michael T. Goodrich, Stephen G.Kobourov, and Martin Nöllenburg. Lombardi drawings of graphs. J. GraphAlgorithms Appl., 16(1):85–108, 2012. [see page 71]

[DEG+13] Christian A. Duncan, David Eppstein, Michael T. Goodrich, Stephen G.Kobourov, and Martin Nöllenburg. Drawing trees with perfect angular res-olution and polynomial area. Discrete Comput. Geom., 49(2):157–182, 2013. [seepage 71]

[DEL11] Walter Didimo, Peter Eades, and Giuseppe Liotta. Drawing graphs with rightangle crossings. Theoretical Computer Science, 412(39):5156–5166, 2011. [seepages 127 and 148]

[dFPP88] Hubert de Fraysseix, János Pach, and Richard Pollack. Small sets supportingfary embeddings of planar graphs. In Janos Simon, editor, Proc. 20th Ann. ACMSymp. Theory Comput. (STOC’88), pages 426–433. ACM, 1988. [see page 144]

[dFPP90] Hubert de Fraysseix, János Pach, and Richard Pollack. How to draw a planargraph on a grid. Combinatorica, 10(1):41–51, 1990. [see pages 142 and 143]

[Dha10] Raghavan Dhandapani. Greedy drawings of triangulations. Discrete Comput.Geom., 43(2):375–392, 2010. [see page 89]

[Did13] Walter Didimo. Density of straight-line 1-planar graph drawings. Inform. Process.Lett., 113(7):236–240, 2013. [see page 127]

[DL12] WalterDidimo andGiuseppe Liotta. The crossing angle resolution in graph draw-ing. In János Pach, editor, Thirty Essays on Geometric Graph Theory. Springer,2012. [see page 127]

[DLT84] Danny Dolev, Tom Leighton, and Howard Trickey. Planar embedding of planargraphs. Adv. Comput. Res., 2:147–161, 1984. [see page 131]

163

Page 172: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Bibliography

[DMS05] Tim Dwyer, Kim Marriott, and Peter J. Stuckey. Fast node overlap removal.In Patrick Healy and Nikola S. Nikolov, editors, Proc. 13th Int. Symp. GraphDrawing (GD’05), volume 3843 of Lecture Notes Comput. Sci., pages 153–164.Springer-Verlag, 2005. [see page 54]

[EBGJ+08] Alejandro Estrella-Balderrama, Elisabeth Gassner, Michael Jünger, MerijamPercan, Marcus Schaefer, and Michael Schulz. Simultaneous geometric graphembeddings. In Seok-Hee Hong, Takao Nishizeki, and Wu Quan, editors, Proc.16th Int. Symp. Graph Drawing (GD’08), volume 4875 of Lecture Notes Comput.Sci., pages 280–290. Springer-Verlag, 2008. [see page 107]

[EHK+13] Peter Eades, Seok-Hee Hong, Naoki Katoh, Giuseppe Liotta, Pascal Schweitzer,and Yusuke Suzuki. A linear time algorithm for testing maximal 1-planarity ofgraphs with a rotation system. Theoretical Computer Science, 513:65–76, 2013.[see page 127]

[EK05a] Cesim Erten and Stephen G. Kobourov. Simultaneous embedding of a planargraph and its dual on the grid. Theory Comput. Syst., 38(3):313–327, 2005. [seepage 108]

[EK05b] Cesim Erten and Stephen G. Kobourov. Simultaneous embedding of planargraphs with few bends. J. Graph Algorithms Appl., 9(3):347–364, 2005. [seepages 107 and 109]

[EKL+13] William S. Evans, Michael Kaufmann, William Lenhart, Giuseppe Liotta,Tamara Mchedlidze, and Stephen K. Wismath. Bar 1-visibility graphs andtheir relation to other nearly planar graphs. Arxiv report, 2013. Available athttp://arxiv.org/abs/1312.5520. [see page 128]

[EL13] Peter Eades and Giuseppe Liotta. Right angle crossing graphs and 1-planarity.Discrete Appl. Math., 161(7-8):961–969, 2013. [see pages 8, 127, 128, 129, and 142]

[EMSV12] David Eppstein, Elena Mumford, Bettina Speckmann, and Kevin Verbeek. Area-universal and constrained rectangular layouts. SIAM J. Comput., 41(3):537–564,2012. [see page 54]

[ER04] Günes Erkan and Dragomir R. Radev. Lexrank: Graph-based lexical centralityas salience in text summarization. J. Artif. Int. Res., 22(1):457–479, 2004. [seepage 55]

[Fel04] Stefan Felsner. Geometric Graphs and Arrangements. Vieweg Verlag, 2004. [seepage 112]

[Fel13] Stefan Felsner. Rectangle and square representations of planar graphs. InJános Pach, editor, Thirty Essays on Geometric Graph Theory, pages 213–248.Springer-Verlag, 2013. [see page 54]

[FGMS11] Lisa Fleischer, Michel X. Goemans, Vahab Mirrokni, and Maxim Sviridenko.Tight approximation algorithms for maximum separable assignment problems.Math. Oper. Res., 36(3):416–431, 2011. [see pages 17, 54, 56, and 67]

164

Page 173: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Bibliography

[FHH+93] Michael Formann, Torben Hagerup, James Haralambides, Michael Kaufmann,FrankThomson Leighton, Antonios Symvonis, EmoWelzl, andGerhard J.Woeg-inger. Drawing graphs in the plane with high resolution. SIAM J. Comput.,22(5):1035–1052, 1993. [see page 2]

[FHS+12] Martin Fink, Jan-Henrik Haunert, André Schulz, Joachim Spoerhase, andAlexander Wolff. Algorithms for labeling focus regions. IEEE Trans. Visual.Comput. Graphics, 18(12):2583–2592, 2012. [see page 23]

[FMC96] Herbert Freeman, Sean Marrinan, and Hitesh Chitalia. Automated labeling ofsoil survey maps. In Proc. ASPRS-ACSM Ann. Conv., Baltimore, volume 1, pages51–59, 1996. [see page 21]

[FPS13] Jacob Fox, János Pach, and Andrew Suk. The number of edges in k-quasi-planargraphs. SIAM J. Discrete Math., 27(1):550–561, 2013. [see page 127]

[Fre87] Greg N. Frederickson. Fast algorithms for shortest paths in planar graphs, withapplications. SIAM J. Comput., 16(6):1004–1022, 1987. [see pages 55 and 63]

[GB07] Alexander Grigoriev and Hans L. Bodlaender. Algorithms for graphs embed-dable with few crossings per edge. Algorithmica, 49(1):1–11, 2007. [see page 16]

[GH10] Emden R. Gansner and Yifan Hu. Efficient, proximity-preserving node overlapremoval. J. Graph Algorithms Appl., 14(1):53–74, 2010. [see page 54]

[GHKR14] Luca Grilli, Seok-Hee Hong, Jan Kratochvíl, and Ignaz Rutter. Drawing simulta-neously embedded graphs with few bends. In Christian Duncan and AntoniosSymvonis, editors, Proc. 22nd Int. Symp. Graph Drawing (GD’14), volume 8871of Lecture Notes Comput. Sci., pages 40–51. Springer-Verlag, 2014. [see page 107]

[GHN11] Andreas Gemsa, Jan-Henrik Haunert, and Martin Nöllenburg. Boundary-labeling algorithms for panorama images. In Isabel F. Cruz, Divyakant Agrawal,Christian S. Jensen, Eyal Ofek, and Egemen Tanin, editors, Proc. 19th ACMSIGSPATIAL Int. Conf. Adv. Geogr. Inform. Syst. (ACM-GIS’11), pages 289–298.ACM, 2011. [see page 23]

[Gib85] Alan Gibbons. Algorithmic Graph Theory. Camb. Univ. Press, 1985. [see page 11]

[GJ78] Michael R. Garey and David S. Johnson. “ strong ” np-completeness results:Motivation, examples, and implications. J. ACM, 25(3):499–508, 1978. [seepage 15]

[GJ79] Michael R. Garey and David S. Johnson. Computers and Intractability: A Guideto the Theory of NP-Completeness. W. H. Freeman & Co., 1979. [see page 15]

[GJ83] Michael R. Garey andDavid S. Johnson. Crossing number is np-complete. SIAMJ. Algebraic and Discrete Methods, 4(3):312–316, 1983. [see pages 14 and 132]

165

Page 174: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Bibliography

[GMPP91] P. Gritzmann, B. Mohar, J. Pach, and R. Pollack. Embedding a planar triangula-tion with vertices at specified positions. Amer. Math. Mon., 98:165–166, 1991.[see page 23]

[GT94] Ashim Garg and Roberto Tamassia. Planar drawings and angular resolution:Algorithms and bounds. In Jan van Leeuwen, editor, Proc. 2nd Ann. Europ.Symp. Alg. (ESA’94), volume 855 of Lecture Notes Comput. Sci., pages 12–23.Springer-Verlag, 1994. [see page 2]

[GT01] AshimGarg and Roberto Tamassia. On the computational complexity of upwardand rectilinear planarity testing. SIAM J. Comput., 31(2):601–625, 2001. [seepage 71]

[Hea85] Lenwood S. Heath. Algorithms for Embedding Graphs in Books. PhD thesis,University of North Carolina, Chapel Hill, 1985. [see page 112]

[Hea87] Lenwood S. Heath. Embedding outerplanar graphs in small books. SIAM J.Algebraic and Discrete Methods, 8(2):198–218, 1987. [see page 113]

[HEK+14] Seok-Hee Hong, Peter Eades, Naoki Katoh, Giuseppe Liotta, Pascal Schweitzer,and Yusuke Suzuki. A linear-time algorithm for testing outer-1-planarity. Algo-rithmica, pages 1–22, 2014. [see page 127]

[HELP12] Seok-Hee Hong, Peter Eades, Giuseppe Liotta, and Sheung-Hung Poon. Fáry’stheorem for 1-planar graphs. In Joachim Gudmundsson, Julián Mestre, andTaso Viglas, editors, Proc. 18th Ann. Int. Conf. Comput. Combin. (COCOON’12),volume 7434 of Lecture Notes Comput. Sci., pages 335–346. Springer-Verlag, 2012.[see pages 127 and 128]

[HHE08] Weidong Huang, Seok-Hee Hong, and Peter Eades. Effects of crossing angles.In Proc. IEEE Pacifc Visual. Symp. (PacifcVis’08), pages 41–46. IEEE ComputerSociety, 2008. [see page 2]

[Hir75] Daniel S. Hirschberg. A linear space algorithm for computingmaximal commonsubsequences. Commun. ACM, 18(6):341–343, 1975. [see pages 33 and 34]

[HJL13] Bernhard Haeupler, Krishnam Raju Jampani, and Anna Lubiw. Testing simulta-neous planarity when the common graph is 2-connected. J. Graph AlgorithmsAppl., 17(3):147–171, 2013. [see page 107]

[HMS96] S. Louis Hakimi, John Mitchem, and Edward F. Schmeichel. Star arboricity ofgraphs. Discrete Math., 149(1–3):93–98, 1996. [see pages 57, 59, and 61]

[HR14] Md. Iqbal Hossain and Md. Saidur Rahman. Monotone grid drawings of planargraphs. In Jianer Chen, John E. Hopcroft, and Jianxin Wang, editors, Proc.8th Int. Workshop Front. Algorithmics (FAW’14), volume 8497 of Lecture NotesComput. Sci., pages 105–116. Springer-Verlag, 2014. [see page 90]

166

Page 175: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Bibliography

[HS99] Christian Haslinger and Peter F. Stadler. Rna structures with pseudo-knots:Graph-theoretical, combinatorial, and statistical properties. Bull. Math. Biol.,61(3):437–467, 1999. [see page 112]

[HW79] Godfrey H. Hardy and Edward M. Wright. An Introduction to the Theory ofNumbers. Oxford Univ. Press, 5th edition, 1979. [see pages 91 and 92]

[IKL95] Christian Icking, Rolf Klein, and Elmar Langetepe. Self-approaching curves. InMath. Proc. Camb. Philos. Soc., volume 125, pages 441–453. Camb. Univ. Press,1995. [see page 89]

[Kam06] Frank Kammer. Simultaneous embedding with two bends per edge in polyno-mial area. In Lars Arge and Rusins Freivalds, editors, Proc. 10th Scand.WorkshopAlgorithm Theory (SWAT’06), volume 4059 of Lecture Notes Comput. Sci., pages255–267. Springer-Verlag, 2006. [see page 107]

[Kan96] Goos Kant. Drawing planar graphs using the canonical ordering. Algorithmica,16(1):4–32, 1996. [see page 79]

[Kar72] Richard M. Karp. Reducibility among combinatorial problems. In Raymond E.Miller, James W. Thatcher, and Jean D. Bohlinger, editors, Complexity of Com-puter Computations, IBM Res. Symp. Series, pages 85–103. Springer-Verlag, 1972.[see page 16]

[KKRW10] B. Katz, M. Krug, I. Rutter, and A. Wolff. Manhattan-geodesic embedding ofplanar graphs. In David Eppstein and Emden R. Gansner, editors, Proc. 17thInt. Symp. Graph Drawing (GD’09), volume 5849 of Lecture Notes Comput. Sci.,pages 207–218. Springer-Verlag, 2010. [see page 23]

[KM13] Vladimir P. Korzhik and Bojan Mohar. Minimal obstructions for 1-immersionsand hardness of 1-planarity testing. J. Graph Theory, 72(1):30–71, 2013. [seepages 127 and 128]

[KNR+13] Philipp Kindermann, Benjamin Niedermann, Ignaz Rutter, Marcus Schaefer,André Schulz, and AlexanderWolff. Two-sided boundary labeling with adjacentsides. In F. Dehne, R. Solis-Oba, and J.-R. Sack, editors, Proc. 13th Int. AlgorithmsData Struct. Symp. (WADS’13), volume 8037 of Lecture Notes Comput. Sci., pages463–474. Springer-Verlag, 2013. [see page 4]

[KO07] Paul C. Kainen and Shannon Overbay. Extension of a theorem of whitney. Appl.Math. Lett., 20(7):835–837, 2007. [see page 112]

[Koe36] Paul Koebe. Kontaktprobleme der konformen Abbildung. Berichte d. math.-phys. Kl. d. Sächs. Akad. d. Wissenschaften zu Leipzig, 88(2):141–164, 1936. [seepage 2]

[Kro67] Melven R. Krom. The decision problem for a class of first-order formulas inwhich all disjunctions are binary. Math. Logic Quarterly, 13(1-2):15–20, 1967.[see page 16]

167

Page 176: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Bibliography

[KS10] Daniel Král and Ladislav Stacho. Coloring plane graphs with independentcrossings. J. Graph Theory, 64(3):184–205, 2010. [see page 128]

[KSSW14] Philipp Kindermann, André Schulz, Joachim Spoerhase, and Alexander Wolff.On monotone drawings of trees. In C. Duncan and A. Symvonis, editors, Proc.22nd Int. Symp. Graph Drawing (GD’14), volume 8871 of Lecture Notes Comput.Sci., pages 488–500. Springer-Verlag, 2014. [see page 6]

[KU14] Michael Kaufmann and Torsten Ueckerdt. The density of fan-planar graphs.Arxiv report, 2014. Available at http://arxiv.org/abs/1403.6184. [see page 127]

[KW01] Michael Kaufmann and Dorothea Wagner, editors. Drawing Graphs: Methodsand Models, volume 2025 of Lecture Notes Comput. Sci. Springer-Verlag, 2001.[see page 11]

[KW02] Michael Kaufmann and RolandWiese. Embedding vertices at points: Few bendssuffice for planar graphs. J. Graph Algorithms Appl., 6(1):115–129, 2002. [seepages 109 and 110]

[Kyn09] Jan Kynčl. Enumeration of simple complete topological graphs. Electr. J. Comb.,30(7):1676–1685, 2009. [see page 133]

[Lei80] Charles E. Leiserson. Area-efficient graph layouts (for VLSI). In Proc. 21st Annu.IEEE Symp. Foundat. Comput. Sci. (FOCS’80), pages 270–281. IEEE ComputerSociety, 1980. [see page 71]

[Li02] Hang Li. Word clustering and disambiguation based on co-occurrence data. J.Nat. Lang. Eng., 8(1):25–42, 2002. [see page 53]

[Lin10] Chun-Cheng Lin. Crossing-free many-to-one boundary labeling with hyper-leaders. In Proc. IEEE Pacific Visual. Symp. (PacificVis’10), pages 185–192. IEEEComputer Society, 2010. [see page 23]

[Lio14] Giuseppe Liotta. Graph drawing beyond planarity: some results and openproblems. In Stefano Bistarelli and Andrea Formisano, editors, Proc. 15th Ital.Conf. Theoret. Comput. Sci. (ICTCS’14), volume 1231 of CEURWorkshop Proc.,pages 3–8. CEUR-WS.org, 2014. [see page 127]

[LKY08] Chun-Cheng Lin, Hao-Jen Kao, and Hsu-Chun Yen. Many-to-one boundarylabeling. J. Graph Algorithms Appl., 12(3):319–356, 2008. [see page 23]

[LM10] Tom Leighton and Ankur Moitra. Some results on greedy embeddings in metricspaces. Discrete Comput. Geom., 44(3):686–705, 2010. [see page 89]

[LMM+95] Thomas M. Liebling, François Margot, D. Müller, Alain Prodon, and L. Stauffer.Disjoint paths in the plane. ORSA J. Comput., 7(1):84–88, 1995. [see page 23]

[LMS98] Yanpei Liu, AuroraMorgana, and Bruno Simeone. A linear algorithm for 2-bendembeddings of planar graphs in the two-dimensional grid. Discrete Appl. Math.,81(1–3):69–91, 1998. [see pages 71, 72, and 73]

168

Page 177: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Bibliography

[Mor80] Joel L. Morrison. Computer technology and cartographic change. In D.R.F.Taylor, editor, The Computer in Contemporary Cartography. Johns HopkinsUniversity Press, 1980. [see page 21]

[NB79] Takao Nishizeki and Ilker Baybars. Lower bounds on the cardinality of themaximummatchings of planar graphs. Discrete Math., 28(3):255–267, 1979. [seepage 64]

[NC08] Takao Nishizeki and Norishige Chiba. Planar Graphs: Theory and Algorithms,chapter Chapter 10. Hamiltonian Cycles, pages 171–184. Dover Books Math.Courier Dover Pub., 2008. [see page 112]

[NP13] Martin Nöllenburg and Roman Prutkin. Euclidean greedy drawings of trees. InHans L. Bodlaender and Giuseppe F. Italiano, editors, Proc. 21st Europ. Symp.Algorithms (ESA’13), volume 8125 of Lecture Notes Comput. Sci., pages 767–778.Springer-Verlag, 2013. [see page 89]

[NPR13] Martin Nöllenburg, Roman Prutkin, and Ignaz Rutter. Edge-weighted contactrepresentations of planar graphs. J. Graph Algorithms Appl., 17(4):441–473, 2013.[see page 54]

[NPR14] Martin Nöllenburg, Roman Prutkin, and Ignaz Rutter. On self-approaching andincreasing-chord drawings of 3-connected planar graphs. Arxiv report, 2014.Available at http://arxiv.org/abs/1409.0315. [see page 97]

[NPS10] Martin Nöllenburg, Valentin Polishchuk, and Mikko Sysikaski. Dynamic one-sided boundary labeling. In Proc. 18th ACM SIGSPATIAL Int. Symp. Adv. Geogr.Inform. Syst. (ACM-GIS’10), pages 310–319. ACM, 2010. [see page 23]

[NR04] Takao Nishizeki and Md. Saidur Rahman. Planar Graph Drawing, volume 12 ofLecture Notes Comput. Sci. World Sci. Pub., 2004. [see page 11]

[NW64] Crispin St. John Alvah Nash-Williams. Decomposition of finite graphs intoforests. J. London Math. Soc., 1(1):12–12, 1964. [see pages 60 and 112]

[PT97] János Pach and Gáza Tóth. Graphs drawn with few crossings per edge. Combi-natorica, 17(3):427–439, 1997. [see page 127]

[PTT+12] Fernando Vieira Paulovich, Franklina M. B. Toledo, Guilherme P. Telles, RosaneMinghim, and Luis Gustavo Nonato. Semantic wordification of documentcollections. Comput. Graph. Forum, 31(3):1145–1153, 2012. [see page 55]

[Rai34] Erwin Raisz. The rectangular statistical cartogram. Geogr. Review, 24(3):292–296, 1934. [see page 54]

[RCS86] Raghunath Raghavan, James Cohoon, and Sartaj Sahni. Single bend wiring. J.Algorithms, 7(2):232–257, 1986. [see page 23]

[Rin65] Gerhard Ringel. Ein Sechsfarbenproblem auf der Kugel. Abh. aus dem Math.Seminar der Univ. Hamburg, 29(1-2):107–117, 1965. [see page 127]

169

Page 178: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Bibliography

[RRP+03] Ananth Rao, Sylvia Ratnasamy, Christos H. Papadimitriou, Scott Shenker, andIon Stoica. Geographic routing without location information. In David B.Johnson, Anthony D. Joseph, and Nitin H. Vaidya, editors, Proc. 9th Ann. Int.Conf. Mob. Comput. Netw. (MOBICOM’03), pages 96–108. ACM, 2003. [seepage 89]

[Sch13] Marcus Schaefer. Toward a theory of planarity: Hanani-tutte and planarityvariants. J. Graph Algorithms Appl., 17(4):367–440, 2013. [see page 107]

[See97] Jochen Seemann. Extending the Sugiyama algorithm for drawing UML classdiagrams: Towards automatic layout of object-oriented software diagrams. InGiuseppeDi Battista, editor, Proc. 5th Int. Symp. GraphDrawing (GD’97), volume1353 of Lecture Notes Comput. Sci., pages 415–424. Springer-Verlag, 1997. [seepage 71]

[SFK11] Sven Schneider, Jan-Ruben Fischer, and Reinhard König. Rethinking automatedlayout design: Developing a creative evolutionary design method for the layoutproblems in architecture and urban design. In John S. Gero, editor, Proc. 4thInt. Conf. Design Comput. Cognition (DCC’10), pages 367–386. Springer-Verlag,2011. [see page 71]

[Syl78] James J. Sylvester. On an application of the new atomic theory to the graphicalrepresentation of the invariants and covariants of binary quantics. Amer. J.Math., Pure and Applied, 1(1):64–90, 1878. [see page 1]

[Tam87] R. Tamassia. On embedding a graph in the grid with the minimum number ofbends. SIAM J. Comput., 16(3):421–444, 1987. [see page 71]

[Tam13] Roberto Tamassia, editor. Handbook of Graph Drawing and Visualization, vol-ume 81 of Discrete Math. Appl. Chapman & Hall/CRC, 2013. [see page 11]

[Tho88] Carsten Thomassen. Rectilinear drawings of graphs. J. Graph Theory, 12(3):335–341, 1988. [see pages 127 and 129]

[Tru93] Richard J. Trudeau. Introduction to Graph Theory. New York: Dover Pub, 1993.[see page 11]

[Val98] Pavel Valtr. On geometric graphs with no k pairwise parallel edges. DiscreteComput. Geom., 19(3):461–469, 1998. [see page 127]

[Vaz03] Vijay V. Vazirani. Approximation Algorithms. Springer-Verlag, 2003. [seepage 11]

[VBSW83] R Von Bodendiek, H Schumacher, and K Wagner. Bemerkungen zu einemsechsfarbenproblem von g. ringel. Abh. Math. Semin. Univ. Hambg., 53(1):41–52,1983. [see page 127]

170

Page 179: Angular Schematization in Graph Drawing · Dissertation,Julius-Maximilians-UniversitätWürzburg FakultätfürMathematikundInformatik,2015 Gutachter:Prof.Dr.AlexanderWolff,Prof.Dr.AndréSchulz

Bibliography

[vK11] Marc van Kreveld. The quality ratio of rac drawings and planar drawings ofplanar graphs. In Ulrik Brandes and Sabine Cornelsen, editors, Proc. 18th Int.Symp. Graph Drawing (GD’11), volume 6502 of Lecture Notes Comput. Sci., pages371–376. Springer-Verlag, 2011. [see page 2]

[vKSW99] Marc van Kreveld, Tycho Strijk, and AlexanderWolff. Point labeling with slidinglabels. Comput. Geom. Theory Appl., 13:21–47, 1999. [see page 21]

[VWF09] Fernanda B. Viégas, Martin Wattenberg, and Jonathan Feinberg. Participatoryvisualization with Wordle. IEEE Trans. Visual. Comput. Graphics, 15(6):1137–1144, 2009. [see pages 53 and 54]

[Wal12] Helge Waldherr. Network Gmunden–Vöcklabruck–Salzkammergut of the Publ.Transp. Assoc. OÖVG, Austria, November 2012. Accessed Sept. 10, 2013. [seepage 72]

[Wei13] Severin Weiland. Der Koalitionsvertrag im Schnellcheck (Quickoverview of the [German] coalition agreement). Spiegel Online,www.spiegel.de/politik/deutschland/was-der-koalitionsvertrag-deutschland-bringt-a-935856.html. Click on “Fotos”, 27 November 2013. [see page 54]

[Wig82] Avi Wigderson. The complexity of the hamiltonian circuit problem for max-imal planar graphs. Technical Report TR-298, EECS Department, PrincetonUniversity, 1982. [see page 112]

[WPW+11] YingcaiWu, Thomas Provan, FuruWei, Shixia Liu, and Kwan-LiuMa. Semantic-preserving word clouds by seam carving. Comput. Graph. Forum, 30(3):741–750,2011. [see page 55]

[WS11] David P. Williamson and David B. Shmoys. The Design of Approximation Algo-rithms. Camb. Univ. Pres, 2011. [see page 11]

[ZL13] Xin Zhang and Guizhen Liu. The structure of plane graphs with independentcrossings and its applications to coloring problems. Central Europ. J. Math.,11(2):308–321, 2013. [see pages 128, 131, and 148]

[Zor97] Steven Zoraster. Practical results using simulated annealing for point featurelabel placement. Cartogr. GIS, 24(4):228–238, 1997. [see page 21]

171