Synchronized Planarity with Applications to Constrained Planarity Problems

We introduce the problem Synchronized Planarity. Roughly speaking, its input is a loop-free multi-graph together with synchronization constraints that, e.g., match pairs of vertices of equal degree by providing a bijection between their edges. Synchronized Planarity then asks whether the graph admits a crossing-free embedding into the plane such that the orders of edges around synchronized vertices are consistent. We show, on the one hand, that Synchronized Planarity can be solved in quadratic time, and, on the other hand, that it serves as a powerful modeling language that lets us easily formulate several constrained planarity problems as instances of Synchronized Planarity. In particular, this lets us solve Clustered Planarity in quadratic time, where the most efficient previously known algorithm has an upper bound of O(n8).


Introduction
A graph is planar if it admits an embedding into the plane that has no edge crossings.Planarity is a well-studied concept that facilitates beautiful mathematical structures [21,9], allows for more efficient algorithms [20], and serves as a cornerstone in the context of network visualization [28].It is not surprising that various generalizations, extensions, and constrained variants of the Planarity problem have been studied [26].Examples are Clustered Planarity, where the embedding has to respect a laminar family of clusters [24,8]; Constrained Planarity, where the orders of edges incident to vertices are restricted, e.g., by PQ-trees [6]; and Simultaneous Planarity, where two graphs sharing a common subgraph must be embedded such that their embeddings coincide on the shared part [5].
For planar embeddings, there is the important notion of rotation.The rotation of a vertex is the counter-clockwise cyclic order of incident edges around it.Many of the above planarity variants come down to the question whether there are embeddings of one or multiple graphs such that the rotations of certain vertices are in sync in a certain way.Inspired by this observation, by the Atomic Embeddability problem [16], and by the cluster decomposition tree (CD-tree) [8], we introduce a new planarity variant.Synchronized Planarity has a loop-free multi-graph together with two types of synchronization constraints as input.Each Q-constraint is given as a subset of vertices together with a fixed reference rotation for each of these vertices.The Q-constraint is satisfied if and only if either all these vertices have their reference rotation or all these vertices have the reversed reference rotation.Vertices appearing in Q-constraints are called Q-vertices and all remaining vertices are P-vertices. 1 A P-constraint between two P-vertices u and v defines a bijection between the edges incident to u and v.It is satisfied if and only if u and v have the opposite rotation under this bijection.We require that the P-constraints form a matching, that is, no vertex appears in more than one P-constraint.The decision problem Synchronized Planarity now asks whether the given graph can be embedded such that all Q-and all P-constraints are satisfied.
Synchronized Planarity serves as a powerful modeling language that lets us express various other planarity variants using simple linear-time reductions.Specifically, we provide such reductions for Clustered Planarity, Atomic Embeddability, Partially PQ-constrained Planarity, and Simultaneous Embedding with Fixed Edges with a connected shared graph (Connected SEFE).Our main contribution is an algorithm that solves Synchronized Planarity, and thereby all the above problems, in quadratic time.

Technical Contribution
Our result impacts different planarity variants that have been studied previously.Before discussing them individually in the context of previous publications, we point out a common difficulty that has been a major barrier for all of them, and briefly sketch how we resolve it.
Consider the following constraint on the rotation of a single vertex.Assume its incident edges are grouped and we only allow orders where no two groups alternate, that is, if e 1 , e 2 are in one group and e 3 , e 4 are in a different group, then the circular subsequence e 1 , e 3 , e 2 , e 4 and its inverse are forbidden.Such restrictions have been called partition constraints before [8], and they naturally emerge at cutvertices where each incident 2-connected component forms a group.A single partition constraint is not an issue by itself, but it becomes difficult to deal with in combination with further restrictions.This is why cut-vertices and disconnected clusters are a major obstacle for SEFE [5] and Clustered Planarity [8], respectively.
The same issues appear for Synchronized Planarity, when we have a cut-vertex v that is involved in P-constraints, that is, its rotation has to be synchronized with the rotation of a different vertex u.We deal with these situations as follows, depending on whether u is also a cut-vertex or not.If not, it is rather well understood which embedding choices impact the rotation of u and we can propagate this from u to v. 2 This breaks the synchronization of u and v down into the synchronization of smaller embedding choices.This is a well-known technique that has been used before [6,18].If u is also a cut-vertex, we are forced to actually deal with the embedding choices emerging at cut-vertices.This is done by "encapsulating" the restrictions on the rotations of u and v that are caused by the fact that they are cut-vertices.All additional restrictions coming from embedding choices in the 2-connected components are pushed away by introducing additional P-constraints.After this, the cut-vertices u and v have very simple structure, which can be resolved by essentially joining them together.This procedure is formally described in Section 3.2 and illustrated in Figures 2 and 3.
This solution can be seen as combinatorial perspective on the recent breakthrough result by Fulek and Tóth [16], who resolved the cut-vertex issue by applying an idea coming from Carmesin's work [10].While Carmesin works with 2-dimensional simplicial complexes, Fulek and Tóth achieve their result by transferring Carmesin's idea to the setting of topological graphs on surfaces and combining it with tools from their work on thickenability.Our work transfers the problem and its solution back to an entirely combinatorial treatment of topological graphs in the plane.This further simplification allows us to more clearly highlight the key insight that makes the algorithm tick and at the same time provides access to a wide range of algorithmic tools for speeding up the computations.

Related Work
Clustered Planarity was first considered by Lengauer [24] and later rediscovered by Feng et al. [14].In both cases, the authors give polynomial-time algorithms for the case that each cluster induces a connected graph.The complexity of the general problem that allows disconnected clusters has been open for 30 years.In that time, many special cases have been shown to be polynomial-time solvable [3,11,15,17] before Fulek and Tóth [16] recently settled Clustered Planarity in P. The core ingredient for this is their O(n 8 ) algorithm for the Atomic Embeddability problem.It has two graphs G and H as input.Roughly speaking, H describes a 3-dimensional molecule structure with atoms represented by spheres and connections (a.k.a.pipes) represented by cylinders.The other graph G comes with a map to the molecule structure that maps each vertex to an atom such that two neighboring vertices lie on the same atom or on two atoms connected by a pipe.Atomic Embeddability then asks whether G can be embedded onto the molecule structure such that no edges cross.
Atomic Embeddability has been introduced as a generalization of the Thickenability problem that appears in computational topology [1].It can be shown that Atomic Embeddability and Thickenability (and actually also Synchronized Planarity, as discussed in Section 5) are linear-time equivalent [16].Thus, the above O(n 8 ) algorithm for Atomic Embeddability also solves Thickenability and Synchronized Planarity.In a preprint, Carmesin [10] proves a Kuratowski-style characterization of Thickenability, which he claims yields a quadratic algorithm as a byproduct.While it is believable that the running time of his algorithm is polynomial, a detailed runtime analysis is missing.In light of this, we only compare our algorithm to the O(n 8 )-algorithm by Fulek and Tóth.A detailed comparison of their solution to Atomic Embeddability and our solution to Synchronized Planarity is given in Section 5.
To finally solve Clustered Planarity, Fulek and Tóth [16] use the reduction of Cortese and Patrignani [12] to Independent Flat Clustered Planarity, which they then reduce further to Thickenability.The last reduction to Thickenability is based on a combinatorial characterization of Thickenability by Neuwirth [25], which basically states that multiple graphs have to be embedded consistently, that is, such that the rotation is synchronized between certain vertex pairs of different graphs.Via the reduction from Connected SEFE to Clustered Planarity given by Angelini and Da Lozzo [2], the above result extends to Connected SEFE, which was a major open problem in the context of simultaneous graph representations [7].We flatten this chain of reductions by giving a simple linear reduction from each of the problems Connected SEFE, Clustered Planarity, and Atomic Embeddability to Synchronized Planarity in Section 4, yielding quadratic-time algorithms for all of them.Moreover, the problem Partially PQ-constrained Planarity, for which we also give a linear reduction to Synchronized Planarity, has been solved in polynomial time before, but only for biconnected graphs [6] and in the non-partial setting where either all or none of the edges of a vertex are constrained [18].
Drawings, Embeddings and Cyclic Orders.A (topological) drawing Γ of a graph is a mapping of every vertex v to a point p v ∈ R 2 in the plane and a mapping of every edge {u, v} to a Jordan arc having p u and p v as endpoints.A drawing uniquely defines cyclic orders of edges incident to the same vertex.Drawings with the same cyclic orders are considered equivalent, their equivalence class is called (combinatorial) embedding.For an embedding E, we use E(u) to denote the cyclic order of the edges incident to u as given by E, which is also called the rotation of u.For a (cyclic) order σ = x 1 , . . ., x k of k elements, we use σ = x k , . . ., x 1 to denote its reversal.
The Synchronized Planarity Problem.An instance is a tuple I = (G, P, Q, ψ), where 1. G = (P ∪ Q, E) is a (loop-free) multi-graph with P-vertices P and Q-vertices Q, 2. Q is a partition of Q, 3. ψ is a mapping that assigns a rotation to each Q-vertex, and 4. P is a set of triples (u, v, ϕ uv ), where u and v are P-vertices of the same degree, ϕ uv is a bijection between their incident edges, and each P-vertex occurs at most once in P. We call the triples ρ = (u, v, ϕ uv ) in P pipes.Pipes are not directed and we identify (u, v, ϕ uv ) and (v, u, ϕ vu ) with ϕ vu = ϕ −1 uv .We also define deg(ρ) = deg(u) = deg(v).If two P-vertices are connected by a pipe, we call them matched; all other P-and Q-vertices are unmatched.
The planar embedding We say that the embedding satisfies the Q-constraints if it satisfies all cells, that is, vertices in the same cell of the partition Q are consistently oriented.The embedding E satisfies the pipe ρ = (u, v, ϕ uv ) if ϕ uv (E(u)) = E(v), that is, they have opposite rotations under the bijection ϕ uv .We say that the embedding satisfies the P-constraints if it satisfies all pipes.The embedding E is called valid if it satisfies the P-constraints and the Q-constraints.The problem Synchronized Planarity asks whether a given instance I = (G, P, Q, ψ) admits a valid embedding.

PQ-Trees and Embedding Trees.
A PQ-tree represents a set of circular orders of its leaves by partitioning its inner nodes into two classes: For Q-nodes the rotation of incident edges is fixed up to reversal, for P-nodes, this order can be chosen arbitrarily.Rooted PQ-trees have initially been studied by Booth and Lueker [9].There is an equivalence between rooted and unrooted PQ-trees [22], where the latter are also called PC-trees [27].We thus do not distinguish them and simply use the term PQ-trees.Note that a P-node with three or less neighbors allows the same permutations as a Q-node of the same degree.We thus assume P-nodes to have degree at least 4. We consider a PQ-tree trivial if it consists of a single inner P-node (with at least four leaves).Otherwise, it consists of a single Q-node with at least two leaves, or it contains at least two inner nodes, all of which have degree at least 3.
For a vertex of a planar biconnected graph, all rotations induced by planar embeddings can efficiently be represented by a PQ-tree [9].This PQ-tree is also called the embedding tree of the respective node.In the context of Synchronized Planarity, we assume that the embedding tree of a vertex does not allow rotations that would result in a Q-vertex v having any other rotation than its default ordering ψ(v) or its reverse ψ(v).To ensure this, we can subdivide each edge incident to v and connect each pair of two of the new nodes if the edges they subdivide are consecutive in the cyclic order ψ(v) [18].Note that this generates a k-wheel with center v and that there are exactly two planar rotations of the center of a wheel, which are the reverse of each other.We always generate the embedding trees based on the graph where each Q-vertex in G is temporarily replaced with its respective wheel.
Connected Components.A separating k-set is a set of k vertices whose removal increases the number of connected components.Separating 1-sets are called cut-vertices, while separating 2-sets are called separation pairs.A connected graph is biconnected if it does not have a cut-vertex.A biconnected graph is triconnected if it does not have a separation pair.Maximal biconnected subgraphs are called blocks.A vertex that is not a cut-vertex and thus resides within an unique block is called block-vertex.
Hopcroft and Tarjan [21] define a graph decomposition into triconnected components, also called SPQR-tree [4], where the components come in three shapes: bonds consist of two pole vertices connected by multiple parallel edges, polygons consist of a simple cycle, and rigids, whose embeddings are unique up to reflection.Each edge of these components is either real, representing a single edge of the original graph, or virtual, representing a subgraph.
Every planar embedding of a biconnected planar graph can be obtained from an arbitrary planar embedding by flipping its rigids and reordering the parallel edges in its bonds [21].The decomposition can be computed in linear time [19] and can be used to compute the embedding trees in linear time [6,Section 2.5].

Splits and Joins of Graphs and Embeddings.
Let G = (V, E) be a graph.We call a partition C = (X, Y ) of V into two disjoint cells a cut of G.The edges E(C) that have their endpoints in different Joining and splitting two graphs at x ∈ V 1 and y ∈ V 2 .The bijection ϕ xy between their incident edges is shown as follows: the two bold edges at the bottom are mapped to each other.The other edges are mapped according to their order following the arrow upwards (i.e.clockwise for x and counter-clockwise for y).cells are called cut edges.The split of G at C = (X, Y ) is the disjoint union of the two graphs obtained by contracting X and Y to a single vertex x and y, respectively (keeping possible multi-edges); see Figure 1.Note that the edges incident to x and y are exactly the cut edges, yielding a natural bijection ϕ xy between them.Conversely, given two graphs with a bijection ϕ xy between their incident edges, their join along ϕ xy is the graph G = (V, E), where {x, y} and E contains all edges of E 1 ∪ E 2 that are not incident to x or y, and for each edge e = ux incident to x, E contains an edge uv, where v is the endpoint of ϕ xy (e) distinct from y; see Figure 1.Observe that split and join are inverse operations.
We say that a planar embedding E of a graph G respects a cut C = (X, Y ) if and only if for a topological planar drawing Γ of G with embedding E there exists a closed curve γ such that (i) γ separates X from Y , (ii) γ crosses each edge in E(C) in exactly one point, and (iii) γ does not cross any edge in E \ E(C); see Figure 1.We say that γ represents C in Γ.
If E respects C, a split at C preserves E as follows.Let G 1 and G 2 be the graphs resulting from splitting G at C and let x ∈ V 1 and y ∈ V 2 such that ϕ xy identifies their incident edges.Let Γ be a topological planar drawing with embedding E and let γ be a curve in Γ that represents C in Γ.We obtain planar drawings Γ 1 and Γ 2 of G 1 and G 2 by contracting to a single point the side of γ that contains V 2 and V 1 , respectively.We denote by E 1 and E 2 the corresponding combinatorial embeddings of G 1 and G 2 .Note that by construction for each vertex of V 1 \ {x} the rotations in E and E 1 coincide, and the same holds for vertices of V 2 \ {y} in E and E 2 .Moreover, the rotations E 1 (x) and E 2 (y) are determined by the order in which the edges of E(C) cross γ, and therefore they are oppositely oriented, that is, ϕ xy (E 1 (x)) = E 2 (y).We call embeddings E 1 and E 2 with this property compatible with ϕ xy .
Conversely, we can join arbitrary embeddings E 1 of G 1 and E 2 of G 2 that are compatible with ϕ xy by assuming that x and y lie on the outer face, removing x and y from the embeddings, and connecting the resulting half-edges according to ϕ xy .The result is a planar embedding E where for each vertex Lemma 1.Let G = (V, E) be a planar graph and let (X, Y ) be a cut of G such that X and Y induce connected subgraphs of G. Then every planar embedding of G respects (X, Y ).
Proof.Let E be a planar embedding of G. Since X and Y induce connected subgraphs, it follows that no proper subset of E(X, Y ) is a cut.Therefore, (X, Y ) is a so-called bond, which corresponds to a simple cycle C in the dual graph G with respect to E [13, Proposition 4.6.1],which in turn implies that E respects (X, Y ).

Lemma 2. Every planar embedding of a bipartite graph G = (A ∪ B, E) respects (A, B).
Proof.Let E be a planar embedding of G.We claim that we can augment G and its embedding E by additional edges in A 2 ∪ B 2 to a graph G with planar embedding E such that A and B induce connected subgraphs.The fact that E respects the cut (A, B) then follows from Lemma 1.
We prove the existence of such an augmentation by induction on |A| + |B|.The statement clearly holds if |A| = |B| = 1.Therefore assume |A| + |B| > 2 and without loss of generality assume |A| > 2. Then there is a face that contains at least two vertices a 1 , a 2 of A. Let G = (A ∪ B , E ) be the bipartite planar graph with planar embedding E resulting from adding the edges a 1 a 2 and contracting it into a single vertex a.By the inductive hypothesis, graph G with embedding E can be augmented to bipartite G with embedding E so that A and B induce connected subgraphs.We now expand a into two separate vertices a 1 , a 2 , undoing the previous contraction.The resulting graph G (including the edge a 1 a 2 ) with embedding E is the desired augmentation.

The Synchronized Planarity Problem
We give an algorithm for solving Synchronized Planarity for graphs with n vertices and m edges in O(m 2 ) time.Without loss of generality, we assume that G has no isolated vertices and thus m ∈ Ω(n).Furthermore, we assume the input graph G to be planar.

High-Level Algorithm
Our approach hinges on three main ingredients.The first are the three operations EncapsulateAnd-Join, PropagatePQ, and SimplifyMatching, each of which can be applied to pipes that satisfy certain conditions.If an operation is applicable, it produces an equivalent instance I of Synchronized Planarity in linear time.Secondly we show that if none of the operations is applicable, then I has no pipes, and we give a simple linear-time algorithm for computing a valid embedding in this case.The third ingredient is a non-negative potential function φ for instances of Synchronized Planarity.We show that it is upper-bounded by 2m, and that each of the three operations decreases it by at least 1.
Our algorithm is therefore extremely simple; namely, while the instance still has a pipe, apply one of the operations to decrease the potential.Since the potential function is initially bounded by 2m, at most 2m operations are applied, each taking O(m) time.We will show that the resulting instance without pipes has size O(m 2 ) and can be solved in linear time, thus the total running time is O(m 2 ).

Conversion of small-degree P-vertices
The main difficulty in Synchronized Planarity stems from matched P-vertices.However, P-vertices of degree up to 3 behave like Q-vertices in the sense that their rotations are unique up to reversal.Throughout this paper, we implicitly assume that P-vertices of degree less than 4 are converted into Q-vertices, also converting a pipe of degree less than 4 into a Q-constraint, using the auxiliary operation ConvertSmall described in the following.We therefore assume without loss of generality that P-vertices, and in particular pipes, have degree at least 4.
Vertices of degree 3 have only two distinct rotations, which are the reverse of each other.Vertices of degree less than 3 have a unique rotation, which coincides with its reverse.We thus define operation ConvertSmall (u, I) to convert a P-vertex u with deg(u) < 4 into a Q-vertex, resulting in an instance I = (G , P , Q , ψ ) where G = (P ∪ Q , E).If u is unmatched, we set P = P \ {u}, P = P, and Q = Q ∪ {u} and give u it its own cell in Q = Q ∪ {{u}}.We fix an arbitrary order ψ (u) and let ψ coincide with ψ for all other vertices.If the P-vertex u is matched with another P-vertex v, we can convert both of them to Q-vertices setting P = P \{u, v}, Q = Q∪{u, v}, and P = P \{(u, v, ϕ uv )}.We also put both together in a cell in Q = Q ∪ {{u, v}}, again setting ψ (u) as before, but now also defining ψ (v) = ϕ uv (ψ (u)).Note that this enforces that matched vertices u and v have opposite rotations under the bijection ϕ uv .All other P-vertices and their pipes remain unaffected.Previous Q-vertices already in Q are also unaffected.Proof.First we show that the conversion preserves a valid embedding in its cell and thus E also satisfies the Q-constraints of I .Otherwise, u is matched with P-vertex v and as E satisfies the pipe uv it is follows analogously.As the underlying graph and all other pipes remain unchanged, E is valid embedding of I .
Conversely, assume that E is a valid embedding for I .If u is the sole vertex in its cell, converting u to a P-vertex will not affect the validity of the embedding (and also not allow new embeddings as deg(u) < 4).If u shares its cell with vertex v, it is , inserting shows that both cases satisfy the constraint ϕ uv (E(u)) = E(v) of pipe uv.As the underlying graph, all other pipes and Q-constraints remain unchanged, E is valid embedding of I.
This concludes the proof of correctness of ConvertSmall.As all affected vertices have degree at most 3, the time required to execute the operation is constant.

The EncapsulateAndJoin Operation
The purpose of the EncapsulateAndJoin operation is to communicate embedding restrictions between two matched cut-vertices in two steps: First we encapsulate the cut-vertices into their own independent star components, also disconnecting their incident blocks from each other.In the second step, we join the stars.Figures 2 and 3 show an example.For an instance I = (G, P, Q, ψ) of Synchronized Planarity, let ρ = (u, v, ϕ uv ) be a pipe matching two cut-vertices u, v of two (not necessarily distinct) connected components C u , C v of G. Operation EncapsulateAndJoin (ρ, I) can be applied resulting in an instance I = (G , P , Q , ψ ) using the following two steps.We first preprocess both cut-vertices to encapsulate them into their own separate star components.Let C 1 , . . ., C k be the connected components of C u − u.We split C u along the cuts (V (C i ), V \V (C i )) for i = 1, . . ., k.We denote the vertices resulting from the split along (V (C i ), V \V (C i )) as u i and u i , where u i results from contracting V \V (C i ) and u i results from contracting V (C i ).Note that, after all splits, u is the center of a star C u whose ray vertices are the u i .We add the pipes (u i , u i , ϕ uiu i ) for i = 1, . . ., k; see Figure 2. The same procedure is also applied to v, resulting in an intermediate instance I * .In the second step, we join the connected components C u and C v at u and v along the mapping ϕ uv of ρ into a component C uv .We also remove the pipe ρ from I * ; all other parts of the instance remain unchanged.Figure 3 shows a possible result of joining two stars.
is a valid embedding of I * , we can join u i with u i for i = 1, . . ., k to obtain a valid planar embedding E of I, as the pipe (u i , u i , ϕ uiu i ) ensures that E * is compatible with ϕ uiu i .The same applies to C v .
If E * is a valid embedding for I * , it satisfies the pipe (u, v, ϕ uv ) and we can join the embedding at u and v via ϕ uv to obtain a planar embedding E of G .Since the rotations of vertices different from u, v are unaffected, E is valid for I .Conversely, assume that E is a valid embedding for I .Note that joining two stars at their centers yields a bipartite graph consisting of the rays of the former stars.Thus C uv is bipartite, and by Lemma 2 every embedding respects the cut of the bipartition.Thus, we can split E and obtain a valid embedding of I * .
As the operation affects exactly the edges incident to u and v and potentially creates a new structure with size proportional to their number, its running time is linear in the degree of the affected pipe.
Observe that this operation replaces a pipe and two cut-vertices by smaller pipes and smaller cut- vertices, respectively.Through multiple applications of EncapsulateAndJoin we can thus step by step decrease the degree of cut-vertex-to-cut-vertex pipes, until there are none left in the instance.Note that EncapsulateAndJoin can yield an arbitrary bipartite component.If the component is non-planar, we abort and report a no-instance.

The PropagatePQ Operation
The operation PropagatePQ communicates embedding restrictions of a biconnected component across a pipe.These restrictions are represented by the embedding tree of the matched P-vertex of interest.Both endpoints of the pipe are replaced by copies of this tree.To ensure that both copies are embedded in a compatible way, we synchronize their inner nodes using pipes and Q-constraints; see Figure 4.
For an instance I = (G, P, Q, ψ) of Synchronized Planarity, let u be a block-vertex matched by a pipe ρ = (u, v, ϕ uv ).If the embedding tree T u of u is non-trivial (i.e., it not only consists of a single Pnode), then the operation PropagatePQ (u, I) can be applied, resulting in an instance I = (G , P , Q , ψ ) as follows.We turn the PQ-tree T u into a tree T u by interpreting Q-nodes as Q-vertices and P-nodes as P-vertices.To construct G from G, we replace u with T u by reconnecting the incident edges of u to the respective leaves of T u .We also replace v by a second copy T u of T u by reconnecting an edge e incident to v to the leaf of T u that corresponds to ϕ vu (e).For a vertex α of T u we denote the corresponding vertex of T u by α .For an edge αβ of T u we define ϕ TuT u (αβ) = α β .For each Q-vertex α of T u , we define ψ (α) according to the rotation of the corresponding Q-node in T u .For the Q-vertex α of T u , we define ψ (α ) = ϕ TuT u (ψ (α)).For all other Q-vertices of I, ψ coincides with ψ.We define the partition For each P-vertex α of T u , we define a pipe ρ α = (α, α , ϕ αα ) with ϕ αα (e) = ϕ TuT u (e) for each edge e incident to α.Finally, we define the matching P = (P \ {ρ}) ∪ {ρ α | α is a P-vertex of T u }.
Lemma 5. Applying PropagatePQ to a block-vertex u with a non-trivial embedding tree yields an equivalent instance.If the embedding tree T u is known, operation PropagatePQ runs in O(deg(u)) time.
Proof.First we show that PropagatePQ preserves a valid embedding E of I. To define an embedding E for I , we substitute u and v in E by suitably embedded trees T u and T u .The tree inserted at u represents all the possible rotations of u, including E(u) and the insertion can therefore be done without introducing crossings.As E fulfilled the P-constraint of the pipe uv, we know that E(u) = ϕ vu (E(v)).Therefore, the same holds for inserting the mirrored copy T u of T u instead of v. Thus, the resulting embedding E is planar.Note that, the mirror embedding of T u is obtained by reversing the rotation of each inner vertex of T u .Therefore, for each inner vertex α of T u it holds that E (α) = ϕ α α (E (α )).Thus, all the new pipes are satisfied.Similarly, for each inner Q-vertex α of T u the rotation in E is either ψ (α) or ψ (α).As the rotation of α in E is mirrored, the new Q-constraints are satisfied.Since all other P-and Q-constraints remain satisfied, E is a valid embedding for I .
Conversely, assume that E is a valid embedding for I .We obtain an embedding E of I by contracting T u and T v into single vertices u and v, respectively.Clearly, E is a planar embedding.All Q-constraints of I and also all pipes except for ρ clearly remain satisfied.It remains to show that also pipe ρ is satisfied.For each vertex α of T u it holds that E (α) = ϕ α α (E (α )), as E in particular fulfills all new Q-and P-constraints of I .Therefore, the circular order of the leaves of T u is the reverse of the order of the leaves of T u .This means that E(u) = ϕ vu (E(v)), that is, ρ is satisfied.
This concludes the proof of correctness of PropagatePQ.As the operation affects exactly the edges incident to u and v, its running time is linear in the degree of the affected node, given the embedding tree T u is known.
Note that the tree T u inserted instead of v may not be compatible with the rotations of v.In this case, the component becomes non-planar, potentially causing the later generation of an embedding tree to fail.To detect this early, we can also compute the embedding tree T v of v and intersect T u with T v before the insertion.Either way, if the generation of an embedding tree or the intersection of two embedding trees fails, we can report a no-instance.
Observe that since we assume T u to be non-trivial, the degrees of all P-vertices in T u and T u are strictly smaller than the degree of u.Thus, by repeatedly applying PropagatePQ, we eventually arrive at an equivalent instance where all matched block-vertices have a trivial embedding tree.Also note that if T u consists of a single Q-node, PropagatePQ effectively replaces the affected pipe by two Q-vertices in the same partition.The case where T u is trivial and thus consists of a single P-node is handled by the next operation.

The SimplifyMatching Operation
The remaining operation is SimplifyMatching, which is used to resolve pipes where one side has no restrictions to be communicated to the other side.This is the case when one of the two matched vertices is a pole of a bond that allows arbitrary rotation.We distinguish three cases: i) bonds where one pole can always mimic the rotation of the other, ii) bonds where the pipe synchronizes one pole with the other (similar to the toroidal instances of Fulek and Tóth [16]), and iii) bonds that link two distinct pipes.
For an instance I = (G, P, Q, ψ) of Synchronized Planarity, let u be a block-vertex of G whose embedding tree is trivial and that is matched by a pipe ρ.Then, its embedding is determined by exactly one triconnected component µ, which is a bond. 3Thus u is the pole of bond µ, and we call the vertex v that is the other pole of µ the partner of u.If v is either unmatched or a block-vertex with a trivial embedding tree, the operation SimplifyMatching (u, I) can be applied, resulting in an instance I = (G , P , Q , ψ ) as follows.Note that, due to the temporary replacement of Q-vertices by wheels when computing the embedding trees, v cannot be a Q-vertex, as that would make the PQ-tree of u contain a Q-node.
(i) If v is an unmatched P-vertex (Figure 5a), I is obtained from I by removing ρ.
(ii) If ρ matches u with v, it connects the two poles of the bond µ (Figure 5b).Note that the embedding trees of u and v both contain a P-node of the same degree representing µ and the pipe now requires both u and v to have the same degree.Thus, as u has a trivial embedding tree, v also has a trivial embedding tree.The rotation of the vertices is thus exclusively determined by the embedding of the bond and there are bijections δ u and δ v between the edges incident to u and v, respectively, and the virtual edges within the bond.We now check that these bijections are compatible with the bijection ϕ uv given by the pipe.Let δ vu = δ −1 u • δ v be a bijection between the edges incident to v and the edges incident to u, and let π = ϕ uv • δ vu be a permutation of the edges incident to v. If all cycles of π have the same length, I is obtained from I by removing ρ. 4 Otherwise, I is an invalid instance and we set I to a trivial no-instance.(iii) If v is matched with a P-vertex v = u via pipe ρ = (v, v , ϕ vv ), let u be the other endpoint of ρ = (u, u , ϕ uu ).We remove ρ and ρ and add the new pipe Proof.First we show that if E is a valid embedding of I, then it is also a valid embedding of I .This clearly holds if I is obtained from I by removing a pipe, as in Case i.It remains to investigate Case ii and Case iii.In the latter case, let u be the vertex to which u is matched and let v = u be the vertex to which v is matched.We want to show that E satisfies the constraint E(v ) = ϕ u v (E(u )) of the newly added pipe ρ * = (u , v , ϕ u v ).By assumption the pipes ρ, ρ are satisfied by E, that is E(u) = ϕ u u (E(u )) and E(v ) = ϕ vv (E(v)).Moreover, as both u and v have a trivial embedding tree, the bijections δ u , δ v are defined as before.Thus δ u (E(u)) and δ v (E(v)) define a circular orders of the virtual edges of µ.Since the embedding is planar, This yields E(v) = δ uv (E(u)) and thus In particular, this means that ρ * is satisfied and therefore E is valid.
In Case ii, we consider the above permutation π.Analogously to All cycles of π have the same length [6, Lemma 2.2] and therefore I is obtained from I by removing ρ and, in particular, E is a valid embedding of I .
Conversely, assume that E is a valid embedding for I .To obtain a valid embedding E of I, we modify the embedding E by changing the order of the virtual edges of the bond µ with poles u and v in such a way that the removed pipes are satisfied.Since, compared to E , we only change the embedding of a bond, E is guaranteed to be planar.The details depend on which case of the operation applies.
If v is unmatched in I, we change the embedding of µ such that E(u) = ϕ u u (E(u )).This is possible since there is a bijection between the edges incident to u and the virtual edges of µ.The new embedding E satisfies ρ and, since v is unmatched, also all other pipes of I remain satisfied.
In Case ii, v is matched with u and we consider the above permutation π.As E is a valid embedding, I results from I by removing ρ and we know that all cycles of π have the same length.There exists a circular ordering σ of the edges incident to v with π(σ) = σ [6, Lemma 2.2].We change the embedding of µ such that E(v) = σ and, to retain planarity, E(u) = δ vu (E(v)).This satisfies ρ as ϕ uv (E(u)) = ).This satisfies ρ and ρ , and to verify the planarity of E it suffices to show that E(v) = δ uv (E(u)).Since ρ * is satisfied by E and E differs from E only at u and v, we know that This concludes the proof of correctness of SimplifyMatching.The updates to the matching P can be done in constant time, while the updates to the bijection ϕ and the check for cycle lengths require O(deg(u)) time.

Reduced and Pipe-Free Instances
With our exposition of the fundamental operations complete, we now study how to solve instances where none of those operations can be applied.We call such instances reduced.

Lemma 7. An instance is reduced if and only if it contains no pipes.
Proof.Obviously, a pipe-free instance is reduced.Conversely, consider a reduced instance I. Assume, for the sake of contradiction, that I contains a pipe.We now show that this implies that one of the operations is applicable, that is, I is not reduced.
Assume that I contains no matched cut-vertices and thus all matched vertices are block-vertices.If there is a matched P-vertex with a non-trivial embedding tree, PropagatePQ can be applied.Otherwise, all matched P-vertices are block-vertices with trivial embedding trees and SimplifyMatching can be applied.Now let u be a matched cut-vertex of maximum degree that is matched to a vertex v by a pipe ρ.If v is also a cut-vertex, we can apply EncapsulateAndJoin.If v is a block-vertex with a non-trivial embedding tree, we can apply PropagatePQ.Therefore, v must be a block-vertex with a trivial embedding tree.Now we can apply SimplifyMatching, unless the partner pole v of v is a matched cut-vertex.This is however excluded, since deg(u) = deg(v) < deg(v ), contradicting the maximality of deg(u).The last inequality follows from the fact that deg(v) ≤ deg(v ) already holds in the block of G that contains v and v , but as v is a cut-vertex, it has at least one neighbor outside that block.
To solve instances without pipes in linear time, note that a planar embedding of such an instance is valid if and only if it satisfies the Q-constraints.As Q-vertices only have a binary choice for their rotation, it is relatively easy to synchronize them via a 2-SAT formula.Linear-time algorithms follow from, e.g., [6], and can also be obtained from techniques similar to those used by Fulek and Tóth [16] for cubic graphs.For the sake of completeness, we present a self-contained solution.

Lemma 8. An instance of Synchronized Planarity without pipes can be solved in O(m) time. A valid embedding can be computed in the same time, if it exists.
Proof.We replace each Q-vertex by a wheel of the respective degree.Note that each such wheel is biconnected and entirely contained in its rigid triconnected component.We now use the decomposition in triconnected components to represent all possible planar embeddings.As the wheel-replacements yield an instance that is linear in the size of the initial instance, this decomposition can be done in O(m) time.If at least one of the rigids has no planar embedding, abort and report a non-planar instance.It remains to restrict the possible embeddings of the rigids so that all Q-constraints are satisfied.
We construct an instance of 2-SAT, where each solution corresponds to a planar embedding E that is a valid solution for I.For every Q-vertex v the boolean variable This ensures that the rotations of the Q-vertices are consistent within their cell and thus satisfy the Q-constraints.We still need to ensure that the 2-SAT instance allows only planar embeddings.For each rigid µ, we fix one of its two planar embeddings as its default embedding E µ and add another boolean variable x µ , indicating whether E µ or E µ shall be used in E. Due to the wheel replacement, each Qvertex v is entirely contained in its rigid µ, which can be found in constant time using one of the incident edges.For every Q-vertex v we now add one of the following two constraints with regard to its rigid µ: . This ensures that the rotation of every Q-vertex is consistent with the planar embedding of its rigid.
In the resulting 2-SAT instance, we have a boolean variable for each Q-vertex, Q-constraint and rigid, and four constraints for each Q-vertex.The constructed 2-SAT formula thus has size in O(m) and can be solved in linear time.If it has no solution, we report an invalid instance and abort.Otherwise, we can use x µ to decide whether E µ should be mirrored or not.Choosing a planar embedding for each bond, i.e. a permutation of the parallel virtual edges between the two poles, this yields a planar embedding E that is a valid solution for I.

Finding a Reduced Instance
As mentioned above, we exhaustively apply the operations EncapsulateAndJoin, PropagatePQ, and SimplifyMatching.We claim that this algorithm terminates and yields a reduced instance after a polynomial number of steps.The key idea is that the operations always make progress by either reducing the number of pipes, or by splitting pipes into pipes of smaller degree.This suggests that, eventually, we arrive at an instance without pipes.However, there are two caveats.First, the encapsulation in the first step of EncapsulateAndJoin creates new pipes and thus has the potential to undo progress.Second, the smaller pipes resulting from splitting a pipe with PropagatePQ might cause further growth of the instance, potentially causing a super-polynomial number of steps.
We resolve both issues by using a more fine-grained measure of progress in the form of a potential function.To overcome the first issue, we show that for each application of EncapsulateAndJoin, the progress that is undone in the first step is outweighed by the progress made through the following join in the second step.Similarly, for the second issue, we show that the sum of the parts is no bigger than the whole when splitting pipes.
As P-vertices of degree 3 or less are converted to Q-vertices (see Section 3.1.1),we use deg*(u) = deg*(v) = deg*(ρ) = max{deg(x) − 3, 0} to denote the number of incident edges that keep a P-vertex u (and also the other endpoint v of its pipe ρ = (u, v, ϕ uv )) from becoming converted to a Q-vertex.We also partition the set of all pipes P into the two cells P CC and P B = P \ P CC , where P CC contains all pipes where both endpoints are cut-vertices.We define the potential of an instance I as Φ(I) = ρ∈P B deg*(ρ) + ρ∈P CC (2 deg*(ρ) − 1).We show that the operations always decrease this potential.To analyze the potential change of PropagatePQ and EncapsulateAndJoin, we need the following technical lemma for bounding the sum of the degrees of multiple smaller pipes replacing a single bigger pipe.
Proof.Observe that the d i are ordered increasing and thus d i ≥ 3 for i = 1, . . ., j and d i < 3 for i = j+1, . . ., k.More specifically, it is d j+1 , . . ., d j+ = 2 and d j+ +1 , . . ., d k = 1.This yields and we can also avoid the "max" using We now start at 3 ≤ c + + 2j, which can be rewritten as k − 3j ≤ c − 3 + 2 + (k − − j).Adding j i=1 d i on both sides and using the above observations yields Note that inserting c = k − 1 in the first formula yields the second formula.It remains to show that in this case 3 ≤ c + + 2j or the equivalent 4 ≤ k + + 2j follow from 4 ≤ k i=1 d i .If k ≥ 4, the inequality obviously always holds.If k = 3, it must be j > 1 or > 1 as the sum is at least 4. If k = 2, it must be j > 1 or ≥ 2 as the sum is at least 4.
As each inner node except for the root has one edge connecting it to its parent, we also add ∆E This can be used to bound the size of instances resulting from applying multiple operations consecutively and finally to bound the time required to find a solution for an instance.As m ∈ Ω(n), this shows that the resulting instance has O(m) vertices and each connected component has O(m) edges.Computing the embedding trees for a single connected component on demand can thus be done in O(m) time.In addition to this computation, each of the k operations takes time linear in the degree of the vertex it is applied to, which also is in O(m).Thus, each operation takes O(m) time and, in total, it takes O(m 2 ) time to reach a reduced instance.As the size of this reduced instance is also in O(m 2 ), using Lemma 8 for finding a solution for the reduced instance can be done in O(m 2 ) time.

Applications
We start our discussion of applications of Synchronized Planarity with the Atomic Embeddability problem.Recall from the introduction that Atomic Embeddability has two graphs as input.One graph represents a molecule structure with atoms and pipes between them, the other graph is mapped onto that structure such that edges connect vertices on a single atom or vertices on neighboring atoms through the corresponding pipe.As observed by Fulek and Tóth [16, Observation 1], Atomic Embeddability can be equivalently viewed as follows.For each atom consider the graph on that atom together with, for each incident pipe, one virtual vertex that is incident to all edges that would normally go through this pipe to a neighboring atom.Note that each pipe has two virtual vertices corresponding to it, one on each of its incident atoms.Then an instance of Atomic Embeddability is positive if and only if all these graphs can be embedded such that every pair of virtual vertices corresponding to the same pipe have opposite rotation.This directly reduces Atomic Embeddability to Synchronized Planarity.
Theorem 13.Atomic Embeddability can be solved in O(m 2 ) time.
To reduce Clustered Planarity to Synchronized Planarity, we use the CD-tree [8]; see also Figure 6.Each node of the CD-tree corresponds to a graph, called its skeleton.Some vertices of a skeleton are virtual vertices.Each virtual vertex corresponds to exactly one virtual vertex in a different skeleton, called its twin, and there is a bijection between the edges incident to a virtual vertex and its twin.The tree structure of the CD-tree comes from these correspondences between twins, that is, the CD-tree has an edge between two nodes if and only if their skeletons have virtual vertices that are twins of each other.It is known that a clustered graph is c-planar if and only if the skeletons of all nodes in its CD-tree can be embedded such that every virtual vertex and its twin have opposite rotation [8, Theorem 1]. 5 As the CD-tree has linear size and can be computed in linear time, this yields a linear reduction from Clustered Planarity to Synchronized Planarity.Theorem 14. Clustered Planarity can be solved in O((n + d) 2 ) time, where d is the number of cluster boundary crossings.
Proof.We use the disjoint union of all skeletons of the CD-tree and match each virtual vertex with its twin using a pipe.We can assume that the underlying graph of a Clustered Planarity instance has no multi-edges and it must be planar to be cluster-planar, thus its number of edges satisfies m ∈ O(n+d) and the runtime of our algorithm is O((n + d) 2 ).
Another problem that investigates the enforcement of rotation constraints in planar embeddings is Partially PQ-constrained Planarity [6].Here, each vertex in the graph can be annotated with a PQ-tree that limits the rotations of (some of) its incident edges.connected to the respective cap-vertex.To be able to match the cap-vertices with the vertices in the original graph, further degree-1 vertices are connected to the cap-vertices until their degree matches the respective node in the original graph; see Figure 7.The pipe then ensures that the rotation of the matched vertex is compatible with the PQ-tree it was annotated with.Note that previous algorithms are geared towards biconnected instances and cannot handle cut-vertices of degree more than 5, while this approach works for general graphs.
For two graphs G 1 and G 2 , SEFE is equivalent to finding a pair of planar embeddings that induce the same (i.e.consistent) cyclic edge orderings and the same (i.e.consistent) relative positions on their common graph G = G 1 ∩ G 2 [23].Our algorithm can be used to provide the synchronization for the first half of this requirement, which is sufficient for instances with a connected shared graph.
Theorem 16.Connected SEFE can be solved in O(n 2 ) time.
Proof.We add both G 1 and G 2 to the Synchronized Planarity instance and also add a bond b 1 b 2 for each vertex x ∈ G.The parallel edges of the bond correspond to the edges incident to x in G. Again, we add further degree-1 vertices so that we can match x 1 with b 1 and x 2 with b 2 ; see Figure 8.The Synchronized Planarity algorithm can then be used to obtain embeddings E 1 and E 2 for G 1 and G 2 , respectively.As pipes reverse the order of incident edges, a solution for the Synchronized Planarity instance will have one of the two graphs mirrored with respect to the graph shared with the other, that is, the solution for the SEFE instance is E 1 , E 2 .partition.Using a triconnected graph for this atom ensures that exactly two flips are possible and all Q-vertices in the partition are flipped the same way.The algorithm of Fulek and Tóth relies on seven basic operations: • Suppress eliminates pipes with degree two or less, • Delete removes certain edges when all affected components are subcubic, • Split splits an atom into its connected components, and • Detach splits unmatched cut-vertices.
• Enclose encloses a cut-vertex inside its own atom, • Contract joins two neighboring atoms (under certain conditions), and • Stretch encodes the fact that a subset of edges incident to a vertex must be consecutive by splitting the vertex into two.Fulek and Tóth carefully orchestrate these operations into two large subroutines, which they then iteratively use to globally reduce the maximum degree of cutvertices that correspond to pipes.Eventually all such cutvertices have small degree and the problem can be solved directly as each part of the instance is either subcubic or what they call toroidal.
Our algorithm only uses four basic operations: ConvertSmall, EncapsulateAndJoin, Simplify-Matching, and PropagatePQ.These operations can be applied in an arbitrary order to reach a reduced instance, which can then be solved directly.
In direct comparison, our operation ConvertSmall handles all the cleanup (and more) that Fulek and Tóth achieve with Suppress and Delete.Further, in our context, the operation Split is not needed, since we do not differentiate between connected components and atoms, and Detach is not needed since we handle unmatched cutvertices in our base case algorithm rather than during the reduction phase.
Our operation EncapsulateAndJoin replaces multiple calls to Enclose and Contract as a much more targeted solution.The former also encompasses the stretching of local branches in Carmesin's work [10].Our operation and the conditions under which it can (and must be) applied clearly expose the key insight that also stands behind the algorithm of Fulek and Tóth, and which we have formalized in Lemma 2: any planar embedding of the bipartite graph resulting from contracting two stars at their centers respects the cut made for splitting both stars.Furthermore, there are parallels between Contract and case iii of SimplifyMatching (i.e. when a bond links two distinct pipes). 6Finally, thanks to the use of PQand SPQR-trees, PropagatePQ can be seen as a much more focused replacement of multiple iterations of Stretch.An example for how the operations relate can be seen in Figure 11 of the paper by Fulek and Tóth [16], where an instance on which SimplifyMatching and then PropagatePQ can (and clearly should) be applied, is first Contracted twice in Step (iv.a) and then Stretched in (a possibly later iteration of) Step (v.c) of their Subroutine 2.
To conclude, our approach makes it clear to see where progress is made, uncovering important ideas that are not obvious in the global degree-reduction approach employed by Fulek and Tóth.

Conclusion
We have given a quadratic-time algorithm for Synchronized Planarity, which improves the previous O(n 8 )-time algorithm for the linear-time equivalent problem Atomic Embeddability [16].Similar to Goldberg and Tarjan's push-relabel algorithm, it relies on few and simple operations that can be applied in an arbitrary order.They also highlight where and how progress is made and thereby clearly expose key ideas that also underlie the algorithm for Atomic Embeddability.
The applications of Synchronized Planarity include solving Clustered Planarity, Atomic Embeddability, Connected SEFE and Partially PQ-constrained Planarity in quadratic time, thanks to linear-time reductions to Synchronized Planarity for all of them.This improves over the previously fastest algorithms via the O(n 8 )-time algorithm for Atomic Embeddability.In the case of Connected SEFE the reduction used in [16] includes a quadratic blowup and therefore yields an O(n 16 )-algorithm.Our direct linear-time reduction leads to a quadratic algorithm.

Lemma 3 .
Applying ConvertSmall to a P-vertex u with deg(u) < 4 yields an equivalent instance in constant time.

Figure 2 :
Figure 2: A matched cut-vertex (a) and the result of encapsulating it (b).

Figure 3 :
Figure 3: Two (encapsulated) matched cut-vertices (a).Depending on the mapping ϕ, any bipartite graph can result from joining them.For example, the graph (b) can result, which is isomorphic to the square grid graph shown in (c).

Lemma 4 .
Applying EncapsulateAndJoin to a pipe ρ yields an equivalent instance in O(deg(ρ)) time.Proof.By Lemma 1, a valid embedding E of an instance I respects each of the cuts (

Figure 4 :
Figure4: A block-vertex u matched with vertex v (a); the bijection ϕ uv maps the bold edge of u to the bold edge of v, the remaining edges are mapped according to their order, clockwise around u and counter-clockwise around v. The result of applying PropagatePQ (u, I) (b).Note that the second inserted tree T u is mirrored with respect to T u .Q-vertices and -nodes are drawn as squares while P-vertices and -nodes are drawn as disks.

Lemma 6 .
Applying SimplifyMatching to a block-vertex u with a trivial embedding tree yields an equivalent instance in O(deg(u)) time.

Figure 5 :
Figure 5: The three cases of the SimplifyMatching operation.In Case i (a) and Case ii (b), the pipe ρ is removed.In Case iii (c) the pipes ρ, ρ are replaced by pipe ρ .

Lemma 10 .
For an instance I = (G, P, Q, ψ) of Synchronized Planarity and an instance I = (G , P , Q , ψ ) that results from application of either EncapsulateAndJoin, PropagatePQ or Simplify-Matching to I, the following three properties hold: (i) The potential reduction ∆Φ = Φ(I) − Φ(I ) is at least 1. (ii) The number of nodes added to the graph satisfies ∆V = |V (G )| − |V (G)| ≤ 2 • ∆Φ + 12. (iii) If the operation replaces a connected component C by one or multiple connected components, then each such component C satisfies ∆E(C) = |E(C )| − |E(C)| ≤ 2 • ∆Φ.Proof.We now analyze the effects of EncapsulateAndJoin, PropagatePQ, and SimplifyMatching on the measures ∆Φ, ∆V and ∆E(C) and show that the found changes satisfy the claimed bounds.Operation EncapsulateAndJoin (ρ, I) in the first step encapsulates both cut-vertices u, v to their own star components.For each block incident to u, this introduces two new vertices that are connected by a new pipe.Letd 1 ≥ d 2 ≥ . . .≥ d k−1 ≥ d k ≥ 1 bethe degrees of the k ≥ 2 ray vertices of u after the encapsulation.As one end of the added pipes is a block-vertex, the potential is increased by k i=1 max{d i − 3, 0}.The rays around v increase the potential and number of vertices likewise, whered 1 ≥ d 2 ≥ . . .≥ d k −1 ≥ d k ≥ 1 are the degrees of the k ≥ 2 rays of v after the encapsulation.Using k i=1 d i = k i=1 d i = D it is deg(ρ) = deg(v) = deg(u) = Dand deg*(ρ) = deg*(v) = deg*(u) = max{D−3, 0} = D−3 as u and v are P-vertices of the same degree greater then three.In the second step, removing ρ connecting two cut-vertices together with its endpoints reduces the potential by 2 deg*(ρ) − 1 and we thus get ∆Φ = 2 • (D − 3) − 1 − k i=1 max{d i − 3, 0} − k i=1 max{d i − 3, 0}.As D ≥ 4, we know from the second formula of Lemma 9 that k i=1 max{d i − 3, 0} ≤ ( k i=1 d i ) − 4 = D − 4 and also k i=1 max{d i − 3, 0} ≤ D − 4. Using this inequality in the formula above yields ∆Φ = 2D − 7 − k i=1 max{d i − 3, 0} − k i=1 max{d i − 3, 0} ≥ 2D − 7 − (D − 4) − (D − 4) = 1 as claimed by (i).As the encapsulation generates two vertices for each ray and the join removes two vertices, we have ∆V = 2k + 2k − 2. Lemma 9 with c = 3 unconditionally yields k ≤ D − k i=1 max{d i − 3, 0} and k ≤ D − k i=1 max{d i − 3, 0}.Now claim (ii) holds as∆V ≤ 2 •   D − k i=1 max{d i − 3, 0} + D − k i=1 max{d i − 3, 0} − 1   = 2 • (∆Φ + 6) .In the first step of EncapsulateAndJoin, two new components with deg(u) = deg(v) edges each are added, which are then pairwise combined in the second step, yielding a new component withk i=1 d i = k i=1 d iedges, which is no bigger than the components of u or v as required for (iii).Operation PropagatePQ (u, I) replaces the pipe ρ having block-vertex u as one endpoint by one pipe for each inner P-node of the non-trivial embedding tree T u of u.If T u only consists of a single Q-node, we are removing a pipe without adding any new pipes, nodes, or edges, thus properties (i)−(iii) are trivially satisfied.Otherwise, let d 1 ≥ d 2 ≥ . . .≥ d k−1 ≥ d k be the degrees of the k ≥ 2 inner vertices of T u .The tree T u has deg(u) leaves and thus (k i=1 d i ) + deg(u) = 2 • |E(T u )| = 2 • (|V (T u )| − 1) = 2 • (k + deg(u) − 1)or, equivalently, deg(u) = k i=1 (d i − 2) + 2. As u is a P-vertex with degree at least 4, deg*(u) = deg(u) − 3 = k i=1 (d i − 2) − 1.As T u contains no vertices of degree 2, it is d i ≥ 3 for i = 1, . . ., k.As the added pipes all have one endpoint in the biconnected component of u, the potential is reduced by ∆Φ = deg*(u) − (C) = k − 1 additional edges to each component.Observe that ∆E(C) = k − 1 < 2k − 2 = 2 • ∆Φ as claimed by (iii).Operation SimplifyMatching always removes at least one pipe ρ ∈ P B and thus decreases the potential by at least deg*(ρ).If two pipes ρ, ρ are replaced by their transitive shortcut (i.e.Case iii of SimplifyMatching applies), this adds a new pipe ρ * .If at least one endpoint of ρ * is a block-vertex, the potential change is ∆Φ = 2 deg*(ρ) − deg*(ρ).Otherwise, both endpoints are cut-vertices and ρ * belongs to P CC , yielding a potential change of ∆Φ = 2 deg*(ρ) − (2 deg*(ρ) − 1) = 1.As no vertices or edges are added or removed ∆V = ∆E(C) = 0, which is less than ∆Φ.With this lemma, we know that each step decreases the potential by at least 1 without growing the graph too much.The following shows an upper bound on the potential.Lemma 11.Let I be an instance of Synchronized Planarity.Then, Φ(I) < 2m.Proof.Each pipe ρ matching two vertices u and v contributes at most 2 deg*(ρ) − 1 < deg(u) + deg(v) to the potential.Since each vertex is part of at most one pipe, the sum of all potentials is bounded by v∈V deg(v) = 2m.

Figure 6 :
Figure 6: An instance of Clustered Planarity (a) and its CD-tree representation (b), where each skeleton is shown with a gray background and the virtual vertices are shown as colored disks.

Theorem 15 .Figure 7 :Figure 8 :
Figure 7: The equivalent Synchronized Planarity instance for an instance of Partially PQ-constrained Planarity, where the PQ-tree T (v 1 ) (left) restricts the order of the edges {a, . . ., h} around the vertex v 1 in G (right).The cap-vertex v 1 was added together with two degree-1 vertices.