Faster Force-Directed Graph Drawing with the Well-Separated Pair - - PowerPoint PPT Presentation

faster force directed graph drawing with the well
SMART_READER_LITE
LIVE PREVIEW

Faster Force-Directed Graph Drawing with the Well-Separated Pair - - PowerPoint PPT Presentation

Faster Force-Directed Graph Drawing with the Well-Separated Pair Decomposition Fabian Lipp Alexander Wolff Johannes Zink Julius-Maximilians-Universitt Wrzburg September 24, Graph Drawing 2015 Introduction Classical force-directed


slide-1
SLIDE 1

Faster Force-Directed Graph Drawing with the Well-Separated Pair Decomposition

Fabian Lipp Alexander Wolff Johannes Zink

Julius-Maximilians-Universität Würzburg

September 24, Graph Drawing 2015

slide-2
SLIDE 2

Introduction

Classical force-directed algorithm [Eades, 1984, Fruchterman & Reingold, 1991] Attracting forces: O(m) time with m = #edges Repulsive forces: Θ(n2) time with n = #vertices

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 1 / 11

slide-3
SLIDE 3

Introduction

Classical force-directed algorithm [Eades, 1984, Fruchterman & Reingold, 1991] Attracting forces: O(m) time with m = #edges Repulsive forces: Θ(n2) time with n = #vertices Many speed-up techniques for force-directed algorithms known: Hierarchical O(n log n) force-calculation [Barnes & Hut, 1986] Potential-field-based multilevel algorithm [Hachul & Jünger, 2005] Evaluation of multilevel layout methods [Bartel et al., 2011]

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 1 / 11

slide-4
SLIDE 4

Introduction

Classical force-directed algorithm [Eades, 1984, Fruchterman & Reingold, 1991] Attracting forces: O(m) time with m = #edges Repulsive forces: Θ(n2) time with n = #vertices Many speed-up techniques for force-directed algorithms known: Hierarchical O(n log n) force-calculation [Barnes & Hut, 1986] Potential-field-based multilevel algorithm [Hachul & Jünger, 2005] Evaluation of multilevel layout methods [Bartel et al., 2011] Our approach Using well-separated pair decomposition to speed up repulsive force calculation to O(n log n) time. Can be combined with other speed-up techniques.

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 1 / 11

slide-5
SLIDE 5

Well-Separated Pairs

A B Definition Let s > 0. A and B in R2 are s-well-separated iff there are two balls CA and CB with A ⊆ CA and B ⊆ CB, radius r := r(CA) = r(CB), and distance ≥ s · r. [Callahan & Kosaraju, 1995]

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 2 / 11

slide-6
SLIDE 6

Well-Separated Pairs

CA CB A B Definition Let s > 0. A and B in R2 are s-well-separated iff there are two balls CA and CB with A ⊆ CA and B ⊆ CB, radius r := r(CA) = r(CB), and distance ≥ s · r. [Callahan & Kosaraju, 1995]

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 2 / 11

slide-7
SLIDE 7

Well-Separated Pairs

CA CB r r A B Definition Let s > 0. A and B in R2 are s-well-separated iff there are two balls CA and CB with A ⊆ CA and B ⊆ CB, radius r := r(CA) = r(CB), and distance ≥ s · r. [Callahan & Kosaraju, 1995]

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 2 / 11

slide-8
SLIDE 8

Well-Separated Pairs

CA CB r r ≥ s · r A B Definition Let s > 0. A and B in R2 are s-well-separated iff there are two balls CA and CB with A ⊆ CA and B ⊆ CB, radius r := r(CA) = r(CB), and distance ≥ s · r. [Callahan & Kosaraju, 1995]

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 2 / 11

slide-9
SLIDE 9

Well-Separated Pairs

CA CB r r ≥ s · r A B Definition Let s > 0. A and B in R2 are s-well-separated iff there are two balls CA and CB with A ⊆ CA and B ⊆ CB, radius r := r(CA) = r(CB), and distance ≥ s · r. [Callahan & Kosaraju, 1995]

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 2 / 11

slide-10
SLIDE 10

Well-Separated Pair Decomposition (WSPD)

Definition Let S be a finite set in R2. A WSPD for S with respect to s > 0 is a sequence {A1, B1}, {A2, B2}, . . . , {Ak, Bk}

  • f s-well-separated pairs Ai, Bi such

that Ai, Bi ⊆ S, and ∀a = b ∈ S there is exactly one i with a ∈ Ai and b ∈ Bi or vice versa.

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 3 / 11

slide-11
SLIDE 11

Well-Separated Pair Decomposition (WSPD)

Definition Let S be a finite set in R2. A WSPD for S with respect to s > 0 is a sequence {A1, B1}, {A2, B2}, . . . , {Ak, Bk}

  • f s-well-separated pairs Ai, Bi such

that Ai, Bi ⊆ S, and ∀a = b ∈ S there is exactly one i with a ∈ Ai and b ∈ Bi or vice versa.

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 3 / 11

slide-12
SLIDE 12

Well-Separated Pair Decomposition (WSPD)

Definition Let S be a finite set in R2. A WSPD for S with respect to s > 0 is a sequence {A1, B1}, {A2, B2}, . . . , {Ak, Bk}

  • f s-well-separated pairs Ai, Bi such

that Ai, Bi ⊆ S, and ∀a = b ∈ S there is exactly one i with a ∈ Ai and b ∈ Bi or vice versa.

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 3 / 11

slide-13
SLIDE 13

Well-Separated Pair Decomposition (WSPD)

Definition Let S be a finite set in R2. A WSPD for S with respect to s > 0 is a sequence {A1, B1}, {A2, B2}, . . . , {Ak, Bk}

  • f s-well-separated pairs Ai, Bi such

that Ai, Bi ⊆ S, and ∀a = b ∈ S there is exactly one i with a ∈ Ai and b ∈ Bi or vice versa.

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 3 / 11

slide-14
SLIDE 14

Well-Separated Pair Decomposition (WSPD)

Definition Let S be a finite set in R2. A WSPD for S with respect to s > 0 is a sequence {A1, B1}, {A2, B2}, . . . , {Ak, Bk}

  • f s-well-separated pairs Ai, Bi such

that Ai, Bi ⊆ S, and ∀a = b ∈ S there is exactly one i with a ∈ Ai and b ∈ Bi or vice versa.

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 3 / 11

slide-15
SLIDE 15

Well-Separated Pair Decomposition (WSPD)

Definition Let S be a finite set in R2. A WSPD for S with respect to s > 0 is a sequence {A1, B1}, {A2, B2}, . . . , {Ak, Bk}

  • f s-well-separated pairs Ai, Bi such

that Ai, Bi ⊆ S, and ∀a = b ∈ S there is exactly one i with a ∈ Ai and b ∈ Bi or vice versa.

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 3 / 11

slide-16
SLIDE 16

Well-Separated Pair Decomposition (WSPD)

Definition Let S be a finite set in R2. A WSPD for S with respect to s > 0 is a sequence {A1, B1}, {A2, B2}, . . . , {Ak, Bk}

  • f s-well-separated pairs Ai, Bi such

that Ai, Bi ⊆ S, and ∀a = b ∈ S there is exactly one i with a ∈ Ai and b ∈ Bi or vice versa.

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 3 / 11

slide-17
SLIDE 17

Computation of WSPD

Theorem Let S be a set of n points in R2. For any s > 0, a WSPD consisting of O(n) pairs can be computed in O(n log n) time. [Callahan & Kosaraju, 1995]

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 4 / 11

slide-18
SLIDE 18

Repulsive Force Calculation

|B| · Frep |A| · Frep

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 5 / 11

slide-19
SLIDE 19

Repulsive Force Calculation

|B| · Frep |A| · Frep

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 5 / 11

slide-20
SLIDE 20

Repulsive Force Calculation

|B| · Frep |A| · Frep

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 5 / 11

slide-21
SLIDE 21

Repulsive Force Calculation

|B| · Frep |A| · Frep

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 5 / 11

slide-22
SLIDE 22

Repulsive Force Calculation

|B| · Frep |A| · Frep

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 5 / 11

slide-23
SLIDE 23

Repulsive Force Calculation

|B| · Frep |A| · Frep

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 5 / 11

slide-24
SLIDE 24

Repulsive Force Calculation

|B| · Frep |A| · Frep

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 5 / 11

slide-25
SLIDE 25

Repulsive Force Calculation

|B| · Frep |A| · Frep

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 5 / 11

slide-26
SLIDE 26

Repulsive Force Calculation

|B| · Frep |A| · Frep Compute forces for Θ(n2) pairs of vertices

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 5 / 11

slide-27
SLIDE 27

Repulsive Force Calculation

|B| · Frep |A| · Frep

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 5 / 11

slide-28
SLIDE 28

Repulsive Force Calculation

|B| · Frep |A| · Frep

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 5 / 11

slide-29
SLIDE 29

Repulsive Force Calculation

|B| · Frep |A| · Frep

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 5 / 11

slide-30
SLIDE 30

Repulsive Force Calculation

|B| · Frep |A| · Frep

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 5 / 11

slide-31
SLIDE 31

Repulsive Force Calculation

A B |B| · Frep |A| · Frep

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 5 / 11

slide-32
SLIDE 32

Repulsive Force Calculation

A B |B| · Frep |A| · Frep

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 5 / 11

slide-33
SLIDE 33

Repulsive Force Calculation

|B| · Frep |A| · Frep

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 5 / 11

slide-34
SLIDE 34

Repulsive Force Calculation

|B| · Frep |A| · Frep

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 5 / 11

slide-35
SLIDE 35

Repulsive Force Calculation

|B| · Frep |A| · Frep

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 5 / 11

slide-36
SLIDE 36

Repulsive Force Calculation

|B| · Frep |A| · Frep Compute forces for k ∈ O(n) well-separated pairs

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 5 / 11

slide-37
SLIDE 37

Using the Split Tree

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 6 / 11

slide-38
SLIDE 38

Using the Split Tree

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 6 / 11

slide-39
SLIDE 39

Using the Split Tree

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 6 / 11

slide-40
SLIDE 40

Using the Split Tree

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 6 / 11

slide-41
SLIDE 41

Using the Split Tree

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 6 / 11

slide-42
SLIDE 42

Using the Split Tree

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 6 / 11

slide-43
SLIDE 43

Running time

Compute the WSPD using a split tree O(n log n) Compute forces for every pair O(n) Propagate forces in the split tree O(n) Total O(n log n)

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 7 / 11

slide-44
SLIDE 44

Experiments

Implementation in Java based on FRLayout in Jung (Java Universal Network/Graph Framework) Comparison to similar speed-up techniques: Quadtree based [Barnes & Hut, 1986] Grid variant [Fruchterman & Reingold, 1991]

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 8 / 11

slide-45
SLIDE 45

Experiments: Running time

10 20 30 40 50 60 70 80 90 100 0.01 0.02 0.03 Number of vertices Running time in seconds FRLayout (JUNG) FR+Quad, Θ = 1.0 FR+Grid FR+WSPD, s = 0.1

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 9 / 11

slide-46
SLIDE 46

Experiments: Quality

better 50 100 150 200 250 300 0.3 0.35 Number of edge crossings Standard deviation of edge length FRLayout (JUNG) FR+Quad, Θ = 1.0 FR+Grid FR+WSPD, s = 0.1

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 10 / 11

slide-47
SLIDE 47

Experiments: Quality

better 50 100 150 200 250 300 0.3 0.35 Number of edge crossings Standard deviation of edge length FRLayout (JUNG) FR+Quad, Θ = 1.0 FR+Grid FR+WSPD, s = 0.1

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 10 / 11

slide-48
SLIDE 48

Experiments: Quality

better 50 100 150 200 250 300 0.3 0.35 Number of edge crossings Standard deviation of edge length FRLayout (JUNG) FR+Quad, Θ = 1.0 FR+Grid FR+WSPD, s = 0.1

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 10 / 11

slide-49
SLIDE 49

Experiments: Quality

better 50 100 150 200 250 300 0.3 0.35 Number of edge crossings Standard deviation of edge length FRLayout (JUNG) FR+Quad, Θ = 1.0 FR+Grid FR+WSPD, s = 0.1

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 10 / 11

slide-50
SLIDE 50

Experiments: Quality

better 50 100 150 200 250 300 0.3 0.35 Number of edge crossings Standard deviation of edge length FRLayout (JUNG) FR+Quad, Θ = 1.0 FR+Grid FR+WSPD, s = 0.1

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 10 / 11

slide-51
SLIDE 51

Summary

Asymptotic running time of O(n log n) for each iteration Notably faster than unmodified algorithm Similar to unmodfied algorithm in terms of quality Better quality than Grid variant of Fruchterman & Reingold

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 11 / 11

slide-52
SLIDE 52

Summary

Asymptotic running time of O(n log n) for each iteration Notably faster than unmodified algorithm Similar to unmodfied algorithm in terms of quality Better quality than Grid variant of Fruchterman & Reingold Demonstration during the poster session this afternoon

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 11 / 11

slide-53
SLIDE 53

Summary

Asymptotic running time of O(n log n) for each iteration Notably faster than unmodified algorithm Similar to unmodfied algorithm in terms of quality Better quality than Grid variant of Fruchterman & Reingold Demonstration during the poster session this afternoon Thank you!

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 11 / 11

slide-54
SLIDE 54

APPENDIX

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 1 / 7

slide-55
SLIDE 55

Example drawings

FRLayout (JUNG) FR+WSPD, s = 0.1

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 2 / 7

slide-56
SLIDE 56

Example drawings

FRLayout (JUNG) FR+WSPD, s = 0.1

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 3 / 7

slide-57
SLIDE 57

Experiments: Running time on large graphs

20,000 40,000 60,000 80,000 100,000 50 100 150 Number of vertices Running time in seconds FRLayout (JUNG) FR+Quad, Θ = 1.0 FR+Grid FR+WSPD, s = 0.1

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 4 / 7

slide-58
SLIDE 58

Experiments: Running times compared to OGDF

10 20 30 40 50 60 70 80 90 100 0.01 0.02 0.03 Number of vertices Running time in seconds FRLayout (JUNG) FRExact (OGDF) FR+Grid FM3 (OGDF) FR+Quad, Θ = 1.0 FM3 single (OGDF) FR+WSPD, s = 0.1 GEM (OGDF)

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 5 / 7

slide-59
SLIDE 59

Experiments: Running times compared to OGDF

20,000 40,000 60,000 80,000 100,000 50 100 150 Number of vertices Running time in seconds FRLayout (JUNG) FRExact (OGDF) FR+Grid FM3 (OGDF) FR+Quad, Θ = 1.0 FM3 single (OGDF) FR+WSPD, s = 0.1 GEM (OGDF)

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 6 / 7

slide-60
SLIDE 60

Experiments: Quality compared to OGDF

50 100 150 200 250 300 0.3 0.35 Number of edge crossings Standard deviation of edge length FR+WSPD, s = 0.1 FM3 (OGDF) GEM (OGDF) FRExact (OGDF) FM3 single (OGDF)

Fabian Lipp, Alexander Wolff, Johannes Zink Force-Directed Graph Drawing with WSPD 7 / 7