DeepAI
Log In Sign Up

Clustered Planarity = Flat Clustered Planarity

The complexity of deciding whether a clustered graph admits a clustered planar drawing is a long-standing open problem in the graph drawing research area. Several research efforts focus on a restricted version of this problem where the hierarchy of the clusters is "flat", i.e., no cluster different from the root contains other clusters. We prove that this restricted problem, that we call Flat Clustered Planarity, retains the same complexity of the general Clustered Planarity problem, where the clusters are allowed to form arbitrary hierarchies. We strengthen this result by showing that Flat Clustered Planarity is polynomial-time equivalent to Independent Flat Clustered Planarity, where each cluster induces an independent set. We discuss the consequences of these results.

READ FULL TEXT VIEW PDF

page 1

page 2

page 3

page 4

10/04/2019

C-Planarity Testing of Embedded Clustered Graphs with Bounded Dual Carving-Width

For a clustered graph, i.e, a graph whose vertex set is recursively part...
03/14/2018

Subexponential-Time and FPT Algorithms for Embedded Flat Clustered Planarity

The C-Planarity problem asks for a drawing of a clustered graph, i.e., a...
11/02/2018

Drawing Clustered Graphs on Disk Arrangements

Let G=(V, E) be a planar graph and let C be a partition of V. We refer t...
09/04/2019

The spectral properties of Vandermonde matrices with clustered nodes

We study rectangular Vandermonde matrices V with N+1 rows and s irregula...
07/30/2019

Atomic Embeddability, Clustered Planarity, and Thickenability

We study the atomic embeddability testing problem, which is a common gen...
07/10/2015

A Hybrid Graph-drawing Algorithm for Large, Naturally-clustered, Disconnected Graphs

In this paper, we present a hybrid graph-drawing algorithm (GDA) for lay...
12/07/2006

Clustering fetal heart rate tracings by compression

Fetal heart rate (FHR) monitoring, before and during labor, is a very im...

1 Introduction

A clustered graph (c-graph) is a planar graph with a recursive hierarchy defined on its vertices. A clustered planar (c-planar) drawing of a c-graph is a planar drawing of the underlying graph where: (i) each cluster is represented by a simple closed region of the plane containing only the vertices of the corresponding cluster, (ii) cluster borders never intersect, and (iii) any edge and any cluster border intersect at most once (more formal definitions are given in Section 2). The complexity of deciding whether a c-graph admits a c-planar drawing is still an open problem after more than 20 years of intense research [12, 14, 17, 18, 19, 25, 31, 33, 34, 35, 37, 41, 42, 43, 44, 49, 48, 52].

If we had an efficient c-planarity testing and embedding algorithm we could produce straight-line drawings of clustered trees [27] and straight-line drawings [11, 32] and orthogonal drawings [26] of c-planar c-graphs with rectangular regions for the clusters.

In order to shed light on the complexity of Clustered Planarity, this problem has been compared with other problems whose complexity is likewise challenging. This line of investigation was opened by Marcus Schaefer’s polynomial-time reduction of Clustered Planarity to SEFE [52]. Simultaneous Embedding with Fixed Edges (SEFE) takes as input two planar graphs and and asks whether a planar drawing  and a planar drawing  exist such that: (i) each vertex is mapped to the same point in and in and (ii) every edge is mapped to the same Jordan curve in and in .

However, the polynomial-time equivalence of the two problems is open and the reverse reduction of SEFE to Clustered Planarity is known only for the case when the intersection graph of the instance of SEFE is connected [4]. Also in this special case, the complexity of the problem is unknown, with the exception of the case when is a star, which produces a c-graph with only two clusters, a known polynomial case for Clustered Planarity [10, 46].

Since the general Clustered Planarity problem appears to be elusive, several authors focused on a restricted version of it where the hierarchy of the clusters is ‘flat’, i.e., only the root cluster contains other clusters and it does not directly contain vertices of the underlying graph [2, 3, 5, 6, 7, 9, 16, 20, 21, 24, 28, 36, 38, 39, 40, 46, 50]. This restricted problem, that we call Flat Clustered Planarity, is expressive enough to be useful in several applicative domains, as for example in computer networks where routers are grouped into Autonomous Systems [15], or social networks where people are grouped into communities [13, 29], or software diagrams where classes are grouped into packages [51]. Also, several hybrid representations have been proposed for the visual analysis of (not necessarily planar) flat clustered graphs, such as mixed matrix and node-link representations [13, 22, 23, 30, 45], mixed intersection and node-link representations [8], and mixed space-filling and node-link representations [1, 47, 53].

Unfortunately, the complexity of Flat Clustered Planarity is open as the complexity of the general problem. The authors of [14], after recasting Flat Clustered Planarity as an embedding problem on planar multi-graphs, conclude that we are still far away from solving it. The authors of [4] wonder whether Flat Clustered Planarity retains the same complexity of Clustered Planarity. In this paper we answer this question in the affirmative. Obviously, a reduction of Flat Clustered Planarity to Clustered Planarity is trivial, since the instances of Flat Clustered Planarity are simply a subset of those of Clustered Planarity. The reverse reduction is the subject of Section 3, that proves the following theorem.

Theorem 1.1

There exists a quadratic-time transformation that maps an instance of Clustered Planarity to an equivalent instance of Flat Clustered Planarity.

With very similar techniques we are able to prove also a stronger result.

Theorem 1.2

There exists a linear-time transformation that maps an instance of Flat Clustered Planarity to an equivalent instance of Independent Flat Clustered Planarity.

Here, by Independent Flat Clustered Planarity we mean the restriction of Flat Clustered Planarity to instances where each non-root cluster induces an independent set.

The paper is structured as follows. Section 2 contains basic definitions. Section 3 contains the proof of Theorem 1.1 under some simplifying hypotheses (which are removed in Appendix B). Some immediate consequences of Theorem 1.1 are discussed in Section 4. The proof of Theorem 1.2 and some remarks about it are in Sections 5 and 6, respectively. Conclusions and open problems are in Section 7. For space reasons some proofs are moved to the appendix.

2 Preliminaries

Let be a rooted tree. We denote by the root of and by the subtree of rooted at one of its nodes . The depth of a node of is the length (number of edges) of the path from to . The height of a tree is the maximum depth of its nodes.

The nodes of a tree can be partitioned into leaves, that do not have children, and internal nodes. In turn, the internal nodes can be partitioned into two sets: lower nodes, whose children are all leaves, and higher nodes, that have at least one internal-node child. We say that a node is homogeneous if its children are either all leaves or all internal nodes. A tree is homogeneous if all its nodes are homogeneous. We say that a tree is flat if all its leaves have depth . A flat tree is homogeneous. Figure 1 shows a non-homogeneous tree (Fig. 1), a homogeneous tree (Fig. 1), and a flat tree (Fig. 1).

Figure 1: LABEL: A tree that is not homogeneous. LABEL: A homogeneous tree. LABEL: A flat tree.

We also need a special notion of size: the size of a tree , denoted by , is the number of higher nodes of different from the root of . Observe that a homogeneous tree is flat if and only if . For example, the sizes of the trees represented in Figs. 1, 1, and 1 are , , and , respectively (filled gray nodes in Fig. 1). The proof of the following lemma can be found in Appendix A.

Lemma 1

A homogeneous tree of height and size contains at least one node such that is flat.

A graph is a set of vertices and a set of edges, where each edge is an unordered pair of vertices. A drawing of is a mapping of its vertices to distinct points on the plane and of its edges to Jordan curves joining the incident vertices. Drawing is planar if no two edges intersect except at common end-vertices. A graph is planar if it admits a planar drawing.

A clustered graph (or c-graph) is a pair where is a planar graph, called the underlying graph of , and , called the inclusion tree of , is a rooted tree such that the set of leaves of coincides with . A cluster is an internal node of . When it is not ambiguous we also identify a cluster with the respective subset of the vertex set. An inter-cluster edge of a cluster of is an edge of that has one end-vertex inside and the other end-vertex outside . An independent set of vertices is a set of pairwise non-adjacent vertices. A cluster of is independent if its vertices form an independent set. A c-graph is independent if all its clusters, with the exception of the root, are independent clusters. A cluster of is a lower cluster (higher cluster) of if is a lower node (higher node) of .

A c-graph is flat if its inclusion tree is flat. The clusters of a flat c-graph are all lower clusters with the exception of the root cluster. A cluster is called singleton if it contains a single cluster or a single vertex.

A drawing of a c-graph is a mapping of vertices and edges of to points and to Jordan curves joining their incident vertices, respectively, and of each internal node of to a simple closed region containing exactly the vertices of . Drawing is c-planar if: (i) curves representing edges of do not intersect except at common end-points; (ii) the boundaries of the regions representing clusters do not intersect; and (iii) each edge intersects the boundary of a region at most one time. A c-graph is c-planar if it admits a c-planar drawing.

Problem Clustered Planarity is the problem of deciding whether a c-graph is c-planar. Problem Flat Clustered Planarity is the restriction of Clustered Planarity to flat c-graphs. Problem Independent Flat Clustered Planarity is the restriction of Clustered Planarity to independent flat c-graphs.

The proof of the following lemmas can be found in Appendix A.

Lemma 2

An instance of Clustered Planarity with vertices and clusters can be reduced in time to an equivalent instance such that: (1) is homogeneous, (2) has at least two children, and (3) .

3 Proof of Theorem 1.1

We describe a polynomial-time reduction of Clustered Planarity to Flat Clustered Planarity. Let be a clustered graph, let be the number of vertices of , and let be the number of clusters of . Due to Lemma 2 we can achieve in time that is homogeneous and . We reduce  to an equivalent instance where is flat. The reduction consists of a sequence of transformations of into , , …, , where each , , has an homogeneous inclusion tree and each transformation takes time.

Figure 2: LABEL: A c-graph . Inter-cluster edges of are colored red, green, and blue. LABEL: The construction of .

Consider any , with , where is a homogeneous, non-flat tree of height (refer to Fig. 2). By Lemma 1, has at least one node such that is flat. Since , node has a parent . Also, denote by the children of and by the siblings of in . We construct as follows (refer to Fig. 2). Graph is obtained from by introducing, for each inter-cluster edge of , two new vertices and and by replacing with a path . Tree is obtained from by removing node , attaching its children directly to and adding to two new children and , where cluster (cluster , respectively) contains all vertices (, respectively) introduced when replacing each inter-cluster edge of with a path. The proof of the following lemmas can be found in Appendix B.

Lemma 3

If is homogeneous then is homogeneous.

Lemma 4

We have that .

Lemma 5

The c-graph is flat.

Figure 3: LABEL: A c-planar drawing of c-graph . LABEL: The construction of a c-planar drawing .

The proof of the following lemma is given here under two simplifying hypotheses (the proof of the general case can be found in Appendix B):

  1. The underlying graph is connected

  2. Cluster is not the root of 

Observe that Hypothesis -conn implies that also is connected. Observe, also, that Hypothesis -not-root and Property 2 of Lemma 2 imply that there is at least one vertex of  that is not part of (this hypothesis is not satisfied, for example, by the c-graph depicted in Fig. 2).

Lemma 6

is c-planar if and only if is c-planar.

Proof sketch

The first direction of the proof is straightforward. Let be a c-planar drawing of (refer to Fig. 3). We show how to construct a c-planar drawing of (refer to Fig. 3). Consider the region that contains , with . The boundary of is crossed exactly once by each inter-cluster edge of . Identify outside the boundary of two arbitrarily thin regions and that turn around and that intersect exactly once all and only the inter-cluster edges of . Insert into each inter-cluster edge of two vertices and , placing inside and inside . By ignoring you have a c-planar drawing of .

Figure 4: A c-planar drawing of clusters , , and in .

Suppose now to have a c-planar drawing of . We show how to construct a c-planar drawing of under the Hypotheses -conn and -not-root. Consider the regions and inside (refer to Fig. 4). Regions and are joined by the inter-cluster edges introduced when replacing each inter-cluster edge of , where , with a path (red edges of Fig. 4). Such inter-cluster edges of and partition into regions that have to host the remaining children of and the inter-cluster edges among them. In particular, of these regions are bounded by two inter-cluster edges and two portions of the boundaries of and . One of such regions, instead, is also externally bounded by the boundary of .

Now consider the regions corresponding to the children of , with , that were originally children of . These regions (filled white in Fig. 4) may have inter-cluster edges among them and may be connected to , but by construction cannot have inter-cluster edges connecting them to , or connecting them to the original children of , or exiting the border of . In particular, due to Hypothesis -conn, these regions must be directly or indirectly connected to . Finally, consider the regions corresponding to the original children of (filled gray in Fig. 4). These regions may have inter-cluster edges among them, connecting them to , or connecting them to the rest of the graph outside . In particular, due to Hypotheses -conn and -not-root, each (and also ) must be directly or indirectly connected to the border of . It follows that the drawing in of the subgraph composed by the regions of and their inter-cluster edges cannot contain in one of its internal faces any other cluster of . Hence, the sub-region of that is the union of and the region enclosed by is a closed and simple region that only contains the regions , … plus the region and all the inter-cluster edges among them (see Fig. 5). By ignoring and and by removing vertices and and joining their incident edges we obtain a c-planar drawing .

Figure 5: The drawing of cluster in corresponding to the drawing of Fig. 4.

The proof of Theorem 1.1 descends from Lemmas 5 and 6 and from the consideration that each construction of from takes at most time and, hence, the time needed to construct is . Due to the -time preprocessing (Lemma 2), the overall time complexity of the reduction is .

4 Remarks about Theorem 1.1

In this section we discuss some consequences of Theorem 1.1 that descend from the properties of the reduction described in Section 3. Such properties are summarized in the following lemma.

Lemma 7

Let be an -vertex clustered graph with clusters. The flat clustered graph equivalent to built as described in the proof of Theorem 1.1 has the following properties:

  1. Graph is a subdivision of

  2. Each edge of is replaced by a path of length at most

  3. The number of vertices of is

  4. The number of clusters of is

Proof

Regarding Property 1, observe that, for , each is obtained from by replacing edges with paths. Hence is a subdivision of . To prove Property 2 observe that each time an edge is subdivided, a pair of vertices and is inserted and that edges are subdivided when the boundary of a higher cluster is removed. Edges that traverse more boundaries are those that link two vertices whose lowest common ancestor is the root of . These edges traverse higher-cluster boundaries in . Hence, the number of vertices inserted into these edges is . Property 3 can be proved by considering that has edges and each edge, by Property 2, is replaced by a path of length at most . Finally, Property 4 descends from the fact that at each step has exactly one cluster more than , since new clusters and are inserted but cluster is removed.

An immediate consequence of Property 1 of Lemma 7 is that the number of faces of is equal to the number of faces of . Also, if is connected, biconnected, or a subdivision of a triconnected graph, is also connected, biconnected, or a subdivision of a triconnected graph, respectively. If is a cycle or a tree, is also a cycle or a tree, respectively. Hence, the complexity of Clustered Planarity restricted to these kinds of graphs can be related to the complexity of Flat Clustered Planarity restricted to the same kinds of graphs. Further, since a subdivision preserves the embedding of the original graph, the problem of deciding whether a c-graph admits a c-planar drawing where has a fixed embedding is polynomially equivalent to deciding whether a flat c-graph admits a c-planar drawing where has a fixed embedding.

By the above observations some results on flat clustered graphs can be immediately exported to general c-graphs. Consider for example the following.

Theorem 4.1

([16, Theorem 1]). There exists an -time algorithm to test the c-planarity of an n-vertex embedded flat c-graph with at most two vertices per cluster on each face.

We generalize Theorem 4.1 to non-flat c-graphs.

Theorem 4.2

Let be an n-vertex c-graph where has a fixed embedding. There exists an -time algorithm to test the c-planarity of if each lower cluster has at most two vertices on the same face of and each higher cluster has at most two inter-cluster edges on the same face of .

Proof sketch

The proof is based on showing that, starting from a c-graph that satisfies the hypotheses of the statement, the equivalent flat c-graph built as described in the proof of Theorem 1.1 satisfies the hypotheses of Theorem 4.1. Hence, we first transform into in time and then apply Theorem 4.1 to , which gives an answer to the c-planarity test in time, which is, by Property 3 of Lemma 7, time.

In [24] it has been proven that Flat Clustered Planarity admits a subexponential-time algorithm when the underlying graph has a fixed embedding and its maximum face size  belongs to .

Theorem 4.3

([24, Theorem 3]). Flat Clustered Planarity can be solved in time for n-vertex embedded flat c-graphs with maximum face size .

The authors of [24] ask whether their results can be generalized to non-flat c-graphs. We give an affirmative answer with the following theorem.

Theorem 4.4

Clustered Planarity can be solved in time for n-vertex embedded c-graphs with maximum face size and height  of the inclusion tree.

Proof sketch

The proof is based on applying Theorem 4.3 to the equivalent flat c-graph built as described in the proof of Theorem 1.1.

Observe that Theorem 4.4 gives a subexponential-time upper bound for Clustered Planarity whenever . Also observe that Theorems 4.2 and 4.4 are actual generalizations of the corresponding Theorems 4.1 and 4.3, respectively, as they yield the same bounds when applied to flat clustered graphs.

5 Proof of Theorem 1.2

In this section we reduce Flat Clustered Planarity to Independent Flat Clustered Planarity by applying a transformation very similar to the one described in Section 3 to each non-independent cluster.

Let be a flat c-graph. Let be the number of lower clusters of that are not independent. The reduction consists of a sequence of transformations of into where each , , is a flat c-graph with non-independent lower clusters.

Figure 6: LABEL: A flat c-graph with a non-independent cluster . LABEL: The construction of where is replaced by independent clusters , …, , , and .

Consider a flat c-graph , with , such that has non-independent clusters and let be a non-independent cluster of . We show how to construct an flat c-graph equivalent to and such that has non-independent clusters (refer to Fig. 6). Denote by , with , those children of such that . Suppose that has children , which are vertices of .

The underlying graph of is obtained from by introducing, for each inter-cluster edge of , two new vertices and and replacing with a path . The inclusion tree of is obtained from by removing cluster and introducing, for each , a lower cluster child of containing only . We also introduce two lower clusters and as children of that contain all the vertices and , respectively, introduced when replacing each inter-cluster edge of with a path. It is easy to see that is a flat clustered graph and that it has one non-independent cluster less than .

We prove the following lemma assuming that Hypothesis -conn holds. The complete proof is in Appendix D.

Figure 7: LABEL: A c-planar drawing of the flat c-graph of Fig. 6. LABEL: The corresponding c-planar drawing the flat c-graph of Fig. 6 where the non-independent cluster is replaced by independent clusters , …, , , and .
Lemma 8

is c-planar if and only if is c-planar.

Proof sketch

The proof is very similar to the proof of Lemma 6. First, we show that, given a c-planar drawing of the flat c-graph it is easy to construct a c-planar drawing of (see, as an example, Fig. 7). Second we show that, given a c-planar drawing of the flat c-graph it is possible to construct a c-planar drawing of . This second part of the proof is complicated by the fact that, since in this case Hypothesis -not-root does not apply, we may have that in the region is embraced by inter-cluster edges and region boundaries of , , …, and (see Fig. 10 in Appendix D). Hence, before identifying the region the drawing needs to be modified so that the external face touches . This can be easily done by rerouting edges (see the example in Fig. 10).

The proof of Theorem 1.2 is concluded by showing that each can be obtained from in time proportional to the number of vertices and inter-cluster edges of , which gives an overall time for the reduction.

6 Remarks about Theorem 1.2

Starting from a flat c-graph, the reduction described in Section 5 allows us to find an equivalent independent flat c-graph with the properties stated in the following lemma (the proof is in Appendix E).

Lemma 9

Let be an -vertex flat clustered graph with clusters. The independent flat clustered graph equivalent to built as described in the proof of Theorem 1.2 has the following properties:

  1. Graph is a subdivision of

  2. Each inter-cluster edge of is replaced by a path of length at most .

  3. The number of vertices of is

  4. The number of clusters of (including the root) is

Also, a further property can be pursued.

Observation 1

.  At the same asymptotic cost of the reduction described in the proof of Theorem 1.2 it can be achieved that non-root clusters are of two types: (Type 1) clusters containing a single vertex of arbitrary degree or (Type 2) clusters containing multiple vertices of degree two.

All observations of Section 4 regarding the consequences of Property 1 of Lemma 7 apply here to of Property 1 of Lemma 9. Further, the two reductions can be concatenated yielding the following.

Lemma 10

Let be an -vertex clustered graph with clusters. The independent flat clustered graph equivalent to built by concatenating the reduction of Theorem 1.1 and the reduction of Theorem 1.2, as modified by Observation 1, has the following properties:

  1. Graph is a subdivision of

  2. Each inter-cluster edge of is replaced by a path of length at most

  3. The number of vertices of is

  4. The number of clusters of is

  5. Non-root clusters are of two types: (Type 1) clusters containing a single vertex of arbitrary degree or (Type 2) clusters containing multiple vertices of degree two

Lemma 10 describes the most constrained version of Clustered Planarity that is known to be polynomially equivalent to the general problem. Observe that if all non-root clusters of a c-graph are of Type 1 then Independent Flat Clustered Planarity is linear, since is c-planar if and only if is planar. Conversely, if all clusters are of Type 2 then the underlying graph is a collection of cycles, and the problem has unknown complexity [20, 21].

7 Conclusions and Open Problems

We showed that Clustered Planarity can be reduced to Flat Clustered Planarity and that this problem, in turn, can be reduced to Independent Flat Clustered Planarity. The consequences of these results are twofold: on one side the investigations about the complexity of Clustered Planarity could legitimately be restricted to (independent) flat clustered graphs, neglecting more complex hierarchies of the inclusion tree; on the other side some polynomial-time results on flat clustered graphs could be easily exported to general c-graphs (we gave some examples in Section 4).

We remark that while Theorems 1.1 and 1.2 are formulated in terms of decision problems, their proofs offer a solution of the corresponding search problems, meaning that they actually describe a polynomial-time algorithm to compute a c-planar drawing of a c-graph, provided to have a c-planar drawing of the corresponding flat c-graph or a c-planar drawing of the corresponding independent flat c-graph.

Several interesting questions are left open:

  • Can the reduction presented in this paper be used to generalize some other polynomial-time testing algorithm for Flat Clustered Planarity to plain Clustered Planarity?

  • What is the complexity of Independent Flat Clustered Planarity when the underlying graph is a cycle? We know that this problem is polynomial only for constrained drawings of the inter-cluster edges [20, 21].

  • What is the complexity of Independent Flat Clustered Planarity when the number of Type 2 clusters is bounded?

References

  • [1] Abello, J., Kobourov, S.G., Yusufov, R.: Visualizing large graphs with compound-fisheye views and treemaps. In: Pach, J. (ed.) GD 2004. LNCS, vol. 3383, pp. 431–441. Springer (2004), doi:10.1007/978-3-540-31843-9_44
  • [2] Akitaya, H.A., Fulek, R., Tóth, C.D.: Recognizing weak embeddings of graphs. In: Czumaj, A. (ed.) SODA 2018. pp. 274–292 (2018), doi:10.1137/1.9781611975031.20
  • [3] Angelini, P., Da Lozzo, G.: Clustered planarity with pipes. In: Hong, S.H., Eades, P., Meidiana, A. (eds.) ISAAC 2016. LIPIcs, vol. 64, pp. 13:1–13:13 (2016), doi:10.4230/LIPIcs.ISAAC.2016.13
  • [4] Angelini, P., Da Lozzo, G.: SEFE = C-planarity? The Computer Journal 59(12), 1831–1838 (2016), doi:10.1093/comjnl/bxw035
  • [5] Angelini, P., Da Lozzo, G., Di Battista, G., Frati, F.: Strip planarity testing. In: Wismath, S., Wolff, A. (eds.) GD 2013. LNCS, vol. 8242, pp. 37–48 (2013)
  • [6] Angelini, P., Da Lozzo, G., Di Battista, G., Frati, F.: Strip planarity testing for embedded planar graphs. Algorithmica 77(4), 1022–1059 (2017), doi:10.1007/s00453-016-0128-9
  • [7] Angelini, P., Da Lozzo, G., Di Battista, G., Frati, F., Patrignani, M., Roselli, V.: Relaxing the constraints of clustered planarity. Comput. Geom. Theory Appl. 48(2), 42–75 (2015), doi:10.1016/j.comgeo.2014.08.001
  • [8] Angelini, P., Da Lozzo, G., Di Battista, G., Frati, F., Patrignani, M., Rutter, I.: Intersection-link representations of graphs. J. Graph Algorithms Appl. 21(4), 731–755 (2017), doi:10.7155/jgaa.00437
  • [9] Angelini, P., Da Lozzo, G., Di Battista, G., Frati, F., Roselli, V.: The importance of being proper (in clustered-level planarity and T-level planarity). Theoretical Computer Science 571, 1–9 (2015), doi:10.1016/j.tcs.2014.12.019
  • [10] Angelini, P., Di Battista, G., Frati, F., Patrignani, M., Rutter, I.: Testing the simultaneous embeddability of two graphs whose intersection is a biconnected or a connected graph. J. Discrete Algorithms 14, 150–172 (2012), doi:10.1016/j.jda.2011.12.015
  • [11] Angelini, P., Frati, F., Kaufmann, M.: Straight-line rectangular drawings of clustered graphs. Discrete Comput. Geom. 45(1), 88–140 (2011), doi:10.1007/s00454-010-9302-z
  • [12] Angelini, P., Frati, F., Patrignani, M.: Splitting clusters to get c-planarity. In: Eppstein, D., Gansner, E.R. (eds.) GD 2009. LNCS, vol. 5849, pp. 57–68 (2010), doi:10.1007/978-3-642-11805-0_8
  • [13] Batagelj, V., Brandenburg, F.J., Didimo, W., Liotta, G., Palladino, P., Patrignani, M.: Visual analysis of large graphs using (X,Y)-clustering and hybrid visualizations. IEEE Trans. Visual. Comput. Graphics 17(11), 1587–1598 (2011), doi:10.1109/TVCG.2010.265
  • [14] Bläsius, T., Rutter, I.: A new perspective on clustered planarity as a combinatorial embedding problem. Theor. Comput. Sci. 609, 306–315 (2016), 10.1016/j.tcs.2015.10.011
  • [15] Candela, M., Di Bartolomeo, M., Di Battista, G., Squarcella, C.: Radian: Visual exploration of traceroutes. IEEE Trans. Visual. Comput. Graphics 24, 2194–2208 (2018), doi:10.1109/TVCG.2017.2716937
  • [16] Chimani, M., Di Battista, G., Frati, F., Klein, K.: Advances on testing c-planarity of embedded flat clustered graphs. In: Duncan, C., Symvonis, A. (eds.) GD 2014. Lecture Notes in Computer Science, vol. 8871, pp. 416–427 (2014)
  • [17] Cornelsen, S., Wagner, D.: Completely connected clustered graphs. J. Discrete Algorithms 4(2), 313–323 (2006), doi:10.1016/j.jda.2005.06.002
  • [18] Cortese, P.F., Di Battista, G.: Clustered planarity (invited lecture). In: SoCG 05. pp. 30–32. ACM (2005)
  • [19] Cortese, P.F., Di Battista, G., Frati, F., Patrignani, M., Pizzonia, M.: C-planarity of c-connected clustered graphs. J. Graph Algorithms Appl. 12(2), 225–262 (2008)
  • [20] Cortese, P.F., Di Battista, G., Patrignani, M., Pizzonia, M.: Clustering cycles into cycles of clusters. J. Graph Algorithms Appl. 9(3), 391–413 (2005)
  • [21] Cortese, P.F., Di Battista, G., Patrignani, M., Pizzonia, M.: On embedding a cycle in a plane graph. Discrete Mathematics 309(7), 1856–1869 (2009), doi:10.1016/j.disc.2007.12.090
  • [22] Da Lozzo, G., Di Battista, G., Frati, F., Patrignani, M.: Computing NodeTrix representations of clustered graphs. In: Nöllenburg, M., Hu, Y. (eds.) GD 2016. LNCS, vol. 9801, pp. 107–120 (2016), doi:10.1007/978-3-319-50106-2_9
  • [23] Da Lozzo, G., Di Battista, G., Frati, F., Patrignani, M.: Computing NodeTrix representations of clustered graphs. J. Graph Algorithms Appl. 22(2), 139–176 (2018)
  • [24] Da Lozzo, G., Eppstein, D., Goodrich, M.T., Gupta, S.: Subexponential-time and FPT algorithms for embedded flat clustered planarity. In: WG 2018 (2018), to appear
  • [25] Dahlhaus, E.: A linear time algorithm to recognize clustered graphs and its parallelization. In: Lucchesi, C.L., Moura, A.V. (eds.) LATIN 1998. LNCS, vol. 1380, pp. 239–248. Springer (1998)
  • [26] Di Battista, G., Didimo, W., Marcandalli, A.: Planarization of clustered graphs. In: Mutzel, P., Juenger, M., Leipert, S. (eds.) GD 2001. LNCS, vol. 2265, pp. 60–74 (2002)
  • [27] Di Battista, G., Drovandi, G., Frati, F.: How to draw a clustered tree. J. Discrete Algorithms 7(4), 479–499 (Dec 2009), doi:10.1016/j.jda.2008.09.015
  • [28] Di Battista, G., Frati, F.: Efficient c-planarity testing for embedded flat clustered graphs with small faces. J. Graph Algorithms Appl. 13(3), 349–378 (2009)
  • [29] Di Giacomo, E., Didimo, W., Liotta, G., Palladino, P.: Visual analysis of one-to-many matched graphs. J. Graph Algorithms Appl. 14(1), 97–119 (2010)
  • [30] Di Giacomo, E., Liotta, G., Patrignani, M., Tappini, A.: NodeTrix planarity testing with small clusters. In: Frati, F., Ma, K. (eds.) GD 2017. pp. 479–491. LNCS (2017), doi:10.1007/978-3-319-73915-1_37
  • [31] Eades, P., Feng, Q.: Multilevel visualization of clustered graphs. In: North, S.C. (ed.) GD 1996. LNCS, vol. 1190, pp. 101–112. Springer (1996), doi:10.1007/3-540-62495-3_41
  • [32] Eades, P., Feng, Q., Lin, X., Nagamochi, H.: Straight-line drawing algorithms for hierarchical graphs and clustered graphs. Algorithmica 44(1), 1–32 (2006), doi:10.1007/s00453-004-1144-8
  • [33] Eades, P., Feng, Q., Nagamochi, H.: Drawing clustered graphs on an orthogonal grid. J. Graph Algorithms Appl. 3(4), 3–29 (1999), doi:10.7155/jgaa.00016
  • [34] Eades, P., Huang, M.L.: Navigating clustered graphs using force-directed methods. J. Graph Algorithms Appl. 4(3), 157–181 (2000), doi:10.7155/jgaa.00029
  • [35] Feng, Q., Cohen, R.F., Eades, P.: Planarity for clustered graphs. In: Spirakis, P.G. (ed.) ESA 1995. LNCS, vol. 979, pp. 213–226. Springer (1995), doi:10.1007/3-540-60313-1_145
  • [36] Frati, F.: Multilayer drawings of clustered graphs. J. Graph Algorithms Appl. 18(5), 633–675 (2014), doi:10.7155/jgaa.00340
  • [37] Frati, F.: Clustered graph drawing. In: Kao, M.Y. (ed.) Encyclopedia of Algorithms, 2nd Edition, pp. 1–6. Springer Science+Business Media New York (2015), doi:10.1007/978-3-642-27848-8_655-1
  • [38] Fulek, R.: C-planarity of embedded cyclic c-graphs. Comput. Geom. 66, 1–13 (2017), doi:10.1016/j.comgeo.2017.06.016
  • [39] Fulek, R.: Embedding graphs into embedded graphs. In: Okamoto, Y., Tokuyama, T. (eds.) ISAAC 2017. LIPIcs, vol. 92, pp. 34:1–34:12 (2017), doi:10.4230/LIPIcs.ISAAC.2017.34
  • [40] Fulek, R., Kynčl, J.: Hanani–Tutte for approximating maps of graphs. In: Speckmann, B., Tóth, C.D. (eds.) SoCG 18. pp. 39:1–39:15. LIPIcs (2018), doi:10.4230/LIPIcs.SoCG.2018.39
  • [41] Fulek, R., Kynčl, J., Malinović, I., Pálvölgyi, D.: Clustered planarity testing revisited. Electr. J. Comb. 22(4) (2015), http://www.combinatorics.org/ojs/index.php/eljc/article/view/v22i4p24, paper P4.24
  • [42] Goodrich, M.T., Lueker, G.S., Sun, J.Z.: C-planarity of extrovert clustered graphs. In: Healy, P., Nikolov, N.S. (eds.) GD 2005. LNCS, vol. 3843, pp. 211–222. Springer (2006), doi:10.1007/11618058_20
  • [43] Gutwenger, C., Jünger, M., Leipert, S., Mutzel, P., Percan, M., Weiskircher, R.: Advances in c-planarity testing of clustered graphs. In: Kobourov, S.G., Goodrich, M.T. (eds.) GD 2002. LNCS, vol. 2528, pp. 220–235. Springer (2002), doi:10.1007/3-540-36151-0_21
  • [44] Gutwenger, C., Mutzel, P., Schaefer, M.: Practical experience with Hanani-Tutte for testing c-planarity. In: McGeoch, C.C., Meyer, U. (eds.) ALENEX 2014. pp. 86–97. SIAM (2014), doi:10.1137/1.9781611973198.9
  • [45] Henry, N., Fekete, J., McGuffin, M.J.: NodeTrix: a hybrid visualization of social networks. IEEE Trans. Vis. Comput. Graph. 13(6), 1302–1309 (2007)
  • [46] Hong, S.H., Nagamochi, H.: Two-page book embedding and clustered graph planarity. Tech. Report 2009-004, Department of Applied Mathematics & Physics, University of Kyoto, Japan (2009)
  • [47] Itoh, T., Muelder, C., Ma, K., Sese, J.: A hybrid space-filling and force-directed layout method for visualizing multiple-category graphs. In: Eades, P., Ertl, T., Shen, H. (eds.) IEEE PacificVis 2009. pp. 121–128 (2009)
  • [48] Jelínek, V., Jelínková, E., Kratochvíl, J., Lidický, B.: Clustered planarity: Embedded clustered graphs with two-component clusters. In: Tollis, I.G., Patrignani, M. (eds.) GD 2008. LNCS, vol. 5417, pp. 121–132. Springer (2008), doi:10.1007/978-3-642-00219-9_13
  • [49] Jelínek, V., Suchý, O., Tesar, M., Vyskocil, T.: Clustered planarity: Clusters with few outgoing edges. In: Tollis, I.G., Patrignani, M. (eds.) GD 2008. LNCS, vol. 5417, pp. 102–113 (2009)
  • [50] Jelínková, E., Kára, J., Kratochvíl, J., Pergel, M., Suchý, O., Vyskocil, T.: Clustered planarity: Small clusters in cycles and eulerian graphs. J. Graph Algorithms Appl. 13(3), 379–422 (2009), doi:10.7155/jgaa.00192
  • [51] Sander, G.: Visualisierungstechniken für den compilerbau. PhD Thesis, Universität Saarbrücken, Germany (1996)
  • [52] Schaefer, M.: Toward a theory of planarity: Hanani-Tutte and planarity variants. J. Graph Algorithms Appl. 17(4), 367–440 (2013), doi:10.7155/jgaa.00298
  • [53] Zhao, S., McGuffin, M.J., Chignell, M.H.: Elastic hierarchies: Combining treemaps and node-link diagrams. In: Stasko, J.T., Ward, M.O. (eds.) IEEE InfoVis 2005. p. 8 (2005), doi:10.1109/INFOVIS.2005.12

Appendix Appendix A – Proof of Lemmas 1 and 2 of Section 2.

Lemma 1. A homogeneous tree of height and size contains at least one node such that is flat.

Proof

Let be a leaf of whose depth is . Since , is not flat and . Consider the parent of the parent of . The subtree of has . Since is homogeneous and has a non-leaf child , all the children of are internal nodes. Hence, is flat.

Lemma 2. An instance of Clustered Planarity with vertices and clusters can be reduced in time to an equivalent instance such that:

  1. is homogeneous,

  2. has at least two children, and

  3. .

Proof

First we prove Property (1). Suppose that the inclusion tree of a c-graph is not homogeneous. We transform into an equivalent c-graph such that is homogeneous. Consider a node that has both internal node children and leaf children , , …, . For each such and for each child of , we insert between and a lower node that is child of and parent of . The obtained c-graph is homogeneous and may be constructed in time . Also, given a c-planar drawing of one can immediately obtain a c-planar drawing of simply by ignoring the boundaries of the regions , where is a cluster introduced by the above described transformation. Conversely, given a c-planar drawing of one can obtain a c-planar drawing of by inserting a small boundary around the vertices that changed their parent in the above transformation. Hence, is c-planar if and only if is c-planar.

Finally, we prove Properties (2) and (3). Suppose to have an instance with or such that has a single child. We traverse and recursively replace each cluster that has a single child with its child. The obtained instance is equivalent to original one since from a c-planar drawing of one can obtain a c-planar drawing of simply by ignoring the boundaries of the removed clusters and from a c-planar drawing of one can obtain a c-planar drawing of by suitably adding the boundary of each removed parent cluster around the boundary of its child cluster (or around the child vertex leaf). Since all clusters of have at least two children Property (2) is satisfied. We claim that . In fact, since all the internal nodes of have degree at least two, we have that the number of leaves of is at least . Hence, . This proves Property (3).

Appendix Appendix B – Proofs of Lemmas 36 of Section 3.

Let be a flat c-planar c-graph and let be a node of such that is flat. Denote by the children of and by , , …, the siblings of in . Let be the flat c-graph constructed as described in Section 3. We prove the following lemmas.


Lemma 3. If is homogeneous then is homogeneous.

Proof

Suppose is homogeneous. The only part of that is changed in  is the subtree . In particular, has all cluster children, while the newly introduced clusters and have all vertex children. Hence is homogeneous.

Lemma 4. We have that .

Proof

Consider a node of for which . Since the transformation of into only reduces the height of some subtree of , such a node was also the root of a subtree of height greater than in . Conversely, consider a node of for which . If then is not present in , otherwise it is still the root of a subtree of height greater than one in . Hence, the number of nodes that are root of subtrees of height greater than one of is reduced by one with respect to the same number in .


Lemma 5. The c-graph is flat.

Proof

By Property 1 of Lemma 2 we can assume that is homogeneous. Lemma 3 ensures that all , with are also homogeneous. By Lemma 4 we have that the sizes of the trees are decreasing and, in particular, that the size of is . Therefore, is a homogeneous tree that has size and, hence, is a flat tree.

Now, we provide the proof of Lemma 6 in the general case, i.e., without leveraging on Hypotheses -conn and -not-root.


Lemma 6. is c-planar if and only if is c-planar.

Proof

The first direction of the proof is straightforward. Let be a c-planar drawing of . We show how to construct a c-planar drawing of . Consider the region that contains , with (refer to Fig. 3). The boundary of is crossed exactly once by each inter-cluster edge of . Identify outside the boundary of two arbitrarily thin regions and that follow the boundary of and that intersect all and only the inter-cluster edges of exactly once (see Fig. 3). Insert into each inter-cluster edge of two vertices and , placing inside and inside . By ignoring you have a c-planar drawing of .

Figure 8: LABEL: A possible drawing of cluster in in the case of non-connected . The inter-cluster edges between and are drawn red. LABEL: The same drawing after the removal of the floating regions.

Conversely, suppose to have a c-planar drawing of . We show how to construct a c-planar drawing of . Consider the regions and inside (refer to Fig. 8). Regions and are joined by the inter-cluster edges (drawn red in Fig. 8) introduced when replacing each inter-cluster edge of , where , with a path. Such inter-cluster edges of and partition into regions that have to host the remaining children of and the inter-cluster edges among them. In particular, of these regions are simple and bounded by two inter-cluster edges and two portions of the boundaries of and . One of such regions, instead, is also externally bounded by the boundary of .

Now, consider the regions corresponding to the children of , with , that were originally children of . These regions (filled white in Fig. 8) may be without any inter-cluster edge (as, for example, in Fig. 8); may have inter-cluster edges among themselves (as, for example, , , , , , , and in Fig. 8); and may be connected to (as, for example, , , , , , , , , and in Fig. 8). However, by construction these regions cannot have inter-cluster edges connecting them to , or connecting them to the regions of the original children of , or exiting the border of . Hence, the regions corresponding to , …,

can be classified into two sets, denoted

and , of ‘anchored regions’ and ‘floating regions’ of , respectively, where an anchored region of is a region whose cluster contains at least one vertex of that is connected (via a path) to a vertex in and a floating region of is a region whose cluster contains all vertices not connected to vertices in . For example, in Fig. 8, contains , , and , while contains all the other white-filled regions.

Analogously, consider the regions , with , corresponding to the original children of (filled gray in Fig. 8). These regions may be without any inter-cluster edge (as, for example, , , and in Fig. 8); may have inter-cluster edges among themselves (as, for example, , , , , , , and in Fig. 8); may have inter-cluster edges connecting them to (as, for example, , , , , , , and in Fig. 8); or may have inter-cluster edges connecting them the rest of the graph outside (as, for example, in Fig. 8). However, by construction these regions cannot have inter-cluster edges connecting them to , or connecting them to the the regions in or . Hence, we can classify the regions corresponding to , …, into two sets, denoted and , of ‘anchored regions’ and ‘floating regions’ of , where an anchored region of is a region whose cluster contains at least one vertex of that is connected to a vertex in or to a vertex outside and a floating region of is a region whose cluster contains all vertices not connected to vertices in nor outside . For example, in Fig. 8, set contains , , , , and , while contains all the other gray-filled regions.

Our strategy will be that of removing altogether from the drawings of the floating regions (and all their content), possibly modifying the drawing of the remaining graph, and then suitably reinserting the drawing of the floating regions.

Suppose now to have temporarily removed from the drawings of the floating regions in and (see, for example, Fig. 8).

We define an auxiliary multigraph that has one vertex representing and one vertex for each child of such that . For each inter-cluster edge between two clusters and corresponding to the vertices and of , respectively, we add an edge to . Observe that , by the definition of the anchored regions in , is connected.

Drawing induces a drawing of the multigraph , where each vertex of is represented by the region of the cluster corresponding to and each edge of is represented as the corresponding inter-cluster edge of and restricted to the portion that is drawn outside the boundaries of and .

There are two cases: either does not contain in one of its internal faces (Case 1, depicted in Fig. 8) or it contains (Case 2, depicted in Fig. 9).

In Case 1 no change has to be done to . In Case 2 we modify and, consequently, so to fall again into Case 1. Namely, we identify a minimal set of edges of that, if removed, would bring on the external face of (for example in Fig 9 this set contains only edge ). Starting from edge , that is incident to the external face of , we redraw each , with , as follows. Suppose that the curve for in starts from a point on the boundary of and ends with a point on the boundary of . We arbitrarily choose two distinct points and , encountered in this order when traversing from to . We remove the portion of between and and we redraw it by returning back from towards on the external face of and then moving along the external face of until we reach (see, for example, Fig. 9). Observe that this corresponds to moving the external face of to a face that was previously an internal face of enclosed by . We carry on doing the same operation for each , with , until the external face of is incident on the boundary of . At this point we are in Case 1.

Observe that since does not contain in one of its internal faces , then it cannot contain any region in either, as, by definition, these regions are either connected to or to the boundary of . Hence, the internal faces of only contain vertices and edges that in belong to .

Now we reinsert the drawings of the floating regions. We identify an arbitrarily small empty disk inside and move inside the (suitably scaled down) drawings of the floating regions in . Analogously, we identify an arbitrarily small empty disk inside and move inside the (suitably scaled down) drawings of the floating regions in . Consider the region that is the region covered by . Such a region is connected, is simple, contains only vertices and nodes of , and its boundary is a simple curve (see Fig. 9). Therefore, by neglecting the boundaries of and and by removing their internal vertices and joining their incident edges we obtain a c-planar drawing of .

Figure 9: LABEL: A possible drawing of cluster in in the case of non-connected . LABEL: The corresponding drawing of in .

Appendix Appendix C – Proof of Theorems 4.2 and 4.4 of Section 4.


Theorem 4.2. Let be an n-vertex c-graph where has a fixed embedding. There exists an -time algorithm to test the c-planarity of if each lower cluster has at most two vertices on the same face of and each higher cluster has at most two inter-cluster edges on the same face of .

Proof

The proof is based on showing that, starting from a c-graph that satisfies the hypotheses of the statement, the equivalent flat c-graph built as described in the proof of Theorem 1.1 satisfies the hypotheses of Theorem 4.1. By Property 1 of Lemma 2 we can assume that is homogeneous. Observe that the transformation of into an homogeneous tree described in the proof of Lemma 2 only introduces lower clusters that contain a single vertex and, hence, preserves the property that each higher cluster has at most two inter-cluster edges incident to the same face.

The transformation of into described in the proof of Theorem 1.1 removes one higher cluster and introduces two lower clusters and . Each inter-cluster edge of is subdivided into three edges , , and , where and . Since at most two inter-cluster edges of belong to the same face of we have that the lower clusters and have at most two vertices on the same face of . Any other higher or lower cluster of is not modified by the transformation. It follows that , which, with the exception of the root cluster, has only lower clusters, satisfies the conditions of Theorem 4.1.

Hence, we first transform into in time (Theorem 1.1) and then apply Theorem 4.1 to , which gives an answer to the c-planarity test in time, which is, by Property 3 of Lemma 7, time.


Theorem 4.4. Clustered Planarity can be solved in time for n-vertex embedded c-graphs with maximum face size and height  of the inclusion tree.

Proof

The proof is based on applying Theorem 4.3 to the flat c-graph built as described in the proof of Theorem 1.1 and equivalent to . By Property 2 of Lemma 7 each edge of is replaced by a path of length at most . Hence, each face of has a maximum size . Also, by Property 3 of Lemma 7 we have that the number of vertices of is . Theorem 4.3 guarantees that we can test for c-planarity in time, which gives the statement.

Appendix Appendix D – Proof of Lemma 8 of Section 5.

In this section, we provide the proof of Lemma 8 in the general case, i.e., without leveraging on Hypothesis -conn. Let be a flat c-planar c-graph and let be a non-independent cluster of containing vertices , , …, of . Also, denote by , with , those children of such that . Let be the flat c-graph constructed as described in Section 5. We have the following.


Lemma 8. is c-planar if and only if is c-planar.

Proof

The proof is similar to the proof of Lemma 6. Given a c-planar drawing of the flat c-graph , we show how to construct a c-planar drawing of (refer to Fig. 7). The construction is based on identifying two arbitrary thin regions and outside the border of such that and intersect exactly once all and only the inter-cluster edges of . By ignoring , by inserting for each inter-cluster edge of vertices and in and , respectively, and by adding a boundary to each vertex , …, , we obtain .