Snapping Graph Drawings to the Grid Optimally Andre L offler, - - PowerPoint PPT Presentation

snapping graph drawings to the grid optimally
SMART_READER_LITE
LIVE PREVIEW

Snapping Graph Drawings to the Grid Optimally Andre L offler, - - PowerPoint PPT Presentation

Snapping Graph Drawings to the Grid Optimally Andre L offler, Thomas C. van Dijk, Alexander Wolff Chair for Computer Science I: Algorithms, Complexity and Knowledge-Based Systems University of W urzburg 19. September 2016 Andre L


slide-1
SLIDE 1

Snapping Graph Drawings to the Grid Optimally

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Chair for Computer Science I: Algorithms, Complexity and Knowledge-Based Systems University of W¨ urzburg

  • 19. September 2016

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-2
SLIDE 2

Introduction

Snap-rounding:

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-3
SLIDE 3

Introduction

Snap-rounding:

  • Used to overcome precision-related problems of computational

geometry.

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-4
SLIDE 4

Introduction

Snap-rounding:

  • Used to overcome precision-related problems of computational

geometry.

  • Conform to list of desired properties:
  • Fixed-precision representation (e.g. integer coordinates)
  • Geometric similarity (no large vertex movements)
  • Topological similarity (equivalence up to the collapsing of features)

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-5
SLIDE 5

Introduction

Snap-rounding:

  • Used to overcome precision-related problems of computational

geometry.

  • Conform to list of desired properties:
  • Fixed-precision representation (e.g. integer coordinates)
  • Geometric similarity (no large vertex movements)
  • Topological similarity (equivalence up to the collapsing of features)

Our question: What about topological equivalence?

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-6
SLIDE 6

Intuition

Snap-rounding: Topologically valid:

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-7
SLIDE 7

Intuition

Snap-rounding: Topologically valid:

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-8
SLIDE 8

Intuition

Snap-rounding: Topologically valid:

  • Snap-rounding already is topologically equivalent.

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-9
SLIDE 9

Intuition

Snap-rounding: Topologically valid:

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-10
SLIDE 10

Intuition

Snap-rounding: Topologically valid:

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-11
SLIDE 11

Intuition

Snap-rounding: Topologically valid:

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-12
SLIDE 12

Intuition

Snap-rounding: Topologically valid:

  • Snap-rounding alters incidences and forces edges to collapse.

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-13
SLIDE 13

Intuition

Snap-rounding: Topologically valid:

  • Snap-rounding alters incidences and forces edges to collapse.
  • Rounding to the nearest grid point changes the embedding of the

upper-left vertex.

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-14
SLIDE 14

Intuition

Snap-rounding: Topologically valid:

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-15
SLIDE 15

Intuition

Snap-rounding: Topologically valid:

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-16
SLIDE 16

Intuition

Snap-rounding: Topologically valid:

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-17
SLIDE 17

Intuition

Snap-rounding: Topologically valid:

  • Snap-rounding heavily modifies this graph.

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-18
SLIDE 18

Intuition

Snap-rounding: Topologically valid:

  • Snap-rounding heavily modifies this graph.
  • “Rounding” dense structures with no features collapsing is closely

related to creating minimum-area drawings.

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-19
SLIDE 19

Topologically Safe Snapping

  • We relax on geometric similarity and allow for larger vertex

movements.

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-20
SLIDE 20

Topologically Safe Snapping

  • We relax on geometric similarity and allow for larger vertex

movements.

  • We do not allow for features to collapse.

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-21
SLIDE 21

Topologically Safe Snapping

  • We relax on geometric similarity and allow for larger vertex

movements.

  • We do not allow for features to collapse.

Problem (Topologially Safe Snapping) Graph G = (V , E) with given embedding, bounding box B = [0, Xmax] × [0, Ymax]. Round G to integer coordinates within B, preserving the given embedding and minimizing total vertex movement.

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-22
SLIDE 22

Topologically Safe Snapping

  • We relax on geometric similarity and allow for larger vertex

movements.

  • We do not allow for features to collapse.

Problem (Topologially Safe Snapping) Graph G = (V , E) with given embedding, bounding box B = [0, Xmax] × [0, Ymax]. Round G to integer coordinates within B, preserving the given embedding and minimizing total vertex movement.

  • Movement is measured in Manhattan-distance.

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-23
SLIDE 23

Our Contribution

  • NP-hardness proof for Topologially Safe Snapping.

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-24
SLIDE 24

Our Contribution

  • NP-hardness proof for Topologially Safe Snapping.
  • Integer Linear Program (ideas only)

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-25
SLIDE 25

Our Contribution

  • NP-hardness proof for Topologially Safe Snapping.
  • Integer Linear Program (ideas only)
  • Experimental Evaluation

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-26
SLIDE 26

The NP-hardness proof

slide-27
SLIDE 27

NP-Hardness

  • We reduce from Planar Monotone 3SAT.

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-28
SLIDE 28

NP-Hardness

  • We reduce from Planar Monotone 3SAT.
  • For reduction, consider a decision variant:

Problem (Cost-bound Topologially Safe Snapping) Graph G = (V , E) with given embedding, bounding box B = [0, Xmax] × [0, Ymax], cost-bound cmin ∈ R+. Can G be rounded to integer coordinates within B, preserving the given embedding with total movement of cmin?

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-29
SLIDE 29

PM3SAT-formula

(X ∨ Z) (X ∨ Y ) X Y Z (X ∨ Y ∨ Z)

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-30
SLIDE 30

PM3SAT-formula

(X ∨ Z) (X ∨ Y ) X Y Z (X ∨ Y ∨ Z)

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-31
SLIDE 31

Our Construction

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-32
SLIDE 32

Our Construction

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-33
SLIDE 33

Our Construction

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-34
SLIDE 34

Our Construction

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-35
SLIDE 35

Tunnels & Pushes

  • For a PM3SAT-formula F, our construction resembles its graph.

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-36
SLIDE 36

Tunnels & Pushes

  • For a PM3SAT-formula F, our construction resembles its graph.
  • White vertices always cost at least 1 to be rounded.
  • If F is satisfiable, no black vertex needs to be moved.

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-37
SLIDE 37

Tunnels & Pushes

  • For a PM3SAT-formula F, our construction resembles its graph.
  • White vertices always cost at least 1 to be rounded.
  • If F is satisfiable, no black vertex needs to be moved.
  • Edges form tunnels

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-38
SLIDE 38

Tunnels & Pushes

  • For a PM3SAT-formula F, our construction resembles its graph.
  • White vertices always cost at least 1 to be rounded.
  • If F is satisfiable, no black vertex needs to be moved.
  • Edges form tunnels

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-39
SLIDE 39

Tunnels & Pushes

  • For a PM3SAT-formula F, our construction resembles its graph.
  • White vertices always cost at least 1 to be rounded.
  • If F is satisfiable, no black vertex needs to be moved.
  • Edges form tunnels that transmit pushes.

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-40
SLIDE 40

Tunnels & Pushes

  • For a PM3SAT-formula F, our construction resembles its graph.
  • White vertices always cost at least 1 to be rounded.
  • If F is satisfiable, no black vertex needs to be moved.
  • Edges form tunnels that transmit pushes.

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-41
SLIDE 41

Tunnels & Pushes

  • For a PM3SAT-formula F, our construction resembles its graph.
  • White vertices always cost at least 1 to be rounded.
  • If F is satisfiable, no black vertex needs to be moved.
  • Edges form tunnels that transmit pushes.
  • Topological safety ensures consistency of transmission.

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-42
SLIDE 42

Clauses

  • At the center, there is a decider vertex

with (up to) three possibible target grid points.

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-43
SLIDE 43

Clauses

  • At the center, there is a decider vertex

with (up to) three possibible target grid points.

  • Following one arrow, rounding

generates pushes.

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-44
SLIDE 44

Clauses

  • At the center, there is a decider vertex

with (up to) three possibible target grid points.

  • Following one arrow, rounding

generates pushes.

  • Blocking the bottom tunnel gives

clause-gadgets for two variables.

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-45
SLIDE 45

Clauses

  • At the center, there is a decider vertex

with (up to) three possibible target grid points.

  • Following one arrow, rounding

generates pushes.

  • Blocking the bottom tunnel gives

clause-gadgets for two variables.

  • All-unnegated gadgets are constructed

mirroring at a horizontal line.

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-46
SLIDE 46

Variables

  • Has tunnel connections for negated

and unnegated occurances.

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-47
SLIDE 47

Variables

  • Has tunnel connections for negated

and unnegated occurances.

  • Grows horizontally with number of
  • ccurances.

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-48
SLIDE 48

Variables

  • Has tunnel connections for negated

and unnegated occurances.

  • Grows horizontally with number of
  • ccurances.
  • At the left wall, there is an assignment

vertex.

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-49
SLIDE 49

Variables

  • Has tunnel connections for negated

and unnegated occurances.

  • Grows horizontally with number of
  • ccurances.
  • At the left wall, there is an assignment

vertex.

  • Following one arrow blocks tunnels on

this side and creates pushes.

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-50
SLIDE 50

Variables

  • Has tunnel connections for negated

and unnegated occurances.

  • Grows horizontally with number of
  • ccurances.
  • At the left wall, there is an assignment

vertex.

  • Following one arrow blocks tunnels on

this side and creates pushes.

  • Moving the assignment vertex up

equals a true-assignment, false

  • therwise.

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-51
SLIDE 51

Hardness Proof

Theorem Cost-bound Topologially Safe Snapping is NP-complete. Sketch of proof:

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-52
SLIDE 52

Hardness Proof

Theorem Cost-bound Topologially Safe Snapping is NP-complete. Sketch of proof:

  • Combine gadgets according to formula-graphs structure.

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-53
SLIDE 53

Hardness Proof

Theorem Cost-bound Topologially Safe Snapping is NP-complete. Sketch of proof:

  • Combine gadgets according to formula-graphs structure.
  • Cost-bound cmin equals number of white vertices.

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-54
SLIDE 54

Hardness Proof

Theorem Cost-bound Topologially Safe Snapping is NP-complete. Sketch of proof:

  • Combine gadgets according to formula-graphs structure.
  • Cost-bound cmin equals number of white vertices.
  • If total movement cost equals cmin, truth-assignment is obtained

from assignment vertices.

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-55
SLIDE 55

Hardness Proof

Theorem Cost-bound Topologially Safe Snapping is NP-complete. Sketch of proof:

  • Combine gadgets according to formula-graphs structure.
  • Cost-bound cmin equals number of white vertices.
  • If total movement cost equals cmin, truth-assignment is obtained

from assignment vertices.

  • If the formula is unsatisfiable, at least one black vertex has to be

moved ⇒ cmin is exceeded.

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-56
SLIDE 56

Other results

Corollary Topologially Safe Snapping is also NP-hard when using Euclidean distance.

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-57
SLIDE 57

Other results

Corollary Topologially Safe Snapping is also NP-hard when using Euclidean distance. In this case it is also NP-hard to minimize the maximum movement instead of the sum.

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-58
SLIDE 58

Other results

Corollary Topologially Safe Snapping is also NP-hard when using Euclidean distance. In this case it is also NP-hard to minimize the maximum movement instead of the sum. Corollary Euclidean Topologially Safe Snapping with the objective to minimize maximum movement is A PX-hard.

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-59
SLIDE 59

Integer Linear Program

slide-60
SLIDE 60

Overview

Things to handle:

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-61
SLIDE 61

Overview

Things to handle:

  • Unique vertex coordinates

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-62
SLIDE 62

Overview

Things to handle:

  • Unique vertex coordinates (very simple)

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-63
SLIDE 63

Overview

Things to handle:

  • Unique vertex coordinates (very simple)
  • Planarity

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-64
SLIDE 64

Overview

Things to handle:

  • Unique vertex coordinates (very simple)
  • Planarity
  • Embeddings

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-65
SLIDE 65

Overview

Things to handle:

  • Unique vertex coordinates (very simple)
  • Planarity
  • Embeddings

Basics:

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-66
SLIDE 66

Overview

Things to handle:

  • Unique vertex coordinates (very simple)
  • Planarity
  • Embeddings

Basics:

  • xv, yv are output coordinates.

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-67
SLIDE 67

Overview

Things to handle:

  • Unique vertex coordinates (very simple)
  • Planarity
  • Embeddings

Basics:

  • xv, yv are output coordinates.
  • Objective function:

Minimize

  • v∈V

(|xv − Xv| + |yv − Yv|)

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-68
SLIDE 68

Overview

Things to handle:

  • Unique vertex coordinates (very simple)
  • Planarity
  • Embeddings

Basics:

  • xv, yv are output coordinates.
  • Objective function:

Minimize

  • v∈V

(|xv − Xv| + |yv − Yv|)

  • Constraint: distinct vertex coordinates.

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-69
SLIDE 69

Planarity

  • Similar to Metro-Map Drawing by N¨
  • llenburg & Wolff. [GD ’05]

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-70
SLIDE 70

Planarity

  • Similar to Metro-Map Drawing by N¨
  • llenburg & Wolff. [GD ’05]
  • Idea: every edge has some Dmin-neighborhood that only incident

edges are allowed to intersect. Octilinear, Dmin = 0.5

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-71
SLIDE 71

Planarity

  • Similar to Metro-Map Drawing by N¨
  • llenburg & Wolff. [GD ’05]
  • Idea: every edge has some Dmin-neighborhood that only incident

edges are allowed to intersect. Octilinear, Dmin = 0.5

  • We consider any possible direction (not only octilinear ones).

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-72
SLIDE 72

Planarity

  • Similar to Metro-Map Drawing by N¨
  • llenburg & Wolff. [GD ’05]
  • Idea: every edge has some Dmin-neighborhood that only incident

edges are allowed to intersect. Octilinear, Dmin = 0.5

  • We consider any possible direction (not only octilinear ones).
  • According to bounding box size:

Dmin = 1 max{Xmax, Ymax} + 1

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-73
SLIDE 73

Directions

  • Generated using the Farey sequence:

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-74
SLIDE 74

Directions

  • Generated using the Farey sequence:

1 1 0/1 1/3 1/2 2/3 1/1

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-75
SLIDE 75

Directions

  • Generated using the Farey sequence:

1 1 0/1 1/3 1/2 2/3 1/1

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-76
SLIDE 76

Directions

  • Generated using the Farey sequence:

1 1 0/1 1/3 1/2 2/3 1/1

  • Inside [−k, k] × [−k, k] area, there are Θ(k2) directions to consider.

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-77
SLIDE 77

Directions

  • Generated using the Farey sequence:

1 1 0/1 1/3 1/2 2/3 1/1

  • Inside [−k, k] × [−k, k] area, there are Θ(k2) directions to consider.
  • Consider them to be ordered counter-clockwise.

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-78
SLIDE 78

Embeddings

  • Circular order of neighbors arround any vertex must not change.

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-79
SLIDE 79

Embeddings

  • Circular order of neighbors arround any vertex must not change.
  • Idea: for every vertex-neighbor pair, detect direction of that edge.

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-80
SLIDE 80

Embeddings

  • Circular order of neighbors arround any vertex must not change.
  • Idea: for every vertex-neighbor pair, detect direction of that edge.
  • Compare direction slopes to edge slope.

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-81
SLIDE 81

Embeddings

  • Circular order of neighbors arround any vertex must not change.
  • Idea: for every vertex-neighbor pair, detect direction of that edge.
  • Compare direction slopes to edge slope.

v1 v2 vD

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-82
SLIDE 82

Embeddings

  • Circular order of neighbors arround any vertex must not change.
  • Idea: for every vertex-neighbor pair, detect direction of that edge.
  • Compare direction slopes to edge slope.

v1 v2 vD

  • Map edges to directions

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-83
SLIDE 83

Embeddings

  • Circular order of neighbors arround any vertex must not change.
  • Idea: for every vertex-neighbor pair, detect direction of that edge.
  • Compare direction slopes to edge slope.

v1 v2 vD

  • Map edges to directions and compare the ordering of those

directions to the given embedding.

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-84
SLIDE 84

Integer Linear Program

Theorem This ILP solves Topologially Safe Snapping.

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-85
SLIDE 85

Integer Linear Program

Theorem This ILP solves Topologially Safe Snapping.

  • In practice, our model easily becomes too large to solve (in

reasonable time).

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-86
SLIDE 86

Integer Linear Program

Theorem This ILP solves Topologially Safe Snapping.

  • In practice, our model easily becomes too large to solve (in

reasonable time).

  • We use delayed constraint generation to iteratively improve our

model.

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-87
SLIDE 87

Integer Linear Program

Theorem This ILP solves Topologially Safe Snapping.

  • In practice, our model easily becomes too large to solve (in

reasonable time).

  • We use delayed constraint generation to iteratively improve our

model.

  • We generate most constraints on demand:

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-88
SLIDE 88

Integer Linear Program

Theorem This ILP solves Topologially Safe Snapping.

  • In practice, our model easily becomes too large to solve (in

reasonable time).

  • We use delayed constraint generation to iteratively improve our

model.

  • We generate most constraints on demand: first iteration is simple

rounding (with unique coordinates).

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-89
SLIDE 89

Experimental Evaluation

slide-90
SLIDE 90

The Setup

  • Using the JAVA bindings for IBM CPLEX.

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-91
SLIDE 91

The Setup

  • Using the JAVA bindings for IBM CPLEX.
  • Test system: Linux server with 16 cores (2666 MHz, 4 MB cache),

16 GB main memory.

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-92
SLIDE 92

The Setup

  • Using the JAVA bindings for IBM CPLEX.
  • Test system: Linux server with 16 cores (2666 MHz, 4 MB cache),

16 GB main memory.

  • Numbers of rows & columns before CPLEX presolving.

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-93
SLIDE 93

The Setup

  • Using the JAVA bindings for IBM CPLEX.
  • Test system: Linux server with 16 cores (2666 MHz, 4 MB cache),

16 GB main memory.

  • Numbers of rows & columns before CPLEX presolving.
  • Runtime in wall-clock time.

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-94
SLIDE 94

The Setup

  • Using the JAVA bindings for IBM CPLEX.
  • Test system: Linux server with 16 cores (2666 MHz, 4 MB cache),

16 GB main memory.

  • Numbers of rows & columns before CPLEX presolving.
  • Runtime in wall-clock time.
  • For delayed constraint generation, time is accumulated total.

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-95
SLIDE 95

The Good

Full Delayed rows cols time

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-96
SLIDE 96

The Good

Full Delayed rows cols time

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-97
SLIDE 97

The Good

  • Even small examples take several

seconds to solve. Full Delayed rows 42 699 cols 11 300 time 10.6 s

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-98
SLIDE 98

The Good

  • Even small examples take several

seconds to solve.

  • This is a very simple example!

Full Delayed rows 42 699 cols 11 300 time 10.6 s

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-99
SLIDE 99

The Good

  • Even small examples take several

seconds to solve.

  • This is a very simple example!
  • Delayed constraint generation gives

speed-up. Full Delayed rows 42 699 88 cols 11 300 110 time 10.6 s 0.5 s

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-100
SLIDE 100

The Bad

Full Delayed rows cols time

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-101
SLIDE 101

The Bad

Full Delayed rows cols time

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-102
SLIDE 102

The Bad

  • We have canceled this computation

after 10 minutes using the full model. Full Delayed rows 323 441 cols 82 816 time †

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-103
SLIDE 103

The Bad

  • We have canceled this computation

after 10 minutes using the full model.

  • Delayed constraint generation did

cut a lot of “trivial” constraints, but... Full Delayed rows 323 441 15 161 cols 82 816 4 044 time †

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-104
SLIDE 104

The Bad

  • We have canceled this computation

after 10 minutes using the full model.

  • Delayed constraint generation did

cut a lot of “trivial” constraints, but...

  • ...waiting more than 3 minutes is

too long for a graph on 20 vertices! Full Delayed rows 323 441 15 161 cols 82 816 4 044 time † 211.6 s

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-105
SLIDE 105

The Ugly

Full Delayed rows cols time

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-106
SLIDE 106

The Ugly

Full Delayed rows cols time

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-107
SLIDE 107

The Ugly

  • Graph and bounding box are small,

thus the model is small. Full Delayed rows 2 603 cols 916 time 4.8 s

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-108
SLIDE 108

The Ugly

  • Graph and bounding box are small,

thus the model is small.

  • Using delayed constraint generation

did worsen runtime. Full Delayed rows 2 603 2 271 cols 916 816 time 4.8 s 20.2 s

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-109
SLIDE 109

The Ugly

  • Graph and bounding box are small,

thus the model is small.

  • Using delayed constraint generation

did worsen runtime.

  • Rounding this graph is very similar

to finding a minimum-area drawing Full Delayed rows 2 603 2 271 cols 916 816 time 4.8 s 20.2 s

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-110
SLIDE 110

The Ugly

  • Graph and bounding box are small,

thus the model is small.

  • Using delayed constraint generation

did worsen runtime.

  • Rounding this graph is very similar

to finding a minimum-area drawing, which is also NP-hard. Full Delayed rows 2 603 2 271 cols 916 816 time 4.8 s 20.2 s

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-111
SLIDE 111

Conclusion

What we did:

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-112
SLIDE 112

Conclusion

What we did:

  • We introduce the problem Topologially Safe Snapping

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-113
SLIDE 113

Conclusion

What we did:

  • We introduce the problem Topologially Safe Snapping
  • and provide a proof that it is NP-hard.

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-114
SLIDE 114

Conclusion

What we did:

  • We introduce the problem Topologially Safe Snapping
  • and provide a proof that it is NP-hard.
  • We give an integer linear program to solve it,

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-115
SLIDE 115

Conclusion

What we did:

  • We introduce the problem Topologially Safe Snapping
  • and provide a proof that it is NP-hard.
  • We give an integer linear program to solve it,
  • that can be modified to find minimum-area drawings of graphs as

well.

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-116
SLIDE 116

Conclusion

What we did:

  • We introduce the problem Topologially Safe Snapping
  • and provide a proof that it is NP-hard.
  • We give an integer linear program to solve it,
  • that can be modified to find minimum-area drawings of graphs as

well. Open problems:

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-117
SLIDE 117

Conclusion

What we did:

  • We introduce the problem Topologially Safe Snapping
  • and provide a proof that it is NP-hard.
  • We give an integer linear program to solve it,
  • that can be modified to find minimum-area drawings of graphs as

well. Open problems:

  • Find better formulations for the constraints ⇒ speed-up ILP.

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-118
SLIDE 118

Conclusion

What we did:

  • We introduce the problem Topologially Safe Snapping
  • and provide a proof that it is NP-hard.
  • We give an integer linear program to solve it,
  • that can be modified to find minimum-area drawings of graphs as

well. Open problems:

  • Find better formulations for the constraints ⇒ speed-up ILP.
  • Find some heuristic algorithm.

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally

slide-119
SLIDE 119

Conclusion

What we did:

  • We introduce the problem Topologially Safe Snapping
  • and provide a proof that it is NP-hard.
  • We give an integer linear program to solve it,
  • that can be modified to find minimum-area drawings of graphs as

well. Open problems:

  • Find better formulations for the constraints ⇒ speed-up ILP.
  • Find some heuristic algorithm.
  • Questions about approximability remain open.

Andre L¨

  • ffler, Thomas C. van Dijk, Alexander Wolff

Snapping Graph Drawings to the Grid Optimally