how to layer a directed acyclic graph (gd 2001)

21
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

Upload: nikola-s-nikolov

Post on 15-Jul-2015

212 views

Category:

Science


4 download

TRANSCRIPT

Page 1: How to Layer a Directed Acyclic Graph (GD 2001)

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

Page 2: How to Layer a Directed Acyclic Graph (GD 2001)

Prolog

Page 3: How to Layer a Directed Acyclic Graph (GD 2001)

ContentsContents

Introduction Existing layering algorithms Combinatorial optimization approach to

the layering problem Experimental results Conclusions

Page 4: How to Layer a Directed Acyclic Graph (GD 2001)

Introduction

1. Compact final drawing2. Large edge spans should be avoided3. Bounded edge density between the

layers

Layering aesthetic criteria

Page 5: How to Layer a Directed Acyclic Graph (GD 2001)

The Layering Problem

Precedence Constrained Multiprocessor Scheduling Capacitated Graph Clustering Graph Colouring Clique Partition

TheoremWHS-Layering is NP-complete.

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

Page 6: How to Layer a Directed Acyclic Graph (GD 2001)

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

Page 7: How to Layer a Directed Acyclic Graph (GD 2001)

Longest Path Layering

Page 8: How to Layer a Directed Acyclic Graph (GD 2001)

Coffman-GrahamLayering (1972)

h ≤ 2(1-1/W)hmin

Page 9: How to Layer a Directed Acyclic Graph (GD 2001)

Gansner Layering (1993)

.),(,1)()(

,,1)(

,,)(

))()((min),(

Evuvyuy

Vuuy

Vuuy

vyuyEvu

∈∀≥−∈∀≥∈∀Ζ∈

−∑∈

ILP formulation

Page 10: How to Layer a Directed Acyclic Graph (GD 2001)

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:

Page 11: How to Layer a Directed Acyclic Graph (GD 2001)

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

Page 12: How to Layer a Directed Acyclic Graph (GD 2001)

Area (dummy nodes ignored)(dummy nodes included)

Node count

Are

a

Page 13: How to Layer a Directed Acyclic Graph (GD 2001)

Number of Dummy Nodes

Node count

Dum

my

node

s / R

eal n

odes

Page 14: How to Layer a Directed Acyclic Graph (GD 2001)

Layer Bloat

maximum and average

Page 15: How to Layer a Directed Acyclic Graph (GD 2001)

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

Page 16: How to Layer a Directed Acyclic Graph (GD 2001)

1

2

4

5

3

ILP Formulation ULair0

0

{ }5,4,3)0(

3)0(

5)0(

==ϕ=ρ

L

roof

floor

layer span

Page 17: How to Layer a Directed Acyclic Graph (GD 2001)

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

Page 18: How to Layer a Directed Acyclic Graph (GD 2001)

Experimental Results(ULair uses the dimensions of the solution of Gansner)

Page 19: How to Layer a Directed Acyclic Graph (GD 2001)

Experimental Results

ILOG CPLEX 7.0 on Intel Pentium III/Linux

(ULair run independently from Gansner)

Page 20: How to Layer a Directed Acyclic Graph (GD 2001)

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

Branch-and-cut under development

Page 21: How to Layer a Directed Acyclic Graph (GD 2001)

Graph Drawing Research Group, CSIS, UL

http://unix.csis.ul.ie/~grafdath