Compact Layered Drawings of General Directed
Graphs
Adalat Jabrayilov1 , Sven Mallach2 , Petra Mutzel1 , Ulf
Rüegg3 , and Reinhard von Hanxleden3
1 TU
Dortmund University, Germany
of Cologne, Germany
3 University of Kiel, Germany
2 University
24th International Symposium on
Graph Drawing & Network Visualization
19-21 September 2016
Adalat Jabrayilov 1/18
Compact Graph Layering for Digraphs
Classic Layering on A4
Compact Layered Drawings of General Directed Graphs
Compact Layering on A4
Adalat Jabrayilov 2/18
Layering for Digraphs: Notation
u
1
Regular Vertex
Forward Arc
Height
v
2
Dummy Vertex
Reverse Arc
w
3
Layers
Width
Adjacent vertices on different layers
total arc lengths = #arcs + #dummy vertices
Compact Layered Drawings of General Directed Graphs
Adalat Jabrayilov 3/18
Compact vs Classic Layering for Digraphs
Classic Layering [Sugiyama et. al, 1981]
Preprocessing: cycle breaking → DAG
minimize: number of reverse arcs Rev
Layering of the DAG
minimize: total arc lengths Len
Compact Layering
integrates cycle breaking & layering
Compact Layered Drawings of General Directed Graphs
Adalat Jabrayilov 4/18
Compact Layering Models for Digraphs
Generalised Layering (GLP) [Rüegg et. al, 2016]
minimize: weighted sum of Rev , Len for given Height H
Compact Generalised Layering (CGLP)[this talk]
GLP + Width (including dummy vertices)
minimize: weighted sum of Rev , Len, Width for given Height H
Min+Max Length Layering (MMLP)[this talk]
slight modification of CGLP
Compact Layered Drawings of General Directed Graphs
Adalat Jabrayilov 5/18
Compact Generalised Layering Problem (CGLP)
Classic
CGLP
Compact Layered Drawings of General Directed Graphs
MMLP
Adalat Jabrayilov 6/18
Mixed Integer Linear Program CGL
models CGLP as Partial Ordering Problem (POP)
Let `(v ) the position of vertex v in ordering
POP variables
a
2
b
c
Partial Ordering
for each pair u 6= v ∈ V : yu,v =
1
1
0
`(u) < `(v )
otherwise
for each pair u 6= v ∈ V : yu,v + yv ,u ≤ 1
Compact Layered Drawings of General Directed Graphs
Adalat Jabrayilov 7/18
Mixed Integer Linear Program CGL
u
1
Consider layers as help vertices {1, 2, · · · , H}
with `(k) = k for each k ∈ {1, 2, · · · , H}
2
H
v
w
Variables for
Layering: for each v ∈ V , k ∈ {1, 2, · · · , H}
POP variable yv ,k , yk,v
Reverse arcs: for each arc (u, v )
POP variable yu,v , yv ,u
POP Variables
1 `(u) < `(v )
yu,v =
0 otherwise
Dummy vertices: for each (u, v ) ∈ A, k ∈ {1, 2, · · · , H}
zuv ,k =
1
0
arc (u, v ) causes dummy on layer k
otherwise
Width:
W ∈R
Compact Layered Drawings of General Directed Graphs
Adalat Jabrayilov 8/18
Mixed Integer Linear Program CGL
u
1
H
X
min ωrev
X X
yv ,u + ωlen
(u,v )∈A
2
zuv ,k + ωwid W
v
(u,v )∈A k=1
s.t. yv ,1
=0
∀v ∈ V
H
yH,v
=0
∀v ∈ V
yk,v + yv ,k+1
=1
∀v ∈ V , 1 ≤ k ≤ H − 1
yk,v − yk+1,v
≥0
∀v ∈ V , 1 ≤ k ≤ H − 1
yu,v + yv ,u
=1
∀(u, v ) ∈ A
yv ,k + yk,u − yv ,u
≥0
∀(u, v ) ∈ A, 1 ≤ k ≤ H
yu,k + yk,v − yu,v
≥0
∀(u, v ) ∈ A, 1 ≤ k ≤ H
yk,u + yv ,k − zuv ,k
≤1
∀(u, v ) ∈ A, 1 ≤ k ≤ H
yk,v + yu,k − zuv ,k
≤1
∀(u, v ) ∈ A, 1 ≤ k ≤ H
≤W
1≤k≤H
X
X
v ∈V
(u,v )∈A
(1 − yv ,k − yk,v ) +
zuv ,k
w
y ∈ {0, 1}, z ∈ [0, 1], W ∈ R
Compact Layered Drawings of General Directed Graphs
Adalat Jabrayilov 9/18
Mixed Integer Linear Program EXT
extends DAG Layering Model [Healy and Nikolov, 2002]
models CGLP as Assignment Problem (AP)
uses so called assignment variables for layering of vertices
much slower than CGL
Compact Layered Drawings of General Directed Graphs
Adalat Jabrayilov 10/18
Min+Max Length Problem (MMLP)
Classic
CGLP
Compact Layered Drawings of General Directed Graphs
MMLP
Adalat Jabrayilov 11/18
Mixed Integer Linear Program MML
slight modification of CGL
without variables and constraints corresponding to dummies
MML objective vs CGL objective
CGL
min ωrev
X
yv ,u + ωlen
H
X X
zuv ,k + ωwid W
(u,v )∈A k=1
(u,v )∈A
MML
min ωrev
X
yv ,u + ωlen
(u,v )∈A
Compact Layered Drawings of General Directed Graphs
H
X X
(yk,v − yk,u ) + ωwid Wr
(u,v )∈A k=1
Adalat Jabrayilov 12/18
Evaluation
Used Hard/Software
System: Intel Core i7-4790, 3.6 GHz with 32 GB RAM, Linux
Solver: MIP Solver Gurobi 6.5
Number of used threads: 1
Parameters√
|V |
H = d 0.6 e
ωrev = |A| · H
ωlen = 1
ωwid = 1
Compact Layered Drawings of General Directed Graphs
Adalat Jabrayilov 13/18
Evaluation
Benchmark Sets:
ATTar: extraction of 146 acyclic AT&T graphs with
final drawings aspect ratio with classic layout:
final drawings Width
≤ 0.5
final drawings Height
Vertices: 20-99
Arcs: 20-168
|A|
On average: |V
| = 1.5
Random: 340 Random (non acyclic) directected graphs
Vertices: 17-100
Arcs: 30-158
|A|
On average: |V
| = 1.5
Compact Layered Drawings of General Directed Graphs
Adalat Jabrayilov 14/18
0.8
0.6
0.4
0.2
0.0
Final drawings aspect ratio
Classic vs CGLP vs MMLP (ATTar Graphs)
Classic
Compact Layered Drawings of General Directed Graphs
CGLP
MMLP
Adalat Jabrayilov 15/18
15
4
[90, 105)
[75, 90)
[45, 60)
[30, 45)
[15, 30)
[60, 75)
0 5
2
0
Time [s]
6
25
8
CGL vs MML (ATTar Graphs)
|V |
EXT: 29 timeouts (time limit 1h)
Compact Layered Drawings of General Directed Graphs
Adalat Jabrayilov 16/18
150
10
[90, 105)
[75, 90)
[45, 60)
[30, 45)
[15, 30)
[60, 75)
0 50
5
0
Time [s]
15
250
CGL vs MML (Random Graphs)
|V |
EXT: 143 timeouts (time limit 1h)
Compact Layered Drawings of General Directed Graphs
Adalat Jabrayilov 17/18
Conclusion
We introduced:
Two Compact Layout Problems: CGLP and MMLP
Two new ILP models based on POP variables: CGL and MML
Our experiments showed:
Both models can improve aspect ratio
Both ILP formulations can be solved for each ATTar instance
within 30 seconds.
Compact Layered Drawings of General Directed Graphs
Adalat Jabrayilov 18/18
© Copyright 2026 Paperzz