0% found this document useful (0 votes)
17 views

Simplified o N Algorithms For Planar Graph Embedding Kuratowski Subgraph Isolation and Related Problems

This document is the dissertation of John M. Boyer submitted in partial fulfillment of the requirements for a Doctor of Philosophy degree. It presents new linear-time algorithms for planar graph embedding, Kuratowski subgraph isolation for non-planar graphs, and related problems. The algorithms operate directly on an adjacency list representation of a graph's biconnected components, adding edges one by one until the graph is fully embedded or a non-planarity condition is found. If non-planar, a Kuratowski subgraph can be extracted in linear time. The results are extended to outerplanar graph embedding and subgraph isolation.

Uploaded by

dddmadman001
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Simplified o N Algorithms For Planar Graph Embedding Kuratowski Subgraph Isolation and Related Problems

This document is the dissertation of John M. Boyer submitted in partial fulfillment of the requirements for a Doctor of Philosophy degree. It presents new linear-time algorithms for planar graph embedding, Kuratowski subgraph isolation for non-planar graphs, and related problems. The algorithms operate directly on an adjacency list representation of a graph's biconnected components, adding edges one by one until the graph is fully embedded or a non-planarity condition is found. If non-planar, a Kuratowski subgraph can be extracted in linear time. The results are extended to outerplanar graph embedding and subgraph isolation.

Uploaded by

dddmadman001
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 190

Sim pliûed 0(?

%) A lgorithm s for Planar G raph Em bedding,


K uratowski Subgraph Isolation, and R elated Problem s
By

John M. Boyer
B.Sc., University of Southern Mississippi, 1990

A Dissertation Submitted in Partial Fulfillment of the


Requirements for the Degree of
DOCTOR OF PHILOSOPHY
in the Department of Computer Science

We accept this dissertation as conforming


to the required standard

Dr. Wendy MyrWld; SupenAsor (Department of Computer Science)

Dr. U o ^ Ellis, Departmental Member (Department of Computer Science)

Dr. Frank Ruskey, Departmental Member (Department of Computer Science)

_______ ________ ________________ __________________


Dr. Oiry MâcGil|lvray, OuWide Member (Department of Mathematics and Statistics)

Dr. S. Gill Williamson, External Examiner (Department of Computer Science and


Engineering, University of California, San Diego)

(c) John M. Boyer, 2001


University of Victoria

All rights reserved. This dissertation may not be reproduced in whole or in part, by
photocopying or other means, without permission of the author.
11

Superviaor: Dr. Wendy Myrvold

ABSTRACT
A graph is pZonor if it can be drawn on the plane with vertices at unique locations
and no edge intersections. Due to the wealth of interest from the computer science
community, there are a number of remarkable but complex 0 (m) planar embedding al­
gorithms. This dissertation presents a new method for 0 (n ) planar graph embedding
which avoids some of the complexities of previous approaches. The PC-tree method
of Shih and Hsu has similarities to our algorithm, but the formulation is incorrect
and not 0 (n ) for reasons discussed in this dissertation. Our planarity algorithm oper-
ates directly on an adjacency list representation of a collection of planar biconnected
components, adding one edge at a time to the embedding until the entire graph is
embedded or until a non-planarity condition arises. If the graph is not planar, a new
0 (n ) algorithm is presented that simplifies the extraction of a Kuratowski subgraph
(a subgraph homeomorphic to or Kg). The results are then extended to outer-
planar graphs, which are planar graphs that can be embedded with every vertex along
the external face. In linear time, the algorithms find an outerplanar embedding or a
minimal obstructing subgraph homeomorphic to or K 4 . Finally, modifications
to the outerplanarity and planarity obstruction isolators are presented, resulting in
0 (n) methods for identifying a subgraph homeomorphic to A^2 , 3 or

Examiners:

Dr. Wendy Myrvom, SupeAnsor (Department of Computer Science)

________________________________
Dr. Jq m Ellis, Departmental Member (Department of Computer Science)

Dr. Frank Ruskey, Departmental Member (Department of Computer Science)

Dr. Gmy MacGilUvray ide Member (Department of Mathematics and Statistics)

Dr. S. Gill Williamson, External Examiner (^Department of Computer Science and


Engineering, University of California, San Diego)
Ill

CONTENTS

CONTENTS ............................................................................................................ üi

LIST OF T A B L E S ................................................................................................... vi

LIST OF F IG U R E S ................................................................................................ vü

ACKNOW LEDGM ENTS....................................................................................... x

D E D IC A T IO N ......................................................................................................... xi

1. Introduction................................................. 1
1.1 Further Definitions and Prelim inaries.................. 3
1.2 Review of the Literature . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.3 Contributions of This Dissertation........................................................... 17
1.4 Overview of C hapters................................................................................ 18

2 . Overview of New Planarity A lg o rith m s........................................................... 20


2.1 Modified Adjacency List Representation .............................................. 22
2.2 Maintaining a Collection of Biconnected C om ponents......................... 23
2.3 The External Face .................................................................... 25
2.4 External A c tiv ity ....................................................................................... 25
2.5 Walking Up to Prepare for Embedding of Back E d g e s ......................... 29
2.6 Internal Activity and In a c tiv ity .............................................. 32
2.7 Walking Down to Embed Back E d g e s..................................................... 33
2.8 Non-Planarity and Kuratowski Subgraph Isolation..................... 38
2.9 Short-Circuiting Inactive V e rtic e s........................................................... 40
2.10 Flipping Biconnected Components........................................................... 43
2.11 Consistent Orientation of V ertices............... 48
2.12 Handling of Separable and Disconnected G ra p h s.................................. 49

3. Data Structures and Their Initialization ........................................... 50


3.1 Notation ..................... 50
3.2 Preprocessing of the Input G r a p h ........................................................... 50
3.3 Vertex Structures and Edge Records ................................................. . 51
IV

3.4 A Structure for Representing an E m b e d d in g ........................................ 54


3.5 The Initialization P ro c e d u re .................................................................... 56
3.6 Fundamental Embedding Data Structure Dehnitions............................ 58

4. Low Level O perations............... 65


4.1 Embedding a DFS Tree E ld g e ........................................ ........................ 65
4.2 Embedding a Back E d g e .......................................................................... 6 6

4.3 Embedding a Short-Circuit Edge .................................................. 6 8

4.4 Activity Status of V ertices..................................... 69


4.5 Traversing the External F a c e .................................................................... 72
4.6 Inverting the Orientation of a V e r te x ..................................................... 73
4.7 Merging a Root Copy Vertex with Its Parent Copy...... .................. 74
4.8 Joining Ah Biconnected Components in the Em bedding...................... 76

5. Walkup .................................................... 78

6 . W alkdow n............................................................. 82
6.1 Merging the Biconnected Components on the S t a c k ............................ 82
6.2 The Walkdown P ro c e d u re ........................... . 85

7. New Planarity Testing A lg o rith m ........................... 105

8 . New Planar Embedding A lg o r ith m .............................................. 108


8.1 Orienting the Vertices . ........................................... 108
8 .2 Obtaining a Combinatorial Planar Embedding ...................... 110

9. New Kuratowski Subgraph Isolator . ............................... 112


9.1 Data Structure Context for Choosing a Non-planarityMinor . . . . . 113
9.2 Low Level Operations for Choosing a Non-planarity M in o r ................ 116
9.3 Identifying Key Paths within a Biconnected Component ............... . 118
9.4 Choosing a Non-planarity Minor . . ........................ 123
9.5 Data Structure Context for Isolating a Kuratowski S ubgraph 126
9.6 More Low Level Operations for Isolating KuratowskiSubgraphs . . . 126
9.7 Isolating Minor A .............................................................. .. 129
9.8 Isolating Minor B ........................... 130
9.9 Isolating Minor C .................. 132
9.10 Isolating Minor D ....................................................................................... 133
9.11 Isolating Minor E ...................................................................................... 135
9.11.1 Isolating Minor E i ...................................................................... 136
9.11.2 Isolating Minor E g ...................................................................... 137
9.11.3 Isolating Minor E g ...................................................................... 139
9.11.4 Isolating Minor E ^ ...................................................................... 141
9.11.5 Isolating Minor E g ...................................................................... 144
9.11.6 Closure on Minor E .................. 145
9.12 Isolating a Kuratowski Subgraph ........................................................... 147

10. New Outerplanar Graph Testing, Embedding and Obstruction Isolation . . 149
10.1 Outerplanarity Testing and Em bedding................................................. 149
10.2 Isolating a Minimal Subgraph that Obstructs O uterplanarity............ 152

11. New Æg,3 and Æ3 3 Search A lgorithm s.............................................................. 155


11.1 Searching for Ag^g Homeomorphs and Recognizing Ag^g-less Graphs.155
11.2 Searching for Ag,g Homeomorphs and Recognizing ATg^g-less Graphs.158
12. Future W ork.............................................. 168
12.1 Drawing Planar Graphs as HorVert Diagrams .............. 168
1 2 . 2 Testing for the Consecutive Ones P ro p e rty . 170
12.3 Triconnectivity in Planar Graphs ....................................................... 170
12.4 Enumerating, Ranking and Unranking Planar E m beddings................ 171
12.5 Searching for Ag Minors and Homeomorphs in Linear T im e................ 173
12.6 Embedding in the Projective Plane . 173

Bibliography ................................................................................... 175


VI

LIST OF TABLES

3.1 Variables in Vertex S tru c tu re s .............................................. 52

3.2 Variables in Edge Records ........................................................................... 53

3.3 Variables in Embedding S tru c tu re ........................................ 54

9.1 Augmentation To Embedding Structure for Storing Non-planarity Minor


Selection Context ................ 114

9.2 Augmentation To Embedding Structure for Storing Kuratowski Subgraph


Isolation Context ................................................. 127
vil

LIST OF FIG U R E S

1 .1 An Ebcample Graph and a Planar Representation of the G r a p h ............... 2

1.2 The Planar Obstructions ATg and 4

1.3 A Cut Vertex u Separating Two Biconnected Com ponents...................... 6

1.4 The jiCs non-planarity minor from [8 ], and the corresponding PC-tree at
the beginning of step v .................................................................... 14

1 .5 (a) One of the non-planarity minors from [8 ], (b) A corresponding


PC-tree at the beginning of step u, (c) Another example of the PC-tree
problem with two terminal nodes................................................................. 15

2.1 High-Level Outline of Planarity A lgorithm s............................................... 21

2.2 High-Level View of Merging a Biconnected C o m p o n e n t.......................... 24

2.3 Embedding (u, w) While Keeping a; on the External F a c e ...................... 27

2.4 Due to z, Vertex x is Externally A c tiv e ..................................................... 28

2.5 Example of Walkup Processing................... 32

2.6 Walkdown Embeds Back Edge (t!, w) ........................................................ 36

2.7 Walkdown Flips a Biconnected Component ............................... . 37

2.8 Walkdown Halting Conditions ............................................... 39

2.9 Non-planarity Minors of the Input G r a p h .................................................. 39

2.10 The Necessity of Short-Circuiting Inactive V ertices........................ . . . 41

2.11 Example of Improper Selection of Traversal D ire c tio n ............................. 42

2.12 Overview of Data Structures for Flip Operation ...................................... 45

2.13 Elaboration of Data Structures Before Flip O p e ra tio n .......................... . 46

2.14 Data Structures After Flip and Back Edge Em bedding............................. 47

3.1 The Initialization Procedure ..................................... 57

4.1 The Procedure for Embedding a DFS Tree E ld g e ...................................... 65

4.2 The Procedure for Embedding a Back E d g e ............................................... 67


vm

4.3 The Procedure for Embedding a Short-Circuit E d g e ................................ 68

4.4 Procedure for Determining Vertex Activity S t a t u s ................................... 70

4.5 The Procedure Used to Traverse the External F a c e .................................... 73

4.6 The Procedure InvertVertex ......................................................................... 74

4.7 The Procedure MergeV e r te x ......................................................................... 76

4.8 The Procedure Jo in B ico m p s............................................................... 76

5.1 The Walkup P ro c e d u re ................................................................................. 79

6.1 Merging Pertinent Biconnected C o m p o n e n ts............................................ 83

6.2 The Walkdown Procedure.............................................................................. 8 6

6.3 Graph Minors for Non-planarity Conditions of the New Planarity Test.
(a) Non-planarity Minor A for Condition 1. (b) Non-planarity Minor for
Condition 2......................... 92

6.4 Non-planarity Minor Bfor Lemma 6 .1 7 ....................................................... 96

6.5 Non-planarity Minor Cfor Lemma 6.18 ........................................... 98

6 .6 Non-planarity Minor Dfor Lemma 6.19 .................................................... 98

6.7 Non-planarity Minor E for Lemma 6 .2 0 ....................................................... 99

7.1 The Edge Addition Planarity Testing A lg o rith m ...................................... 105

8.1 Orienting the Vertices in the Embedding S tru c tu re ................ 109

8.2 The Edge Addition Planar Embedding A lg o rith m ................ 110

9.1 Marking the Highest x-y P a t h .................................. 120

9.2 Marking the v-z P a t h .................................................................................... 122

9.3 Choosing a Non-planarity Minor . ............................................... 124

9.4 Isolating Minor A ............................. 129


9.5 Isolating Minor B ............................. 131

9.6 Isolating Minor C ........................................................................... 132

9.7 Isolating Minor D ....................................... . 134

9.8 Minor Ei Reduces to Minor C .................................................................... 136

9.9 Isolating Minor E i ............................................... 136


IX

9.10 Minor Eg Reduces to Minor A .................................................................... 137

9.11 Isolating Minor E g .................................... 138


9.12 Minor Eg (with a descendant of u , and . .................................. 139

9.13 Isolating Minor E g ......................................................................................... 140

9.14 Minor E 4 with px not equal to x ........................... 142

9.15 Isolating Minor E 4 ......................................................................................... 142

9.16 Isolating Minor Eg . . . . .......................................................................... 144

9.17 Isolating Minor E ......................................................................................... 146

9.18 Isolating a Kuratowski Subgraph................................................................. 147

10.1 Non-Outerplanarity Minor A ....................................................................... 151

10.2 Non-Outerplanarity Minor B . ................................. 151

10.3 Non-Outerplanarity Minor E ....................................................................... 152

10.4 Outerplanarity Obstruction Is o la to r................................. 153

11.1 A 2 3 Homeomorphs from Non-Outerplanarity Minor E ........................... 156

11.2 Minor E g .................................................... . 161

11.3 Minor E 7 Reduces to Minor C ........................... 162

11.4 Minor Eg . ............................................. 162


ACKNOW LEDGM ENTS

I am particularly grateful to Dr. Wendy Myrvold, who provided outstanding in­


tellectual guidance throughout this research. I have learned and grown immeasurably
thanks to the many hours you devoted to our collaboration on this work.
I would like to thank my committee members, Drs. Wendy Myrvold, John Ellis,
Gary MacGillivray, Frank Ruskey and S. Gill Williamson, for their valuable time spent
considering this work and helping me to produce the best possible results. I have
also appreciated and benehted from the great depth and breadth of computer science
knowledge and style imparted by Drs. Wendy Myrvold, John Ellis, and Frank Ruskey,
from whom I have had the privilege of enjoying many superb graduate courses. In
this regard, I would also thank Dr. Valerie King for her scholarly teaching. I am
fortunate to have called each of you my 'professor.'
I would like to thank my wife. Dr. Wanda A. R. Boyer, for her help and
encouragement with matters mundane and sublime. To her I am most deeply grateful
and indebted. In so many instances when I needed to talk to her about this work or
about the process, or when I just needed time to complete this work, she supported
me with innumerable acts of a kind and generous spirit. As well, I would like to thank
my daughter, Wanda B. K. Boyer, for always wearing a smile, oGering a pat on the
back, and for learning the dlGerence between a K 3 3 and a K 5 . Thank you both for
the lives we share together.
I would like to thank my parents, Daniel J. Boyer, Jr. and Kathleen Y. Boyer,
who live very far away, for always being happy to hear from me, yet always being
satisfied with whatever I could manage to do to keep in contact during this time.
Finally, I would like to thank my other Mom and Dad, Barbara Rumson and
Gordon E. Rumson, for giving freely of themselves. Thank you for so many years of
Friday night spaghetti and so many Saturdays free to think and create. Especially to
Barbara ... Mom... thank you for helping me to 'tend my garden.'

Victoria, British Columbia, Canada John M. Boyer


June 27, 2001
XI

D E D IC A T IO N

To my wife and daughter, Wanda and Wanda.


1. Introduction

A pmpA G = (y, E) consists of a set y of vertices and a set E of edges, each of which
is associated with a pair of vertices from y . By convention, n indicates the number
of vertices in y, and m indicates the number of edges in E. For a given graph G,
the vertex set V, the edge set E and their sizes, n and m, can be denoted V{G),
E(G), u(G) and Tu(G) . A graph is undirected if its edges consist of unordered pahrs
of vertices, and a graph is directed if its edges consist of ordered pairs of vertices.
Throughout this dissertation, graphs are undirected unless stated otherwise.
In an undirected graph, the vertices associated with an edge are called the end­
points of the edge, and an edge is incident to its endpoints. An edge with endpoints
u and V is denoted (m, v ) . A loop is an edge of the form {u , u ), and a m u ltip le edge is
an edge that occurs more than once in E (if there are multiple edges, then E is not a
set but rather a multiset). A m u ltig ra p h is a graph that permits loops and multiple
edges (some texts forbid loops [24]), and a sim p le graph is a graph that forbids loops
and multiple edges. Throughout this dissertation, graphs are simple unless stated
otherwise.
In a graph G, vertex u is adjacent to vertex v, or equivalently u is a neighbor
of u, if {u,v) is an edge in E(G). The subset of vertices adjacent to a vertex u is
called the neighborhood of u. The degree of a vertex u is the number of non-loop
edges containing u as an endpoint plus t^ c e the number of loops of the form (u,u).
In a simple, undirected graph, the degree of a vertex u is equal to the size of its
neighborhood, and each neighbor u of a vertex u is also adjacent to u.
A graph is often drawn using points for the vertices and lines (possibly curved)
for the edges. A pkmor of a graph is a drawing of the graph on a plane
such that the vertices are placed in distinct positions and no two edges intersect
except at cmnmon vertex endpoints. A planar representation of a graph divides the
plane into connected regons, called /ocea, each bounded by edges of the graph [24, p.
6 8 ]. A region of hnite area is called a proper /ace. The erfenW /ace is the plane less
the union of the proper faces and the points occupied by the planar representation
of the graph. Figure 1.1(a) shows an example graph with four vertices and six edges.
Figure 1.1(b) shows a planar representation of the same graph.

(a)

Figure 1.1: A n Exam ple Graph and a Planar R epresentation o f the Graph

Graphs are often used as the underlying mathematical model in a wide variety
of problems in which there are objects, represented by vertices, and associations
between two objects, represented by edges. For example, a given electronic circuit
may be composed of resistors, capacitors and transistors connected together by wires.
A map of a website or a hypertext book could be represented using vertices for the
pages and edges for the hyperlinks. In these example applications, finding a planar
representation of the graph is useful as an answer to whether an electronic circuit
can be arranged on a printed circuit board without creating a short-circuit [32], or
whether a map or content overview of a website or hypertext book can be drawn on
a computer screen without ambiguities arising from crossed edges.
A graph is planar if it is possible to create a planar representation of the graph,
and a non-planar graph is a graph for which there is no planar representation. Simi­
larly, a graph is outerplanar if it is possible to create a planar representation of the
graph in which all vertices are endpoints of the bounding edges of the external face.
A planarity testing algorithm determines if a graph has a planar representation. A
pfouor olgonf/im also indicates the clockwise order of the neighbors of each
vertex. Generating the specific vertex positions and edge shapes in a planar repre­
sentation is often viewed ^ a separate problem, in part because it is application-
dependent. For example, our notion of what constitutes a suitable rendering of a
graph may differ substantially if the graph represents an electronic circuit versus a
hypertext book. Hence, a data structure in which the representation of each vertex
contains a clockwise-ordered list of its neighbors is called a combmotorW florwr em-
bedding and is considered to be a simple certihcate of planarity that contains snScient
information for subsequent graph drawing algorithms.
In 1930, Kuratowski [41] was the hrst to prove a theorem characterizing the
property of planarity in graphs, which had the eSect of showing that it is also possible
to create a simple certiGcate of non-planarity for non-planar graphs. A suùgruph of
a graph G is a graph such that Ç and Ç E(G). A Kuyufouwti
subgraph is a minimal non-planar subgraph of a graph. A Kuratowski subgraph isolator
is an algorithm that extracts a Kuratowski subgraph from a given non-planar graph.
In some applications, Ending a Kuratowski subgraph is a Erst step in eliminating
problem areas in the graph. For example, in a graph representing an integrated
circuit, the crossed edge in an identified Kuratowski subgraph could be replaced by
a sub circuit of exclusive-or gates [43].
Existing linear time methods for the algorithms defined above are quite complex
[11, 33]. This dissertation provides new, simplified linear time algorithms for planarity
testing, planar embedding and Kuratowski subgraph isolation. The results are then
extended to outerplanar graphs and to other related problems.

1.1 Further D efinitions and Prelim inaries


This section begins by defining the terms necessary to understand Kuratowski’s
famous theorem mentioned above. This is followed by basic graph theoretic terminol-
ogy required to understand the overview of existing and related algorithms in Section
1 .2 as well as the new algorithms presented in this dissertation.
A WU& o/ Zenith A: is a sequence f = ug, eg, ui, ei, ..., % of alternating
vertices and edges such that ^ Uj) is an edge of G for i from 1 to t . A poth is
a walk with no repeated vertex. A cycle is a walk of length greater than two with no
repeated vertices except Uo = u*. In a simple graph, listing the edges is not necessary
since the connecting edges are evident given the vertices.
A complete pmph on n vertices, denoted is a simple undirected graph in
which every pair of vertices is adjacent. A complete 6 *por(*(e pruph, denoted
is a simple undirected graph in which the vertex set V can be partitioned into two
subsets %. and of sizes r > 0 and s > 0 respectively, such that every edge has one
endpoint in and the other in For examples, the graph shown in Figure 1.1 is a
FQ, and Figure 1.2 illustrates Æs and Kg,3 .

(a) Kg (b)K.

Figure 1.2: The Planar O bstructions and

A graph G is isomorphic to a graph Æ if there exists a bijection / : V(G) —


y (ff) such that (u, u) E 15(G) if and only if (/(u), /(u )) E An edge suWiuision
is a replacement of an edge (u, u) with a degree two vertex w plus the edges (u, to)
and (w,v). The inverse operation, a series reduction, replaces a degree two vertex w
and its incident edges, (u, to) and (w,v), with a single edge (u,v). If the resulting
graph is to be kept simple, then the edge would only be added if it does not already
exist. A graph G is homeomorphic to a graph H if G can be made isomorphic to H
by applying zero or more subdivisions and series reductions. For graphs G and H,
we say that G is an H homeomorph if G is homeomorphic to H.
Kuratowski was the first to characterize planar graphs by proving Theorem 1.1
below. Not only must planar graphs be devoid of subgraphs homeomorphic to ATg
and but non-planar graphs must contain a subgraph homeomorphic to Æg or
Thus, a Kuratowski subgraph isolator must return a subgraph containing only
five vertices of degree four dr six vertices of degree three, called imoge uerficca, plus
distinct paths containing zero or more degree two vertices that connect the image
vertices such that the resulting graph is a A 5 or ^ homeomorph.

Theorem 1.1 (Kuratowski [41]) A groph w piouor ^ oud oulg ^ coufoms no


suAgmpA homeomorphic (o ATg^ or K 5 .
Seven years after Kuratowski's result, Wagner [58] proved a second characteri­
zation of planarity. An con(roc(*on of an edge e = (a, t?) replaces n and r and
their incident edges with a single vertex w whose incident edges are all edges that
were incident to either u or i; except e. An edge contraction can result in multiple
edges incident to w (e.g., the edges (w, z) and (n, %) are changed to be two instances of
the edge {w, x)). In a combinatorial representation that maintains the cyclic order of
the edges incident to each vertex, the cyclic order for the edges incident to w is equal
to the combined cyclic order of the edges about the edge (u, n) before its contraction.
A graph G contains a graph as a minor if a graph isomorphic to ff can be created
from G by applying zero or more edge contractions to a subgraph of G. A graph is
a minor of G if G contains ff as a minor. Wagner [58] characterized planarity using
graph minors of K 3 3 or K^, as stated in Theorem 1.2.

Theorem 1.2 (Wagner [6 8 ]) A G is plonor if and onZp neither K3 3 nor Kg


are minors of G.

Despite the early results of Kuratowski [41] and Wagner [58], the first charac­
terization of planarity that lead to a polynomial time planarity testing algorithm is
due to Tutte [55]. Given a subgraph H of a graph G, an H-bridge of G is either 1 ) an
edge not in H whose endpoints are in i f or 2) a component of G —V{H) together with
the edges (and vertices of attachment) that connect it to H. The attachment points
of a bridge are those vertices of the bridge that are in V{H). Some texts (e.g. [24])
require an if-bridge to have more than one attachment point. Given a cycle i f in a
graph G, two if-bridges conflict if they have three common attachment points or if
there are four distinct vertices U]_, %, U3 and in cyclic order on i f such that and
U3 are attachment points in the first bridge and % and are attachment points in
the second bridge. The conflict graph of i f is a graph in which each vertex represents
an ff-bridge of G and each edge (n, u) represents a confiict between the ff-bridges
represented by u and v. According to Tutte, a graph G is planar if and only if, for
every cycle G in G, the confiict graph of G is bipartite. This result was exploited in
the first polynomial time planarity testing algorithm created by Auslander and Barter
[5] (and correctly formulated by Goldstein [25]).
A graph is connecW if, for every pair of vertices u and there exists a path
from u to u in the graph. A graph is dwconnected if there exist vertices u and u for
which there is no path from u to u in the graph. A connected component is a maximal
connected subgraph of a graph. A vertex w is a cut vertex of a graph G if the removal
of V and its incident edges results in a graph with more connected components than
G. Another name for a cut vertex is an articulation point. A cut edge is an edge
whose removal increases the number of connected components in G. Each endpoint
of a cut edge is either a cut vertex or a vertex of degree one. A graph containing one
or more cut vertices is seporoble, and a graph with no cut vertices is Mconnecfed. A
WcounecW component of a graph is a maximal biconnected subgraph. Another name
for biconnected component is fdocA. Figure 1.3(a) illustrates a cut vertex u s^ aratin g
two biconnected components, and Figure 1.3(b) shows the two components that result
when V and its incident edges are removed. Note that v would no longer be a cut
vertex if edge (n, to) were added.

(a) (b)

Figure 1.3: A Cut Vertex u Separating Two B iconnected Com ponents

Since most planarity algorithms exploit some property of biconnected graphs,


the input graph is assumed to be biconnected. When the input graph is not bicon­
nected, a preprocessing step identihes the biconnected components of the input graph,
passing each as a subgraph to the planarity algorithm. This is an acceptable practice
since a Kuratowski subgraph, if it exists, must be a subgraph of a single biconnected
component. Planar embedding algorithms require an additional postprocessing step
to assemble the embeddings of the biconnected components into a single embedding
of the input graph, but this is a simple task since the biconnected components that
7

must be attached to a cut vertex can be arbitrarily permuted.


Linear time algorithms for identiGcation of cut vertices and biconnected compo­
nents using the well-known graph processing method of depth Grst search were Grst
discussed by Tarjan [53]. Depth first search (DFS) on graphs operates in the same
way as the well-known pre-order traversal of a tree, except that DFS on graphs must
terminate traversal on edges that lead back to previously visited vertices. Edges that
lead to new vertices are called tree edges, and edges that lead to previously visited
vertices are called back edges. The tree edges collectively form a spanning Depth First
5'eofic/i Tbee in each connected component of a graph. Each vertex n is assigned a
number, the depth /irst mder or DPI, which indicates how many vertices were visited
by the depth first search method prior to visiting v. The root of a DFS tree is the
first vertex visited in a connected component, so it has the least DFI in the connected
component. An ancestor of a vertex v is any vertex on the path of tree edges from v
to the root, excluding v. A descendant of a vertex v is any vertex for which v is an
ancestor. The endpoints of a back edge share the ancestor-descendant relationship.
The parent of a vertex v is the ancestor of v adjacent to a by a tree edge. A child of
a vertex v is any vertex for which v is the parent. A subtree is a subgraph of a tree in
which a vertex v, called the subtree root, is a common ancestor to all other vertices in
the subtree and which contains all tree edges having both endpoints in the subtree.
A post-order traversal of the depth first search tree can be used to compute the
well-known function lowpoint(v) (defined in [53]), which associates with each vertex
a the least DFI of any vertex reachable firom r by a sequence of zero or more tree
edges to descendants of u followed by at most one back edge. The lowpoint function
can then be used to characterize cut vertices, as shown by Theorem 1.3.

T h eo rem 1.3 (T arjan [53]) A uerfec u is o cut uertec ^ ond only hos o DP 6 '
child c with lowpoiM(c) > D fF (f) ond there eziata o distinct oerter w not o deacen-
dont o /c in the aome connected component oa o.

P ro o f. Because the endpoints of a back edge join a descendant with an ancestor


in the DFS tree, the constraint lotopoint(c) > D f/(t;) implies that every back edge
8

incident to a vertex in the DFS subtree rooted at c has for its other endpoint either
u or another vertex in the DFS subtree rooted at c. Thus, every path from c to tu
must contain u. Since removing n destroys all paths between c and tu, t; is a cut
vertex. Conversely, suppose t; is a cut vertex. If u is the DFS tree root, then every
non-descendant of c other than u must be in other DFS subtrees rooted by other DFS
children of v. Any DFS child of v other than c is a suitable choice for tu. On the
other hand, if t; is not the DFS tree root, then any ancestor of u is a suitable choice
for tu. □

Given the cut vertices of a graph, determining the biconnected components is


a straightforward process that again involves the depth first search tree. Consider a
tree edge (ù, c) in which u is determined to be a cut vertex according to Theorem
1.3. Based on the proof of this theorem and the de&nition of biconnected component,
the biconnected component B containing {v, c) has the following properties: 1) v is
the vertex with the least DFI in B, 2) the vertex subset V{B) contains v and every
vertex d in the subtree rooted by c that has no ancestor cut vertex separating d from
c along the tree path from d to c, and 3) the edge subset E(B) contains all edges
of the graph with both endpoints in V(B). These properties are easily exploited
during a post-order traversal of the depth first search tree to produce the biconnected
components of the graph. In fact, Tarjan’s original algorithm [53, p. 153] calculates
the DFI and lowpoint of each vertex and determines the edges in each biconnected
component using a single depth first search.
A biconnected component that is planar and contains more than one edge has an
ectemal face whose bounding edges form a cycle, just as is the case for proper faces.
The bounding edges of a face, together with their vertex endpoints, form the
cycle of the face. Because combinatorial planar embeddings consist of vertices and
edges rather than regions, the term 'external face' typically refers to the boun#ug
cycle of the external face of a biconnected component larger than a single edge, or to
the walk (u, (u, tu), tu, (tu,u), u) for a biconnected component consisting only of the
edge (u,tu).
Theorem 1.4 states Euler’s formula, which relates the number of faces / in a
planar representation of a connected planar graph to the number of edges m and
vertices n in the graph. Euler's formula is easily extended to / = m —n + 1 + c for
disconnected simple planar graphs with c connected components, which can be seen
by adding cut edges to join the DFS tree roots. The result is a well-known corollary
that bounds the number of edges in any planar graph to be a constant multiple of
the number of vertices, as stated in Corollary 1.5.

Theorem 1.4 (Euler [17]) is a connected simple plonor prop/i with n vertices
ond m edges, then every plonar representation o /G has a number o/ /aces / egual to
m —n + 2 .

Corollary 1.5 1/ G is a simple planar grr^h with n > 2 vertices, then G contains
no more than 3n —6 edges.

Due to Corollary 1.5, algorithms for planarity testing, planar embedding and
Kuratowski subgraph isolation on G (with n > 2) can be restricted to any subgraph
H containing min(3n —5, \E{G)\) edges from G. If G exceeds the edge limit, then H
is guaranteed to be non-planar by Corollary 1.5, so it contains a Kuratowski subgraph
by Theorem 1.1. Thus, a planarity tester, planar embedder or Kuratowski subgraph
isolator that performs constant work per edge achieves 0{n) time.

1.2 R eview o f th e Literature


The examples at the beginning of this chapter, which concerned the planarity of
electronic circuits and website maps, were representative of a rather straightforward
application of planarity algorithms. There exist numerous applications of a more
subtle variety. For example, a number of algorithms have been designed specifically to
exploit properties of planar graphs, so a planarity tester or embedder should precede
their operation since they do not work unless the graph is planar. Examples include
linear-time planar graph five-coloring algorithms [12, 22, 44], polynomial time planar
graph four-coloring algorithms [1, 2, 3, 50, 54], and the delta-wye reduction algorithm
of Feo and Provan [21].
10

There also exist problems that are very difficult on graphs in general but which
are solved much more easily on planar or outerplanar graphs, such as graph isomor­
phism [27, 29, 31]. For example, a planar graph can be used to model the signihcant
molecular structure of most known chemical compounds using vertices to represent
atoms (or groups of atoms) and edges to represent chemical bonds. Thus, determining
the equivalence of two chemicals can often be reduced to the planar graph isomor-
phism problem [27]. Another example is finding the maximum cut in a graph, which
is NP-complete in general [23] but solved efficiently on planar graphs [26]. In the case
of outerplanar graphs, an example is the algorithm of Ellis, Mata and MacGillivray
[16] for finding the longest path between two vertices of an outerplanar graph, which
achieves linear time on a problem that is NP-Complete even for planar graphs [23].
As well, efficient Kuratowski subgraph isolation is a critical component of nu­
merous linear-time graph algorithms, including an isolator for 3 homeomorphs [2 0 ],
an isolator for minors [37], and embedding algorithms for more complex surfaces
than the plane [34, 46, 47]. For example, the linear time K 3 3 homeomorph isolator
of Fellows and Kaschube [20] begins by isolating a Kuratowski subgraph K , which
is either the desired ^ 3 ,3 homeomorph or a K 5 homeomorph. In the latter case, the
algorithm examines the K-bridges of the graph, both recursively and to determine
whether any can be attached to FT to form a 1 ^ 3 , 3 homeomorph.
The wealth of interest in graph planarity has resulted in efficient algorithms for
various computing models and constraints, including both parallel [38] and on-line [6 ]
planar embedders. In addition, various efficient algorithms have been developed for
enumerating, ranking and unranking planar embeddings [10, 36, 57].
The first planarity testing algorithm to achieve linear time b%an with the work
of Auslander and Parter [5] (correctly formulated by Goldstein [25]). The algorithm
obtained a cycle G in the graph, recursively embedded each G-bridge (augmented
with edges to form a path from its first to last attachment point along G), then
determined an embedding in which some of the bridges were attached inside G while
the confiicting bridges were attached outside of G. HopCroft and Tarjan [30] optimized
the algorithm to linear time by exploiting numerous properties of depth first search
11

that allowed them to decompose each bridge into a set of paths to be processed
consecutively by the algorithm. As a result, a number of authors refer to the Hopcroft
and Tarjan algorithm as the pufA addition method [11, 18, 52]. Some corrections
to the algorithm appear in [15], and significant additional details are presented by
Williamson [61, 63] as well as the text by Reingold, Nievergelt and Deo [49].
Despite these resources, it is difficult to envision how the tester achieves linear
time on certain key parts, such as reversing a prior decision about whether to embed
certain bridges (sets of paths) on the inside or outside of C. Indeed, Hopcroft and
Tarjan comment that the challenging part of the algorithm is the creation of good
data structures to efficiently implement this method. Moreover, while the conclusion
of their paper briefly sketches a method for augmenting their tester to create a planar
embedder, over a decade later, Chiba, Nishizeki, Abe, and Ozawa comment that
modifying the Hopcroft and Tarjan algorithm to yield a planar representation “looks
to be fairly complicated; in particular, it is quite difficult to implement a part of the
algorithm for embedding an intractable path” [11, p. 55].
Another planarity test created by Demoucron, Malgrange and Pertuiset [14]
(see [24] for an excellent exposition) also begins with a cycle C and the bridges with
respect to C. Then, it embeds each bridge one at a time, keeping track of the new
faces that develop in the embedding and the faces into which each remaining bridge
can be placed. Rubin [51] describes a method for optimizing this method to achieve
average case linear time and roughly half the running speed of the Hopcroft and
Tarjan method. However, these results are based on empirical tests and no proof is
given that the algorithm achieves linear time in the worst case.
The second method of planarity testing proven to achieve linear time began with
an algorithm some have called the vertex addition method. The original O(n^) version
is due to Lempel, Even and Cederbaum [42]. The algorithm begins by creating an s, t-
numbering for the (biconnected) graph. A property of this numbering is that there is a
path of higher numbered vertices leading from every vertex to the vertex (, which has
the highest number. Thus, there must exist an embedding of the first k vertices such
that the remaining vertices (A + 1 to ^) can be embedded in a single face. The testing
12

algorithm was optimized to linear time by a pair of contributions. Even and Tarjan
[19] optimized s, (-numbering to linear time, while Booth and Lueker [7] developed
the PQ-tree data structure, which allows the planarity test to efSciently maintain
information about the portions of the graph that can be permuted or flipped before
and after embedding each vertex. Chiba, Nishizeki, Abe and Ozawa [1 1 ] augmented
the PQ-tree operations so that a planar embedding is computed as the vertex addition
method operates.
Achieving linear time with the vertex addition method is also quite complex
[33], in part because Booth and Lueker do not include the complete set of optimized
templates required to update the PQ-tree quickly [7, p. 362] but leave them for the
reader to derive. There are non-trivial rules for restricting processing to only the
pertinent portion of the PQ-tree, more rules to prune the tree, then still more details
to increase the efficiency of selecting and applying templates since more than one is
often applied in a reduction.
Linear time Kuratowski subgraph isolation was first solved by Williamson [62].
The method examines the state of the data structures in the Hopcroft and Tarjan
path addition method at the point when a non-planarity condition occurs (when three
bridges mutually confiict). This algorithm is also quite complex, in part because it is
based on path addition. Karabeg [35] developed a linear time Kuratowski subgraph
isolator that exploits non-planarity conditions that arise in PQ-trees. A far simpler
Kuratowski subgraph isolator was developed by Klotz [39]. It only achieves O(u^)
time, but it is useful because it does not dependent on a complex linear time planarity
test algorithm.
A characterization of planar graphs by de Fraysseix and Rosenstiehl [13] could
lead to algorithms for planarity testing and Kuratowski subgraph isolation, though the
paper contains no development of a linear time methodology. The characterization is
important; though, because it discusses planarity from the vantage point of conflicts
between back edges as seen &om a bottom-up view of the depth first search tree.
A preliminary report containing some of the results of this dissertation appeared
in [8 ]. Our work is based on this bottom-up view, though we derived it independently
13

of [13] as the result of trying to eliminate fQ -trees and a, (-numbering while retaining
the aforementioned property of a, (-numbering that all paths lead to the hnal vertex.
Using a bottom-up view of the DFS tree, the hnal vertex is the DFS tree root,
which suggests a bottom-up vertex processing order. While [8 ] contained most of the
information necessary to embed the back edges between each vertex and its depth
first search descendants and to recover a combinatorial planar embedding in linear
time, as an extended abstract it does not contain complete information. Specifically,
it lacks details that define when the root of a biconnected component should be kept
on the external face, and it does not provide the details on how to maintain and use
path information for each biconnected component encountered as the algorithm works
bottom-up from descendants adjacent by a back edge to the vertex being processed.
This dissertation improves on the prior work by presenting a simpler formulation
that does not even need to maintain this path information nor any external face
information for biconnected component roots.
Very recently, a new planarity test was presented by Shih and Hsu [52]. They
develop the notion of a PC-Tree (described below) as a simplification of a PQ-tree, and
their work is critically dependent on a number of the same results that appeared earlier
in Boyer and Myrvold [8 ]. However, since their date of submission was significantly
before the publication of [8 ], there is clearly a case of simultaneous independent
discovery of somewhat similar algorithms.
Unfortunately, the results of Shih and Hsu stated in [52] contain several errors
that negate the proof of correctness of the planarity test and the claim of a fully
defined Kuratowski subgraph isolator. For example, the only PC-tree pattern in [52]
for detecting Æg homeomorphs appears to only detect some ATg minors. According
to [52, p. 185] “we could have three terminal nodes being neighbors of a C-node, in
which case we would get a subgraph homeomorphic to JQ as illustrated in Fig. 6 ".
Figure 1.4(a) depicts the Kg minor pattern appearing in Figure 6 (c) of [8 ] (with a
few cosmetic changes), and Figure 1.4(b) depicts the corresponding PC-tree.
The darkened triangles, called i-subtrees, represent subtrees rooted at a; and y
that have yet to be connected to u by unembedded back edges. Likewise, the whitened
14

(a) (b)

Figure 1.4: The jiTg non-planarity minor from [8 ], and th e corresponding


P C -tree at the beginning o f step f

triangles, called «'-subtrees, represent subtrees rooted at r, r , and th at have yet to


be connected to an ancestor of u by unembedded back edges. The node labeled C is
representative of a biconnected component, and its neighbors represent the essential
nodes along the external face of the biconnected component. In PC-tree parlance, the
nodes x and y are terminal nodes (i.e. they have at least one «-subtree, one «'-subtree,
and no descendant with the same property [52, p. 181]). However, node r is not a
terminal node since x and y are its descendants. Thus, the C-node does not have
three terminal nodes as neighbors in this case. Since [52] contains no other patterns
for recognizing homeomorphs, one must conclude that an undefined non-planarity
condition exists in the Shih-Hsu planarity test. In this case, an implementation would
discover the non-planarity condition due to the test suggested by Lemma 2.5 in [52],
but since the proof of that Lemma states that the result is a Kz,z homeomorph, a
Kuratowski subgraph isolator based on the results in [52] would clearly fail.
A more critical problem pertains to the correctness of the planarity testing
algorithm itself. Corollary 2.8 and the prose on p. 187 of [52] clearly indicate how
to continue processing under the configuration given in Figure 10 of [52], yet their
planarity test should halt on this configuration if a descendant of « (the vertex being
processed) that is also an ancestor of the C-node labeled W is connected by a back
edge to an ancestor of vertex « (has an «'-subtree). This condition arises in graphs such
as the non-planarity minor in Figure 6 (b) of [8 ], which is depicted (with a few cosmetic
15

t
I
.
I&

w >-<è
(a) (b) (c)

Figure 1.5: (a) One o f th e non-planarity minors 6 rom [8 ], (b) A corre­


sponding P C -tree at th e beginning o f step (c) Another exam ple o f th e
PC -tree problem w ith tw o term inal nodes

changes) in Figure 1.5(a). The dashed lines represent, at least in part, unembedded
back edges. Our algorithm would currently be processing the back edges from v to
its descendants. The corresponding PC-tree at the beginning of step v appears in
Figure 1.5(b). In this example, x and y have i-subtrees, w and r have ^‘-subtrees,
and the C-node is a terminal node. Moreover, it is the only terminal node, and the
work of Shih and Hsu [52] contains no theorem, lemma or corollary that detects a
non-planarity condition in this configuration.
In essence, the non-planarity pattern depicted in Figure 1.5 is a counterexample
to the proof of correctness appearing in Theorem 4.1 of [52]. Any reduction of the
PC-tree in Figure 1.5(b) must retain r on the external face due to its f-subtree,
which is infeasible since w must also be kept on the boundary cycle of a biconnected
component due to its f-subtree. This problem negates the claim on p. 188 of Shih and
Hsu [52] that the conditions established by “Lemma 2.5, Corollary 2.6 and Lemmas
3.1 and 3.2 .. . imply a feasible internal embedding for each biconnected component.”
As such. Theorem 4.1 does not establish the Shih-Hsu algorithm as a correct planarity
tester. In collaboration with graduate student Rdland Wiese of the Eberhard-Karls
University of Tubingen [60], this problem was determined to also be applicable when
there are two terminal nodes, as depicted in Figure 1.5(c), because Lemma 3.1 does
16

not apply to the terminal nodes. The problem appears to be an incorrect assumption
in extending Lemma 2.7 and Corollary 2.8 to the case of having terminal nodes that
are C-nodes, whose children cannot be arbitrarily permuted but must instead adhere
to the order given by the representative bounding cycle (RBC).
It is easy to see that these cases have been missed in the processing model for
PC-tree reduction, which is shown in Figure 11 of [52]. This figure shows how to
reduce the PC-tree once it has been determined that a feasible internal embedding
is possible according to the conditions established by Lemma 2.5, Corollary 2 . 6 and
Lemmas 3.1 and 3.2. In Figure 11 (i) and (ii), the first child of u in clockwise direction
below the critical path f leads to an %*-subtree. If it were changed to an i-subtree (a
darkened subtree), then the resulting PC-tree is not reducible.
These additional non-planarity conditions and the non-planarity condition de­
scribed by Lemma 3.1 of [52] also have an effect on the complexity analysis. In
accounting for Lemma 3.1, p. 190 of [52] states that “determining which side of an
intermediate C-node w contains ^-subtrees (let v, v' be two neighbors of w in P) we
only have to check the two neighbors of v (or v') in the cyclic list to see which one
has the label i." This may be true under the assumption that the input graph is
planar, but the point of a planarity test (and of Lemma 3.1 in particular) is to deter­
mine whether the graph is planar, so some form of additional work must be done to
determine whether the forbidden i-i* subtree pattern has occurred.
In terms of complexity analysis, there are additional concerns pertaining to
the linear time performance of the algorithm as stated in [52]. For example, the
claim that the “RBC will be stored as a circular doubly linked list” [52, p. 184]
cannot be supported. When the representative bounding cycles of C-nodes must be
joined together, the direction of traversal of two consecutive C-nodes may be reversed
depending on which path contained the %-subtrees in each C-node. Joining the RBCs
of two such C-nodes into a circular doubly linked list would require the inversion of
links in the RBC nodes of one of the two C-nodes. It is easy to create planar graphs
in which 0{n^) link inversions occur in total. It is therefore necessary to represent
the RBC with a fist that permits arbitrary link inversions as is done in the algorithms
17

of this dissertation and as is depicted in Figure 1 of [8 ].


As a Enal concern, it appears that, in order to avoid performance on
PC-treeS; one must not create PC-trees, at least not in the manner specihed by [52,
p. 184]: "we shall represent the 2-connected component by à C-node whose parent
is ; ... ". Unfortunately, if every C-node (or P-node) indicated its actual parent
in the PC-tree, then it is easy to create planar graphs on which O(n^) reparenting
operations are performed on a set of C-nodes whenever their parent becomes part of
a new C-node during a PC-tree reduction. Instead^ it is necessary to let the parent
of any P-node or C-node indicate a node in the RBC of its parent. The PC-tree
parent of a node can be found ty Erst following the parent link to some node in the
RBC of the parent; then traversing the RBC until a node with a parent link is found.
Thus, one is led repeatedly and inexorably to the methods of this dissertation and
of [8 ] in order to create an algorithm th at achieves linear time while exploiting those
graph-theoretic properties that are common to both algorithms.

1.3 C ontributions o f T his D issertation


This dissertation contributes new planarity testing and embedding algorithms,
with rigorous proofs of correctness and linear time performance, that operate directly
on data structures used to represent combinatorial planar embeddings. Su&dent
information is included on how to maintain linear time performance while following
the correct paths through biconnected components, flipping biconnected components
as necessary, and producing a flnal, consistent orientation for all vertices. The length
of discourse is reflective both of the decision to pursue a depth of rigor in proof,
analysis and software spedflcation not typically found in a textbook treatment of
linear time planarity (such as in [49]) and of the numerous additional related problems
addressed in this dissertation.
One such problem is that of isolating a Kuratowski subgraph in a non-planar
graph. Williamson [62] states that “it would be desirable to have not one but several
basically diflkrent [linear time Kuratowski subgraph isolators]" because the condition
of linearity "forces the emergence of a certain level of insight into the structure of non-
18

planar graphs and Knratowski's theorem." This dissertation contributes a new linear
time Kuratowski subgraph isolator that diSers from and is more intuitive than prior
strategies described by Boyer and Myrvold [8 ], Shih and Hsu [52], and Williamson
[62]. The algorithm is conceptually as simple as the Kuratowski subgraph isolator
of Karabeg [35], though our implementation details are not as complicated, in part
because they do not involve the augmentation of PQ-tree operations.
A linear time implementation of these algorithms was created in four days for
the planar embedding algorithm plus three days for the Kuratowski subgraph isolator.
The implementation was then tested on hundreds of millions of randomly generated
graphs of up to 1 0 0 vertices plus well over a billion graphs generated with the aid of
McKay’s nauty program [45] (specifically all connected graphs with 11 or fewer ver-
tices). For each graph, the integrity of the resulting combinatorial planar embedding
or Kuratowski subgraph was tested.
In this dissertation, the new theoretical framework developed for planarity is
also extended to produce a linear time outerplanarity testing algorithm distinct from
the algorithm of Brehaut [9], which is based on the Hop croft and Tarjan planarity
test [30]. Moreover, an outerplanar embedding is recovered, or a minimal obstructing
subgraph homeomorphic to or A 4 is isolated if a graph is found not to be outer-
planar. Finally, modifications to the outerplanar and planar obstruction isolators are
described, resulting in linear time algorithms that search a graph to ident% a
or A 3 , 3 homeomorph or determine that the graph has no subgraph homeomorphic to
A 2 3 or A 3 ,3 .

1.4 O verview o f C hapters


The previous discussion described how the results in this dissertation relate to
other work. We now give an overview of the dissertation, which summarizes the
original results demonstrated in the remaining chapters.
Chapter 2 presents a top-down overview of the new planarity algorithms, and
Chapter 3 presents the data structures used by the new planarity algorithms. Chap­
ters 4 through 7 present the planarity test algorithm details in a bottom-up fashion,
19

mcluding proo& of correctness and run-time analyses for each functional component.
Chapter 7 presents the key theorems proving the correctness and linear time opera­
tion of the new planarity testing algorithm. Chapter 8 describes the data structure
and algorithm modihcations necessary to extract a combinatorial planar embedding
if the input graph is planar, and it proves that these modiGcations result in a linear
time planar embedding algorithm. Chapter 9 describes how to extract a Kuratowski
subgraph in linear time from the state of the data structures at the moment when the
planarity tester discovers that the input graph is non-planar. Chapter 10 extends the
theoretical framework developed in this dissertation for planarity problems to solve
the corresponding outerplanarity problems, and Chapter 11 describes modifications
to the outerplanarity and planarity obstruction isolators that result in linear time
algorithms that search a graph for a Kg 3 or homeomorph. Finally, Chapter
1 2 discusses several future lines of inquiry that can be pursued with the new data
structures and algorithms in this dissertation.
20

2. O verview o f N ew P lanarity A lgorithm s

Our new planarity algorithm begins with a few preprocessing operations, most of
which are common to all linear time planarity algorithms. The Erst operations are to
create a depth first search tree and to perform the lowpoint calculation as described
in Chapter 1. This assigns a depth first index (DPI) and lowpoint to each vertex. The
vertices are then sorted into ascending DPI order (in linear time). A few additional
data structures and preprocessing operations are required, which will be described as
needed in this chapter, then in more detail in Chapter 3.
After preprocessing the input graph G, the algorithm creates a data structure
G to store the embedding. The data structure G is designed to maintain a collection
of biconnected components. Por each DPS tree edge e of G, the algorithm creates a
singleton biconnected component in G containing only a representation of the tree
edge e, including a structure for each vertex incident to e. Thus, for each vertex
V, G contains a vertex structure for v for each tree edge containing v. In the m a in

loop of the algorithm described below, the multiple vertex structures representing a
vertex v are merged together as back edges are embedded to form larger biconnected
components.
The main loop of the algorithm iterates through each vertex n of G in reverse
DPI order, embedding in G one edge per back edge between n and a descendant of
V in G. The rationale for using reverse DPI order is simply that, for any step v, a
partial embedding can be created in which the remaining unprocessed vertices can
be embedded in the external face because they each have a path of DPS tree edges
leading to the DPS tree root. A high-level outline for our algorithms appears in
Pigure 2.1.
As indicated in the main loop body in Pigure 2 . 1 , embedding a back edge (n, w)
may be accompanied by merging one or more biconnected components that, together
with (n, w), form a single biconnected component. The order in which back edges are
embedded and the details of the biconnected component merge operations are selected
21

Figure 2.1: High-Level O utline o f Planarity Algorithm s

(1 ) Receive graph (7 with m > 2 vertices and m < 3u —5 edges


(2) Perform depth hrst search and lowpoint calculations on (7
(3) Based on G, create and initialize embedding G

(4) Add each DFS tree edge of G to G as a singleton


biconnected component

(5) For each vertex f in reverse DFI order


(6 ) Embed in G each back edge in G from to a
DFS descendant of n. For each such back edge (u, w),
embed {v, w) such that:

a) all biconnected components are merged together that


will no longer be separable when (r, w) is added
b) any vertex z with unembedded back edges to n or
DFS ancestors of n is kept on the external face
(along with cut vertices separating z hom u).

If embedding (v, w) requires violation of 6 b,


break the loop

(7) If one or more back edges were not embedded,


Isolate a Kuratowski subgraph

such that all vertices with unembedded back edges to v or its ancestors remain on
the external faces of biconnected components in G.
If the input graph G is planar, then all of the back edges are embedded in the
main loop. Since all of the tree edges were embedded in Line 4, G contains a planar
embedding of G. However, if G is non-planar, then the algorithm terminates in some
step V when it cannot embed a back edge to v without also placing a vertex with an
unembedded back edge to a DFS ancestor of v inside of a biconnected component
(such that the uuembedded back edge would have to cross the bounding cycle of the
biconnected component in order to be embedded). When this occurs, our algorithm
adds a few unembedded back edges, then isolates a Kuratowski subgraph in G.
The sections of this chapter describe a more detailed conceptual framework for
22

the algorithm outline given in Figure 2.1. The first few sections discuss preliminary
details of the data structures, while the remaining sections describe the algorithm
operation in more detail, adding to the data structures as necessary. The formal
data structure definition appears in Chapter 3 and the formal descriptions for the
procedures in the algorithm appear in subsequ^t chapters (along with proo 6 of
correctness and run-time analyses).

2.1 M odiûed A djacency List R epresentation


The data structure used to represent the embedding of the input graph is quite
similar to the standard adjacency list format normally used to represent a combiner
torial planar embedding. There is a vertex structure to represent each occurrence of
a vertex in a biconnected component. The adjacency list of a vertex is represented
by a list of edge records, with one edge record for each edge incident to the vertex.
An edge (u,v) is represented by a pair of edge records e„ and e„. The edge record
Gg in u's adjacency list indicates u as a neighbor of u, and the edge record e, in t;'s
adjacency list indicates u as a neighbor of v. To help with traversing an edge in
constant time, the edge records e„ and e® indicate one another using a twin link. To
conserve memory, the twin link between two edge records can be made implicitly by
storing the edge records in consecutive memory locations.
The embedding data structure, denoted G, has an array y of vertex structures
and an array E of edge records. The vertices from (7 are represented in (7 by vertex
structures in the array V in the order given by the DFI of the vertices (more details
regarding storage of extra copies of cut vertices appears in Section 2 .2 ). The vertex
structures contain other important information copied from G such as the lowpoint
and DFS parent of the vertex, but the adjacency list of each vertex structure is
initially empty. Edge records are created in a r r ^ E of G as edges are embedded in
Lines 4 to 6 of Figure 2 .1 . The vertex structures and edge records maintain additional
information as the embedding algorithm proceeds. These additions are described as
needed throughout the rest of this diapter. Based on the discussions in this chapter,
the formal data structure definition appears in Chapter 3.
23

2.2 Maintedning a C ollection of B icon n ected C om ponents


The t)erfez of a biconnected component is the vertex with the least DFI in
the biconnected component. A child biconnected component of a vertex n is a bicon­
nected component in which o has the least DFI. The parent biconnected component
of a cut vertex v is the biconnected component that contains v as well as the DFS
parent of v. A DFS tree root has at least one child biconnected component for which
it is the root vertex, but it has no parent biconnected component since it has no DFS
parent. All vertices in a DFS tree other than the root have a parent biconnected
component; and each cut vertex has one or more child biconnected components.
In a biconnected component B with a root vertex v, there exists only one DFS
child c of n in B. The assumption of a second child ca of n in B contradicts the
biconnectedness of B since the depth first search finds no path from c to og except
through the root vertex v. Since v only has one DPS child c in B , the tree edge {v, c)
is defined to be the root edge of B.
In our data structures, cut vertices are represented by using one vertex struc­
ture for each occurrence of a vertex in some biconnected component. For each child
biconnected component B, the root vertex v of B is represented by a root copy of
V. T\\e p a ren t copy of v appears in B ’s parent biconnected component. The parent
copy of a vertex is the principal representative of the vertex (except for each DFS tree
root, whose root copies are merged to form a parent copy only after the embedding is
finished). Each root copy contains a parent to indicate its parent copy vertex. A
root copy of n can be denoted where c is the DFS child of u in B. In most cases,
only one root copy is under consideration, and it is not necessary to specify the DFS
child. In these cases, a root copy of a vertex u is denoted u'.
The vertex structure array V in G contains n locations for parent copies and
another n locations for root copies. Since a root copy can be uniquely associated
with a DFS child c of u, the array location -t- c] can be used to represent
without conflicts.
Before any back edges are embedded, the algorithm adds each DFS tree edge
(u, c) as a singleton biconnected component containing only c). An example of
24

.w, .W:

Figure 2.2: High-Level V iew o f M erging a B iconnected Com ponent

this is the edge {u\ v) in Figure 2.2. Thus, the first edge embedded for a biconnected
component is its root edge.
When the algorithm adds a back edge, if the endpoints are in separate bicon­
nected components, then the necessary biconnected components are merged together
to form a single connected component, which becomes biconnected when the back
edge is added. In Figure 2.2, this first occurred in step w when the back edge (w, z)
was added to form biconnected component B. In the current step v depicted by
Figure 2.2, the algorithm is ready to embed the back edge (v, z). Since vertex w will
no longer be a point of separation between a child biconnected component B and
its parent biconnected component once the edge is added, the root vertex u/ of B
is merged with its parent copy w. Then, the representative edge for (t;, z) is added,
resulting in a biconnected component that includes z, w and a root copy of v.
The back edge (u, z) is embedded between z and a root copy of u, denoted
In Figure 2.2. When processing u, the ancestors of u have not yet been processed, so
there are no back edges leading to ancestor vertices of u. Hence, u is a cut vertex in
25

the current embedding, and all back edges from v to its descendants are embedded
incident to root copies of u. Earlier, in step tu, the back edge (w, z) was embedded
by adding the edge (tu%z) to form biconnected component labeled B in Figure 2.2.
The edges incident to tu' are only changed to be incident to tu when we merge tu and
tu' as part of embedding the back edge (u, z).

2.3 T he E xternal Face


In each biconnected component in G, our data structures distinguish a particular
face as being the external face. To accomplish this, our data structures represent the
adjacency list of a vertex structure for u by placing the vertex structure in a circular
doubly linked list with the edge records indicating the neighbors of the vertex in
the biconnected component. The edge records are linked according to their cyclic
order about u, and the vertex structure for u is placed between the two edge records
that appear on the external face of the biconnected component. To represent these
links, each vertex structure and edge record contains two members, denoted link[0 ]
and link[l], that indicate the predecessor and successor in the adjacency list. For a
biconnected component containing a single tree edge (p,c), both links of the vertex
structure p indicate edge record e^, both links of indicate p, e, indicates c as the
neighbor and edge record Cc by twin link. The analogous links are made for c and Cg.
According to this design, the algorithm begins a traversal from a vertex x to a
vertex y along the external face of a biconnected component by way of the link from
the vertex structure x to the edge record for (x, p). Next, the algorithm uses the twin
link to reach (p, x). Finally, the algorithm uses the link in (p, x) that leads to the
vertex structure for y. To proceed to the next vertex after p, the algorithm simply
selects the link that does not indicate the edge record (p, x) leading back to x (except
if p is degree one since both links indicate the edge record (p, x)).

2.4 E xternal A ctiv ity


Given that our data structures maintain a collection of biconnected components
as well as the external face of each biconnected component, progress with the high-
26

level algorithm outline in Figure 2.1 requires that we be able to determine which
vertices and biconnected components must be kept on the external face as the back
edges of a given vertex u are embedded.

D eS nltion 2.1 parent copy uerter z is externally active the input pruph G con­
tains a 6ac& edpe (u, z) where u is an ancestor o/ the current uertea; o beiny processed
6y the main algorithm loop, or ÿ there earists a biconnected component in the em­
bedding G rooted by a/ ^a root copy 0 / 3 ^ that contains at least one eademally actioe
parent copy vertex.

D eS m tion 2.2 j4n externally active biconnected component is a biconnected com­


ponent that contains at least one eztemally actioe parent copy oertez.

Although biconnected components, which are identified by root copy vertices,


can be externally active, there is no notion of external activity for root copies of
vertices per se. A root copy vertex does not share the external activity status of
its parent copy nor of the biconnected component for which it is the root, and the
algorithms in this dissertation do not check root copy vertices for external activity.
We refer to a vertex z as 'externally active' to indicate that i plays an active
role in the embedding of back edges to vertices with a lower DPI than the current
vertex v, and therefore x must be kept on the external face as the back edges to the
current vertex v are embedded.
If a vertex x is directly adjacent to an ancestor of the current vertex n, then
certainly a; is externally active. Figure 2.3(a) illustrates what happens if a back edge
were added between the current vertex v and one of its descendants w such that
the bounding cycle of the biconnected component containing u, w and z were to
surround z. When the main loop iterates to vertex u, the back edge &om a; to u
would be required to cross this bounding cycle, which contradicts the purpose of a
planarity algorithm. Instead, our algorithms determine that x must remain on the
external face, so the edge (ï;, w) is embedded such that y is surrounded, as shown in
Figure 2.3(b). Thus, a; can be still be found along the external face when the main
27

.w

(a) (b)

Figure 2.3: Em bedding (r, w) W hile K eeping z on th e External Face

loop processes u, and the back edge (u, z) can be embedded without crossing any
edges.
As shown in Figure 2.4, a vertex z is also considered to be externally active if
there exists a back edge (u, z) where u is a DFS ancestor of the vertex n currently
being processed and z is a descendant of z in another biconnected component of G.
Note that the biconnected components rooted by x' and d' are externally active due
to vertices d and z, respectively. If the back edge (v, w) were embedded such that x
appeared inside the cycle C = [v, . . . , w, . . . , y, . . . , u], then either the back edge
(u, z) or a tree edge in the DPS tree path from z up to z would be required to cross
C (which is why our algorithms do not place externally active vertices inside of the
external face bounding cycles of biconnected components).
Because it is often unnecessary to distinguish why a vertex is externally ac-
tive, many diagrams in this dissertation depict an externally active vertex x as being
directly adjacent to an unprocessed vertex u unless the context demands that a de­
scendant of X also be shown. Likewise, the edge (v, w) may be indicative of a path
connecting r and w that includes descendants of tu. In other words, all descendants
are contracted into z or w when there is no conceptual diSerence between connecting
u and z or n and w 1^ a back edge or by a path of tree edges followed by a back edge.
Moreover, the DPS ancestors of the current vertex u (both root copies and parent
28

Figure 2.4: D ue to z, Vertex r is E xternally A ctive

copies) are contracted into vertex u, and edges such as (a;, w) may represent paths
along the external face whose edges and vertices have been contracted into z or w
for discussion purposes. In essence, the diagrams are graph minors of the embedding
that contain the vertices and edges necessary to illustrate a particular point.
Computationally, it is easy to determine in constant time whether a biconnected
component is externally active using the lowpoint function described in Chapter 1.
Given a biconnected component B rooted by the DFS child tree edge (r', c), B is
externally active if the lowpoint of c is less than the DFI of the current vertex v
whose back edges are being embedded.
Detecting whether a vertex is externally active is nearly as simple as using
the lowpoint function, and lowpoint figures prominently in the computation. The
lowpoint of w is the DPI of the vertex closest to the DFS tree root that is reachable
by a back edge firom w Or ony of its DFS descendants. According to Definition 2.1,
the external activity computation for w excludes any DFS subtree rooted by a child
c that has been merged into the parent biconnected component with w.
External activity can be computed in constant time using the following meth­
ods. During initialization of our data structures, each (parent copy) vertex structure
receives a member leostAuceator to store the DFI of the least ancestor adjacent to
29

the vertex by a back edge, which is a value obtained during the lowpoint calculation.
Each vertex structure also receives a doubly linked list of its DFS children sorted
by their lowpoint values, which we call the ,9epomfedDFS"Chüdfÿiaf because a DFS
child c is removed from the list of its DFS parent w when a biconnected component
rooted by the DFS tree edge (w% c) is merged with w. Finally, each vertex structure
receives a reference to indicate its representative node in the SeparatedDFSChüdList
of the DFS parent so that the removal can be done in constant time. A vertex w is
externally active if its leastAncestor meniber is less than f or if the least lowpoint
from the elements of its SeparatedDFSChüdList, which is in the hrst element, is less
than f, where u is the vertex currently being processed.

2.5 W alking U p to Prepare for E m bedding o f Back E dges


As described in the algorithm outline in Figure 2 .1 , the embedding of a back
edge (u, w) may involve merging a number of biconnected components that, together
with the new back edge, form a single biconnected component in the embedding. For
each back edge in the input graph G that is incident to the current vertex v and a
descendant w of v, our algorithm invokes a procedure called ‘Walkup’ to identify the
biconnected components that must be merged before (v, w) can be embedded (see
Line 6 (a) of Figure 2.1). The Walkup also sets a flag in w to indicate that w is the
descendant endpoint of a back edge that must be embedded during step u of the main
algorithm loop.

D efinition 2.3 A biconnected component with root edge (r', c) is pertinent at step v
^ fAe G conWna of feoaf one 6 ocA edge (u, w), where w w in fhe DFS"
enhfree roofed c.

D efinition 2.4 A oerfer to is pertinent in sfey o ÿfh ere acisfa o edge (u, w)
in fhe inpnf graph (7 fhof hos nof 6 een embedded in (7 or ^ G confoins o perfinenf
biconneefed componenf wifh roof w'.
30

D efinition 2.5 A uerfe% r ia o separation ancestor 0 / o rerf&c w ÿ r w o DF5"


oncesfor 0 / w ond o DF5" deacendant 0 / (Ae current uerfer u, ond ÿ (Ae porent copy
o / r *a not in tAe aome biconnected component oa t/ie porent copy o/w in G.

Based on Deûnitions 2.3, 2.4 and 2.5, the invocations of the Walknp procedure
identify pertinent vertices and pertinent biconnected components at the beginning of
step V. The members pertinentBicompList and adjacentTo are added to each vertex
structure to store this information. At the beginning of step o, the adjacentTo member
of each vertex structure is greater than v, and the pertinentBicompList of every vertex
is empty. For a back edge (u, w), the Walknp sets the adjacentTo member of to eqnal to
0 . To identify the pertinent biconnected components, the Walknp procednre for back
edge (v, w) performs a loop that begins at the parent copy of w and simultaneously
traverses both paths leading from w around the external face of the biconnected
component B containing w until the root vertex r' of B is encountered. If r' is a root
copy of u, then the Walknp terminates successfully. Otherwise, / is stored in the
pertinentBicompList of the parent copy vertex structure r. Then, the Walkup loop
reiterates starting at r. Thus, for each separation ancestor r of w in G, the root copy
of a biconnected component with c an ancestor of or equal to w is recorded in the
pertinentBicompList of r. For the sake of simplicity, the root copy is appended if the
corresponding biconnected component is externally active and prepended otherwise.
Within each biconnected component visited by Walkup, one of the two paths
between r ' and w becomes part of a new proper face once the back edge (n,w) is
embedded. The Walkup performs external face traversal in parallel to ensure that
each biconnected component root is found with a cost not exceeding twice the size
of the shortest path between / and w around the external face. This helps to ensure
that the total cost of all Walkup operations is a constant multiple of the sum of
degrees of proper faces in the embedding.
The Walknp loop has a second stopping condition due to a necessary optimiza­
tion. In order to achieve linear time, the cumulative work done by all Walkup calls for
the back edges of v must not exceed a constant multiple of the number of bounding
edges in new proper faces formed during step u. However, it is possible for the back
31

edges of ï) to be in a processing order that would cause successive Walkup calls to


traverse the same paths many times. Fortunately, a Walkup initiated for a given back
edge to r can halt if it encounters any vertex structure z visited by a prior Walkup
for a diSerent back edge to u since the prior Walkup call will have already recorded
the remaining pertinent biconnected components for separation ancestors between z
and V. This optimization also prevents a child biconnected component from being
recorded as pertinent more than once.
Each vertex structure w in our embedding structure also contains a member
called visited^ which is equal to v if and only if w has been visited by Walkup in step
u. As Walkup visits each vertex, it assigns u to the 'visited' member of the vertex.
Any future Walkup operations during step v can stop if a vertex with the visited
member set to v is encountered. Moreover, these visitation flags are cleared at the
end of step v with no extra work because the step variable of the main algorithm loop
is decremented to begin processing the vertex with the next lower DFI.
Although Chapter 5 provides the details of the Walkup procedure, Figure 2.5
exemplifies the processing performed by Walkup. In this example, there exist back
edges from v to vertices w and y. The vertices w' and z’ are roots of non-pertinent
biconnected components. The arrows indicate paths taken by the two Walkup calls,
and the octagons indicate where each Walkup halts.
The Walkup for the first back edge, (u, w), starts at the parent copy of w
and proceeds in parallel around the external face along both paths leading from w,
assigning v to the ‘visited’ members of vertices it visits, until it comes upon the root
of the biconnected component. The Walkup proceeds to c, where it records as a
pertinent child biconnected component. It then continues up &om c and halts when
it flnds a root copy u' of the vertex u currently being processed.
The Walkup for the second back edge, (u, y), starts at again searching for the
shortest path to the biconnected component root r’. It finds r' by taking the shorter
path th ro u ^ the externally active vertex z. The Walkup then proceeds to r, where
it records r' as a pertinent child biconnected component. Then, the second Walkup
halts because r was already vimted by the first Walkup.
32

© t
©

F ig u re 2.5: E x am p le o f W alkup P ro cessin g

2.6 Internai A ctiv ity and In activity


A vertex w that is not externally active may still play an active role in the
embedding of back edges to the vertex v currently being processed. Vertex w could
be the attachment point for a back edge to v, or it could be the attachment point for
merging pertinent child biconnected components (or both).

D eü n itio n 2.6 A uerfer w is internally active ^ if is perfinenf 6 uf nof erfemoMy


ocfiue.

D eB nition 2.7 An internally active biconnected component is o Aiconnecfed com­


ponenf f/tof confoins one or more infemoMp ocfiue uerfices ond no erfemoffp ocfine
vertices.

D eB nition 2.8 A uerfer is inactive i/ if is neifAer erfemofip nor infemoffp ocfiue.


33

D eB nition 2.9 inactive biconnected component ia o Wconnected component t/tot


ia neither eaTfemoiip nor intemofip octipe.

Whether internally or externally active, a pertinent vertex to may become inac-


tive once it becomes non-pertinent (i.e. once its back edge to v is embedded, if (p, to)
exists in the input graph, and once all of its child biconnected components have been
merged). Note that an externally active vertex cannot become inactive unless all of
its externally active child biconnected components are pertinent since otherwise it
wiU still have separated externally active child biconnected components at the end
of step p. Also note that inactive biconnected components do not become pertinent,
and if the input graph is biconnected, they do not occur.
Computationally, a biconnected component rooted by the DFS tree edge (r', c) is
determined to be internally active if the lowpoint of c is equal to v. However, internal
activity of a vertex w is not determined using lowpoint. According to Definitions 2.4
and 2 .6 , a vertex w is internally active if it is not externally active, but either its
pertinentBicompList is non-empty or its adjacentTo member is equal to the current
vertex v being processed, all of which are constant time tests.

2.7 W alking D ow n to E m bed Back Edges


In the main loop of the algorithm outline in Figure 2.1, the first step runs
an inner loop that invokes the Walkup procedure for each back edge from u to a
descendant w in the input graph. The second step of the main loop body is to then
embed all back edges from v to its descendants (unless a non-planarity condition
arises).
Prior to embedding the back edges to v, each DFS tree child edge of v is the
root edge of a singleton biconnected component. If v has any back edges to descen-
dants, then one or more of its DFS tree child edges (u^, c) in the embedding structure
will have pertinent child biconnected components in the pertinentBicompList of c.
For each such DFS tree child edge c), the algorithm invokes a procedure called
'Walkdown' to embed the back edges from a root copy to descendants of c, merging
34

pertinent child biconnected components as necessary.


For a given root copy i;', the Walkdown procednre begins a sequential traversal
of the external face of the biconnected component beginning with the edge indicated
by the link[0] member of v'. The Walkdown merges pertinent biconnected components
and embeds back edges as necessary during the traversal. These actions attach more
vertices and edges to the biconnected component B rooted by v' such that the external
face of B consists of more than the root edge. If the first traversal processes all
vertices on the external face of B, returning to %/, then the Walkdown terminates.
However, the first traversal also stops if it encounters a non-pertinent externally active
vertex, which is called a atopping TJertez according to Definition 2.10. In this case,
the Walkdown performs a second sequential traversal of the external face starting at
v' and proceeding with the edge indicated by the link[l] member of v'. Again, the
traversal proceeds to embed back edges and merge pertinent biconnected components
until a stopping vertex y is encountered.

D efinition 2.10 A stopping vertex is a non-pertinent externally active vertex.

As the Walkdown traverses the external faces of biconnected components, it


maintains a stack of root copy vertices that must be merged when the next back
edge is embedded. When a Walkdown traversal visits a vertex w, the first task is
to determine whether a back edge to w must be embedded based on whether the
adjacentTo member equals ti. If so, then the root copies on the stack are merged with
their parent copies and the new back edge (v', w) is embedded such that the external
face paths traversed from u' to w form a proper face with the new back edge. Then,
the adjacentTo member of w is incremented to prevent another back edge of the form
(i/,w ) from being embedded if w is visited again during the Walkdown.
The second task performed when visiting a vertex w is to determine whether
it has any pertinent child biconnected components. If not, then w is inactive. The
Walkdown obtains the successor a of w along the external face. If the adjacentTo
member of s does not equal v and the biconnected component rooted by v' is exter-
nally active and contains a, then the Walkdown embeds a special 'short-circuit' edge
35

between v' and s along the external face such that it removes w from the external face
(if the adjacentTo member of a does equal u, then tu is removed &om the external
face when the back edge (u% a) is embedded). A short-circuit edge may not exist in
the input graph, or it may form a multiple edge in G, but each short-circuit edge is
specially marked for easy removal after the main loop in Figure 2.1 is finished. Short-
circuit edges are added as an optimization to help achieve linear time (see Section 2.9
for details).
If, in the second task, the Walkdown determines that the pertinentBicompList
of tu is non-empty, then the Walkdown obtains the root tu' of a pertinent child bicon­
nected component with preference for the root of an internally active child biconnected
component if any are in the list. Since, according to Section 2.5, the Walkup prepends
the roots of internally active biconnected components and appends the roots of exter­
nally active pertinent child biconnected components, the Walkdown simply obtains
w' by taking the first element of the pertinentBicompList of w.
The Walkdown pushes onto the above mentioned stack the root w' obtained
from the pertinentBicompList of tu, then traversal descends to the vertex tu'. The
direction in which to continue traversal from tu' must then be selected. Due to
short-circuit edges embedded by the Walkdown in prior steps of the algorithm, the
immediate neighbors of tu' along the external face are not inactive. If both neighbors
are internally active, then either direction can be used to continue traversal. If only
one external face neighbor of tu' is internally active, then traversal proceeds in the
direction of the internally active neighbor. If both neighbors are externally active,
then traversal proceeds in the direction of a pertinent nei^bor. If both neighbors
are externally active and non-pertinent (i.e. both are stopping vertices), then the
input graph is non-planar and the Walkdown terminates (see Section 2.8 for details
on isolating a Kuratowski subgraph).
We now consider an example to help illustrate the behavior of the Walkdown.
In this example, the Walkdown must embed iwo back edges, (u', tu) and («', y). When
the first Walkdown traversal begins, the biconnected component B contains only the
root edge (u', c). Since the algorithm calls Walkdown immediately after all Walkup
36

Figure 2.6: Wsdkdown Em beds Back Edge (i;, w)

calls have been completed, Figure 2.5 from Section 2.5 exemplifies the state of our data
structures at the beginning of a Walkdown on B (except that short-circuit edges are
not depicted). The Walkdown proceeds from v' to c, where it finds a pertinent child
biconnected component with root c'. The Walkdown descends to c', and obtains the
first active vertices w and r along both external face paths extending from d. Since
both are externally active and pertinent, w is selected arbitrarily. The Walkdown
merges the root copy c' with c and embeds the back edge (u', w). Figure 2.6 depicts
the result of this operation (short-circuit edges are not depicted as they are not
germane to correctness, though they do expedite the process of obtaining w and r).
Once the back edge to w is embedded, the Walkdown determines that it cannot
proceed further beyond w because w is a stopping vertex and must remain on the
external face. The Walkdown begins the second traversal at v' to walk down the
opposing path (the one that does not lead to w). This path always begins with
revisiting c. In this example, the second Walkdown leads to vertex r. Since the
Walkup will have recorded r ' as a pertinent child biconnected component of r, the
Walkdown pushes r ' onto the stack. However, the shorter and more natural direction
of continued traversal would appear to be the path leading through z to %/, but this
37

Figure 2.7: Walkdown Flips a B iconnected Component

path cannot be used because the Walkdown traversal cannot proceed beyond z since
it is externally active. Instead, the Walkdown traversal selects the path through x
to y because y is internally active. Note that, due to short-circuit edges (see Section
2.9), lengthy paths such as ( / , ..., x, ..., y) axe covered by a short-circuit edge [r', y)
along the external face.
Since the direction of travel used to enter r opposes the direction of travel used
to exit r', the biconnected component rooted at r' must be flipped before it is merged
with r. Figure 2.7 depicts the result of the flip and merge operation as well as the
embedding of the back edge
In general, a biconnected component Be must be merged with its parent bi-
connected component Bp such that the path from the root of Be to the next vertex
becomes part of the proper face formed when Walkdown embeds the back edge that
biconnects vertices in Bp with those in Be- For example, in Figure 2.7 we flipped the
biconnected component rooted at r' so that the path from r' through x to y would
become part of the proper face formed when r and r ' were merged and the back edge
(ï;', y) was embedded.
To decide whether a biconnected component should be flipped, the Walkdown
compares the direction of traversal used to enter a cut vertex r with the direction
38

of traversal used to exit r'. These pieces of information are pushed onto the stack
when r ' is pushed so that the stack has all information necessary to properly merge
biconnected components when the next back edge is embedded.
Further details pertaining to flipping biconnected components appears in Sec-
tion 2.10. Detailed pseudo-code for the Walkdown operation appears in Chapter 6 .
Detailed pseudo-code for the main algorithm loop, including the first inner loop that
invokes Walkup for each back edge and the second inner loop that invokes Walkdown
for each DFS tree child edge {v‘^, c) with pertinent vertex c, appears in Chapter 7.

2.8 N on-P lanarity and K uratowski Subgraph Isolation


For a given biconnected component B rooted by the tree edge (u% c), if the two
Walkdown traversals embed all back edges between u' and descendants of c, then B
remains planar and the algorithm continues. If, however, some of the back edges to
descendants of c are not embedded, then the input graph is non-planar, as shown by
the proof of correctness of the Walkdown in Chapter 6 .
The Walkdown may halt if it encounters two stopping vertices while trying
to determine the direction of traversal from a child biconnected component root.
This condition is depicted in Figure 2.8(a). Otherwise, if the Walkdown halts on
a biconnected component B without embedding all back edges to descendants of a
root copy of v, then both Walkdown traversals were terminated by stopping vertices
appearing along the external face of B. This condition is depicted by Figure 2.8(b).
Both diagrams in Figure 2.8 depict minors of the input graph. Since Figure
2.8(a) depicts a i^ 3 ,s, the input graph is clearly non-planar. However, Figure 2.8(b)
appears to be planar, so it is natural to ask why the edge (u, w) was not embedded
inside B, which the Walkdown is capable of doing by first embedding (%;, w) along
the external face, then embedding (n,z) such that (v, w) is surrounded inside the
bounding cycle of B. In short, there is either some aspect of the edge (i), w) or
some aspect of the vertices embedded within B that prevents the Walkdown &om
embedding (n, w) inside B. Our proof of correctness exploits these two cases to
identify four additional non-planarity patterns, which are also minors of the input
39

(a) (b)

Figure 2.8: Walkdown H alting Conditions

graph. Most importantly, we prove that if none of the conditions occur that result in
one of the four additional minor patterns, then the assumption of an unembedded edge
{v, vj) at the end of step v contradicts specific behaviors of the Walkdown. This proof
relies primarily on the order of decisions made in selecting a direction of traversal
from a pertinent child biconnected component root as well as the fact that a back
edge to a vertex w is embedded before exploring any of its externally active pertinent
child biconnected components.

Figure 2.9: N on-planarity M inors o f th e Input Graph

The five non-planarity minor patterns identified in our proof of correctness are
depicted in Figure 2.9. They can be used as the basis of a Kuratowski subgraph
isolator. The edges in these patterns are typically representative of paths in the
input graph, many of which can be found by following paths in the depth first search
40

tree, paths around the external faces of biconnected components, or the blocking path
through B appearing in three of the patterns. Since ^ 3 3 is a subgraph of the patterns
in Figures 2.9(b-d), the portions of the input graph indicated by some of the edges in
those patterns must be omitted in order to isolate a ^^3 , 3 homeomorph. Furthermore,
the pattern in Figure 2.9(e) represents a minor in the input graph, so a few
additional tests must be performed to determine whether a K 5 or K 3 3 homeomorph
occurs. The details of these operations appear in Chapter 9.

2.9 Short-C ircuiting Inactive V ertices


Part of our strategy of achieving linear time performance includes removing
inactive vertices from the external face as they aire encountered by the Walkdown.
We refer to this action as s h o r t-c ir c u itin g in a c tiv e v e r tic e s because ‘circuit’ is another
name for cycle, and we need to shorten the bounding cycle of a biconnected compo-
nent’s external face. Short-circuiting optimizes to constant time the task of obtaining
the vertices necessary to choose a direction of traversal after descending to the root of
a pertinent child biconnected component. The selection is performed according to the
rule given in Section 2.7, which is a necessary part of the correctness of our algorithm.
Figure 2.10 exemplifies a family of graphs on which our algorithm must remove in­
active vertices from the external face (using a technique such as short-circuiting) in
order to achieve linear time performance.
In Figure 2.10, the depth first search tree consists of a single path beginning
with the topmost vertices in the order given by their Arabic numerals, proceeding to
V, then clockwise through the vertices identified by Greek letters, then x and y.

At step V, all vertices not labeled with Arabic numerals are joined into a single
biconnected component by embedding the back edge (u, ?/). Successive steps of our
algorithm process the numbered vertices in descending order. For each such step
i> 0 , the biconnected component containing the tree edge (%,%4 - 1 ) must be merged
with the child biconnected component rooted by ($ 4- 1)'. Before the merge can
occur, the Walkdown must descend to the child biconnected component and choose a
direction of traversal that leads to a pertinent vertex, with preference for an internally
41

Figure 2.10: The N ecessity o f Short-Circuiting Inactive Vertices

active vertex. In the counterclockwise direction, the vertex y is immediately found.


However, it is externally active, so the clockwise path from the root must, for reasons
described below, be explored to see whether the first active vertex encountered is
internally active. Without short-circuiting, the inactive vertices labeled with Greek
letters would be traversed before the externally active vertex x is encountered in each
step i > 0 . Since z is a stopping vertex in each of these steps, the vertices identified by
Greek letters remain on the external face after each step. If the graph is constructed
such that there are vertices on the DFS tree path between 0 and u exclusive and
between n and z exclusive, then the sum of visitations to vertices identified by Greek
letters would be were it not for short-circuiting.
The natural question at this point is why does the Walkdown examine both
paths leading from a child biconnected component root if it finds a pertinent vertex
along the first path examined. This, of course, is the miaon (Hêtre of Figure 2.11.
In Figure 2.11, the first Walkdown traversal for v merges the singleton bicon-
42

.w .

/
/

Figure 2.11: Exam ple o f Improper Selection o f Traversal D irection

nected components containing y, r and w in order to embed the back edge (v,w).
Then, the Walkdown continues along from w to r. It examines the pertinent child
biconnected component rooted at r'. For the sake of contradiction, suppose the Walk-
down selected x to be the next vertex in the traversal since it is pertinent. The result
is that the biconnected component rooted at r ' would not be hipped before being
merged. After the Walkdown embeds the back edge (n,x), vertex x becomes a stop­
ping vertex. The second Walkdown traversal would begin again at the root copy of
u and encounter y as a stopping vertex. Thus, the back edge (u, z) would not be
embedded. However, the Walkdown should not fail to embed this edge because the
graph in Figure 2.11 is planar. If the Walkdown operates as describe in Section 2.7,
then vertex d is selected instead of z because d is internally active.
Our planar embedding algorithm short-circuits an inactive vertex w by adding
a short circuit edge (u', a;) under the following conditions: 1 ) o' is the root of an
externally active biconnected component H, 2) w and z are in B, and 3) z does
43

not have an nnembedded back edge to n. The ghort-circnit edge appears along the
external face and forms a degree three proper face with the path (n', (n%to), tu,
(tu,3 ); z). A short-circuit edge may be a multiple edge with any other edge (tree
edge, back edge or short-circuit edge). However, there are fewer than n short-circuit
edges created during embedding because each short-circuit edge can be associated
with the inactive vertex it removes from the external face. Moreover, since a short-
circuit edge to z is only added under the special conditions listed above, both faces
divided by a short-circuit edge are at least degree three (in the hnal embedding).
Thus, the edge limit of Corollary 1.5 is maintained. Finally, the short-circuit edges
are specially marked, so they are easily deleted at any time. Details pertaining to our
method of short-circuiting appear in Chapters 3 and 4.

2.10 Flipping B icon n ected C om ponents


As described in Section 2.7, the Walkdown flips biconnected components in
order to reach pertinent vertices before stopping vertices, which keeps externally
active vertices on the external face while back edges are embedded. The cost of
deciding whether to flip a biconnected component is dominated by the steps that
decide which path to take from the root of a child biconnected component. The
latter decision is reduced to constant amortized time by the use of short-circuiting
and the methods for determining internal and external activity. However, the cost of
flipping a biconnected component in constant amortized time has yet to be discussed.
In Chapter 1, a combinatorial planar embedding is defined to provide a clock-
wise ordered list of the neighbors of each vertex. To maintain a consistent vertex
orientation while flipping a biconnected component would require that we invert the
adjacency lists of every vertex in the biconnected component. It is easy to create
graphs that would require 0 (n) vertices to be flipped P (n) times, so we cannot aflbrd
to maintain a consistent vertex orientation throughout the embedding process.
Our solution is to relax the requirement that a consistent vertex orientation
be maintained during embedding. Our data structures maintain a cyclic order of
the embedded edges of each vertex, but individugfl vertices can have a clockwise or
44

counterclockwise orientation. If a combinatorial planar embedding is the required


result; then our algorithm marks the root edge of a biconnected component if the
latter is flipped. These marked edges are used by a very simple post-processing
operation to impose a consistent orientation on all of the vertices, as described in
Section 2.11.
Since we need only maintain the cyclic edge order of each vertex, the biconnected
component flip operation can be reduced to a simple augmentation of our process for
merging a root copy vertex with its parent copy. When the Walkdown descends
6 om a cut vertex tu in the embedding structure to the root tu' of a pertinent child
biconnected component, it pushes four integers onto its stack, which are denoted tu,
tUin, tu' and tu^^. The meaning of tu and tu' have already been explained. The link in
tu indicating the edge record the Walkdown used to enter tu is denoted tUfn. The link
in tu' indicating the edge record the Walkdown used to exit tu' toward the next vertex
is denoted tu^^. When the Walkdown flnds a back edge to embed, it embeds the edge,
but it also pops the stack to merge all biconnected components it has encountered
since the last edge embedding. The merge of tu and tu' must occur such that the edge
records indicated by tu,» and tu'„^ become consecutive in the adjacency list of w and
such that they lie on the proper face created by the back edge being embedded.
The merge operation begins by reassigning all settings in the edge records of
edges incident to tu' such that the edges indicate that they are incident to tu. Then,
a circular list union of the adjacency lists of w and tu' occurs. The link[tUj„] edge
record of tu and the link[tu^J edge record of tu' are joined, and the link[l xor tu ^ ]
edge record of tu' becomes the new link[l xor tUj„] edge record of tu.
The biconnected component flip operation occurs implicitly as a part of correctly
perfoiming the circular list union. Note that if tu^ and t u ^ are equal, then the links in
each edge record of the adjacency list of tu' must be swapped before the join operations
described above can result in a consistent adjacency list. The swapping of the lin k s in
each adjacency list node inverts the orientation of w' to be consistent with tu, but the
orientations of all descendants of tu' Eire not changed (because it would take too long).
InsteEid, the root edge incident to tu' is marked so that a post-processing operation
45

descnbed in Section 2.11 can recover the proper orientation of the descendants of w'.
Note that the Sipping operation implicitly inverts the orientation of all descendants
of w', not jnst the vertices in the biconnected component with root w'.

(a) (b)

Figure 2.12: Overview o f D ata Structures for Flip Operation

The details of these processes are illustrated in Figures 2.12, 2.13, and 2.14.
In Figure 2.12, we have an overview of the embedding of back edge (1, 7). Figure
2 .1 2 (a) shows the state of the data structures during step 1 after embedding back
edges (1, 3) and (1, 4). Because vertex 4 is externally active, the hrst Walkdown
traversal returns and the second Walkdown traversal begins at 1' such that back edge
(1, 7) will be embedded around the right hand side. However, since vertex 8 is also
externally active, the biconnected component rooted at 2' must be flipped so that
vertex 8 remains on the external face when edge (1, 7) is embedded. The result is
shown in Figure 2.12(b).
An elaboration of Figure 2.12(a) appears in Figure 2.13. The rounded rectangles
are edge records, and the double lines connecting them are twin links. The circles
represent vertex structures, except that vertices 4 and 8 are represented by squares
to indicate their external activity. The single lines with black and white dots for
endpoints represent the links that bind the adjacency list and the vertex structure
into a circular doubly linked list.
46

5,7

Figure 2.13: Elaboration of D ata Structures Before Flip Operation

At this point of the embedding, all vertices still have the same orientation. The
edge records in the adjacency list of any vertex can be traversed in counterclockwise
order by traversing the black dot links to exit the vertex structure and each edge
record in the adjacency list.
As stated previously, the first Walkdown traversal embeds edges (1,3) and (1,4),
then stops at vertex 4. The second Walkdown traversal restarts along the right side of
edge (1%2). Then, it descends to the pertinent child biconnected component rooted
at 2 '. Since vertex 7 is internally active, the hicbnnected component must be fiipped
before merging so that vertex 8 remains on the external face.
The results of the merge operation can be seen in Figure 2.14. The merge
operation begins by changing all edge records that contain 2 ' so that they contain 2 .
47

Then, we Sip the biconnected component by inverting the circnlar list union. Edge
record (2, 7) is joined with (2,1), and edge record (2, 8 ) is joined with vertex structure
2. Note that the links of the edge records formerly in 2^ (the root copy vertex) must
be inverted in this case so that the adjacency list of vertex 2 is consistent, i.e. a
traversal of the adjacency list of vertex 2 can be performed by consistently using the
same colored dot link to exit the vertex structure and each edge record.

8 8.5

Figure 2.14: D ata Structures A fter Flip and Back Edge Em bedding

The inverted circular list union has, however, implicitly inverted the orientations
of all of the descendants of vertex 2^. No other work was actually performed on the
links in these descendants, and the result is that the black dots links now result
in a clockwise ordering of their adjacency lists. Our algorithm accounts for this by
marking the tree edge (2, 5) as described in Section 2.11.
48

The huai change made in Figure 2.14 is the addition of the back edge (1, 7).
Since we exited vertex 1' using edge record (!', 2), the new edge record (!', 7) is added
between vertex structure 1' and edge record (1% 2). Since the Walkdown entered
vertex 7 using the edge record (7,2'), the new edge record (7,1') is added between
the vertex structure for 7 and the edge record for (7, 2 ). Thus, edge (1, 7) is on
the external face and has formed a new proper face in the embedding that includes
vertices 1, 2, and 7.
The detail in Figure 2.14 makes evident that our strategy of biconnected com­
ponent hipping introduces a small wrinkle in how we traverse the external face of
biconnected components. A counterclockwise walk of the external face of the bicon­
nected component now rooted at 1' begins with vertex 1' then vertices 4, 2, 8 , 6,
7 and back to V . In detail, we exit vertex 1' using a black dot link, then we exit
vertex 4 using its black dot link, then we exit vertex 2 using a black dot link. This is
because vertices 1', 4 and 2 have the same orientation. However, if we exit vertex 8
using the black dot link, this takes us back to vertex 2. This is because vertex 8 has
an opposing orientation as described above.
To solve this problem, we switch focus from the link used to exit a vertex w
and instead maintain the link used to enter its successor s (which is determined
specially for singleton biconnected components, as described in Section 2.3). Then,
our algorithms simply exit a vertex s from the opposing link. In the case of vertex 8
in Figure 2.14, we enter from the edge record (8, 2), which corresponds to the black
dot link for vertex 8, so we exit from the white dot link of vertex 8. Similarly, we
reach vertices 6 and 7 through black dot links, so we exit each through their respective
white dot links, which returns properly to vertex V.

2.11 C onsistent O rientation o f V ertices


After the main loop described in the algorithm outline of Figure 2.1 (and de­
tailed throughout this chapter), a simple post-processing operation can be used to
impose a consistent orientation on all vertices in the embedding structure. During
the merge operations described in Section 2 . 1 0 , a biconnected component root edge
49

(w% c) is marked when the biconnected component must be dipped. The root edge is
also transformed into edge (w, c) as part of the merge.
To represent the mark, we add a sign to each edge record that is initialized to +1.
It is changed to -1 to indicate an inversion. The orientation of a vertex w relative to
the root of the biconnected component is determined by the product of the signs of the
tree edges in the DFS tree path from w up to the root of the biconnected component.
Separate biconnected components are oriented independently as described in Section
2.12. If the product equals -1, then w must be inverted by swapping the links in
its vertex structure and in each edge record of its adjacency list. Thus, a consistent
orientation for all vertices in a biconnected component can be easily obtained by
pre-order traversal of the portion of the depth first search tree in the biconnected
component. The detailed pseudo-code for this operation appears in Chapter 8.

2.12 H andling o f Separable and D iscon n ected Graphs


Many prior planarity algorithms operate on biconnected graphs. While it is not
difficult to obtain the biconnected components using lowpoint, then embed each and
reassemble the results, this means that the prior algorithms perform a portion of the
work of our algorithms as a function of their preprocessing and postprocessing.
By duplicating cut vertices and making use of the lowpoint function during the
embedding process, our new algorithms handle separable and disconnected graphs
with virtually no modification. For a biconnected input graph, after all embedding
steps and before vertex orientation, there is only one root copy vertex corresponding
to the DFS tree root. If the input graph is disconnected, then there will be multiple
root copy vertices representing the DFS tree root of each connected component. If
any connected component is separable, then there will be root copy vertices represent­
ing the points of separation for the biconnected components within each separable
connected component. Our algorithm's postprocessing is simply modified to merge
these extra root copies into their parent copies (empty parent copies are created for
the DFS tree roots). The detailed pseudo-code appearing in Chapter 8 includes the
modifications for separable and disconnected input graphs.
50

3. D ata Structures and T heir Initialization

This chapter describes the logical components required to represent the input graph
and the embedding. This chapter also describes the preprocessing of the input graph
and the initialization performed on the embedding structures. The last section pro­
vides definitions that identify fundamental states of the embedding.

3.1 N otation
For the purposes of the data structures and algorithms in this dissertation,
arrays are assumed to be indexed beginning with 0. The value nil is any invalid array
index, such as -1. The number of elements of a list L is denoted \L\.
In the pseudo-code of this dissertation, the inputs to a procedure are indicated
by the term in and the outputs are indicated by the term out. The term this indicates
a special implicit input parameter that points to a data structure over which the pro­
cedure predominantly operates. In common object-oriented parlance, the procedure
is a member of a class, and the data structure pointed to by this is an instance of the
class. The use of this convention greatly increases the readability of the pseudo-code
since this typically points to the embedding data structure, which is denoted G.

3.2 Preprocessing o f th e Input Graph


The input graph is placed in memory in adjacency list format with one structure
representing each vertex and two records indicating each edge (u, u), where one edge
record appears in the adjacency list of u and indicates u as a neighbor and the other
edge record appears in the adjacency list of v and indicates u as a neighbor. Once
the input graph is in memory in adjacency list format, it is preprocessed by a number
of linear time steps. First, a depth first search is performed to assign the depth
first index and depth first search parent of each vertex as well as the type of each
edge record (tree edge or back edge). After the depth first search, the vertices are
reordered according to their depth first indices. This facilitates future discussion
61

by making the label ï; of vertex n synonymous with the depth hrst index of vertex
n. The hnal preprocessing step on the input graph is to perform the least ancestor
and lowpoint calculations. All of these preprocessing calculations are required by all
currently known linear time planarity algorithms [7, 30, 52].

3.3 V ertex Structures and E dge R ecords


This section specihes the variables used by our algorithms to represent each
vertex and edge of an embedding. The same structures can be used to represent
the input graph. Table 3.1 lists and describes the variables in a vertex structure. A
vertex structure can either represent a parent copy or a root copy of a vertex &om
the input graph. Table 3.2 lists and describes the variables in edge records. An edge
is represented by a pair of edge records.
For each vertex, the values of DFSParent, leastAncestor and lowpoint (see Table
3.1) are computed when preprocessing the input graph. The vertex type is assigned
zero, except the bit that indicates whether the vertex structure is a parent copy or
root copy. The parentLink is assigned nil since root copy vertices are not used until
a tree edge is embedded by EmbedTreeEdge, defined in Chapter 4. The link[0] and
link[l] settings are initially assigned to reference the vertex structure such that the
vertex starts out with degree 0. The visited and adjacent To members are treated as
flags that are raised when equal to the index of the vertex v currently being processed,
so they are initialized to the value n, which is an invalid index for zero-based arrays.
The pertinentBicompList of any descendant w of the vertex v being processed
is initially empty at the beginning of step u. As a result of the calk to Walkup in
step r (described in Chapter 2, Section 2.5), the pertinentBicompList of a vertex w
receives the list of root copy vertices described in Table 3.1. The Walkdown calls
for step V (described in Chapter 2, Section 2.7) return the pertinentBicompList of all
vertices to the empty state unless the Walkdown stops with a non-planarity condition.
The details described in this dissertation assume that each pertinentBicompList is a
circular doubly linked list such that both prepending and appending are constant
time operations.
52

Table 3 .1: V ariables in V ertex S tru c tu re s


V ariable D escrip tio n
DFSParent Index of the depth hrst search tree parent.
leastAncestor Minimum index of neighbors adjacent by a back edge.
lowpoint Minimum of leastAncestor and lowpoint values of
depth hrst search tree children.
type Bit Sags used to distinguish parent and root copy
vertices. Also used by the Kuratowski subgraph
isolator to classify vertices while searching for
certain paths in a biconnected component.
parentLink Indicates the parent copy vertex represented by
a root copy vertex.
link[0] and link[l] References to edge records th at are used to insert the
vertex structure Into a circular doubly linked list with
the edge records in its adjacency list. When the vertex
is on the external face of a biconnected component,
these links reference edge records for the two edges
that join the vertex to the external face.
visited General flag used by many algorithms
(e.g., Walkup, Kuratowski subgraph isolator).
adjacent To For all descendants of the current vertex n, this is
set before any Walkdown calls to indicate that the
vertex has a back edge to v. Cleared by Walkdown
once the back edge is embedded.
pertinentBicompList For any descendant w of the current vertex v that is
a cut vertex in the embedding, this member lists the
roots of the child biconnected components of w that
should be merged with w due to one or more
unembedded back edges leading from descendant (s)
of to to u.
separatedDFSChildList For the parent copy of vertex w, this member contains
a doubly linked list of DFS tree children of w that are
not embedded in the biconnected component with w.
The list is sorted by the lowpoint of the children of w.
repInParentList Indicates the vertex's node in the
separatedDFSChildList of its DFS parent.

The separatedDFSChildList maintained by each vertex structure is used for the


efficient computation of external activity. For each vertex, the list is initialized to
contain all of the depth ffirst search tree children of the vertex, sorted by their lowpoint
values. To achieve linear time, we perform the sorting indirectly. First, we bucket
53

Table 3.2: Variables in Edge Records


V ariable D escrip tio n
neighbor Indicates a neighbor t; of the vertex tu, where the
adjacency list of tu contains the edge record.
type Bit fiags used to distinguish tree edges, back edges,
and short-circuit edges.
twiuLink For an edge record m u's adjacency list with a
neighbor indicating n, the twinLink refers to the edge
record in v ’s adjacency list with a neighbor indicating
u. This member is easy to represent implicitly (e.g. by
placing twin records in consecutive memory locations).
link[0] and linkfl] References to other edge records in the adjacency list
or to the vertex structure containing the adjacency list.
visited General flag used by many algorithms
(e.g. Kuratowski subgraph isolator).
sign Initially 1, changed to -1 in an edge record of edge e
to indicate that the biconnected component with root
edge e was flipped prior to being merged.

sort the vertices based on their lowpoint values. Since the lowpoint of a vertex v is
equal to the DFI of v or one of its DFS ancestors, it suffices to create an array B of
n buckets, one for each possible DFI value. A given bucket B[i] should store a list of
the vertices having a lowpoint of i. Once the bucket sort is finished, we iterate the
buckets in ascending order, appending each vertex c to the separatedDFSChildList of
its DFS parent w. The separatedDFSChildList is represented with a doubly linked
list so that it can support constant time deletion.
The repInParentList member of a vertex c is set equal to the node that rep-
resents c in the separatedDFSChildList of its DFS parent w. When a biconnected
component with root edge («/, c) is merged with its parent biconnected component by
joining tu' with its parent copy tu, the DPS child c is removed from the separatedDF­
SChildList of tu since tu and c are no longer in separate biconnected components.
This can be done in constant time using the repInParentList in c and the fact that
the separatedDFSChildList of tu is doubly linked.
Since upper bounds are known for the number of edges needed to establish the
planarity or non-planarity of an input graph, an implementation is able to allocate
54

space for all edge records at once. The initial value for most of the variables in an edge
record (see Table 3.2) should be until edges are added to the embedding by the low-
level procedures EmbedTreeEdge, EmbedBackEdge, and EmbedShortCircuitEdge,
which are dehned in Chapter 4. The exceptions are that the type of each edge record
should have all bit hags initially clear, the visited member should be 0 , and the sign
should be 1.

3.4 A Structure for R epresenting an E m bedding


To complete the description of the data structures, Table 3.3 dehnes a structure
su&cient for representing the embedding. The value of n in the embedding structure
is initialized to be the number of vertices in the input graph, which is then used to
allocate arrays and lists of the appropriate size as described in Table 3.3. The value
of m is initialized to 0 since the embedding begins with no edges. The value of v is
initialized to nil until the planarity algorithm begins.

Tab e 3.3: V ariables in E m b ed d in g S tru c tu re


V ariable D escrip tio n
n The number of vertices in the embedding.
m The number of edges embedded.
V The current vertex whose back edges are being processed.
E An array of 2kn edge records with constant k > 3 .
V An array of 2n vertex structures, the first n for parent
copy vertices, and the latter u for root copy vertices.
BicompLists A memory area of 0(n ) size used to store all pertinent
biconnected component lists.
DFSChildLists A memory area of 0 (n ) size used to store all
separated DFS child lists.
S a stack used by the algorithms in this dissertation to push
and pop up to 4A:n computer words.

Based on Corollary 1.5, the array jE is allocated enough edge records to accom-
modate either the embedding of any planar graph with n vertices or the identification
of a Kuratowski subgraph in any non-planar graph with n vertices (no additional edge
records are needed for short-circuit edges). The first n vertex structures in array y
55

are for parent copy vertices, which are meant to represent the original vertices of the
input graph. The latter n vertex structures in array V are for root copy vertices.
Given a cut vertex w in every path 6 om a DFS child c to some vertex distinct from
w and not a descendant of c (see Theorem 1.3), the embedding structure uses vertex
structure c + n m V to store a root copy that represents w in the biconnected
component containing c. The choice of location c + n avoids allocation collisions, as
shown by Lemma 3.1.

L em m a 3.1 Giuen o cut uertez w o child iWconnected component ^ /m m


vertices in other biconnected components contoininp w, there ezists only one
child c of w in B , so a root copy can be created to represent w in B and placed at
location c + n in the vertex structure array V without collision with other root copies
ollocoted in V.

P ro o f. By contradiction, if two DFS children of a vertex appeared in a single child


biconnected component of the vertex, then there would have to be an edge connecting
the subtrees rooted by the two children. This contradicts the definition of depth first
search tree in which the only non-tree edges are back edges connecting an ancestor and
descendant. Moreover, a DFS child c will only be in one child biconnected component
since it only has one DFS parent w. Thus, the index c can be used to uniquely identify
the child biconnected component of w that contains c, and we add u to determine the
location of its root copy vertex because the first locations of y are, by definition,
allocated for parent copy vertices. □

The BicompLists and DFSChildLists members are simple memory areas used
to store the nodes of every pertinentBicompList and separatedDFSChildList, re-
spectively. The space is sufficient because each pertinentBicompList contains root
copy vertices that differ from those in every other pertinentBicompList and no sepa-
ratedDFSChildList ever contains vertices that are in another separatedDFSChildList.
The stack 5, initially empty, contains enough computer words to accommodate
pushing one pair of computer words per edge record in F . Elementary algorithms such
as depth first search on the input graph can be written to push a vertex plus a pointer
56

to Em edge record leading from that vertex to a neighbor. The stack 5' is also nsed as
temporary space by the procedures MergeBicomps and Walkdown in Chapter 6 , the
procedure Orient Vertices in Chapter 8 and procedures of the Kuratowski subgraph
isolator in Chapter 9.
Finally, note that since edge records are stored in array F' while vertex structures
are stored in V, the implementation and use of link[0] and link[l] in edge records
requires further consideration because we insert vertex structures into doubly linked
circular lists along with the edge records in their adjacency lists. In every case except
link[0] and link[l] in edge records, it is cleEur whether a structure or record vEuriable
refers to E or V. For example, the link[0] and link[l] members of a vertex structure
always refer to E, so these variables can be implemented as integers that hold array
indices. However, link[0] and link[l] in an edge record could indicate another edge
record in E, or the inserted vertex structure from V.
One simple solution is to create extra edge records in E to store the linkfO]
and link[l] members of vertex structures, and to use the type and neighbor fields of
those edge records to bind them to vertex structures in V. More elegant solutions
are possible depending on the sophistication of the implementation language. For
example, in object oriented languages, the edge records and vertex structures can
inherit from a common base class containing the type as well as link[0] and link[l],
implemented as physical memory pointers. Upon traversing a link to arrive at a new
edge record or vertex structure x, the type would be used to determine whether x is
in E or V. Though other solutions can be created based on minor modifications to
the embedding structure presented in this section, the above methods demonstrate
that the edge record links can be implemented in constant space and traversed in
constant time. In the pseudo-code of this dissertation, the m atter is treated as an
implementation detail.

3.5 T he Initialization Procedure


The prior sections of this chapter lead to an initialization algorithm for the
data structures described. Figure 3.1 encapsulates this initialization Eilgorithm in
57

Figure 3.1: The Initialization Procedure

Procedure: Initialize
in: Graph G with at most An edges
put: Embedding Structure G

1) Create DFS tree in G


2) Reorder vertices in G according to DFI
3) Compute leastAncestor and lowpoint in G

4) Allocate embedding structure G and its subordinate structures


5) Set m in G equal to the number of vertices u in G
6 ) Assign m l to the 'current vertex' member u in G

7) Initialize vertex structures in array V of embedding structure G


8 ) Copy DFSParent, leastAncestor and lowpoint of each vertex G

to vertex structures in array y of G

9) Set m in G equal to 0
10) Initialize edge records in array E oî G

11) Clear the BicompLists memory array in G


1 2 ) Clear the DFSChildLists memory array in G

13) Create sorted separated DFS child lists


for all vertices with a DFS parent

14) Initialize the stack 5 in G to be empty

15) return G

a procedure named Initialize, which is expressed with a pseudo-code notation used


throughout this dissertation. Lemma 3.2 states that the Initialize procedure achieves
G(n) performance.

L em m a 3.2 The procedure LnifWize ochiet/ee G(u) peryormonce.

P ro o f. The input graph is assumed to have G(m) edges. Lines 1 to 3 call upon
^11-known algorithms [53] that achieve linear time performance. Line 4 is typically
constant time, but linear time in languages that insist on clearing the bits of allocated
memory space with a Simple loop. Lines 5, 6 , 9 and 14 are simple constant time
58

assignments, and Lines 7, 8 , 10, 11 and 12 require simple linear time loops. Line 13
achieves linear time by the method described in Section 3.3. Line 15 is constant time
since a pointer to the initialized embedding structure is returned. □

3.6 Fundam ental E m bedding D ata Structure DeGnitions


Based on the vertex structure, edge record and embedding structure speciGca-
tions appearing in Tables 3.1, 3.2, and 3.3, it is possible to deGne a root copy, an
adjacency list, and the representation of an edge according to the needs of the al­
gorithms in this dissertation. For the sake of future reference, these are presented
formally as DeGnitions 3.1, 3.2, 3.3, and 3.4.

D eB nition 3.1 root copy o/ o uerter tu is o uerter structure ot position c 4 - n


in the vertex array V of the embedding whose type field indicates that it is a root
copy and whose parentLink indicates the vertex structure for w. The root copy tu^
represents the uertez tu in the ^connected component contoininp the DFS' child c o/
w until the first back edge from c or one of its descendants to an ancestor of w is
embedded^ biconnecting c with ancestors of w.

D eB nition 3.2 The odyucency list o/ o uerter structure tu is de/lned to 6 e the list
o/ zero or more edye records thot con 5e obtained by iterotiny the successiue lin h ^
members starting tuith the uertez structure tu and ending tuhen the iteration returns
to tu, tuhere p can be either zero or one. The neighbor member o/ each edge record
indicates a t;ertez structure in use by the embedding structure G.

D eB nition 3.3 v4 tree edge or bach edge bettueen ttuo t/ertez structures z and y is
represented by ttuo edge records e% and e^ as /ollotus."

1. One unit o/ the ualue o /m in the embedding structure represents the edge cor-
responding to the edge records eg and Cy.

2. In accordance with Definition 3.2, appears in the adjacency list of x and Cy


appears in the adjacency list o/y.
59

,9. TTie o/e^ mdicatea neigMor o/e^ mdicofea z.

2%e fwinZ,:»* o/e^ indicotea e^, omf (Ae WnZ,mA o /e , *nd:co(ea e^-

T ia o roof co^y or poremf copy 0 / fAe D f5 fo ren f 0 / y, fAen fAe type 0 / e%


ond 6 y ia free ed^e. OfAenoiae, fAe f%/pe ia 6 ocA ed^e.

6. The value of visited and sign are not relevant to edge representation, so they are
Mof offered toAem o po*r 0 / edge recorda ia «aed fo repreaenf on edge, ond fAeg
can be changed as needed for other purposes.

D eB nition 3.4 v4 aAorf-circoif edge 6 efioeen ftoo oerfez afmcforea % ond g *a repre-
aenfed erocffg oa o 6 ocA edge ^aee D ^nifion earcepf fAof fAe fgpe memAera o/fAe
edge records are set to indicate a short-circuit edge. A short-circuit edge (x, y) cannot
eadaf ercepf wAen if /drma o degree fAree groper /oce in wAicA fAe fAird oerfer i ia AofA
inactive and has linkfO] and linkflj members that indicate edges incident to x and y.

The initial state of the embedding G prior to the embedding of any edges re­
sults from the execution of procedure Initialize given in Section 3.5. This state is
characterized by Definition 3.5.

D efinition 3.5 Given an input graph G, the initial state of the embedding structure
G is as follows:

1. The value of n is equal to the number of vertices in G.

.g. TAe oofne o /m ia egnof fo zero ^no edgea Aooe Aeen emAedded^.

3. The value of v is n (the main back edge embedding loop has not begun).

TAe memAera .B, y , BicompTiafa, DF 6 'CAifdTiafa ond 6 ^Aooe fAe aizea iridicofed
by Table 3.3.

A. TAe memAera BicompTiafa ond B ore empfg.


60

6. EocA ejge record 0 / f/ie orrmy ^ /toa f/»e memAera denned Ay TbAfe ;9.;8. T%e
nety/iAor; ZmA/iO/, fmA/iy ond fudnLinA memAera ore egooJ (0 mZ, (Zte (ype ond
waited memAera ore eguoZ to zero, ond tAe aign ia egnoZ to one.

7. EocA oertez atmctnre in tAe orroy y Aoa tAe memAera de/ined Ay TIoAZe TAe
porent copy oertez atmctnrea occnpy tAe /Zrat n Zocotiona 0 / y , ond tAe root copy
oertez atmctnrea occupy tAe aecond n Zocotiona 0 / y .

8. For each vertex structure, the adjacentTo and visited members are equal to n
^one yreoter tAon tAe indez 0 / tAe AiyAeat numAered uertez in G /

P. fb r eocA uertez atructure, tAe ZinA/Ü/ ond ZinA/t/ memAera indicote tAe uertez
atructure aucA tAot eocA uertez Aoa degree zero.

10. For each vertex structure, the parentLink is equal to nil.

fb r eocA uertez atructure, tAe type memAer ia eguoZ to zero /o r o porent copy or
one for a root copy.

12. For each parent copy vertex structure, the members DFSParent, leastAncestor
and lowpoint are based on the corresponding values for vertices in G, which are
defined in Table S. 1 and calculated by preprocessing G in the manner described
in Section 3.2. These three members are not used in root copies.

fb r eocA porent copy uertez atructure, tAe pertinentBicomp2,iat ia empty. TAia


member is not used in root copies.

fb r eocA porent copy uertez atructure, tAe aeporotedDF^'CAiZdAiat contoina tAe


indices of the DFS children of the vertex in ascending order by the lowpoint
uoZuea 0 / tAe DF5' cAiZdren. TAia memAer ia not uaed in root copiea.

j J. fb r eocA porent copy uertez atructuTie, tAe repTnforentT/iat indicotea tAe node in
tAe porent'a aqaorotedDFS'CAiZdjCiat tAot contoina tAe indez 0 / tAe uertez.

TAe nodea 0 / eueyy aq;orotedDF9CAiZdZ)iat ore atored in DF6"CAiZd2,iata.


61

According to the Wgh-level psendo-code given in Figure 2.1, Lines 1 to 3 perform


the tasks associated with procedure Initialize such that the embedding structure is
set to the initial state dehned in DeBnition 3.5. This is followed by embedding the
DFS tree edges in Line 4 (before embedding any back edges). The embedding of the
DFS tree edges results in the second fundamental state of the embedding G, which is
described in DeBnition 3.6.

D eB nition 3.6 Zmmediofefy q/%er off DF 6 ' free ed^es o/ (he mpwf
G ond prior fo fhe^rsf iferofion o/fhe mom BocA ed^e emteddmp foop, fAe tree edge
state of the embedding structure G is as in the initial state of Definition 3.5 with two
exceptions. First, the value of m becomes n — C where n is the number of vertices in
G ond G is fAe number q/ connecfed componenfs in G. 6 "econd, eocA free edge (p,
toifA DFS' porenf p ond D F^ cAifd c is embedded (*n occordonce toifA De/inifion ^..9^
incidenf fo fAe roof copp p^ ond fAe porenf copp o/ c.

In the main loop starting on Line 5 of the high-level pseudo-code given in Figure
2.1, the vertices are processed in descending order based on depth first index by
embedding the back edges from each vertex v to its DFS descendants (either until all
have been embedded or until sufficient conditions are found to permit the conclusion
that G is non-planar). As each edge is embedded, the algorithm maintains Properties
3.1, 3.2, 3.3, 3.4, 3.5, 3.6 and 3.7, which lead to the defined state given in Definition
3.7 at the beginning of each step v of the main back edge embedding loop.

P ro p e rty 3.1 Collection of Planar Biconnected Components: The embedding G con-


swfa o/ o coffecfmn o/ bfcormecfed componenfs confommp free edges, bacA edges and
sAorf-cfrcuif edges embedded occordmg fo De^mfiona .9.^ and FacA biconnecfed
compomepf B repreaenfa a pfanar aubgrapA o/ fAe mpaf grapA G fAaf fa dfaffncf ^rom
fAe aabgrapAa repreaeafed bp aff ofAer bicormecfed compoueafa m G ezcepf/or a amgfe
roof cqpp repreaenffmg fAe oerfez o/ feaaf D FI m B.

P ro p e rty 3.2 Active Vertices are Maintained on External Face: Foerp mfemaffp
and ezfemaffp acffue parenf copp oerfez appears on fAe erfemaf /ace o/fAe bfconnecfed
62

component confoinmg parenf copy rerfez (roof copiea ore oitooya on fAe ezfemof
/oce/

P ro p e rty 3.3 External Face EMges are Maintained by External Face Vertices: Eoery
porenf copy ond roof copy nerfez afmcfnre to on fAe ezfemol /oce 0 / o biconnecfed
cotnponenf B Aoa ifa AnA/iO/ ond AnA/f/ memAera aef fo indicofe fAe edye(a^ fAof /oin
w on the external face. I f B contains only one edge, then both links indicate the same
edge. OfAerwiae, fAe AnAa indicofe diafincf edgea.

P ro p e rty 3.4 Clockwise Orientation of Vertex Adjacency Lists: For eocA nerfez
afrwcftfre to in on emAedding, conaider fAe neoreaf roof copy / in fAe emAedding, ÿ
one exists, which could be obtained by traversing zero or more distinct embedded free
edgea. JDef porify Ae f? ttnfeaa fAere eziafa atfcA on r ' ond fAe ntfmAer 0 / free edgea
traversed to obtain r' that have a sign of -1 is odd, in which case let parity be 1. A
clockwise list of the neighbors of w is obtained by traversing the linkfparity] members
0 / fAe odyocency Aaf o/to. Aofe fAof /o r o tioof copy fAe porify ia 0 aince no free
edges are traversed to reach it.

P ro p e rty 3.5 Unnecessary Root Copies are Eliminated: For every tree edge (p, c) for
which a back edge has been embedded between an ancestor of p and c or a descendant
o/c, fAe roof copy pf Aoa Aeen eAminofed ond oA o/ifa incidepf edgea Aooe Aeen mode
incident to the parent copy of p.

P ro p e rty 3.6 Dynamic External Activity: For ony roof copy pf creofed in D ^nifion
3.6, if and only if p'^ has been eliminated (due to maintaining Property 3.5), then the
indicator of c no longer appears in the separatedDFSChildList of p. Thus, the external
ocfitnfy 0 / o porenf copy nerfez afrttcfore p ia only dependenf t ^ n ifa ZeoafAnceafor
memAer ond fAe Zottpoinf memAera 0 / fAoae DFS" cAiZdren toAoae porenf copy verfez
afrttcfnrea ore nof in fAe aome Aiconnecfed componenf oa p.

P ro p e rty 3.7 Edge Count: 7%e t/oZtte 0 / m in fAe emAedding afmcftfre ia egttoZ fo
fAe aom o/fAe ntimAer o/free edgea, AocA edgea ond aAorf-circnif edgea (^i/onyj in fAe
emAedding.
63

D eB nition 3.7 T%e emAaWmp ta in fAe vertex invariant state ÿ if con/brma fo fAe
free ej^e afafe c / De^nifion ercepf oa /oZZoToa;

j(. 7%e oofne 0 / u in fAe embedJin^y afmcfnre ia egnof fo fAe cnrrenf afep t;ofne
(which indicates the vertex v whose back edges to descendants are to be embedded
in fAe cnrrenf ifemfion 0 / fAe moin foop 6 oj%y).

&. TAe niaifed member 0 / eocA oerfer afrocfore ia greofer fAon 1; ("wAicA ia fopicoffy
eguioofenf fo beinp eguof fo n /

3. The embedding contains short-circuit edges and all back edges from G for which
bofA endpoinfa ore i;erficea wifA o DF7 greofer fAon or egnof fo r 4 - 1 .

vlff embedded edgea coffecfit/efg co r^ rm fo Froperfiea ond

TAe embedding Aoa Froperfiea T. f», ond T. 7.

As described in Chapter 2, the two principal activities involved in embedding


the back edges from v to its descendants are 1) Walking up to set adjacentTo flags
and create pertinentBicompList entries, and 2) Walking down to embed back edges,
which clears adjacentTo flags and deletes pertinentBicompList entries as the back
edges are embedded and the biconnected component roots are merged with their
parent copies. The handling of the adjacentTo and pertinentBicompList members of
vertices is captured in Property 3.8. The combination of Properties 3.1, 3.2, 3.3, 3.4,
3.5, 3.6, 3.7, and 3.8 lead to a defined state of the embedding given in Definition 3.8.

P ro p e rty 3.8 Dynamic Pertinence: Fbr ong bocA edge (n, d) in fAe inpuf gropA G
yrom nerfez n fo o deacendonf d, fef denofe o roof copg 0 / o in fAe biconnecfed
component containing the DFS child c of v that is an ancestor of w.
djffAe bocA edge (n, d) Aoa nof been embedded, fAen fAe /of/owing ore fme;

jf. TAe ofÿocenfTb member o /d egnofs n.

;0. Tbr ong aeporofion onceafor w 0 / d in G wifA DF9 cAifd o fAof ia dnceafor fo or
egnof fo d, on indicofor 0 / fAe roof copg w" oppeora in fAe perfinenfBicompTiaf
64

o /t u . T%e in A c o f o r a o /r o o t a o c ftu e M c o n n e c W c o m p o n e n fa o p p ea r

eorZter m (Tie perf*nen(B*compf,ia( o/w (/ton (Ae indicofora o/Tw(a 0 / er(emoZfy


oc(%t; 6 6 *connec(ed componenfa.

^ (Ac 6 oct edge (1 ;, d) /toa been embedded, (/ten (/te /o//ounnp ore (rue;

j. TTte o(ÿocen(Tb member o /d eguo/a n.

&. JFbr euerp oncea(or w 0 / d :n G un(/t DF^S" c/ttZd o eguo/ (o or onoea(or (0 d ond
ud(/t u o DF5" oncea(or 0 / w, uerfez w ta no( o aeporo(ton oncea(or 0 / d ond (Ae
per(tnen(Btcomplta( 0 / w doea no( con(otn on tndtco(or 0 / (/te roo( copp uer(er
a(ruc(ure w" (^wbtc/t ta no Zonper tn uae wt(/ttn G /

DeBnition 3.8 TTte embeddtnp ta tn (/te embedding invariant state ÿ t( con/orma (0

the vertex invariant state of Definition 3.7 with four exceptions:

1. The visited members of vertex structures are either equal to or greater than v.

2. The stack S may be non-empty.

S. The embedding has Property 3.8 (with the nodes of every pertinentBicompList
being stored in BicompLists).

4 . The embedding may contain back edges and short-circuit edges between v and its
deacendon(a, wt(/t Froper(tea ^.7 ond motn(otned.

D efinition 3.9 The embedding is in the oriented embedding invariant state if it


con/brma (0 (/te embedding tnuorton( a(o(e 0 / D ^nt(ton (/tere ore no a/tor(-ctrcut(
edgea, ond (/te atgn 0 / oZZ edge records ta J/.
65

4. Low Level O perations

This chapter describes a plethora of simple, low-level procedures called by the plsr
narity testing and embedding algorithms described in Chapters 5, 6, 7 and 8. A few
of the procedures are also used by the Kuratowski subgraph isolator in Chapter 9.

4.1 E m bedding a D F S Tree E dge


The procedure EmbedTreeEdge defined in Figure 4.1 embeds a DFS tree edge
from the input graph. Each tree edge (p, c) is embedded as a singleton biconnected
component consisting of a root copy vertex the parent copy of c, and two edge
records to represent the edge (p, c).
The correctness of EmbedTreeEdge is implied in Lemma 4.2 by virtue of the

Figure 4.1: The Procedure for Em bedding a DFS Tree Edge

Procedure: EmbedTreeEdge
this: Embedding Structure G
in: DFS Parent vertex p
in: DFS Child vertex c
out: Embedding Structure G containing a root copy p'
of vertex p and edge records representing the tree edge
between pi and c

(1) Let c + n be the location of a root copy p'


(2) Set the parentLink of p' equal to p

(3) Let 2m and 2m -F 1 be the locations in E of new edge records


6 p and 6 c (the twinLink between e, and 6 c is implicit)

in their consecutive locations)


(4) Insert as the sole edge record in the adjacency list of p'
(5) Insert Cg as the sole edge record in the adjacency list of c
( 6 ) Set the neighbor of Cp to c and the neighbor of eg to p'
(7) Set the type of Cp and 6 c to 'Tree Edge'

(8 ) Increment m
66

collective operation of aU Invocations of EmbedTreeEdge indicated in Precondition


4.1. The running time for EmbedTreeEdge is stated in Lemma 4.3.

P re c o n d itio n 4.1 witA on emteddmg structure G in tAe initiol stote


inition <9.5^, tAc procedure PfonoritpTîest described in CTiopter 7 inuo&es EmbedTbeeEdpe
once per DEE tree edge in tbe input propb G.

L em m a 4.2 v4s o result o/ tbe inuocotions o/ EmbedTbeeEdpe described in Precondi­


tion the embedding structure G is trons/ormed to t/ie tree edge stote (De^nition
Ed/

P ro o f. Since p' has the proper type due to Dehnition 3.5, Lines 1 and 2 of Em-
bedTreeEidge complete the allocation of p* as a root copy according to DeGnition 3.1.
Lines 3 to 8 of EmbedTreeEdge complete the representation of a DFS tree edge ac­
cording to Definition 3.3. Precondition 4.1 completes the proof. □

L em m a 4.3 The procedure EmbedTreeEdge runs in 0(1) time.

4.2 E m bedding a Back Edge


The procedure EmbedBackEdge defined in Figure 4.2 embeds a back edge be­
tween a root copy v' of the vertex v currently being processed and a descendant w of v
that, in the input graph, is adjacent to u by a back edge. The back edge is embedded
such that it appears on the external face of the biconnected component rooted by v'.
The procedure EmbedBackEdge is called by the Walkdown procedure in Chap­
ter 6 , which provides two values, and Wm, that indicate the edge record used to
exit v' and enter w, respectively. These values help to indicate the path used by the
Walkdown to travel from u' to w, and they also indicate where the new edge records
for (v', w) should be inserted into the adjacency lists of v' and w.
The correctness of procedure EmbedBackEdge, based on Precondition 4.4, is
established in Lemma 4.5. The running time for procedure EmbedBackEdge is stated
in Lemma 4.6.
67

Figure 4.2: The Procedure for Em bedding a Back Edge

Procedure: EmbedBackEdge
this: Embedding Structure G
in: Root copy 1/ of vertex being processed
in: Indicator (0 or 1) of the edge record used to exit u'
in: Descendant vertex w
in: Indicator Wm (0 or 1) of the edge record used to enter w
out: Embedding Structure G modified to include the back edge iy',w)

(1) Let 2m and 2m + 1 be the locations in E of new edge records


and Gu, (the twinLink between 6 ,; and is implicit)
in their consecutive locations)
(2) Insert 6 ^; between the vertex structure for u' and the hnk[u^]
edge record in the adjacency list of v'
(3) Insert between the vertex structure for w and the lhik[wm]
edge record in the adjacency list of w
(4) Set the neighbor of to w and the neighbor of to t/
(5) Set the type of e«, and to 'Back Edge'
(6 ) Increment m

P re c o n d itio n 4.4 With respect to embedding a back edge (v, w), the Walkdown pro­
cedure described in Chapter 6 is operating on a biconnected component with root v^,
where c is an ancestor of w. Starting within an embedding in the embedding invariant
state (Definition 3.8), the Walkdown performs zero or more biconnected component
merge operations such that, after adding (v^, w), the vertex structures and w are
(o k in (he eome 6 iconnec(ed component. The IFu/Adown inuotea JFmbed-
BackEdge with and such that if the edge records for w) are indicated by
Kn&^^J 0 / n" ond Kn&^imy o/w , (hen (u",w) ia embedded oknp (he ez(em(d /dee 0 /
(he 6 *connec(ed componen( roofed u'' ond (he reanZfinp emheddtnp ia refnmed (0 (he
em6 eddin(/ inuorionf a(o(e (D ^nifion

L em m a 4.5 Giuen on %nuoco(ion antjecf (0 f recondifion (he EmtedBochjFdge


procedure embeda (he 6 och edpe (0 %w) olorig (he eademof /dee 0 / (he 6 *connec(ed com-
ponen( con(o*ninp o' ond to auch (ho( (he edge recorda ore indicofed finh/d^^^ in o'
ond iinh/iofm/ in w. The reau&ing embedding cori/drma (0 D ^n ifio n
68

P ro o f. Lines 1 to 6 add a back edge conforming to De&nition 3.3. The remainder of


the proof follows by assumption of Precondition 4.4. O

L em m a 4.6 The EmhedBoc&Ed^e procedure runs in 0(1) time.

4.3 E m bedding a Short-C ircuit Edge


The procedure EmbedShortCircuitEdge dehned in Figure 4.3 embeds a short-
circuit edge between a root copy v' of the vertex v currently being processed and a
descendant w of v. The purpose of a call to this procedure is to embed an extra edge
such that the procedure GetNextVertexOnExternalFace (see Section 4.5) skips over
inactive vertices between w and the root of the biconnected component containing w.
This is helps our algorithms to achieve worst case 0{n) performance.

F ig u re 4.3: T h e P ro c e d u re for E m b ed d in g a S h o rt-C ircu it E dge

Procedure: EmbedShortCircuitEdge
this; Embedding Structure G
in: Root copy v' of vertex being processed
in: Indicator (0 or 1) of the edge record used to exit v'
in: Descendant vertex w
in: Indicator (0 or 1) of the edge record used to enter w
out: Embedding Structure G modified to include the short-circuit edge (v', w)

(1) EmbedBackEdge(u', w, w^)


(2) Change type fields in edge records for new edge to ‘Short Circuit Edge’

The correctness of procedure EmbedShortCircuitEdge, based on Precondition


4.7, is established in Lemma 4.8. The running time for procedure EmbedShortCir­
cuitEdge is stated in Lemma 4.9.

P re c o n d itio n 4.7 on embedding in (Ae embedding inuorionf eWe


(D ^nition ^ .^ , (he IFoItdown procedure described in Chopper d inuo&es Embed5%or(-
Circui(Edge wi(h ond (o odd edge w^ such (ho( ^ (he edge recorda /o r
69

ore injiCoW 0 / r ' omf ZinA/wm/ 0 / w, Z/*en (t;', w) creofea o de­


gree ^ree proper/oce loiZA f/ie po(A (r', %), %, (i, w), wj, to/tere t w 60 (A mocfi«e
ond Aoa Z;nt/i0 / ond ZinA/ïj memtera (/loZ tndicoZe edgea incident Zo t/ ond to. 7%e
W^oZtdown inuokea ^fn6ed<9AorZC*rcn:Zf7dge onZg ^ e' ond to ore in ZZie aome 6 ;con-
necZed componenZ, onZg ^ ZAoZ AiconnecZed componenZ ia ezZemoZZg ocZioe, ond onZg
if (v,w) ^ E{G) or (v, w) G E{G) (i.e. only if there is no unembedded back edge
(r, to)/

L em ina 4.8 Gioen on inwcoZion ao5jecZ Zo frecondiZion ^.7^ Z/ie Em6ed6'AorZ(7ir-


cniZÆ^dge procedure embeda Z/ie aAorZ-circuiZ edge (1/, to) oZong ZAe erZemoZ /dee 0 / ZAe
biconnected component containing v' and w such that the edge records are indicated
6 g ZinA/b^t/ ond ZirtA/tOm/ in to . T%e reat^ZZing embedding con/brma Zo De/zniZion

P ro o f. Line 1 invokes EmbedBackEdge since Precondition 4.7 satisfies Precondition


4.4. The resulting embedding conforms to Definition 3.8 by Lemma 4.5, and Line
2 does not change this. Line 2 changes the type of the edge records so that (o', to)
conforms to Definition 3.4. □

L em m a 4.9 7%e Embed6%orZCirctziZE7dge procedtzre rtzna in 0(1) Zime.

4.4 A ctiv ity S tatu s o f V ertices


The procedure VertexActiveStatus defined in Figure 4.4 determines whether a
vertex is externally active, internally active or inactive. These terms are defined in
Chapter 2 (and are not applicable to root copy vertices).
Lemma 4.11 establishes the correctness of the VertexActiveStatus procedure.
Note that part of the proof relies on Lemma 4.10, which describes the condition for
testing the external activity of a biconnected component. Lemma 4.12 states the
running time of the VertexActiveStatus procedure.
70

Figure 4.4: Procedure for D eterm ining V ertex A ctivity Status

Procedure: VertexActiveStatus
this: Embeddiug Structure G
in: Vertex w, a descendant of u
out: Indication that to is externally active, internally active or inactive

(1 ) if the least Ancestor member of w is less than u


(2) return ‘Externally Active’
(3) Let c be the first element of the separatedDFSChildList of w
(4) if c ^ nil and the lowpoint of c is less than v
(5) return ‘Externally Active’

(6 ) if the adjacentTo member of w equals u or |pertinentBicompList of w| > 0


(7) return ‘Internally Active’

(8) return ‘Inactive’

L em m a 4.10 A hiconnected component B rooted by tree edge (w', c) is externally


active if and only if the lowpoint of c is less than the index of the vertex v currently
being processed.

P ro o f. If the lowpoint of c is less than v, then either c is adjacent to an ancestor of


u or c has a descendant that is adjacent to an ancestor of v. In the first case, c is an
externally active vertex in B. In the second case, the descendant is either in B or a
descendant d of a vertex b in B. If the former, then B contains an externally active
vertex. If the latter, then d establishes the external activity of &as follows. Form a
sequence S from the cut vertices along the DFS path from d to b, which includes b.
Vertex d establishes the external activity of the first vertex in S, and each element
of B establishes the external activity of its successor in Thus, h is an externally
active vertex, and B is externally active.
Inversely, if the lowpoint of c is not less than u, then neither c nor any of its
descendants have any back edges to an ancestor of u. Therefore, there is no descendant
of any vertex in B that is adjEicent to an ancestor of u and whose DFS ancestor chain
could be followed in the manner described above to establish the external activity of
71

a vertex in B. Furthermore, no vertices in B are adjacent to an ancestor of n because


they are also descendants of c. Thus, B contains no externally active vertices. O

L em m a 4.11 Giueu on embeddmg G in the emheddm^ muoriunt state (De^n*tiou


ond o parent copy oerter w, the procedure Vertez.4ctiue5tatus determines whether
w is earternaiiy active, intemaity active or inactive.

P ro o f. Lines 1 and 2 examine only the leastAncestor held of vertex w to deterinine


if w has a back edge to an ancestor of v. If this were insufficient, then w would have
a back edge to an ancestor of v despite the failure of the comparison in Line 1 , which
contradicts the definition of leastAncestor in Definition 3.8 (and hence Table 3.1).
Lines 3 to 5 examine only the lowpoint Of the first separated DFS child c, if
it exists, to test whether there exists a biconnected component with root copy w'
that contains one or more externally active vertices. If there is no separated DFS
child, then there are no child biconnected components containing root copies of w.
If there are one or more separated DFS children, then only the first element c of
the separatedDFSChildList must be considered since the list is sorted by lowpoint
according to Definition 3.8. According to Lemma 4.10, the biconnected component
with root edge (w', c) contains one or more externally active vertices if and only if
the lowpoint of c is less than v. Thus, Lines 1 to 5 determine whether a vertex is
externally active according to Definition 2.1.
According to Definition 3.8, the adjacentTo fiag is raised in vertex w if there
is a back edge (v, w) in the input graph G that has not been embedded in G. Also
according to Definition 3.8, the root vertex of a biconnected component is added
to the pertinentBicompList of a vertex w when there is a back edge (v, d) in G but not
G, where d is equal to or a descendant of c and c is a child of w. Thus, since the tests
of adjacentTo and pertinentBicompList in Line 6 occur after the external activity test
in Lines 1 to 5, VertexActiveStatus determines whether a vertex is internally active
according to Definition 2.6.
Finally, Line 8 cannot return a result of inactive for w unless both the tests
for external and internal activity have failed. Thus, VertexActiveSt#us determines
72

whether a vertex is inactive according to De&nition 2.8. O

L em m a 4.12 7%e procedure VerfezAcfine^^otua rune in 0(1) time.

4.5 Traversing th e E xternal Face


The procedure GetNextVertexOnExternalFace defined in Figure 4.5 is the rou­
tine used to traverse the external faces of biconnected components in the embedding
G. The procedure receives a vertex w and an indicator Win (0 or 1) of the link in w's
vertex structure that leads to w ’s predecessor. The procedure returns the successor s
as well as an indicator (0 or 1) of the link in s ’s vertex structure that leads to w.
The notable exception occurs if s is degree one, since both link[0] and link[l]
indicate an edge record that leads back to w. However, this case only occurs when w
and s are the only two vertices in a biconnected component containing a single tree
edge. Since w and s are assumed to have the same orientation when embedded by
EmbedTreeEdge, Sj„ is set equal to Win in this case. This allows s and Sj„ to be used
by other procedures such as EmbedBackEdge in Section 4.2. If s is the endpoint of a
back edge, then it is necessary for to indicate whether link[0] or link[l] should be
changed by EmbedBackEdge.
The correctness of procedure GetNextVertexOnExternalFace is stated in Lemma
4.13. The running time for procedure GetNextVertexOnExternalFace is stated in
Lemma 4.14.

L em m a 4.13 Ginen on G in fhe embeddinp inmrionf stote (De/ini(ion


o copy or porenf copy oerfez w ond o 0 or 1 ooZnc 1 0 ^ indicofiny (he edye
record Kn& used (o en(er w, (he procedure Ge(hIez(Fer(ezOuBz(emofFhce re(uma (he
aucceeaor a ond (he 0 or 1 uolue *nd;co(:ny (he edye record hnh used (o en(er a.

L em m a 4.14 The Ge(#ez(Fer(ezOnÆ'r(emo(Fhce procedure runa in 0(1) (ime.


73

Figure 4.5: The Procedure U sed to Traverse th e External Face

Procedure: GetNextVertexOuEbdenialFace
this: Embedding Structure G
in: A vertex w
in: An indicator (0 or 1 ) of the link in w that refers to the edge
record used to enter w (a subsequent call exits via the opposing link)
out: The successor a of w and the indicator of the edge record
used to enter a

( 1 ) Wowt 4 - 1 xor WiR


(2) 4 - the link[wog*] edge record of vertex w

(3) e, 4 - the twinLink of edge record e*,


(4) if link[0] in edge record indicates a vertex structure
(5) s 4 - link[0] in edge record e,
(6) else a 4 - link [1] in edge record e.

(7) if link[0] and link[l] in vertex s indicate the same edge record
(8) Sifi 4 Win
(9) else if link[0] in vertex s is equal to e,
(10) S i n 4—0
( 1 1 ) else aim -t- 1

(1 2 ) return (a, aim)

4.6 Inverting th e O rientation o f a V ertex


The procedure InvertVertex dehned in Figure 4.6 reverses the roles of link[0]
and link[l] in the vertex structure of a vertex w as well as all edge records in w’s
adjacency list. This procedure is called from procedure MergeBicomps defined in
Chapter 6 and from procedure OrientVertices defined in Chapter 8 .
The correctness of procedure InvertVertex is stated ty Lemma 4.15. The run-
time analysis for procedure InvertVertex is stated in Lemma 4.16.

L em m a 4.15 Giuen o «erfez aÿructure tu 6 G uutA ou odjoceucy fiat <Aot cot^rm a


to De/imtion the JuuertVertea; procedure atuopa the huh/0 / oud huh/l/ membera o/
the uertez structure tu oud the edge recorda :u the od/oceucg hat o/tu, q/ter tuhich the
ocÿoceucy hat o/tu cou/onua to De^uittou
74

Figure 4.6: The Procedure InvertVertex

Procedure: InvertVertex
this: Embedding Structure G
in: A vertex structure w
out: Embedding Structure G modiBed by swapping link[0]
and link[l] in vertex structure w structure and each edge record
in its adjacency list

(1 ) e <—link[0 ] edge record of w


(2 ) Swap link[0] and link[l] in w
(3) while w
(4) enert f - liuk[0] edge record of e
(5) Swap link[0] and link[l] in e
(6 ) e 4- B n e x t

L em m a 4.16 T%e Ihuert Verier procedure runs in 0(d) (ime, where d is (he decree
o/ (he uer(er s(ruc(ure w passed os inpu(.

4.7 M erging a R oot C opy V ertex w ith Its Parent C opy


The procedure MergeVertex defined in Figure 4.7 is responsible for merging a
root copy vertex w' with its parent copy w. The additional parameter Win helps
indicate how the adjacency lists should be joined. The root copy vertex is eliminated
by this procedure. The procedure MergeVertex is called from the MergeBicomps
procedure defined in Chapter 6 and from the procedure JoinBicomps in Section 4.8.
The correctness of procedure MergeVertex, which is based on Precondition 4.17,
is stated in Lemma 4.18. The running time for procedure MergeVertex is stated in
Lemma 4.19.

P re c o n d itio n 4.17 The pmcedure Merge Ver(ea: is iuuohed on on emheddiup G wi(h


the following characteristics:

j. The uer(e% s(7"uc(une w is o ponBu( copy, ond (he uer(ez; s(ruc(ure w' is o ruo(
copy o/w .
75

Figure 4.7: The Procedure M ergeVertex

Procedure: MergeVertex
this: Embedding Structure G
in: A vertex w
in: An indicator Win (0 or 1) of the link in w that refers to
the edge record used to enter w
in: A root copy vertex w'
out: Embedding Structure G modified by joining the adjacency list of w'
into that of w such that the link[win] edge record in w' becomes the
new link[win] edge record in w.

(1 ) for each edge record e in the adjacency list of w'


(2) Assign w to the neighbor member of the edge record indicated by the twinLink of e

(3) Let be equal to link[win] of w (residt is an edge record unless w is degree 0)


(4) Let be the link[l xor Wi»] edge record of w'
(5) Perform a circular list union of the adjacency lists w' into the
adjacency list of w such that the edge records and
are consecutive and such that the link[wj„] edge record in w' becomes the
new link[win] edge record in w

(6 ) Assign an indicator of w' to the link[0] and link[l] members of w'


(7) Assign nil to the parentLink of the vertex structure w'

2. The adjacency lists of w, w' and the neighbors of w' conform to Definition 3.2.

3. The edge records in the adjacency lists of w and w' are each part of distinct
edÿes wtfA De/iuAion or

L em m a 4.18 As resW( o/ on muoco(*on complies Precondition ^ . 1 ?^


tAe procedure Aferye Vertez Aos tAe /oifowinp e^g^ts;

f. 7n (Ac edges incident to w% tAe edge records contoining u / in tAe neigAAor mem­
ber ore cAonged to contoin w os tAe neigAAor, preserving con/brmonce to
nition in tAe od;ocencg iists o/neigAAors o/w ' q/ter w' is etiminoted.

TAe ocÿoceneg fist o /w ' is inserted ^witAout cAonging tAe edge order/ into tAe
ofÿocencg fist o /w sucA tAot ÜnA/winj ifi w indicotes tAe some edge record os
76

îinkfwin] in w'.

7%e roof copy to' ia efimmoW /rom G.

Lemma 4.19 T/te Metpe Verger procejure rama m G(d) t;me, to/tene j ia </te jeynee
0 / ^ e root copy oertez to' 6 emy meryej tottA ita porettt copy to.

4.8 Joining A ll B icon nected C om ponents in th e Em bedding


The procedure JoinBicomps de&ned in Figure 4.8 merges all root copy vertices
with their parent copies without changing the orientations of any vertices. If the
input graph is planar, then this procedure is called by the procedure PlanarEmbed in
Chapter 8 after the latter orients all vertices. This is necessary even if the input graph
is biconnected since DFS tree root will be represented by a root copy vertex because
there are no back edge to ancestors that would result in a merge with its parent copy.
If the graph is not planar, then this procedure is called by the Kuratowski subgraph
isolator in Chapter 9.

Figure 4.8: The Procedure JoinBicom ps

Procedure: JoinBicomps
this; Embedding Structure G
out: Embedding Structure G modified by merging all root
copy vertices with their parent copies without changing
the orientations of any vertices

(1 ) for each root copy w' from m to 2 n —1


(2 ) if the members of the root copy w' have not been cleared
(3) w 4—the parentLink of w'
(4) MergeVertex(w, 1, in', 0)

The correctness of procedure JoinBicomps is established by Lemma 4.20. The


run-time analysis for procedure JoinBicomps appears in Lemma 4.21.

Lemma 4.20 Giuen an em6 eddmy G m the oriented emheddiny inuoriont state ^ e / -
inition the JoinBicomps procedure meryes the adjacency fists 0 / aff root copies
0 / each uertez to into the parent copy o/to, preseroiny Property J..^.
77

P ro o f. Root copy vertices are only created in the region n to 2n —1 of V in G by


EmbedTreeEdge, which also correctly sets the parentLink of each root copy according
to Lemma 4.2. The parentLink is only returned to the nil setting by a prior call
to MergeVertex, so procedure JoinBicomps simply calls MergeVertex on root copies
that have not already been processed by MergeVertex, which according to Lemma
4.18 performs the required adjacency list merge operations, preserving orientation
and eliminating root copies. O

L em m a 4.21 T%e JomBicompa procedure runa in 0 (n ) time.

P ro o f. The loop performs n iterations. The loop body consists of constant time
operations except for the invocation of MergeVertex, which according to Lemma 4.19
is 0(d) where d is the degree of a root copy w'. Since each edge incident to a root
copy is representative of a unique edge in the input graph, the total work performed
by all MergeVertex invocations is 0{n). □
78

5. W alkup

The procedure Waikup de&ned in Figure 5.1 is invoked by the procedure PlanarityTest
in Chapter 7 to support the De&nitions 2.3 and 2.4 appearing in Chapter 2. Given a
descendant w of the current vertex v being processed, the Waikup marks w as being
directly adjacent to the current vertex v. Then, the Waikup stores information in
the embedding structure G about the pertinent biconnected components that must be
merged in order to embed a back edge (n, w). SpeciGcally, for each separation ancestor
z between w and n in G, the Waikup ensures that the root copy , where c is a DFS
child of z and equal to or an ancestor of w, appears in the pertinentBicompList of
vertex z.
The correctness of procedure Waikup is implied in Lemma 5.2 by virtue of the
collective operation of all invocations of Waikup indicated in Precondition 5.1. The
run-time analysis for procedure Waikup appears in Lemma 5.3.

P re c o n d itio n 5.1 Beginning with an embedding structure G in the vertex invariant


state (Definition 3.7) for some step v, the procedure PlanarityTest described in Chap­
ter 7 invokes Waikup once per back edge from v to a descendant of v appearing in the
input graph G .

L em m a 5.2 As a result of the invocations of Waikup described in Precondition 5.1,


the embedding structure G is transformed to the embedding invariant state (Definition

P ro o f. Consider the hrst invocation of Waikup in step n. Line 1 marks w to indicate


that it is adjacent to the current vertex v, and the remainder of the procedure makes
the modifications to pertinentBicompList members as follows. Consider the sequence
5 of parent copies on the DFS tree path between w and v that are separation ancestors
in the embedding structure G at the beginning of step n. Both w and all vertices in 6 ^
are guaranteed to be on the external faces of the biconnected components containing
them because they were externally active in the previous step -I-1 (or because G is
79

Figure 6.1: The Waikup Procedure

Procedure: Waikup
this: Embedding Structure (7
in: A vertex tu (a descendant of the current vertex u being processed)
out: Embedding Structure G with the adjacentTo member of tu
set to u and the pertinentBicompList of each separation ancestor
between tu and t; modiBed to contain the root copy ancestor of tu

(1) Set the adjacentTo member of tu equal to u

2) (a;, 4 - (tu, 1)
3) (%/, (w, 0 )

4) while X ^ V
5) if the visited member of a; or y is equal to v
6 ) break the loop

7) Set the visited members of x and y equal to v

8) if X is a root copy, z' -k-x


9) else if y is a root copy, / 4—
10) else y 4 mZ
-

)
1 1 ify^ÿ^mZ
12) Set z equal to the parentLink of z'
13) ÏÎ z ^ v
14) c4 ^

15) if the lowpoint of c is less than v


16) Append y to the pertinentBicompList of z
17) else Prepend y to the pertinentBicompList of z
18) (z, Zim) 4 (z, 1)
-

19) (y, 9)

20) else (z, z^m)4 - GetNextVertexOnE]xtemalFace(z, z ^ )


2 1 ) (%/,l/m) 4TGetNextVertiexOnExtemalFace(y, y^n)
80

in the tree edge state given by Definition 3.6 if w = n —1). Moreover, root copies are
always on the extemEÜ face because edges are always embedded from a root copy to its
descendants. Therefore, the Waikup is guaranteed to start from a vertex (tu or z E S)
on the external face of a biconnected component and the Waikup is guaranteed
to find the root vertex of B due to the correctness of GetNextVertexOnExternalFace
(Lemma 4.13).
If a root copy ^ is encountered by z or y, and its visited member is not equal to
V, then the parent copy z is obtained using the parentLink (according to Definition
3.1); which is set by the procedure EmbedTreeEdge as established in Lemma 4.2.
Then, if z is not v, the root copy z' is stored in the pertinentBicompList of z in Lines
15 to 17. Finally, Lines 18 and 19 set the traversal contexts of % and y so the process
will repeat starting with z, unless z is n in which case the Waikup loop terminates.
Applying these facts inductively, the Waikup reaches each separation ancestor
in S in increasing ancestral distance from w and stores in the separation ancestor’s
pertinentBicompList the appropriate root vertex of the child biconnected component
whose root edge is on the DFS tree path from w to v.
The first invocation of Waikup does not encounter any vertex structures marked
visited (i.e. with visited member equal to v). Subsequent invocations of Waikup op­
erate in the same manner described above except if the loop encounters a vertex
structure with a visited member already equal to v. Since G began in the vertex in­
variant state (Definition 3.7), the visited member setting must have occurred during
a prior Waikup invocation resulting from Precondition 5.1. By the strong form of
induction, the current Waikup invocation can terminate its operation since the re-
maining separation ancestors to be recorded by the current Waikup invocation have
already been recorded by one or more prior invocations of Walkup resulting firom
Precondition 5.1. □

L em m a 5.3 7%e MWtup procedure runs in 0(1) omortized time per nerter o/ tAe
input propA.

P ro o f. Lines 1 to 3 are constant time assignments. Line 4 iterates a simple loop


over lines 5 to 21. All operations in the loop body are constant time assignments,
expression evaluations and branching instructions except Lines 16 and 17 and the
procedure invocations in Lines 20 and 2 1 . Lines 16 and 17 are implemented in constant
time using a doubly linked list according to the de&nition of pertinentBicompList in
Table 3.1. The invocations of procedure GetNextVertexOnExternalFace in Lines 20
and 21 are constant time according to Lemma 4.14. Thus, the loop body is 0(1) per
iteration.
Within each biconnected component B, the Waikup either finds the root vertex
or it halts prematurely due to the visitation test in Lines 4 and 5. In either case,
the length of the path used to find either a visited vertex or a root copy vertex is no
greater than the length of the path along B ’s external face that would become part of
a proper face in the embedding if the back edge to w were embedded. Note th at the
cost of traversing the path that does not find a visited or root copy vertex is simply
charged to the cost of the path that does find the visited or root copy vertex.
Thus, the total cost of all Waikup processing for all vertices is commensurate
with the sum of the degrees of the faces in the embedding structure at the end of any
step V where all back edges from v to its descendants are embedded. This argument
excludes short-circuit edges, which only serve to reduce the total cost of all Waikup
calls by shortening the paths traversed. Moreover, if non-planarity is discovered in
step V, then one or more back edges are not embedded. In this case, it is easiest
to charge the Waikup costs in step u as a one-time 0 (n ) additional cost. Since the
extra cost in step u for non-planar graphs is also 0 (n ), the Waikup cost is constant
amortized time per vertex. □
82

6. W alkdown

This chapter covers the procedures that merge biconnected components and embed
back edges within the embedding structure. Section 6 .1 discusses a procedure that
merges a collection of biconnected components that have been selected by the Walk-
down procedure, which is discussed in Section 6.2. At the end of Section 6.2, the
reasons are explained why the use of short-circuit edges pose no additional memory
requirements on the embedding structure.

6.1 M erging th e B icon nected C om ponents on th e Stack


The procedure MergeBicomps defined in Figure 6.1 processes the embedding
structure stack S' in G by merging root copies on the stack with their parent copies.
Additional stack information indicates whether each root copy’s adjacency list should
be inverted prior to the merge operation. This procedure is called by the Walkdown
procedure in Section 6.2, which also sets the stack entries used by MergeBicomps.
The Walkdown pushes a pair (w, Win) indicating the parent copy vertex w and
the direction w,» that the Walkdown used to enter w. The Walkdown then descends
from w to a pertinent child biconnected component with root denoted w' and chooses
a direction Wg^t hi which to proceed. The Walkdown then pushes the pair (w',
The Walkdown pushes the pairs (w, Wm) and (w', each time it descends
from a parent copy vertex to the root copy appearing in a pertinent child biconnected
component. Then, when the Walkdown encounters a vertex for which a back edge
must be embedded, the biconnected components indicated on the stack combined with
the back edge collectively form a new, larger biconnected component in the embedding
structure. The Walkdown first calls MergeBicomps to join the pertinent biconnected
components listed on the stack, then it embeds the back edge that biconnects them.
Moreover, the new proper face formed by adding the back edge includes the paths
along each merged biconnected component that the Walkdown traversed to build the
stack. Therefore, the Walkdown requires that w' and w be merged in such a way th at
83

Figure 6.1: M erging P ertinent B iconnected Components

Procedure: MergeBicomps
this: Embedding Structure G
out: Embedding Structure G with merged biconnected components
corresponding to stack entries made by the Walkdown procedure.

(1 ) while the stack S in G is not empty


(2) Pop (w'; from the stack 5^
(3) Pop (w, Win) from the stack S'

(4) if Win is equal to w ^


(5) Invert Vertex(w')
(6 ) e 4—DFS tree edge record in w'
(7) Set the sign of edge record e to -1

(8 ) Remove w' from the front of the pertinentBicompList of w


(9) Using repInParentList of DFS child c = w' — n,
Remove c from the separatedDFSChildList of w
(10) MergeVertex(w, Win, w')

the link[win] edge record in w and the link[w'„J edge record in w' become consecutive
in the adjacency list of w, and the link[l xor edge record from w' should be the
new link[wj„] edge record in w.
The correctness of MergeBicomps is established by Lemma 6.2. The run-time
analysis for MergeBicomps appears in Lemma 6.3.

P re c o n d itio n 6.1 The procedure MergeBicomps is invoked by procedure Walkdown


with an embedding G in the embedding invariant state (Definition 3.8), and a stack
conWniu^ zero or more poira o/ ;8 -tuplea o/ (Ae /orm (w% w^ni*,) ond (w, Win^, wAere
w :nd:co(ea o purent copy uertez atmetore, w' indicotea o root copy o /w , ond w ^
ond WiR eocA Aoue o uoloe o/ 0 or 1 .

Lemma 6.2 Giuen on inuocotion aufiject to Precondition d.l, tAe procedure Merye-
Picompa Aoa tAe /oZlowinp ^ e c ta /o r eocA poir o/ Jg-tnplea (w% w ^ J ond (w, Wj^,)
oppeorinp in aeguence on tAe top o/ atocA S;

1. tAe tree edge incident to w' ia giuen tAe aign -1 i/Wjn ond w(^ ore eguof.
84

g. root copy tu' w remooed yrom <Ae perfinenfBicoTnpZwf o/w .

(/te DF/ÿ c/tiW c m (/te roo( ejye (tu', c) ta rentouej yrom (/te aepom(edDF-
,^C/tt/dZ)ta( o/tu.

(/te (Mÿocertcy /ta( o/ (/te roo( copy tu' ta tnaer(ed (^tut(/tott( cAanytny (/te ejye
order) into the adjacency list of its parent copy w such that the link[l xor w '^J
edye record tn tu' becomea (/te netu Krtt/wtm/ edye record tn tu.

& (/te roo( copy tu' ta e/tmtno(ed yrom (/te embeddtny G.

P ro o f. By trivial induction, the loop can process a stack of any size. Consider the
behavior of the loop body for each pair (tu', tu ^ J and (tu, tu^m) popped from the
stack. Clearly the first requirement is met by Lines 4 and 7. Lines 8 and 9 meet
the second and third requirements. Due to the invocation of InvertVertex when tUj„
and tu'„j are equal, link[tUj„] in tu' is guaranteed to indicate the edge record that was
indicated by link[l xor tu^J in tu' when Line 2 was executed. Thus, by Lemma 4.18,
the invocation of MergeVertex meets the fourth requirement. Finally, according to
Lemma 4.18, MergeVertex eliminates the root copy tu', meeting the fifth requirement.

L em m a 6.3 The procedure MergeBicomps runs in 0(1) amortized time per vertex of
the input graph.

P ro o f. Line 1 initiates a simple loop over the loop body in Lines 2 to 10, iterating once
per root copy vertex tu' on the stack. All operations in the loop body are constant
time except the invocations of InvertVertex and MergeVertex, which according to
Lemmas 4.16 and 4.19 operate in 0{d) time where d is the degree of tu'. However,
MergeBicomps is only invoked to process edges incident to root copy vertices. After
MergeVertex, all of the edges incident to the root copy become incident to the parent
copy, so they are never processed again by MergeBicomps. Thus, the loop achieves
0(1) amortized time due to the edge limit given by Corollary 1.5. □
86

6.2 T he W alkdown Procedure


Given the root v' of a singleton biconnected component B containing the only
the tree edge (t)', c), the procedure Walkdown dehned in Figure 6.2 embeds back
edges 6 om the root u' to the descendants of c. These descendants appear in perti­
nent biconnected components that are merged into 5 such that all of the embedded
back edges become part of The Walkdown procedure is called by the procedure
PlanarityTest described in Chapter 7.
The correctness of procedure Walkdown is established by a number of lemmas
appearing below, culminating in Theorem 6.23. The run-time analysis for the Walk-
down appears in Lemma 6.24.
In Figure 6.2, Line 2 initiates an outer loop to handle the fact that traversal
around the external face of a biconnected component can proceed from the root copy
v' in two directions, indicated by v'^^. The inner traversal loop starting at Line
3 begins at v' with the edge indicated by the link[u^j] member of v'. The inner
traversal loop proceeds to embed back edges and merge biconnected components as
necessary, and it adds short-circuit edges to remove inactive vertices from the external
face. The first iteration of the loop with = 0 proceeds until it returns to v' or
until it reaches a stopping vertex. In the latter case, a second iteration of the loop
with = 1 operates in the same manner, terminating when a stopping vertex
is encountered. For each loop iteration, the Walkdown maintains the embedding
invariant state (Definition 3.8).

L em m a 6.4 on emkddmiy atrucfure G m the em6 edd*n^ muoriont state


(D ^m tm n the Wothdoum tmueraol Zoop mamtoina aa aa iauanaat coaditioa
Property tnhich atatea that G ia a coZZectioa o/ pZaaar Aicoaaected compoaeata.

P ro o f. The Walkdown only changes the biconnected components in G to embed


a back edge (Lines 6 and 7) or a short-circuit edge (Line 27). A short-circuit edge
is always embedded between two vertices in the same biconnected component, so it
does not affect Property 3.1. At the beginning of an iteration that embeds a back
edge (u',w), the stack S' contains the root copies of all pertinent child biconnected
86

Figure 6.2: The W alkdown Procedure

Procedure: Walkdown
this: Embedding Structure G
in: A root copy i/ of the current vertex (with DFS child c)
out: Embedding Structure G containing back edges to descendants of n',
merged biconnected components and short-circuit edges

1) Clear the stack 5' in G


2 ) for in {0 , 1 }
3) ^ GetNextVertexOnExtemalFace(n', 1 xor
4) while w
5) if the adjacentTo member of w is equal to
6 ) MergeBicomps 0
7) EmbedBackEdge(r;', w,
8 ) Set the adjacentTo member of w equal to n

9) if [pertinentBicompList of w\ > 0
10) Push (w.Win) onto the stack 5'
11) w' -h- value of the first element of pertinentBicompList of w
12) (a;,Tim) ^GetNextVertexOnExtemEilFace(w', 1)
13) (y, 2/in) <—GetNextVertexOnExtemalFace(w% 0)

14) if VertexActiveStatus(x) returns ‘Internally Active’


15) (w, Win) (a;, a:in)
16) else if VertexActiveStatus (y) returns ‘Internally active’
17) (w, Win) f - (*/, W
18) else if adjacentTo of x equals v or |pertinentBicompList of x| > 0
19) (w, W in) 4- (x, X in)
2 0 ) else (w, Win) 4- (%/, %/in)

)
2 1 if w equals x, w ^ f - 0
)
2 2 else w ^ f - 1
23) Push (w% w[,g^) onto the stack 5

24) else if VertexActiveStatus(w) returns ‘Inactive’


25) (w, Win) 4—GetNextVertexOnExtemalFace(w, Win)
26) if the stack S is empty and the lowpoint of c = u' —n is less than V
and the adjacentTomember of w is not equal to V
27) EmbedShortCircuitEdge(r', w, Win)

28) else break the ‘while’ loop

29) if the stack S' is non-empty or to equals %/, break the ‘for’ loop
87

components to which the Walkdown descended in traversing external face paths from
n' to w. These root copies, along with other information identi^dng the specihc paths
traversed, were pushed onto 5^ (Lines 9 and 23) during prior iterations. By Lemma
6.2, the procedure MergeBicomps joins the root copies on the stack ,9 with their
corresponding parent copies. The resulting connected component contains the con­
catenation of the external face paths traversed, which form a cycle when combined
with the new back edge (u% tu) form a cycle. Thus, once the new back edge is embed-
ded (Line 7), it appears in a single biconnected component. Therefore, the Walkdown
does not change G in a way that aSects Property 3.1. O

L em m a 6.5 Starting with an embedding structure G in the embedding invariant state


WoZtdown fmnersof loop momfoirw oa on mvorionf conAfwn
Property 3.2, which states that all internally and externally active vertices appear on
the external faces of biconnected components in G.

P ro o f. A short-circuit edge can remove a vertex from the external face, but only if it
is inactive according to the test in Line 24. Moreover, both endpoints of a short-circuit
edge remain on the external face of a single biconnected component. As well, both
endpoints of a back edge and every vertex into which a root copy is merged remain
on the external face. Thus, since there is an edge directly connecting each root copy
/ with the merge point or back edge endpoint in the same biconnected component as
r', and since the new back edge is embedded such that it forms a proper face with the
aforementioned edges, the merging of biconnected components and the embedding of
back edges dp not remove any vertices from the external face. O

L em m a 6 .6 witA on embedding structure G in the emteddmp muonont stote


(Definition 3.8), the Walkdown traversal loop maintains as an invariant condition
Property which stotea thot ea:temot /dee edyes ore indicoted &y the Knh/iO/ ond
hnh/// members o/ ectemot /oce uertices.

P ro o f. Follows from Lemmas 4.5 and 4.8 and the proof of Lemma 6.5. D
88

L em m a 6.7 wtfA on embeddmg afmctnre G *n (Ae em6 Gdd*ng in«or*onf aWe


^De^nition tke inner M^o&down (rorereoi Zoop moinWna oe on inuoriont condi­
tion Property w/iicA etotea Aotu to oAtoin tAe ciocAtoiae orientotion 0 / otf oertez
oiÿocency Ziata.

P ro o f. When a back edge (1;, w) E E(G) is embedded in G, its representative edge


records are placed in the adjacency lists of a root copy o' and the parent copy 10

such that the new edge appears on the external face in place of the path traversed by
the Walkdown to travel from o' to w. A short-circuit edge embedding performs the
same adjacency list modihcations. Thus, embedding an edge does not aSect vertex
orientation of its endpoints.
Other than o', root copies are only aSected by being destroyed. A root copy o'
is only aSected by edge addition. Thus, clockwise vertex orientation is preserved for
root copies.
For parent copies, the only other Walkdown operation that modifies the adja-
cency lists is the merging of biconnected components. According to Lemma 6 .2 , the
adjacency list of r after being merged with a root copy r' is correctly formed and has
the same orientation. Therefore, we can consider whether Property 3.4 is preserved
by the procedure MergeBicomps. The property is true by assumption prior to an
invocation of MergeBicomps. Inductively, assume the embedding has Property 3.4
and the embedding contains a connected component R whose vertex of least DPI is
represented by a root copy r'. Let r denote the parent copy of r ' and let g' denote
the root of the biconnected component containing r. Let be 0 or 1 to indicate the
direction of the Walkdown's entry into r. Let be 0 or 1 to Indicate the direction
of the Walkdown’s exit from r'.
Case 1: Let the parity of r be 0 such that r and g' have the same orientation,
and let diSer from rou*. Since r(n diSiers from , the orientations of r and r ' are
equal. Thus, r ' and have the same orientation, so Property 3.4 is preserved if the
orientations of descendants of r ' in fZ are not changed. Since the parity of r is 0 and
the sign of the child tree edge incident to r ' is not changed &om the initial value of
1, Property 3.4 is preserved.
89

Case 2 : Let the parity of r be 0 such that r and g/ have the same orientation,
and let be equal to rou*. Since equals Tout, the orientations of r and / are
Opposed. Thus, r ' and g/ have opposite orientations, so Property 3.4 is preserved if
the orientations of descendants of K in A are changed. Since the parity of r is 0
and the sign of the child tree edge incident to r ' is changed to -1 after r ' is inverted.
Property 3.4 is preserved.
Case 3: Let the parity of r be 1 such that r and g' have opposite orientations,
and let diSer from rou*. Since diSers from rgu*, the orientations of r and r' are
equal. Thus, / and g' have opposite orientations, so Property 3.4 is preserved if the
orientations of descendants of T-' in A are changed. Since the parity of r is 1 and the
sign of the child tree edge incident to r' is not changed from the initial value of 1 ,
Property 3.4 is preserved.
Case 4: Let the parity of r be 1 such that r and g/ have opposite orientations, and
let Tin equal rout- Since equals Tout, the orientations of r and r' are opposed. Thus,
r' and q' have the same orientation, so Property 3.4 is preserved if the orientations
of descendants of r' in R are not changed. Since the parity of r is 1 and the sign of
the child tree edge incident to r' is changed to -1 after r' is inverted, Property 3.4 is
preserved. □

L em m a 6 .8 Starting with an embedding structure G in the embedding invariant state


(Definition 3.8), the Walkdown traversal loop maintains as an invariant condition
Property 3.5, which states that all unnecessary root copies are eliminated.

P ro o f. A root copy is only unnecessary if a back edge has been embedded between
ah ancestor of p and a vertex in the DFS subtree rooted c. According to the proof
of Lemma 6.4, the embedding of such a back edge is immediately preceded by the
merging of with p in the procedure MergeBicomps. According to Lemma 6 .2 , p^= is
eliminated. □

Lemma 6.9 S'farfmg wit/i uu G m <Ae muonont sW e


the Wo&down truuersoJ foop mumtains os on inuoriont condition
90

fropeyfy tuAicA aWea ertemoZ ocfivify 0/ o uerfea; p w jynomicoZfy upjofej


6 p remoumg fAe cA;W c (Ae 8 epomWDF 6 ^CA;MAw( 0 / poreuf p tuAeu fAe roof
copy p^ w eZimmoW.

P ro o f. According to DeSnition 2.1, the external activity of a vertex p is determined


by its least Ancestor, which does not change, and the external activity of biconnected
components containing root copies of p. Lemma 4.10 proves that the external activity
of biconnected component with root edge (p"^, c) is determined from the lowpoint of
c. According to Lemma 4.11, the procedure VertexActiveStatus uses the lowpoint of
the first element of the separatedDFSChildList because it is sorted by the children's
lowpoint values, and a child c is removed from the separatedDFSChildList of parent
p when p^ is eliminated by Lemma 6.2. □

L em m a 6.10 Starting with an embedding structure G in the embedding invariant


state (Definition 3.8), the Walkdown traversal loop maintains as an invariant condi­
tion Property 3.1, which states that the embedding maintains a count of the number
of embedded edges.

P ro o f. According to Lemmas 4.5 and 4.8, embedding a new edge implies an increment
of the value of m in (7 due to the definition of edge representation (Definition 3.3).

L em m a 6.11 Starting with an embedding structure G in the embedding invariant


state tAe TFoZWoum tmuersoZ loop momtains as am muariaut coud*-
tipu Property wAicA states tAat tAe pertinence 0 / vertices is dynamicaZZy updated
in a uerter u; and its separation ancestors loAen tAe 6 acA edye (0 , w) is embedded.

P ro o f. According to Definition 2.4, a vertex w is pertinent if there is an unembedded


back edge (u, w) or if there is a pertinent biconnected component with root w'. By
Definition 3.8, the adjacentïb member of w is equal to u if there is an unembedded
back edge (0 , 1 0 ), and the pertinentBicompList of w contains a root copy of to for
91

each pertinent child biconnected component. Immediately after embedding a back


edge, the Walkdown traversal loop assigna n to the adjacentTo member of w (Line
8 ). According to Lemma 6.2, the procedure MergeBicomps removes a root copy u/
from the pertinentBicompList of its parent copy w when w' is eliminated. O

L em m a 6.12 Given an embedding structure G in the embedding invariant state (Def-


mition the WoZWoum procedure mointoins the embeddmp muoriont state o/G .

P ro o f. Follows directly from the proofs of Lemmas 6.4, 6 .6 , 6.5, 6.7, 6 .8 , 6.9, 6.10
and 6.11. n

For the Walkdown invocation on a root edge {v', c), the traversal loop invariants
given above are clearly useful when the Walkdown is able to embed all back edges
from V to descendants of c. Thus, we focus on Conditions 1 and 2 , which describe the
conditions under which the Walkdown fails to embed one or more back edges from v
to descendants of c.
C o nd itio n 1. Given an embedding structure G and a root copy v' in G with DFS
child c, the Walkdown returns with a non-empty stack (which implies that one or
more edpea ^rom u to descendants o/ c haue not been emkeddedj.
C o nd itio n 2 . Given an embedding structure G and a root copy v' in G with DFS
child c, the Walkdown returns with an empty stack prior to embedding all back edges
^ m u to descendants o/ c.
If Condition 1 occurs, then the input graph G contains as a minor the graph
appearing in Figure 6.3(a). If Condition 2 occurs, then the input graph G contains as
a minor the graph in Figure 6.3(b). It is easy to prove that the graph minor in Figure
6.3(a) indicates the non-planarity of the input graph, as shown in Lemma 6.13.

L em m a 6.13 Gxoen an em^eddmg structure G in tAe embedding inuariant state


inition 3.8) and a root copy v' in G with DFS child c, if the Walkdown invocation
terminates with a non-empty stack (Condition 1), then the input graph G is not pla-
nar.
92

(a) (b)

Figure 6.3: Graph M inors for Non-planarity Conditions of the N ew Pla­


narity Test, (a) Non-planarity M inor A for Condition 1. (b) Non-planarity
Minor for Condition 2.

P ro o f. Edge contraction and deletion can be used on the embedding structure G,


along with the addition of certain nnembedded edges represented in G as vertex ac-
tivity, to produce the minor appearing in Figure 6.3(a). The vertex v is the current
vertex, and u represents all unprocessed ancestors of v. The edge (u, v) is represen­
tative of the DFS tree path from v to ancestors of interest in u. The vertices x and y
are the externally active, and the dashed edges (u, x) and (u, y) are representative of
unembedded back edges from the input graph that are indicated in G by the external
activity of x and y. Moreover, the specific edges to ancestors of v may be incident to
descendants of x and y that have been edge contracted into x and y in the diagrams
shown. Thus, x and y may be representative of subgraphs of the input graph. Simi­
larly, vertex w is or has a descendant adjacent to the current vertex u by a back edge
(v, w), which is also depicted with a dashed line because the Walkdown procedure
failed to embed it.
In Figure 6.3(a), there is a biconnected component of central interest rooted by
a root copy of r in G. It has an external face consisting of the cycle (r, . . . , z, . . . ,
in, . . . , y, . . . , r). For the purpose of simplicity, root copy vertices are not explicitly
depicted as they are simply part of the representation of the parent copy vertex while
it is a cut vertex in the partial embedding G. The vertices within the biconnected
9&

component with root r can simply be ignored, and vertices along the external face
other than r, x, w, and y can be edge contracted into x and y (such that the cycle
(r, ... ; z, w, r) is maintained). The edge (u, r) is representative of
the depth Erst search tree path between n and r.
The non-empty stack indicates that the Walkdown traversal loop has descended
to a pertinent child biconnected component, but the loop has encountered a stopping
vertex prior to Ending a pertinent vertex w. According to Lines 14-20, selecting a
path to a stopping vertex can only occur if both external face paths lead from the
child biconnected component root to stopping vertices z and y. Thus, both z and
y in Figure 6.3(a) must be stopping vertices. Since the input graph G contains as
a minor the graph in Figure 6.3(a), which in turn is a the input graph is not
planar. □

As mentioned previously, Figure 6.3b is a graph minor representing the state of


the embedding structure G when Condition 2 occurs. Its interpretation is similar to
the description given in Lemma 6.13. The biconnected component B on which the
Walkdown was called has an external face represented by the cycle {v, . . . , x, . . . ,
w, . . . , y, . , v). Vertices x and y represent the two stopping vertices that halted
the Walkdown traversal loop in each direction. Vertex u represents all unprocessed
ancestors of n, and the edge (u, v) represents a depth first search tree path. The dashed
edges represent unembedded back edges from the input graph that are indicated in
the embedding structure G by internal or external activity.
The non-planarity of G is more difficult to establish when the Walkdown fails to
embed a back edge due to Condition 2. In Figure 6.3(b), it is clear that the algorithm
would surround an externally active vertex if it were to proceed to w and embed the
edge (v,w). However, the figure does not contain a sufficient portion of the input
graph to establish non-planarity. In particular, it is not clear why the dashed edge
(u,w) cannot simply be embedded inside the biconnected component. The lemmas
that follow will prove that the Walkdown does indeed embed {v, w) inside of the
biconnected component B before encountering both stopping vertices, except when
94

sufficient additional structure exists to establish the non-planarity of the input graph.
A w candidate is a pertinent vertex on the lower path between x and y along the
bounding cycle of the biconnected component with root edge (u', c) (see, for example,
the biconnected component denoted B in Figure 6.3(b)). Lemma 6.14 proves that if
the Walkdown fails to embed a back edge due to Condition 2, the stopping vertices a;
and y must be distinct, and Lemma 6.15 proves that if the Walkdown fails to embed
a back edge to a w candidate (or one of its descendants), then the tu candidate must
be on the external face of B.

L em m a 6.14 Giuen on em6 eddtn^ gfmcfnrG G in t/ie embedding inuoriont aWe


inition 3.8) and a root copy v' in G with DFS child c, if the Walkdown terminates
under Condition tuAicA atotea tAot it /oita to em6 ed o 6 oct edge between o' ond o
descendant of c, then the stopping vertices x and y are distinct.

P ro o f. By contradiction, suppose x and y are the same vertex to. If tu is adjacent to


V, then the Walkdown embeds the back edge to w before halting because Lines 5-8 run
before Line 28. Furthermore, a stopping vertex has no pertinent child biconnected
components. Hence, there are no DFS descendants of w that are adjacent to v, so the
stopping vertex does not prevent the Walkdown from visiting any vertices adjacent
to V, which contradicts the existence of a tu candidate. □

L em m a 6.15 Given an embedding structure G in the embedding invariant state (Def­


inition 3.8) and a root copy v' in G with DFS child c, if the Walkdown terminates
under Condition ;0 , tuAicA aWea tAot if /oik fo embed o bocA edge between t/ ond o w
condidofe (^or one o/ifa deacendonfaj, fAen tAe w condidofe muaf be on tAe ezfemof
/oce o/jg.

P ro o f. In the first step of the main algorithm (see Figure 2.1), only tree edges are
embedded, so all vertices are on the external faces of the biconnected components
containing them. In subsequent steps, all pertinent vertices are on the external face
because they were externally active in the prior step. Moreover, a vertex w can only
95

be placed inside a biconnected component by embedding a short-circuit edge between


its neighbors along the external face, which in turn would imply that w is inactive.
However, a vertex w cannot be inactive if it is pertinent. O

To simplify future results, Lemma 6.16 and Lemma 6.17 show that pertinent
child biconnected components of a w candidate can be edge contracted into w without
aEecting conclusions about the correctness of the algorithm.

L em m a 6.16 Giuen on embedding afrucfure G m (he embedding muoriont sW e


mition ond o root copy u' in G with DF5" chifd c, the Wofhdown terminotea
under Condition Jg, then we con conaider the khouior the MWhdown oa i/off intemoZfy
octiue deacendont biconnected componenta o/ eoch w condidote were edpe contracted
into the w condidote.

P ro o f. Once the algorithm merges an internally active child biconnected component


B' into B at the cut vertex w, it traverses all pertinent descendant biconnected
components of B' before w is encountered again. Since B' is not externally active, no
stopping vertex will be encountered in this process. Furthermore, all vertices directly
adjacent to v must be on the external faces of B' and its descendant biconnected
components (as stated in Lemma 6.15). Thus, the back edges from v to vertices in
B' and its descendant biconnected components are embedded consecutively in the
cyclic order of v. Since B' and its descendant biconnected components were planar
subgraphs prior to this operation, and the new back edges are embedded without
edge crossings, edge contracting B' and its descendant biconnected components into
the w candidate can be done without affecting the planarity of G and results in a
single edge (u, w). O

L em m a 6.17 Given on embedding structure G in the embedding invoriont stote ('De/-


inition ond o root copy u' in G with chifd c, i/ the Wofhdown terminotes
under Condition & ond o w condidote hoa o pertinent ertemoiiy octive child bicon­
nected component, then the input yroph G is not plonor.
96

P ro o f. The graph minor appearing in Figure 6.4 is the same as the Walkdown halting
minor in Figure 6.3(b) except that z and its incident edges have not been contracted
into w. The edge (w,z) is the root edge of the pertinent externally active child
biconnected component, and all DFS descendants of z have been edge contracted
into z. Since the input graph contains as a minor the graph in Figure 6.4, which
contains a it's,3 , the input graph is not planar. □

F igure 6.4: N o n -p lan a rity M inor B for L em m a 6.17

Figure 6.4 is the first graph minor extension of Figure 6.3(b) with enough ad­
ditional structure to establish the non-planarity of the input graph. In this case,
one can think of the unembedded back edge (n, w) in Figure 6.3(b) as representing a
subgraph that includes z, so embedding {v, w) inside of the biconnected component
B could not be accomplished without placing an externally active vertex inside the
bounding cycle of B. All future cases exploit a second type of additional structure
to establish the non-planarity of Figure 6.3(b). The additional structure is a path
through B that would result in an edge crossing if (v,w) were also embedded inside
B.
An %-%/ poth is a path embedded through the biconnected component B depicted
in Figure 6.3(b) that excludes the root of B and a specific in candidate, and which
has one endpoint p,, along the external face path ( n. . . %. . . in) and the other endpoint
Py along the external face path ( n , . . . , p, . . . , in). A Aiph a;-p pufA is an z-p path in
which p„ is on the external face path between and excluding the root of B and z or
97

Py is on the external face path between and excluding the root of B and p (or both).
A Zow z-p po</i is an path that is not a high T-p path. The highest z-g path is
an T-p path such that, for every vertex z along the z-p path including the points of
attachment p^ and Py, an edge crossing does not result 6 om the addition of an edge
inside the biconnected component from z to the root copy of v. The first condition
under which a blocking x-y path results in the conclusion that the input graph is
non-planar appears in Lemma 6.18.

Lemma 6.18 Giuen on emheddinp structure G in (he embedding inmriont afote/De^


inition 5 .^ ond o root copp o' in G with DF 6 " child c, ÿ the kFolhdown terminâtes
under Condition ond the biconnected component B rooted bp t/ hos o high z-p poth,
then the input graph G is not plonor.

P roof. Suppose p , is a high point of attachment for the x-y path. The graph minor
appearing in Figure 6.5 is the same as the Walkdown halting minor in Figure 6.3(b)
except for the addition of z and the edge between z and p. Vertex z, which represents
the high point of attachment p^, has not been edge contracted into x. The point
of attachment Py has been edge contracted into p along with all other external face
vertices along the path (u, . . . , p, . . . , w), excluding u and w. External face vertices
along the path (z, . . . , x, . . . , w) are edge contracted into x, excluding z and w. Any
external face vertices (excluding u) along the path represented by edge (u, z) are edge
contracted into z, as are all vertices embedded inside of B. Since the input graph
contains as a minor the graph in Figure 6.5, which contains a the input graph
is not planar. The case in which py is the high point of attachment is symmetric. □

Lemmas 6.19 and 6.20 establish the two remaining non-planarity minors. Both
involve a low x-p path that prevents the embedding of a back edge between u and a
w candidate inside the biconnected component B.

Lemma 6.19 Giueu ou embeddiup structure G iu the embeddlup muoriout stote


mxtmu oud o root copp o' iu G with child c, ÿ the Wolhdowu termiuotes
uuder Gouditiou ;8 oud the bicouuected compoueut B rooted bp o' hos ou x-p poth
98

.w

F igure 6 .6 : N o n -p lan a rity M in o r C for L em m a 6.18

that contains a single endpoint z of a second path p of the form (v', . . . , z), where
all vertices in the path (except v') are embedded inside B , then the input graph G is
non-pZonor.

P ro o f. The graph minor appearing in Figure 6 . 6 is the same as the Walkdown halting
minor in Figure 6.3(b) except that the x-y path and the second path p are depicted.
All vertices inside B are edge contracted into z. Since the input graph contains as a
minor the graph in Figure 6 .6 , which contains a A 3 ,3 , the input graph is not planar.

.w .

F ig u re 6 .6 : N o n -p lan a rity M in o r D for L em m a 6.19

L em m a 6.20 on embedding G in embedding inuorioni sfofe


iniiion ond o roof copy u' in Ç with DAS' child c, i^ the WdZhdown terminotee
under Condition ond the biconnected component D rooted by o' hoa on z-y poth such
99

(Aaf (Ae Zower ertemoJ /oce , w, . . . , *»cZ«jea on eztemoZfy ocfive


uertez z ^digfincf p, onj f/ten ^ e infof ^^ropA G w non-ffonor.

P ro o f. The graph minor appearing in Figure 6.7 is the same as the Walkdown halting
minor in Figure 6.3(b) except th at an edge (n,w) has been added and the z-y path
is depicted. The externally active vertex z â th e r is or has been edge contracted into
the w candidate, but the dashed edge (n, w) indicates the external activity of z. Since
the input graph contains as a minor the graph in Figure 6.7, which is a the input
graph is not planar. □

F igure 6.7: N o n -p lan a rity M inor E for L em m a 6.20

Now that all of the non-planarity minors have been presented, the next two
lemmas show some conditions which lead to a contradiction in the assumption that
the Walkdown failed due to Condition 2. Lemma 6.21 hypothesizes, for the purpose
of contradiction, the existence of an x-y path that does not meet the criteria set
forth in Lemmas 6.18, 6.19 and 6.20. Lemma 6.22 hypothesizes, for the purpose of
contradiction, the existence of a w candidate for which there is no blocking x-y path
and which does not meet the criterion of Lemma 6.17.

L em m a 6.21 Giuen on structure G *u tAe embeddiug muoriout state (De/-


imtiou oud o root copy o' iu G uutA cAdd c, ÿ tAe WdZAdoiou termiuotes
under Condition 2 and the biconnected component B rooted by v' has an x-y path,
tAeu tAe AiyAest %-y potA must eitAer 6 e o AiyA z-y potA, or %t must coutom ou iuteruof
100

verter z w on enjpomf 0 / o aeconj pof/t 0 / mfemof werficea feojin^ (0 fAe roo( 1/


o /B , or <Ae earfemo/ /oce po(A . . . , w, . . . , moa( mcZude on ezfemo/Zy ocftue
«erfezz ('d W in c f^ m p z ond p ^ /

P ro o f. By contradiction, suppose none of the three conditions holds for the highest
x-y path P. Since by assumption there is no path from the root of B to an internal
vertex z along F, there is no DFS tree path from the root of B to the internal vertices
of P. Hence, prior to the Walkdown invocation on the cycle (pz,. . . , w , . . . , p , , . . . ,
Pz) form the bounding cycle of a biconnected component B ' rooted at either p^ or p„.
Because F is a low x-y path by assumption, B' cannot contain the stopping vertices
X and y except at the points p^ and Py, respectively. Let a be the minimum of p^ and
Py, and let 6 be the maximum of p^ and py such that o is a DFS ancestor of 6 , and 6 is
externally active because it either is a stopping vertex or it has a stopping vertex as a
descendant. During step f , the Walkdown merges the biconnected component rooted
by a. In Lines 14-20, the Walkdown chooses to proceed with an internally active
vertex if one is available. Since b is externally active, but by assumption there are
no externally active vertices on the external face path (a, w, ...,&) (excluding a
and b), the Walkdown would proceed along the path to w. Thus, we contradict the
existence of the x-y path since the Walkdown would flip the biconnected component
if necessary to embed (u, w) flrst such that vertex w and the edge (u, w) would be
embedded inside the biconnected component B when the connection is later made
between v' and b or one of its descendants. □

L em m a 6.22 Giuen an emkdAng' G in <Ae em6eddinp inuorionf aWe (Be/-


inition ^.6^ ond o copy o' in G wi(A B F ? child c, ^ (he WdlAdoton ferminolea
under Condition & ond the biconnected component B rooted by o' Aoa o to condidote,
then B moat hone on z-y poth relotiue to to or to moat Aooe on eztemolly octioe
pertinent child biconnected component.

P ro o f. By contradiction, suppose there exists a to candidate for which neither condi­


tion holds. Since by assumption there is no a;-y path, there is no a;-y path consisting of
101

DFS tree edges. Thus, since w must also be on the external face by Lemma 6.15, w is
both a DFS ancestor of z; or (possibly both) and a cut vertex in G at the beginning
of step r. Therefore, w must be visited by Walkdown in order to attach the pertinent
child biconnected component(s) leading to z or y (or both). The Walkdown embeds
any required back edge and attaches ^ internally active child biconnected compo­
nents prior to processing externally active child biconnected components (z and y
are externally active). The visitation of w and all of its mtemally active descendants
contradicts the assumption that w is & w candidate since by assumption w has no
externally active pertinent child biconnected components at the end of step n. O

T h eo rem 6.23 Giuen on embedding structure G in the embedding inuoriont state


(D ^nition ond o root copy u' in G udth DF,? chifd c, the octions o/the Wdl&doton
result in on emheddiny structure G in the emheddiny inuoriont stote. 7/ the yroph G
is plonor or ijf neither Condition .1 or occur, then G contoins oil hoch edyes /rom
the input graph G between v and descendants of c.

P ro o f. If Walkdown fails to embed a back edge, it must be due to Condition 1


or Condition 2 since the only other loop termination occurs on Line 4 if traversal
returns to v', which cannot occur if any vertex on the external face is pertinent. If
the failure is due to Condition 1, then Lemma 6.13 proves that the input graph is not
planar. Hence, consider the case when the algorithm returns NONPLANAR due to
a Walkdown failure on Condition 2.
A w candidate, which has an unembedded back edge to u at the end of step
V, either has or does not have a blocking x-y path. If there is no blocking x-y path,
then Lemma 6.22 proves that w must have an externally active child biconnected
component, which proves that the input graph is non-planar by Lemma 6.17. If there
is a blocking z-y path, then it is either high or low. If it is a high T-y path, the
Lemma 6.18 proves that the input graph is non-planar. If it is a low x-y path, then
Lemma 6.21 proves that one of Lemmas 6.19 or 6.20 must hold, which in turn proves
that the input graph is non-planar.
102

Thug, if the Walkdown fails to embed one or more back edges, then G is non-
planar. The theorem follows as contrapositive since Lemma 6.12 proves that G is a
representation of the combinatorial planar embedding of a subgraph of G consisting
of all embedded edges. O

Finally, we have the run-time analysis for the Walkdown appearing in Lemma
6.24. This is followed by Lemma 6.25, which proves that the use of short-circuit
edges add no additional memory requirements beyond the edge bound established in
Corollary 1.5.

L em m a 6.24 TTte procedure Wo&down runs m G (l) omorfized ftme per uer(er o/
the input graph.

P ro o f. The Walkdown procedure is invoked once per depth hrst search tree edge.
Line 1 occurs in constant time. Line 2 performs two iterations of remainder of the
Walkdown pseudo-code. Line 3 involves a simple assignment and an invocation of
GetNextVertexOnExternalFace, which is 0(1) by Lemma 4.14. Line 29 is a constant­
time comparison and branch operation. Thus, the total cost of all executions of Lines
1-3 and 29 is 0(n).
Line 4 initiates a simple loop over the loop body in Lines 5 to 28. The loop
body contains invocations of MergeBicomps, EmbedBackEdge, GetNextVertexOnEx-
temalFace, VertexActiveStatus, and EmbedShortCircuitEdge, all of which achieve
G (l) time by Lemmas 6.3, 4.6, 4.14, 4.12, and 4.9, respectively. The loop body also
invokes a standard 0(1) stack push operation on Lines 10 and 23. Line 11 is 0(1)
because each pertinentBicompList is a linked list. Since the remainder of the opera­
tions in the loop body are simple constant time operations, the loop body achieves
0(1) time per iteration.
For the inner traversal loop starting at Line 4, the iterations can be partitioned
into a set of iterations up to and including the embedding of the Erst back edge, sets
of iterations up to and including the embedding of each subsequent back edge, and a
Enal set of iterations after the last back edge is embedded. For each set of iterations
prior to and including the embedding of a back edge, the Walkdown iterates through
103

vertices along a path that, together with the back edge, will form a new proper face
in the embedding structure. Therefore, except for the hnal set of iterations, the total
cost of all loop iterations is commensurate with the sum of the degrees of the faces in
the embedding, which is 0(m) in total. If the Snal set of iterations is non-empty, then
it consists of zero or more iterations, each of which short-circuits an inactive vertex,
followed by a final iteration that discovers either a stopping vertex or the root vertex
t/. The total cost of all short-circuiting iterations is 0(7i) because each vertex is only
short-circuited once, after which it no longer appears on the external face. The total
cost of the final iteration in each Walkdown is 0(Tt).
Thus, the cost of all Walkdown operations is 0 (n ) in total. This cost can be
amortized over all vertices, resulting in 0(1) amortized time performance per vertex.

L em m a 6.25 Short-circuit edges are embedded within the edge limit specified by
Corollary 1.5.

P ro o f. The number of short-circuit edges embedded never exceeds n because each is


associated with the inactive vertex it removes from the external face. Moreover, the
inactive vertex is the neighbor of the endpoints of the short-circuit edge, which forms
a degree three proper face when it is added to the embedding. Since an edge borders
on two faces, we consider whether the opposing face (currently the external face) can
be degree two. First, suppose w is pertinent. A short-circuit edge (v', w) is not added
if there is an unembedded back edge (v,w) because the back edge will be added as
the first action of the next loop iteration (see Line 5 and the last conditional test in
Line 26). If w has a pertinent child biconnected component that is merged in a later
iteration of the same traversal loop, then the new proper face bordering the short-
circuit edge is at least degree three (the new edge (v', d) to a descendant of w, the
short-circuit edge (u%w) and the external face path(s) from w to d). Now, suppose
w is inactive. Traversal continues to the external face successor s of the descendant
endpoint w, which cannot be equal to v' because the Walkdown only adds short-circuit
edges to a biconnected component B if it is externally active. Thus, the Walkdown
104

either embeds an edge g) or it merges a pertinent child biconnected component


onto g. In either case, the short-circuit edge would become part of a new proper face
with degree three or higher. Therefore, a short-circuit edge can only border a degree
two face if u) is a stopping vertex, in which case the short-circuit edge remains along
the external face of B. In addition, the external face of the biconnected component
can be degree two only if both Walkdown traversals are stopped by the same vertex w
because the external face of B must be degree three or higher if the stopping vertices
for B are distinct. Moreover, the external face of B is degree three or higher prior to
the addition of the Gnal edge to B in the Walkdown invocation, which must be the
short-circuit edge (f', w) if the external face of B becomes degree two as a result of
its addition. Thus, prior to the embedding of (v',w), the biconnected component B
conformed to Corollary 1.5, and we need only account for the space used by (v',w).
Although the input graph is restricted to 3n —5 edges and our data structure contains
space for at least 3n edges, our argument does not rely on the space for the extra five
edges. Instead, we account for the edge records required by (v',w) using the space
for the unembedded back edge e between an ancestor of v and a vertex in the DFS
subtree rooted by w. Such a back edge e must exist since w is externally active. If the
back edge e is embedded in a later step of the algorithm, then the degree two external
face of B is divided by the paths from v to the ancestor and from w to the ancestor
such that both edges formerly along the degree two external face are now bordered
by faces of degree three or higher. On the other hand, if a non-planarity condition
is discovered prior to the embedding of back edge e, then our algorithm deletes the
short-circuit edges prior to attempting the isolation of a Kuratowski subgraph. □
106

7. N ew P lanarity T esting A lgorithm

The procedure PlanarityTest defined in Figure 7.1 is the functional entry point of the
planarity testing algorithm. This procedure can be called independently, but is also
called by procedure PlanarEmbed discussed in Chapter 8 and procedure IsolateKu-
ratowskiSubgraph discussed in Chapter 9.

Figure 7.1: The Edge A ddition Planarity Testing Algorithm

Procedure: PlanarityTest
in: Graph G
out: An indication of whether G is planar or non-planar and the embedding
structure G (in embedding invariant state) at the time when
the planarity of G is determined.

(1) G Initialize (G)


(2) for each vertex u E G,
(3) for each DFS child c of u in G,
(4) G .EmbedTreeEdge(v, c)

(5) for each vertex v from n{G) —1 to 0 in descending order


(6) Set u in G equal to the loop variable v

(7) for each back edge of G incident to v and a descendant w


(8) G.Walkup(w)

(9) for each DFS child c of v in G


(10) if IpertinentBicompList of G.V[c]\ > 0
(11) v' < r - c + G.n
(12) G. Walkdown (ï;')

(13) for each back edge of G incident to v and a descendant w


(14) if the adjacentTo member of w in G equals v
(16) return (NONPLANAR, G)

(16) return (PLANAR, G)

Theorem 7.1 establishes the correctness of the PlanarityTest procedure. It is


106

based on numerous lemmas also appearing in Chapter 6. Theorem 7.2 gives the
running time of the PlanarityTest procedure.

T h eo rem 7.1 On on %npn( ^noph G unth ot moat An edges /o r some conatont A > 3,
the procedure PlonoritpThat retnma ^ ond only ^ the input groph G ia plo-
nor, ond it retuma on embedding structure G in embedding inuoriont atote ('Dejhnition
3.8) containing all edges of G unless there exists a biconnected component in G on
which o Condition 1 or ;0 /oiture occurred.

P ro o f. The tree edges are embedded by the hrst loop, leaving only the back edges.
If, for each vertex u, the back edges from u to its descendants are embedded, then all
back edges are embedded since a back edge from a vertex to an ancestor u is embedded
in step u. The loop in Lines 9 to 12 iterates each DFS child c of v, invoking Walkdown
to embed back edges from v to descendants of c. If G is planar, then Theorem 6.23
proves that these invocations embed the back edges from v to its descendants at every
step V. Thus, Line 16 returns PLANAR if G is planar.
Conversely, if PlanarityTest returns PLANAR, then G is indeed planar. The
loop in Lines 13 to 15 ensures that, for each vertex v, all back edges from v to its
descendants have been embedded, and the result in G at each step is, according to
Lemma 6.12, in the embedding invariant state. To return PLANAR in Line 16, the
loop in Lines 13 to 15 must successfully execute for all v such that all edges are
embedded while maintaining the planarity of G. On the other hand, if G is non-
planar, then Theorem 6.23 guarantees that, for some step v, an unembedded back
edge will be found by the loop in Lines 13 to 15, at which time the embedding structure
G will be in the embedding invariant state and contain a biconnected component on
which a Condition 1 or 2 failure occurred. □

T h eo rem 7.2 The procedure PlouuritpTbst rune m G(n) (ime.

P ro o f. The procedure begins with an invocation of Initialize in Line 1, which is 0 (n )


by Lemma 3.2.
107

Coroüary 1.5 establishes an 0 (n ) limit on the number of edges in the input


graph, whether or not it is planar. Thus, each pair of loops in PlanarityTest that
iterate through all of the edges of each vertex execute the inner loop body a total of
0 (n ) times. This analysis is applicable to the following pairs of loops: Lines 2 and 3,
Lines 5 and 7, Lines 5 and 9, and Lines 5 and 13.
The inner loop stEirting at Line 3 simply invokes procedure EmbedTreeEdge,
which is 0(1). Thus, the total cost of Lines 2 to 4 is 0 (n ).
The inner loop starting at Line 7 simply invokes procedure Walkup, which is
0(1) by Lemma 5.3. Thus, the total cost of the loop in Lines 7 and 8 is 0(fi), which
is 0(1) amortized time per iteration of the outer loop in Line 5.
Similarly, the inner loop starting at Line 9 contains constant-time operations
plus the invocation of procedure Walkdown, which is 0(1) by Lemma 6.24. Thus,
the total cost of the loop in Lines 9 to 12 is 0 (n ), which is 0(1) amortized time per
iteration of the outer loop in Line 5.
Likewise, the inner loop starting at Line 13 contains only constant time oper­
ations. Thus, the total cost of the loop in Lines 17 to 19 is 0{n), which is 0(1)
amortized time per iteration of the outer loop in Line 5.
Therefore, the procedure PlanarityTest consists of an 0{n) cost from calling
Initialize in Line 1, an 0 (n ) total cost from the loop over Lines 2 to 4, an 0 (n ) total
cost from the loop over Lines 5 to 15, and a constant time cost for Line 16. □
108

8. N ew Planar E m bedding A lgorithm

This chapter covers the post-processing steps that can be performed after the oper­
ation of the procedure PlanarityTest in Chapter 7 to recover a combinatorial planar
embedding of the input graph if it is planar. Section 8.1 discusses a procedure that
imposes a consistent orientation to all vertices in each biconnected component in
the embedding structure. Section 8.2 discusses the procedure PlanarEmbed, which
creates the combinatorial planar embedding if the input graph is planar.

8.1 O rienting th e Vertices


The OrientVertices defined in Figure 8.1 processes each biconnected component
B in G, imparting an adjacency list order to all parent copy vertices that is consis­
tent with the orientation of the root copy vertex in B. The procedure is called by
the procedure PlanarEmbed discussed in Section 8.2 as well as by the Kuratowski
subgraph isolator described in Chapter 9.
The correctness of procedure OrientVertices is stated in Lemma 8.1. The run­
time analysis for procedure OrientVertices appears in Lemma 8.2.

L em m a 8.1 Given an embedding G in the embedding invariant state (Definition 3.8),


the procedure OrientVertices converts G to the oriented embedding invariant state
(Definition 3.9).

P ro o f. The algorithm iterates through each biconnected component B in G using


Lines 3 and 4. Assuming a baseline orientation given by the root copy vertex in B,
the orientation of a parent copy vertex is inverted if there is an odd number of -1 signs
assigned to the DFS tree edges along the ancestral DFS tree path from w to the root
of the biconnected component containing w because this represents an odd number
of inversions that would occur if we simply inverted w every time its nearest ancestor
root copy was inverted during a merge operation (see procedure MergeBicomps in
Chapter 6). □
109

Figure 8.1: Orienting th e Vertices in the Em bedding Structure

Procedure: OrientVertices
this: Embedding Structure G resulting from procedure PlanarityTest
out: Embedding Structure G in oriented embedding invariant state

(1) Delete the short-circuit edges


(2) Clear the stack 5 in G
(3) for / from n to 2n —1
(4) if the parentLink of r ' is not
(5) Push ( / , ! ) onto stack S
(6) while the stack 5 is not empty
(7) Pop (in, sigh) from the stack 5^
(8) if sign is -1, Invert Vertex(w)

(9) for each edge record e in w ’s adjacency list


(10) if e is a 'Tree Edge' to a DFS Child
(11) Push (in, sign * (sign of e)) onto stack 5'
(12) Assign 1 to sign of e

L em m a 8.2 The OrientVertices procedure runs in 0{n) time.

P ro o f. Line 1 requires a simple loop to iterate the edge array E of G, which is 0{n)
due to the edge limits imposed by Corollary 1.5. Line 2 is constant time.
The innermost loop in Lines 9 to 12 has a constant time loop body that iterates
the adjacency list of each vertex. Thus, the total cost is 0(m ), which is 0{n) due to
Corollary 1.5. Likewise, the invocation of Invert Vertex is G(d) by Lemma 4.16, but
the totEil cost over all iterations of the loop in Line 5 is G(m), which again is G(u)
due to Corollary 1.5. Since all other operations in the Line 6 loop are constant time,
and the loop iterates over all root copy and parent copy vertices, the total cost is
0 {n), which is 0(1) amortized time per vertex.
The outermost loop initiated in Line 3 iterates n times. Lines 4 and 5 are
constant time, and the loop initiated in Line 6 has already been shown to achieve
0(1) amortized time per vertex. Thus, the procedure OrientVertices is 0 (u ). O
110

8.2 O btaining a C om binatorial Planar Em bedding


The procedure PlanarEmbed de&ned in Figure 8.2 is the functional entry point
of the planar embedding algorithm. It can be called independently, but if the input
graph is non-planar, the procedure IsdlateKuratowskiSubgraph described in Chapter
9 must be invoked separately.

Figure 8.2: The Edge A ddition Planar Em bedding Algorithm

Procedure: PlanarEmbed
in: Graph G
out: An indication of whether G is planar or non-planar and the embedding
structure G in the embedding invariant state for step v if
G is non-planar or a combinatorial planar embedding if G is planar

(1) (result, G) f - PlanarityTest(G)


(2) if result is PLANAR
(3) G.OrientVertices()
(4) G.JoinBicomps()

(5) return (result, G)

The correctness of procedure PlanarEmbed is established by Lemma 8.3. The


run-time analysis for procedure PlanarEmbed appears in Lemma 8.4.

L em m a 8.3 On an input graph G with at most kn edges for some constant k > 3, the
procedure PlanarEmbed produces a combinatorial planar embedding of G in standard
ocÿocemcy fist /brmot. For non-pkuor grop/w, FianurFm6ed procedure pWds (he
emteddm^ structure G m embedding inudriont state (D ^nition contoining o
biconnected component on which o Condition j or jg /diiure occurred.

P roof. If the graph is non-planar, then Line 2 prevents alteration of the embed­
ding structure G resulting from the PlanarityTest invocation, which meets the stated
requirements according to Theorem 7.1. For planar graphs, the procedure OrientVer­
tices is invoked, which transforms G to the oriented embedding invariant state accord-
ing to Lemma 8.1. By Lemma 4.20, the invocation of JoinBicomps then merges the
Ill

root copy of each biconnected component with its parent copy without any change of
vertex orientation. If the parent copy is degree 0 (indicating a DFS tree root), then
the adjacency list of the root copy is transferred to the parent copy. Otherwise, the
orientation of the parent copy of the cut vertex is preserved after the merge because
the edges incident to a root copy are inserted without inversion between two edges
of the parent copy. Thus, G is a combinatorial planar embedding of the input graph
in standard adjacency list format because it contains no root copy vertices and one
parent copy vertex per vertex of the input graph, the adjacency list of each parent
copy vertex contains no short-circuit edges and all incident edges corresponding to
those in the input graph (by Theorem 7.1), and the parent copy vertices all have a
consistent adjacency list orientation. □

L em m a 8.4 The PlanarEmbed procedure runs in 0{n) time.

P ro o f. Line 1 performs a simple assignment {G is handled by reference) and also


invokes the procedure PlanarityTest, which is 0{n) by Theorem 7.2. Line 2 is a
constant time test and branch operation. Line 3 invokes OrientVertices, which is
0{n) by Lemma 8.2. Line 4 invokes JoinBicomps, which is 0{n) by Lemma 4.21.
Line 5 is constant time. □
112

9. N ew K uratow ski Subgraph Isolator

The process of isolating a Kuratowski subgraph of the input graph G is performed on


the embedding structure G that results from an invocation of the procedure Planari-
tyTest in Chapter 7. The process begins by choosing one of the non-planarity minors
identified in the lemmas leading to the proof of correctness of the procedure Walk-
down (Theorem 6.23 in Chapter 6). These non-planarity minors appear in Figures
6.3(a), 6.4; 6.5; 6.6, and 6.7.
Section 9.1 defines an augmentation of the embedding structure to store addi­
tional variables pertaining to the selection of a non-planarity minor, and it defines
the states entered by the augmented embedding structure during the selection pro­
cess. Section 9.2 provides simple, low-level procedures for populating most of the
variables in the augmented data structure, and Section 9.3 provides procedures for
finding (and marking) the internal paths appearing in the latter three non-planarity
minors. Section 9.4 provides the top-level routine that selects a non-planarity minor
based on the results of the low-level routines and the characteristics of the internal
paths found in the embedding.
Once the type of non-planarity minor is selected, it is used to choose a proce-
dure for isolating a Kuratowski subgraph. Section 9.5 defines an additional embedding
structure augmentation, and some additional low-level procedures are defined in Sec-
tion 9.6 to perform tasks such as marking desired paths and adding unembedded edges
to completely form a Kuratowski subgraph. The procedures defined in Sections 9.7
through 9.11 use the low-level operations to mark paths in the embedding structure G
that correspond to the vertices and edges in the five non-planarity minors. The final
step is to delete all unmarked vertices and edges, yielding in G a Kuratowski sub­
graph of G as the final result of the top-level procedure IsolateKuratowskiSubgraph
described in Section 9.12.
113

9.1 D ata Structure C ontext for C hoosing a N on-planarity


M inor
Immediately after the execution of procedure PlanarityTest, the embedding
structure G is in the non-planar embedding invariant state given by Definition 9.1.
To simplify a number of procedures, the first step of selecting a non-planarity minor
is to invoke procedure OrientVertices, which results in G having the oriented non-
planar embedding invariant state given in Definition 9.2. Also to sim pli^ a number of
procedures, the variables listed in Table 9.1 are added to the embedding structure and
used to store information relevant to selecting a non-planarity minor. Based in part on
setting these new variables. Definitions 9.4, 9.5, and 9.6 describe the states entered by
the augmented embedding structure during the non-planarity minor selection process.

D efinition 9.1 The embedding is in the non-planar embedding invariant state if it


in the embedding invariant state and it contains a root copy of v in a biconnected
component B on which a Condition 1 or 2 Walkdown termination occurred.

D efinition 9.2 The embedding is in the oriented non-planar embedding invariant


state if it in the non-planar embedding invariant state, there are no short-circuit
edges, and the sign of all edge records is 1.

D efinition 9.3 a;, y ond w /bom P.l, the potha ore d^ned.-

1. The RXW path is (he ertemol /dee po(h (W, . . . , T, . . . , w/, ezcfodm^ r ' ond
w (and their incident edges).

;8. The high RXW path is (he po(A con(oined hy (he RXW po(h 6e(ween ond ear-
eluding / ond a;.

The low RXW path is (he po(h eon(oined (he RXW po(h /rom a; (o to, ear-
eluding w.

The KYW path is (he ear(ernol /oee po(h (W, . . . , g, . . . , ui/, eareluding / ond
w ^ond (heir ineiden( edges/.
114

"Dsible 9.1: A ugm entation To Em bedding Structure for Storing Non-

V ariable D escrip tio n


G A reference to the input graph.
minorType Initially empty, but takes on the value A, B, C, D or E once
the characteristics of the corresponding non-planarity have
been found in the embedding.
r' The root copy of the biconnected component of central
interest in the non-planarity minor. It is the root copy
of V on which the Walkdown failed with Condition 2,
except for minor A, which requires thé root copy that is on
top of the stack when the Walkdown fails with Condition 1.
æ The stopping vertex that can be reached by traversing the
external face path from r ' that starts with the
edge indicated by link[0] in r ' .
y The stopping vertex that can be reached by traversing the
external face path from r ' that starts with the
edge indicated by link[l] in r ' .
w A pertinent vertex on the lower path between and excluding
X and y along the external face of the biconnected component
with root r ' .
Pz Initially nil, this variable is set for minors C, D, and E to
indicate the point of attachment along the external face path
(r', X, w) 0 Ï the highest x - y path.
P y Initially nil, this variable is set for minors C, D, and E to
indicate the point of attachment along the external face path
(r'j . . . , y, . . . , w) 0 Î the highest x - y path.
z Initially nil, this variable is set for minors D and E.
Note that z is not set for minors B and C because it is not
necessary to know z to determine that minor B or C has
occurred. For minor D, z indicates a vertex on the z-y path
distinct from px and Py that is the endpoint of a second
path p of the form ( r' , . . .,z), where all vertices
in the path (except r') are embedded inside the
biconnected component rooted by r'. For minor E, z
indicates an externally active vertex (distinct from p , and Py)
on the lower external face path (p,, . . . , w, . . . , p,).

J. 7%e high RYW path w (hg poth contomed 6;/ (he AYW po(h between and er-
cJndmp / ond p.

g. The low RYW path ie (he po(h con(o*ned hy (he AFW po(h p (o w, er-
115

cZuAng w.

D eSnition 9.4 TTie a(ruc(ure G ia m non-planarity minor initial state


ÿ *t ia in f/ie oriented embedding inooriont atote loitA tAe /bllotoin^ ezoq)tiona;

T%e ooriobZea G, z, %/ and w in G ore aet in tAe monner deacrikd in Tdtle


9.1.

;8. TAe norioAfea P^, ond z in G ore aet to nit.

9. 7%e ooriobte minorType in G ia empty.

TAe waited memtera o/ ott oerticea ond edpea ore egnot to 9.

5. Ezcept /o r / ond w, tAe type member o/ eocA oertez atmcture on tAe eztemot
/dee o/ tAe ^connected component witA root r ' ore mod^ed oa /bttotoa;

^o/ Verticea on tAe AiyA ÆY1V potA Aooe tAe type AiyA

(h) Vertices on the low R X W path have the type low RXW.

(c) Vertices on the high R Y W path have the type high RYW.

(d) Vertices on the low R Y W path have the type low RYW .

Note that all internal vertices in the biconnected component rooted by r' are
eoaity ident^obte Aeconae tAey receive no type deaiynotion ond ore not eyuot to
r ' or w.

D eûm tion 9.5 TAe embeddiny atmcfnre G ia in tAe non-planarity minorz-y path
found state i^ it ia in tAe non-ptonority minor initial atotewitA tAe/dttowiny ezcep-
tiona;

1. TTie viaited memAera o/vertez atmctnrea ond edye records atony tAe AiyAeat z-y
path are equal to 1 .

;8. TAe pointa o/ ottocAment o/ tAe AiyAeat z-y potA ore indicoted Ay tAe vorioAtea
Pz ond Py in G in tAe manner deacriAed in ToAte 9.1.
116

D efinition 9.6 77*e a(nicf«re G ia in f/ie non-planarity minor found state


ÿ it ia in tAe non-pfonority minor initiot atote witA tAe /oZtowinp ezceptiona;

1. 7%e iMiriobie minor7^/pe ia aet in tAe monner deacribed in Th6te P. j.

jg. jy minorType ia C, D or tAen G Ana tAe two erceptionot aettinpa tiated in


Definition 9.5.

^ minorType ia C, D or E, tAen z ia aet in tAe monner deacriAed in ToAfe

ly minorType ia D, tAen tAe waited memAera o/oerter atmctnrea ond edpe recorda
ore egoot to 1 otonp tAe intemot potA (r%. . . , z) deacriAed in TbAfe P I under
tAe entry /or z.

9.2 Low Level O perations for C hoosing a N on-planarity M i­


nor
This section presents an overview of several low level procedures used to help
select a non-planarity minor. The procedures are described in prose rather than by
pseudo-code since, by this point, the reader is assumed to be sufficiently familiar with
our data structures that these simple utility procedures should present no difficulties.
Note that when these procedures are called, the embedding structure G is passed
implicitly as the ‘this’ parameter (as defined in Section 3.1).
The procedure InitializeNonplanarityMinor Context receives the embedding struc­
ture G in the oriented non-planar embedding invariant state (Definition 9.2) as well
as the input graph G. The procedure transforms G to the non-planarity minor initial
state (Definition 9.4). Much of the defined state consists of trivial assignments and
assignment loops, except for setting r', x, y and w. To begin finding r', an unembed-
ded edge (u, z) is located by searching in G the vertices that, in G, are neighbors of u
to find a vertex z with an adjacentTo member equal to u. Then, we follow the DFS
tree ancestor path from z to a DFS child c of u, then obtain u' = c 4- n. Next, we
traverse the link[0] and link[l] edges leading from v' to obtain the first active vertices
a; and y along each path. If both a; and y are stopping vertices, then the desired
117

root r ' is equal to and the stopping vertices are the desired values for % and y.
On the other hand, if either a; or is not a stopping vertex, then the Walkdown
procedure terminated after descending to but without merging some pertinent child
biconnected component (see Condition 1 in Chapter 6). We invoke the Walkdown on
t/ to reconstruct the stack 5' of pertinent biconnected component roots that lead to
the Condition 1 failure of Walkdown. The desired root r ' is the root of the pertinent
child biconnected component in the topmost 2-tuple of integers on the stack S. The
link[0] and linkfl] external face paths from r' lead to the desired stopping vertices x
and %/. Once r', a; and have been identihed, the pertinent vertex tu if obtained using
a simple loop to search the lower external face path between (and excluding) x and

y-
The procedure receives the embedding structure G
in the non-planarity minor initial state (Definition 9.4). The procedure temporarily
deletes the edges incident to r' except the two edges incident to r' along the external
face. For each edge record e in the adjacency list of r' except the two indicated
by link[0] and ltnk[l] in r', this procedure performs the following actions. The edge
record e is pushed onto the stack S in G. The edge record e^m is obtained using the
twinLink in edge record e. A standard 0(1) doubly linked list delete is used to omit
e and from the adjacency lists containing them. However, the edge records e
and etmin are not removed from the edge record array E in ô , and the information
they contain is not altered.
The procedure Pop And Unmark VerticesAndEdges receives the embedding struc­
ture G in the non-planarity minor initial state (Definition 9.4) except for the effects of
procedure HidelntemalEdgesOfRoot described above and except for having the value
1 in the visited members of some vertex structures and edge records. Additionally,
the procedure receives a vertex s, and the stack S in G is assumed to contain zero
or more 2-tuples consisting of a vertex structure reference on top of an edge record
reference, under which are zero or more other edge record references not to be per­
turbed by this procedure (pushed by procedure HidelntemalEdgesOfRoot described
above). A simple loop is performed that terminates if the stack becomes empty, if
118

the top element of the stack refers to an edge record, or if vertex a appears on the top
of the stack. If none of the terminating conditions occurs, then the loop body pops a
vertex i then an edge record e, and it clears (assigns 0 to) the visited members of %,
e and the edge record obtained using the twinLink of e.
The procedure RestorelntemalEdgesOfRoot receives the embedding structure
G in the non-planarity minor x-y path found state (Definition 9.5), except for the
efiects of procedure HidelntemalEdgesOfRoot described above. While the stack is not
empty, the procedure pops an edge record e from the stack 5" in G, and it computes
Gtwin using the twinLink in e. Then, the link[0] and link[l] members of edge records
e and are used to reinsert them into their respective adjacency lists in 0(1)
time. This reverses the action of the procedure HidelntemalEdgesOfRoot, and puts
the embedding structure O in the non-planarity minor a;-y path found state.
The procedure FindExtActivityBelowXYPath receives the embedding stmcture
G in the non-planarity minor x-y path found state (Definition 9.5 with established
the points of attachment Px and py of an x-y path). The x-y path is assumed to be
a low x-y path. Along the lower external face path between and excluding and
Py (the path that excludes r'), the procedure searches for an externally active vertex
2 by invoking VertexActiveStatus (see Section 4.4) on each vertex. The vertex z is
returned, or nil is returned if there are no externally active vertices along the path
explored.

9.3 Identifying K ey P ath s w ith in a B icon n ected C om ponent


Non-planarity minors C, D and E in Figures 6.5, 6.6, and 6.7 include an x-y
path through the biconnected component B with the root / . Non-planarity minor D
also contains a path of vertices and edges from r ' to a vertex z along the x-y path;
other than r', the vertices and edges on this path are embedded internally within B.
This section covers two procedures for identifying these paths by setting the 'visited'
members of their representative vertex structures and edge records.
The procedure MarkHighestXYPath defined in Figure 9.1 receives the embed­
ding stmcture G in non-planarity minor initial state. The procedure MarkHighestXY-
119

Path uses the ‘visited’ member of vertices and edges in G to mark the highest x-y
path with points of attachment p , and Py. The procedure is not called unless an z-p
path is guaranteed to exist.
The correctness of procedure MarkHighestXYPath is established by Lemma 9.1.
The run-time analysis for procedure MarkHighestXYPath appears in Lemma 9.2.

L em m a 9.1 Gtneu on embedAnp structure G in the non-plonoritp minor initial atote


(D ^nition ond contoininp on r-p poth in the biconnected component rooted bp
r', the MorhHipheatXYPoth procedure trona/brma G to the non-plonoritp minor z-p
poth /ound atote ^ e ^ n itio n P. 5^.

P ro o f. Lines 1 and 2 temporarily remove all edges incident to r' except the two
along the external face, storing references to the removed edges on stack S. Thus, r'
becomes degree 2. The bounding walk of the resulting proper face containing r' cannot
contain the w candidate since this would violate the assumption that an x-y path is
known to exist in the biconnected component. This bounding walk is performed by
the loop in Lines 5 to 19. Portions of the bounding walk whose endpoints are both
on the RXW path are omitted from the x-y path by Lines 13 to 15 such that the
last visited vertex on the RXW path is the first vertex marked on the x-y path.
The first visited vertex py on the RYW path is the last vertex marked on the x-y
path since the loop terminates when Py is found. The edges and vertices marked
form an x-y path because portions of the bounding walk corresponding to separable
components are omitted from the x-y path by Line 11. Moreover, the assumption
that the x-y path obtained by this procedure is not the highest x-y path contradicts
the fact that the z-y path was obtained by traversing the bounding walk of the proper
face containing r'. Thus, since the loop marks the highest x-y path and identifies %,
Line 20 sets Py, and Lines 21 to 23 restore the internal edges of the desired state
given by Definition 9.5 is achieved. O

L em m a 9.2 The MortHiyhestXYPoth procedure rune in 0 (n ) time.


120

Figure 9.1: Marking the H ighest æ-y P ath

Procedure: MarkHighestXYPath
this: Embedding structure G in non-planarity minor initial state
out: Embedding structure G in non-planarity minor x-y path found state

1) Clear the stack 5


2) HidelntemalEdgesOfRoot 0

3) Set a equal to r'


4) Set e equal to the link[l] member of r'
5) while the type of s is neither ‘high RYW’ nor ‘low RYW’
6) Set e equal to link[l] of e
7) if e indicates a vertex structure
8) Set e equal link[l] of e
9) Set s equal to the neighbor member of e
10) Set e equal to the twinLink of e

11) if s has been visited, PopAndUnmarkVerticesAndEdges (a)


12) else
13) if the type of s is either ‘high RXW’ or ‘low RXW’
14) Set pz equal to a
15) PopAndUnmark VerticesAndEdges (ml)

16) Set visited member of s equal to 1


17) if 3
18) Assign 1 to the visited members of e and its twin edge record

19) Push e then s onto stack S

20) Set Py equal to a

21) while stack 5 is non-empty and the top element indicates a vertex
22) Pop the top two elements from stack S
23) RestorelntemalEdgesOfRoot ()
121

P ro o f. Line 1 is typically 0(1), Line 2 invokes procedure HidelntemalEdgesOfRoot,


which is 0(d) where d is the degree of r ' and is less than n. Lines 3 and 4 are con-
stant time assignments. Lines 5 to 19 form a loop with a constant amortized time
loop body (all operations are constant, except the Invocations of PopAndUnmarkVer­
ticesAndEdges, the cost of which can be associated with prior iterations of the loop
body). Thus, the loop is 0 (n ) since it iterates once per vertex on the bounding walk
of the proper face containing Line 20 is a constant time assignment. Lines 21 and
22 pop a stack whose length is commensurate with the length of the x-y path, which
is worst-case 0 (n ). Finally, Line 23 invokes RestorelntemalEdgesOfRoot, which is
0 (7 1 ) for the reason given above for Line 2. O

The procedure MarkVtoZPath defined in Figure 9.2 receives the embedding


stmcture G in the non-planarity minor z-y path found state in which the identified
z-y path is a low z-y path. The procedure searches for a path p of the form (r%. . . , z),
where all vertices (except r') are inside B and z is the only vertex in both p and in
the x-y path. If the desired path p is found, then the ‘visited’ members are marked
in the representative vertex structures and edge records of p, and the variable z in G
is set to a non-nil value.
The correctness of procedure MarkVtoZPath is established by Lemma 9.3. The
run-time analysis for procedure MarkVtoZPath appears in Lemma 9.4.

L em m a 9.3 Given an embedding structure G in the non-planarity minor x-y path


found state (Definition 9. 5) and containing a low x-y path in the biconnected compo­
nent B rooted by r', the MarkVtoZPath procedure returns with G in the same state
ezcep( (Aot, ÿ there ezists o path p = (r%. . . , z) with off nertices /ezcept inside
then z is recorded in G and the visited memhers 0 / the vertez structures and edye
records representiny p are set eyuot to f.

P ro o f. Since R is biconnected, it contains no cut vertices. However, the procedure


MarkHighestXYPath obtains the z-y path by first removing the intemal edges inci­
dent to / , which can result in cut vertices. When MarkHighestXYPath encounters
a vertex s already visited, it unmarks all vertices and edges visited since its last
122

Figure 9.2: Marking the P ath

Procedure: MarkVtoZPath
this: Embedding structure G in non-planarity minor path found state
with an identihed path that is a low path,
out: Embedding structure G in non-planarity minor path found state
except if the desired path p is found, then the visited members are assigned 1
in the vertex structures and edge records representing path p and the vertex
in both p and the x-y path is assigned into z in G

1) Let e be the edge record in the adjacency list of p , with visited member equal to 1
2) while the visited member of e is not equal to 0
3) Set equal to the twinLink of e
4) Set e equal to the link[l] member of ehwn
5) if e indicates a vertex structure, set e equal to the link[l] member of e

6) Set ehoim equal to the twinLink of e


7) Set s equal to the neighbor member of etwin
8) if g f Py
9) Set z equal to s
10) while s ^ r'
11) Set s equal to the neighbor member of e

12) Set the visited members of s, e and equal to 1

13) Set e equal to the link[l] member of etwin


14) if e indicates a vertex structure, set e equal to the link[l] member of e
15) Set etwin equal to the twinLink of e

encounter with s. Thus, if the link[l] successor edge of e was not marked during
the execution of MarkHighestXYPath, then s is either directly adjacent to r ' by em
intemal edge or s becomes a cut vertex when the internal edges incident to r' are
removed.
The MarkVtoZPath procedure traverses the a;-p path starting with the hrst
intemal vertex neighbor of pg. If a vertex a meeting the criterion above is found
before p, is encountered, then a is assigned to z in G because the start of the desired
path p has been found. The vertex structures and edge records representing p are
marked by simply repeating the traversal of the (possibly empty) portion of the walk
123

performed by MarkHighestXYPath immediately after it hrst encounters a. However,


since the intemal edges incident to r' have not been removed, the traversal proceeds
to r ' the hrst time it encounters a neighbor of r'.
Inversely, if there is no vertex a meeting the above criterion, then there exists no
desired path p. If in the sequence of vertices and edges of the path, the succeeding
edge of each intemal vertex is the link [1] successor edge of the vertex's preceding edge,
then the entire z-y path forms part of the bounding cycle of a single proper face that
also includes r'. By contradiction, a desired path p attaches to the z-y path at some
point z such that the preceding and succeeding edges of z along the z-y path appear
in two separate proper faces that also include r'. □

L em m a 9.4 The MurtFitoZPofA procedure runs m 0(Ti) (ime.

P ro o f. Line 1 contains an implied simple loop, which is 0 (n ) since it performs


constant work in the loop body and its iteration is limited by the degree of p,. Lines
2 to 5 traverse the z-y path, performing constant work per vertex and edge, for a
total worst case of 0 (n ). Lines 6 to 9 perform constant time operations. Lines 10 to
15 perform a loop that marks the vertices and edges of the desired path p. The loop
achieves 0 (n ) time since p is a path and the loop body contains only constant time
operations. □

9.4 C hoosing a N on-planarity M inor


The procedure ChooseTypeOfNonplanarityMinor defined in Figure 9.3 identi-
fies a non-planarity minor that can be used as the basis of isolating a Kuratowski
subgraph. This is accomplished by testing for the existence of the additional repre­
sentative stm cture in G beyond the subgraph and unembedded edges known to exist
by virtue of premature termination of the Walkdown procedure due to Condition 1
or 2 (see Chapter 6). The procedure selects a minorType of A, B, C, D or E de­
pending on whether it recognized the additional stm cture for the minor in Figure
6.3(a), Figure 6.4, Figure 6.5, Figure 6.6 or Figure 6.7, respectively. The subordinate
124

Figure 9.3: Choosing a N on-planarity Minor

Procedure: ChooseTypeOfNonplanarityMinor
this: Embedding structure G in the non-planar embedding invariant state
in: The input graph G
out: Embedding structure G in the non-planarity minor found state

1) Orient Vertices 0
2) InitializeNonplanarityMinorContext (G)

3) if r ' is not a root copy of f


4) Assign 'A' to minorType

5) else if the pertinentBicompList of w is not empty


6) Set w' equal to the value of the last element of pertinentBicompList of w
7) Set c equal to w'-n
8) if the lowpoint of c is less than v
9) Assign 'B' to minorType

10) if minorType has an empty value (was not assigned ‘A’ or ‘B’)
11) MarkHighestXYPath ()

12) if the type of or py is ‘high RXW’


13) Assign ‘C to minorType
14) else MarkVtoZPath 0
15) if z ^ nil, Assign ‘D’ to minorType
16) else Set z equal to the result of F indExtActivityBelowXYPath ()
17) Assign ‘E’ to minorType

procedures invoked by ChooseTypeOfNonplanarityMinor make other informational


modifications such that the embedding G is transformed to the non-planarity minor
found state.
The correctness of procedure ChooseTypeOfNonplanarityMinor is established
by Lemma 9.5. The run-time analysis for procedure ChooseTypeOfNonplanarityMi­
nor appears in Lemma 9.6.

L em m a 9.5 Gioen on input proph G /o r which the procedure ftonontpThst pro­


duced the emheddinp structure G in the non-ptonor em6 eddinp inuoriont atote (Dejh-
125

m(ion (Ae procedwre tmng/onTW G fo <Ae non-


ffononfy minor /oumj gfo(e ^ejRnifion

P ro o f. Lines 1 and 2 transform G to the non-planarity minor initial state (DeGnition


9.4), after which the test for minor A follows directly from Lemma 6.13. Line 5
determines whether w has a pertinent child biconnected component, and Lines 6 to 8
test whether it is externally active, in which case the choice of minor B follows from
Lemma 6.17. If neither minor A nor B were selected (Line 10), then the biconnected
component B with root r ' (a root copy of u) must contain an æ-y path according to
Theorem 6.23. By Lemma 9.1, the invocation of MarkHighestXYPath() in Line 13
transforms G to the non-planarity minor x-y path found state (Definition 9.5), after
which the test for minor C in Lines 12 and 13 follows directly from Lemma 6.18. If
the path is a low z-y path, then execution proceeds to Lines 14 and 15. If the
procedure MarkVtoZPath marks the vertex structures and edge records of an intemal
path p and obtains the vertex z common to p and the z-y path as described in Lemma
9.3, then the selection of minor D is appropriate according to Lemma 6.19. On the
other hand, if p is not found by the procedure MarkVtoZPath, then Theorem 6.23
guarantees that there is an externally active vertex z distinct from px and Py on the
external face path (p^, . . . , w, . . . , Py). The vertex z is obtained on Line 16 such that
the selection of minor E is appropriate according to Lemma 6.20. Thus, in all cases,
G enters the non-planarity minor found state. □

L em m a 9.6 The GAooae7)/peO/!Vonp/omonfyMmor procedure runs in 0 (n ) (ime.

Fhroof. All operations are constant time except the procedure invocations. Each pro­
cedure is invoked once. OrientVertices is 0 (n ) by Lemma 8.2. MarkHighestXYPath
and MarkVtoZPath are each 0 (n ) by Lemmas 9.2 and 9.4. The remaining low-level
procedures contain simple 0 (n ) loops. O
126

9.6 D ata Structure C ontext for Isolating a K uratowski Sub­


graph
Immediately after the execution of procedure ChooseiypeOfNonplanarityMi-
nor, the embedding structure G is in the non-planarity minor found state given by
Dehnition 9.6. To simplify a number of procedures, the variables listed in Table 9.2
are added to the embedding structure and used to store information relevant to isolat­
ing a Kuratowski subgraph. Based in part on setting these new variables, Dehnitions
9.7, 9.8 and 9.9 describe the states entered by the augmented embedding structure
during the Kuratowski subgraph isolation process.

DeÛnition 9.7 The emheddmg' sfrucfure G w m ^he isolator initial state ÿ w


the non-planarity minor found state with the exception that the additional variables
Ug, dz, Uy, dy, dw, « 2 , and d^ one added (o G and aet in the manner deacriAed in
Table 9.2.

D efinition 9.8 The embedding structure G is in the isolation in progress state if it


is in the isolator initial state except that zero or more additional vertex structures and
edge records have a visited member set to 1.

D efinition 9.9 The embedding structure G is in the Kuratowski subgraph marked


state ^ it repreaenta a anAgraph o/ G naing only parent copy uertez atmctnrea and
edge recorda, and ^ the auApraph o/ G conaiatinp onZp o/ oertez atructnrea and edge
recorda toith a waited memAer egnaZ to ^ /orma a ^ 3 ,3 or homeomorph.

9.6 M ore Low Level O perations for Isolating K uratowski Sub­


graphs
This section presents an overview of several more low level procedures required
by the Kuratowski subgraph isolator. As in Section 9.2, the procedures are described
in prose rather than ly pseudo-code. Note that when these procedures are called, G
is passed implicitly as the ‘this’ parameter (as defined in Section 3.1).
127

T able 9.2: A u g m e n ta tio n To E m b ed d in g S tru c tu re for S toring K uratow ski


S u b g rap h Isolation C o n te x t

V ariable D escription
The endpoints of a back edge in G, not in G, and represented by
the edge (u, a;) in the non-planarity minors. E the leastAncestor of a;
is less than u, then Ug is equal to the leastAncestor of a;, and dg
is equal to a;. Otherwise, equals the lowpoint of the first child c
in the separatedDFSChUdList of z, and is computed by obtaining the
neighbor of Uz in G with the least DFI greater than or equal to c
(such that d x is in the DFS subtree rooted by c). In this case, (u,x)
represents the back edge {ux, d x ) plus the DFS tree path from d% to x.
The endpoints of a back edge in G, not in G, and represented by the
edge (u, y) in the non-planarity minors. The values of Uy and dy are
computed using y in the same manner as U x and d^ are computed
using z,
duu The descendant endpoint of the back edge (u, du,) in G, not in G,
and represented by the edge (u, w) in the non-planarity minors.
E the adjacentTo member of w equals n and the minorType is not B,
then dyj equals w. Otherwise, is computed by obtaining the
root w' of the last pertinent child biconnected component of w,
calculating c = w' — n, then obtaining the neighbor of n in G
with the least DFI greater than or equal to c (such that dw
is in the DFS subtree rooted by c). Note that w' could be the
root of any pertinent child biconnected component, except that
the biconnected component must be externally active for minor B.
Ug:, d z These are nil unless minorType is B or E. For minor B, is equal
to the lowpoint of the same vertex c used to help obtain d^,, and d ^
is computed by obtaining the neighbor of U z in G with the least DFI
greater than or equal to c. For minor E, the values of and dg are
computed using z in the same manner as U x and d x are computed
using z.

The procedure receives the embedding structure C in


the non-planarity minor found state (Definition 9.6) and transforms G to the isolator
initial state (Definition 9.7). This involves obtaining values for the additional variables
in Table 9.2, which also describes the methods for computing these values.
The procedure MorAf receives the embedding structure
G in the isolation in progress state and two vertices s and t, both on the external
face of the biconnected component B rooted by the vertex r'. Vertex s can be any
128

vertex on the RXW path or and t can be any vertex on the RYW path or The
procedure begins with vertex a, proceeds around the RXW path to w, then from tu
along the RYW path to t. All vertices and edges encountered are marked by setting
the 'visited' members of all the representative vertex structures and edge records
equal to 1. Thus, if a and f are equal to r' then all of the vertices and edges on the
external face of are marked. Also, if r' is marked by this procedure, then the parent
copy of r ' is not marked because it will be marked in minor A when the DFS tree
path from r to v and in all other minors when the edge {v, d j) is embedded.
The procedure afh receives the embedding structure G in the isola­
tion in progress state, a vertex o and a vertex d, which is a descendant of a. If d is a
root copy, then set d equal to the vertex indicated by its parentLink. This procedure
assigns 1 to the 'visited' members of the vertex structures and edge records along the
DFS tree path from d to a, jumping from root copy to parent copy as necessary. First,
the visited member in the parent copy of d is set equal to 1. Then, the procedure uses
a simple loop whose body obtains from the adjacency list of d the tree edge indicating
a root copy or parent copy of the DFSParent p of d. The visited members are set
equal to 1 in the edge records of the tree edge and the vertex structure for the parent
copy of p (it is unnecessary to mark root copies, which will be eliminated in the final
result).
The procedure MarkDFSPathsToDescendants receives the embedding structure
G in the isolation in progress state. For each of the unembedded edges {ux, dx),
(uy, dy), and (u, w) as well as the edge (%, d%) if d^ is non-nil, this procedure invokes
the procedure MarkDFSPath to mark the corresponding tree path (æ, . . . , d%), (y,
. .., dg), and (tu, . . . , d^,) as well as (tu, . . . , d^) if d% is non-mZ. Note t h # d^ is only
non-nil for minors B and E, and z is an unidentified descendant of tu in minor B while
tu = z for the cases in minor E where the path (tu,. . . , d,) must be marked (hence, we
use w instead of z as the ancestor in the path to be marked). For each invocation of
MarkDFSPath, the parameter a is assigned the ancestor endpoint of the given path,
and d is assigned the descendant. This procedure accounts for the fact that an edge
in a non-planarity minor may be representative of a DFS tree path plus a back edge.
129

Figure 9.4: Isolating Minor A

Procedure; IsolateMinorA
this: Embedding structure G in the isolator initial state with minorType of A
out: Embedding structure G in the Kuratowski subgraph marked state

(1) MarkPathAlongBicompElxtFace(r', r')


(2) MarkDFSPath(min , Uy), / )
(3) MaikDFSPathsToDescendantsO
(4) JoinBicomps()
(5) AddAndMarkUnembeddedEdges()

For example, the edge (u, a;) in a non-planarity minor may represent a direct back
edge from a; to an ancestor of u, or there may be a back edge to an ancestor of u from
a descendant dg of z in another biconnected component.
The procedure AddAndMorAf7»em6eddedEd^es receives the embedding struc­
ture in the Kuratowski subgraph marked state except that it is missing the edges
(ug, dg); (%, dy), and (u, d^,) as well as the edge (u^, d^) if is non-mZ. For each of
these missing edges, the procedure adds the two edge records that represent the edge
to the adjacency lists of the vertex structures representing the respective endpoints.
The procedure also increments m, and it assigns 1 to the visited members of the edge
records and the endpoint vertex structures of each edge it adds. As a result, G enters
the Kuratowski subgraph marked state.

9.T Isolating M inor A


The procedure IsolateMinorA defined in Figure 9.4 processes the embedding
structure G according to non-planarity minor A appearing in Figure 6.3(a). As a
result, G contains a subgraph of the input graph G that is homeomorphic to Kg,3 .
The correctness of procedure IsolateMinorA is established by Lemma 9.7. The
run-time analysis for procedure IsolateMinorA appears in Lemma 9.8.

L em m a 9.7 Giuen sfT-ucZure G m (Ae isoZoZor inZfZoZ sW e taiZA m%-


nor7)/pe eguaZ Zo A, Zhe laoZoZeAfworA procedure Z ruu^rm s G Zo Zhe KuruZouwAd
130

aubgropA m ortel afoÿe.

P ro o f. The invocation of MarkPathAlongBicompExtPace in Line 1 assigns a 1 to


the visited members of vertex structures and edge records in the external face cycle
corresponding to the cycle (r, . . . , z, . . . , w, . . . , y, . . . , r) in minor A, except the
parent copy of r, which is marked in Line 2. The invocation of MarkDFSPath in
Line 2 assigns a 1 to the visited members of vertex structures and edge records in
the DFS tree path corresponding to the path (u, v, r) in minor A. Between
the addition and marking of back edges (ug;dg), (%,dy), and (u,du,) in Line 5, and
the marking in Line 3 of the DFS tree paths connecting to x, dy to y and dy, to
w, the paths in G corresponding to the edges {u, x), {u, y), and (v, w) are marked.
The invocation of JoinBicomps in Line 4 completes the correspondence with minor
A such that a subgraph of G homeomorphic to has been marked in G. O

L em m a 9.8 The IsolateMinorA procedure runs in 0(n) time.

P ro o f. The procedures MarkPathAlongBicompExtFace, MarkDFSPath, and MarkDF-


SPathsToDescendants are simple, low-level procedures that clearly achieve 0{n) in
the worst case. The procedure JoinBicomps is G(n) by Lemma 4.21. The AddAnd-
MarkUnembeddedEdges procedure is constant time. All procedures are invoked a
constant number of times. □

9.8 Isolating M inor B


The procedure IsolateMinorB defined in Figure 9.5 processes the embedding
structure G according to non-planarity minor B appearing in Figure 6.4. As a result
of the processing, G contains a subgraph of the input graph G that is homeomorphic
to
The correctness of procedure IsolateMinorB is established by Lemma 9.9. The
run-time analysis for procedure IsolateMinorB appears in Lemma 9.10.
131

Figure 9.5: Isolating M inor B

Procedure: IsolateMinorB
this: Embedding structure G in the isolator initial state with minorType of B
out: Embedding structure (7 in the Kuratowski subgraph marked state

(1 ) MarkPathAlongBicompExtFace , r')
(2) MarkDFSPath (min (ug, «,), max(ua., Ug, «,))
(3) MarkDFSPathsToDescendantsO
(4) JoinBicomps()
(5) AddAndMarkUnembeddedEdges()

L en u n a 9.9 Git/en the emheddin^ atmcture G in the iaoWor initiai state with mi-
nor 2 );ye eguai to the JsoiateAfinorB procedure trans/brms G to the Kuratowshi
subgraph marked state.

P ro o f. The proof is the same as in Lemma 9.7 except as follows. Firstly, there are
as many as three ancestors of v involved in minor B, corresponding to the external
activity of x, y and z. Thus, the DFS tree path in G that corresponds to vertex u in
minor B extends from the maximum DFI to the minimum DFI of the three ancestors,
which is marked in Line 2. Secondly, though vertices u and v in minor B are required
to form a the edge (u, v) in minor B is not required. Thus, the vertices and
edges are not marked in the corresponding DFS tree path in G from v to the ancestor
of maximum DFI associated with u in minor B (except, of course, that the endpoints
of that path are marked by Lines 2 and 5). Thirdly, minor B contains an extra vertex
z as well as the edges (w, z) and (u, z) that do not appear in minor A but which are
isolated by the same methods as those used to isolate the path (u,, . . . , d,, . . . , a:).
Finally, since / is a root copy of u, the invocation of MarkPathAlongBicompExtFace
marks the cycle in G corresponding to the cycle (u, . . . , a;, . . . , w, . . . , p, . . . , u)
in minor B, except the parent copy of u, which is marked when the edge (u, dg,) is
added. Thus, a correspondence has been made with the portion of minor B necessary
to mark in G a subgraph of G homeomorphic to Kg,3 . O

L em m a 9.10 The faoWeAfiuorB procedure rune m 0 (n ) time.


132

Figure 9.6: Isolating Minor C

Procedure: IsolateMinorC
this: Embedding structure G in the isolator initial state with minorType of C
out: Embedding structure G in the Kuratowski subgraph marked state

(1 ) if the type of Pr is 'high RXW


(2) if the type of Py is 'low RYW , p , f - p
(3) MarkPathAlongBicompExtFace (r', Py)
(4) else MarkPathAlongBicompExtFace(a;, r')

(5) MarkDFSPath(min(uz, Uy), / )


(6 ) MarkDFSPathsToDescendantsO

(7) JoinBicompsQ
(8 ) AddAndMarkUnembeddedEdgesQ

P ro o f. Same arguments as in Lemma 9.8. □

9.9 Isolating M inor C


The procedure IsolateMinorC defined in Figure 9.6 processes the embedding
structure G according to non-planarity minor C appearing in Figure 6.5. As a result,
G contains a subgraph of the input graph G that is homeomorphic to K 3 3 .
The correctness of procedure IsolateMinorC is established by Lemma 9.11. The
run-time analysis for procedure IsolateMinorC appears in Lemma 9.12.

L em m a 9.11 Given the embedding structure G in the isolator initial state with mi­
norType equal to C, the IsolateMinorC procedure transforms G to the Kuratowski
sutpmph mor&ed

P ro o f. The proof is the same as in Lemma 9.7 except as follows. Firstly, according to
Lemma 9.5, the T-p path in G represented in minor C by the edge (p, z) was previously
marked for isolation by the procedure ChooseTypeOfNonplanarityMinor. Secondly,
since / is a root copy of u, the invocation of MarkDFSPath only marks in G the path
corresponding to the edge (u,r) in minor C. Thirdly, also because / is a root copy
133

of ü, the invocation of MarkPathAlongBicompExtFace operates on the edge records


and vertex structures representing the cycle (u, T, tu, u) in minor
C. Fourthly, the external face path in G corresponding to the edge (u, in minor C
is hot required to form the Kuratowski subgraph. Furthermore, the interpretation of
edge {v, y) in minor C is dependent on the input graph G, and more specifically on
the point of attachment Py of the z-p path. If is high (i.e. attached between u and
p), then only the path between u and py is omitted (except of course the endpoints),
rather than omitting the full path along the external face between v and y is omitted
(except the endpoints). Note, however, that minor C is representative of a symmetric
case in which px is not a high point of attachment for the x-y path (as is depicted
by vertex z in Figure 6.5). In this case, py must be a high point of attachment since,
according to Lemma 9.5, the procedure ChooseTypeOfNonplanarityMinor identified
minor C due to a high point of attachment for the x-y path. This case is symmetric
with the case of having a high point of attachment Px and low point of attachment
Py, which can be seen by swapping the labels for x and y then flipping the minor
C depicted in Figure 6.5. When this case occurs, the procedure exploits the fact
that inverting the graph G to match minor C is not necessary because the procedure
operates correctly in the symmetric case except for the need to omit the external face
path between u and z (rather than r and p). Moreover, there is no need to perform
an action symmetric with Line 2 since this symmetric case occurs only when px is
attached low. Thus, a correspondence has been made with the portion of minor C
necessary to mark in G a subgraph of G homeomorphic to Kg 3 . □

L em m a 9.12 The LsokteMmorC procedure runs m 0 (» ) time.

P roof. Same arguments as in Lemma 9.8, except for a few additional constant time
operations in Lines 1 to 4. □

9.10 Isolating M inor D


The procedure IsolateMinorD defined in Figure 9.7 processes the embedding
structure G according to non-planarity minor D appearing in Figure 6 .6 . As a result.
134

Figure 9.7: Isolating Minor D

Procedure: IsolateMinorD
this: Embedding stmcture G in the isolator initial state with minorType of D
out: Embedding stmcture G in the Kuratowski subgraph marked state

(1) MarkPathAlongBicompExtFace (3 ;, y)
(2) MarkDFSPath(min(w 2 , Uy), / )
(3) MarkDFSPathsToDescendantsO
(4) JoinBicompsQ
(5) AddAndMarkUnembeddedEdgesQ

G contains a subgraph of the input graph G that is homeomorphic to K 3 3 .


The correctness of procedure IsolateMinorD is established by Lemma 9.13. The
run-time analysis for procedure IsolateMinorD appears in Lemma 9.14.

L em m a 9.13 Given the embedding structure G in the isolator initial state with mi­
norType equal to D, the IsolateMinorD procedure transforms G to the Kuratowski
subgraph marked state.

P ro o f. The proof is the same as in Lemma 9.7 except as follows. Firstly, according
to Lemma 9.5, the paths in G corresponding to the edges (x, y) and (u, z) in minor
D were previously marked for isolation by the procedure ChooseTypeOfNonplanari­
tyMinor. Secondly, since r' is a root copy of v, the invocation of MarkDFSPath only
marks in G the path corresponding to the edge (u, v) in minor D. Thirdly, though the
vertices u, x and y in minor D are required to form a ^ 3 ,3 , the edges (n, x) and (r, y)
in minor D are not required. Thus, the parameters to MarkPathAlongBicompExtFace
are adjusted so that the vertices and edges are not marked along the corresponding
external face paths in G from u to x and u to %/ (though x Emd y are marked by
MarkPathAlongBicompExtFace, and v is marked in Line 2 ). Finally, since the proce­
dure ChooseTypeOfNonplanarityMinor only selects minor D if the test for minor C
fails, the points of attachment for the x-ÿ path must be low and therefore connect to
the portion of the external face marked by MarkPathAlongBicompExtFace. Thus, a
correspondence has been made with the portion of minor D necessary to mark in G
135

a subgraph of G homeomorphic to A^,3 - O

L em m a 9.14 The JaoWeAfinorD procedure rurw m 0 (7%) time.

P ro o f. Same arguments as in Lemma 9.8. O

9.11 Isolating M inor E


Isolating a Kuratowski subgraph from minor E is more challenging than it is for
the other minors because minor E is a Kg minor, which can result in either a or
homeomorph. The procedure IsolateMinorE, which appears at the end of this section,
performs various tests to determine which of five more isolators to invoke. These
additional isolators are discussed in the subsections below. They exploit additional
structure in the input graph G and embedding structure G that is edge contracted
into the vertices of minor E. Four of the isolators are K 3 3 homeomorph isolators, and
the last is a homeomorph isolator.

9.11.1 Isolating M inor E%


The procedure IsolateMinorEx defined in Figure 9.9 processes the embedding
structure G according to the non-planarity minor appearing in Figure 9.8, which is
derived from non-planarity minor E appearing in Figure 6.7 by assuming that the
externally active vertex along the external face path (pg,. . . , tu,.. .p^) is some vertex
z other than the w candidate. As a result of processing by this procedure, G contains
a subgraph of the input graph G that is homeomorphic to The processing
consists of a straightforward reduction to minor C, as depicted in Figure 9.8.
The correctness of procedure IsolateMinorEx is established by Lemma 9.15. The
run-time analysis for procedure IsolateMinorEx appears in Lemma 9.16.

L em m a 9.15 Cine» (Ae sfructure G m (Ae isoWor mi-


eguol to Æ' ond w ^ z, the LsoIoteMinorEi procedure tro n ^ n n a G to the
A^urotowahi au&yroph niorhed atote.
136

.w . .w .

Figure 9.8: Minor Ei R educes to M inor C

Figure 9.9: Isolating Minor Ei

Procedure: IsolateMinorEi
this: Embedding structure G in the isolator initial state with minorType of E
and w ^ z.
out: Embedding structure G in the Kuratowski subgraph marked state

(1) if the type of z is ‘low RXW’


(2) Set type along RXW path (pz, .. z), excluding z, to ‘high RXW'
(3) (x, Uj;, dx) i (z, dz)
(4) else Set type along RYW path ., z), excluding z, to ‘high RYW'
(5) (p, Uy, dy) f - (z, dg)
(6) (z, dz) f - (m f, mZ, mZ)
(7) minorType 4- ‘C’
(8 ) IsolateMinorC 0

P roof. Due to the applicability of minor E to G, the input requirements of proce­


dure IsolateMinorC are met except that the x-y path does not have a high point of
attachment. However, since z is externally active, it meets the requirement of the
procedure IsolateMinorC on stopping vertices x and y. Moreover, z appears along
the external face path (p^, . . . , w, . . . , py), excluding p,, and py. If z appears on the
RXW path, then it can be substituted for z in minor C if the RXW path vertex types
are changed such that p% becomes a high point of attadunent. Otherwise, z appears
on the RYW path and can be substituted for p in minor C if the RYW path vertex
types are changed such that py becomes a high point of attachment. Since the z-p
137

w /ï [W:

F igure 9.10: M in o r Eg R educes to M inor A

path has been changed to a high x-y path by substituting z for a stopping vertex,
changing the minorType to C is sufficient according to Lemma 9.11 to guarantee that
the procedure IsolateMinorC marks a homeomorph in G. O

L em m a 9.16 The LsoWeMmorEi procedure runs in 0 (n ) time.

P ro o f. All operations are constant time except the 0{n) path traversal loops in Lines
2 and 4 and the invocation of IsolateMinorC, which is 0{n) by Lemma 9.12. □

9.11.2 Iso latin g M inor Eg


The procedure IsolateMmorEg defined in Figure 9.11 processes the embedding
structure G according to the non-planarity minor appearing in Figure 9.10, which is
derived from non-planarity minor E appearing in Figure 6.7 as follows. We assume
that the w candidate is also the externally active vertex z and that is a descendant
of both Ug and tiy. As a result of processing by this procedure, G contains a subgraph
of the input graph G that is homeomorphic to The processing consists of a
straightforward reduction to minor A.
The correctness of procedure IsolateMinorEg is established by Lemma 9.17. The
run-time analysis for procedure IsolateMinorElg appears in Lemma 9.18.
138

Figure 9.11: Isolating Minor

Procedure: IsolateMinorEg
this: Embedding structure G in the isolator initial state with minorType of E,
w equal to z, and Ug a descendant of Ug and Up
out: Embedding structure G in the Kuratowski subgraph marked state

(1) Assign 0 to 'visited' members of all vertex structures and edge records
(2 ) Set in G equal to
(3) dyj f - dg;
(4) (z, Ug; dz) f - (ml, ml, ml)
(5) minorType f - 'A'
(6 ) IsolateMinm-A ()

L em m a 9.17 Giuen <he structure G in the isolotor initiol stute unth mi-
norT^pe eguol to E, w = z ond u , o descendont o/ u , ond u^, the IsoloteMinorEg
procedure trom/orms G to the Eurotowshi sui^roph morhed atote.

P ro o f. Due to the applicability of minor E to G, the input requirements of procedure


IsolateMinorA are met except minor A has no x-y path and, in minor A, vertex v is
an ancestor of r'. In Line 1, the marked x-y path is unmarked. Furthermore, since
Uz is a descendant of Ux and %, and since w connects to Uz by a back edge to Uz plus
zero or more tree edges from dg to m, it is possible to substitute Uz for v as long as the
edge &bm Ug to dg is appropriately represented by assigning dg to d^. Note that the
external activity status of x and y is unchanged by this substitution because Ux and
Uy are ancestors of Ug. Thus, changing the minorType to A is suS dent according to
Lemma 9.7 to guarantee that the procedure IsolateMinorA marks a ^ homeomorph
in G. □

L em m a 9.18 Z8 oWeAfmor% procédure runs G(u) time.

P ro o f. All operations are constant time except Line 1, which contains an implied
G(u) loop, and the invocation of IsolateMinorA, which is G(u) by Lemma 9.8. O
139

F ig u re 9.12: M inor Eg (w ith Uy a d escen d an t o f n , an d

9.11.3 Iso la tin g M in o r Eg


The procedure IsolateMinorEg deGned in Figure 9.13 processes the embedding
structure G according to the non-planarity minor appearing in Figure 9.12, which is
derived from non-planarity minor E appearing in Figure 6.7 as follows. We assume
that the w candidate is also the externally active vertex z, that Uz is an ancestor of
at least one of Ug and and that does not equal tty. As a result of processing by
this procedure, G contains a subgraph of the input graph G that is homeomorphic to
AT3,3-
Note that minor Eg as depicted in Figure 9.12 does not require the edges {x, w)
and (y, v) to form a Kg g. Moreover, while Figure 9.12 depicts as an ancestor of Uy,
there is a symmetric case in which tty is an ancestor of tt^. Finally, the pseudo-code
must account for the fact that the points of attachment px and Py of the x-y path
have been edge contracted into x and y in minor Eg.
The correctness of procedure IsolateMinorEg is established by Lemma 9.19. The
run-time analysis for procedure IsolateMinorEg appears in Lemma 9.20.

Lemma 9.19 G*t;en (he embeddmy afruchtre G m (he wofotor aWe tutfh mt-
norT^/pe egttof (o E, to = z, tt^ ^ tty, ond tt, on oncea(or o/ o( Zeoa( one o/ tt, ond tty,
(he faoWeAfinorEg pmcedttre (ndna/brma G (o (he hritm(ott7ahi atthgmph morhed a(o(e.

P ro o f. With respect to marking the edges and vertices along paths in G that cor­
respond to the edges (tt^g, z), (tty, y), and (t;, to) in minor Eg, the proof is the same
140

Figure 9.13: Isolating Minor Eg

Procedure: IsolateMinorEg
this: Embedding structure G in the isolator Initial state with minorType of E,
w = z, Wg ^ Uy, and an ancestor of at least one of u , and Uy
out: Bhnbedding structure G in the Kuratowski subgraph marked state

( 1 ) i f Ug < Uy
(2) MarkPathAlongBicompExtFace(r^, p,)
(3) MarkPathAlongBicompExtFace (w, p)
(4) else MarkPathAlongBicompExtFace(r, w)
(5) MarkPathAlongBicompExtFace^y, r')

(6 ) MarkDFSPath(min(uz, Uy, u%), r')


(7) MarkDFSPathsToDescendants()
(8 ) JoioBicompsO
(9) AddAndMarkUnembeddedEldges()

as for the edges {u, x), (u, y), and (v, w) in Lemma 9.7. Likewise, the path in G
corresponding to the edge (uxz, w) is isolated by exploiting the same methods as those
used to mark the path in G corresponding to the path {uxz, ■■ dx, ■■-, x) in minor
Eg. According to Lemma 9.5, the x-y path in G represented in minor Eg by the edge
(x, y) was previously marked for isolation by the procedure ChooseTypeOfNonpla-
narityMinor.
There are a number of variations on the depiction of minor Eg in Figure 9.12. A
symmetric case occurs when Ux is the descendant of Uy and (which, for the purpose
of depiction, would be contracted to Uy^). Moreover, Ux and % (or Uy and % in the
symmetric case) need not be equivalent. With respect to marking the edges and
vertices along paths in G that correspond to edges («M, Uy) and (uy, u) depicted in
Figure 9.12, all variations and symmetric cases are accounted for by simply marking
the DFS path from v up to the minimum of the ancestors Ux, Uy, and u^, which occurs
in Line 6 .
All of the vertices and edges corresponding to minor Eg have been discussed
except for the cycle (u, . . . , z, . . . , w, . . . , y, . . . , u), which corresponds in G to the
external face cycle of the biconnected component B rooted by / (except that u, the
141

parent copy of r', is marked when the edge (v, dg,) is added). When n , ia the ancestor
of Uy, the portions of the input graph corresponding to the edges (z, w) and (%/, n)
in Figure 9.12 are not required to form the A 3 , 3 homeomorph. In the symmetric case
in which Uy is the ancestor of the portions of the input graph corresponding to
edges (2/, w) and (z, u) are not required. The procedure accounts for these two cases
in Lines 1 to 5. Moreover, the procedure accounts for the fact that the points of
attachment p„ and of the z-p path are edge contracted into z and y in minor E3.
When marking the path in G corresponding to edge (v, x), it extends the marking to
Pz in Line 2 in order to connect to the z-p path. Similarly, if Py is between w and p
such that pg becomes one of the degree three vertices in the A 3 , 3 homeomoqph. Line
3 still marks the path in G from w to p since the connection must be made from p^
to Up. Symmetric arguments hold when Up is the ancestor of u^. The invocation of
JoinBicomps in Line 8 completes the correspondence with the portion of minor Eg
necessary to mark in G a subgraph of G homeomorphic to A 3 ,3 . □

L em m a 9.20 The IsolateMinorEg procedure runs in 0(n) time.

P roof. Same arguments as in Lemma 9.8, except for a few extra constant time
operations. □

9.11.4 Isolating M inor E 4


The procedure IsolateMinorEg dehned in Figure 9.15 processes the embedding
structure G according to the non-planarity minor appearing in Figure 9.14, which is
derived from non-planarity minor E appearing in Figure 6.7 as follows. We assume
that the u) candidate is also the externally active vertex z and that two of Ug, Up emd
u„ are equal and not ancestors of the third. Moreover, given the points of attachment
Pz and pp of the z-p path, we assume that at least one of the points of attachment is
not equal to the corresponding stopping vertex (i.e., at least one of p^ ^ z or pp p
holds). As a result of processing by this procedure, G contains a subgraph of the
input graph G that is homeomorphic to Ag,3 .
142

Figure 9.14: M inor E 4 w ith p , not equal to a;

Figure 9.1$: Isolating Minor E 4

Procedure; IsolateMinorE4
this: Embedding structure G in the isolator initial state with minorType of E,
w = z, at least two of Uy and Ug are equal and not ancestors of
the third, and Px ^ x ov Py ^ y (or both),
out: Embedding structure G in the Kuratowski subgraph marked state

(1) ifpz # %
(2) MarkPathAlongBicompExtFace(r', w)
(3) MarkPathAlongBicompExtFace(Pÿ, r')
(4) else MarkPathAlongBicompExtFace(r', Px)
(5) MarkPathAlongBicompExtFace(w, r')

(6 ) MarkDF5Path(min(ug, Uy, «,), max(ug, Uy, Ug))


(7) MarkDFSPathsToDescendants()
(8 ) JoinBicomps()
(9) AddAndMarkUnembeddedEdges()

Note that minor E 4 as depicted in Figure 9.14 does not require the edges {u,
%;) and (w, y) to form a Kg,3 . Moreover, while Figure 9.14 depicts pz distinct horn i
(and Py can be equal to or distinct from p), there is a symmetric case in which p^ is
equal to x and therefore py must be distinct from y.
The correctness of procedure IsolateMinorE 4 is established by Lemma 9.21. The
run-time analysis for procedure IsolateMinorE 4 appears in Lemma 9.22.

Lemma 9.21 Gmen (he emheddmp s(ruc(«re G m (he isoWor m;(W a(o(e w*(h mi-
143

egiioZ (o E, w = z, (wo o/^z, % omf w* ore egooZ o» j no( onceatora


o/(Ae (AW, onjpz ^ z orpy y ^or 6 o(Aj, (Ae ZeoWeMmorAZ^ procedure (roua/orma
G (o (Ae ATuro(owaAx aubgropA ntorAed a(o(e.

P ro o f. With respect to marking the edges and vertices along paths in G that corre­
spond to the edges (u, z), (u, p), and (u, w) in minor E4 , the proof is the same as in
Lemma 9.7. Likewise, the path in G corresponding to the edge (u, w) is isolated by
the same methods as those used to isolate the path (u„ . . . , dg, . . . , z). The path in
G represented by vertex u is marked by the invocation of MarkDFSPath in Line 6 .
Note that the path in G corresponding to the edge (u, u), excluding endpoints, is not
marked because the edge is not needed to form a in minor E 4 (except the end-
points, which are marked by other operations in Lines 7 and 9). As for the z-p path
in G represented in minor E 4 by the edge (p^, p). Lemma 9.5 stipulates that it was
previously marked for isolation by the procedure ChooseTypeOfNonplanarityMinor.
All of the vertices and edges corresponding to minor E 4 have been discussed
except for the cycle {v, . . . , x, . . . , w, . . . , y, . . . , v), which corresponds in G to the
external face cycle of the biconnected component B rooted by r' (except that v, the
parent copy of r', is marked when the edge {v, d^) is added). If p , is not equal to
z, then the edge (w, p) in minor E 4 is not required to form a so Lines 2 and 3
mark the external face of B except the path from w to py (though the endpoints are
marked later). If Px equals z, but Py does not equal p, then symmetric operations
are applied in Lines 4 and 5. The invocation of JoinBicomps in Line 8 completes the
correspondence with the portion of minor E4 necessary to mark in G a subgraph of
G homeomorphic to ^ 3 ,3 . O

L em m a 9.22 TAe procedure runs in G(n) (*me.

P ro o f. Same arguments as in Lemma 9.8, except for a few extra constant time
operations. O
144

Figure 9.16: Isolating M inor Eg

Procedure: IsolateMinorEg
this: Embedding structure G in the isolator initial state with minorType of E,
w = z, pg = a;, Py = P; and at least two of Uy and are
equal and not ancestors of the third.
out: Embedding structure G in the Kuratowski subgraph marked state

(1 ) MarkPathAlongBicompExtFace (r', r')


(2) MarkDFSPath(min(na;, Uy, «,), / )
(3) MarkDFSPathsToDescendants()
(4) JoinBicomps()
(5) AddAndMarkUnembeddedEdges()

9.11.5 Iso latin g M inor Eg


The procedure IsolateMinorEg defined in Figure 9.16 processes the embedding
structure G according to the non-planarity minor E appearing in Figure 6.7. We
assume that the w candidate is also the externally active vertex z, that at least
two of Ux, Uy and u^ are equal and not ancestors of the third, and that the points of
attachment Px and Py of the x-y path are equal to the corresponding stopping vertices
(i.e., Px = X and Py = y). As a result of processing by this procedure, G contains a
subgraph of the input graph G that is homeomorphic to Kg.
The correctness of procedure IsolateMinorEg is established by Lemma 9.23. The
run-time analysis for procedure IsolateMinorEg appears in Lemma 9.24.

L em m a 9.23 Given the embedding structure G in the isolator initial state with mi-
eguol (o E, w = z, pa, = z, py = p, and of feosf fwo o/ Uy ond ore
egnol ond nof onceafors o/ fAe fhW, the LaoIofeMinorEg procedure frona/iorma G to
the Kuratowski subgraph marked state.

P ro o f. With respect to marking the edges and vertices along paths in G that corre-
spond to the edges {u, x), (u, y), and (v, w) in minor E, the proof is the same as in
Lemma 9.7. The paths in G represented by vertex u and the edge (u, ti) are marked
by a single invocation of MarkDFSPath in Line 2. The path in G corresponding to
145

the edge («, w) is isolated by the same methods as those used to isolate the path (u,,
. . . , di, ... ; z). Since r ' is a root copy of u, the invocation of MarkPathAlongBicom­
pExtFace marks the cycle in G corresponding to the cycle (u, . . . , z, . . . , w, . . . , y,
. . . , u) in minor E (except that u, the parent copy of r', is marked when the edge
(u, du,) is added). Finally, according to Lemma 9.5, the path in G represented
in minor E by the edge (x, y) was previously marked for isolation by the procedure
ChooseTypeOfNonplanarity Minor. The invocation of JoinBicomps in Line 4 com-
pletes the correspondence with minor E such that a subgraph of G homeomorphic to
-K's has been marked in G. □

Lemma 9.24 procedure rurw m 0 (n ) Mme.

Proof. Same arguments as in Lemma 9.8, except for a few extra constant time
operations. □

9.11.6 Closure on M inor E


The procedure IsolateMinorE defined in Figure 9.17 processes the embedding
structure G according to non-planarity minor E appearing in Figure 6.7. The proce­
dure performs a number of tests to determine whether the G and G satisfy the input
requirements of each of the five isolators defined earlier in this section. As a result
of invoking the selected isolator, G contains a subgraph of the input graph G that is
homeomorphic to ^ 3 ^ or Ffg.
The correctness of procedure IsolateMinorE is established by Lemma 9.25. The
run-time analysis for procedure IsolateMinorE appears in Lemma 9.26.

L em m a 9.25 Given the embedding structure G in the isolator initial state with mi-
eguol to E, the ZsototeMmorE procedure traus/onue G to the JiTurotouwhi
subgraph marked state.

Proof. The vertex u in minor E is representative of three possibly distinct vertices


Uz, Uy, and u«. The points of attachment p , and Py are edge contracted into æ and
146

Figure 9.17: Isolating M inor E

Procedure: IsolateMinorE
this: Embedding structure G in the isolator initial state with minorType of E
out: Embedding structure G in the Kuratowski subgraph marked state

(1) ii z ^ w, IsolateMinorEi 0
(2) else if «% > max(ug, Uy), IsolateMinorEg()
(3) else if Ug < max(uz,% ) and n , ^ Uy, IsolateMinorEg()
(4) else if Pz ^ a; or p , ^ p, IsolateMinorEg ()
(5) else IsolateMinorEg 0

p and may be distinct from a; and p. The vertex w is pertinent, and either it is
externally active or their is another externally active vertex on the external face path
(pz, . . w, Py). Let z denote this externally active vertex.
The following cases result from the variability of the identified vertices u^,
u^, Px, Py, and z. Either z ^ w (minor E j or z = w. In the latter case, we consider
the mutually exclusive cases for Ux, Uy, and u^.

1. Uz is descendant to both Ux and Uy (minor Eg).

2. Uz is an ancestor of at least one of Ug and Uy and Ux ^ % (minor Eg).

3. % is an ancestor of u , = (minor E 4 or minor Eg).

4. Ug equal to one or both of and u , (minor E4 or minor Eg).

In both of the latter two cases, at least two of Uy, and are equal to and
not an ancestor of the third. When this condition occurs, minors E 4 and Eg are
distinguished by the fact that either the x-y path is attached directly to x and p
(minor Eg), or it is not (minor E4).
Since vertices u, z, p and w in minor E are fixed, the cases above account for
all variability in minor E. Thus, the fact that G is transformed to the Kuratowski
subgraph marked state follows from Lemmas 9.15, 9.17, 9.19, 9.21, and 9.23. O
147

Figure 9.18: Isolating a K uratowski Subgraph

Procedure: IsolateKuratowskiSubgraph
this: Embedding structure G in the non-planar embedding invariant state
in: Input graph G
out: Embedding structure G containing a subgraph of G homeomorphic to or Kg

(1) ChooseTypeOfNonplanarityMinor(G)
(2) InitializelsolatorContext()

(3) if minorType is 'A', IsolateMinorA()


(4) else if minorType is IsolateMinorE()
(5) else if minorType is 'C , IsolateMinorCQ
(6 ) else if minorType is 'D', IsolateMinorD()
(7) else if minorType is ‘E’, IsolateMinorE()

(8 ) Delete unmarked vertices and edges

L em m a 9.26 The IsolateMinorE procedure runs in 0{n) time.

P ro o f. In addition to a few constant time operations, this procedure invokes one of


IsolateMinorEi, IsolateMinorEg, IsolateMinorEg, IsolateMinorEg, and IsolateMinorEg,
which are each 0{n) by Lemmas 9.16, 9.18, 9.20, 9.22, and 9.24. □

9.12 Isolating a K uratow ski Subgraph


The procedure IsolateKuratowskiSubgraph defined in Figure 9.18 receives the
input graph G and the embedding structure G in the non-planar embedding invariant
state (Definition 9.1), which is the defined result of the procedure PlanarityTest in
Chapter 7 on a non-planar input graph. As a result of processing by this procedure,
G contains a subgraph of the input graph G that is homeomorphic to or Kg.
The correctness of procedure IsolateKuratowskiSubgraph is established by The­
orem 9.27. The run-time analysis for procedure IsolateKuratowskiSubgraph appears
in Theorem 9.28.
148

T h eo rem 9.27 t/ie emtedjimg atrrfcfure G in f/ie non-pZonar embaWin^ in-


variant state, the IsolateKuratowskiSubgraph procedure modifies G such that it con­
tains a subgraph of the input graph G that is homeomorphic to if 3 , 3 or if 5 .

P ro o f. Lines 1 and 2 transform G to the isolator initial state. According to Lemma


9.5, the test-and-branch decision construct in Lines 3 to 7 correctly chooses to invoke
one of the procedures IsolateMinor A, IsolateMinorE, IsolateMinorC, IsolateMinorE,
and IsolateMinorE, which mark in G a subgraph of G homeomorphic to if 3 , 3 or ifg
according to Lemmas 9.7, 9.9, 9.11, 9.13 and 9.25. The procedure completes the
isolation of a Kuratowski subgraph by simply removing the unmarked vertices and
edges. □

T h eo rem 9.28 The IsolateKuratowskiSubgraph procedure runs in (){n) time.

P ro o f. Line 1 invokes ChooseTypeOfNonplanarity Minor, which is 0{n) by Lemma


9.6. Line 2 invokes a simple, low-level procedure easily seen to be 0(n ). Lines 3 to 7
contain constant time operations except for the procedure invocations of IsolateMi­
nor A, IsolateMinorE, IsolateMinorC, IsolateMinorE, and IsolateMinorE, which are
0{n) by Lemmas 9.8, 9.10, 9.12, 9.14 and 9.26. Line 8 is clearly 0{n). □
149

10. N ew O uterplanar G raph T esting, E m bedding and


O bstruction Isolation

This chapter extends the theoretical framework for planarity created in the prior
chapters of this dissertation to solve the testing, embedding and minimal obstruct-
ing subgraph problems for outerplanarity. Section 10.1 is devoted to outerplanarity
testing and embedding. Section 10.2 exploits the proof of correctness to obtain a
subgraph homeomorphic to Kg,3 or when it is found that a given graph is not
outerplanar. A prior linear time algorithm for outerplanar graph embedding is due
to Brehaut [9], which is based on the Hopcroft and Tarj an planarity test [30].

10.1 O uterplanarity T esting and E m bedding


In the planarity algorithms, the notion of external activity serves to indicate
vertices that must remain on the external face. Since an outerplanar graph requires
all vertices to be on external face, our planar graph testing and embedding algorithms
can be transformed to testing and embedding algorithms for outerplanarity by simply
changing the definition of external activity to be a permanent state of the parent
copy of every vertex. From an implementation standpoint, this chemge could be
accomplished by changing the VertexActiveStatus procedure defined in Chapter 4 to
simply return ‘Externally Active’ at all times.

P ro p e rty 10.1 Ebr outerpfonarify off uerfices ore permomenffy erfer-


ooffy ocfwe.

D efinition 10.1 The embedding is in the outerplanar embedding invariant state if


if cor^rm s fo the embeddwp inuorionf sfofe o/De/inifion ercepf /o r moinfomin^
Property 10.1 in fieo 0 / Property (Dynomic Ertemof Activity/

Given that all vertices are defined to be externally active at all times, if the
procedure PlanarityTest defined in Chapter 7 is able to embed all back edges between
160

each vertex and its descendants, then clearly the input graph is outerplanar, and
an embedding can be recovered by invoking the procedure PlanarEmbed de&ned in
Chapter 8 . If, however, the underlying procedure Walkdown dehned in Chapter 6 fails
to embed a back edge during a step u, then the input graph (7 is not outerplanar, as
shown by Theorem 10.1.

T h eo rem 10.1 Given an embedding structure G in the outerplanar embedding in-


uorionÿ sW e 1 0 . 1 ^ ond o mot copy u 'm with child c, the actions
o/ the ITot&down procedure result in on emheddiny structure G in the outerplonor
emhedding inuoriont stote. 7/ the praph G is outeTplonor or ^ neither Condition 1

or 2 occur, then G contains all back edges from the input graph G between v and
descendants of c.

P ro o f. If the Walkdown embeds all back edges between and descendants of c, then
the resulting partial embedding remains outerplanar due to maintenance of Properties
10.1 (all vertices are externally active) and 3.2 (active vertices are maintained on the
external face). Thus, we focus on the conditions under which the Walkdown fails
to embed one or more back edges between and descendants of c. Note that it
is weU-known (e.g., see [59]) that outerplanarity is obstructed by homeomorphs and
hence minors of ÜC2 , 3 and K 4 .
If the Walkdown returns with a non-empty stack (Condition 1), then edge con­
traction and deletion can be used on the embedding structure G, along with the
addition of certain unembedded edges represented in G as vertex activity, to produce
the non-outerplanarity minor A appearing in Figure 10.1. Thus, the input graph is
not outerplanar since Figure 10.1 is a
If the Walkdown returns with an empty stack (Condition 2) and there is a
u; candidate with a pertinent child biconnected component, then edge contraction
and deletion can be used on the embedding structure G, along with the addition
of certain unembedded edges represented in G as vertex activity, to produce the
non-outerplanarity minor B appearing in Figure 10.2. Thus, the input graph is not
outerplanar since Figure 10.2 is a
151

Figure 10.1: Non-O uterplanarity M inor A

z^

Figure 10.2: Non-O uterplanarity M inor B

If the Walkdown terminates on Condition 2 , and there is no x-y path for a w


candidate, then the Walkdown visits w prior to merging w, x and y into the same
biconnected component. Thus, a w candidate must have a pertinent child biconnected
component if it has no x-y path.
If the Walkdown returns with an empty stack (Condition 2) and the biconnected
component rooted by v' has an x-y path, then edge contraction and deletion can be
used on the embedding structure G, along with the addition of certain unembedded
edges represented in G as vertex activity, to produce the non-outerplanarity minor E
appearing in Figure 10.3. Thus, the input graph is not outerplanar since Figure 10.3
is a K^.
Thus, when the Walkdown fails to embed a back edge, the input graph is not
outerplanar. If the halt occurred when the stack was not empty, then the input
graph contains a minor. If the stack is empty, then a w candidate, which has
an unembedded back edge to u at the end of step u, either has or does not have a
152

Figure 10.3: Non-O uterplanarity M inor E

blocking x-y path. If there is a blocking x-y path, then the input graph contains a
minor and is therefore not outerplanar. If there is no x-y path, then the w candidate
must have a pertinent child biconnected component, so the input graph contains a
ATg 3 minor and is therefore not outerplanar. □

T h eo rem 10.2 A simple undirected graph G with n vertices, an outerplanar embed-


o /G can created or shown not to erist in 0 (n) time.

P ro o f. Follows directly from Theorems 7.2 and 10.1. □

It is interesting to note that non-planarity minors C and D have no outerpla­


narity analogs. Non-planarity minor C requires the existence of an x-y path with at
least one high point of attachment. For outerplanarity, the algorithm makes all ver­
tices externally active, so the stopping vertices x and y are endpoints of the two edges
incident to the biconnected component root along the external face. Therefore, it is
impossible to have a high x-y path. An analog for non-planarity minor D does not
exist because it contains an internal vertex z, which cannot occur with our algorithm
since all vertices are externally active.

1 0 .2 Isolating a M inim al Subgraph th at O bstructs O uterpla­


narity
The procedure IsolateOuterplanarityObstruction dehned in Figure 10.4 receives
the input graph G and the embedding structure G in the outerplanar embedding
153

Figure 10.4: O uterplanarity O bstruction Isolator

Procedure: IsolateOuterplanarityObstruction
this: Embedding structure G in the outerplanar embedding invariant state
in: The input graph G
out: Embedding structure G in the non-planarity minor found state

(1) Orient Vertices 0


(2) InitializeNonplanarityMinorContext (G)

(3) if r ' is not a root copy of u


(4) Assign 'A' to minorType
(5) else if the pertinentBicompList of w is not empty
(6 ) Assign 'B' to minorType
(7) else Assign 'E ' to minorType

(8 ) Obtain in the manner described in Table 9.2

(9) if minorType is ‘E’, MarkHighestXYPath()

(10) MarkPathAlongBicompExtPace(r% r')


(11) MarkDFSPath(u, / )
(12) MarkDFSPath(w, 4 ,)
(13) JoinBicomps()
(14) Add and mark the edge (u, (L)

(15) Delete unmarked edges and vertices

invariant state. Moreover, the Walkdown is assumed to have experienced a Condition


1 or 2 termination during some step v. As a result of processing by this procedure,
G contains a subgraph of the input graph G that is homeomorphic to Ag g or K^.
The correctness of procedure IsolateOuterplanarityObstruction is established by
Theorem 10.3. The run-time analysis for procedure IsolateOuterplanarityObstruction
appears in Theorem 10.4.

T h eo rem 10.3 Giuen (Ae structure G iu tAe outerpZouor *»-


uonuut stote on wh*cA tAe Wo&doum /los produced o Condition 1 or & terminotion,
the 7soZoteGuterpZonoritpG6structton procedure modi^es G such thot it contains o
su 6 proph o/ the input praph G thot is hoTneomofphic to ATg3 or ^ 4 .
154

P ro o f. Much of the proof follows from Theorem 10.1. The edge (z, y) in minor
E is marked in Line 9. Line 10 marks the cycle (r, . . . , z, . . . , w, . . . , . . . , r)
in minor A, or the cycle (u, . . . , z, . . . , w, . . . , y, . . . , u) for minors B and E.
Line 11 has no meaningful eSect except for minor A, where it marks the tree path
corresponding to the edge (%;,r). The combined action of Lines 12 and 14 handle the
path in (7 corresponding to (u, w) in minors A and E, or the path (r, . . . , z, . . . ,
w). Since the biconnected components are also merged, eliminating root copies, the
correspondence with the minors depicted in Figures 10.1, 1 0 .2 and 10.3 is complete,
so the procedure completes the isolation of an outerplanarity obstruction by simply
removing the unmarked vertices and edges. O

T h eo rem 10.4 The Z9oloteOuteTplonority068trucfmn procedure runs in 0 (n ) time.

P ro o f. Line 1 is 0(n) by Lemma 8 .2 . Line 2 invokes a low-level procedure containing


simple 0(n) loops. Lines 3 to 8 are constant time. Line 9 contains a constant time
comparison plus an invocation of MarkHighestXYPath, which is 0(n) by Lemma 9.2.
The remaining operations invokes low-level procedures containing simple 0(n) loops,
except Line 13, which is 0(n) by Lemma 4.21, and Line 14 which requires constant
time. □
156

11. N ew %2,3 and ^ 3,3 Search A lgorithm s

This chapter extends the theoretical framework for planarity and outerplanarity cre­
ated in the prior chapters of this dissertation to solve the problems of searching for
jjCg a and homeomorphs in a graph, and recognition of iiTg^a-less and jjCg^-less
graphs (i.e. graphs having no or homeomorph, respectively). Section 1 1 .1

presents a simple 0 (n ) search algorithm for ^^^2 , 3 homeomorphs, and Section 11.2
presents a simple 0 (n ) search algorithm for homeomorphs. Prior linear time
algorithms for these problems are due to Asano [4] and Fellows and Kaschube [20].

11.1 Searching for H om eom orphs and R ecognizing A 2 3-


less Graphs
The K 2,s homeomorph search algorithm is essentially the outerplanarity algo­
rithm of Chapter 10, except that further analysis of the graph is performed if non-
outerplanarity minor E (the Æ4 obstruction) is found. An algorithm nearly identical
to the Walkup of Chapter 5 can be used to expediently identify each root copy of
the current vertex v upon which the Walkdown terminated with Condition 1 or 2. To
process a root copy 1/^ on which a Condition 1 or 2 Walkdown failure has occurred,
we begin by preprocessing only the vertices and edges in the biconnected component
rooted by including vertex orientation, clearing of the visited members, finding
X, y and w, and classifying the external face vertices as ‘high RXW’, ‘low RXW’,
‘high RYW' or ‘low RAW' (short-circuit edge removal is necessary because none are
added). Then, we determine whether the non-outerplanarity minor is A, B or E (see
Lines 3 to 7 of procedure IsolateOuterplanarityObstruction in Figure 10.4). If minors
A or B are found, then the desired 7 ^2 , 3 homeomorph is isolated and returned to the
caller. If minor E is found, then the z-y path is obtained, and the additional analyses
described below in Theorem 11.1 are performed, resulting either in the isolation of a
7 ^2 , 3 homeomorph or a determination that the K 4 can be ignored. If, for each root
copy the determination is made that the % 4 can be ignored, then the outerpla-
156

narity algorithm can simply continne at step n —1 (except %;= 0 ) as if an obstruction


to outerplanarity had not occurred. If step n = 0 is completed without hnding any
homeomorphs, then the input graph is Æg^a-less.

Theorem 11.1 fn the outerplonortty featm^y oZ^onthm, i/th e W^oZWoum/oiZs to em-


6 ed o 6 a c t etZ^e to o descendant o/ c o/ the 6 iconnected component with root then
either o AT2 ,3 homeomoTph con 6 e /ound in the input ^roph G, or the vertices in the
DfS" subtree rooted c ore determined not to 6 e port o/ o homeomorph o/G .

P ro o f. Non-outerplanarity minors A and B (Figures 10.1 and 10.2) indicate ^ 2 ,3

homeomorphs, so further analysis pertains to non-outerplanarity minor E (Figure


10.3). If either point of attachment of the z-p path is attached below z or p (i.e.
if Pz z or Py ^ p), then a homeomorph can by isolated according to Figure
1 1 .1 (a) (note the simple variation cases of having p , = z ^ py = z p, and having
both pg ^ T and Py ^ p).

w
(a) (b)

w
(C) (d)

Figure 11.1: A^g^ H om eom orphs 6 0 m Non-O uterplanarity M inor E


157

Thus, consider the case in which the z-%/ path (a single edge) is attached directly
to a; and %/. If any other vertex ^ is on the lower external face path (z, . . . , w, . . . ,
y), then a ^ 2 ,3 homeomorph can be isolated according to Figure 11.1(b) (note the
symmetric case of having z along the lower external face path between w and y).
Thus, w must be the only vertex along the lower external face path, and we
already know that the connection from w to n must be an edge (otherwise, non-
outerplanarity minor B). Since we also know that z and are direct neighbors of
each other and of t;, the vertices n, z, and w form a clique. If z or y can be
connected to an ancestor u of u by zero or more separated biconnected components
plus an unembedded back edge, then a homeomorph can be isolated according
to Figure 11.1(c) (note symmetric case of a connection from to u). If tu can be
connected to an ancestor u of u by zero or more separated biconnected components
plus an unembedded back edge, then a Ü'2 , 3 homeomorph can be isolated according
to Figure 11.1(d).
Finally, if none of the above conditions are met, then every path in G between
vertices in the DFS subtree rooted by c (i.e. z, y and tu) and the ancestors of v
(if any) and descendants of v not in Tc (if any) contains v. Thus, z, y and w are not
in any 7 ^2 , 3 homeomorph that may be in the input graph. □

C orollary 11.2 vl non-outerplonor Aiconnected component 0 /0 graph is womorphic


to K 4 or contains a if 2 ,3 homeomorph.

T h eo rem 11.3 Giuen o simple undirected graph G with n vertices, o subgraph home-
omotphic to if 2,3 can he /bund or shown not to ezist in G in 0 (n ) time.

P ro o f. A ifa^-less graph is planar, and a non-planar graph contains a 1^2,3 homeo­


morph, so the edge limit of Corollary 1.5 is applicable. The cost of identi^dng root
copies of u on which the Walkdown terminated with Condition 1 or 2 is commensurate
with the cost of the Walkup operations performed in step u. For a given root of a
biconnected component B, the determination of minor A, B or E and the marking of
the z-p path for minor E have costs commensurate with the number of vertices in B.
158

Since B either becomes part of a homeomorph or is a ^ 4 that is never visited


again, the 0 (n) total run-time is maintained.
The tests corresponding to Figures 11.1(a) and 11.1(b) are clearly constant
time. The tests for Figures 11.1(c) and 11.1(d) are constant time using the Vertex-
ActiveStatus procedure of Chapter 4 (i.e. y or w has a connection to an ancestor
u of u if its leastAncestor field is less than v or if the lowpoint of the first node in
its separatedDFSChüdList is less than u). If one of the tests determines th at a
homeomorph exists, then the ^ homeomorph is isolated in 0 (7 t) time (the time to
isolate minor A, B or E plus the time to isolate the path from %, y or tu to an ancestor
of V in Figures 11.1(c) and 11.1(d)). □

11.2 Searching for ^(3^ H om eom orphs and R ecognizing ATgs-


less Graphs
A separation pair, also called a 2-cut, is a pair of vertices u and in a biconnected
component of a graph G that, if removed, would result in a graph with more connected
components than G. A biconnected component is triconnected if it does not contain
a separation pair. Hopcroft and Tarjan [28] and Vo [56] define and describe methods
for obtaining the triconnected components of a graph.
The AT3 3 homeomorph search algorithm is analogous in operation to the ATg^
homeomorph search algorithm. Indeed, the parallels are striking provided that we
consider the behavior of the A 3 , 3 search algorithm over the triconnected components of
an input graph, which is appropriate due to Theorem 11.4. The algorithm reported
in this section searches for A 3 , 3 homeomorphs in linear time when applied to the
triconnected components of a graph, but it is also quite fast in practice, achieving
linear time without the need for separating triconnected components as long as a given
Ag homeomorph does not share with other A^ homeomorphs the ancestral path &om
the vertex v in which the former is discovered.

Theorem 11.4 (Asano [4]) A pmph G hos o au6 gmph homeomorphic to A 3 ,3 ÿ o n d


only ÿ o ,9-connected component o /G has o s«5groph homeomorphic to A 3 ,3 .
159

Æemort.' A triconmected component can contain one or more wrtuaf to rep-


resent portions of the input graph separated from the vertices of the triconnected
component by a separation pair. The endpoints of a virtual edge are a separation
pair. This is analogous to creating extra copies of vertices to represent cut vertices
in all biconnected components that contain them.
The i^ 3 _ 3 search algorithm is essentially the planarity algorithm of Chapter 7,
except that further analysis of the graph is performed if non-planarity minor E (the
minor obstruction) is found. An algorithm nearly identical to the Walkup of Chapter
5 can be used to expediently identify each root copy of the current vertex v upon
which the Walkdown terminated with Condition 1 or 2. To process a root copy v'^,
we begin by preprocessing only the vertices and edges in the biconnected component
B rooted by including vertex orientation, short-circuit edge removal, clearing of
the visited members, finding x, y and w, and classifying the external face vertices
as ‘high RXW’, ‘low RXW’, ‘high RYW’ or ‘low RYW’. Then, we determine which
non-planarity minor can be identified. If the non-planarity minor identified is not
minor E, then the desired A 3 , 3 homeomorph is isolated and returned to the caller. If
minor E is found, then the x-y path has also been obtained, so the additional analyses
described below in Theorem 11.5 are performed, resulting either in the isolation of
a A 3 , 3 homeomorph or a determination that the A 5 homeomorph can be planarized.
If, for each root copy v°, the determination is made that the A 5 homeomorph can be
planarized, then the planarity algorithm can simply continue at step v — 1 (except
u = 0) as if an obstruction to planarity had not occurred. If step n = 0 is completed
without finding any A 3 ,3 homeomorphs, then the input graph is As,3 -less.
The following terms and notation aid the presentation of Theorem 11.5. Let Fx
denote descendants of a vertex z in the DFS subtrees rooted by children of z that are
in the externally active child biconnected components of z. An ezfemoi connecfion
from a vertex z to an ancestor u of the current vertex u is a path between z and
u consisting of a single back edge, or a path of tree edges from z to a descendant
in Fx plus a back edge from the descendant to u. Let fyj denote descendants of a
vertex w in the DFS subtrees rooted by children of w that are in internally active
160

child biconnected components of w. An infemof connection from a vertex w to the


current vertex n is a path between to and n consisting of a single back edge or a path
of tree edges from to to a descendant in /„, plus a back edge from the descendant to
V.

Let tfz; Uy and denote the ancestors of u with the least DPI having an external
connection to z, y and to, respectively. Let tt^wn and tfmaz denote the minimum and
maximum, respectively, of Ux-, Uy and Uw Let Tc denote the DFS subtree with root
c (the child of in the root edge of B), and let P denote the path {v, . . . , Umm)-
Consider the bridges of G with respect to path f . The 2^-bridge contains the vertices
in 2^ (plus the points of connection to f ) . Let denote the set of all bridges of G
with respect to f except the l^bridge. A bridge in atmddZes the vertex Umw if
the bridge attaches to ancestors and descendants of «moz in f . Let denote the
set of all bridges of G with respect to the subgraph of G containing the vertices of
F and of the biconnected component B. Aside from the bridges of Pp, the set Pp+b
contains four important bridges; the Plg-bridge containing the vertices of forest Fx
(plus X and one or more ancestors of v ) , the F^-bridge containing the vertices of forest
Fy (plus y and one or more ancestors of v ) , the F^-bridge containing the vertices of
forest Fy, (plus w and one or more ancestors of v ) , and the /^-bridge containing the
vertices of forest fy, (plus w and v) .

T h eorem 11.5 In the planarity testing algorithm, if the Walkdown fails to embed
a back edge to a descendant of c of the biconnected component B with root then
either a homeomorph can be found based on B , or the homeomorph based
on F con pfonorized remownp <Ae in(emoJ connecfiona Wween u ond to ond
repZocing JB unÀ (he cpcle z, w, p,

P ro of. Non-planarity minor E has a number of additional tests that can result in the
selection of non-planarity minors Ei to E 4 , each of which isolates a Fg g homeomorph.
Therefore, we focus on the conditions under which minor E 5 is selected. In minor Eg,
the w candidate is externally active, the highest x-y path has points of attachment
equal to z and p, and the external connections from z, p and w to ancestors of u have
161

been selected and at least two are equal and not ancestors of the third.
Cose 1 : If there is any pertinent or externally active vertex other than w, a;
and y along the external face path (z, w, of .B, then a ^ ^ ,3 homeomorph
can be isolated by non-planarity Minor Ei_
Coae ;8 : If there exists any (low) z-y path in B with a point of attachment
Pg z or Py ^ p, then a homeomorph can be isolated by non-planarity minor
E4 .
Ciwe J : If the a;-p path in B contains a single endpoint z of a second path p of the
form (w ,... ;z); where all vertices in the path (except w) are embedded inside B, then
a homeomorph can be isolated by the non-planarity minor E@depicted in Figure
11.2. This minor is symmetric to non-planarity minor D. The paths represented by
edges (u,t;), (T,w) and (w,p) are not needed in the homeomorph.

Figure 11.2: Minor Eg

Cose : Let z be a descendant of «^@3, and an ancestor of n (i.e. comparing


DFI, Umoz < z < t;). If there exists such a z, and there is an external connection
from w to z, then a homeomorph can be isolated by non-planarity minor Eg. If
any such z exists and there is an external connection from r or p to z, then a ^ 3 ^
homeomorph can be isolated by non-planarity minor Eg.
Cose J: If Ug, < 14 ^ ^ and there exists a bridge in that straddles Umw, then a
A^ , 3 homeomorph can be isolated by non-planarity minor Ey. This minor is depicted
in Figure 11.3, and it can be isolated by reduction to non-planarity minor C,
Cose If Uy < Umoz and there exists a bridge in that straddles Umw, then a
162

Figure 11.3: Minor E? R educes to M inor C

homeomorph can be isolated by non-planarity minor E g , which is shown in Figure


11.4. Note the symmetric case for < Umax- The paths in the graph corresponding
to the edges (u,y), (r, w) and excluding the endpoints, are not needed to
form the Æg^g homeomorph. In the symmetric case (in which < Umax), the edges
to omit are (u ,r), (%/, w) and ^))-

Figure 11.4: M inor Eg

This concludes the cases for which a %g,g homeomorph can be identihed based
on B, and we now turn to proving that sufScient conditions have been established to
warrant planarizing the FTg homeomorph that has been encountered by removing the
internal connections between u and w and replacing B with a cycle r , w, y,
The /^-bridge of is planar and connects only to u and w. Thus, since
163

every path exiting the /^-bridge must contain n or w, the /u,-bridge can be reduced
to a single edge (u, tu) due to Theorem 11.4. In fact, in a triconnected component, the
internal connections between and w would already be represented by a single edge.
By the same arguments, the z-y path in B can be reduced to a single edge (z,y) due
to the failure of the conditions in Cases 2 and 3 and the conditions that resulted in
choosing non-planarity minor Eg. Likewise, B can be reduced to a consisting of
the cycle z, w, y, plus the edges (u,w) and (%,y), based solely on the failure
of the conditions in Cases 1 to 3, along with the conditions which resulted in choosing
minor Eg. In a triconnected component, the fEulure of the conditions in the six cases
above guarantees that B is isomorphic to Æ4 .
To complete the discussion of the bridges in ^p+b but not in ^p, we must
consider three possible trivial bridges, direct back edges from x, y and w to ancestors
of V, and three possible non-trivial bridges, the F^-bridge, the f^-bridge, and the
f^-bridge. A high bridge is a bridge of that attaches to one of T, g or w and
at least one ancestor of u^ax- A low bridge is a bridge of Pp+b that attaches to one
of X, y or w and only Umax- Due to the failure of the condition in Case 4, none of
the six possible bridges listed above attaches to an ancestor of v that is descendant
to Mmpz- Moreover, by virtue of having selected minor Eg, only one of z, g or w can
have a trivial or non-tiivial high bridge, and the remaining bridges attached to the
other two descendants of w in B must attach only to Umax-
For each non-trivial low bridge, every path leading into the bridge from a vertex
in B must contain «mw or the single point of attachment of the bridge to B (namely,
T, g or w). Thus, the image vertices of any homeomorph involving the bridge
must be entirely within the bridge, and the homeomorph is maintained under re-
ductions of B that maintain a path from Umai th r o u ^ u to the point of attachment of
the bridge to B. The trivial low bridges are of little interest except that, if they exist,
then they directly make the desired path connection for the corresponding non-trivial
low bridge. In a triconnected component, the low bridges are trivial (represented by
a single edge).
If there is a non-trivial high bridge, then due to the failure of the conditions in
164

Cases 5 and 6 , there are no paths from vertices in the bridge to vertices in B that
do not include either Umoz or the single point of attachment of the bridge to B. The
corresponding trivial bridge, if it exists, does not aSect this argument. Thus, any
homeomorph of the input graph that includes image vertices in the high bridge
is cut oE at Umoz and the single point of attachment of the bridge to B such that the
homeomorph is preserved under reductions of B that maintain a path 6 om Umaz
to the point of attachment of the high bridge to B. In a triconnected component, the
high bridges are represented by a single edge to «maz-
Hence, we are left to consider the non-straddling bridges of /3p. A bridge of
)8 p attached to the path (%;, . . . , Umaz) can oidy connect to vertices of B by paths
containing u or tfmaz, so any homeomorph of the input graph that includes
image vertices from such a bridge is cut off at Umax and v from including more than
a path through B leading from v through any descendant of v and back up to Umax-
In a triconnected component, the path P is represented by a single edge from v to
Umax such that the entire input graph is isomorphic to and thus contains no g
homeomorph.
Finally, any bridge of attached to the path (umaz, • ■■, «mm) can only con­
nect to B by paths passing through Umax and the vertex of B {x, y or w) with an
external connection to an ancestor of Umax- Once again, any ATg g homeomorph with
image vertices in such a bridge is maintained under a reduction of B provided that
a path from Umax through v to the point of attachment of the high bridge to B.
For triconnected components, these bridges are represented by the same edge that
represents the high bridges.
As a summative result, any homeomorph of the input graph has at most
one image vertex in B, which is shared by the bridge(s) representing the Ag,g home­
omorph, such that B provides at most one path to the Ag g homeomorph. Since the
cycle z, w, %/, maintains a path in B from to each of z, y and w, the
aforementioned edges («, w) and (z, %/) can be deleted, restoring the planarity of the
portion of the input graph represented by the embedding structure such that it can
continue the search for Ag g homeomorphs elsewhere in the graph. O
166

Corollary 11.6 j4 noR-pfonor tr;connected component 0 / o prop/: ie ieomoTp/itc to


jjCs or contains o /tomeomorp/:.

Exploiting Theorem 11.5 to create a linear time fCg 3 search algorithm is remark­
ably easy because only a few additional tests are needed beyond those that initially
select non-planarity minor E 5 . If any test succeeds, then a Æ 3 3 homeomorph can be
isolated. If all of the tests fail on a triconnected component, then the triconnected
component is isomorphic to and therefore contains no homeomorph. If the
input graph is not triconnected, then linear time performance can be maintained in
most cases, as described below.
Even with initialization restricted to the biconnected component B with root
v^, the normal tests in the Kuratowski subgraph isolator for minors A to D (in Lines
3 to 17 of procedure ChooselYpeOfNonplanarityMinor, Figure 9.3) and to
(in Lines 1 to 5 of procedure IsolateMinorE, Figure 9.17) can be performed without
diSculty because they are only based on information stored in the vertex structures
and edge records that represent B. If the result of the tests is minor E 5 , then the
case logic of Theorem 11.5 must be applied.
The test for Case 1 can be implemented using a slightly modified form of pro­
cedure FindExtActivityBelowXYPath from Section 9.2, which operates identically
except for skipping w.
The test for Case 2 of Theorem 11.5 can be implemented with the help of a
slightly modified form of procedure MarkHighestXYPath from Section 9.3, which
operates identically except for returning with = py — nil if w is encountered while
searching for an path. To test whether there exists an z-y path with points of
attachment below T or %/, we invoke the modified procedure twice. First, we hide the
internal edges of T, then invoke the procedure. If it succeeds, then we have an z-%/
path with a point of attachment Px below x. If it fails, then we restore the edges of x,
then hide the internal edges of y and invoke the procedure again. If it succeeds, then
we have an z-y path with a point of attachment p , below p. Otherwise, we restore
the edges of y and try the next case.
The test for Case 3 of Theorem 11.5 can be implemented as follows. First, hide
166

all internal edges of vertices along the external face path (z, . . . , w, . . . , y) except
those of in and the two edges that attach z and to the path. In this way, a walk
of the proper face that starts with the path (in, . . . , r ) returns to in before reaching
y if and only if the internal in-z path required in minor Eg exists. The procedure
for this is similar to procedure MarkVtoZPath &om Section 9.3, with the principal
exception that it must ignore paths whose points of attachment are both on the x-y
path (in a fashion similar to procedure MarkHighestXYPath of Section 9.3).
The test for Case 4 of Theorem 11.5 can be performed by examining the vertices
along the path hrom n to Umaz, excluding the endpoints. It is helpful to associate with
each vertex the maximum numbered DFS descendant, which can easily be computed
during preprocessing. For each vertex z on the path (n, . . . , Umw) and distinct from
the endpoints, examine the back edges of z to see whether any lead to the subtrees
rooted by z, or w. For a back edge from z to a descendant dg, the subtree rooted by
a vertex % contains d, if is in the range DFI(z) to MaxDescendant (z). Note that
two of X , y and w descend from the third, but once we know that a ATg a homeomorph
exists, it takes little extra effort to resolve whether d^ is x, y, w or which of those has
the separated child biconnected component leading to d^.
The tests for Cases 5 and 6 of Theorem 11.5 are implemented by traversing the
path (i;,. . . , Umoz)- At each vertex z, we test for a connection to an ancestor of Umw
by taking the minimum of the least Ancestor of z and the least lowpoint of the DFS
children of z, excluding the DFS child of z that is equal to or an ancestor of the child
c in the root edge with (i.e. use the second element of the separatedDFSChildList
of z if it exists and if the first element is the child to be excluded). If the computed
minimum is less than the DFI of Umoz, then a straddling bridge has been found.

Theorem 11.7 Given o simple undirected pmph G w i^ n vertices, a su&yroph home-


omozphic to con 6 e /ovnd or shown not to ezist in G in 0 (n ) time.

Proof. The fact that a FTg g-less graph has 3n — 5 or fewer edges is a result of
Asano [4]. Thus, our data structure limit to hn edges with A; > 3 is applicable. The
triconnected components of a graph can be obtained in 0 (n ) time [28, 56]. The cost
167

of identifying root copies of n on which the Walkdown terminated with Condition 1


or 2 is commensurate with the cost of the Walknp operations performed in step n.
For a given root of a biconnected component the determination of minor A,
B; C, D, El, Eg, Eg, E 4 , or Eo, including the identihcation of the highest z-y path
when required by the selected minor, have costs linear in the number of vertices in
B. Since B either becomes part of à homeomorph or is reduced to a constant
size, the 0 (n) total run-time is maintained.
The tests for Cases 1 to 3 of Theorem 11.5 also have costs linear in the size of
B. The test for Case 4 is commensurate with the sum of the degrees of vertices on the
DFS tree path strictly between n and Umar- If the test succeeds at finding the d e ^ e d
connection, then a A 3 , 3 homeomorph can be isolated so 0 {n) run-time is maintained.
The test for Cases 5 and 6 is linear in the number of vertices on the DFS tree path
(n, . . . , Umax)- If the tests for Cases 4 to 6 fail, then v and Umax are a separation pair
for the DFS tree path (v, . . . , Umax), and would therefore be represented by a single
edge (v, Umax) ia a triconnected component, such that the tests for Case 4 to 6 take
only constant time. □

BemorA; If the input graph is not triconnected, but only a predetermined constant
number of K 5 homeomorphs use vertices along the path (v, Umax), then 0 {n)
performance can be maintained by reducing B to a constant size if a ^ 3 ,3 homeomorph
is not found when a Condition 2 Walkdown failure occurs on B. Since it is easy to
detect whether edges or vertices are visited more than a predetermined constant
number of times when processing an input graph, the need to isolate triconnected
components can be obviated when applying the A 3 , 3 isolator in contexts where a
graph cannot contain too many obstructions to planarity.
168

12. Future W ork

This dissertation provides new linear time algorithms for planarity testing, planar
embedding and Kuratowski subgraph isolation. These are the three fundamental
combinatorial algorithms relating to graph planarity, for with them one can both
determine whether a graph is planar and obtain a simple ‘certificate’ showing why
the graph was deemed planar or non-planar. This dissertation also contributes new
linear time algorithms to solve the corresponding problems for onterplanarity, as well
as new linear time algorithms that search for and homeomorphs. StQ, there
exists a plethora of future research opportunities, due in equal parts to the maturity
of this field of study and to the relative simplicity of the new algorithms and data
structures in this dissertation. This chapter discusses a number of these possibilities.

12.1 Drawing Planar G raphs as H orVert Diagram s


A combinatorial planar embedding of a graph G provides enough information
to allow a subsequent face-walking algorithm to list the bounding walk of each face
in any planar representation of G. However, it does not provide vertex positions and
edge shapes for a specific planar representation of G. A number of algorithms listed in
Chapter 1 do not require the conversion of combinatorial planar embeddings to spe­
cific planar representations. Moreover, the desired planar representation for a given
combinatorial planar embedding can be application-specific. For these reasons, the
generation of a specific planar representation is typically considered to be a separate
problem.
Nevertheless, the combinatorial planar embedding as answer to the question ‘Is
G planar?’ can seem obscure, and as such there is some merit in producing the ver­
tex positions and edge shapes of a specific planar representation of G if it is planar.
A HorVert diagram is a planar representation in which every vertex is represented
by a horizontal line (or rectangle) and every edge is represented by a vertical line.
By expanding the geometric representation of a vertex horizontally, the difiiculty of
169

selecting an edge shape is reduced to two smaller problems: choosing a horizontal


vertex length and choosing a horizontal edge position. Another advantage of HorVert
diagrams is that they can be drawn with the simplest possible rendering capabilities
because it is composed solely of horizontal and vertical lines, pins any symbols needed
to label the vertices. The prospects for augmenting our new algorithms with oper­
ations that result in vertex positions and lengths and edge positions seem high due
to the prior work of Jayakumar, Thulasiraman ^ d Swamy [32], which presents aug­
mentations for the PQ-tree operations of Booth and Lueker [7] that help to generate
a HorVert diagram for the ^ven planar graph.
However, the algorithm of Jayakumar, Thulasiraman and Swamy [32] is criti-
cally dependent on the property of an st-numbering that it has a single source (namely,
s). Their method creates a T order for each vertex i, which is the edge order of pre-
viously embedded vertices numbered less than i. Moreover, it separates the r order
into three partitions, denoted Tt, Tc and Tg, based on what was happening in the
PQ-tree at the time vertex %was embedded. When the PQ-tree is converted
to by performing permutations and reflections such that all leaves containing i
are consecutive, we consider the children of the subtree root that contains all leaves
labeled i. There is at most one partial node on the left, zero or more full nodes, then
one partial node on the right. The leaves labeled i are partitioned into r[, Tq and
Tg based on these nodes. When the embedding is finished, the three partitions %,
Tc and TR for a vertex can be recovered easily from and 7 g. The reason for
this is that, when vertex * is added, all of its incident edges are bound into a single
biconnected component in the partial embedding. Otherwise, we contradict the as-
sertion that the graph has a single source. Because all edges in T^, Tq and Tg are all
in a single biconnected component, the worst that can happen during the remainder
of the embedding is that they get reversed, which can be accommodated by assigning
the reverse of to TR, the reverse of 7 ^ to Tg and the reverse of T^ to T[,.
The dependence on a single source is problematic with respect to our new algo-
rithms since every leaf of the DFS tree is a source. The solution to this problem may
rest in finding an alternative formulation of their method to our data structures that
170

eliminates this dependence.

12.2 T esting for th e C onsecutive O nes P roperty


A (0, l)-m atnx M has the consecutive ones property /o r cofumns if and only
if its rows can be permuted so that in each column all of the ones are consecutive.
The PQ-tree data structure was created by Booth and Lueker as the primary com­
ponent in an eScient test for the consecutive ones property. According to Booth and
Lueker [7, p. 372-3], it was Tarjan who first suggested the possible application of
the PQ-tree to planarity based on similarities between PQ-tree operations and the
formula manipulation operations of the Lempel, Even and Cederbaum planarity test­
ing algorithm [42]. In turn, our new data structures and our methods for updating
them have numerous similarities with PQ-trees and their operations in the context
of solving a graph planarity problem. These similarities suggest the possibility that
our data structures and algorithms may be a suitable alternative to complex PQ-tree
template application, pruning and reduction for testing the consecutive ones prop­
erty. The solution to this problem may rest in having the ability to create a graph
that corresponds to a given (0 , l)-m atrix such that testing the planarity of the graph
by our new method is equivalent to testing the consecutive ones property of the cor­
responding matrix. On the other hand, a proof that no such correspondence exists
would be equally valuable.

12.3 T riconnectivity in Planar G raphs


Linear time algorithms for determining triconnectivity in planar graphs are
due to Hopcroft and Tajjan [28] and Vb [56]. Separation of a graph into triconnected
components helps achieve linear time for search algorithms such as the one in this
dissertation and the one due to Fellows and Kaschube [20]. As well, the identification
of triconnected components and their planar embeddings is a useful first step in well-
known planar graph isomorphism testing algorithms due to Hopcroft and Taqan [29]
and Hopcroft and Wong [31].
Our planar embedding algorithm and our data structures seem well-suited to
171

simple augmentations that would result in an alternative, possibly linear time, ap­
proach to triconnectivity. Our data structure maintains the biconnected components
that develop as edges are added from the input graph to the embedding. Our al­
gorithm embeds each back edge e individually, and when the edge joins vertices
in separate biconnected components, two or more biconnected components may be
merged such that, together with e, a single biconnected component results. Prior to
the merge, a biconnected component is separated from its parent by a cut vertex r.
When a biconnected component B is merged to form a larger biconnected component,
jB is attached ly a separation pair consisting of the vertex r and some other vertex w,
which either was a cut vertex to a child biconnected component or is the descendant
endpoint of the back edge e. An augmeptation to our data structures would typi­
cally not need to maintain information about B if no other back edge results in the
attachment of an edge or child biconnected component along the external face path
between w and r.
However, there are some additional cases to consider. For instance, a bicon­
nected component B rooted by vertex r and containing a vertex w is merged into the
biconnected component containing the current vertex v when the algorithm embeds
the back edge (v, w), but r and w are not the only resulting separation pair. The pair
V and r are also a separation pair, and this does not change if the embedding of more
back edges from u results in attachment of edges or child biconnected components
along the external face path between w and r.

12.4 Enum erating, R anking and U nranking Planar E m bed­


dings
A triconnected planar graph G has only two planar embeddings, Gi and Gg,
which are equivalent except for inved:ed edge orientation of each vertex. Thus, Hipping
Gi on the plane yields Gg, and vice versa. Matters become more complicated for
graphs that are not triconnected. The biconnected components attadied to a cut
vertex and the triconnected components attached to each separation pair can be
172

arbitrarily permuted and Sipped.


It should be possible to deSne a total ordering over all planar embeddings given
one planar embedding of a graph G produced by our algorithms, possibly augmented
by the work in Section 12.3 to identify separation pairs. A permutation generator
could be used to iterate through the available conSgurations at each cut vertex and
the lower numbered vertex in each separation pair. Also, a bit string could be used
to track the Sipping of biconnected and triconnected components. For example, the
bit for a biconnected component could be 0 if the link[0] member of the biconnected
component root indicated an edge to a lower numbered neighbor than the link[l]
member, and 1 otherwise.
Thus, given a planar embedding G of a graph G, determining the rank of G
would be a m atter of assessing the permutations in evidence at each cut vertex and
at the lesser vertex of each separation pair, as well as assessing the bit string corre­
sponding to the Sip state of each biconnected and triconnected component. Finding
the planar embedding of least rank relative to G is a m atter of permuting and Sipping
biconnected and triconnected components such that the least bit string and permu­
tation is in evidence at each cut vertex and separation pair. Enumeration of planar
embeddings can proceed from the least ranked planar embedding relative to the pla­
nar embedding G produced by our algorithms by systematically enumerating through
the aforementioned bit strings and permutations. The work of Sipping components
can be kept to a minimum using a binary reSected Gray code sequence and can likely
be kept to constant time using a technique similar to but more sophisticated than
the edge signing used in our planarity algorithm. The work of permuting components
can be minimized using a single transposition (Gray code) permutation generator.
The triconnected components mapped to the transposed permutation elements can
be moved in constant time if the adjacency lists are doubly linked and if sufficient in­
formation exists in the data structure to easily find the sequence of edges that attach
each component to its cut vertex or separation pair.
Unranking a number n to produce the planar embedding relative to the
initial planar embedding G produced by our algorithms is also possible. By using
173

the well-known Trotter-Johnson algorithm as the permutation generator, a straight­


forward permutation unranking Eilgorithm can be used to match the Trotter-Johnson
algorithm's generation sequence [40].
One limitation of the approach described in this section is that it is dependent
on the actions of the initial depth hrst search of a graph G, which is performed in
the initial steps of generating the planar embedding G. Two isomorphic graphs with
non-equivalent vertex orders or adjacency list edge orders are processed diEerently by
depth first search. This in turn affects the planar embedding produced by our algo­
rithms and ultimately the defined total ordering upon which the above enumeration,
ranking and unranking ideas are based.

12.5 Searching for jFTg M inors and H om eom orphs in Linear


T im e
Searching for minors and homeomorphs in linear time is a long-standing
open problem. In fact, the best related work currently known is the O(n^) algorithm
of Kezdy and McGuinness [37] for isolating a minor. The difficulty of the problem
is best stated by Fellows and Kaschube: “We have attempted to modify the approach
behind the first algorithm [for homeomorph isolation] to provide a practical
algorithm for the subgraph homeomorphism problem, but there seem to be no
simple analogs to Theorems 1 and 2" [20, p. 289]. The new homeomorph isolator
in this dissertation is much more closely aligned to finding homeomorphs in the
context of the properties of the depth first search tree at the time non-planarity is
discovered. Hence, the new approach may yield significant insights into solving the
Ks subgraph homeomorphism problem, particularly if the 4-connected components
of a graph are considered separately.

12.6 Em bedding in th e P rojective P lan e


The projecWue p/one is equivalent to a disk with antipodal points identified.
Although Mohar [46] created a linear time algorithm for embedding graphs in the
174

projective plane, it is exceedingly complex [64]. Myrvold and Roth [48] created a
simpler algorithm exploiting some of the same properties, though it does not achieve
linear time. Thus, a projective planar embedding algorithm that is both relatively
simple and lin e^ time is wanting.
A projective planar embedding less the edges that pass through antipodal point
identifications is a planar embedding in which all endpoints of the edges so removed
are on the external face. Our new algorithms and data structures are specially suited
to maintaining the external face and embedding edges one at a time. Projective
planarity therefore appears to be a promising area of future research involving the new
algorithms in this dissertation. Given that there are a limited number of embeddings
of a Kuratowski subgraph [46] and that the adjacency lists can be reordered such
that edges which must pass through antipodal point identifications are back edges,
the solution to this problem may rest in the ability to find all of the edges to remove
and maintaining their endpoints on the external face.
B ibliography

[1] K. Appel and W. Haken. Every planar map is four colorable. Part I.
Discharging. TZfinow JonmoJ o/Moÿhemotica, 21:429-490, 1977.

[2] K. Appel and W. Haken. Eoery pZonor w /bur cofombk. Contemporary


Mathematics, Volume 98. American Mathematical Society, Providence, RI,
1989.

[3] K. Appel; W. Haken, and J. Koch. Every planar map is four colorable. Part H.
Redudbility. Rfmow Joumof o/Mothemotica, 21:491-567, 1977.

[4] T. Asano. An approach to the subgraph homeomorphism problem. TheoreficoZ


Compufer Science, 38:249-267, 1985.

[5] L. Auslander and S. V. Parter. On imbedding graphs in the plane. Journal of


Mathematics and Mechanics, 10:517-523, 1961.

[6 ] G. Battista and R. Tamassia. On-line planarity testing. SIAM Journal of


Computing, 25(5):956-997, 1996.

[7] K. S. Booth and G. S. Lueker. Testing for the consecutive ones property,
interval graphs, and graph planarity using PQ -tree algorithms. Journal of
Computer and Systems Sciences, 13:335-379, 1976.

[8 ] J. Boyer and W. Myrvold. Stop minding your P ’s and Q’s: A simplified 0{n)
planar embedding algorithm, froceedmps Tîenth AnnuoJ AGAf-&L4M
Symposium on Discrete Algorithms, pages 140-146, 1999.

[9] W. M. Brehaut. An efi&cient onterplanarity algorithm. Congreaaua


Numerantium, 26:99-113, 1977.

[10] J. Cai. Counting embeddings of planar graphs using DFS trees. SIAM Journal
of Discrete Mathematics, 6(3):335-352, 1993.

[11] N. Chiba, T. Nishizeki, A. Abe, and T. Ozawa. A linear algorithm for


embedding planar graphs using PQ-trees. Joumuf o/ Computer and .^patems
Sciences, 30:54-76, 1985.

[12] N. Chiba, T. Nishizeki, and N. Saito. A linear 5-coloring algorithm of planar


graphs. Journal o/Alportthma, 2(4):317-327, 1981.

[13] H. de Prayssebc and P. Rosenstiehl. A characterization of planar graphs by


trémaux orders. Combiuatorico, 5(2):127-135, 1985.

175
176

[14] G. Demoucroii, Y. Malgrange, and R. Pertuiset. Graphes planaires. Ret;.


fYnngowe Recherche Opéro(:onneffe, 8:33-47, 1964.

[15] N. Deo. Note on HopcroA and Tarjan planarity algorithm. Jowmol o/ the
Négociation /o r Computing Machinery, 23:74-75, 1976.

[16] J. A. EUis, M. Mata, and G. MeicGillivray. A linear time algorithm for longest
(a, t)-paths in weighted outerplanar graphs, if^ormation froceeainy Z^ettera,
32:199-204, 1989.

[17] L. Euler. Demonstratio nonnullarum insignium proprietatum quibus solida


hedris planis inclusa sunt praedita. Novi Comm. Acad. Rci. imp. Petropoi,
4:140-160, 1758.

[18] S. Even. Graph Algorithms. Computer Science Press, 1979.

[19] S. Even and R. E. Tarjan. Computing an at-numbering. Theoretical Computer


Science, 2:339-344, 1976.

[20] M. R. Fellows and P. A. Kaschube. Searching for in linear time. Zinear


and Multilinear Algebra, 29:279-290, 1991.

[21] T. Fee and J. Provan. Delta^wye transformations and the efficient reduction of
two-terminal planar graphs. Operations Research, 41(3):572-582, 1993.

[2 2 ] G. Prederickson. On linear-time algorithms for five-coloring planar graphs.


Information Processing Letters, 19:219-224, 1984.

[23] M. Garey and D. Johnson. Computers and Intractability: A Guild to the


Theory of NF-compieteness. Freeman, 1979.

[24] Alan Gibbons. Algorithmic Graph Theory. Cambridge University Press, 1985.

[25] A. J. Goldstein. An efficient and constructive algorithm for testing whether a


graph can be embedded in a plane. In Graph and Combinatorics Conf.
Contract No. NONR 1858-(21), Office of Naval Research Logistics Proj., Dep.of
Math., Princeton U., 2 pp., 1963.

[26] F. Hadlock. Finding a maximum cut in a planar graph in polynomial time.


SIAM Journal of Computing, 4(3):221-225, 1975.

[27] J. Hopcroft and R. Tarjan. A algorithm for determining isomorphism of


planar graphs. Information Processing Letters, 1:32-34, 1971.

[28] J. Hopcroft and R. Tarjan. Dividing a graph into triconnected components.


RL4M Joumol o/ GompuZmy, 2:135-158, 1973.

[29] J. Hopcroft and R. Tarjan. A yiogU algorithm for isomorphism of triconnected


planar graphs. JoumoZ o/ Gompufer ond Ryafems Rciencea, 7:323-331, 1973.
177

[30] J. Hopcroft and R. Tarjan. EfBcient planarity testing. Jonmoi 0 / <Ae


v4a^aocioWon /o r CompWing MocAmerp, 21(4):549-568, 1974.

[31] J. Hopcroft and J. Wong. Linear time algorithm for isomorphism on planar
graphs, f roceedmgs 0 / tAe vlnnuol ACM S'prnpoaium on Theory 0 /
Compn^iny, pages 172-184, 1974.
[32] R. Jayakumar, K. Thulasiraman, and M. N. S. Swamy. Planar embedding:
Linear-time algorithms for vertex placement and edge ordering. IEEE
Tbanaocfiong on Circnits and S^yatems, 35(3):334-344,1988.

[33] M. Jiinger, S. Leipert, and P. Mutzel. Pitfalls of using PQ-trees in automatic


graph drawing. In G. Di Battista, editor, Proc. 5th International Symposium
on Graph Drawing ‘97, volume 1353 of Lecture Notes in Computer Science,
pages 193-204. Springer Verlag, Sept. 1997.

[34] M. Juvan, J. Marincek, and B. Mohar. Embedding a graph in the torus in


linear time. In Lnfeyer Progromminp ond Conrhinotoriol Cpfimizotion, Lecture
Wotea ;n Computer 5'cience, Vol. pages 360-363. Springer, 1995.

[35] A. Karabeg. Classification and detection of obstructions to planarity. Linear


and Multilinear Algebra, 26:15-38, 1990.

[36] A. Karabeg. Ranking planar embeddings using PQ-trees. Annals of Discrete


Mathematics, 55:249-260, 1993.

[37] A. Kezdy and S. McGuinness. Sequential and parallel algorithms to find a ifg
minor. Proceedings of the Third Annual ACM-SIAM Symposium on Discrete
Algorithms, pages 345-356, 1992.

[38] P. Klein and J. Reif. An efficient parallel algorithm for planarity. 27*^ Annual
IEEE Symposium on Foundations of Computer Science, pages 465-477, 1986.

[39] W. Klotz. A constructive proof of Kuratowski’s theorem. Ars Combinatoria,


28:51-54, 1989.

[40] D. Kreher and D. Stinson. Com6iuotori(d A^onthma; Ceueratiou,


Enumeration, and Search. CRC Press, 1999.

[41] K. Kuratowski. Sur le problème des courbes gauches en topologie. fhud.


Moth., 15:271-283, 1930.

[42] A. Lempel, S. Even, and I. Cederbaum. An algorithm for planarity testing of


graphs. In P. Rosenstiehl, editor, Theory 0 / Cropha, pages 215-232, New York,
1967. (Proc. Int. Symp. Rome, July 1966), Gordon and Breach.

[43] R. J. Lipton and R. E. Tarjan. Applications of a planar separator theorem.


SIAM Journal of Computing, 9(3):615-627, 1980.
178

[44] D. Matula, Y. Shiloach, and R. Taijan. Two linear-time algorithms for


hve-coloring a planar graph. Technical Report CS-80-830, Department of
Computer Science, Stanford University, Nov. 1980.

[45] B. D. McKay. Practical graph isomorphism. Congreaans YnmernnfiMm,


30:45-87, 1981.

[46] B. Mohar. Projective planeirity in linear time. Jonm ol o/ .A/gontAma,


15:482-502, 1993.

[47] B. Mohar. Embedding graphs in an arbitrary surface in linear time.


Proceedin^a o/ vinnuof j4CM 5"ympoawm on Theory o/
CompnWny, pages 392-397, 1996.

[48] W. Myrvold and J. Roth. Simpler projective plane embedding. 6'irth


Jhtemoffonof Cor/erence on Groph Theory, AforaedZe TVnnce, pages 1-4, 2000.

[49] E. M. Reingold, J. Nievergelt, and N. Deo. Combinatorial Algorithms: Theory


ond Procfiee. Prentice-Hall, Inc., Englewood Cli&, New Jersey, 1977.

[50] N. Robertson, D. Sanders, P. Seymour, and R. Thomas. A new proof of the


four-colour theorem. Electronic Research Announcements of the American
Mathematical Society, 2{1):1-Q, 1996.

[51] F. Rubin. An improved algorithm for testing the planarity of a graph. IEEE
Transactions on Computers, c-24(2): 113-121, 1975.

[52] W.-K. Shih and W.-L. Hsu. A new planarity test. Theoretical Computer
5"c*ence, 223:179-191, 1999.

[53] R. E. Tarjan. Depth-first search and linear graph algorithms. SIAM Journal of
Computing, 1(2); 146-160, 1972.

[54] R. Thomas. An update on the four-color theorem. Notices of the American


Mathematical Society, 45(7):848-859, 1998.

[55] W. T. Tutte. Matroids and graphs. Trans. Amer. Math. Soc., 88:144-174, 1958.

[56] K. P. Vb. Finding triconnected components of graphs. Tineor ond MnZZdineor


Algebra, 13:143-165, 1983.

[57] K.P. Vo, W. Dick, and S. G. Williamson. Ranking and unranking planar
embeddings. Tineor ond Mn&ZZineor AZyehno, 18:35-65, 1985.

[58] K. Wagner. Uber einer eigenschaft der ebener complexe. MoZh. Ann.,
14:570-590, 1937.

[59] D. B. West. TnZrodncZZon Zo Groph Theory. Prentice Hall, Inc., Upper Saddle
River, NJ, 1996.
179

[60] R. Wiese. feraonoJ Commwntcofio». June 6, 2001.

[61] S. G. Winiamson. Embedding graphs in the plane- algorithmic aspects, vlnn.


Disc. Mofh., 6:349-384, 1980.

[62] S. G. Williamson. Depth-hrst search and Kuratowski subgraphs. JounW o/ (he


v4sgocia(*o»/or Computing MochineT-g, 31(4):681-693, 1984.

[63] S. G. Williamson. Combinatorics for Computer Science. Computer Science


Press, Rockville, Maryland, 1985.

[64] S. G. Williamson. Moth Reuiews, 941:05141, 1994.

You might also like