On Minimizing Crossings in Storyline Visualizations Irina - - PowerPoint PPT Presentation

on minimizing crossings in storyline visualizations
SMART_READER_LITE
LIVE PREVIEW

On Minimizing Crossings in Storyline Visualizations Irina - - PowerPoint PPT Presentation

On Minimizing Crossings in Storyline Visualizations Irina Kostitsyna Martin N ollenburg Valentin Polishchuk Andr e Schulz Darren Strash Institute of Theoretical Informatics Algorithmics www.xkcd.com, CC BY-NC 2.5 I. Kostitsyna, M.


slide-1
SLIDE 1
  • I. Kostitsyna, M. N¨
  • llenburg, V. Polishchuk, A. Schulz, D. Strash:

On Minimizing Crossings in Storyline Visualizations Institute of Theoretical Informatics Algorithmics

Irina Kostitsyna Martin N¨

  • llenburg

Valentin Polishchuk Andr´ e Schulz Darren Strash

www.xkcd.com, CC BY-NC 2.5

Institute of Theoretical Informatics – Algorithmics

www.kit.edu

KIT – University of the State of Baden-Wuerttemberg and National Laboratory of the Helmholtz Association

On Minimizing Crossings in Storyline Visualizations

slide-2
SLIDE 2
  • I. Kostitsyna, M. N¨
  • llenburg, V. Polishchuk, A. Schulz, D. Strash:

On Minimizing Crossings in Storyline Visualizations Institute of Theoretical Informatics Algorithmics

Storyline Visualizations

Input: A story (e.g., movie, play, etc.): set of n characters and their interactions over time (m meetings) Output: Visualization of character interactions a b c d time x-axis → time Characters → curves monotone w.r.t time (no time travel) Curves converge during an interaction, and diverge otherwise

1

slide-3
SLIDE 3
  • I. Kostitsyna, M. N¨
  • llenburg, V. Polishchuk, A. Schulz, D. Strash:

On Minimizing Crossings in Storyline Visualizations Institute of Theoretical Informatics Algorithmics

Storyline Visualizations

Input: A story (e.g., movie, play, etc.): set of n characters and their interactions over time (m meetings) Output: Visualization of character interactions a b c d Meetings have start and end times time x-axis → time Characters → curves monotone w.r.t time (no time travel) Curves converge during an interaction, and diverge otherwise

1

slide-4
SLIDE 4
  • I. Kostitsyna, M. N¨
  • llenburg, V. Polishchuk, A. Schulz, D. Strash:

On Minimizing Crossings in Storyline Visualizations Institute of Theoretical Informatics Algorithmics

Previous Results

Draw pretty pictures → minimize crossings between curves NP-hard in general → reduction from BIPARTITE CROSSING NUMBER Layered graph drawing → try permutations of curve ordering [Sugiyama et al. ’81] Heuristics to minimize crossings, wiggles, and gaps [Tanahashi et

  • al. ’12, Muelder et al. ’13]

In practice:

2

slide-5
SLIDE 5
  • I. Kostitsyna, M. N¨
  • llenburg, V. Polishchuk, A. Schulz, D. Strash:

On Minimizing Crossings in Storyline Visualizations Institute of Theoretical Informatics Algorithmics

Towards a Theoretical Understanding of Storylines

Can we bound the number of crossings?

Almost no existing theoretical results! Many interesting questions... Among them:

Fixed-parameter tractable (FPT) for realistic inputs?

3

slide-6
SLIDE 6
  • I. Kostitsyna, M. N¨
  • llenburg, V. Polishchuk, A. Schulz, D. Strash:

On Minimizing Crossings in Storyline Visualizations Institute of Theoretical Informatics Algorithmics

Towards a Theoretical Understanding of Storylines

Can we bound the number of crossings?

Almost no existing theoretical results! Many interesting questions... Among them:

Fixed-parameter tractable (FPT) for realistic inputs? Yes! Yes!

We show: matching upper and lower bounds for a special case We show: → FPT on # characters k

3

slide-7
SLIDE 7
  • I. Kostitsyna, M. N¨
  • llenburg, V. Polishchuk, A. Schulz, D. Strash:

On Minimizing Crossings in Storyline Visualizations Institute of Theoretical Informatics Algorithmics

Pairwise One-Time Meetings

We consider a special case: meetings are restricted to two characters these characters meet only once Event graph: characters → vertices, meetings → edges a b c d a b c d event graph pairwise one-time meetings

4

slide-8
SLIDE 8
  • I. Kostitsyna, M. N¨
  • llenburg, V. Polishchuk, A. Schulz, D. Strash:

On Minimizing Crossings in Storyline Visualizations Institute of Theoretical Informatics Algorithmics

Pairwise One-Time Meetings

We consider a special case: meetings are restricted to two characters these characters meet only once Event graph: characters → vertices, meetings → edges event graph pairwise one-time meetings We further restrict to the case where the event graph is a tree. a b c d a b c d

4

slide-9
SLIDE 9
  • I. Kostitsyna, M. N¨
  • llenburg, V. Polishchuk, A. Schulz, D. Strash:

On Minimizing Crossings in Storyline Visualizations Institute of Theoretical Informatics Algorithmics

Algorithm for O(n log n) Crossings

Intuition: Full binary tree can be drawn with O(n log n) crossings Achieve the same bound for arbitrary trees using a heavy path decomposition

5

slide-10
SLIDE 10
  • I. Kostitsyna, M. N¨
  • llenburg, V. Polishchuk, A. Schulz, D. Strash:

On Minimizing Crossings in Storyline Visualizations Institute of Theoretical Informatics Algorithmics

Algorithm for O(n log n) Crossings

Intuition: Full binary tree can be drawn with O(n log n) crossings Achieve the same bound for arbitrary trees using a heavy path decomposition

5

slide-11
SLIDE 11
  • I. Kostitsyna, M. N¨
  • llenburg, V. Polishchuk, A. Schulz, D. Strash:

On Minimizing Crossings in Storyline Visualizations Institute of Theoretical Informatics Algorithmics

Algorithm for O(n log n) Crossings

Intuition: Full binary tree can be drawn with O(n log n) crossings Achieve the same bound for arbitrary trees using a heavy path decomposition

5

slide-12
SLIDE 12
  • I. Kostitsyna, M. N¨
  • llenburg, V. Polishchuk, A. Schulz, D. Strash:

On Minimizing Crossings in Storyline Visualizations Institute of Theoretical Informatics Algorithmics

Algorithm for O(n log n) Crossings

Intuition: Full binary tree can be drawn with O(n log n) crossings Achieve the same bound for arbitrary trees using a heavy path decomposition

5

slide-13
SLIDE 13
  • I. Kostitsyna, M. N¨
  • llenburg, V. Polishchuk, A. Schulz, D. Strash:

On Minimizing Crossings in Storyline Visualizations Institute of Theoretical Informatics Algorithmics

Algorithm for O(n log n) Crossings

Intuition: Full binary tree can be drawn with O(n log n) crossings Achieve the same bound for arbitrary trees using a heavy path decomposition

5

slide-14
SLIDE 14
  • I. Kostitsyna, M. N¨
  • llenburg, V. Polishchuk, A. Schulz, D. Strash:

On Minimizing Crossings in Storyline Visualizations Institute of Theoretical Informatics Algorithmics

Algorithm for O(n log n) Crossings

Intuition: Full binary tree can be drawn with O(n log n) crossings Achieve the same bound for arbitrary trees using a heavy path decomposition Observation: Build bottom-up → draw subtree and connect with root.

5

slide-15
SLIDE 15
  • I. Kostitsyna, M. N¨
  • llenburg, V. Polishchuk, A. Schulz, D. Strash:

On Minimizing Crossings in Storyline Visualizations Institute of Theoretical Informatics Algorithmics

Heavy-Path Decomposition

:= |child subtree| > 1/2|parent subtree| Light edge := otherwise Key property: O(log n) light edges on any root-leaf path

5 8 13 19

6

Heavy edge

slide-16
SLIDE 16
  • I. Kostitsyna, M. N¨
  • llenburg, V. Polishchuk, A. Schulz, D. Strash:

On Minimizing Crossings in Storyline Visualizations Institute of Theoretical Informatics Algorithmics

Heavy-Path Decomposition

:= |child subtree| > 1/2|parent subtree| Light edge := otherwise Key property: O(log n) light edges on any root-leaf path Treat heavy paths as single unit

5 8 13 19

6

Heavy edge

slide-17
SLIDE 17
  • I. Kostitsyna, M. N¨
  • llenburg, V. Polishchuk, A. Schulz, D. Strash:

On Minimizing Crossings in Storyline Visualizations Institute of Theoretical Informatics Algorithmics

Heavy-Path Decomposition

:= |child subtree| > 1/2|parent subtree| Light edge := otherwise Key property: O(log n) light edges on any root-leaf path Key idea: Draw light subtrees, then connect roots Treat heavy paths as single unit

5 8 13 19

6

Heavy edge

slide-18
SLIDE 18
  • I. Kostitsyna, M. N¨
  • llenburg, V. Polishchuk, A. Schulz, D. Strash:

On Minimizing Crossings in Storyline Visualizations Institute of Theoretical Informatics Algorithmics

Drawing Tree Event Graphs

Draw each light subtree in an axis-aligned rectangle

7

slide-19
SLIDE 19
  • I. Kostitsyna, M. N¨
  • llenburg, V. Polishchuk, A. Schulz, D. Strash:

On Minimizing Crossings in Storyline Visualizations Institute of Theoretical Informatics Algorithmics

Drawing Tree Event Graphs

Order light children vertically by start time of meeting with Draw each light subtree in an axis-aligned rectangle root

7

slide-20
SLIDE 20
  • I. Kostitsyna, M. N¨
  • llenburg, V. Polishchuk, A. Schulz, D. Strash:

On Minimizing Crossings in Storyline Visualizations Institute of Theoretical Informatics Algorithmics

Drawing Tree Event Graphs

Order light children vertically by start time of meeting with Draw each light subtree in an axis-aligned rectangle root

7

slide-21
SLIDE 21
  • I. Kostitsyna, M. N¨
  • llenburg, V. Polishchuk, A. Schulz, D. Strash:

On Minimizing Crossings in Storyline Visualizations Institute of Theoretical Informatics Algorithmics

Drawing Tree Event Graphs

Order light children vertically by start time of meeting with Draw each light subtree in an axis-aligned rectangle Introduce “detours”: connect roots on heavy path root

7

slide-22
SLIDE 22
  • I. Kostitsyna, M. N¨
  • llenburg, V. Polishchuk, A. Schulz, D. Strash:

On Minimizing Crossings in Storyline Visualizations Institute of Theoretical Informatics Algorithmics

Drawing Tree Event Graphs

Order light children vertically by start time of meeting with Draw each light subtree in an axis-aligned rectangle Introduce “detours”: connect roots on heavy path root

7

slide-23
SLIDE 23
  • I. Kostitsyna, M. N¨
  • llenburg, V. Polishchuk, A. Schulz, D. Strash:

On Minimizing Crossings in Storyline Visualizations Institute of Theoretical Informatics Algorithmics

Drawing Tree Event Graphs

Order light children vertically by start time of meeting with Draw each light subtree in an axis-aligned rectangle Introduce “detours”: connect roots on heavy path root New light subtree embedded in axis-aligned rectangle!

7

slide-24
SLIDE 24
  • I. Kostitsyna, M. N¨
  • llenburg, V. Polishchuk, A. Schulz, D. Strash:

On Minimizing Crossings in Storyline Visualizations Institute of Theoretical Informatics Algorithmics

Drawing Tree Event Graphs

Order light children vertically by start time of meeting with Draw each light subtree in an axis-aligned rectangle Introduce “detours”: connect roots on heavy path root New light subtree embedded in axis-aligned rectangle!

Recurrence:

N(T) ≤

+ → N(T) = O(n log n)

root crossings light subtree crossings depth of recurrence is O(log n)

∑light subtrees L N(L) 5n

7

slide-25
SLIDE 25
  • I. Kostitsyna, M. N¨
  • llenburg, V. Polishchuk, A. Schulz, D. Strash:

On Minimizing Crossings in Storyline Visualizations Institute of Theoretical Informatics Algorithmics

Lower Bound for All Inputs

Use length L∗ of optimal linear ordering of a graph Embed vertices on the line (unique integers) to minimize total edge length

2 1 1 3 total edge length = 7 1 1 1 2 L∗ = 5

8

slide-26
SLIDE 26
  • I. Kostitsyna, M. N¨
  • llenburg, V. Polishchuk, A. Schulz, D. Strash:

On Minimizing Crossings in Storyline Visualizations Institute of Theoretical Informatics Algorithmics

Lower Bound for All Inputs

Use length L∗ of optimal linear ordering of a graph Embed vertices on the line (unique integers) to minimize total edge length

2 1 1 3 total edge length = 7 1 1 1 2 L∗ = 5 1 Crossings for 2 vertices to meet → edge length - 1

Our problem:

Edge → meeting

Optimal cost = L∗− # edges

8

slide-27
SLIDE 27
  • I. Kostitsyna, M. N¨
  • llenburg, V. Polishchuk, A. Schulz, D. Strash:

On Minimizing Crossings in Storyline Visualizations Institute of Theoretical Informatics Algorithmics

Lower Bound for All Inputs

1

Claim: total # of crossings ≥ L∗ − #edges

2∆

meet 1 New cost for to meet → 0 1 Other costs increase by:

≤ # crossings ×2∆

L∗ changes:

9

slide-28
SLIDE 28
  • I. Kostitsyna, M. N¨
  • llenburg, V. Polishchuk, A. Schulz, D. Strash:

On Minimizing Crossings in Storyline Visualizations Institute of Theoretical Informatics Algorithmics

u, v cross Increase by ≤ d(u) + d(v) ≤ 2∆ u v

Each edge has cost increase of 1 u v

Lower Bound for All Inputs

1

Claim: total # of crossings ≥ L∗ − #edges

2∆

meet 1 New cost for to meet → 0 1 Other costs increase by:

≤ # crossings ×2∆

L∗ changes:

9

slide-29
SLIDE 29
  • I. Kostitsyna, M. N¨
  • llenburg, V. Polishchuk, A. Schulz, D. Strash:

On Minimizing Crossings in Storyline Visualizations Institute of Theoretical Informatics Algorithmics

u, v cross Increase by ≤ d(u) + d(v) ≤ 2∆ u v

Each edge has cost increase of 1 u v

Lower Bound for All Inputs

1

Claim: total # of crossings ≥ L∗ − #edges

2∆

meet 1 New cost for to meet → 0 1 Other costs increase by:

≤ # crossings ×2∆

L∗ changes: total # of crossings×2∆ ≥ total cost increase

≥ original total cost ≥ L∗− #edges

total # of crossings ≥ L∗− #edges

2∆

9

slide-30
SLIDE 30
  • I. Kostitsyna, M. N¨
  • llenburg, V. Polishchuk, A. Schulz, D. Strash:

On Minimizing Crossings in Storyline Visualizations Institute of Theoretical Informatics Algorithmics

Lower Bound for Tree Event Graphs

L∗ = Ω(n log n) [Chung ’78], ∆ = 3 # crossings = Ω(Ω(n log n)−m

2∗3

) = Ω(n log n)

Trees: Optimal linear ordering = minimum valuation Minimized for full binary tree 1 2 3 4 8 6 5 7 10 9 11 12 14 13 15

10

slide-31
SLIDE 31
  • I. Kostitsyna, M. N¨
  • llenburg, V. Polishchuk, A. Schulz, D. Strash:

On Minimizing Crossings in Storyline Visualizations Institute of Theoretical Informatics Algorithmics

FPT for All Inputs

We transform to shortest path problem vertex → valid vertical ordering of curves at meeting start time edge → transformation between orderings by swaps (weight = min # crossings) characters meet meet 1 1 3 2

11

slide-32
SLIDE 32
  • I. Kostitsyna, M. N¨
  • llenburg, V. Polishchuk, A. Schulz, D. Strash:

On Minimizing Crossings in Storyline Visualizations Institute of Theoretical Informatics Algorithmics

FPT for All Inputs

We transform to shortest path problem vertex → valid vertical ordering of curves at meeting start time edge → transformation between orderings by swaps (weight = min # crossings) characters meet meet 1 1 3 2 adjacent during meeting adjacent during meeting

11

slide-33
SLIDE 33
  • I. Kostitsyna, M. N¨
  • llenburg, V. Polishchuk, A. Schulz, D. Strash:

On Minimizing Crossings in Storyline Visualizations Institute of Theoretical Informatics Algorithmics

FPT for All Inputs

s t valid vertical orderings meeting start times s1 s2 s≤m ... Evaluate all vertical orderings with one search

12

slide-34
SLIDE 34
  • I. Kostitsyna, M. N¨
  • llenburg, V. Polishchuk, A. Schulz, D. Strash:

On Minimizing Crossings in Storyline Visualizations Institute of Theoretical Informatics Algorithmics

FPT for Crossing Minimization

Parameter → k characters precompute edge weights between all k!2 pairs in time O(k!2k log k) with merge sort find shortest s → t path in linear time s t O(k!m) vertices O(k!2m) edges O(k!2k log k + k!2m) Total running time

13

slide-35
SLIDE 35
  • I. Kostitsyna, M. N¨
  • llenburg, V. Polishchuk, A. Schulz, D. Strash:

On Minimizing Crossings in Storyline Visualizations Institute of Theoretical Informatics Algorithmics

Questions?

Is the FPT algorithm efficient in practice for small k (e.g., k ≤ 6)? Is there a polynomial time exact algorithm for tree event graphs? How about other graph classes? (e.g., small arboricity, unicyclic graphs, cactus graphs) Are there sparse event graphs that require Ω(n2) crossings? What about minimizing the number of bends/wiggles?

www.xkcd.com, CC BY-NC 2.5

14