Maximizing Ink in Partial Edge Drawings of k -plane Graphs Matthias - - PowerPoint PPT Presentation

maximizing ink in partial edge drawings of k plane graphs
SMART_READER_LITE
LIVE PREVIEW

Maximizing Ink in Partial Edge Drawings of k -plane Graphs Matthias - - PowerPoint PPT Presentation

Maximizing Ink in Partial Edge Drawings of k -plane Graphs Matthias Hummel, Fabian Klute, Soeren Nickel, Martin N ollenburg GD 2019 September 19, 2019 Partial Edge Drawings (PED) How to draw non-planar graphs? Just hide the edge crossings!


slide-1
SLIDE 1

GD 2019 · September 19, 2019

Maximizing Ink in Partial Edge Drawings

  • f k-plane Graphs

Matthias Hummel, Fabian Klute, Soeren Nickel, Martin N¨

  • llenburg
slide-2
SLIDE 2
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

Partial Edge Drawings (PED)

Input: Straight-line graph drawing with crossings Output: “Crossing-free” partial edge drawing (PED) How to draw non-planar graphs? Just hide the edge crossings!

[Becker et al. TVCG’95], [Bruckdorfer, Kaufmann FUN’12]

1

slide-3
SLIDE 3
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

Partial Edge Drawings (PED)

Input: Straight-line graph drawing with crossings Output: “Crossing-free” partial edge drawing (PED) How to draw non-planar graphs? Just hide the edge crossings! Properties: edges are drawn partially with middle part removed pairs of opposing stubs relies on closure and continuation principles in Gestalt theory user studies confirmed that PEDs reduce clutter and remain readable for long enough stubs

[Bruckdorfer et al. GD’15], [Burch et al. GD’11] [Becker et al. TVCG’95], [Bruckdorfer, Kaufmann FUN’12]

1

slide-4
SLIDE 4
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

Symmetric Partial Edge Drawings (SPED)

PED symmetric PED (SPED) Input drawing

2

slide-5
SLIDE 5
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

Symmetric Partial Edge Drawings (SPED)

PED symmetric PED (SPED)

SPED: both stubs of an edge have the same length identical stub lengths can facilitate finding adjacencies

Input drawing

2

slide-6
SLIDE 6
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

Symmetric Partial Edge Drawings (SPED)

PED symmetric PED (SPED)

SPED: both stubs of an edge have the same length identical stub lengths can facilitate finding adjacencies

Input drawing

Optimization problem: maximize total stub length/drawn ink → MaxPED and MaxSPED show as much information as possible without crossings

2

slide-7
SLIDE 7
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

Overview of Results

Given: k-plane⋆ straight-line drawing Γ Find: maximum-ink (S)PED of Γ

3

slide-8
SLIDE 8
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

Overview of Results

⋆: k-plane drawing: every edge crossed by at most k other edges ex: k = 2

Given: k-plane⋆ straight-line drawing Γ Find: maximum-ink (S)PED of Γ

3

slide-9
SLIDE 9
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

Overview of Results

⋆: k-plane drawing: every edge crossed by at most k other edges ex: k = 2

Given: k-plane⋆ straight-line drawing Γ Find: maximum-ink (S)PED of Γ

k = 2 k = 3 k ≥ 4 arbitrary k MaxPED MaxSPED NP-hard O(n log n)

[Bruckdorfer et al. JGAA’17] [Bruckdorfer PhD’15]

3

slide-10
SLIDE 10
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

Overview of Results

⋆: k-plane drawing: every edge crossed by at most k other edges ex: k = 2

Given: k-plane⋆ straight-line drawing Γ Find: maximum-ink (S)PED of Γ

k = 2 k = 3 k ≥ 4 arbitrary k MaxPED MaxSPED NP-hard O(n log n)

[Bruckdorfer et al. JGAA’17] [Bruckdorfer PhD’15]

NP-hard NP-hard

3

slide-11
SLIDE 11
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

Overview of Results

⋆: k-plane drawing: every edge crossed by at most k other edges ex: k = 2

Given: k-plane⋆ straight-line drawing Γ Find: maximum-ink (S)PED of Γ

k = 2 k = 3 k ≥ 4 arbitrary k MaxPED MaxSPED NP-hard O(n log n)

[Bruckdorfer et al. JGAA’17] [Bruckdorfer PhD’15]

NP-hard NP-hard Dynamic Programming if edge intersection graph is a tree, or more generally has bounded treewidth

3

slide-12
SLIDE 12
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

NP-Hardness

4

slide-13
SLIDE 13
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

NP-Hardness of MaxSPED

reduction from Planar 3SAT gadget-based reduction

planar 3SAT formula

x2 ∨ x3 ∨ x4 x1 ∨ x3 ∨ x4 x1 ∨ x4 ∨ x5 x1 ∨ x2 ∨ x3

x4 x5 x1 x2 x3

5

slide-14
SLIDE 14
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

NP-Hardness of MaxSPED

reduction from Planar 3SAT gadget-based reduction

variable gadgets: 2 optimal states planar 3SAT formula

x2 ∨ x3 ∨ x4 x1 ∨ x3 ∨ x4 x1 ∨ x4 ∨ x5 x1 ∨ x2 ∨ x3

x4 x5 x1 x2 x3

x2 = false x1 = true x3 = false

5

slide-15
SLIDE 15
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

NP-Hardness of MaxSPED

x1 = false

reduction from Planar 3SAT gadget-based reduction

variable gadgets: 2 optimal states planar 3SAT formula

x2 ∨ x3 ∨ x4 x1 ∨ x3 ∨ x4 x1 ∨ x4 ∨ x5 x1 ∨ x2 ∨ x3

x4 x5 x1 x2 x3

x2 = false x3 = false

5

slide-16
SLIDE 16
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

NP-Hardness of MaxSPED

x2 = true x1 = false

reduction from Planar 3SAT gadget-based reduction

variable gadgets: 2 optimal states planar 3SAT formula

x2 ∨ x3 ∨ x4 x1 ∨ x3 ∨ x4 x1 ∨ x4 ∨ x5 x1 ∨ x2 ∨ x3

x4 x5 x1 x2 x3

x3 = false

5

slide-17
SLIDE 17
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

NP-Hardness of MaxSPED

x2 = true x1 = false

reduction from Planar 3SAT gadget-based reduction

variable gadgets: 2 optimal states planar 3SAT formula

x2 ∨ x3 ∨ x4 x1 ∨ x3 ∨ x4 x1 ∨ x4 ∨ x5 x1 ∨ x2 ∨ x3

x4 x5 x1 x2 x3

x3 = true

5

slide-18
SLIDE 18
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

NP-Hardness of MaxSPED

reduction from Planar 3SAT gadget-based reduction

variable gadgets: 2 optimal states planar 3SAT formula

x2 ∨ x3 ∨ x4 x1 ∨ x3 ∨ x4 x1 ∨ x4 ∨ x5 x1 ∨ x2 ∨ x3

x4 x5 x1 x2 x3

x2 = false x1 = true x3 = false

5

slide-19
SLIDE 19
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

NP-Hardness of MaxSPED

reduction from Planar 3SAT gadget-based reduction

clause gadgets: 3 optimal states variable gadgets: 2 optimal states planar 3SAT formula

x2 ∨ x3 ∨ x4 x1 ∨ x3 ∨ x4 x1 ∨ x4 ∨ x5 x1 ∨ x2 ∨ x3

x4 x5 x1 x2 x3

x2 = false x1 = true x3 = false

5

slide-20
SLIDE 20
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

NP-Hardness of MaxSPED

reduction from Planar 3SAT gadget-based reduction

clause gadgets: 3 optimal states variable gadgets: 2 optimal states planar 3SAT formula

x2 ∨ x3 ∨ x4 x1 ∨ x3 ∨ x4 x1 ∨ x4 ∨ x5 x1 ∨ x2 ∨ x3

x4 x5 x1 x2 x3

x2 = false x1 = true x3 = false

5

slide-21
SLIDE 21
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

NP-Hardness of MaxSPED

reduction from Planar 3SAT gadget-based reduction

clause gadgets: 3 optimal states variable gadgets: 2 optimal states planar 3SAT formula

x2 ∨ x3 ∨ x4 x1 ∨ x3 ∨ x4 x1 ∨ x4 ∨ x5 x1 ∨ x2 ∨ x3

x4 x5 x1 x2 x3

x2 = false x1 = true x3 = false

5

slide-22
SLIDE 22
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

NP-Hardness of MaxSPED

reduction from Planar 3SAT gadget-based reduction

clause gadgets: 3 optimal states variable gadgets: 2 optimal states planar 3SAT formula

x2 ∨ x3 ∨ x4 x1 ∨ x3 ∨ x4 x1 ∨ x4 ∨ x5 x1 ∨ x2 ∨ x3

x4 x5 literal wires: even length paths, 2 opt. states x1 x2 x3

x2 = false x1 = true x3 = false

x1 ∨ x2 ∨ x3

5

slide-23
SLIDE 23
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

NP-Hardness of MaxSPED

x1 = false

reduction from Planar 3SAT gadget-based reduction

clause gadgets: 3 optimal states variable gadgets: 2 optimal states planar 3SAT formula

x2 ∨ x3 ∨ x4 x1 ∨ x3 ∨ x4 x1 ∨ x4 ∨ x5 x1 ∨ x2 ∨ x3

x4 x5 literal wires: even length paths, 2 opt. states x1 x2 x3

x2 = false x3 = false

x1 ∨ x2 ∨ x3

5

slide-24
SLIDE 24
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

NP-Hardness of MaxSPED

x1 = false

reduction from Planar 3SAT gadget-based reduction

clause gadgets: 3 optimal states variable gadgets: 2 optimal states planar 3SAT formula

x2 ∨ x3 ∨ x4 x1 ∨ x3 ∨ x4 x1 ∨ x4 ∨ x5 x1 ∨ x2 ∨ x3

x4 x5 literal wires: even length paths, 2 opt. states x1 x2 x3

x2 = false x3 = false

x1 ∨ x2 ∨ x3

5

slide-25
SLIDE 25
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

NP-Hardness of MaxSPED

x2 = true x1 = false

reduction from Planar 3SAT gadget-based reduction

clause gadgets: 3 optimal states variable gadgets: 2 optimal states planar 3SAT formula

x2 ∨ x3 ∨ x4 x1 ∨ x3 ∨ x4 x1 ∨ x4 ∨ x5 x1 ∨ x2 ∨ x3

x4 x5 literal wires: even length paths, 2 opt. states x1 x2 x3

x3 = false

x1 ∨ x2 ∨ x3

5

slide-26
SLIDE 26
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

NP-Hardness of MaxSPED

x2 = true x1 = false

reduction from Planar 3SAT gadget-based reduction

clause gadgets: 3 optimal states variable gadgets: 2 optimal states planar 3SAT formula

x2 ∨ x3 ∨ x4 x1 ∨ x3 ∨ x4 x1 ∨ x4 ∨ x5 x1 ∨ x2 ∨ x3

x4 x5 literal wires: even length paths, 2 opt. states x1 x2 x3

x3 = false

x1 ∨ x2 ∨ x3

5

slide-27
SLIDE 27
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

NP-Hardness of MaxSPED

x2 = true x1 = false

reduction from Planar 3SAT gadget-based reduction

clause gadgets: 3 optimal states variable gadgets: 2 optimal states planar 3SAT formula

x2 ∨ x3 ∨ x4 x1 ∨ x3 ∨ x4 x1 ∨ x4 ∨ x5 x1 ∨ x2 ∨ x3

x4 x5 literal wires: even length paths, 2 opt. states x1 x2 x3

x3 = false

x1 ∨ x2 ∨ x3

5

slide-28
SLIDE 28
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

NP-Hardness of MaxSPED

x2 = true x1 = false

reduction from Planar 3SAT gadget-based reduction

clause gadgets: 3 optimal states variable gadgets: 2 optimal states planar 3SAT formula

x2 ∨ x3 ∨ x4 x1 ∨ x3 ∨ x4 x1 ∨ x4 ∨ x5 x1 ∨ x2 ∨ x3

x4 x5 literal wires: even length paths, 2 opt. states x1 x2 x3

x3 = false

x1 ∨ x2 ∨ x3 unsatisfied clause loses ink

5

slide-29
SLIDE 29
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

NP-Hardness of MaxSPED

x2 = true x1 = false

reduction from Planar 3SAT gadget-based reduction

clause gadgets: 3 optimal states variable gadgets: 2 optimal states planar 3SAT formula

x2 ∨ x3 ∨ x4 x1 ∨ x3 ∨ x4 x1 ∨ x4 ∨ x5 x1 ∨ x2 ∨ x3

x4 x5 literal wires: even length paths, 2 opt. states x1 x2 x3

x3 = false

unsatisfied clause loses ink grid placement

5

slide-30
SLIDE 30
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

NP-Hardness of MaxSPED

x2 = true x1 = false

reduction from Planar 3SAT gadget-based reduction

clause gadgets: 3 optimal states variable gadgets: 2 optimal states planar 3SAT formula

x2 ∨ x3 ∨ x4 x1 ∨ x3 ∨ x4 x1 ∨ x4 ∨ x5 x1 ∨ x2 ∨ x3

x4 x5 literal wires: even length paths, 2 opt. states x1 x2 x3

x3 = false

unsatisfied clause loses ink

Theorem: MaxSPED is NP-hard for 3-plane input drawings.

grid placement

5

slide-31
SLIDE 31
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

NP-Hardness of MaxSPED

reduction from Planar 3SAT gadget-based reduction

clause gadgets: 3 optimal states variable gadgets: 2 optimal states planar 3SAT formula

x2 ∨ x3 ∨ x4 x1 ∨ x3 ∨ x4 x1 ∨ x4 ∨ x5 x1 ∨ x2 ∨ x3

x4 x5 literal wires: even length paths, 2 opt. states x1 x2 x3 unsatisfied clause loses ink

Theorem: MaxSPED is NP-hard for 3-plane input drawings.

grid placement

MaxPED: similar proof idea, but non-symmetric stubs require more complex gadgets and up to 4 crossings per edge. Theorem: MaxPED is NP-hard for 4-plane input drawings.

5

slide-32
SLIDE 32
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

Algorithms

6

slide-33
SLIDE 33
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

Edge Intersection Graph

intersection graph C(Γ): every vertex u corresponds to one segment s(u) in Γ edge (u, v) in C iff s(u) and s(v) cross in Γ drawing Γ of G = (V, E) edge intersection graph C(Γ) with vertex set E

7

slide-34
SLIDE 34
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

Edge Intersection Graph

intersection graph C(Γ): every vertex u corresponds to one segment s(u) in Γ edge (u, v) in C iff s(u) and s(v) cross in Γ drawing Γ of G = (V, E) edge intersection graph C(Γ) with vertex set E

7

slide-35
SLIDE 35
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

Edge Intersection Graph

First assumption: C is a tree intersection graph C(Γ): every vertex u corresponds to one segment s(u) in Γ edge (u, v) in C iff s(u) and s(v) cross in Γ drawing Γ of G = (V, E) edge intersection graph C(Γ) with vertex set E

7

slide-36
SLIDE 36
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

Discretized Stub Lengths for MaxSPED

⇒ s(u)

s(v1) s(v2) s(v3) s(v4) s(p(u)) v1 v2 v3 v4 u p(u)

  • c(u)

pick arbitrary root for tree C(Γ)

8

slide-37
SLIDE 37
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

Discretized Stub Lengths for MaxSPED

⇒ s(u)

s(v1) s(v2) s(v3) s(v4) s(p(u)) v1 v2 v3 v4 u p(u)

  • c(u)

edge crossings induce different relevant stub lengths l0 – entire edge (no gap) l1, . . . , ldeg(u) – shorter to longer stubs l0 pick arbitrary root for tree C(Γ)

8

slide-38
SLIDE 38
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

Discretized Stub Lengths for MaxSPED

⇒ s(u)

s(v1) s(v2) s(v3) s(v4) s(p(u)) v1 v2 v3 v4 u p(u)

  • c(u)

edge crossings induce different relevant stub lengths l0 – entire edge (no gap) l1, . . . , ldeg(u) – shorter to longer stubs l1 pick arbitrary root for tree C(Γ)

8

slide-39
SLIDE 39
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

Discretized Stub Lengths for MaxSPED

⇒ s(u)

s(v1) s(v2) s(v3) s(v4) s(p(u)) v1 v2 v3 v4 u p(u)

  • c(u)

edge crossings induce different relevant stub lengths l0 – entire edge (no gap) l1, . . . , ldeg(u) – shorter to longer stubs l2 pick arbitrary root for tree C(Γ)

8

slide-40
SLIDE 40
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

Discretized Stub Lengths for MaxSPED

⇒ s(u)

s(v1) s(v2) s(v3) s(v4) s(p(u)) v1 v2 v3 v4 u p(u)

  • c(u)

edge crossings induce different relevant stub lengths l0 – entire edge (no gap) l1, . . . , ldeg(u) – shorter to longer stubs l3 pick arbitrary root for tree C(Γ)

8

slide-41
SLIDE 41
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

Discretized Stub Lengths for MaxSPED

⇒ s(u)

s(v1) s(v2) s(v3) s(v4) s(p(u)) v1 v2 v3 v4 u p(u)

  • c(u)

edge crossings induce different relevant stub lengths l0 – entire edge (no gap) l1, . . . , ldeg(u) – shorter to longer stubs l4 pick arbitrary root for tree C(Γ)

8

slide-42
SLIDE 42
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

Discretized Stub Lengths for MaxSPED

⇒ s(u)

s(v1) s(v2) s(v3) s(v4) s(p(u)) v1 v2 v3 v4 u p(u)

  • c(u)

edge crossings induce different relevant stub lengths l0 – entire edge (no gap) l1, . . . , ldeg(u) – shorter to longer stubs l5 pick arbitrary root for tree C(Γ)

8

slide-43
SLIDE 43
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

Discretized Stub Lengths for MaxSPED

⇒ s(u)

s(v1) s(v2) s(v3) s(v4) s(p(u)) v1 v2 v3 v4 u p(u)

  • c(u)

edge crossings induce different relevant stub lengths l0 – entire edge (no gap) l1, . . . , ldeg(u) – shorter to longer stubs pick arbitrary root for tree C(Γ)

short(u) . . . best solution with stubs not affecting the stubs of the parent long(u) . . . best solution with stubs possibly affecting the stubs of the parent

8

slide-44
SLIDE 44
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

Discretized Stub Lengths for MaxSPED

⇒ s(u)

s(v1) s(v2) s(v3) s(v4) s(p(u)) v1 v2 v3 v4 u p(u)

  • c(u)

edge crossings induce different relevant stub lengths l0 – entire edge (no gap) l1, . . . , ldeg(u) – shorter to longer stubs pick arbitrary root for tree C(Γ)

short(u) . . . best solution with stubs not affecting the stubs of the parent long(u) . . . best solution with stubs possibly affecting the stubs of the parent

8

slide-45
SLIDE 45
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

Dynamic Programming: Recurrence

Ti(u) = li(u) +

  • v∈c(u)
  • short(v)

if s(u) with length li(u) intersects s(v) long(v)

  • therwise.

9

slide-46
SLIDE 46
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

Dynamic Programming: Recurrence

Ti(u) = li(u) +

  • v∈c(u)
  • short(v)

if s(u) with length li(u) intersects s(v) long(v)

  • therwise.

Ti(u) . . . maximum ink value for subtree rooted at u s.t. s(u) has stubs of length li(u) s(u) . . . segment for vertex u li(u) . . . i-th stub length of s(u)

9

slide-47
SLIDE 47
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

Dynamic Programming: Recurrence

Ti(u) = li(u) +

  • v∈c(u)
  • short(v)

if s(u) with length li(u) intersects s(v) long(v)

  • therwise.

Ti(u) . . . maximum ink value for subtree rooted at u s.t. s(u) has stubs of length li(u) s(u) . . . segment for vertex u li(u) . . . i-th stub length of s(u) c(u) . . . set of children of u short(v) = max{T1(v), ..., Tp(v)} . . . stubs not affecting the parent long(v) = max{T0(v), ..., Tdeg(v)(v)} . . . all stubs (possibly affecting the parent)

9

slide-48
SLIDE 48
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

Dynamic Programming: Example

Ti(u) = li(u) +

  • v∈c(u)
  • short(v)

if s(u) with length li(u) intersects s(v) long(v)

  • therwise

10

slide-49
SLIDE 49
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

Dynamic Programming: Example

Input: Intersection Graph:

v1 v2 v3 u1 u2 w r Ti(u) = li(u) +

  • v∈c(u)
  • short(v)

if s(u) with length li(u) intersects s(v) long(v)

  • therwise

10

slide-50
SLIDE 50
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

Dynamic Programming: Example

Intersection Graph:

v1 v2 v3 u1 u2 w r Ti(u) = li(u) +

  • v∈c(u)
  • short(v)

if s(u) with length li(u) intersects s(v) long(v)

  • therwise

Input:

10

slide-51
SLIDE 51
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

Dynamic Programming: Example

Intersection Graph:

v1 v2 v3 u1 u2 w r Ti(u) = li(u) +

  • v∈c(u)
  • short(v)

if s(u) with length li(u) intersects s(v) long(v)

  • therwise

v1 : T0(v1) = l0 = 3 T1(v1) = l1 = 2

Input:

3

10

slide-52
SLIDE 52
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

Dynamic Programming: Example

Intersection Graph:

v1 v2 v3 u1 u2 w r Ti(u) = li(u) +

  • v∈c(u)
  • short(v)

if s(u) with length li(u) intersects s(v) long(v)

  • therwise

v1 : T0(v1) = l0 = 3 T1(v1) = l1 = 2

Input:

3

10

slide-53
SLIDE 53
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

Dynamic Programming: Example

Intersection Graph:

v1 v2 v3 u1 u2 w r Ti(u) = li(u) +

  • v∈c(u)
  • short(v)

if s(u) with length li(u) intersects s(v) long(v)

  • therwise

v2 : T0(v2) = l0 = 5 T1(v2) = l1 = 4

v1 : T0(v1) = 3 T1(v1) = 2

Input:

5

10

slide-54
SLIDE 54
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

Dynamic Programming: Example

Intersection Graph:

v1 v2 v3 u1 u2 w r Ti(u) = li(u) +

  • v∈c(u)
  • short(v)

if s(u) with length li(u) intersects s(v) long(v)

  • therwise

v3 : T0(v3) = l0 = 4 T1(v3) = l1 = 2

v2 : T0(v2) = 5 T1(v2) = 4 v1 : T0(v1) = 3 T1(v1) = 2

Input:

4

10

slide-55
SLIDE 55
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

Dynamic Programming: Example

Intersection Graph:

v1 v2 v3 u1 u2 w r Ti(u) = li(u) +

  • v∈c(u)
  • short(v)

if s(u) with length li(u) intersects s(v) long(v)

  • therwise

u1 : T0(u1) = l0 + short(v1) + short(v2) + short(v3) = 21 T1(u1) = l1 + long(v1) + long(v2) + long(v3) = 14 T2(u2) = l2 + short(v1) + long(v2) + long(v3) = 15 T3(u3) = l3 + short(v1) + short(v2) + long(v3) = 16 T4(u4) = l4 + short(v1) + short(v2) + long(v3) = 22

v3 : T0(v3) = 4 T1(v3) = 2 v2 : T0(v2) = 5 T1(v2) = 4 v1 : T0(v1) = 3 T1(v1) = 2

Input:

13

10

slide-56
SLIDE 56
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

Dynamic Programming: Example

Intersection Graph:

v1 v2 v3 u1 u2 w r Ti(u) = li(u) +

  • v∈c(u)
  • short(v)

if s(u) with length li(u) intersects s(v) long(v)

  • therwise

u1 : T0(u1) = l0 + short(v1) + short(v2) + short(v3) = 21 T1(u1) = l1 + long(v1) + long(v2) + long(v3) = 14 T2(u2) = l2 + short(v1) + long(v2) + long(v3) = 15 T3(u3) = l3 + short(v1) + short(v2) + long(v3) = 16 T4(u4) = l4 + short(v1) + short(v2) + long(v3) = 22

v3 : T0(v3) = 4 T1(v3) = 2 v2 : T0(v2) = 5 T1(v2) = 4 v1 : T0(v1) = 3 T1(v1) = 2

Input:

13

10

slide-57
SLIDE 57
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

Dynamic Programming: Example

Intersection Graph:

v1 v2 v3 u1 u2 w r Ti(u) = li(u) +

  • v∈c(u)
  • short(v)

if s(u) with length li(u) intersects s(v) long(v)

  • therwise

u1 : T0(u1) = l0 + short(v1) + short(v2) + short(v3) = 21 T1(u1) = l1 + long(v1) + long(v2) + long(v3) = 14 T2(u2) = l2 + short(v1) + long(v2) + long(v3) = 15 T3(u3) = l3 + short(v1) + short(v2) + long(v3) = 16 T4(u4) = l4 + short(v1) + short(v2) + long(v3) = 22

v3 : T0(v3) = 4 T1(v3) = 2 v2 : T0(v2) = 5 T1(v2) = 4 v1 : T0(v1) = 3 T1(v1) = 2

Input:

13

10

slide-58
SLIDE 58
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

Dynamic Programming: Example

Intersection Graph:

v1 v2 v3 u1 u2 w r Ti(u) = li(u) +

  • v∈c(u)
  • short(v)

if s(u) with length li(u) intersects s(v) long(v)

  • therwise

u1 : T0(u1) = l0 + short(v1) + short(v2) + short(v3) = 21 T1(u1) = l1 + long(v1) + long(v2) + long(v3) = 14 T2(u2) = l2 + short(v1) + long(v2) + long(v3) = 15 T3(u3) = l3 + short(v1) + short(v2) + long(v3) = 16 T4(u4) = l4 + short(v1) + short(v2) + long(v3) = 22

v3 : T0(v3) = 4 T1(v3) = 2 v2 : T0(v2) = 5 T1(v2) = 4 v1 : T0(v1) = 3 T1(v1) = 2

Input:

13

10

slide-59
SLIDE 59
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

Dynamic Programming: Example

Intersection Graph:

v1 v2 v3 u1 u2 w r Ti(u) = li(u) +

  • v∈c(u)
  • short(v)

if s(u) with length li(u) intersects s(v) long(v)

  • therwise

u1 : T0(u1) = l0 + short(v1) + short(v2) + short(v3) = 21 T1(u1) = l1 + long(v1) + long(v2) + long(v3) = 14 T2(u2) = l2 + short(v1) + long(v2) + long(v3) = 15 T3(u3) = l3 + short(v1) + short(v2) + long(v3) = 16 T4(u4) = l4 + short(v1) + short(v2) + long(v3) = 22

v3 : T0(v3) = 4 T1(v3) = 2 v2 : T0(v2) = 5 T1(v2) = 4 v1 : T0(v1) = 3 T1(v1) = 2

Input:

13

10

slide-60
SLIDE 60
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

Dynamic Programming: Example

Intersection Graph:

v1 v2 v3 u1 u2 w r Ti(u) = li(u) +

  • v∈c(u)
  • short(v)

if s(u) with length li(u) intersects s(v) long(v)

  • therwise

u1 : T0(u1) = l0 + short(v1) + short(v2) + short(v3) = 21 T1(u1) = l1 + long(v1) + long(v2) + long(v3) = 14 T2(u2) = l2 + short(v1) + long(v2) + long(v3) = 15 T3(u3) = l3 + short(v1) + short(v2) + long(v3) = 16 T4(u4) = l4 + short(v1) + short(v2) + long(v3) = 22

  • short(u1) =

max{T1, T2, T3} = T3(u1) = 16

v3 : T0(v3) = 4 T1(v3) = 2 v2 : T0(v2) = 5 T1(v2) = 4 v1 : T0(v1) = 3 T1(v1) = 2

Input:

13

10

slide-61
SLIDE 61
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

Dynamic Programming: Example

Intersection Graph:

v1 v2 v3 u1 u2 w r Ti(u) = li(u) +

  • v∈c(u)
  • short(v)

if s(u) with length li(u) intersects s(v) long(v)

  • therwise

u1 : T0(u1) = l0 + short(v1) + short(v2) + short(v3) = 21 T1(u1) = l1 + long(v1) + long(v2) + long(v3) = 14 T2(u2) = l2 + short(v1) + long(v2) + long(v3) = 15 T3(u3) = l3 + short(v1) + short(v2) + long(v3) = 16 T4(u4) = l4 + short(v1) + short(v2) + long(v3) = 22

  • long(u1) =

max{T0, . . . , T4} = T4(u1) = 22

v3 : T0(v3) = 4 T1(v3) = 2 v2 : T0(v2) = 5 T1(v2) = 4 v1 : T0(v1) = 3 T1(v1) = 2

Input:

13

10

slide-62
SLIDE 62
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

Dynamic Programming: Example

Intersection Graph:

v1 v2 v3 u1 u2 w r Ti(u) = li(u) +

  • v∈c(u)
  • short(v)

if s(u) with length li(u) intersects s(v) long(v)

  • therwise

u2 : T0(u2) = l0 = 5 T1(u2) = l1 = 2

u1 : short(u1) = T3 = 16 long(u1) = T4 = 22 v3 : T0(v3) = 4 T1(v3) = 2 v2 : T0(v2) = 5 T1(v2) = 4 v1 : T0(v1) = 3 T1(v1) = 2

Input:

5

10

slide-63
SLIDE 63
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

Dynamic Programming: Example

Intersection Graph:

v1 v2 v3 u1 u2 w r Ti(u) = li(u) +

  • v∈c(u)
  • short(v)

if s(u) with length li(u) intersects s(v) long(v)

  • therwise

w : T0(w) = l0 + short(u1) + short(u2) = 38 T1(w) = l1 + long(u1) + long(u2) = 33 T2(w) = l2 + short(u1) + long(u2) = 31 T3(w) = l3 + short(u1) + long(u2) = 35

u2 : T0(u2) = 5 T1(u2) = 2 u1 : short(u1) = T3 = 16 long(u1) = T4 = 22 v3 : T0(v3) = 4 T1(v3) = 2 v2 : T0(v2) = 5 T1(v2) = 4 v1 : T0(v1) = 3 T1(v1) = 2

Input:

20

10

slide-64
SLIDE 64
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

Dynamic Programming: Example

Intersection Graph:

v1 v2 v3 u1 u2 w r Ti(u) = li(u) +

  • v∈c(u)
  • short(v)

if s(u) with length li(u) intersects s(v) long(v)

  • therwise

r : T0(r) = l0 + short(w) = 45 T1(r) = l1 + long(w) = 44

u2 : T0(u2) = 5 T1(u2) = 2 u1 : short(u1) = T3 = 16 long(u1) = T4 = 22 v3 : T0(v3) = 4 T1(v3) = 2 v2 : T0(v2) = 5 T1(v2) = 4 v1 : T0(v1) = 3 T1(v1) = 2 w : short(w) = T1 = 33 long(w) = T0 = 38

Input:

12

10

slide-65
SLIDE 65
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

Dynamic Programming: Example

Intersection Graph:

v1 v2 v3 u1 u2 w r Ti(u) = li(u) +

  • v∈c(u)
  • short(v)

if s(u) with length li(u) intersects s(v) long(v)

  • therwise

r : T0(r) = l0 + short(w) = 45 T1(r) = l1 + long(w) = 44

u2 : T0(u2) = 5 T1(u2) = 2 u1 : short(u1) = T3 = 16 long(u1) = T4 = 22 v3 : T0(v3) = 4 T1(v3) = 2 v2 : T0(v2) = 5 T1(v2) = 4 v1 : T0(v1) = 3 T1(v1) = 2 w : short(w) = T1 = 33 long(w) = T0 = 38

Input:

10

slide-66
SLIDE 66
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

Dynamic Programming: Example

Intersection Graph:

v1 v2 v3 u1 u2 w r Ti(u) = li(u) +

  • v∈c(u)
  • short(v)

if s(u) with length li(u) intersects s(v) long(v)

  • therwise

r : T0(r) = l0 + short(w) = 45 T1(r) = l1 + long(w) = 44

u2 : T0(u2) = 5 T1(u2) = 2 u1 : short(u1) = T3 = 16 long(u1) = T4 = 22 v3 : T0(v3) = 4 T1(v3) = 2 v2 : T0(v2) = 5 T1(v2) = 4 v1 : T0(v1) = 3 T1(v1) = 2 w : short(w) = T1 = 33 long(w) = T0 = 38

← backtracking Input:

10

slide-67
SLIDE 67
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

Dynamic Programming: Example

Intersection Graph:

v1 v2 v3 u1 u2 w r Ti(u) = li(u) +

  • v∈c(u)
  • short(v)

if s(u) with length li(u) intersects s(v) long(v)

  • therwise

r : T0(r) = l0 + short(w) = 45 T1(r) = l1 + long(w) = 44

u2 : T0(u2) = 5 T1(u2) = 2 u1 : short(u1) = T3 = 16 long(u1) = T4 = 22 v3 : T0(v3) = 4 T1(v3) = 2 v2 : T0(v2) = 5 T1(v2) = 4 v1 : T0(v1) = 3 T1(v1) = 2 w : short(w) = T1 = 33 long(w) = T0 = 38

MaxSPED:

10

slide-68
SLIDE 68
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

Running Time Analysis

recurrence can be solved naively in O(mk2) time for m segments in the k-plane input drawing Γ can be improved to O(mk) time using dependencies in the

  • rder of the stub lengths

intersection graph C(Γ) is a tree with O(m) edges and can be computed in O(m log m) time

11

slide-69
SLIDE 69
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

Running Time Analysis

recurrence can be solved naively in O(mk2) time for m segments in the k-plane input drawing Γ can be improved to O(mk) time using dependencies in the

  • rder of the stub lengths

intersection graph C(Γ) is a tree with O(m) edges and can be computed in O(m log m) time Theorem: MaxSPED can be solved in O(mk + m log m) time for a k-plane input drawing whose intersection graph is a tree.

11

slide-70
SLIDE 70
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

Running Time Analysis

recurrence can be solved naively in O(mk2) time for m segments in the k-plane input drawing Γ can be improved to O(mk) time using dependencies in the

  • rder of the stub lengths

intersection graph C(Γ) is a tree with O(m) edges and can be computed in O(m log m) time Theorem: MaxSPED can be solved in O(mk + m log m) time for a k-plane input drawing whose intersection graph is a tree. MaxPED: similar algorithm idea, but non-symmetric stubs require k2 pairs of stub lengths. Theorem: MaxPED can be solved in O(mk2 + m log m) time for k-plane input drawing with tree intersection graph.

11

slide-71
SLIDE 71
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

Bounded Treewidth

If the edge intersection graph C(Γ) has bounded treewidth τ then a more complex dynamic programming idea can be used. each node (bag) of a nice tree decomposition of C has at most τ + 1 vertices; for a k-plane drawing Γ it is sufficient to store maximum ink values for at most (k + 1)τ+1 stub sets perform bottom-up dynamic programming in the nice tree decomposition, which has O(τm) nodes the operations for one stub set require at most O(kτ) time

12

slide-72
SLIDE 72
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

Bounded Treewidth

If the edge intersection graph C(Γ) has bounded treewidth τ then a more complex dynamic programming idea can be used. each node (bag) of a nice tree decomposition of C has at most τ + 1 vertices; for a k-plane drawing Γ it is sufficient to store maximum ink values for at most (k + 1)τ+1 stub sets perform bottom-up dynamic programming in the nice tree decomposition, which has O(τm) nodes the operations for one stub set require at most O(kτ) time Theorem: For a k-plane drawing Γ with m edges whose intersection graph has treewidth τ, MaxSPED can be solved in O(m(k + 1)τ+2τ 2 + m log m) time.

12

slide-73
SLIDE 73
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

Bounded Treewidth

If the edge intersection graph C(Γ) has bounded treewidth τ then a more complex dynamic programming idea can be used. each node (bag) of a nice tree decomposition of C has at most τ + 1 vertices; for a k-plane drawing Γ it is sufficient to store maximum ink values for at most (k + 1)τ+1 stub sets perform bottom-up dynamic programming in the nice tree decomposition, which has O(τm) nodes the operations for one stub set require at most O(kτ) time Theorem: For a k-plane drawing Γ with m edges whose intersection graph has treewidth τ, MaxSPED can be solved in O(m(k + 1)τ+2τ 2 + m log m) time. The algorithm can be adapted to solve MaxPED with an increase by a factor of k in the running time.

12

slide-74
SLIDE 74
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

Experiments

We implemented the treewidth-based algorithms for MaxSPED in Python and performed some proof-of-concept experiments. used “htd” library to compute nice tree decomposition 800 random graphs with 40 vertices and 40–75 edges spring and circular layouts from NetworkX and graphviz

50 100

Crossings

10−3 10−1 101 103 105

Time in seconds

1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0

Treewidth

layout

circle spring

13

slide-75
SLIDE 75
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

Conclusion

k = 2 k = 3 k ≥ 4 arbitrary k MaxPED MaxSPED NP-hard O(n log n)

[Bruckdorfer et al. JGAA’17] [Bruckdorfer PhD’15]

NP-hard NP-hard Dynamic Programming if edge intersection graph is a tree, or more generally has bounded treewidth

14

slide-76
SLIDE 76
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

Conclusion

  • pen questions:

complexity of MaxPED for k = 3 algorithms/complexity for deciding existence of δ-HPEDs

k = 2 k = 3 k ≥ 4 arbitrary k MaxPED MaxSPED NP-hard O(n log n)

[Bruckdorfer et al. JGAA’17] [Bruckdorfer PhD’15]

NP-hard NP-hard Dynamic Programming if edge intersection graph is a tree, or more generally has bounded treewidth

?

14

slide-77
SLIDE 77
  • M. Hummel, F. Klute, S. Nickel, M. N¨
  • llenburg · Maximizing Ink in Partial Edge Drawings of k-plane Graphs

Conclusion

Thank You!

  • pen questions:

complexity of MaxPED for k = 3 algorithms/complexity for deciding existence of δ-HPEDs

k = 2 k = 3 k ≥ 4 arbitrary k MaxPED MaxSPED NP-hard O(n log n)

[Bruckdorfer et al. JGAA’17] [Bruckdorfer PhD’15]

NP-hard NP-hard Dynamic Programming if edge intersection graph is a tree, or more generally has bounded treewidth

?

14