IntersectionLink Representations of Graphs
Abstract
We consider drawings of graphs that contain dense subgraphs. We introduce intersectionlink representations for such graphs, in which each vertex u is represented by a geometric object R(u) and in which each edge (u, v) is represented by the intersection between R(u) and R(v) if it belongs to a dense subgraph or by a curve connecting the boundaries of R(u) and R(v) otherwise. We study a notion of planarity, called Clique Planarity, for intersectionlink representations of graphs in which the dense subgraphs are cliques.
Keywords
Geometric Object Hamiltonian Path Outer Face Dense Subgraph Proof Sketch1 Introduction
In several applications there is the need to represent graphs that are globally sparse but contain dense subgraphs. As an example, a social network is often composed of communities, whose members are closely interlinked, connected by a network of relationships that are much less dense. The visualization of such networks poses challenges that are attracting the study of several researchers (see, e.g., [6, 11]). One frequent approach is to rely on clustering techniques to collapse dense subgraphs and then represent only the links between clusters. However, this has the drawback of hiding part of the graph structure. Another approach that has been explored is the use of hybrid drawing standards, where different conventions are used to represent the dense and the sparse portions of the graph: In the drawing standard introduced in [4, 12] each dense part is represented by an adjacency matrix while two adjacent dense parts are connected by a curve.
We study the Clique Planarity problem that asks to test whether a pair (G, S) has an intersectionlink representation such that linkedges do not cross each other and do not traverse any rectangle. The main challenge of the problem lies in the interplay between the geometric constraints imposed by the rectangle arrangements and the topological constraints imposed by the link edges.
Several problems are related to Clique Planarity; here we mention two notable ones. The problem of recognizing intersection graphs of translates of the same rectangle is \(\mathcal {NP}\)complete [7]. Note that this does not imply \(\mathcal {NP}\)hardness for our problem, since cliques always have such a representation. Map graphs allow to represent graphs containing large cliques in a readable way; they are contact graphs of internallydisjoint connected regions of the plane, where the contact can be even a single point. The recognition of map graphs has been studied in [8, 15]. One can argue that there are graphs that admit a cliqueplanar representation, while not admitting any representation as a map graph, and vice versa.
We now describe our contribution. Our study encountered several interesting and at a first glance unrelated theoretical problems. In more detail, our results are as follows.

In Sect. 3 we show that Clique Planarity is \(\mathcal {NP}\)complete even if S contains just one clique with more than one vertex. This result is established by observing a relationship between Clique Planarity and a natural constrained version of the Clustered Planarity problem, in which we ask whether a path (rather than a tree as in the usual Clustered Planarity problem) can be added to each cluster to make it connected while preserving clustered planarity; we prove this problem to be \(\mathcal {NP}\)complete, a result which might be interesting in its own right.

In Sect. 4, we show how to decide Clique Planarity in linear time in the case in which each clique has a prescribed geometric representation, via a reduction to the problem of testing planarity for a graph with a given partial representation.

In Sect. 5, we concentrate on instances of Clique Planarity composed of two cliques. While we are unable to settle the complexity of this case, we show that the problem becomes equivalent to an interesting variant of the 2Page Book Embedding problem, in which the graph is bipartite and the vertex ordering in the book embedding has to respect the vertex partition of the graph. This problem is in our opinion worthy of future research efforts. For now, we use this equivalence to establish a polynomialtime algorithm for the case in which the linkedges are assigned to the pages of the book embedding.

In Sect. 6, we study a Sugiyamastyle problem where the cliques are arranged on levels according to a hierarchy. In this practical setting we show that Clique Planarity is solvable in polynomial time. This is achieved via a reduction to the T level planarity problem [3].
Conclusions and open problems are presented in Sect. 7. Because of space limitations, complete proofs are deferred to the full version of the paper [2].
2 IntersectionLink Model
Let G be a graph and S be a set of cliques inducing a partition of the vertex set of G. In an intersectionlink representation of (G, S): (i) each vertex u is a translate R(u) of an axisaligned rectangle \(\mathcal R\); (ii) R(u) and R(v) intersect if and only if edge (u, v) is an intersectionedge; and (iii) each linkedge (u, v) is a curve connecting the boundaries of R(u) and R(v). To avoid degenerate intersections we assume that no two rectangles have their sides on the same line. The Clique Planarity problem asks whether an intersectionlink representation of a pair (G, S) exists such that no two curves intersect and no curve intersects the interior of a rectangle. Such a representation is called cliqueplanar. A pair (G, S) is cliqueplanar if it admits a cliqueplanar representation. Let \(\varGamma \) be an intersectionlink representation of \((K_n,\{K_n\})\). We have the following.
Lemma 1
Traversing the outer boundary B of \(\varGamma \) clockwise, the sequence of encountered rectangles is a subset of \(R(u_1),R(u_2),\) \(\dots ,R(u_n),R(u_{n1}),\dots ,\) \(R(u_2)\), for some permutation \(u_1,\dots ,u_n\) of the vertices of \(K_n\).
Proof sketch: The statement follows from the following claims: (a) the sequence of encountered rectangles is not of the form \(\dots ,R(u),\dots ,R(v), \dots , R(u), \dots , R(v)\), for any \(u,v\in K_n\); (b) every maximal portion of B belonging to a single rectangle R(u) contains (at least) one corner of R(u); (c) if two adjacent corners of the same rectangle R(u) both belong to B, then the entire side of R(u) between them belongs to B; and (d) any rectangle R(u) does not define three distinct maximal portions of B. \(\square \)
The following lemma allows us to focus, without loss of generality, on special cliqueplanar representations, which we call canonical.
Lemma 2
Let (G, S) admit a cliqueplanar representation \(\varGamma \). There exists a cliqueplanar representation \(\varGamma '\) of (G, S) such that: (i) each vertex is represented by an axisaligned unit square and (ii) for each clique \(s \in S\), all the squares representing vertices in s have their upperleft corners along a common line with slope 1.
Proof sketch: Initialize \(\varGamma '=\varGamma \). Scale \(\varGamma '\) so that each rectangle has both sides of length larger than 2. For any clique \(s \in S\), traverse the boundary of the rectangle arrangement representing s in \(\varGamma \) clockwise. By Lemma 1, the circular sequence of encountered rectangles is of the form \(R(u_1),\dots ,R(u_{s}),R(u_{s1}),\dots ,R(u_2)\), for some permutation \(u_1,\dots ,u_{s}\) of the vertices of s. Place pairwiseintersecting unit squares \(Q(u_1),\dots , Q(u_{s})\) representing \(u_1,\dots ,u_{s}\) in the interior of \(R(u_1)\), as required by the lemma. Remove \(R(u_1),\dots ,R(u_{s})\) and reroute the curves representing linkedges from the border of the rectangle arrangement to the suitable ending squares. This can be done without introducing any crossings, because the circular sequence of the squares encountered when traversing the boundary of the square arrangement clockwise is \(Q(u_1),\dots ,Q(u_{s}),Q(u_{s1}),\dots ,Q(u_2)\). \(\square \)
3 Hardness Results on Clique Planarity
In this section we prove that the Clique Planarity problem is not solvable in polynomial time, unless \(\mathcal{P}\)=\(\mathcal {NP}\). In fact, we have the following.
Theorem 1
It is \(\mathcal {NP}\)complete to decide whether a pair (G, S) is cliqueplanar, even if S contains just one clique with more than one vertex.
We prove Theorem 1 by showing a reduction from a constrained clustered planarity problem, which we prove to be \(\mathcal {NP}\)complete, to the Clique Planarity problem.
A clustered graph (G, T) is a pair where G is a graph and T is a rooted tree whose leaves are the vertices of G; the internal nodes of T distinct from the root correspond to subsets of vertices of G, called clusters. A clustered graph is flat if every cluster is a child of the root. A cplanar drawing of (G, T) is a planar drawing of G, together with a representation of each cluster \(\mu \) as a simple region \(R_\mu \) of the plane such that: (i) every region \(R_\mu \) contains all and only the vertices in \(\mu \); (ii) every two regions \(R_\mu \) and \(R_\nu \) are either disjoint or one contains the other; and (iii) every edge intersects the boundary of each region \(R_\mu \) at most once. A graph is cplanar if it admits a cplanar drawing. The clustered planarity problem asks whether a given clustered graph is cplanar. Polynomialtime algorithms for testing cplanarity are known only in special cases, most notably, for cconnected clustered graphs, in which each cluster induces a connected graph [9, 10]. A clustered graph is cplanar if and only if a set of edges can be added to it so that the resulting graph is cplanar and cconnected [10]. Any such set of edges is a saturator, and the subset of a saturator composed of the edges between vertices of the same cluster \(\mu \) defines a saturator for \(\mu \). A saturator is linear if the saturator for each cluster is a path. The Clustered Planarity with Linear Saturators (cpls) problem asks whether a flat clustered graph such that each cluster induces an independent set of vertices admits a linear saturator.
Lemma 3
Let (G, T) be an instance of cpls with \(G=(V,E)\) and let \(E^\star \subseteq \left( {\begin{array}{c}V\\ 2\end{array}}\right) \setminus E\) be such that in \(G^\star = (V,E \cup E^\star )\) every cluster induces a path. Then \(E^\star \) is a linear saturator for (G, T) if and only if \(G^\star \) is planar.
The following lemma connects the problem Clique Planarity with cpls.
Lemma 4
Given an instance (G, T) of the cpls problem, an equivalent instance \((G',S)\) of the Clique Planarity problem can be constructed in linear time.
Proof sketch: Initialize \(G'=G\). Then, for each cluster \(\mu \) of (G, T), add a clique \(s_{\mu }\) on the vertex set of \(\mu \) to \((G',S)\). Clearly, \((G',S)\) can be constructed in linear time. We now prove the equivalence between (G, T) and \((G',S)\).
If (G, T) admits a linear saturator \(E^*\), then there exists a cplanar drawing \(\varGamma ^\star \) of \((G^\star ,T)\), where \(G^\star \) is obtained by adding \(E^*\) to G. We construct a cliqueplanar representation of \((G',S)\) as follows. For each cluster \(\mu \), replace the interior of the region representing \(\mu \) in \(\varGamma ^\star \) with a set of \(s_{\mu }\) pairwiseintersecting axisaligned unit squares, where the order of such squares is the same as the one of the corresponding vertices in the linear saturator for \(\mu \); complete the drawing of each linkedge (u, v) of \(G'\) with curves from the squares representing u and v to the boundaries of the regions representing the clusters containing u and v. The correspondence between the order of the squares and the order of the vertices in \(E^*\) guarantees the absence of crossings.
Next, we prove that the cpls problem is \(\mathcal {NP}\)complete.
Theorem 2
The cpls problem is \(\mathcal {NP}\)complete, even for instances in which just one cluster contains more than one vertex.
Proof sketch: The problem clearly lies in \(\mathcal {NP}\). We give a polynomialtime reduction from the Hamiltonian Path problem in biconnected planar graphs [14]. Given an instance G of Hamiltonian Path, we construct an instance \((G',T)\) of cpls as follows. Assume G has an associated planar embedding. Initialize \(G'=G\), as in Fig. 2(c). Add a vertex \(v_f\) inside each face f and connect it to all the vertices incident to f (this results in a triangulated planar graph \(G'\)); then subdivide with a vertex each edge of \(G'\) which is also in G, as in Fig. 2(d). Finally, add a cluster \(\mu \) to T containing all the vertices of \(G'\) which are also in G and, for each of the remaining vertices, add to T a cluster containing only that vertex. Now, any Hamiltonian path \(P=(v_1,\dots ,v_n)\) in G can be drawn in \(G'\)without crossings by letting each edge \((v_i,v_{i+1})\) lie in one of the two faces of \(G'\) incident to the dummy vertex for edge \((v_i,v_{i+1})\). It follows from Lemma 3 that the edge set of P is a linear saturator for \((G',T)\). Conversely, any linear saturator for \((G',T)\) defines a path on the vertex set of \(\mu \), which is a Hamiltonian path in G. \(\square \)
4 CliquePlanarity with Given Vertex Representations
We show a reduction to the Partial Embedding Planarity problem [1], which asks whether a planar drawing of a graph H exists extending a given drawing \(\mathcal{H}'\) of a subgraph \(H'\) of H. First, we define a connected component \(H'_s\) of \(H'\) corresponding to a clique \(s\in S\) and its drawing \(\mathcal{H}'_s\). We remark that \(H'_s\) is a cactus graph, that is a connected graph that admits a planar embedding in which all the edges are incident to the outer face. Denote by B the boundary of the representation of s in \(\varGamma '\) (see Fig. 3(a)). If s has one or two vertices, then \(H'_s\) is a vertex or an edge, respectively (and \(\mathcal{H}'_s\) is any drawing of \(H'_s\)). Otherwise, initialize \(H'_s\) to a simple cycle containing a vertex for each maximal portion of B belonging to a single rectangle (see Fig. 3(b)). Let \(\mathcal{H}'_s\) be any planar drawing of \(H'_s\) with a suitable orientation. Each rectangle in \(\varGamma '\) may correspond to two vertices of \(H'_s\), but no more than two by Lemma 1. Insert an edge in \(H'_s\) between every two vertices representing the same rectangle and draw it in the interior of \(\mathcal{H}'_s\). By Lemma 1, these edges do not alter the planarity of \(\mathcal{H}'_s\). Contract the inserted edges in \(H'_s\) and \(\mathcal{H}'_s\) (see Fig. 3(c)). This completes the construction of \(H'_s\), together with its planar drawing \(\mathcal{H}'_s\). Graph \(H'\) is the union of graphs \(H'_s\), over all the cliques \(s\in S\); the drawings \(\mathcal{H}'_s\) of \(H'_s\) are in the outer face of each other in \(\mathcal{H}'\). Note that, because of the preprocessing, the endvertices of each linkedge of G are vertices of \(H'\); then we define H as the graph obtained from \(H'\) by adding, for each linkedge (u, v) of G, an edge between the vertices of \(H'\) corresponding to u and v. We have the following:
Lemma 5
There exists a planar drawing of H extending \(\mathcal{H}'\) if and only if there exists a cliqueplanar representation of (G, S) coinciding with \(\varGamma '\) when restricted to \((G',S)\).
Proof sketch: Let \(\mathcal H\) be a planar drawing of H extending \(\mathcal{H}'\). We construct a cliqueplanar representation of (G, S) as follows: (i) for each \(s \in S\), enclose \(\mathcal{H}'_s\) with a closed polyline \(P_s\); (ii) scale \(\mathcal H\) so that the bounding box of the representation of s in \(\varGamma '\) fits inside \(P_s\); (iii) replace the interior of \(P_s\) with a copy of the representation of s in \(\varGamma '\); and (iv) reroute the linkedges from \(P_s\) to the suitable rectangles; this creates no crossing, because vertices along the outer face of \(\mathcal{H}'_s\) are in the same order as the corresponding rectangles along the boundary of the representation of s in \(\varGamma '\).
Let \(\varGamma \) be a cliqueplanar representation of (G, S). We construct a planar drawing of H extending \(\mathcal{H}'\) as follows: (i) for each \(s \in S\), enclose the representation of s in \(\varGamma \) by a closed polyline \(P_s\); (ii) replace the interior of \(P_s\) with a scaled copy of \(\mathcal{H}'_s\); and (iii) reroute the curves representing linkedges from \(P_s\) to the suitable endvertices (as in the previous direction, this can be done without introducing crossings). \(\square \)
We get the main theorem of this section.
Theorem 3
Clique Planarity can be decided in linear time for a pair (G, S) if the rectangle representing each vertex of G is given as part of the input.
Proof
First, we check whether, for each \(s\in S\), all the rectangles representing vertices in s are pairwise intersecting. This can be done in O(s) time by computing the maximum x and ycoordinates \(x_M\) and \(y_M\) among all bottomleft corners, the minimum x and ycoordinates \(x_m\) and \(y_m\) among all topright corners, and by checking whether \(x_M\) \(<\) \(x_m\) and \(y_M\) \(<\) \(y_m\). The described reduction to Partial Embedding Planarity can be performed in linear time by traversing the boundary B of each clique \(s\in S\); namely, as a consequence of Lemma 1, B has linear complexity. Contracting an edge requires merging the adjacency lists of its endvertices; this can be done in constant time since these vertices have constant degree, again by Lemma 1. Finally, the Partial Embedding Planarity problem can be solved in linear time [1]. \(\Box \)
5 Testing Clique Planarity for Graphs Composed of Two Cliques
In this section we study the Clique Planarity problem for pairs (G, S) such that \(S=2\). Observe that, if \(S=1\), then the Clique Planarity problem is trivial, since in this case G is a clique with no linkedge, hence a cliqueplanar representation of (G, S) can be easily constructed. The case in which \(S=2\) is already surprisingly nontrivial. Indeed, we could not determine the computational complexity of Clique Planarity in this case. However, we establish the equivalence between our problem and a book embedding problem whose study might be interesting in its own; by means of this equivalence we show a polynomialtime algorithm for a special version of the Clique Planarity problem. This book embedding problem is defined as follows.
A 2page book embedding is a plane drawing of a graph where the vertices are cyclically arranged along a closed curve \(\ell \), called the spine, and each edge is drawn in one of the two regions of the plane delimited by \(\ell \). The 2Page Book Embedding problem asks whether a 2page book embedding exists for a given graph. This problem is \(\mathcal {NP}\)complete [16]. Now consider a bipartite graph \(G(V_1\cup V_2,E)\). A bipartite 2page book embedding of G is a 2page book embedding such that all vertices in \({{V_1}}\) occur consecutively along the spine (and all vertices in \({{V_2}}\) occur consecutively, as well). Finally, we define a bipartite 2page book embedding with spine crossings (b2pbesc), as a bipartite 2page book embedding in which edges are not restricted to lie in one of the two regions delimited by \(\ell \), but each of them might cross \(\ell \) once; these crossings are only allowed to happen in the two portions of \(\ell \) delimited by a vertex of \(V_1\) and a vertex of \(V_2\). We call the corresponding embedding problem Bipartite 2Page Book Embedding with Spine Crossings (b2pbesc).
We now prove that b2pbesc is equivalent to Clique Planarity for instances (G, S) such that \(S=2\). Consider any instance \((G',\{s_1,s_2\})\) of Clique Planarity. We define an instance \(G^{}({V_1^{}} \cup {V_2^{}}, E^{})\) of b2pbesc so that \(V_i\) is the vertex set of \(s_i\), for \(i=1,2\), and E is the set of linkedges of \(G'\). Conversely, given an instance \(G^{}({V_1^{}} \cup {V_2^{}}, E^{})\) of b2pbesc, an instance \((G',\{s_1,s_2\})\) of Clique Planarity can be constructed in which \(s_i\) is a clique on \(V_i\), for \(i=1,2\), and the set of linkedges of \(G'\) coincides with E. Since linkedges only connect vertices of different cliques and since each edge of E only connects a vertex of \(V_1\) to one of \(V_2\), each mapping generates a valid instance for the other problem. Also, these mappings define a bijection, hence the following lemma establishes the equivalence between the two problems.
Lemma 6
\((G',\{s_1,s_2\})\) is cliqueplanar if and only if \(G^{}({V_1^{}} \cup {V_2^{}}, E^{})\) admits a b2pbesc.
Starting from a cliqueplanar representation of \((G',\{s_1,s_2\})\), construct a b2pbesc \(\mathcal B\) of G as follows. Refer to Fig. 4. By Lemma 1, the rectangles representing vertices \(u_1, \dots , u_k\in V_1\) appear along the boundary \(B_1\) of \(s_1\) in an order which is a subsequence of \(R(u_1), \dots , R(u_k), \dots , R(u_2)\). Draw a curve \(\ell _1\) between two points \(p_1^a\in R(u_1) \cap B_1\) and \(p_1^b\in R(u_k) \cap B_1\) entering \(R(u_1), \dots , R(u_k)\) in this order. Place \(u_i\) at the point where \(\ell _1\) enters \(R(u_i)\). Define \(\ell _2\), \(B_2\), \(p_2^a\) and \(p_2^b\), and draw the vertices of \(V_2\) analogously. Add to \(\mathcal B\) curves \(\ell _{12}\) and \(\ell _{21}\), not intersecting each other, not intersecting the same linkedge, each intersecting any link edge at most once, and connecting \(p_1^a\) to \(p_2^b\), and \(p_2^a\) to \(p_1^b\), respectively. Let \(\ell =\ell _1\cup \ell _2 \cup \ell _{12}\cup \ell _{21}\). The correspondence between the vertex ordering along \(\ell \) and the order of the rectangles along \(B_1\) and \(B_2\) allows us to extend the linkedges from \(B_1\) and \(B_2\) to the suitable vertices of G inside them. The vertices of \(V_1\) (of \(V_2\)) are consecutive along \(\ell \), since they lie on \(\ell _1\) (on \(\ell _2\)); also, each edge \(e \in E\) crosses \(\ell \) at most once, either on \(\ell _{12}\) or on \(\ell _{21}\). Hence, \(\mathcal B\) is a b2pbesc of G. \(\square \)
We now consider a variant of the Clique Planarity problem for two cliques in which each clique is associated with a 2partition of the linkedges incident to it, and the goal is to construct a cliqueplanar representation in which the linkedges in different sets of the partition exit the clique on “different sides”. This constraint corresponds to the variant of the 2page book embedding problem, called Partitioned 2page book embedding problem, in which the vertices are allowed to be arbitrarily permuted along the spine, while the edges are preassigned to the pages of the book [13].
Let \((G,S=\{s_1,s_2\})\) be an instance of Clique Planarity and let \(\{E^a_i, E^b_i\}\) be a partition of the linkedges incident to \(s_i\), with \(i \in \{1,2\}\). Consider an intersectionlink representation \(\varGamma _i\) of \(s_i\) with outer boundary \(B_i\), let \(p_i\) be the bottomleft corner of the leftmost rectangle in \(\varGamma _i\), and let \(q_i\) be the upperright corner of the rightmost rectangle in \(\varGamma _i\). Let \(B^a_i\) (\(B^b_i\)) be the part of \(B_i\) from \(p_i\) to \(q_i\) (from \(q_i\) to \(p_i\)) in clockwise direction; this is the top side (the bottom side) of \(\varGamma _i\). We aim to construct a cliqueplanar representation of (G, S) in which all the linkedges in \(E^a_i\) (resp. in \(E^b_i\)) intersect the arrangement of rectangles representing \(s_i\) on its top side (resp. bottom side). We call the problem of determining whether such a representation exists 2Partitioned Clique Planarity. We prove that 2Partitioned Clique Planarity can be solved in quadratic time. The algorithm is based on a reduction to equivalent instances of Simultaneous Embedding with Fixed Edges (sefe) that can be decided in quadratic time. Given two graphs \({{G^{}_1}}\) and \({{G^{}_2}}\) on the same vertex set V, the sefe problem asks to find planar drawings of \(G_1\) and \(G_2\) that coincide on V and on the common edges of \({{G^{}_1}}\) and \({{G^{}_2}}\).
Lemma 7
Let \((G,\{s_1,s_2\})\) and \(\{E^a_1, E^b_1,E^a_2, E^b_2\}\) be an instance of 2Partitioned Clique Planarity. An equivalent instance \(\langle {{G^{}_1}},{{G^{}_2}}\rangle \) of sefe such that \({{G_1}}=(V,{{E_1}})\) and \({{G_2}}=(V,{{E_2}})\) are 2connected and such that the common graph \(G_\cap = (V,{{E_1}}\cap {{E_2}})\) is connected can be constructed in linear time.
We sketch the construction of \(\langle {{G^{}_1}},{{G^{}_2}}\rangle \). Refer to Fig. 5. The common graph \(G_{\cap }\) contains a cycle \(\mathcal {C} = (t_1, r_1, t_2, t_3, r_2, t_4, q_2, q_1)\) and trees \(Q_1\), \(Q_2\), \(R_1\), \(R_2\), \(T_1,\dots ,T_4\) rooted at \(q_1\), \(q_2\), \(r_1\), \(r_2\), \(t_1,\dots ,t_4\), respectively. The leaves of these trees are associated to the vertices of G and to the edges crossing \(\ell \), as described in Fig. 5. Thus, the circular order of the leaves of these trees corresponds to the order in which the vertices of G and the spinecrossings of the edges of \(E^a_2 \cap E^b_1\) and \(E^a_1 \cap E^b_2\) appear along \(\ell \). In particular, \(w_1,\dots ,w_4\) enforce the consecutivity of the vertices of \(V_1\) (of \(V_2\)) along \(\ell \).
Some edges of \({{G^{}_1}}\) and \({{G^{}_2}}\) are used to enforce the coherence of such ordering in all stars and trees. Some other edges of \({{G^{}_1}}\) and \({{G^{}_2}}\) represent the edges of G, possibly subdivided if they cross \(\ell \); in particular, (portions of) edges of G that have to lie on the internal side of \(\ell \) are edges in \({{G^{}_1}}\) between the leaves of \(T_2\) and \(T_3\), while (portions of) edges of G that have to lie on the external side of \(\ell \) are edges in \({{G^{}_2}}\) between the leaves of \(R_2\) and \(T_4\). Thus, (portion of) edges on the same side of \(\ell \) are represented by edges in the same graph, either \({{G^{}_1}}\) or \({{G^{}_2}}\), so that they are not allowed to cross in the sefe as well as in the b2pbesc. This realizes the equivalence between the sefe and the b2pbesc and completes the sketch of the proof. \(\square \)
Theorem 4
2Partitioned Clique Planarity can be solved in quadratic time for instances (G, S) in which \(S=2\).
Proof
Apply Lemma 7 to construct in linear time an instance \(\langle {{G^{}_1}},{{G^{}_2}}\rangle \) of sefe that is equivalent to (G, S) such that \({{G^{}_1}}\) and \({{G^{}_2}}\) are biconnected and their intersection graph \(G_{\cap }\) is connected. The statement follows from the fact that instances of sefe with this property can be solved in quadratic time [5]. \(\square \)
6 Clique Planarity with Given Hierarchy
In this section we study a version of the Clique Planarity problem in which the cliques are given together with a hierarchical relationship among them. Namely, let (G, S) be an instance of Clique Planarity and let \(\psi : S \rightarrow \{1,\dots ,k\}\), with \(k \le S\), be an assignment of the cliques in S to k levels such that, for each linkedge (u, v) of G connecting a vertex u of a clique \(s'\) to a vertex v of a clique \(s''\), we have \(\psi (s') \ne \psi (s'')\); an instance is proper if \(\psi (s') = \psi (s'') \pm 1\) for each linkedge.
We aim to construct canonical cliqueplanar representations of (G, S) such that (Property 1) for each clique \(s \in S\), the top side of the bounding box of the representation of s lies on line \(y=2\psi (s)\), while the bottom side lies above line \(y=2\psi (s)2\), and (Property 2) each linkedge (u, v), with \(u \in s'\), \(v \in s''\), \(\psi (s') < \psi (s'')\), is drawn as a ymonotone curve from the top side of R(u) to the bottom side of R(v). We call the problem of testing whether such a representation exists Level Clique Planarity.
We show how to test level clique planarity in quadratic time for proper instances via a lineartime reduction to equivalent proper instances of Tlevel Planarity [3].
A \(\mathcal {T}\) level graph \((V,E,\gamma ,\mathcal {T})\) consists of (i) a graph \(G =(V,E)\), (ii) a function \(\gamma : V \rightarrow \{1,...,k\}\) such that \(\gamma (u) \ne \gamma (v)\) for each \((u,v) \in E\), where the set \(V_i = \{v \mid \gamma (v)=i\}\) is the ith level of G, and (iii) a set \(\mathcal {T}=\{T_1,\dots ,T_k\}\) of rooted trees such that the leaves of \(T_i\) are the vertices in \(V_i\). A \(\mathcal {T}\) level planar drawing of \((V,E,\gamma ,\mathcal {T})\) is a planar drawing of G where the edges are ymonotone curves and the vertices in \(V_i\) are placed along line \(y = i\), denoted by \(\ell _i\), according to an order compatible with \(T_i\), that is, for each internal node \(\mu \) of \(T_i\), the leaves of the subtree of \(T_i\) rooted at \(\mu \) are consecutive along \(\ell _i\). \(T\) Level Planarity asks to test whether a \(\mathcal {T}\)level graph is \(\mathcal {T}\)level planar.
Lemma 8
Given a proper instance of Level Clique Planarity, an equivalent proper instance of Tlevel Planarity can be constructed in linear time.
Proof sketch: Given an instance \((G(V,E),S,\psi )\), an instance \((V,E',\gamma ,\mathcal {T})\) of Tlevel Planarity can be constructed as follows. Their vertex sets coincide and \(E'\) coincides with the set of linkedges in E. For each vertex v in a clique \(s \in S\) we have \(\gamma (v)=\psi (s)\). Finally, for \(i=1,\dots ,k\), where k is the number of levels in \((G,S,\psi )\), tree \(T_i \in \mathcal {T}\) has root \(r_i\), a child \(w_s\) of \(r_i\) for each \(s\in S\), and the vertices of s as children of \(w_s\).
Suppose that \((V,E',\gamma ,\mathcal {T})\) admits a Tlevel planar drawing \(\varGamma \). Construct a cliqueplanar representation satisfying Properties 1 and 2 as follows. Construct a canonical representation of each clique \(s\in S\) with the top side of the bounding box on \(y=2\psi (s)\); cliques on the same level are sidebyside. The order along \(y=2i\) of the cliques \(s\in S\) with \(\psi (s)=i\) and the order of the rectangles in each of these cliques is dictated by the order of the vertices in \(V_i\) along \(\ell _i\). Finally, each edge \((u,v)\in E'\) consists of three straightline segments: two segments connect rectangles R(u) and R(v) to points \(p_u\) and \(p_v\) on the bounding boxes of their cliques and a segment connects \(p_u\) and \(p_v\).
Suppose that \((G(V,E),S,\psi )\) admits a cliqueplanar representations satisfying Properties 1 and 2. We construct a Tlevel planar drawing of \((V,E',\gamma ,\mathcal {T})\) as follows. Place each vertex \(v \in V_i\) at the intersection between the left side of R(v) and the line \(\ell _i:y\) \(=\) \(2i1\). Each edge (u, v) is a curve composed of three parts: The middle part coincides with the drawing of the linkedge (u, v) outside R(u) and R(v), while the other parts connect points on their boundaries to u and v. The ordering of the vertices of \(V_i\) along \(\ell _i\) is compatible with \(T_i\) since \(\ell _i\) intersects all the rectangles of each clique s with \(\psi (s)=i\), and since rectangles in different cliques are disjoint. Thus, vertices in the same clique, and hence children of the same node of \(T_i\), are consecutive along \(\ell _i\).
The construction can be performed in linear time, thus proving the lemma. \(\square \)
Theorem 5
Level Clique Planarity is solvable in quadratic time for proper instances and in quartic time for general instances.
Proof
Any instance \((G,S,\psi )\) of Level Clique Planarity can be made proper by introducing dummy cliques composed of single vertices to split linkedges spanning more than one level. This does not alter the level clique planarity of the instance and might introduce a quadratic number of vertices. Lemma 8 constructs in linear time an equivalent proper instance of Tlevel Planarity. The statement follows since Tlevel Planarity can be solved in quadratic time [3] for proper instances. \(\Box \)
7 Conclusions and Open Problems
We initiated the study of hybrid representations of graphs in which vertices are geometric objects and edges are either represented by intersections (if part of dense subgraphs) or by curves (otherwise). Several intriguing questions arise from our research. (1) How about considering families of dense graphs richer than cliques? Other natural families of dense graphs could be considered, say interval graphs, complete bipartite graphs, or trianglefree graphs. (2) How about using different geometric objects for representing vertices? Even simple objects like equilateral triangles or unit circles seem to pose great challenges, as they give rise to arrangements with a complex combinatorial structure. For example, we have no counterpart of Lemma 1 in those cases. (3) What is the complexity of the bipartite 2page book embedding problem? We remark that, in the version in which spine crossings are allowed, this problem is equivalent to the clique planarity problem for instances with two cliques.
References
 1.Angelin, P., Di Battista, G., Frati, F., Jelinek, V., Kratochvíl, J., Patrignani, M., Rutter, I.: Testing planarity of partially embedded graphs. ACM Trans. Algorithms 11(4), 32:1–32:42 (2015). doi: 10.1145/2629341
 2.Angelini, P., Da Lozzo, G., Di Battista, G., Frati, F., Patrignani, M., Rutter, I.: Intersectionlink representations of graphs. CoRR abs/1508.07557 (2015). http://arxiv.org/abs/1508.07557
 3.Angelini, P., Da Lozzo, G., Di Battista, G., Frati, F., Roselli, V.: The importance of being proper (in clusteredlevel planarity and Tlevel planarity). Theor. Comp. Sci. 571, 1–9 (2015)CrossRefzbMATHGoogle Scholar
 4.Batagelj, V., Brandenburg, F., Didimo, W., Liotta, G., Palladino, P., Patrignani, M.: Visual analysis of large graphs using (x, y)clustering and hybrid visualizations. IEEE Trans. Vis. Comput. Graph. 17(11), 1587–1598 (2011)CrossRefGoogle Scholar
 5.Bläsius, T., Rutter, I.: Simultaneous PQordering with applications to constrained embedding problems. In: Khanna, S. (ed.) SODA 2013, pp. 1030–1043. SIAM (2013)Google Scholar
 6.Brandes, U., Raab, J., Wagner, D.: Exploratory network visualization: Simultaneous display of actor status and connections. J. Soc. Struct. 2 (2001)Google Scholar
 7.Breu, H.: Algorithmic Aspects of Constrained Unit Disk Graphs. Ph.D. thesis, The University of British Columbia, Canada (1996)Google Scholar
 8.Chen, Z., Grigni, M., Papadimitriou, C.H.: Map graphs. J. ACM 49(2), 127–138 (2002)MathSciNetCrossRefGoogle Scholar
 9.Cortese, P.F., Di Battista, G., Frati, F., Patrignani, M., Pizzonia, M.: Cplanarity of cconnected clustered graphs. J. Graph Algorithms Appl. 12(2), 225–262 (2008)MathSciNetCrossRefzbMATHGoogle Scholar
 10.Feng, Q.W., Cohen, R.F., Eades, P.: Planarity for clustered graphs. In: Spirakis, P.G. (ed.) ESA 1995. LNCS, vol. 979, pp. 213–226. Springer, Heidelberg (1995) CrossRefGoogle Scholar
 11.Heer, J., Boyd, D.: Vizster: Visualizing online social networks. In: Stasko, J.T., Ward, M.O. (eds.) InfoVis 2005, 23–25 October 2005, Minneapolis, USA, p. 5. IEEE Computer Society (2005)Google Scholar
 12.Henry, N., Fekete, J., McGuffin, M.J.: Nodetrix: a hybrid visualization of social networks. IEEE Trans. Vis. Comput. Graph. 13(6), 1302–1309 (2007)CrossRefGoogle Scholar
 13.Hong, S.H., Nagamochi, H.: Simpler algorithms for testing twopage book embedding of partitioned graphs. In: Cai, Z., Zelikovsky, A., Bourgeois, A. (eds.) COCOON 2014. LNCS, vol. 8591, pp. 477–488. Springer, Heidelberg (2014) Google Scholar
 14.Irzhavsky, P.: Information System on Graph Classes and their Inclusions (ISGCI). http://graphclasses.org/classes/refs1600.html#ref_1660
 15.Thorup, M.: Map graphs in polynomial time. In: FOCS 1998, pp. 396–405. IEEE (1998)Google Scholar
 16.Wigderson, A.: The complexity of the Hamiltonian circuit problem for maximal planar graphs. EECS Department Report 298, Princeton University (1982)Google Scholar