How to Layer a Directed How to Layer a Directed Acyclic Graph Acyclic Graph Patrick Healy Nikola S. Nikolov 24 September 2001 Graph Drawing Research Group Department of Computer Science and Information Systems University of Limerick, Ireland Graph Drawing 2001
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
How to Layer a Directed How to Layer a Directed Acyclic GraphAcyclic Graph
Patrick HealyNikola S. Nikolov
24 September 2001
Graph Drawing Research GroupDepartment of Computer Science and Information Systems
University of Limerick, Ireland
Graph Drawing 2001
Prolog
ContentsContents
Introduction Existing layering algorithms Combinatorial optimization approach to
the layering problem Experimental results Conclusions
Introduction
1. Compact final drawing2. Large edge spans should be avoided3. Bounded edge density between the
WHS-LayeringInstance: G is a DAG, H > 0, W > 0.Problem: Find a layering of G with height at most H, width at most W and minimum total sum of edge spans.
Related NP-complete problems
Existing Layering Algorithms
Longest Path Coffman-Graham Gansner et al.
Grafo1012 (Di Battista et al., Computational Geometry: Theory and Applications, (7), 1997)
All polynomial time
Longest Path Layering
Coffman-GrahamLayering (1972)
h ≤ 2(1-1/W)hmin
Gansner Layering (1993)
.),(,1)()(
,,1)(
,,)(
))()((min),(
Evuvyuy
Vuuy
Vuuy
vyuyEvu
∈∀≥−∈∀≥∈∀Ζ∈
−∑∈
ILP formulation
How do Dummy Nodes Contribute to Graph Width?
Dummy nodes are negligibly small All the dummy nodes have unit width Each dummy node has the width of the
edge it is placed on
The exact contribution of the dummy nodes depends on the final positioning of nodes and edges (last phase of the Sugiyama algorithm)
Alternative strategies:
Area ( W × H ) ignoring/including dummy nodes
Number of dummy nodes Layer bloat (the maximum and
the average number of dummy nodes in a layer)
Edge density between adjacent layers
Experimental Comparison of the Three Algorithms
5911 Experimental DAGs
Area (dummy nodes ignored)(dummy nodes included)
Node count
Are
a
Number of Dummy Nodes
Node count
Dum
my
node
s / R
eal n
odes
Layer Bloat
maximum and average
Combinatorial OptimizationApproach to Graph Layering
Find a layering of a DAG G with minimum total sum of edge spans
Minimisation of a linear objective function
Among all the possible layerings of G on at most H layers with width at most W.
Set of linear inequalities (set of constraints)
Integer Linear Programming (ILP) Model
Combinatorial Optimisation Model
1
2
4
5
3
ILP Formulation ULair0
0
{ }5,4,3)0(
3)0(
5)0(
==ϕ=ρ
L
roof
floor
layer span
ILP Formulation ULair (more)
xvk is 1 if node v is placed on layer k, and 0 otherwise
1)(
)(
≤∑ρ
ϕ=
v
vkvkx
Assignment Constraints
)()(,),(,0)(
1
)(
vkuEvuu
kiui
v
kivi xx ρ≤≤ϕ∈≤− ∑∑
ρ
+=
ρ
=
Direction Constraints
WxxwxwkVv Evu
kluLl
klvLl
vlulevkv ≤
−+∑ ∑ ∑ ∑
∈ ∈>∈
≥∈)( ),( )( )(
Capacity Constraints
1 ≤ k ≤ H, V(k) is the set of all the nodes placed on layer k
Experimental Results(ULair uses the dimensions of the solution of Gansner)
Experimental Results
ILOG CPLEX 7.0 on Intel Pentium III/Linux
(ULair run independently from Gansner)
Conclusions
We have identified several types of linear inequalities describing the Graph Layering Polytope identified
Facet-defining properties of four of them proved
Branch-and-bound algorithm for solving the Graph Layering Problem implemented based on LEDA and CPLEX