240 likes | 270 Views
Computing NodeTrix Representations of Clustered Graphs. Roma Tre University. Giordano Da Lozzo, Giuseppe Di Battista, Fabrizio Frati, Maurizio Patrignani. NodeTrix Hybrid Representations. NodeTrix combines node-link and matrix-based representations [Henry, Fekete, McGuffin, IEEE TVCG, 2007].
E N D
Computing NodeTrix Representations of Clustered Graphs Roma Tre University Giordano Da Lozzo, Giuseppe Di Battista, Fabrizio Frati, Maurizio Patrignani
NodeTrix Hybrid Representations • NodeTrix combines node-link and matrix-based representations • [Henry, Fekete, McGuffin, IEEE TVCG, 2007]
Crossings in NodeTrix Drawings • Demo available at • http://www.aviz.fr/Research/Nodetrix
NodeTrix Literature • In order to reduce crossings and improve readability • vertices may be allowed to have duplicates in different matrices • [Henry, Bezerianos, Fekete, IEEE TVCG, 2008] • clusters can be automatically computed so to have dense intra-cluster graphs and a planar inter-cluster graph • [Batagelj, Brandenburg, Didimo, Liotta, Palladino, Patrignani, IEEE TVCG 2011]
Flat Clustered Graphs • A flat clustered graph(V,E,C) is a graph (V,E) with a partition C of V into sets V1, …, Vk, called clusters • An edge (u,v)∈E with u∈Vi and v∈Vj is • an intra-clusteredgeif i=j • an inter-clusteredge if ij 12 1 11 2 10 13 3 9 intra-cluster edge 8 4 inter-cluster edge 6 5 7
NodeTrix Representations • In a NodeTrix representationof a flat clustered graph (V,E,C) • clusters V1, …, Vk are represented by non-overlapping symmetric adjacency matrices M1, …, Mk • matrices M1, …,Mk convey the information about the intra-cluster edges of (V,E,C) • each inter-cluster edge (u,v) with u∈Vi and v∈Vj is represented by a curve connecting a point on the border of Mi with a point on the border of Mj • such points belong to the column or to the row of Mi and Mj associated with u and v
NodeTrix Planarity • A NodeTrix representation is planar if • no inter-cluster edge e intersects any matrix Mi, except at an end-point of e • no pair of inter-cluster edges cross each other, except possibly at a common end-point
Complexity Results • Complexity of deciding planarity for NodeTrix representations
v1 M1 M2 v2 v3 M3 Fixed Order & Fixed Side Complexity • Theorem • NodeTrix Planarity with Fixed Order and Fixed Side can be solved in linear time • reducible to constrained planarity • solvable in linear time with known techniques • [Gutwenger, Klein, Mutzel, JGAA 2008]
Fixed Side Complexity • Theorem • NodeTrix Planarity with Fixed Side is NP-complete even for instances with two clusters • Proof • reduction from Betweenness • an instance is a collection of m ordered triplets of items {(a1,b1,c1), (a2,b2,c2),… , (am,bm,cm)} • the target is to find a total order of the n items in which, for each of the given triplets, the middle item in the triplet appears somewhere between the other two items
1 2 3 NodeTrix Planarity with Fixed Sides M2 M1
A More Practical Scenario • The user places the matrices • Inter-cluster edges have to be drawn in the convex hull of their incident matrices
Monotone NodeTrix Representations • A monotone NodeTrix representationis a NodeTrix representation in which • the matrices have prescribed positions • the inter-cluster edges are represented by xy-monotone curves inside the convex hull of their incident matrices • we require that this convex hull does not intersect any other matrix
Monotone Representations & Planarity • A monotone NodeTrix representation is locally planarif no pair of inter-cluster edges attached to the same matrix cross allowed crossing forbidden crossing forbidden crossing
Local Planarity Complexity Results • Complexity of deciding local planarity for monotone NodeTrix representations
Monotone Fixed Order & Fixed Side • Theorem • Monotone NodeTrix Local Planarity with Fixed Order and Fixed Side can be solved in polynomial time • Proof • first, we prove that the instance is locally planar if and only if it admits a locally planar straight-line drawing • second, we check such drawing for planarity
Monotone Fixed Order & Free Side • Theorem • Monotone NodeTrix Local Planarity with Fixed Order can be tested in |E|O(|C|2) time, where |C| is the number of clusters S-drawn edges • Proof • for each pair of adjacent clusters we guess one inter-cluster edge that could be S-drawn (if any) • we construct a boolean 2SAT formula to describe feasible choices for the sides
M1 M1 M2 M2 M1 M1 M2 M2 Intuition of the Proof • Let e be an S-drawn edge • Any other edge admits at most two alternative drawings e e e e
An (unfeasible) polynomial heuristics • For each pair of adjacent clusters guess one possible S-drawn edge • Construct one instance of 2SAT for each of the |E|O(|C|2) guesses • If one of the formulas admits a solution use it to draw the edges • Otherwise, search for a solution to a MAX2SAT instance with some heuristics • each false clause will correspond to a crossing
A more practical approach • Forbid S-drawn edges altogether • construct a single 2SAT formula that is satisfiable if and only if the edges can be drawn planarly • otherwise, search for a solution of MAX2SAT with a greedy approach • Demo available at: • http://www.dia.uniroma3.it/~dalozzo/projects/matrix
Open Problems • Monotone NodeTrix Planarity with Free Order and Free Side • the case of two clusters Equivalent to “Bipartite Book-Embedding with Spine Crossings” What complexity??
Open Problems • Monotone NodeTrix Planarity with Free Order and Free Side • the case of two clusters How could we model this problem?