Abstract
We consider piecewise linear embeddings of graphs in 3space ℝ^{3}. Such an embedding is linkless if every pair of disjoint cycles forms a trivial link (in the sense of knot theory). Robertson, Seymour and Thomas (J. Comb. Theory, Ser. B 64:185–227, 1995) showed that a graph has a linkless embedding in ℝ^{3} if and only if it does not contain as a minor any of seven graphs in Petersen’s family (graphs obtained from K _{6} by a series of YΔ and ΔY operations). They also showed that a graph is linklessly embeddable in ℝ^{3} if and only if it admits a flat embedding into ℝ^{3}, i.e. an embedding such that for every cycle C of G there exists a closed 2disk D⊆ℝ^{3} with D∩G=∂D=C. Clearly, every flat embedding is linkless, but the converse is not true. We consider the following algorithmic problem associated with embeddings in ℝ^{3}:
Flat Embedding: For a given graph G, either detect one of Petersen’s family graphs as a minor in G, or return a flat (and hence linkless) embedding of G in ℝ^{3}.
The first outcome is a certificate that G has no linkless and no flat embeddings. Our main result is to give an O(n ^{2}) algorithm for this problem. While there is a known polynomialtime algorithm for constructing linkless embeddings (van der Holst in J. Comb. Theory, Ser. B 99:512–530, 2009), this is the first polynomialtime algorithm for constructing flat embeddings in 3space. This settles a problem proposed by Lovász (www.cs.elte.hu/~lovasz/klee.ppt, 2000).
Similar content being viewed by others
Avoid common mistakes on your manuscript.
1 Introduction
1.1 Embedding Graphs in 3Space
A seminal result of Hopcroft and Tarjan [14] from 1974 is that there is a lineartime algorithm for testing planarity of graphs. This is just one of a host of results on embedding graphs in surfaces. These problems are of both practical and theoretical interest. The practical issues arise, for instance, in problems concerning VLSI, and also in several other applications of “nearly” planar networks, as planar graphs and graphs embedded in low genus surfaces can be handled more easily. Theoretical interest comes from the importance of the genus parameter of graphs and from the fact that graphs of bounded genus naturally generalize the family of planar graphs and share many important properties with them. Recently, new and nontrivial lineartime algorithms concerning graph embeddings have appeared [18, 22]. In addition, Mohar [33, 34] gave a lineartime algorithm for testing embeddability of graphs in an arbitrary surface and constructing an embedding, if one exists. This result generalizes planarity algorithms [4, 14, 52]. Mohar’s algorithm is further simplified in [19].
In [41], Robertson and Seymour proved that for any fixed graph H there is a cubictime algorithm for testing whether H is a minor of a given graph G. This implies that there is an O(n ^{3}) algorithm for deciding membership in any minorclosed family of graphs, because such a family can be characterized by a finite collection of excluded minors [42]. Unfortunately, this approach is not explicit. More precisely, the graph minor theorem is not constructive; in general, we do not know how to obtain an excluded minor characterization of a given minorclosed family of graphs. In addition, Robertson and Seymour’s algorithm solves the decision problem, but it is not apparent how to construct, e.g., an embedding from their algorithm.
In this paper, we consider embeddings of graphs in \(\mbox {{$\mathbb {R}$}}^{3}\), where all embeddings are piecewise linear. There are many minorclosed families of graphs that arise in the study of topological problems. An illustrative example is the class of linklessly embeddable graphs. We say that a pair of vertexdisjoint cycles drawn in \(\mbox {{$\mathbb {R}$}}^{3}\) is unlinked if there is a 2dimensional disk^{Footnote 1} in \(\mbox {{$\mathbb {R}$}}^{3}\) that contains the first cycle and is disjoint from the other one. Otherwise, the two cycles are linked . Intuitively, if two cycles in \(\mbox {{$\mathbb {R}$}}^{3}\) are linked, we cannot contract one into a single point without cutting the other. By a linkless embedding we mean an embedding of a graph in \(\mbox {{$\mathbb {R}$}}^{3}\) in such a way that no two vertexdisjoint cycles are linked. Linkless embeddings were first studied by Conway and Gordon [8]. An algorithmic problem concerning linkless embeddings is studied by Motwani, Raghunathan and Saran [36], who gave a partial result for linkless embeddings and its algorithmic applications.
Robertson, Seymour and Thomas [47] proved that G is linklessly embeddable in 3space if and only if G does not have any graph in the Petersen family as a minor. By the Petersen family we mean the graphs that can be obtained from K _{6} by a series of YΔ and ΔY operations. See Fig. 1 for drawings of these graphs on the projective plane; note that the graph in Fig. 1(c) cannot be embedded in the projective plane. In the sequel, we will refer to this graph as \(K_{4,4}^{}\). In the same paper [47] it is shown that a graph is linklessly embeddable in \(\mbox {{$\mathbb {R}$}}^{3}\) if and only if it admits a flat embedding ^{Footnote 2} in \(\mbox {{$\mathbb {R}$}}^{3}\), i.e. an embedding such that for every cycle C of G, there exists a closed 2dimensional disk \(D \subseteq \mbox {{$\mathbb {R}$}}^{3}\) with D∩G=∂D=C. To refer to such a disk D we speak about a panel for C and write D=D(C). Clearly, every flat embedding is linkless, but the converse is not true. In many ways flat embeddings are nicer to work with, and in this paper we will work with flat rather than linkless embeddings.
Linkless embeddings have received a lot of attention in the literature. Besides those working on knot theory, many researchers working in discrete mathematics are also interested in this topic. For example, Lovász and Schrijver [29, 30] proved that two wellknown invariants given by Colin de Verdière [5–7] are closely related to linklessly embeddable graphs. The invariants are based on spectral properties of matrices associated with a graph G.
Flat embeddings in 3space are a generalization of embeddings in the plane. These two embedding problems share an interesting property. The famous theorem by Whitney which says that every 3connected planar graph has a unique planar embedding, can be generalized to the flat embedding case, i.e., every flatly embeddable 4connected graph G has an “essentially unique” flat embedding in \(\mbox {{$\mathbb {R}$}}^{3}\), see [47]. Here, “essentially unique” means embeddings up to ambient isotopy, which we will define later. In [28], Lovász asked for a polynomialtime algorithm for the following problem:
1.2 Our Main Result
The main contribution of this paper is to give a polynomialtime algorithm for the flat and linkless embedding problem. This result gives a positive answer to the question of Lovász [28] mentioned above.
Theorem 1.1
There is an O(n ^{2})time algorithm for the Flat and Linkless Embedding problem.
Let us observe that if the output of the algorithm is (1), i.e. a member of Petersen’s family as a minor of G, then we have one of the excluded minors for linklessly embeddable graphs and hence this is a certificate that G has no linkless (nor flat) embedding. As mentioned above, by Robertson and Seymour’s results in [41], we can test whether or not an input graph has one of Petersen’s family graphs as a minor, but if it does not contain any of them, that algorithm does not give the second conclusion, i.e. does not produce a flat or linkless embedding.
In [15], van der Holst gives the first polynomialtime algorithm for deciding whether a given graph has a linkless embedding and computing one, if it exists. In this paper we give a different algorithm for producing flat (and hence linkless) embeddings, which runs in quadratic time. Our algorithm is different from van der Holst’s in several respects:

1.
Our algorithm finds a flat embedding in \(\mbox {{$\mathbb {R}$}}^{3}\), while the algorithm from [15] finds linkless embeddings that are not necessarily flat.

2.
We improve on the time complexity as van der Holst’s algorithm needs at least Ω(n ^{5}) steps whereas ours runs in O(n ^{2}).

3.
The algorithm and the proof method in [15] are very algebraic and different from our paper, which is more combinatorial and geometric.
There are many NPhard problems which can be solved in polynomial time (often even linear time) when considering planar graphs or “nearly” planar graphs. Even for problems that remain NPhard on planar graphs, we often have efficient approximation algorithms, e.g., Independent Set, TSP, Weighted TSP, Vertex Cover, Domination Set, etc. [2, 13, 24, 27]. We expect that most of these fast algorithms for planar graphs can be generalized to linklessly embeddable graphs as well, using our algorithm in Theorem 1.1 and a flat embedding. In addition, linklessly embeddable graphs have an interesting property for the wellknown feedback arc set problem, i.e. the problem to compute in a given digraph G a minimum size set of edges whose removal makes G acyclic. Seymour [50] proved that the minimum size of a feedback arc set in an Eulerian linklessly embeddable digraph (i.e., the underlying undirected graph is linklessly embeddable) is equal to the maximum number of arcdisjoint directed cycles. This result can be compared to the wellknown result by Lucchesi and Younger [31], who proved that the same conclusion holds for any directed planar graph. The proof given in [50] implies that, given a flat embedding of a given Eulerian digraph G, there is a polynomialtime algorithm to find the minimum size of a feedback arc set, which gives rise to the maximum number of arcdisjoint directed cycles. Thus by Theorem 1.1, we can find such sets in polynomial time for any Eulerian linklessly embeddable graph.
1.3 Overview of the Flat Embedding Algorithm
At a high level of description, the algorithm for Theorem 1.1 proceeds as follows. First, we iteratively reduce the size of the input graph until it is 4connected and reaches a graph of bounded treewidth. Then the algorithm solves the problem on this graph of bounded treewidth.
Reduction step
For the reduction step, the algorithm first handles small separations and recursively proceeds to smaller graphs until these are 4connected. Afterwards, we involve the excluded grid theorem [12, 37, 39, 44]. If the treewidth of G is large enough, then G contains a large grid minor. By combining the results in [41] and [21], if an input graph does not contain a K _{6}minor, then, after deleting at most one vertex, we can find a grid minor which is planarly drawn, i.e., up to 3separations, the grid minor induces a planar embedding. If there is a separation (A,B) of order at most three in this planarly drawn grid, then this gives us a reduction (for details, we refer to Sect. 3). Otherwise, this grid minor induces a 2cell embedding in the plane (and hence it is a planar subgraph).
A deep theorem in [41] tells us that every vertex “deep inside” this grid minor is irrelevant with respect to all excluded minors in the Petersen family. (A shorter proof of this fact is given in [23].) In addition, we prove that such a vertex v does not affect our flat embedding in 3space. Hence, we can remove v without affecting flat embeddability of G. The main difficulty here is the proof of the existence of this vertex. Once we have proved that there is an irrelevant vertex, algorithmically such a vertex can be found in linear time. By repeating this step, we eventually obtain a subgraph G′ of G of bounded treewidth such that any flat embedding of G′ can be extended to a flat embedding of G, using the reverse steps of the reduction phase. This concludes the reduction step for the proof of Theorem 1.1.
Bounded treewidth case
This is the second step. Its proof of correctness uses two deep results from [47]. The first one is that any Kuratowski graph, i.e., a subdivision of K _{5} or K _{3,3}, has a unique flat embedding in \(\mbox {{$\mathbb {R}$}}^{3}\), where uniqueness means “up to an ambient isotopy”. The second ingredient is that if G is 4connected and has a flat embedding in \(\mbox {{$\mathbb {R}$}}^{3}\), then G has a unique flat embedding. By combining these two results, we get the following strong fact:
Fix a flat embedding of a Kuratowski subgraph K of a 4connected graph G in \(\mbox {{$\mathbb {R}$}}^{3}\). Then the rest of the graph is uniquely attached to K, if G has a flat embedding.
In general, this fact is not enough to derive a polynomialtime algorithm for constructing flat embeddings. However, if the treewidth of a 4connected graph is bounded, we can construct a flat embedding in polynomial time using dynamic programming, whenever one exists.
1.4 Basic Definitions
For basic graph theory notions, we refer the reader to the book by Diestel [11], for topological graph theory we refer to the monograph by Mohar and Thomassen [35].
A separation of a graph G is a pair (A,B) of subgraphs of G with A∪B=G such that there is no edge between A−B and B−A. The order k of the separation is V(A∩B). The separation (A,B) is proper if A−B≠∅ and B−A≠∅. A proper separation of order k is also called a kseparation . If (A,B) is a separation, we denote by A ^{+} the graph obtained from A by adding edges joining every pair of nonadjacent vertices in V(A∩B). We define B ^{+} analogously.
A treedecomposition of a graph G is a pair (T,B), where T is a tree and B is a family {B _{ t }∣t∈V(T)} of vertex sets B _{ t }⊆V(G), such that the following two properties hold:

1.
⋃_{ t∈V(T)} B _{ t }=V(G), and every edge of G has both ends in some B _{ t }.

2.
If t,t′,t″∈V(T) and t′ lies on the path in T from t to t″, then B _{ t }∩B _{ t″}⊆B _{ t′}.
The width of a treedecomposition (T,B) is max{B _{ t }:t∈V(T)}−1. The treewidth of G is defined as the minimum width taken over all treedecompositions of G. Let (T,B) be a treedecomposition of a graph G. By fixing a root r of T we give T an orientation. For t∈V(T) we define T _{ t } to be the subtree of T rooted at t, i.e., the subtree of T induced by the set of nodes s∈V(T) such that the unique path from r to s contains t. We define \(B(T_{t}):= \bigcup_{s\in V(T_{t})} B_{s}\).
One of the most important results about graphs of large treewidth is the existence of a large grid minor or, equivalently, a large wall. Let us recall that an (a×b)wall is a graph which is isomorphic to a subdivision of the following graph W _{(a,b)}. We start with vertex set V={(i,j)∣1≤i≤a, 1≤j≤b} and make two vertices (i,j) and (i′,j′) adjacent if one of the following possibilities holds: (1) i′=i and j′∈{j−1,j+1} or (2) j′=j and i′=i+(−1)^{i+j}. Some vertices of the so obtained graph may be of degree 1. We remove them to obtain a 2connected graph W _{(a,b)}.
It is easy to see that if a graph G contains an (a×b)wall as a subgraph, then it has an \((\lfloor\frac{1}{2}a\rfloor\times b)\)grid minor, and conversely, if G has an (a×b)grid minor, then it contains an (a×b)wall. Let us recall that the (a×b)grid is the Cartesian product of paths, P _{ a } □ P _{ b }. An (8×5)wall is shown in Fig. 2. We refer to an (r×r)wall as a wall of height r . In this paper we use the term rwall to denote the (2r×r)wall.
Theorem 1.2
There is a function f:ℕ→ℕ such that if a graph G has treewidth at least f(r), then G contains an rwall.
The best known upper bound for f(r) is given in [12, 37, 44]. It shows that one can take \(f(r) = 20^{2r^{5}}\). The best known lower bound on possible values of f(r) is Θ(r ^{2}logr), see [44].
1.5 Computational Complexity
Concerning the time complexity of our algorithms, we assume a randomaccess machine (RAM) model with unit cost for some basic operations. This model of computation was introduced by Cook and Reckhow [9]. It is known as the unitcost RAM where operations on integers, whose value is O(n) (and hence also integers of value O(n ^{k}) for any fixed k), need only constant time; here n is the size of the input. The same model of computation is used in most other embedding algorithms, for example in known lineartime planarity testing algorithms [14].
An important issue is how to represent a spatial embedding of a graph. It turns out that flat embeddings can be represented by integer coordinates in \(\mbox {{$\mathbb {R}$}}^{3}\), where each coordinate is bounded by a polynomial in n. Although there are some (elementary) geometric and algebraic details to be taken care of, we shall not dwell too much in this direction. Instead, we refer to the section on graph drawing in [26].
Concerning the input size, it is proportional to n=G, the number of vertices of the input graph. Namely, we first test for the presence of K _{6} as a minor. It is known [32] that every graph of order n with at least 4n edges contains K _{6} as a minor. So we may assume that the number of edges is ∥G∥=O(n), and thus the input size is also O(n).
2 Flatly and Linklessly Embeddable Graphs
In this section we recall some results about flatly embeddable graphs used later on.
2.1 Construction of Flat Embeddings
Recall that a piecewise linear embedding of a graph in \(\mbox {{$\mathbb {R}$}}^{3}\) is flat if every cycle of the graph bounds a 2dimensional disk disjoint from the rest of the graph. If C,C′ are disjoint simple closed curves in \(\mbox {{$\mathbb {R}$}}^{3}\), then their linking number is the number of times (modulo 2) that C crosses C′ in a regular projection of C∪C′ onto some hyperplane. It is easy to see that the linking number (modulo 2) is the same for every such projection. The proof of the following result is easy and the details are left to the reader.
Lemma 2.1
Let G be a graph, and σ be an embedding of G in \(\mbox {{$\mathbb {R}$}}^{3}\). Let C _{1},C _{2} be disjoint cycles in G, and let P be a path in G that is disjoint from C _{1}∪C _{2}, except that its end vertices are in V(C _{1}). Let \(C'_{1},C''_{1}\) be the two cycles in C _{1}∪P with \(C'_{1} \cap C''_{1}=P\). If the linking number of C _{1},C _{2} is nonzero, then also one of the linking numbers of \(C'_{1},C_{2}\) or \(C''_{1} ,C_{2}\) is nonzero.
Let v be a vertex of degree 3 in a graph G, with its three neighbors v _{1},v _{2},v _{3}. Let H be a graph obtained from G−v by adding three new edges v _{1} v _{2},v _{2} v _{3},v _{3} v _{1}. We say that H is obtained from G by a YΔ operation (at v), and G is obtained from H by a ΔY operation (at v _{1},v _{2},v _{3}). If G′ can be obtained from G by a series of YΔ or ΔY changes, we say that G and G′ are YΔequivalent . The Petersen family is the set of the seven graphs (up to isomorphism) that are YΔequivalent to K _{6}. One of these is the Petersen graph; see Fig. 1.
The following result was proved in [47].
Theorem 2.2
Let H be a graph obtained from a graph G by a YΔ operation. Then G has a flat embedding in \(\mbox {{$\mathbb {R}$}}^{3}\) if and only if H has one.
For the purpose of this paper, we need to construct a flat embedding of G from a flat embedding of H. The recipe is easy. The cycle C=v _{1} v _{2} v _{3} in H bounds a disk in \(\mbox {{$\mathbb {R}$}}^{3}\) that is otherwise disjoint from G. All we have to do is to embed the vertex v and the edges vv _{1},vv _{2},vv _{3} into this disk. The proof that this yields a flat embedding is given in [47, Theorem (4.4)].
It is easy to see that vertices of degree one can be deleted and vertices of degree two can be suppressed without affecting linkless or flat embeddability. Similarly, possible parallel edges or loops arising by these reductions can be eliminated. Thus it follows from Theorem 2.2 that we may assume that each vertex has degree at least 4. Furthermore, concerning vertices of degree 4, we have the following.
Lemma 2.3
Suppose that a graph G contains an edge uv, where deg_{ G }(u)=4 and deg_{ G }(v)=5. Suppose, moreover, that N(u)=(N(v)∪{v})∖{u,a} for some vertex a in N(v), so there is a separation (A,B) of order four such that B−A consists of u and v only. Then G has a flat embedding in \(\mbox {{$\mathbb {R}$}}^{3}\) if and only if for some (and hence for every) vertex b∈N(u)∖{v}, the graph G′ obtained from G by contracting the edge ub has a flat embedding.
Proof
It is clear that if G has a flat embedding, then also each minor G′ has one. Conversely, suppose that G′ has a flat embedding in \(\mbox {{$\mathbb {R}$}}^{3}\). Let b _{1},b _{2} be the vertices in (N _{ G }(u)∩N _{ G }(v))∖{b} (cf. Fig. 3) and consider the cycle C=bb _{1} vb _{2} b in G′. Let D=D(C) be the panel disk for C in G′. If we put the vertex u and the edges from u to V(C) into this disk, we obtain a flat embedding of G. For details, cf. [47, Theorem (5.2)].
□
We now prove the following result, which is important for our application. A proof is given in (4.6) in [47], but for completeness, we shall give a sketch of the proof. Recall from above the definition of the graphs A ^{+},B ^{+} for a separation (A,B) of a graph G.
Theorem 2.4
Suppose G has a proper separation (A,B) of order k≤4. Suppose, furthermore, that G contains both A ^{+} and B ^{+} as minors and that in the case when k=4, A−B and B−A are both connected. Then G has a flat embedding in \(\mbox {{$\mathbb {R}$}}^{3}\) if and only if both A ^{+} and B ^{+} have one.
Sketch of the proof
Clearly, if G has a flat embedding, then so do its minors A ^{+} and B ^{+}. Suppose, conversely, that A ^{+} and B ^{+} have flat embeddings in \(\mbox {{$\mathbb {R}$}}^{3}\). Since the proof is easy when k≤2, we shall assume henceforth that k≥3.
If k=3, let C be the 3cycle in A ^{+} and B ^{+} on vertices V(A∩B). We may transform the flat embedding of A ^{+} so that the panel D(C) is in a hyperplane in \(\mbox {{$\mathbb {R}$}}^{3}\) and so that A ^{+} lies entirely in the “upper” halfspace. If we make the same with B ^{+}, where B ^{+} lies in the “lower” halfspace, we can combine both flat embeddings into a embedding of A ^{+}∪B ^{+} by identifying D(C) in both embeddings. The proof that this yields a flat embedding is given in [47, Theorem (4.6)].
Suppose now that k=4. The panels for the four 3cycles in the complete subgraph K _{4} on A ^{+}∩B ^{+} in A ^{+} can be selected so that their mutual intersection is only at the common edges. Thus, they form a surface of the 2sphere, which separates \(\mbox {{$\mathbb {R}$}}^{3}\) into two regions. Since A−B is connected, we may assume that all edges and vertices of A ^{+} lie in the unbounded region. Similarly, we may get a flat embedding of B ^{+} such that the graph is disjoint from the exterior of the 2sphere bounded by the panels of K _{4}. Again, both embeddings can be combined to obtain an embedding of G, which is flat as proved in [47, Theorem (4.6)]. □
As we show now, the condition in Theorem 2.4, that A−B and B−A must be connected (when k=4), is automatically satisfied if the graph G does not contain Petersen family minors. More precisely, it suffices to exclude the graphs \(K_{4,4}^{}\) and \(K_{3,4}^{+}\), where \(K_{4,4}^{}\) is the graph isomorphic to K _{4,4} minus one of the edges, and \(K_{3,4}^{+}\) is obtained from \(K_{4,4}^{}\) by a YΔ operation at one of the two vertices of degree three. See Fig. 1(c) for an illustration of \(K_{4,4}^{}\) and Fig. 1(b) for a drawing of \(K_{3,4}^{+}\). Note that \(K_{3,4}^{+}\) can be obtained from K _{3,4} by adding a triangle on three vertices in the partition of size 4. This property, proved in the next theorem, will enable us not to impose connectivity on A−B and B−A when using Theorem 2.4.
Theorem 2.5
Let G be a 4connected graph and let (A,B) be a proper separation of order 4. Suppose, furthermore, that G contains both A ^{+} and B ^{+} as a minor. If A−B has more than one component, then G contains either \(K_{4,4}^{}\) or \(K_{3,4}^{+}\) as a minor.
Proof
We shall prove that G has \(K_{4,4}^{}\) or \(K_{3,4}^{+}\) as a minor, where four vertices of one bipartite class are rooted at V(A∩B). This means that each of the connected subgraphs of G that are contracted to these four vertices contains one vertex in V(A∩B). Since A−B has at least two components and G is 4connected, the graph A gives rise to the K _{2,4} minor rooted at V(A∩B). In the rest of the proof we shall show that we can get the rest of the required rooted minor in B.
Let V(A∩B)={a,b,c,d}. Let B _{ d }=B ^{+}−d. Since G is 4connected, B _{ d } is 3connected. As shown in [40] (cf. also [16]), there is a rooted K _{2,3}minor with vertices a,b,c being the roots for the vertices of degree two in K _{2,3}, unless B _{ d } is a planar graph with a,b,c in the outer face boundary. If we get a rooted K _{2,3}minor, then it is easy to get one additional path from d to one of the degree3 vertices x in this minor by using Menger’s theorem in the 4connected graph G to get four internally disjoint paths from x to V(A∩B). All of the above yields a \(K_{4,4}^{}\) as a minor in G.
It remains to consider the case when B _{ d } is planar and a,b,c lie on the same face of the planar embedding. We may assume that the same property holds for other subgraphs, B _{ a },B _{ b }, and B _{ c }.
Case 0: A∩B contains a 3cycle. Then this cycle and 4 paths from a vertex x in B−A to A∩B give rise to a \(K_{3,4}^{+}\) minor, where the partition with four vertices is formed by {a,b,c,d} and the other partition is formed by x and two components A _{1},A _{2} in A−B.
Case 1: B−A is 2connected. Consider the embedding of B _{ d } in the plane and the induced embedding of B−A. The outer cycle C of B−A can be split into six segments, C _{ a },C _{ ab },C _{ b },C _{ bc },C _{ c },C _{ ca }, some of them possibly just a vertex, such that C _{ a } is the segment determined by the neighbors of a on C, etc.
Subcase 1.1: ab∈E(G). Let P be the path from a to b consisting of C _{ ab } and the edges from a and b (respectively) to the ends of C _{ ab }. If d has a neighbor in B−A−P, then there is a \(K_{3,4}^{+}\) minor. Otherwise, d is only adjacent to C _{ ab }. In this case d can be added into the face containing all its neighbors, and it is easy to see that we get a \(K_{3,4}^{+}\)minor in G.
Subcase 1.2: \(ab\not\in E(G)\). By symmetry among a,b,c,d, we may assume now that there are no edges between any of a,b,c,d. In this case we obtain a \(K_{3,4}^{+}\)minor again.
Case 2: B−A has a cutvertex v. Let Q,R be components of B−A−v. By 4connectivity, each of Q and R is adjacent to at least three vertices in A∩B. If these are the same three for Q and R, we get a \(K_{4,4}^{}\) minor in the same way as at the beginning of this proof. Thus, we may assume that Q is adjacent to a,b,c and R to b,c,d. Since this holds for every cutvertex v, the block structure of B−A is pathlike, the two endblocks have neighbors in a,b,c and b,c,d (respectively), all intermediate blocks have neighbors b and c, but not a or d. A short proof also shows that B is planar with a,b,d,c on the outer face (in the order as listed). If ad∈E(G) or bc∈E(G), we get a \(K_{3,4}^{+}\) minor (contract endblocks without their cutvertices to see this). Otherwise, we get a contradiction to A ^{+} being the rooted minor in G. □
2.2 Spatial Embeddings of 4Connected Graphs
The aim of this section is to show that 4connected linklessly embeddable graphs have essentially unique flat embedding in \(\mbox {{$\mathbb {R}$}}^{3}\). The following results are proved in [47] along with its companion papers [45, 46]. Readers not familiar with these results may wish to consider the survey [48] which contains many of the results needed below. We refer to the graphs K _{5}, the complete graph on five vertices, and K _{3,3}, the complete bipartite graph with three vertices per partition, as the Kuratowski graphs. A Kuratowski subgraph of a graph G is a subgraph of G isomorphic to a subdivision of a Kuratowski graph. Let us recall that by a classic result of Kuratowski [25], a graph is planar if and only if it contains no Kuratowski subgraph.
An embedding ϕ of a graph in \(\mbox {{$\mathbb {R}$}}^{3}\) is spherical , if there exists a surface \(\mathcal{S}\subseteq \mbox {{$\mathbb {R}$}}^{3}\) homeomorphic to the 2sphere such that \(\phi(G) \subseteq\mathcal{S}\).
Lemma 2.6
(Wu [53])
An embedding of a planar graph in \(\mbox {{$\mathbb {R}$}}^{3}\) is flat if and only if it is spherical.
Let ϕ _{1},ϕ _{2} be embeddings of a graph in \(\mbox {{$\mathbb {R}$}}^{3}\). We say that ϕ _{1} and ϕ _{2} are ambient isotopic , written as ϕ _{1}≅_{ a.i.} ϕ _{2}, if there exists an orientationpreserving homeomorphism from \(\mbox {{$\mathbb {R}$}}^{3}\) to \(\mbox {{$\mathbb {R}$}}^{3}\) mapping ϕ _{1} onto ϕ _{2}. We will generally not distinguish between two ambient isotopic embeddings and consider them to be equivalent.
An important fact we will be using below is that 4connected linklessly embeddable graphs have (essentially) a unique flat embedding into 3space (up to ambient isotopy). Precisely, if ϕ _{1},ϕ _{2} are flat embeddings of a 4connected graph in \(\mbox {{$\mathbb {R}$}}^{3}\), then either ϕ _{1}≅_{ a.i.} ϕ _{2} or ϕ _{1}≅_{ a.i.}−ϕ _{2}, where −ϕ _{2} is the composition of ϕ _{2} and the antipodal map. This is a consequence of the following lemmas.
Lemma 2.7
Any two flat embeddings of a planar graph are ambient isotopic.
In fact, a graph has a unique flat embedding if and only if it is planar. Note that this lemma does not require 4connectivity.
For the purpose of describing a flat embedding of a planar graph, all we have to do is to embed the graph into a plane in \(\mbox {{$\mathbb {R}$}}^{3}\).
The following is Theorem (7.7) from [47] (see also Theorem (3.4) in [48]).
Lemma 2.8
The graphs K _{5} and K _{3,3} have exactly two nonambient isotopic flat embeddings.
Sketch of proof
Let G be a Kuratowski graph and let e∈E(G). Then G−e is planar and, by Lemma 2.7, has a unique flat embedding ϕ into \(\mbox {{$\mathbb {R}$}}^{3}\). In fact, by Lemma 2.6, \(\phi(G) \subseteq\mathcal{S}\) for a surface \(\mathcal{S}\subseteq \mbox {{$\mathbb {R}$}}^{3}\) homeomorphic to the 2sphere. Essentially, we have two choices where to draw the edge e, namely inside either of the two components of \(\mbox {{$\mathbb {R}$}}^{3}\mathcal{S}\), as any two flat embeddings of the edge in the same component yield ambient isotopic embeddings. □
If ϕ is an embedding of a graph G and H⊆G, we write ϕ_{ H } for the restriction of ϕ to H. The next lemma is Theorem (3.5) in [48].
Lemma 2.9
Let ϕ,ϕ′ be flat embeddings of a graph G which are not ambient isotopic. Then there is a Kuratowski subgraph H of G for which ϕ_{ H } and ϕ′_{ H } are not ambient isotopic.
We now define a neighborhood relation between Kuratowski subgraphs of a graph G. Let H _{1},H _{2}⊆G be Kuratowski subgraphs of G such that \(H_{1}\not=H_{2}\). The subgraphs H _{1} and H _{2} are 1adjacent if there exist a path P⊆G and an i∈{1,2} such that P has only its end points in common with H _{ i } and such that H _{3−i }⊆H _{ i }∪P.
H _{1} and H _{2} are 2adjacent if there are distinct vertices v _{1},…,v _{7}∈V(G) and pairwise internally vertexdisjoint paths L _{ i,j }, for (i,j)∈{1,…,4}×{5,6,7}∪{(3,4)} linking v _{ i } and v _{ j } such that H _{1}=⋃{L _{ i,j }∣(i,j)∈{2,3,4}×{5,6,7}} and H _{2}=⋃{L _{ i,j }∣(i,j)∈{1,3,4}×{5,6,7}}. See Fig. 4 for an illustration. The path L _{3,4}, illustrated by the dotted edge in Fig. 4, is not used here but is required to exist. Note that if H _{1},H _{2} are 2adjacent, then they are both isomorphic to subdivisions of K _{3,3}. H _{1} and H _{2} are adjacent if they are 1 or 2adjacent. The following result is (3.7) in [48].
Lemma 2.10
Let ϕ,ϕ′ be flat embeddings of G and let H,H′ be adjacent Kuratowski subgraphs of G. If ϕ_{ H }≅_{ a.i.} ϕ′_{ H } then ϕ_{ H′}≅_{ a.i.} ϕ′_{ H′}.
We say that H and H′ communicate if there are Kuratowski subgraphs H=H _{1},…,H _{ k }=H′ of G such that H _{ i } and H _{ i+1} are adjacent for all 1≤i<k.
The following result is proved in [45].
Lemma 2.11
If G is 4connected, then all pairs of Kuratowski subgraphs of G communicate.
In fact, the stronger statement holds: that Kuratowski subgraphs communicate for all graphs which are Kuratowski 4connected, which essentially says that no two Kuratowski subgraphs can be separated by a separation of order at most 3. For our purposes it suffices to note that any 4connected graph is also Kuratowski 4connected. The previous lemmas imply the following result about uniqueness of embeddings for 4connected graphs. The next result was proved by Robertson et al., see [47, 48].
Lemma 2.12
If ϕ,ϕ′ are flat embeddings of a 4connected graph G, then ϕ≅_{ a.i.} ϕ′ or ϕ≅_{ a.i.}−ϕ′.
Proof
If G is planar then by Lemma 2.7 there is only one flat embedding (up to ambient isotopy). Otherwise, G contains a Kuratowski subgraph K. By Lemma 2.8 either ϕ_{ K }≅_{ a.i.} ϕ′_{ K } or ϕ_{ K }≅_{ a.i.}−ϕ′_{ K }. By going from ϕ′ to −ϕ′ if necessary, we can assume that ϕ_{ K }≅_{ a.i.} ϕ′_{ K }. By Lemmas 2.10 and 2.11 ϕ_{ H }≅_{ a.i.} ϕ′_{ H } for all Kuratowski subgraphs H⊆G. Hence, by Lemma 2.9, ϕ≅_{ a.i.} ϕ′. □
For the purpose of this paper this suggests the following algorithm for determining a flat embedding of a graph G. We first choose a Kuratowski subgraph H of G and fix a flat embedding of H. We then choose an adjacent Kuratowski subgraph H′ of G and extend the flat embedding of H to H∪H′∪L (where L=L _{3,4} is the additional path in the case of 2adjacency, and L=∅ in case of 1adjacency). This extension is essentially unique. For, suppose there were two nonambientisotopic flat embeddings ϕ _{1},ϕ _{2} of H∪H′∪L extending the embedding of H. As ϕ _{1},ϕ _{2} agree (up to ambient isotopy) on H, and H and H′ are adjacent in H∪H′∪L, Lemma 2.10 implies that they also agree on H′. But then, by Lemma 2.9, as they agree on all Kuratowski subgraphs, ϕ _{1},ϕ _{2} agree on H∪H′∪L. Note that Lemma 2.10 and Lemma 2.9 do not require the graph to be 4connected.
However, if G is 4connected, then by starting from one Kuratowski subgraph, whose embedding we fix, and iteratively proceeding to adjacent Kuratowski subgraphs, we can embed all Kuratowski subgraphs of G. As shown in the next lemma, each edge of a 4connected nonplanar graph is contained in a Kuratowski subgraph. Thus, the above procedure provides a unique extension to the whole graph. We will employ this idea in Sect. 4.
Lemma 2.13
Each edge in a 4connected nonplanar graph is contained in some Kuratowski subgraph.
Proof
Let K be a Kuratowski subgraph of G, let U be the set of vertices of degree 3 or 4 in K, and let uv∈E(G)∖E(K). If u,v∈U, then K+uv contains a Kuratowski subgraph that includes the edge uv, unless K is a subdivision of K _{3,3} and u,v are its vertices of degree three in the same bipartite class. Let us call such a pair of vertices a bad pair in K. Suppose now that u∉U. Since G is 4connected, there are four internally disjoint paths connecting {u,v} and K, where one of them starts at v and three start at u. The path from v plus one of the paths from u make a path P in G that does not connect a bad pair of vertices in U. Then it is easy to see that K+P contains a Kuratowski subgraph that includes the edge uv.
Suppose now that the edge uv joins a bad pair in every Kuratowski subgraph of G. Then G′=G−u is planar. Since G′ is 3connected, it has a unique embedding in the plane. Let v and v _{1},…,v _{ r } (r≥3) be the neighbors of u in G. If G′+uv+uv _{ i } or G′+uv _{ i }+uv _{ j } is nonplanar, then the added edges give rise to a Kuratowski subgraph of G in which the edge uv does not connect a bad pair. The same conclusion holds by adding three edges uv,uv _{ i },uv _{ j }. This means that any three vertices v,v _{ i },v _{ j } (1≤i<j≤r) lie in the same face of G′. As G is nonplanar, not all neighbors of u can lie in the same face of G′. But this is possible only if r=3, deg(v)=3 and v _{1},v _{2},v _{3} are neighbors of v. See Fig. 5 for an illustration. In this case, v _{1},v _{2},v _{3} separate the graph G, and this contradiction completes the proof.
□
2.3 Separations of Small Order
Finally, we summarize some purely graph theoretic results concerning separations of order at most four that were proved in [43]. They will be needed later.
Theorem 2.14
Let G be a connected graph and let v _{1},v _{2},v _{3} be vertices in G. Suppose G has no separation (A,B) of order at most two such that {v _{1},v _{2},v _{3}}⊆V(B) and A−B≠∅. Then either

1.
G contains disjoint trees T _{1},T _{2},T _{3} such that T _{ i } contains v _{ i } for i=1,2,3, and for all 1≤i<j≤3, there is an edge between T _{ i } and T _{ j }, or

2.
G is isomorphic to the star K _{1,3} in which v _{1},v _{2},v _{3} are the vertices of degree one.
Theorem 2.15
Let G be a connected graph and v _{1},v _{2},v _{3},v _{4} be four vertices in G. Suppose G has no separation (A,B) of order at most three such that {v _{1},v _{2},v _{3},v _{4}}⊆V(B) and A−B≠∅. Then one of the following cases holds:

1.
G has disjoint trees T _{1},T _{2},T _{3},T _{4} such that T _{ i } contains v _{ i } for i=1,2,3,4, and for all 1≤i<j≤4, there is an edge between T _{ i } and T _{ j }.

2.
G−{v _{1},v _{2},v _{3},v _{4}} has at most two vertices, and each of them has degree at least four in G.

3.
G can be drawn in a disk such that v _{1},v _{2},v _{3}, and v _{4} are on the boundary of the disk.
The above results imply the following:
Theorem 2.16
Let G be a graph of minimum degree at least 4. If G has no proper separation (A,B) of order at most three such that G contains both A ^{+} and B ^{+} as a minor, then G is 4connected.
Proof
Suppose G has a proper kseparation (A,B) with k≤3. We take such a separation of minimum order. If k≤2, then we can easily find both A ^{+} and B ^{+} as a minor. Thus, we may assume that k=3. By Theorem 2.14 applied to the graph B with {v _{1},v _{2},v _{3}}=V(B)∩V(A), if G does not contain A ^{+} as a minor (i.e., excluding case (1) of the theorem), then case (2) holds, so B−A consists of a single vertex, which is impossible, because the minimum degree of G is at least 4. Similarly, we argue that G contains B ^{+} as a minor. This contradiction to the assumptions proves that G is 4connected. □
2.4 Societies and Embeddability up to 3Separations
We use the notion of a “society” introduced by Robertson and Seymour in [40]. Let Ω be a cyclic permutation of the elements of some set; we denote this set by V(Ω). A society is a pair (G,Ω), where G is a graph and Ω is a cyclic permutation with V(Ω)⊆V(G). A cross in a society (G,Ω) is a pair of disjoint paths P _{1} and P _{2} in G such that each P _{ i } has its endpoints in V(Ω) and no other vertex in V(Ω), and further, if we let s _{ i } and t _{ i } be the ends of P _{ i } for i=1,2, then s _{1}≤s _{2}≤t _{1}≤t _{2} in the order Ω. A society is crossfree if it has no crosses. A society (G,Ω) is rural if G can be drawn in a disk with V(Ω) drawn on the boundary of the disk in the cyclic order given by Ω. Clearly, a rural society is crossfree. A theorem of Robertson and Seymour [40] says that this is essentially the only obstruction. First we give a definition. A society (G,Ω) is rurally 4connected if for every separation (A,B) of order at most three with V(Ω)⊆A, the graph B can be drawn in a disk with the vertices of A∩B drawn on the boundary of the disk. The next result follows from [40].
Theorem 2.17
Every crossfree rurally 4connected society is rural.
The notion of a rurally 4connected society involves separations of order at most three. In order to control crosses when we leave out the requirement that the part B in those separations is planar, we introduce another notion of an embedding up to 3separations. We say that the society (G,Ω) can be embedded into the disk up to 3separations, if for some k≥0, there are pairwise disjoint sets A _{1},…,A _{ k }⊆V(G)∖V(Ω) such that

(1)
for 1≤i,j≤k with i≠j, N(A _{ i })∩A _{ j }=∅,

(2)
for 1≤i≤k, N(A _{ i })≤3, and

(3)
if G′ is the graph obtained from G by deleting A _{1}∪⋯∪A _{ k } and adding new edges joining every pair of distinct vertices in N(A _{ i }), for i=1,…,k, then the induced society (G′,Ω) is rural.
Let us observe the following. Let \({\mathcal{A}}\) ={A _{1},…,A _{ k }}. Then we can choose \({\mathcal{A}}\) so that, subject to (1)–(3), the following property holds:

(4)
If N(A _{ i })=3, then N(A _{ i }) induces a facial triangle in the rural disk embedding of G′.
To see this, we choose \({\mathcal{A}}\) such that, subject to (1)–(3), the number of nonfacial triangles in G′ induced by members of \({\mathcal{A}}\) is minimum. Suppose, without loss of generality, that N(A _{1})=3 and N(A _{1}) induces a triangle T _{1} in G′, which is not facial. Let D _{1}⊆V(G′) be such that, for each x∈V(G), x∈D _{1} if and only if x is contained in the closed disk bounded by T _{1}. Define \(A'_{1} \subseteq V(G)\) such that, for each x∈V(G), \(x \in A'_{1}\) if and only if x∈D _{1}∖N(A _{1}) or x∈A _{ j } for some A _{ j } with N(A _{ j })⊆D _{1}. Let \({\mathcal{A}}' = ({\mathcal{A}}\setminus\{A_{j}\mid N(A_{j}) \subseteq D_{1}\})\cup \{A'_{1}\}\). Then (1)–(3) hold for \({\mathcal{A}}'\), but the number of nonfacial triangles in G′ is smaller, a contradiction.
We may also assume the following:

(5)
If N(A _{ i })=j, then there is no separation (A,B) of order at most j−1 in G′ such that N(A _{ i })⊆A and V(Ω)⊆B.
To see this, observe that otherwise, we could have replaced A _{ i } by (A−B)∪A _{ i }.
In the notion of embeddings up to 3separations, we shall omit the reference to the society Ω if this is clear from the context.
3 Bounding the TreeWidth
In this section we will present the reduction step of the general algorithm for solving the Flat and Linkless Embedding problem as presented in Sect. 5. Let us observe that by Theorem 2.2 and Lemma 2.3 (and remarks preceding Lemma 2.3), we may assume that every vertex in the given graph G has minimum degree at least 4, and no vertex of degree 4 satisfies the assumptions of Lemma 2.3.
Let us define the nails of a wall W to be the vertices of degree three in W. To exclude trivial cases, we shall assume that all walls and subwalls treated in the sequel are large enough. Let us say they have height at least five. As walls are subdivisions of 3connected graphs, Whitney’s theorem implies that every wall has a unique planar embedding. The perimeter of a wall W, denoted per(W), is the unique cycle of W bounding the face in the planar embedding of W which contains more than 6 nails; see Fig. 2. The bricks of a wall are the faces containing at most 6 nails. For any wall W contained in a graph H, there is a unique component U of H−per(W) containing W−per(W). The compass of W, denoted comp(W), consists of the graph with vertex set V(U)∪V(per(W)) and edge set E(U)∪E(per(W))∪{xy∈E(G)∣x∈V(U),y∈V(per(W))}. A subwall W′ of a wall W is a wall which is a subgraph of W. A subwall of W is proper if it consists of consecutive bricks in consecutive rows of W. The exterior of W′ is W−W′. A proper subwall is dividing in H if its compass is disjoint from its exterior. We say that a proper subwall W′ is dividing in a subgraph H′ of H if W′⊆H′ and the compass of W′ in H′ is disjoint from (W−W′)∩H′.
A wall is crossfree if its compass does not contain two vertexdisjoint paths having their ends on the perimeter of the wall, where they appear in the interlaced order. Note that if the compass of W has a planar embedding whose infinite face is bounded by the perimeter of W, then W is crossfree.
Seymour [49], Thomassen [51], and others proved that a wall W is crossfree if and only if its compass can be embedded into the plane up to 3separations such that its perimeter is the outer face boundary (and plays the role of the cyclic order in the society).
It is easy to see that any subwall of a crossfree wall must be both crossfree and dividing. Furthermore, if x and y are two vertices of a crossfree wall W and the graph H contains a path between them which is internally disjoint from W, then either x and y are both on per(W) or some brick contains both of them. If W′,W″ are subwalls of W, the facedistance of W′ and W″ is the minimum number r of bricks B _{1},…,B _{ r } in W such that W′∪W″∪B _{1}∪⋯∪B _{ r } is connected.
Robertson and Seymour [41] proved:
Theorem 3.1
For every pair of positive integers l and t, there exist integers w(l,t)>w′(l,t)>l+t such that the following holds. Let K be a graph of order t. If the treewidth of a graph H is at least w(l,t), and H has no Kminor, then there is a wall W⊆H of height w′(l,t), and for some subset X of less than \(t \choose2\) vertices of H there are 10 disjoint proper subwalls W′ (of the wall W) of height l, which are disjoint from X and are crossfree and dividing in H−X. In addition, these subwalls of height l have facedistance at least t ^{10} from each other in the wall W.
Explicit bounds for w(l,t) are known. Combining the bound for the grid theorem in [44], the proof of Theorem 3.1 in [41] implies that \(w(l,t) \leq10^{10^{10^{q}}}\), where q=l ^{t}. Let us observe that the constants 10 and 10^{t} in Theorem 3.1 can be replaced by any other prescribed constants (as proved in [41]); such a change only affects the integers w(l,t) and w′(l,t).
When we consider the presence of some fixed graph M as a minor in G, a vertex v∈V(G) is said to be irrelevant (with respect to existence of M minors) if G has an Mminor if and only if G−v has one. The following result was proved in [41] (a shorter proof appears in [23]).
Theorem 3.2
There is a computable function f:ℕ→ℕ satisfying the following. Let t and l≥f(t) be positive integers, and let H,W,X,K,w(l,t), and w′(l,t) be as in Theorem 3.1. Then there is a proper subwall W′ of the wall W of height at least l, which is disjoint from X and is crossfree and dividing in H−X, such that every vertex that has facedistance in W′ at least l/2 from the perimeter of W′ is irrelevant with respect to existence of Kminors.
For the special case when K=K _{6} in Theorem 3.2, a stronger version given below is proved in [21]. One strengthening is that in this case we have X≤1, so we may assume that X consists of a single vertex. Secondly, a K _{6}minorfree graph cannot have three subwalls of a large wall W that are pairwise at facedistance at least two and are dividing but not crossfree in H−X. So, we can find a subwall W′ that is dividing and crossfree in H−X, and in W′ we can find irrelevant vertices. In the sequel we show how one can find W′ (and hence also irrelevant vertices) in linear time.
Theorem 3.3
There exists an integer f _{0} such that for every l≥f _{0}, there are integers w(l)>w′(l)>l satisfying the following. Let H be a graph that does not contain a K _{6}minor and whose treewidth is at least w(l). Then H contains a wall W of height w′(l) and also contains a vertex x∈V(H) such that W contains a subwall W′ of height l that is crossfree and dividing in H−x. Given the wall W, either a K _{6}minor or the vertex x and the subwall W′ can be found in linear time.
We now address how one can obtain the algorithmic result, as claimed at the end of Theorem 3.3. First, it is easy to see that if H has at least 64H edges, then one can find a K _{6}minor in H in linear time; see [38]. If so, we are done. So, a flatly embeddable graph H has at most 64H edges, which we assume henceforth. Second, we apply the algorithmic version of Theorem 3.2. Results in [20], which generalizes the result in [41], yield an algorithm, whose running time is O(∥H∥)=O(H), to get the subset X and subwall W′ as in Theorem 3.2. A possible drawback is that X could be as many as \(t \choose2\), as in Theorem 3.1. However, when t=6, it is then easy to adapt the algorithm to obtain Theorem 3.3 since, as shown in [21], a graph without K _{6} minor can have at most two subwalls at facedistance at least two that are not crossfree.
We now prove the following result concerning flat embeddings. Recall from the beginning of this section that we may assume that a graph G has minimum degree at least 4.
Theorem 3.4
There is a constant f satisfying the following. Let G be a given input graph of minimum degree at least 4, and let W,w(l),w′(l) be as in Theorem 3.3 with l≥f. Then one of the following holds:

1.
G contains K _{6}, \(K_{4,4}^{}\) or \(K_{3,4}^{+}\) as a minor.

2.
For some vertex x∈V(G), there is a proper subwall W′ (of the wall W) of height more than l in G−x that is dividing and crossfree in G−x. Moreover, every vertex v which has facedistance at least l/2 from per(W′) in the wall W′ is irrelevant with respect to the existence of Kminors, where K is any graph in the Petersen family. Furthermore, for every flat embedding of the graph G−v in \(\mbox {{$\mathbb {R}$}}^{3}\), the embedding of G−v can be extended to a flat embedding of G.

3.
There is a reduction as in Lemma 2.3.

4.
There is a separation (A,B) of order at most four in G such that x∈V(A∩B) and V(A∩B)∖{x}⊆comp(W) (where the vertex x is as above) and per(W)⊆B. Moreover, G contains both A ^{+} and B ^{+} as minors. In particular, the separation (A,B) gives rise to a reduction as in Theorem 2.4.
Proof
By Theorem 3.3, if G does not contain K _{6} as a minor, then there exists a vertex x∈V(G) such that there is a proper subwall W′ (of the wall W) of height l in G−x that is crossfree and dividing in G−x. We observe that W′ is not dividing in G, if x exists.
Suppose first that comp(W′) is not crossfree. Let us observe that the pair (comp(W′),per(W′)) is a society in G−x, where we use the cyclic order of vertices on the cycle per(W′). Since comp(W′) is crossfree and dividing in G−x, the society (comp(W′),per(W′)) is rurally 4connected by Theorem 2.17. We may assume that there is a separation (A′,B′) of order at most three in the society (comp(W′),per(W′)) such that B′ contains all vertices of per(W′), and in addition, A′ does not have an embedding in the plane with V(A′∩B′) in the outer face boundary. (For otherwise, comp(W′) would be crossfree in G−x.)
By Theorem 2.16 and since the minimum degree of G is at least 4, it follows that G is 4connected.
Therefore, if V(A′∩B′)≤2, then adding x to both A′ and B′ would yield a separation of order at most three in the original graph G. Furthermore, if x∉N(A′−B′), then again, (A′,B′+x) would be a separation of order at most three in G. Thus we may assume that V(A′∩B′)=3, and x has a neighbor in A′−B′. We set A=A′+x and B=B′+x. By the 4connectivity of G and the rural 4connectivity of the society (comp(W′),per(W′)), it follows that B contains a K _{4}minor rooted at V(A∩B) and that B−A is connected. In particular, G contains A ^{+} as a minor. If A−B is disconnected, then we are done, as there is a K _{6}, \(K_{4,4}^{}\) or \(K_{3,4}^{+}\) minor in G by Lemma 2.13. Thus A−B is connected. If G also contains B ^{+} as a minor, we have the last outcome of the theorem. Therefore, we assume henceforth that B ^{+} is not a minor in G.
Since B ^{+} is not a minor in G, by Theorem 2.15 and the fact that A cannot be drawn in the plane in such a way that V(A∩B) appears on the outer face boundary, we conclude that A−B consists of exactly two vertices v,v′. If both have degree 5 in G, then the K _{4}minor in B rooted at V(A∩B), together with v,v′, gives rise to a K _{6}minor. Thus it follows that the degree of v is 5, the degree of v′ is 4, and vv′∈E(G). But in this case, we can make a reduction as in Lemma 2.3.
Thus we may assume that the comp(W′) in G−x has a 2cell embedding in a plane with per(W′) in the outer face boundary. The vertex v in the second conclusion of Theorem 3.4 is irrelevant with respect to any minor of the graphs in the Petersen family, as proved in [41] (cf. also [23]).
It remains to prove that for every flat embedding of the graph G−v in \(\mbox {{$\mathbb {R}$}}^{3}\), the embedding of G−v can be extended to a flat embedding G. It follows from Lemma 2.6 that the planar graph comp(W′)−x−v has a unique spherical embedding. Thus the unique face F that has all the neighbors of v bounds the panel D=D(F) in the flat embedding of G−v. Then we can embed the vertex v and its incident edges into the disk D. It is easy to see that the resulting embedding of G is still flat. □
Theorem 3.5
Let G,W,f,l,w(l),w′(l) be as in Theorem 3.4. Suppose the wall W is given. Then there is an O(n)time algorithm, where n=G, that returns one of the following outcomes:

1.
One of the graphs in the Petersen family as a minor in G.

2.
A vertex x∈V(G) and a proper subwall W′ (of the wall W) of height l in G−x that is dividing in G−x, and is crossfree in G−x. Moreover, we find an irrelevant vertex v as in the conclusion of Theorem 3.4.

3.
A reduction as in Lemma 2.3.

4.
A separation (A,B) of order at most four in G such that x∈V(A∩B) and V(A∩B)∖{x}⊆comp(W) (where the vertex x is as above) and per(W)⊆B. Moreover, G contains both A ^{+} and B ^{+} as minors. In particular, the separation (A,B) gives rise to a reduction as in Theorem 2.4.
Proof
We can get the conclusion of Theorem 3.3 in linear time. If we find a K _{6}minor, we stop. Otherwise, we obtain x and W′.
By applying the planarity algorithm [4, 14, 52], for any proper subwall W′ in the conclusion of Theorem 3.3, we can test whether or not the compass comp(W′) is planar in G−x with per(W′) in the outer face boundary. Suppose there is a Kuratowski subgraph K′, i.e., either a K _{5}subdivision or a K _{3,3}subdivision.
We first observe that the pair (comp(W′),per(W′)) is a society in G−x, whose cyclic order is the cyclic permutation of vertices on the cycle the per(W′). If there is a separation (A,B) of order at most three in the society (comp(W′),per(W′)) in G−x such that B contains all the vertices of per(W′) and at least two nodes of the Kuratowski subgraph K′ are contained in A−B, then, as in the proof of Theorem 3.4, we can get the third or the fourth conclusion of Theorem 3.5 or we can get a \(K_{4,4}^{}\) or \(K_{3,4}^{+}\) minor. Suppose such a separation does not exist. This implies that the society (comp(W′),per(W′)) in G−x is not rurally 4connected. So by Theorem 2.17, the compass comp(W′) is not crossfree, because we can find two vertexdisjoint paths connecting the diagonally opposite corners in the wall W′.
Let us consider the algorithmic aspect of the previous argument. Let us observe that, for each proper subwall W′, once we are given a Kuratowski graph K′, we can test whether or not such a separation (A,B) in the last conclusion of Theorem 3.5 exists in comp(W′) in G−x, in linear time. If such a separation does not exist, by using the standard technique in [41], we can find two vertexdisjoint paths connecting the diagonally opposite corners in the wall W′ in linear time, using the Kuratowski graph K′.
If there are three disjoint proper subwalls that are not crossfree and are pairwise at facedistance at least two, then there is a K _{6}minor by the result in [21] (and such a K _{6}minor can be found in linear time using the three Kuratowski graphs in these three proper subwalls).
Thus we may assume that there is a proper subwall W′ in the conclusion of Theorem 3.3 such that the comp(W′) in G−x has a 2cell embedding with per(W′) in the outer face boundary (and such a 2cell embedding can be found in linear time by the planarity algorithm [4, 14, 52]). In this case, by Theorem 3.5, we can find the vertex in the second conclusion of Theorem 3.4 in linear time. □
4 Flat Embedding when the TreeWidth Is Bounded
In this section we present a quadratictime algorithm for the Flat and Linkless Embedding problem on graph classes of bounded treewidth. The algorithm is based on various results about flat embeddings presented in Sect. 2.2.
4.1 4Connected Graphs of Bounded TreeWidth
As a first step, we show how to compute flat embeddings (if they exist) of 4connected graphs of bounded treewidth.
Lemma 4.1
There is an algorithm which for a given 4connected graph G either returns a flat embedding of G or finds a minor H of the Petersen family in the graph G, in time f(tw(G))⋅G^{2}, for some computable function \(f\mathrel{:} \mbox {{$\mathbb {N}$}}\to \mbox {{$\mathbb {N}$}}\).
Proof
Given G, we first test in linear time f(tw(G))⋅G (for instance by using Courcelle’s theorem [10]) if any graph in the Petersen family is a minor of G. If no such minor is found, we compute a flat embedding of G. The lemmas outlined in Sect. 2.2 and the discussion at the end of that section suggest the following algorithm for constructing a flat embedding of a 4connected graph in \(\mbox {{$\mathbb {R}$}}^{3}\).

1.
If G is planar, compute the unique flat embedding of G in \(\mbox {{$\mathbb {R}$}}^{3}\) and stop. Otherwise, choose a Kuratowski subgraph of G and embed it flatly into \(\mbox {{$\mathbb {R}$}}^{3}\).

2.
As long as there is a Kuratowski subgraph K of G that is not yet embedded, compute two adjacent Kuratowski subgraphs H,H′ so that H is already embedded but at least one edge of H′ is not yet embedded. At the same time we find the additional path L=L _{3,4} from the definition of 2adjacency, and set L=∅ in case of 1adjacency of H and H′. As discussed in Sect. 2.2, there is a unique way of extending the embedding of H to an embedding of H∪H′∪L which can be determined as explained in Sect. 2.2.
First of all, Lemma 2.13 implies that the algorithm returns a flat embedding of the whole graph G. Next, we claim that this algorithm can be implemented to run in time f(tw(G))⋅G^{2}, where \(f\mathrel{:}\mbox {{$\mathbb {N}$}}\rightarrow \mbox {{$\mathbb {N}$}}\) is a computable function. Given a 4connected graph G, first use Bodlaender’s algorithm [3] to compute an optimal treedecomposition of G in time g(tw(G))⋅G, where \(g \mathrel{:} \mbox {{$\mathbb {N}$}}\rightarrow \mbox {{$\mathbb {N}$}}\) is some computable function. Using known planarity algorithms [4, 14, 52], we can find a Kuratowski subgraph K of G required in Step 1 in linear time, or conclude that G is planar, in which case we can easily determine the unique embedding into \(\mbox {{$\mathbb {R}$}}^{3}\). Towards the second step, note that the while loop can take at most ∥G∥ iterations as each iteration embeds at least one new vertex or edge. In each iteration we have to find the two Kuratowski subgraphs H and H′. Since G has bounded treewidth, this can be done in linear time, either by dynamic programming or by realizing that the condition “H,H′ are adjacent Kuratowski subgraphs such that H is already embedded and H′ is not” has a straightforward definition in monadic secondorder logic (MSO). It follows from a result by Arnborg, Lagergren and Seese [1] that given the MSOdefinition, the graphs H,H′ can be computed in time h(tw(G))⋅∥G∥. As for all graphs ∥G∥≤tw(G)⋅G, the result follows. □
4.2 Flat Embeddings in Quadratic Time on Graph Classes of Bounded TreeWidth
We are now ready to present the complete quadratictime algorithm for computing flat embeddings of linklessly embeddable graphs of bounded treewidth.
Lemma 4.2
There is an algorithm which, on input G, solves the Flat and Linkless Embedding problem for G in time f(tw(G))⋅G^{2}, for some computable function \(f\mathrel{:} \mbox {{$\mathbb {N}$}}\to \mbox {{$\mathbb {N}$}}\).
Proof
Let G be given. Using Bodlaender’s algorithm [3], we first compute a treedecomposition of G of width tw(G) in time g(tw(G))⋅G. The next step is to test if any graph of the Petersen family is a minor of G. Again, this can be done in time g′(tw(G))⋅G. If G contains a Petersen minor, we can conclude that G has no linkless embeddings and return the minor. Otherwise, we perform a preprocessing to break the graph into 4connected components.
Step 1. We first compute the 2connected components of G and perform the algorithm recursively on each component. Once flat embeddings of all 2connected components have been computed, we can combine them to a flat embedding of G in an obvious way.
Step 2. Now suppose there are no 1separations of G. The next step is to eliminate 2separations. Using dynamic programming, we can easily find the 3connected components of G in linear time. Let (A,B) be a separation of order two with {u,v}=V(A∩B). As there are no 1separations in G, u and v are connected by a path in A and in B, thus A ^{+} and B ^{+} are minors in G. Hence, if G is flatly embeddable then so are A ^{+} and B ^{+}. Their flat embeddings can be computed recursively. We can then combine these embeddings as shown in the proof of Theorem 2.4.
Step 3. Now suppose there are no separations of order ≤2 left in G. The final step is to decompose the graph into 4connected components. Again, using dynamic programming we can find 4connected components of G easily. Now let (A,B) be a separation of order three, and let S={u,v,w}=V(A∩B). As there are no separations of order ≤2 in G, we can apply Theorem 2.14 to each of graphs A and B. If one of A or B (say B) satisfies conclusion (2) of Theorem 2.14, then B−A is a single vertex of degree three in G, and we can make a YΔreduction at this vertex. We perform the algorithm recursively on the smaller graph and then use Theorem 2.2. Otherwise, A and B satisfy conclusion (1) of Theorem 2.14, which implies that A ^{+} and B ^{+} are both minors of G. Thus, we can apply Theorem 2.4 to get a flat embedding of G from recursively constructed flat embeddings of A ^{+} and B ^{+}. Finally, if G is 4connected, then we get a flat embedding by using Lemma 4.1. □
Using dynamic programming techniques, it is possible to design a lineartime algorithm for computing a flat embedding of a graph of bounded treewidth, or decide correctly that no such embedding exists. The algorithm was sketched in [17] but a full description of the algorithm would be technical and long. As linear time is not needed for the main result of the paper, we refrain from giving the details of the algorithm here.
5 Algorithm
Finally, we are ready to present the complete algorithm.
Flat and Linkless Embedding
Input: A graph G of order n.
Output: Either detect one of Petersen’s family graphs as a minor in G or return a flat (and hence also linkless) embedding of G in \(\mbox {{$\mathbb {R}$}}^{3}\).
Running time: O(n ^{2}).
Description:
Step 1. Initially, we delete all vertices of degree at most 1. Also, if there is a vertex v of degree 2, then we just contract vu, where u is one of the two neighbors of v. Thus we may assume that the minimum degree is at least 3. If there is a vertex v of degree 3, then we perform a YΔ operation at v. We also delete parallel edges or loops if they arise after performing the reductions. We repeat doing this as long as there are some vertices of degree ≤3. Hereafter, we may assume that the minimum degree of the resulting graph G is at least 4. We make the same reductions at any time later if the minimum degree falls below four.
Step 2. Test if the treewidth of the current graph G is small or not, say smaller than some value f, where f comes from Theorem 3.4. This can be done in linear time by the algorithm of Bodlaender [3]. If the treewidth is at least f, then go to Step 3. Otherwise we use the algorithm described in Lemma 4.2 to compute a flat embedding in quadratic time or certify that no such embedding exists by computing a minor of G in the Petersen family.
Step 3. It is easy to see that if the current graph G has at least 2^{6}G edges, then one can easily find a K _{6}minor in linear time (see [38]). So we may assume that the current graph G has at most 2^{6}G edges.
At this moment, the treewidth of the current graph G is at least f. Use the algorithm of Bodlaender [3] (or the algorithm of Robertson and Seymour [41]) to construct a wall W of height at least w′(l), where w′(l) is as in Theorem 3.3. Perform the algorithm of Theorem 3.5 to find a separation or reduction as in the third conclusion of Theorem 3.5, or an irrelevant vertex v, or a minor of a graph in the Petersen family. If the third outcome occurs, then output the minor. If the second one happens, then we recurse this algorithm to G−v. If the first one happens, then we reduce the size of the current graph G as in the proof of Theorem 3.5. This completes the description of the algorithm. □
The correctness of Steps 2 and 3 follow from Sects. 3 and 4. It is easy to see that degree 1 vertices can be deleted, degree 2 vertices can be contracted, parallel edges and loops can be removed, and YΔ operation can be performed (Theorem 2.2). Thus the correctness of Step 1 follows.
The time complexity of the algorithm can be estimated as follows. All individual reduction steps in the above algorithm can be done in linear time. Applying the recursion results in another factor of n. So in tine O(n ^{2}) we reduce the problem to the case of bounded treewidth graphs. Applying the algorithm once the treewidth is bounded can be done in quadratic time. Thus, the time complexity is O(n ^{2}).
Notes
By a disk we always mean a piecewise linear 2dimensional disk in \(\mbox {{$\mathbb {R}$}}^{3}\).
In [47], the authors use the term paneled frame to describe a flatly embedded graph.
References
Arnborg, S., Lagergren, J., Seese, D.: Easy problems for treedecomposable graphs. J. Algorithms 12(2), 308–340 (1991)
Baker, B.S.: Approximation algorithms for NPcomplete problems on planar graphs. J. ACM 41, 153–180 (1994)
Bodlaender, H.L.: A lineartime algorithm for finding treedecomposition of small treewidth. SIAM J. Comput. 25, 1305–1317 (1996)
Chiba, N., Nishizeki, T., Abe, S., Ozawa, T.: A linear time algorithm for embedding planar graphs using PQtrees. J. Comput. Syst. Sci. 30, 54–76 (1985)
Colin de Verdière, Y.: Sur un nouvel invariant des graphes et un critère de planarité. J. Comb. Theory, Ser. B 50, 11–21 (1990)
Colin de Verdière, Y.: Multiplicities of eigenvalues and treewidth of graphs. J. Comb. Theory, Ser. B 74, 121–146 (1998)
Colin de Verdière, Y.: On a new graph invariant and a criterion of planarity. In: Robertson, N., Seymour, P. (eds.) Graph Structure Theory. Contemp. Math. Amer. Math. Soc., vol. 147, pp. 137–147 (1993)
Conway, J.H., Gordon, C.McA.: Knots and links in spatial graphs. J. Graph Theory 7, 445–453 (1983)
Cook, S.A., Reckhow, R.A.: Time bounded random access machines. J. Comput. Syst. Sci. 7, 354–375 (1976)
Courcelle, B.: Graph rewriting: An algebraic and logic approach. In: van Leeuwen, J. (ed.) Handbook of Theoretical Computer Science, vol. B, pp. 193–242. Elsevier, Amsterdam (1990)
Diestel, R.: Graph Theory, 4th edn. Springer, Berlin (2010)
Diestel, R., Gorbunov, K.Yu., Jensen, T.R., Thomassen, C.: Highly connected sets and the excluded grid theorem. J. Comb. Theory, Ser. B 75, 61–73 (1999)
Grigni, M., Koutsoupias, E., Papadimitriou, C.: An approximation scheme for planar graphs TSP. In: Proc. 36th Symposium on Foundations of Computer Science (FOCS’95), pp. 640–646 (1995)
Hopcroft, J.E., Tarjan, R.: Efficient planarity testing. J. ACM 21, 549–568 (1974)
van der Holst, H.: A polynomialtime algorithm to find a linkless embedding of a graph. J. Comb. Theory, Ser. B 99, 512–530 (2009)
Kawarabayashi, K.: Rooted minor problems in highly connected graphs. Discrete Math. 287, 121–123 (2004)
Kawarabayashi, K., Kreutzer, S., Mohar, B.: Linkless and flat embeddings in 3space and the unknot problem. In: Symposium on Computational Geometry (SoCG), pp. 97–106 (2010)
Kawarabayashi, K., Mohar, B.: Graph and Map Isomorphism and all polyhedral embeddings in linear time. In: Proc. 40th ACM Symposium on Theory of Computing (STOC’08), pp. 471–480 (2008)
Kawarabayashi, K., Mohar, B., Reed, B.: A simpler linear time algorithm for embedding graphs on a surface and for bounded treewidth graphs. In: Proc. 49th Annual Symposium on Foundations of Computer Science (FOCS’08), pp. 771–780 (2008)
Kawarabayashi, K., Kobayashi, Y., Reed, B.: The disjoint paths problem in quadratic time. J. Comb. Theory, Ser. B 102(2), 424–435 (2012)
Kawarabayashi, K., Norine, S., Thomas, R., Wollan, P.: K _{6} minors in large 6connected graphs, submitted. Available at http://www.math.princeton.edu/~snorin/papers/k6large.pdf
Kawarabayashi, K., Reed, B.: Computing crossing number in linear time. In: Proc. 39th ACM Symposium on Theory of Computing (STOC’07), pp. 382–390 (2007)
Kawarabayashi, K., Wollan, P.: A shorter proof of the graph minor algorithm – the uniquely linkage theorem. In: Proc. 42nd ACM Symposium on Theory of Computing (STOC’10), pp. 687–694 (2010). Full version available at http://research.nii.ac.jp/~k_keniti/uniquelink.pdf
Klein, P.N.: A linear time approximation scheme for TSP for planar weighted graphs. In: Proc. 46th Symposium on Foundations of Computer Science (FOCS’05), pp. 146–155 (2005)
Kuratowski, C.: Sur le problème des courbes gauches en topologie. Fundam. Math. 15, 271–283 (1930)
van Leeuwen, J.: Graph algorithms. In: van Leeuwen, J. (ed.) Handbook of Theoretical Computer Science. Vol. A. Algorithms and Complexity, pp. 525–631. Elsevier/MIT Press, Amsterdam (1990)
Lipton, R.J., Tarjan, R.E.: Applications of a planar separator theorem. SIAM J. Comput. 9, 615–627 (1980)
Lovász, L.: Steinitz representations (2000). http://www.cs.elte.hu/~lovasz/klee.ppt
Lovász, L., Schrijver, A.: On the null space of a Colin de Verdière matrix. Ann. Inst. Fourier (Grenoble) 49, 1017–1026 (1999)
Lovász, L., Schrijver, A.: A Borsuk theorem for antipodal links and a spectral characterization of linklessly embeddable graphs. Proc. Am. Math. Soc. 126, 1275–1285 (1998)
Lucchesi, C.L., Younger, D.H.: A minimax theorem for directed graphs. J. Lond. Math. Soc. 17, 369–374 (1978)
Mader, W.: Homomorphiesätze für Graphen. Math. Ann. 178, 154–168 (1968)
Mohar, B.: Embedding graphs in an arbitrary surface in linear time. In: Proc. 28th ACM Symposium on Theory of Computing (STOC’96), pp. 392–397 (1996)
Mohar, B.: A linear time algorithm for embedding graphs in an arbitrary surface. SIAM J. Discrete Math. 12, 6–26 (1999)
Mohar, B., Thomassen, C.: Graphs on Surfaces. Johns Hopkins University Press, Baltimore (2001)
Motwani, R., Raghunathan, A., Saran, H.: Constructive results from graph minors: Linkless embeddings. In: Proc. 29th Annual Symposium on Foundations of Computer Science (FOCS’88), pp. 398–409 (1988)
Reed, B.: Tree width and tangles: a new connectivity measure and some applications. In: Surveys in Combinatorics, 1997 (London). London Math. Soc. Lecture Note Ser., vol. 241, pp. 87–162. Cambridge Univ. Press, Cambridge (1997)
Reed, B., Wood:, D.: A linear time algorithm to find a separator in a graph with an excluded minor. ACM Trans. Algorithms 5(4) (2009)
Robertson, N., Seymour, P.D.: Graph minors. V. Excluding a planar graph. J. Comb. Theory, Ser. B 41, 92–114 (1986)
Robertson, N., Seymour, P.D.: Graph Minors. IX. Disjoint crossed paths. J. Comb. Theory, Ser. B 49, 40–77 (1990)
Robertson, N., Seymour, P.D.: Graph minors. XIII. The disjoint paths problem. J. Comb. Theory, Ser. B 63, 65–110 (1995)
Robertson, N., Seymour, P.D.: Graph minors. XX. Wagner’s Conjecture. J. Comb. Theory, Ser. B 92, 325–357 (2004)
Robertson, N., Seymour, P.D., Thomas, R.: Hadwiger’s conjecture for K6free graphs. Combinatorica 13, 279–361 (1993)
Robertson, N., Seymour, P.D., Thomas, R.: Quickly excluding a planar graph. J. Comb. Theory, Ser. B 62, 323–348 (1994)
Robertson, N., Seymour, P.D., Thomas, R.: Kuratowski chains. J. Comb. Theory, Ser. B 64, 127–154 (1995)
Robertson, N., Seymour, P.D., Thomas, R.: Petersen family minors. J. Comb. Theory, Ser. B 64, 155–184 (1995)
Robertson, N., Seymour, P.D., Thomas, R.: Sachs’ linkless embedding conjecture. J. Comb. Theory, Ser. B 64, 185–227 (1995)
Robertson, N., Seymour, P.D., Thomas, R.: A survey of linkless embeddings. Contemp. Math. 147, 125–136 (1993)
Seymour, P.: Disjoint paths in graphs. Discrete Math. 29, 293–309 (1980)
Seymour, P.D.: Packing circuits in eulerian digraphs. Combinatorica 16, 223–231 (1996)
Thomassen, C.: 2linked graphs. Eur. J. Comb. 1, 371–378 (1980)
Williamson, S.G.: Depthfirst search and Kuratowski subgraphs. J. ACM 31, 681–693 (1984)
Wu, Y.Q.: On planarity of graphs in 3manifolds. Comment. Math. Helv. 67, 635–647 (1992)
Acknowledgements
Part of this work was done while all the authors participated the workshop “Graph Minors” at BIRS (Banff International Research Station) in October 2008.
K.K. research was partly supported by Japan Society for the Promotion of Science, GrantinAid for Scientific Research, by C and C Foundation, by Kayamori Foundation and by Inoue Research Award for Young Scientists.
S.K. research was partly supported by DFG grant KR 2898/13.
B.M. was supported in part by an NSERC Discovery Grant, by the Canada Research Chair Program, and by the ARRS, Research Program P10297. On leave from Department of Mathematics, University of Ljubljana, Slovenia.
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Kawarabayashi, Ki., Kreutzer, S. & Mohar, B. Linkless and Flat Embeddings in 3Space. Discrete Comput Geom 47, 731–755 (2012). https://doi.org/10.1007/s0045401294139
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s0045401294139