Clustered Planarity with Pipes

We study the version of the C-Planarity problem in which edges connecting the same pair of clusters must be grouped into pipes, which generalizes the Strip Planarity problem. We give algorithms to decide several families of instances for the two variants in which the order of the pipes around each cluster is given as part of the input or can be chosen by the algorithm.


Introduction
Visualizing clustered graphs is a challenging task with several applications in the analysis of networks that exhibit a hierarchical structure.The most established criterion for a readable visualization of these graphs has been formalized in the notion of c-planarity, introduced by Feng, Cohen, and Eades [12] in 1995.Given a clustered graph C (G, T ) (c-graph), that is, a graph G equipped with a recursive clustering T of its vertices, problem C-Planarity asks whether there exist a planar drawing of G and a representation of each cluster as a topological disk enclosing all and only its vertices, such that no "unnecessary" crossings occur between disks and edges, or between disks.Ever since its introduction, this problem has been attracting a great deal of research.However, the question about its computational complexity withstood the attack of several powerful algorithmic tools, as the Hanani-Tutte theorem [13,15], the SPQR-tree machinery [9], and the Simultaneous PQ-ordering framework [5].
The clustering of a c-graph C (G, T ) is described by a rooted tree T whose leaves are the vertices of G and whose each internal node µ, except for the root, represents a cluster containing all and only the leaves of the subtree of T rooted at µ.A c-graph is flat if T has height 2. The clusters-adjacency graph G A of a flat c-graph is the graph obtained by contracting each cluster into a single vertex and by removing multi-edges and loops.
Cortese et al. [10] introduced a variant of C-Planarity for flat c-graphs, which we call C-Planarity with Embedded Pipes, whose input is a flat c-graph together with a planar drawing of its clusters-adjacency graph, where vertices are represented by disks and edges by pipes.The goal is to produce a c-planar drawing in which each vertex lies inside the disk representing the cluster it belongs to and each inter-cluster edge lies inside the corresponding 13:2 Clustered Planarity with Pipes pipe.In [10] this problem is solved when the underlying graph is a cycle.Chang, Erickson, and Xu [8] observed that in this case the problem is equivalent to determining whether a closed walk of length n in a simple plane graph is weakly simple, and improved the time complexity to O(n log n).For the special case in which the clusters-adjacency graph is a path, known by the name of Strip Planarity, there exist polynomial-time algorithms when the underlying graph has a fixed planar embedding [2] and when it is a tree [13].
We remark that polynomial-time algorithms for the C-Planarity problem are known under strong limitations on the number or on the arrangement of the components in the clusters.A component of a cluster is a maximal connected subgraph induced by its vertices.In particular, C-Planarity can be decided in linear time when each cluster contains one connected component [9,12] (the c-graph is c-connected).However, even when each cluster contains at most two connected components, polynomial-time algorithms are known only when further restrictions are imposed on the c-graph [5,14].The results we show in this paper are also based on imposing constraints on the number of certain types of components.
A component is multi-edge if it is incident to at least two inter-cluster edges, otherwise it is single-edge.Also, it is passing if it is adjacent to vertices belonging to at least two other clusters in T , otherwise it is originating.For Strip Planarity the originating components can be further distinguished into source and sink components, based on whether the inter-cluster edges incident to them only belong to the lower or to the upper strip.
Our contributions.We give polynomial-time algorithms for instances of Strip Planarity with a unique source component (Section 3) and for instances of C-Planarity with Embedded Pipes with certain combinations of originating and passing multi-edge components in the clusters (Section 4).Finally, in Section 5 we introduce a generalization of C-Planarity with Embedded Pipes, which we call C-Planarity with Pipes, in which the inter-cluster edges are still required to be grouped into pipes, but the order of the pipes around each disk is not prescribed by the input.By introducing a new characterization of C-Planarity, we give an FPT algorithm for C-Planarity with Pipes that runs in g(K, c) ), where K is the maximum number of multi-edge components in a cluster and c is the number of clusters with at least two multi-edge components.We remark that our results imply polynomial-time algorithms for all the three problems in the case in which each cluster contains at most two components.
Due to space limitations, complete proofs are deferred to the full version of the paper [1].

Preliminaries
For the standard definitions on planar graphs, planar drawings, planar embeddings, and connectivity we point the reader to [11].We call rotation scheme the clockwise circular ordering of the edges around each vertex in a planar embedding, and refer to the containment relationships between vertices and cycles in the embedding as relative positions.Also, if block of a 1-connected graph consists of a single edge, we call it trivial, otherwise non-trivial.

PQ-trees.
A PQ-tree [7] T is an unrooted tree, whose leaves are the elements of a set A and whose internal nodes are either P-nodes or Q-nodes, that can be used to represent all and only the circular orderings O(T ) on A satisfying a given set of consecutivity constraints on subsets of A. The orderings in O(T ) are all and only the circular orderings on the leaves of T obtained by arbitrarily ordering the neighbours of each P-node and by arbitrarily selecting for each Q-node a given circular ordering on its neighbours or its reverse ordering.

P. Angelini and G. Da Lozzo 13:3
Connectivity.A k-cut of a graph is a set of at most k vertices whose removal disconnects the graph.A graph with no 1-cut is biconnected.The maximal biconnected components of a graph are its blocks.Without loss of generality, we will assume that the clusters-adjacency graph of C (G, T ) is connected and that for every component c of every cluster µ ∈ T : (i) there exists at least an inter-cluster edge incident to c, (ii) every block of c that is a leaf in the block-cut-vertex tree of c contains at least a vertex v such that v is not a cut-vertex of c and it is incident to at least an inter-cluster edge, and (iii) if there exists exactly one vertex in c that is incident to inter-cluster edges, then c consists of a single vertex.
Simultaneous Embedding with Fixed Edges.Given planar graphs G 1 = (V, E 1 ) and are the common and the union graph, respectively.See [4] for a survey.
We state here a theorem on SEFE that will be fundamental for our results.Even though this theorem has never been explicitly stated in the literature, it can be easily deduced from known results [6].We discuss this in the full version of the paper [1].

Single-source Strip Planarity
In this section we prove a result of the same flavour as that by Bertolazzi et al. [3] for the upward planarity testing of single-source digraphs.Namely, we show that instances of Strip Planarity with a unique source component can be tested efficiently.The Strip Planarity problem takes in input a planar graph G = (V, E) and a mapping γ : V → {1, . . ., k} of each vertex to one of k unbounded horizontal strips such that, for any edge (u, v) ∈ E, it holds |γ(u) − γ(v)| ≤ 1.The goal is to find a planar drawing of G in which vertices lie inside the corresponding strips and edges cross the boundary of any strip at most once.This problem is equivalent to C-Planarity with Embedded Pipes when G A is a path [2].We start with an auxiliary lemma.An instance G, γ of Strip Planarity on k > 1 strips is spined if there exists a path (v 1 , . . ., v k ) in G such that γ(v i ) = i, vertex v k is the unique vertex in the k-th strip, and each vertex v i with i = 1 induces a component in the i-th strip.Path (v 1 , . . ., v k ) is the spine path of G, γ and (v i , v i+1 ) is the i-th edge of this path.

Clustered Planarity with Pipes
For each inter-strip edge e incident to a vertex u in c, add to G c a dummy vertex v e and edges (v, v e ) and (v e , u).If G c has cut-vertices, then let B c be the block of G c that contains v.Then, construct a PQ-tree T c representing all possible orders of the edges around v in a planar embedding of B c .This can be done by applying the planarity testing algorithm by Booth and Lueker [7], in such a way that v is the last vertex of the st-numbering of B c .Note that the leaves of PQ-tree T c are in one-to-one correspondence with the vertices v e in B c .We construct a representative graph G Tc from T c , as described in [12], composed of (i) wheel graphs (that is, graphs consisting of a cycle, called rim, and of a central vertex connected to every vertex of the rim), of (ii) edges connecting vertices of different rims not creating any simple cycle that contains vertices belonging to more than one wheel, and of (iii) vertices of degree 1, which are in one-to-one correspondence with the leaves of T c (an hence with the dummy vertices v e in B c ), each connected to a vertex of some rim.As proved in [12], in any planar embedding of G Tc in which all the degree-1 vertices are incident to the same face, the order in which such vertices appear in a Eulerian tour of such a face is in O(T c ).
Construct G , γ as follows.For i = 2, . . ., k and for each vertex v with γ(v) = i, add v to V and set γ (v) = i − 1, that is, assign all the vertices of the i-th strip of G, γ , with i ≥ 2, to the (i − 1)-th strip of G , γ .Further, add to E all edges in E ∩ (V × V ).Also, add all vertices and edges of G Tc to V and to E , respectively, and set γ (u) = 1 for each vertex u of G Tc .Finally, for each inter-strip edge e = (x, y) in E with γ(x) = 1 and γ(y) = 2, add to E an intra-strip edge between y and the degree-1 vertex of G Tc corresponding to v e .
Instance G , γ can be constructed in linear time [7,12] and its size is linear in the one of G, γ .Further, G , γ has a unique source component, which contains G Tc as a subgraph, and is spined.We now show the equivalence between the two instances.
Suppose that G, γ admits a strip-planar drawing Γ.Note that all the vertices of c incident to inter-strip edges lie on the outer face of c in Γ.To construct a strip-planar drawing Γ of G , γ , subdivide each inter-strip edge incident to c with a dummy vertex v e lying in the interior of the first strip of Γ.By the construction of T c and of G Tc , each vertex v e corresponds to exactly one degree-1 vertex of G Tc .Let c + be the subgraph of G induced by the vertices in c and by all the vertices v e .Since the order in which the vertices v e appear in a Eulerian tour of the outer face of c + in Γ is in O(T c ), we can replace the drawing of c + in Γ with a drawing of G Tc in which each degree-1 vertex is mapped to its corresponding vertex v e .To obtain Γ , we merge the first two strips of Γ into the first strip of Γ .
Suppose that G , γ admits a strip-planar drawing Γ , we show how to construct a stripplanar drawing Γ of G, γ .First, by Lemma 2, we can assume that in Γ the intersection point between the first edge of the spine path of G , γ and the line separating the first and the second strip in Γ is the left-most intersection point between any edge (x, y) with γ(x) = 1 and γ(y) = 2 and such a line.Further, we can assume the following.

Claim 4. For every wheel W in G Tc , the rim of W contains in its interior its central vertex and no other vertex in Γ .
Initialize Γ as the drawing in Γ of the subinstance of G , γ induced by the vertices not in G Tc , where the i-th strip in Γ is mapped to the (i + 1)-th strip in Γ.First, draw G Tc in the first strip of Γ as it is drawn in Γ .Then, draw each inter-strip edge (x, y) with y in G Tc , which corresponds to an intra-strip edge incident to G Tc in Γ , as a curve composed of six parts.The first part coincides with the drawing of (x, y) in Γ ; the second is a curve arbitrarily close to the drawing in Γ of a path in G Tc from y to the first vertex v 1 of the spine path of G , γ ; the third is a curve arbitrarily close to the drawing in Γ of the first edge of the spine path of G , γ till a point p in the interior of the first strip of Γ and arbitrarily

13:5
close to the boundary of the second strip; the fourth is a horizontal segment connecting p to a point q lying to the left of Γ ; the fifth is a vertical segment connecting q to a point r in the interior of the first strip of Γ; and the sixth is a curve connecting r to y.By Claim 4, the degree-1 vertices of G Tc lie on its outer face in Γ (and hence in Γ).Thus, the inter-strip edges incident to G Tc can be drawn without crossings, as they preserve the same containment relationship between vertices and cycles in Γ as the corresponding intra-strip edges in Γ .
Let H be the graph obtained from B c by subdividing each edge e incident to v with a dummy vertex v e and by removing v. Replace the drawing of G Tc in Γ with a planar drawing of H such that the vertices v e appear in a Eulerian tour of its outer face in the same clockwise order as the corresponding degree-1 vertices appear in a Eulerian tour of the outer face of G Tc in Γ. Recall that these vertices are on the outer face of G Tc in Γ, by Claim 4. Such a drawing of H exists since this order is in O(T c ) [12].To complete Γ, for each cut-vertex z of G c separating B c from a subgraph G z of G c , draw graph G z arbitrarily close to z.Note that no vertex of G z , except possibly for z, is incident to an inter-strip edge.
Let G, γ be an instance of Strip Planarity on k > 1 strips satisfying the properties of Lemma 3. By applying this lemma k − 1 times, we obtain an instance of Strip Planarity on k = 1 strips, that is, an instance whose strip-planarity coincides with the planarity of its underlying graph, which can be tested in linear time [7].Hence, we get the following.

C-Planarity with Embedded Pipes
In this section we show that the C-Planarity with Embedded Pipes problem is solvable in quadratic time for a notable family of instances.Let c be an originating component belonging to a cluster µ ∈ T and let ν = µ ∈ T be the cluster to which the vertices of c are adjacent to.We say that c is originating from µ to ν.

Lemma 7. Let C (G, T ), Γ A be an instance of C-Planarity with Embedded Pipes and let S be the maximum number of originating multi-edge components in a cluster that are incident to the same pipe. It is possible to construct in linear time an equivalent instance
is incident to at most one non-trivial block, and (iii) each cut-vertex of G 1 = (V, E 1 ) is incident to at most S non-trivial blocks.
Proof.We show how to construct G 1 , G 2 starting from C (G, T ), Γ A .The frame gadget H is an embedded planar graph defined as follows.Refer to Fig. 1.a.For each intersection point between a disk representing a cluster µ ∈ T and a segment delimiting a pipe representing an edge of G A incident to µ in the drawing Γ A of G A , we add a vertex at this point.This results in a planar drawing of a graph; we set H to be this graph.We call disk cycle of µ the cycle in H obtained from the disk of µ in Γ A .Similarly, we call pipe cycle of an edge (µ, ν) of G A the cycle in H obtained from the pipe representing edge (µ, ν) in Γ A .Note that, for clusters incident to exactly one pipe, this operation introduced two copies of the same edge; subdivide with a dummy vertex the copy that is not incident to the interior of this pipe.Then, add a vertex v out in the outer face of H, connected to all the vertices incident to this face, and triangulate all the faces of H not corresponding to the interior of any cluster cycle or of any pipe cycle, hence obtaining a triconnected embedded planar graph.See For each cluster µ ∈ T , augment G 1 , G 2 as follows; see Fig. 2.a.Subdivide an edge of G ∩ that corresponds to a portion of the boundary of the disk representing µ in Γ A with a dummy vertex γ µ , and add to G ∩ a star C µ , whose central vertex is adjacent to γ µ , with a leaf z(c i ) for each multi-edge component c i of µ.Also, add to G ∩ each component c i of µ.Finally, for each edge (µ, ν) of G A , subdivide (v µ,ν , a µ,ν ) with a dummy vertex α µ,ν and (a µ,ν , b µ,ν ) with a dummy vertex β µ,ν .Add to G ∩ a star A µ,ν (B µ,ν ), whose central vertex is adjacent to α µ,ν (is identified with β µ,ν ), with a leaf a µ (e) (a leaf b µ (e)) for each inter-cluster edge e incident to a component of µ and to a component in ν.To complete G 1 , G 2 , add the following edges only belonging to G 1 and to G 2 .For each inter-cluster edge e = (x, y) with x ∈ µ and y ∈ ν, add to G 1 edges (x, a µ (e)), (y, a ν (e)), and (b µ (e), b ν (e)), and add to G 2 edges (a µ (e), b µ (e)) and (a ν (e), b ν (e)).Also, for each vertex x of a component c i of a cluster µ such that x is incident to at least an inter-cluster edge, add to G 2 an edge (x, z(c i )).
Clearly, G 1 , G 2 can be constructed in linear time.We now prove that G 1 and G 2 satisfy the properties of the lemma.We note that G 1 and G 2 are connected, since each vertex of a component c i is connected to the frame gadget by means of paths in G 1 and in G 2 passing through stars A µ,ν and C µ , respectively.Also, for each cluster µ ∈ T , graph G 2 contains cut-vertices γ µ , the center of star C µ , and vertices z(c i ), for each component c i of µ.However, vertex γ µ is incident to exactly one non-trivial block, that is, the one containing all the vertices and edges of the frame gadget; the center of C µ is incident only to non-trivial blocks; and vertices z(c i ), for each component c i of µ, are incident to at most one non-trivial block, that is, the one containing all the vertices and edges in c i .Also, for each cluster µ ∈ T , 13:7 all the passing components in µ belong to the biconnected component of G 1 containing all the vertices and edges of the frame gadget, while each multi-edge component originating from µ to a cluster ν determines a non-trivial block incident to α µ,ν , and each single-edge originating component from µ to a cluster ν determines a trivial block incident to α µ,ν .Since the number of multi-edge components originating from any cluster to any other cluster is at most S, graph G 1 satisfies the required properties.The following claim implies that G ∩ can be transformed into a spanning forest without altering the properties of G 1 , G 2 .

Claim 8. Each cycle of G ∩ can be removed without altering the properties of G 1 , G 2 by replacing one of its edges with the gadget in Fig. 2.b.
We now prove the equivalence.Suppose that G 1 , G 2 admits a SEFE Γ 1 , Γ 2 .We show how to construct a c-planar drawing with embedded pipes Γ of C (G, T ), Γ A .Without loss of generality, assume that vertex v out is embedded on the outer face of Γ 1 , Γ 2 .Note that the paths in G ∩ corresponding to the segments delimiting the pipes representing an edge of G A incident to a cluster µ ∈ T appear in Γ 1 , Γ 2 in the same clockwise circular order as the corresponding pipes appear around the disk representing µ in Γ A .This is due to the fact that the frame gadget is a triconnected planar graph whose unique planar embedding is the one obtained from Γ A .Note that in Γ 1 , Γ 2 all the vertices in V appear either in the interior or on the boundary of disk cycles or of pipe cycles.This is due to the fact that removing all the vertices on the boundary of such cycles leaves a connected subgraph of G ∪ and that there exists a unique face of H to which all the vertices belonging to such cycles are incident.
The proof is based on the fact that any SEFE of G 1 , G 2 has the following properties.1.For each cluster µ ∈ T , the central vertex of star C µ lies in the interior of the disk cycle of µ, and hence all the vertices and edges of the components c i of µ lie in the interior of such a cycle, since G 2 is connected.2. For each two clusters µ, ν ∈ T , the vertices of the components of µ and of the those of ν lie in the interior of different cycles of G 1 , since all the components of each cluster µ are connected by paths in G 1 to the leaves of a star A µ,ξ , where ξ is a cluster adjacent to µ.Also, all the leaves of these stars lie in the interior of a cycle of G 1 delimited by edges of G ∩ and by edges (a µ,ξi , a µ,ξi ), for all the clusters ξ i adjacent to µ.

I S A A C 2 0 1 6
13:8 Clustered Planarity with Pipes 3.For each inter-cluster edge e connecting a vertex v of a component c i of µ to a cluster ν, edge (v, a µ (e)) in G 1 crosses edge (u µ,ν , v µ,ν ).This is due to the previous two points and the fact that the leaves of A µ,ν lie outside the disk cycle of µ.We can assume that each of these edges crosses edge (u µ,ν , v µ,ν ) exactly once, as otherwise we could redraw them to fulfill this requirement.4. For two adjacent clusters µ, ν ∈ T , the order in which the edges in G 1 incident to the leaves of A µ,ν cross (u µ,ν , v µ,ν ) from u µ,ν to v µ,ν is the reverse of the order in which the edges in G 1 incident to the leaves of A ν,µ cross (u ν,µ , v ν,µ ) from u ν,µ to v ν,µ , where the identification between an edge incident to a leaf a µ (e) of A µ,ν and an edge incident to a leaf a ν (e) of A ν,µ is based on the inter-cluster edge e they correspond to.In fact, the order in which the edges in G 1 incident to the leaves of A µ,ν cross (u µ,ν , v µ,ν ) is transmitted to the leaves of B µ,ν via edges in G 2 , then it is transmitted to the leaves of B ν,µ via edges in G 1 , and finally to the leaves of A ν,µ via edges in G 2 .Note that all the leaves of these stars lie in the interior of the pipe cycle corresponding to edge (µ, ν) of G A .
We describe how to obtain a c-planar drawing with embedded pipes Γ of C (G, T ), Γ A from Γ 1 , Γ 2 .For each µ ∈ T , draw region R(µ) as the simple closed region whose boundary coincides with the drawing in Γ 2 of the disk cycle of µ.Each component c i of a cluster µ has the same drawing in Γ as c i in Γ 1 , Γ 2 .For each inter-cluster edge e = (x, y) with x ∈ µ and y ∈ ν, the portion of e in the interior of R(µ) (of R(ν)) coincides with the drawing of edge (x, a µ (e)) (of edge (y, a ν (e))) between x (between y) and the intersection point of this edge with edge (u µ,ν , v µ,ν ) (with edge (u ν,µ , v ν,µ )).To complete the drawing of all the inter-cluster edges between µ and ν in the interior of the pipe representing edge (µ, ν) of G A , connect the intersection points between the corresponding edges in G 1 and edges (u µ,ν , v µ,ν ) and (u ν,µ , v ν,µ ) by means of a set of non-intersecting curves.This is possible since the order in which the edges in G 1 incident to the leaves of A µ,ν cross (u µ,ν , v µ,ν ) from u µ,ν to v µ,ν is the reverse of the order in which the edges in G 1 incident to the leaves of A ν,µ cross (u ν,µ , v ν,µ ) from u ν,µ to v ν,µ .This implies that Γ is a c-planar drawing of C (G, T ).The fact that Γ can be continuously deformed into a c-planar drawing with embedded pipes of C (G, T ), Γ A is due to the fact that the paths in G ∩ corresponding to the segments delimiting the pipes incident to each cluster µ ∈ T appear in Γ 1 , Γ 2 in the same clockwise order as the corresponding pipes appear around the disk representing µ in Γ A .
For the other direction, the goal is to construct a SEFE Γ 1 , Γ 2 of G 1 , G 2 that satisfies all the properties describe above starting from a c-planar drawing with pipes Γ of C (G, T ), Γ A .For each cluster µ ∈ T , draw the disk cycle of µ as the boundary of the disk of µ in Γ A .Also, for each edge (µ, ν) of G A , draw the corresponding pipe cycle as the boundary of the pipe of edge (µ, ν) in Γ A .For each cluster µ ∈ T , each component c i of µ has the same drawing in Γ 1 , Γ 2 as c i in Γ.For each edge (µ, ν) of G A , the stars A µ,ν , B µ,ν , A ν,µ , and B ν,µ are drawn in Γ 1 , Γ 2 so that the order of their leaves is the same or the reverse of the order in which the inter-cluster edges between µ and ν traverse the boundary of the disk of µ in Γ.Note that this order is the reverse of the order in which these edges traverse the boundary of the disk of ν in Γ.This allows to draw all the edges in G 1 and in G 2 that are incident to such leaves without introducing crossings between edges of the same graph.The drawing of star C µ , for each cluster µ ∈ T , and of the edges in G 2 incident to its leaves can be easily obtained to respect the circular order of the inter-cluster edges incident to each of the components of µ.This concludes the proof of the lemma.By Lemma 7 and Theorem 1 we have the following main result.Theorem 9. C-Planarity with Embedded Pipes can be solved in O(n 2 ) time for instances C (G, T ), Γ A such that for each cluster µ ∈ T and for each edge (µ, ν) in G A either (CASE 1) cluster µ contains at most one originating multi-edge component from µ to ν or (CASE 2) cluster µ contains at most two multi-edge originating components from µ to ν and does not contain any passing component that is incident to ν.

C-Planarity with Pipes
In this section we introduce and study problem C-Planarity with Pipes.A c-planar drawing Γ of a flat c-graph C (G, T ) is a c-planar drawing with pipes if, for any two clusters µ, ν ∈ T that are adjacent in G A and for any two inter-cluster edges e 1 and e 2 that are incident to both µ and ν, one of the two regions delimited by B(µ), by B(ν), by e 1 , and by e 2 does not contain any vertex of G \ (µ ∪ ν); see Fig. 3. Problem C-Planarity with Pipes asks for the existence of a c-planar drawing with pipes of a given flat c-graph.We first prove that this problem is a generalization of C-Planarity with Embedded Pipes.Lemma 10.C-Planarity with Embedded Pipes reduces in linear time to C-Planarity with Pipes.The reduction does not increase the number of multi-edge components in any cluster.
We now present an FPT algorithm for C-Planarity with Pipes with two parameters, namely the maximum number K of multi-edge components in a cluster and the number c of clusters with at least two multi-edge components.Our result builds on a characterization of C-Planarity of flat c-graphs in terms of a new constrained embedding problem.

A Characterization of Flat C-Planarity
We start with some definitions.Let C (G, T ) be a flat c-graph.A components tree X µ of a cluster µ ∈ T is a rooted tree in which every internal vertex is a multi-edge component c of µ and in which every leaf x µ (e) corresponds to an inter-cluster edge e incident to one of such components.A neighbor-clusters tree Y µ of µ is a rooted tree in which there exists an internal vertex ν for each cluster ν adjacent to µ, plus a set of additional internal vertices, and every leaf y µ (e) corresponds to an inter-cluster edge e incident to µ.Let Γ be a c-planar drawing of C (G, T ), let X µ be a components tree of µ rooted at a multi-edge component ρ µ , and let Y µ be a neighbor-clusters tree of µ rooted at a cluster ξ µ , such that there exists an (d) A c-planar drawing that is not a c-planar drawing with pipes, even if the inter-cluster edges incident to the same cluster are consecutive (see the annuli around clusters), due to the presence of trivial block (µ, ν).
inter-cluster edge e µ incident to both ρ µ and ξ µ .Let O µ be the clockwise linear order in which the edges incident to µ traverse B(µ) in Γ, starting from and ending at e µ .Drawing Γ is consistent with X µ if, for each vertex c ∈ X µ , the leaves of the subtree of X µ rooted at c are consecutive in the restriction of O µ to the inter-cluster edges incident to multi-edge components of µ.Also, Γ is consistent with Y µ if, for each vertex ν ∈ Y µ , the leaves of the subtree of Y µ rooted at ν are consecutive in O µ .Let X and Y be two sets containing a components tree X µ and a neighbor-clusters tree Y µ , respectively, for each µ ∈ T .Drawing Γ is consistent with X , Y if, for each µ ∈ T , it is consistent with both X µ and Y µ .
Given a flat c-graph C (G, T ), together with two sets X and Y of components trees and of neighbor-clusters trees, respectively, for all the clusters in T , problem Inclusion-Constrained C-Planarity asks whether a c-planar drawing of C (G, T ) exists that is consistent with X , Y .Proof Sketch.The "only if part" trivially follows from the definition of Inclusion-Constrained C-Planarity.For the "if part", let Γ be any c-planar drawing of C (G, T ) and let µ be a cluster in T .Suppose that µ contains at least a multi-edge component ρ µ , as otherwise X µ is the empty tree and Γ is consistent with it.Let e µ be any inter-cluster edge incident to ρ µ and to a cluster ξ µ .Let O µ be the clockwise linear order of the edges incident to µ starting from e µ and ending at e µ .Since Γ is c-planar, no two pairs of edges incident to two different components of µ (two different clusters adjacent to µ) alternate in O µ .Hence, order O µ defines a hierarchical inclusion of the components of µ and of the clusters adjacent to µ with respect to ρ µ and to ξ µ , respectively, which can be described by means of two trees X µ and Y µ ; see Fig. 4.a-4.c.Clearly, Γ is consistent with such trees.
In the following theorem, whose proof is deferred to the full version of the paper [1], we show that the Inclusion-Constrained C-Planarity problem can be solved efficiently.
Theorem 12. Inclusion-Constrained C-Planarity can be solved in quadratic time.
In the following we prove that, for each cluster µ of a c-graph C (G, T ), there exists a neighbor-clusters tree Y µ such that every c-planar drawing with pipes of C (G, T ) is consistent with Y µ .Hence, an FPT algorithm for C-Planarity with Pipes can be based on generating, for each cluster, all the possible components trees and its unique neighbor-clusters tree, and on testing these instances of Inclusion-Constrained C-Planarity by Theorem 12.

Neighbor-clusters Trees in C-Planar Drawings with Pipes
In the following theorem we give a characterization of the c-graphs that are positive instances of C-Planarity with Pipes based on the possible orders of inter-cluster edges around each cluster in any c-planar drawing.We first consider only c-graphs whose clusters-adjacency graph G A has no trivial blocks; however, we prove later that this is not a restriction.Theorem 13.Let C (G, T ) be a flat c-graph such that G A has no trivial block.Then, C (G, T ) is a positive instance of C-Planarity with Pipes if and only if C (G, T ) admits a c-planar drawing Γ in which, for each cluster µ ∈ T , the inter-cluster edges between µ and any cluster ν adjacent to µ in G A are consecutive in the order in which the inter-cluster edges incident to µ cross B(µ) in Γ.
Proof Sketch.The "only if part" descends from the definition of a c-planar drawing with pipes.We prove the "if part"; see Fig.By Corollary 14 we can reduce C-Planarity with Pipes for a c-graph whose clustersadjacency graph G A has no trivial blocks to Inclusion-Constrained C-Planarity, where the role played by the neighbor-clusters trees is taken by the pipe-neighbor-clusters trees.In the full paper [1] we explain how to overcome the requirement that G A has no trivial block.

An FPT Algorithm for C-Planarity with Pipes
In the following we prove the main result of the section.We observe two notable corollaries of Theorem 16 (for the second, see Lemma 10).
Corollary 17. Strip Planarity can be tested in O(K s(K−2) ) • O(n 2 ) time, where K is the maximum number of multi-edge components in a strip and s is the number of strips containing at least two multi-edge components.
Corollary 18. C-Planarity with Embedded Pipes can be tested in K c(K−2) • O(n 2 ) time, where K is the maximum number of multi-edge components in a cluster and c is the number of clusters with at least two multi-edge components.

Conclusions and Open Problems
In this paper we studied the problem of constructing c-planar drawings with pipes of flat c-graphs.We presented algorithms to test the existence of such drawings when the number of certain components is small, in different scenarios, namely when the clusters-adjacency graph is a path (Strip Planarity), when it has a fixed embedding (C-Planarity with Embedded Pipes), and when it has no restrictions (C-Planarity with Pipes).Several questions are left open.We find particularly interesting to determine whether there exist combinatorial properties of the nesting of the components allowing us to reduce the number of possible components trees, analogous to the ones we could prove for the pipe-neighbor-clusters trees.We remark that the introduction of the components trees makes the running time of our FPT algorithms independent of the size of each component.

Lemma 2 .Lemma 3 .
Any positive spined instance G, γ of Strip Planarity admits a strip-planar drawing in which the intersection point between the first edge of the spine path of G, γ and the horizontal line separating the first and the second strip is the left-most intersection point between any inter-strip edge and such a line.Let G = (V, E), γ be a spined instance of Strip Planarity on k > 1 strips with a unique source component c.It is possible to construct in linear time an equivalent spined instance G = (V , E ), γ on k − 1 strips with a unique source component c .Proof Sketch.First note that the source component c lies in the first strip.We construct an auxiliary planar graph G c as follows.Initialize G c = c and add a dummy vertex v to it.

Lemma 5 .
Let G = (V, E), γ be a spined instance of Strip Planarity on k > 1 strips with a unique source component c.It is possible to decide in O(k × n) time whether G, γ admits a strip-planar drawing.Given an instance of Strip Planarity, one can create O(n) spined instances by attaching the spine path to each of the O(n) vertices in the first strip.The next theorem follows.Theorem 6.Let G, γ be an instance of Strip Planarity on k strips such that there exists a unique source component c.It is possible to decide in O(n 3 ) time whether G, γ admits a strip-planar drawing.

Figure 1
Figure 1 (a) Drawing ΓA of the clusters-adjacency graph GA, with vertices at the intersections of disks and pipes.The disk cycle for cluster µ and the pipe cycle for edge ν) of GA are orange and gray tiled regions, respectively.(b) Frame gadget H. (c) Partial instance G 1 , G 2 of SEFE constructed from ΓA; graphs G 1 , G 2 , and G ∩ are subdivisions of triconnected planar graphs.

Figure 2
Figure 2 (a) Augmentation of instance G 1 , G 2 focused on cluster µ ∈ T .(b) Replacing an edge e = (u, v) to make G ∩ acyclic.

Figure 3
Figure 3 (a) A c-planar drawing with pipes Γ , with regions R (blue) and R delimited by B(µ) and B(ν), and by e1 and e2 (dashed), where region R does not contain any vertex of G \ (µ ∪ ν).(b) A c-planar drawing with pipes Γ * corresponding to Γ in which inter-cluster edges are inside pipes.

Figure 4
Figure 4 (a) A c-planar drawing Γ focused on cluster µ.Edges incident to µ are solid.Component c is nested into component ρµ.Trees (b) Xµ and (c) Yµ such that Γ is consistent with Xµ and Yµ.(d)A c-planar drawing that is not a c-planar drawing with pipes, even if the inter-cluster edges incident to the same cluster are consecutive (see the annuli around clusters), due to the presence of trivial block (µ, ν).

Theorem 11 .
A flat c-graph C (G, T ) is c-planar if and only if there exist two sets X and Y of components trees and of neighbor-clusters trees, respectively, for all the clusters in T , such that C (G, T ), X , Y is a positive instance of Inclusion-Constrained C-Planarity.

Corollary 14 .
4.d.Let Γ be a c-planar drawing of C (G, T ) satisfying the conditions of the theorem and consider two clusters µ, ν ∈ T with two inter-cluster edges e 1 and e 2 incident to µ and ν.If both the regions delimited by e 1 , e 2 , B(µ), and B(ν) contain vertices in G \ (µ ∪ ν), then all the clusters in one of the regions are only connected to µ and all the clusters in the other region are only connected to ν, due to the conditions of the lemma.Hence, (µ, ν) is a trivial block of G A , a contradiction.We exploit Theorem 13 to construct a neighbor-clusters tree Y • µ of each cluster µ ∈ T such that any c-planar drawing with pipes of C (G, T ) is consistent with Y • µ .Tree Y • µ is rooted at a vertex ω µ .There exists a child ν of ω µ for each cluster ν adjacent to µ, having a leaf y µ (e) for each inter-cluster edge e incident to µ and to ν.We call Y • µ the pipe-neighbor-clusters tree of µ.Theorem 13 and the construction of Y • µ , for each cluster µ ∈ T , imply the following.Let C (G, T ) be a c-graph whose clusters-adjacency graph has no trivial blocks.Then, C (G, T ) admits a c-planar drawing with pipes if and only if C (G, T ) admits a c-planar drawing Γ in which, for each µ ∈ T , drawing Γ is consistent with Y • µ .

Lemma 15 .
Let C (G, T ) be an instance of C-Planarity with Pipes in which G A contains trivial blocks.It is possible to construct in linear time an equivalent instance C * (G * , T * ) of C-Planarity with Pipes in which G * A has no trivial block.Further, K * = K and c * = c, where K (K * ) is the maximum number of multi-edge components in a cluster of C (G, T ) (of C * (G * , T * )) and c (c * ) is the number of clusters of C (G, T ) (of C * (G * , T * )) with at least two multi-edge components.

Theorem 16 . 6 13: 12 Clustered
C-Planarity with Pipes can be tested in O(K c(K−2) ) • O(n 2 ) time, where K is the maximum number of multi-edge components in a cluster and c is the number of clusters with at least two multi-edge components.Proof Sketch.Let C (G, T ) be a c-graph, which can be assumed to have no trivial block by Lemma 15.Construct the set Y containing the unique pipe-neighbor-clusters tree Y • µ of each I S A A C 2 0 1 Planarity with Pipes cluster µ ∈ T .Then, construct all the possible sets X of components trees, over all clusters in T .For each pair X , Y , apply Theorem 12 to test whether C (G, T ), X , Y is a positive instance of Inclusion-Constrained C-Planarity.By Theorem 13 and Corollary 14, c-graph C (G, T ) is a positive instance if and only if at least one of such tests succeeds.
problem SEFE asks whether there exist planar drawings Γ 1 of G 1 and Γ 2 of G 2 such that (i) any vertex v ∈ V is mapped to the same point in Γ 1 and Γ 2 and (ii) any edge e ∈ E 1 ∩ E 2 is mapped to the same curve in Γ 1 and Γ 2 is a forest and whose cut-vertices are incident to at most two non-trivial blocks.It can be tested in O(|V | 2 ) time whether G 1 , G 2 admits a SEFE.