[ieee asia-pacific symposium on visualisation 2007 - sydney, nsw (2007.02.5-2007.02.7)] 2007 6th...

8
Overlapping Cluster Planarity (Extended Abstract) Walter Didimo Francesco Giordano Giuseppe Liotta Universit´ a degli Studi di Perugia, Dipartimento di Ingegneria Elettronica e dell’Informazione. E-mail:{didimo,giordano,liotta}@diei.unipg.it ABSTRACT Cluster planarity is currently recognized as one of the most inter- esting problem in graph drawing. This paper investigates a new direction in this area by addressing the following question: Let G be a graph along with a hierarchy of vertex clusters, where clusters can partially intersect. Does G admit a drawing where each cluster is inside a simple closed region, no two edges intersect, and no edge intersects a region twice? We investigate the interplay between this problem and the classical cluster planarity testing problem where clusters are not allowed to partially intersect. Characterizations, models, and algorithms are discussed. Keywords: Cluster Planarity, Graph Drawing, Graph Visualiza- tion. 1 I NTRODUCTION Graphs and their visualizations are essential in data exploration and understanding, particularly for those applications that need to man- age, process, and analyze huge quantities of relational data. How- ever, when the graph to be displayed consists of hundreds or thou- sands of vertices, a complete visualization of the data is typically not effective for the user, and therefore alternative visualization paradigms have been investigated in the literature. A well studied approach to handle and visualize large graphs is to organize the ver- tices into a hierarchy of clusters. This makes it possible to explore complex relational data at different levels of detail, by collapsing or expanding clusters. This approach has been applied to various application domains, including Internet and Web computing, social network analysis, reverse engineering, knowledge engineering, and computational biology (see, e.g., [8, 9, 16, 17, 21]). A clustered graph (or simply c-graph) consists of a pair C = (G, T ), where G is an undirected graph and T is a rooted tree that describes a hierarchy of vertex clusters; each cluster is a subset of the vertices of G and any two clusters are either disjoint or one is completely included in the other. In a visualization of a c-graph the subgraph induced by each cluster μ is drawn inside a simple closed region R(μ ) which keeps any other vertex that does not belong to μ out of it. Also, the inclusions among cluster regions must re- flect the inclusion relations among the corresponding clusters. An important requirement for the readability of the drawing is that it has as few crossings as possible; this means that crossings between edges should be avoided as well as crossings between a cluster re- gion and the edges that are not connected to vertices of the corre- sponding cluster. A crossing-free drawing of a c-graph is called a Research partially supported by MIUR under Project “ALGO-NEXT (Algorithms for the Next Generation Internet and Web: Methodologies, De- sign and Experiments)”, and NSERC. c-planar drawing and a c-graph that admits such a drawing is said to be c-planar. α β γ (a) α β γ (b) Figure 1: (a) A non c-planar drawing of a clustered graph. (b) A c- planar drawing of the same clustered graph.Vertices with the same color belong to the same cluster. For example, Figure 1 shows two different drawings of the same clustered graph, where the regions of the clusters are drawn as rect- angles. The drawing in Figure 1(a) is not c-planar, since the bold edge causes both crossings with other edges and a crossing with the region of cluster α . Conversely, the drawing in Figure 1(b) is c-planar. The problem of testing whether a c-graph is c-planar was first posed by Feng et al. [10] in 1995, and several papers have been de- voted to this argument during the subsequent decade. Optimal and sub-optimal c-planarity testing algorithms are known for a clustered graph C =(G, T ) where each cluster induces a connected subgraph of G (see, e.g., [2, 4, 5, 10]). Also, polynomial-time testing algo- rithms are known for different families of c-graphs whose clusters induce not connected subgraphs [3, 11, 12], although the time com- plexity of the c-planarity testing problem in the general case is still unknown. The relationship between planarity and c-planarity has also been studied [1]. A planarization algorithm for c-graphs that are not c-planar is described in [6]. Inspired by the above mentioned cluster planarity literature and 73 Asia-Pacific Symposium on Visualisation 2007 5 - 7 February, Sydney, NSW, Australia 1-4244-0809-1/07/$20.00 © 2007 IEEE

Upload: g

Post on 13-Mar-2017

214 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: [IEEE Asia-Pacific Symposium on Visualisation 2007 - Sydney, NSW (2007.02.5-2007.02.7)] 2007 6th International Asia-Pacific Symposium on Visualization - Overlapping cluster planarity

Overlapping Cluster Planarity∗(Extended Abstract)

Walter Didimo Francesco Giordano Giuseppe Liotta

Universita degli Studi di Perugia,Dipartimento di Ingegneria Elettronica e dell’Informazione.

E-mail:{didimo,giordano,liotta}@diei.unipg.it

ABSTRACT

Cluster planarity is currently recognized as one of the most inter-esting problem in graph drawing. This paper investigates a newdirection in this area by addressing the following question: Let Gbe a graph along with a hierarchy of vertex clusters, where clusterscan partially intersect. Does G admit a drawing where each clusteris inside a simple closed region, no two edges intersect, and no edgeintersects a region twice? We investigate the interplay between thisproblem and the classical cluster planarity testing problem whereclusters are not allowed to partially intersect. Characterizations,models, and algorithms are discussed.

Keywords: Cluster Planarity, Graph Drawing, Graph Visualiza-tion.

1 INTRODUCTION

Graphs and their visualizations are essential in data exploration andunderstanding, particularly for those applications that need to man-age, process, and analyze huge quantities of relational data. How-ever, when the graph to be displayed consists of hundreds or thou-sands of vertices, a complete visualization of the data is typicallynot effective for the user, and therefore alternative visualizationparadigms have been investigated in the literature. A well studiedapproach to handle and visualize large graphs is to organize the ver-tices into a hierarchy of clusters. This makes it possible to explorecomplex relational data at different levels of detail, by collapsingor expanding clusters. This approach has been applied to variousapplication domains, including Internet and Web computing, socialnetwork analysis, reverse engineering, knowledge engineering, andcomputational biology (see, e.g., [8, 9, 16, 17, 21]).

A clustered graph (or simply c-graph) consists of a pair C =(G,T ), where G is an undirected graph and T is a rooted tree thatdescribes a hierarchy of vertex clusters; each cluster is a subset ofthe vertices of G and any two clusters are either disjoint or one iscompletely included in the other. In a visualization of a c-graph thesubgraph induced by each cluster μ is drawn inside a simple closedregion R(μ) which keeps any other vertex that does not belong toμ out of it. Also, the inclusions among cluster regions must re-flect the inclusion relations among the corresponding clusters. Animportant requirement for the readability of the drawing is that ithas as few crossings as possible; this means that crossings betweenedges should be avoided as well as crossings between a cluster re-gion and the edges that are not connected to vertices of the corre-sponding cluster. A crossing-free drawing of a c-graph is called a

∗Research partially supported by MIUR under Project “ALGO-NEXT(Algorithms for the Next Generation Internet and Web: Methodologies, De-sign and Experiments)”, and NSERC.

c-planar drawing and a c-graph that admits such a drawing is saidto be c-planar.

α

β

γ

(a)

α

β

γ

(b)

Figure 1: (a) A non c-planar drawing of a clustered graph. (b) A c-planar drawing of the same clustered graph.Vertices with the samecolor belong to the same cluster.

For example, Figure 1 shows two different drawings of the sameclustered graph, where the regions of the clusters are drawn as rect-angles. The drawing in Figure 1(a) is not c-planar, since the boldedge causes both crossings with other edges and a crossing withthe region of cluster α . Conversely, the drawing in Figure 1(b) isc-planar.

The problem of testing whether a c-graph is c-planar was firstposed by Feng et al. [10] in 1995, and several papers have been de-voted to this argument during the subsequent decade. Optimal andsub-optimal c-planarity testing algorithms are known for a clusteredgraph C = (G,T ) where each cluster induces a connected subgraphof G (see, e.g., [2, 4, 5, 10]). Also, polynomial-time testing algo-rithms are known for different families of c-graphs whose clustersinduce not connected subgraphs [3, 11, 12], although the time com-plexity of the c-planarity testing problem in the general case is stillunknown. The relationship between planarity and c-planarity hasalso been studied [1]. A planarization algorithm for c-graphs thatare not c-planar is described in [6].

Inspired by the above mentioned cluster planarity literature and

73

Asia-Pacific Symposium on Visualisation 20075 - 7 February, Sydney, NSW, Australia 1-4244-0809-1/07/$20.00 © 2007 IEEE

Page 2: [IEEE Asia-Pacific Symposium on Visualisation 2007 - Sydney, NSW (2007.02.5-2007.02.7)] 2007 6th International Asia-Pacific Symposium on Visualization - Overlapping cluster planarity

by a recent paper of Omote and Sugiyama [19] presented at APVIS2006, this paper opens a new investigation direction in the fieldof cluster planarity testing by addressing the following problem:Let G be a graph along with a hierarchy of vertex clusters, whereclusters can overlap, i.e. they can share a proper subset of theirvertices; Does G admit a drawing where each cluster is inside asimple closed region, no two edges intersect, and no edge intersectsa region twice?

For example, Figure 3(a) depicts a drawing of an overlappingclustered graph that satisfies the desired conditions. Besides its in-herent theoretical interest, our question can be relevant in all thoseapplications where relational data are clustered and the clusters canintersect. A cluster-based approach with clusters that are allowed tooverlap, for instance, is being used for routing in dynamic networks([18]). Moreover, overlapping clustered graphs can be used as toolsto support human thought in several fields (see, e.g, the Higraph in-troduced by Harel [14] in software engineering). Other applicationscan be found in [15, 19, 21].

It is worth remarking that the class of intersecting clusteredgraphs defined by Omote and Sugiyama [19] is a proper subclassof the overlapping clustered graphs studied in this paper, since inan intersecting clustered graph the subgraph induced by an overlapcannot be further decomposed into clusters. Also, the drawing tech-nique of Omote and Sugiyama for the visualization of intersectingclustered graphs is based on force-directed approaches, which cangive rise to drawings that do not respect some of the classical rulesof cluster planarity (for example two edges may intersect even ifthe graph is cluster planar).

At a first glance, one might argue that the question of this papercan be answered by simply regarding each overlap between any twoclusters as an individual cluster and by applying classical results ofcluster planarity. However, as it will be shown throughout the pa-per, this approach does not work in general even for the apparentlysimple case of a graph consisting of exactly two overlapping clus-ters. Indeed, the main focus of this paper is to study the relationshipbetween the notion of cluster planarity with overlaps and the onewithout overlaps. Our main contribution can be listed as follows.

• We formally define the concept of overlapping clusteredgraphs (also called oc-graphs) and of overlapping cluster pla-narity. A characterization of those oc-graphs that are clusterplanar according to our definition is given; it extends the oneof Feng et al. [10] to the case of overlapping clusters. Clusterplanar oc-graphs are said to be oc-planar.

• We provide examples of oc-planar oc-graphs such that the c-graph obtained considering the overlaps as individual clustersis not c-planar; and, vice-versa, we give examples where theoc-graph is not oc-planar while the corresponding c-graph isc-planar.

• Based on the above characterization and negative results, wedescribe models that make it possible to interpret the planaritytesting problem for meaningful classes of oc-graphs as theplanarity testing problem of associated c-graphs.

• Planarity testing and embedding algorithms for oc-graphs aredevised by combining our models with known results aboutc-planarity.

We conclude this introduction by also recalling that a general-ization of clustered graphs that includes the family of oc-graphs,known as compound graphs, has been introduced in the graph draw-ing literature several years ago by Sugiyama and Misue [22]. Ina compound graph clusters may overlap and adjacency relationsamong clusters may be defined (in other words, there may be edges

connecting pairs of clusters and not just pairs of vertices). It has tobe remarked however that, to the best of our knowledge, all drawingalgorithms provided in the literature to visualize compound graphswork under the restrictive assumption that no two clusters overlap(see, e.g., [16, 17, 21]).

The remainder of this paper is organized as follows. The for-mal definition of oc-graphs is given in Subsection 2.1 and a char-acterization of oc-planarity is presented in Subsection 2.2; modelsand algorithms can be found in Section 3; final remarks and openproblems are in Section 4. For reasons of space some proofs aresketched in this extended abstract.

2 OVERLAPPING CLUSTERED GRAPHS

We first define oc-graphs and oc-planarity and then present a char-acterization result. We assume familiarity with basic concepts ofgraph theory [13] and geometric computing [20]; we recall hereonly those definitions that pertain cluster planarity.

2.1 DefinitionsA graph G is connected if for any pair of its vertices u and v thereexists a path connecting u to v in G. A connected graph G is k-connected (k > 1) if it remains connected after the removal of anysubset of k−1 vertices.

A clustered graph C = (G,T ), also called c-graph, consists ofan undirected graph G and of a rooted tree T , called inclusion treeof C, which describes the inclusion relationships among the vertexclusters. Namely:

• The leaves of T are the vertices of G;

• Each internal node μ of T has at least two children and repre-sents a cluster V (μ) of the leaves of the subtree rooted at μ .If ν is an ancestor of μ in T then V (μ) ⊂V (ν).

Figure 2 shows an example of a c-graph. In the remainder of thepaper G(μ) denotes the subgraph of G induced by V (μ). A c-graphC is said to be c-connected if G(μ) is a connected graph for each μof T . The c-graph of Figure 2(a) is not c-connected, because eachof clusters α2 and β2 induces a disconnected subgraph of G.

An overlapping clustered graph W = (G,H) consists of an undi-rected graph G and an acyclic digraph H with a single source suchthat:

(i) The sinks of H are the vertices of G;

(ii) Each non-sink node of H has at least two outgoing arcs andrepresents a cluster V (μ) of the sinks of H reachable from μwith a directed path;

(iii) There are no transitive arcs in H.

In the following we call W an oc-graph and H the inclusion di-graph of W . Figure 3 shows an example of an oc-graph and of itsinclusion digraph. Similarly to the definition of c-graphs, H de-scribes the inclusions among the clusters: V (μ) ⊂ V (ν) if thereexists a directed path from ν to μ in H. Also, G(μ) denotes thesubgraph of G induced by the cluster represented by μ . If μ and νare two distinct nodes of H such that V (μ) �⊂ V (ν), V (ν) �⊂ V (μ)and V ′ =V (μ)∩V (ν) �= /0, then we call V ′ the overlap of V (μ) andV (ν), and we say that V (ν),V (μ) are two overlapping clusters. Anoc-graph W is said to be c-connected if for each μ of H G(μ) isconnected. The oc-graph in Figure 3(a) is c-connected.

A c-graph can be viewed as a special case of an oc-graph, sinceit can be considered as an oc-graph with no overlap. In their work,Feng et al. [10] define the concept of a c-planar drawing of a c-graph. We extend this definition to oc-graphs.

74

Page 3: [IEEE Asia-Pacific Symposium on Visualisation 2007 - Sydney, NSW (2007.02.5-2007.02.7)] 2007 6th International Asia-Pacific Symposium on Visualization - Overlapping cluster planarity

5

68

9

7

4

2

3

10 1

11

12

13

14

δ1 λ1 α1 1

β

δ2

γ2

λ2

γ

α2

1

β2

C=(G,T)(a)

T

9

2

4

8 7 6 5

10 1 11 12

13 143

δ

λ1

λ2

γ2 β2α2

1γ1α1 δ2

1

β

(b)

Figure 2: (a) A c-graph C = (G,T ); the clusters are represented asrectangles. (b) The inclusion tree T of C.

An oc-planar drawing (resp. a c-planar drawing) of an oc-graphW = (G,H) (resp. of a c-graph C = (G,T )) is a representation ofW (resp. of C) in the plane such that each vertex v of G is drawn asa point p(v), each edge of G is drawn as a simple Jordan curve, andeach node μ of H (resp. of T ) is drawn as a simple closed regionR(μ) according to the following rules:

R1: R(μ) contains the drawing of G(μ).

R2: If V (μ) ⊂V (ν), R(ν) contains R(μ).

R3: If v �∈V (μ), p(v) is outside R(μ).

R4: There is no edge crossing, i.e. any two edges of G never cross.

R5: There is no edge-region crossing, i.e. there is no an edge of Gthat crosses the boundary of a region R(μ) twice.

For example, the drawings used to describe the c-graph in Fig-ure 2(a) and the oc-graph in Figure 3(a) are c-planar and oc-planar,respectively; in both drawings the clusters are contained in the rect-angular regions. Note that, by Rule R1, in an oc-planar draw-ing the boundaries of two regions R(μ),R(ν) necessarily intersectif V (μ),V (ν) are overlapping clusters. Conversely, in a c-planardrawing the boundaries of any two regions can be always “shrank”so that they never intersect. An oc-graph (resp. a c-graph) is said

ν2

2

3

45

68

9

7

10 1

13

1412

11

δ1 μ1 ν1

δ2

μ2

W=(G,H)(a)

H

1012

14 38 9

4

7

11 12

δ

μ1 ν1

ν2 μ2

δ2

1

6 135(b)

Figure 3: (a) An oc-graph W ; the clusters are depicted as rectangles.Clusters μ1,ν1 and clusters μ2,ν2 are overlapping clusters. (b) Theinclusion digraph of W .

to be oc-planar (resp. c-planar) if it admits an oc-planar draw-ing (resp. a c-planar drawing). If C = (G,T ) is a c-planar graph,we denote by Γ(C) a c-planar drawing of C and by Γ(G) the pla-nar drawing of G in Γ(C). Also, Γ(G(μ)) denotes the drawingof G(μ) in Γ(C), for each cluster μ . Analogously, if W = (G,H)is an oc-planar graph, we denote by Γ(W ) an oc-planar drawingof W , and by Γ(G) and Γ(G(μ)) the drawing of G and G(μ) inΓ(W ), respectively. Both in the c-planar drawing and in the oc-planar drawing, Γ(G) subdivides the plane into topologically con-nected regions, called faces; exactly one of this faces is unbounded,and it is called the external face; the other faces are internal faces.An internal (resp. external) face f is described by the clockwise(resp. counterclockwise) sequence of vertices and edges that formits boundary. The description of a set of faces for G is a planarembedding of G. Throughout the paper a face f is regarded as anopen set; therefore when we say that a vertex v is in f we mean thatv lies inside the region f but not on its boundary.

2.2 Characterizing Overlapping Cluster Planarity

Feng et al. [10] gave a characterization of those c-connected clus-tered graphs C = (G,T ) that are c-planar. Their characterizationis based on the existence of a planar embedding of G with certainproperties. We recall their result.

Theorem 1 [10] A c-connected c-graph C = (G,T ) is c-planar ifand only if G admits a planar embedding such that, for each nodeμ of T , all vertices and edges of G−G(μ) are in the external faceof G(μ).

75

Page 4: [IEEE Asia-Pacific Symposium on Visualisation 2007 - Sydney, NSW (2007.02.5-2007.02.7)] 2007 6th International Asia-Pacific Symposium on Visualization - Overlapping cluster planarity

The next theorem can be proved by extending the techniqueof [10] in order to deal with the more complex structure of an in-clusion digraph instead of the structure of an inclusion tree.

Theorem 2 A c-connected oc-graph W = (G,H) is oc-planar ifand only if G admits a planar embedding such that, for each nodeμ of H, all vertices and edges of G−G(μ) are in the external faceof G(μ).

Proof. Suppose that W is oc-planar and let Γ(W ) be an oc-planardrawing of W . We show that the planar embedding induced byΓ(G) verifies the property given in the statement. Let μ be a nodeof H and let v be a vertex of G−G(μ). Suppose by contradictionthat v lies in an internal face of G(μ). Since by Rule R1, R(μ)contains the whole drawing of G(μ) in Γ(W ), it would be that alsop(v) is inside R(μ) in Γ(W ), which contradicts Rule R3. Hencev must be in the external face of G(μ). Also, let e = (u,v) be anedge of G −G(μ); this implies that both u and v are vertices ofG−G(μ) and they are in the external face of G(μ). Hence, e mustbe in the external face of G(μ) because otherwise the planarity ofthe embedding would be violated.

Suppose vice-versa that G has a planar embedding that satis-fies the property of the statement. Denote by ψ this embedding.To prove that W is oc-planar, we construct from ψ an oc-planardrawing Γ(W ) of W . First, we compute a planar drawing Γ(G) ofG that preserves ψ , i.e. a planar drawing that induces the set offaces of ψ; this can be done by applying one of the many knowngraph drawing algorithms [7]. After that, we incrementally con-struct the cluster regions by following a suitable ordering. Namely,let S = μ1, . . . ,μh be the sequence of the non-sink nodes of H or-dered according to the reverse of a topological ordering (μh is thesource of H). This implies that, for each μ j (1 ≤ j ≤ h), all nodesof H that are reachable from μ j with a directed path are in the sub-sequence μ1, . . . ,μ j−1. From Γ(G), we construct Γ(W ) by drawingat each step j ( j = 1, . . . ,h−1) the region R(μ j) of cluster V (μ j),and we prove by induction on j that the drawing Γ( j)(W ) obtainedat the end of step j verifies Rules R1-R5. The nodes of H reachablefrom μ1 are only sink-nodes, and therefore V (μ1) does not containother clusters. This implies that Rule R2 can be ignored for thisbase case. Region R(μ1) is constructed as a simple closed curve Cthat follows the profile of the external boundary of Γ(G(μ1)), ε > 0distance away (on the outside) from it. Since G(μ1) is connected,R(μ1) surely contains drawing Γ(G(μ1)) and therefore Rule R1 issatisfied. Also, since Γ(G) is planar and preserves ψ , ε can be cho-sen sufficiently small to guarantee that C crosses the edges incidenton G(μ1) exactly once, and it does not cross any other vertex oredge of the drawing of G−G(μ1). This guarantees Rules R3 andR5. Rule R4 is satisfied by the planarity of Γ(G). Assume nowthat drawing Γ( j−1)(W ) ( j > 2) verifies Rules R1-R5, and con-sider node μ j. Let (μ j,ν1), . . . ,(μ j,νk) be the outgoing edges ofμ j, such that νi is not a sink of H (k ≥ 0,1 ≤ i ≤ k). For the or-dering we have chosen, regions R(ν1), . . . ,R(νk) have been alreadydrawn in Γ( j−1)(W ). Consider the drawing Γ′ given by the unionof Γ(G(μ j)) with the boundaries of regions R(ν1), . . . ,R(νk) (seealso Figure 4). The boundary of R(μ j) is still constructed as a sim-ple closed curve C that follows the profile of the external boundaryof Γ′, ε > 0 distance away (on the outside) from it. In this way,all regions R(ν1), . . . ,R(νk) are contained in R(μ j) and thereforeRules R1-R2 are satisfied. Also, since Γ( j−1)(W ) is oc-planar, theexternal boundary of Γ′ is such that it crosses the edges incident onG(μ j) exactly once, and it does not cross any other vertex or edgeof G−G(μ j). We can therefore choose distance ε sufficiently smallso that C crosses the edges incident on G(μ j) exactly once, and itdoes not cross any other vertex or edge of G−G(μ j). This guaran-tee Rules R3 and R5. Also, observe that ε can be chosen so that Cdoes not intersect regions of clusters that do not overlap with V (μ).Rule R4 is still guaranteed by the planarity of Γ(G). �

δR( )

γR( )

(a)

αR( ) Γ’

(b)

Figure 4: Illustration of the procedure that constructs a cluster region,described in the proof of Theorem 2. R(α) is constructed from thedrawings of G and of regions R(γ),R(δ ).

In Feng et al. [10], the characterization of Theorem 1 is used todesign an O(n2) time algorithm to test whether C is c-planar, andin the positive case to compute a c-planar drawing of C. Their ap-proach looks for a planar embedding of G that verifies the propertiesgiven in Theorem 1; the algorithm proceeds bottom-up, with a post-order visit of T . One of the key-ideas is that for each node μ of TG(μ) can be tested independently of any other cluster that is not inthe subtree rooted at μ . Unfortunately, it does not seem immediateto follow a similar approach to design an algorithm for oc-planaritydirectly based on Theorem 2, mainly because the graphs induced bythe clusters of an oc-graph cannot be always tested independentlyof each other due to their overlaps. This observation motivates usto better understand the circumstances under which an oc-planaritytesting algorithm can be designed by using a corresponding algo-rithm for c-planarity.

3 MODELS AND ALGORITHMS FOR OVERLAPPING CLUS-TERED GRAPHS

In this section we study first the simple case of an oc-graph havingexactly two overlapping clusters (Subsection 3.1) and then extendthe investigation to a meaningful class of oc-graphs with many clus-ters (Subsection 3.2).

3.1 A Model for Two ClustersLet W = (G,H) be a c-connected oc-graph where the vertices of Gare grouped in exactly two overlapping clusters V (μ) and V (ν). Wecall W a two overlapping clustered graph or toc-graph for short. Anexample of a toc-graph is in Figure 5(a). Let C = (G,T ) be the c-graph constructed by considering three disjoint clusters V (μ)−V ′,V ′, and V (ν)−V ′, where V ′ is the overlap of V (μ) and V (ν); thismeans that the internal nodes of T are the root and its children α , β ,γ , where V (α) =V (μ)−V ′, V (β ) =V (ν)−V ′, V (γ) =V ′. We callC the c-image of W . Figure 5(b) shows the c-image of the toc-graphin Figure 5(a).

A natural question to ask is whether testing a toc-graph for oc-planarity is equivalent to testing its c-image for c-planarity. As the

76

Page 5: [IEEE Asia-Pacific Symposium on Visualisation 2007 - Sydney, NSW (2007.02.5-2007.02.7)] 2007 6th International Asia-Pacific Symposium on Visualization - Overlapping cluster planarity

νμW

(a)

C

α βγ

(b)

Figure 5: (a) An oc-planar toc-graph W . Grey vertices belong to theoverlap. (b) The c-image C of W ; C is not c-planar.

next lemma shows, this may not be always the case.

Lemma 1 There exists an oc-planar toc-graph whose c-image isnot c-planar.

Proof. Let W = (G,H) be the toc-graph of Figure 5(a), whereV (μ) is the set of white and grey vertices while V (ν) is the set ofblack and grey vertices. Let C be the c-image of W (Figure 5(b));the three clusters of C are the grey vertices, the black vertices, andthe white vertices. As the figure shows, W is oc-planar, since ithas an oc-planar drawing. Since G is 3-connected, in any planarembedding of G there is a cycle C of white and black vertices thatseparates the two grey vertices, which belong to cluster V (γ) of C.As a consequence, any clustered drawing of C has an edge-regioncrossing between region R(γ) and an edge of C , which implies thatC is not c-planar. �

The counterexample of Lemma 1 relies on the fact that the ver-tices of the overlap induce a non-connected subgraph of G. Onecan ask what happens for those toc-graphs whose overlap inducesa connected subgraph. Figure 6(a) shows a toc-graph W and Fig-ure 6(b) shows a c-planar drawing of the c-image C of W . All thethree clusters of C induce connected subgraphs of G, but the planarembedding of the c-planar drawing of C cannot be the embedding ofan oc-planar drawing of W , because in that embedding region R(μ)would contain region R(ν) (indeed, the drawing in Figure 6(a) isnot oc-planar). On the positive side, notice however that the planarembedding can be changed by suitably redefining the external face,so to admit both an oc-planar drawing of W and a c-planar drawingof C; for example one can choose face f of Figure 6(b) as the newexternal face, as shown in Figure 6(c). As the next lemma shows,this is indeed always possible for all toc-graphs whose overlap isconnected.

Lemma 2 Let W = (G,H) be a toc-graph whose overlap induces aconnected subgraph of G. W is oc-planar if and only if its c-imageis c-planar.

Sketch of proof. Let V (μ), V (ν) be the two overlapping clustersof W and let V ′ be the overlap of V (μ), V (ν). Also, let C be thec-image of W .

We prove first that if C is c-planar then W is oc-planar. Let Γ(C)be a c-planar drawing of C; denote by φ the planar embedding in-duced by Γ(G). Starting from φ , we define a planar embedding ψ

μW

ν

(a)

βα γf

C

(b)

νW

(c)

Figure 6: (a) A toc-graph W ; the drawing depicted in the figure is notoc-planar, since the two edges in bold are not completely inside theregion of μ ; an oc-planar drawing of W with this embedding cannotexist. (b) A c-planar drawing of the c-image C of W . (c) An oc-planardrawing of W obtained by changing its original embedding; namely,face f is chosen as the new external face.

of G that satisfies the statement of Theorem 2. Let the clusters ofC be V (α) = V (μ)−V ′, V (β ) = V (ν)−V ′, and V (γ) = V ′. Therealways exists a face of φ whose boundary contains both a vertexof V (α) and a vertex of V (β ). Indeed, if such a face did not ex-ist, for every pair of vertices a,b such that a ∈V (α) and b ∈V (β ),there would be a simple cycle C consisting only of vertices of V (γ)such that a and b lie one inside and one outside C . However, thiswould imply that the region of cluster V (γ) in Γ(C) contains a ver-tex that does not belong to V (γ), contradicting the fact that Γ(C) isa c-planar drawing. Hence let f be a face of φ with both a vertex aof V (α) and a vertex b of V (β ) on its boundary; let ψ be the planarembedding obtained from φ by choosing f as the external face. Weprove that every vertex of V (α) is in the external face of G(ν): Ifthis were not the case, there would be a vertex a′ ∈ V (α) in an in-ternal face f ′ of G(ν). Since φ differs from ψ only for its externalface, also in φ there is face f ′ whose boundary separates the planeregion containing a from the one containing a′. This implies that inΓ(C) there would be an edge-region crossing between region R(α)and one of the edges of the boundary of f ′ (i.e., an edge that doesnot belong to G(α)), a contradiction. Symmetrically, every vertexof V (β ) is in the external face of G(μ). Therefore ψ satisfies thestatement of Theorem 2 and W is oc-planar.

Conversely, suppose that W is oc-planar. Based on Theorem 2and since the graph induced by the overlap is connected, we canconstruct an oc-planar drawing Γ(W ) such that the boundaries ofthe regions R(μ) and R(ν) intersect in exactly two points, whichwe denote as p1 and p2 (refer also to Figure 7 for an illustration).To prove that C is c-planar, we construct a c-planar drawing Γ′(C)of C from Γ(W ). Namely, in Γ′(C) the drawing of G is the sameas in Γ(W ). Regions R(α), R(β ), and R(γ) are defined as follows.

77

Page 6: [IEEE Asia-Pacific Symposium on Visualisation 2007 - Sydney, NSW (2007.02.5-2007.02.7)] 2007 6th International Asia-Pacific Symposium on Visualization - Overlapping cluster planarity

Denote as C (μ) the boundary of R(μ) and as C (ν) the boundary ofR(ν) in Γ(W ). Points p1 and p2 split C (μ) into two curves, denotedas C ′(μ),C ′′(μ) and having p1 and p2 as their end-points; C ′(μ) isoutside R(ν) while C ′′(μ) is inside R(ν). Similarly, C ′(ν) (C ′′(ν))denotes the portion of C (ν) between p1 and p2 outside (inside)R(μ). In Γ(C), the boundary of R(α) is the union of C ′(μ) andC ′′(ν); the boundary of R(β ) is the union of C ′(ν) and C ′′(μ); theboundary of R(γ) is a simple closed curve that follows the profileof C ′′(μ)∪C ′′(ν), ε > 0 distance away (on the inside) from it.Observe that, with the construction described so far, the boundaryof R(α) and R(β ) exactly share the two points p1 and p2; to removethese two contact points between the two regions, we can alwaysslightly move the corners of R(α) and R(β ) at points p1 and p2 bya suitable ε distance.

The fact that Rule R3 is satisfied by Γ(C) is proved as follows.Since Γ(W ) is an oc-planar drawing, all vertices of V (μ)−V ′ areoutside R(ν) in Γ(W ), and by construction R(α) contains all andonly such vertices, i.e., it does not contain vertices which are not inV (α). Analogously, R(β ) does not contain vertices that are not inV (β ). Finally, consider a vertex v ∈V (α). If p(v) were inside R(γ)in Γ′(C), by the connectivity of G(γ) and by construction of R(γ),it would be that p(v) is inside R(ν) in Γ(W ), a contradiction. Witha symmetric reasoning, every vertex of V (β ) is drawn outside R(γ)in Γ′(C). The other rules are easy to check. �

R( )μ νR( )p2

p1

(a)

R( )α βR( )

R( )γ(b)

Figure 7: Illustration of the procedure described in Lemma 2 to mod-ify an oc-planar drawing of a toc-graph W into a c-planar drawing ofthe c-image of W .

Based on Lemma 2 and on known results about c-planarity test-ing, one can design polynomial-time algorithms for oc-planaritytesting. The following result summarizes the algorithmic contri-bution of this section.

Theorem 3 Let W = (G,H) be a c-connected toc-graph and letV (μ), V (ν), and V ′ be the two overlapping clusters and their over-lap, respectively. Let n be the number of vertices of G. The follow-ing statements hold:

(a) If each of subsets V (μ)−V ′, V ′, and V (ν)−V ′ induces a con-nected subgraph of G then W can be tested for oc-planarity inO(n) time.

(b) If both V ′ and at least one of subsets V (μ)−V ′,V (ν)−V ′induce connected subgraphs of G then W can be tested foroc-planarity in O(n2) time.

Sketch of proof. Let C be the c-image of W ; C can be constructedfrom W in O(n) time. Both in Statements (a) and (b) the overlapinduces a connected subgraph, and hence, by Lemma 2, testing theoc-planarity of W is equivalent to test the c-planarity of C. By thehypothesis of Statement (a), C is a c-connected c-graph, and thec-planarity of C can be tested in O(n) time with the algorithm ofDahlhaus et al. [4, 5] or with the algorithm of Cortese et al. [2]. Inthe hypothesis of Statement (b) only one cluster of C can inducea non-connected subgraph of G, and then C belongs to a sub-classof c-graphs defined by Gutwenger et al. [12]; for this sub-class ofc-graphs the c-planarity testing can be performed in O(n2) time, asshown in [12]. �

3.2 A Model for Many ClustersA natural extension of the study in the previous section is to con-sider oc-graphs with m ≥ 2 clusters and such that only pairs of clus-ters can overlap.

A multiple-two overlapping clustered graph, also called moc-graph for short, is an oc-graph such that each cluster can overlapwith at most another cluster. Notice that a moc-graph can have clus-ters included in other clusters and that a toc-graph is a special caseof moc-graph. The oc-graph depicted in Figure 3(a) is an exampleof moc-graph.

The c-image of a moc-graph W = (G,H) is the c-graph C =(G,T ) defined as follows:

• Each non-overlapping cluster of W is also a cluster of C;

• For each pair V (μ),V (ν) of overlapping clusters of W , letV ′ be their overlap; V (μ), V (ν), and V ′ define the followingfour clusters in C: V (α) = V (μ)−V ′, V (β ) = V (ν)−V ′,V (γ) = V ′, and V (λ ) = V (μ)∪V (ν).

The c-graph depicted in Figure 2 is the c-image of the moc-graphof Figure 3.

Unfortunately, the characterization of Lemma 2 cannot be ex-tended to family of moc-graphs whose overlaps induce connectedsubgraphs. Indeed, as proved by the next lemma, even for verysimple types of moc-graphs consisting of just three clusters, twoof which overlap and such that the overlap is connected, the c-planarity of the c-image may not imply the oc-planarity of the moc-graph.

Lemma 3 There exists a moc-graph W = (G,H) with exactly threeclusters, two of which overlap, such that: (i) The overlap induces aconnected subgraph of G; (ii) W is not oc-planar; (iii) the c-imageof W is c-planar.

Proof. Let W = (G,H) be the moc-graph of Figure 8(a). Whiteand grey vertices define a cluster V (μ), and black and grey ver-tices define a cluster V (ν) that overlaps with V (μ). The remainingthree vertices define a third cluster V (δ ) that does not overlap withthe other clusters. As shown by Figure 8(b), there exists a c-planardrawing of the c-image of W ; but W is not oc-planar. Indeed, byTheorem 2 the embedding induced by any oc-planar drawing of Wmust have the black vertices and the vertices of V (δ ) in the exter-nal face of G(μ), i.e. outside every cycle of G(μ). However, theembedding of G in Figures 8(a) and 8(b) has a cycle of G(μ) thatseparates the black vertices from the vertices of V (δ ), and such aseparating cycle exists in all planar embeddings of G, because G isa 3-connected graph. �

78

Page 7: [IEEE Asia-Pacific Symposium on Visualisation 2007 - Sydney, NSW (2007.02.5-2007.02.7)] 2007 6th International Asia-Pacific Symposium on Visualization - Overlapping cluster planarity

δμ

ν

W

(a)

δλα β γ

C

(b)

Figure 8: (a) A moc-graph W that is not oc-planar; the drawing inthe figure is not oc-planar since the three edges in bold should becompletely inside the region of μ . (b) A c-planar drawing of the c-image C of W .

Motivated by Lemma 3, we consider a sub-family of moc-graphs where each cluster has an edge connecting it to some “ex-ternal vertices”, i.e. vertices that belong neither to the cluster it-self nor to the clusters that overlap with it. More formally, amoc-graph W = (G,H) is externally connected if for each pairV (μ), V (ν) of overlapping clusters with overlap V ′ there are twoedges (u1,v1),(u2,v2), called bridges, with u1 ∈ V (μ)−V ′, u2 ∈V (ν)−V ′ and v1,v2 �∈V (μ)∪V (ν). For example, Figure 3(a) is anexternally connected moc-graph. The proof of the following lemmarelies on the fact that in every planar embedding of an externallyconnected moc-graph the bridges force the external face of the sub-graph induced by each pair of clusters V (μ), V (ν) to have at leastone vertex of V (μ)−V ′ and one vertex of V (ν)−V ′ on its bound-ary.

Lemma 4 Let W = (G,H) be an externally connected moc-graphsuch that each overlap induces a connected subgraph of G. W isoc-planar if and only if its c-image is c-planar.

Sketch of proof. Let C be the c-image of W . If C is c-planar,let ψ be the planar embedding of G induced by a c-planar drawingΓ(C) of C. We show that ψ satisfies the conditions of Theorem 2.Let μ be a node of H and let v be a vertex of G−G(μ). If V (μ) isa non-overlapping cluster, μ is also a node of T in C and thus v isin the external face of G(μ). If otherwise V (μ) is an overlappingcluster, let V (ν) be the cluster that overlaps with V (μ) and let V ′be the overlap. If v �∈V (ν) then p(v) is outside the region of clusterV (μ)∪V (ν) in C and therefore v is in the external face of G(μ). Ifv ∈V (ν)−V ′, suppose that there existed an internal face f of G(μ)such that v is in f . Since W is externally connected, there exists anedge (u,w) such that u ∈V (ν)−V ′ and w �∈V (μ)∪V (ν). Observethat u is in the external face of G(μ) because ψ is a planar embed-ding of G. Since the boundary of the region of cluster V (ν)−V ′ isconnected in Γ(C) and this region contains both p(v) and p(u), itfollows that such region crosses an edge of f in Γ(C), contradictingthe c-planarity of the drawing.

If W is oc-planar, the c-planarity of C can be shown by a similarargument as the one in the proof of Lemma 2. Namely, let Γ(W ) be

an oc-planar drawing of W such that, for each pair of overlappingclusters V (μ),V (ν), the boundaries of the regions R(μ) and R(ν)intersect in two points p1 and p2. We construct a c-planar drawingΓ′(C) of C from Γ(W ) by redefining the regions of those clustersthat overlap, without changing the drawing of G. For every pairV (μ),V (ν) of overlapping clusters with overlap V ′, the procedureto define the regions of clusters V (μ)−V ′, V ′, V (ν)−V ′ in Γ′(C) isthe same as in the proof of Theorem 2. Consider the region R(μ)∪R(ν) in Γ(W ) and let Λ be its boundary. The boundary of the regionof V (μ)∪V (ν) is drawn in Γ′(C) as a simple closed curve thatfollows Λ, ε > 0 distance away (on the outside) from it. �

Combining Lemma 4 with the results in [2, 4, 5, 11, 12] the fol-lowing result can be proved.

Theorem 4 Let W = (G,H) be an externally connected moc-graphsuch that each overlap induces a connected subgraph of G. Forevery pair of overlapping clusters denote by V (μ) and V (ν) thetwo clusters that overlap and let V ′ be their overlap. Also, let n bethe number of vertices of G. The following statements hold:

(a) If each of the subsets V (μ)−V ′, V (ν)−V ′ induces a con-nected subgraph of G then W can be tested for oc-planarity inO(n) time.

(b) If at least one of subsets V (μ)−V ′, V (ν)−V ′ induces a con-nected subgraph of G then W can be tested for oc-planarity inO(n2) time.

(c) If every connected component of the subgraphs induced bythe subsets V (μ)−V ′, V (ν)−V ′ is connected to a vertex v �∈V (μ)∪V (ν) then W can be tested for oc-planarity in O(n3)time.

Sketch of proof. Let C be the c-image of W . For each pair ofoverlapping clusters V (μ),V (ν) of W , cluster V (μ)∪V (ν) of Cinduces a connected subgraph of G, because both V (μ) and V (ν)induce connected subgraphs of G and they share at least one vertex.Hence, if the hypothesis of Statement (a) applies, C is a c-connectedc-graph and it can be tested for c-planarity by using [4, 5] or [2].If the hypothesis of Statement (b) applies, then C is an almost c-connected c-graph [12]. Indeed, for each pair of overlapping clus-ters V (μi),V (νi) of W , at most one of the corresponding clusters ofC induces a disconnected subgraph of G, while its siblings and theirfather induce connected subgraphs of G. Thus C can be tested forc-planarity by using the O(n2) algorithm of Gutwenger et al. [12].Finally, if the hypothesis of Statement (c) holds, C belongs to theclass of the extrovert c-graphs, introduced by Goodrich et al. [11]and the O(n3) time c-planarity testing algorithm given by the sameauthors can be applied. The proof is concluded observing that Ccan be computed in O(n) time from W . �

4 FINAL REMARKS AND OPEN PROBLEMS

This paper has defined a new problem in the field of cluster pla-narity, i.e the overlapping cluster planarity testing problem. It hasstarted the investigation by analyzing the not obvious relation withclassical c-planarity testing; classes of oc-graphs have been de-scribed for which polynomial-time oc-planarity testing algorithmsexist.

Several questions are naturally raised by the research describedin this paper. Some of the most relevant in our opinion are listedbelow:

• It would be interesting to describe other meaningful familiesof oc-graphs for which the oc-planarity testing problem canbe performed in polynomial-time.

79

Page 8: [IEEE Asia-Pacific Symposium on Visualisation 2007 - Sydney, NSW (2007.02.5-2007.02.7)] 2007 6th International Asia-Pacific Symposium on Visualization - Overlapping cluster planarity

• It is well known that c-planar graphs can be tested for c-planarity in polynomial time if they are c-connected. Whatis the time complexity of testing a c-connected oc-graph foroc-planarity in the general case?

• A polynomial-time planarization algorithm is described in [6]for those c-graphs that are not c-planar. From the applicationside, it is important to investigate efficient planarization al-gorithms for oc-graphs that are not oc-planar or for which apolynomial-time planarity testing algorithm is not known.

ACKNOWLEDGEMENTS

We thank Emilio Di Giacomo for useful discussion.

REFERENCES

[1] S. Cornelsen and D. Wagner. Completely connected clustered graphs.In S. Verlag, editor, WG’03, volume 2880 of Lecture Notes in Com-puter Science, pages 168–179, 2003.

[2] P. F. Cortese, G. Di Battista, F. Frati, M. Patrignani, and M. Pizzonia.C-planarity of c-connected clustered graphs: Part II - testing and em-bedding algorithm. Technical Report 110, DIA, Universita degli StudiRoma Tre, 2006.

[3] P. F. Cortese, G. Di Battista, M. Patrignani, and M. Pizzonia. Cluster-ing cycles into cycles of clusters. Jour. Graph Alg. Appl., 9(3):391–413, 2005.

[4] E. Dahlhaus. A linear time algorithm to recognize clustered graphsand its parallelization. In S. Verlag, editor, LATIN’98, volume 1380 ofLecture Notes in Computer Science, pages 239–248, 1998.

[5] E. Dahlhaus, K. Klein, and P. Mutzel. Planarity testing for c-connectedclustered graphs. Technical Report SYS-1/06, LSXI, University ofDortmund, 2006.

[6] G. Di Battista, W. Didimo, and A. Marcandalli. Planarization of clus-tered graphs. In S. Verlag, editor, GD’01, volume 2265 of LectureNotes in Computer Science, pages 60–74, 2001.

[7] G. Di Battista, P. Eades, R. Tamassia, and I. G. Tollis. Graph Drawing.Prentice Hall, 1999.

[8] E. Di Giacomo, W. Didimo, L. Grilli, and G. Liotta. Graph visualiza-tion techniques for web clustering engines. IEEE Trans. on Vis. andComp. Graphics. to appear.

[9] E. Di Giacomo, W. Didimo, L. Grilli, and G. Liotta. A topology-driven approach to the design of web meta-search clustering engines.In S. Verlag, editor, SOFSEM’05, volume 3381 of Lecture Notes inComputer Science, pages 106–116, 2005.

[10] Q. Feng, R. Cohen, and P. Eades. Planarity for clustered graphs. InS. Verlag, editor, ESA’95, volume 979 of Lecture Notes in ComputerScience, pages 213–226, 1995.

[11] M. T. Goodrich, G. S. Lueker, and J. Z. Sun. C-planarity of extrovertclustered graphs. In S. Verlag, editor, GD’05, volume 3843 of LectureNotes in Computer Science, pages 211–222, 2005.

[12] C. Gutwenger, M. Junger, S. Leipert, P. Mutzel, M. Percan, andR. Weiskircher. Advances in c-planarity testing of clustered graphs. InS. Verlag, editor, GD’02, volume 2528 of Lecture Notes in ComputerScience, pages 220–235, 2002.

[13] F. Harary. Graph Theory. Addison-Wesley, 1972.[14] D. Harel. Statecharts: A visual formalism for complex systems. Sci-

ence of Computer Programming, 8:231–274, 1987.[15] A. Jain and R. Dubes. Algorithms for Clustering Data. Prentice Hall,

1988.[16] M. Junger and P. Mutzel. Ed., Graph Drawing Software. Springer-

Verlag, 2003.[17] M. Kaufmann and D. Wagner. Ed., Drawing Graphs, volume 2025 of

Lecture Notes in Computer Science. 2001.[18] P. Krishna, N. Vaidya, M. Chatterjee, and D. Pradhan. A cluster-based

approach for routing in dynamic networks. ACM SIGCOMM Com-puter Communication Review, pages 49–65, 1997.

[19] H. Omote and K. Sugiyama. Method for drawing intersecting clus-tered graphs and its application to web ontology language. InAPVIS’06, volume 60 of CRPIT, pages 89–92, 2006.

[20] F. P. Preparata and M. I. Shamos. Computational Geometry: An In-troduction. Springer, 1990.

[21] K. Sugiyama. Graph Drawing and Application for Software andKnowledge Engineers. World Scientific, 2001.

[22] K. Sugiyama and K. Misue. Visualization of structural information:Automatic drawing of compound digraphs. IEEE Trans. on Syst.,Man, and Cyb., 21(4):876–892, 1991.

80