A Parameterized Algorithm for Upward Planarity Testing of - - PowerPoint PPT Presentation

a parameterized algorithm for upward planarity testing of
SMART_READER_LITE
LIVE PREVIEW

A Parameterized Algorithm for Upward Planarity Testing of - - PowerPoint PPT Presentation

A Parameterized Algorithm for Upward Planarity Testing of Biconnected Graphs Masters thesis presentation Hubert Chan University of Waterloo May 6, 2003 p. 1/48 Graph drawing goal: visualization of graph structures vertices


slide-1
SLIDE 1

A Parameterized Algorithm for Upward Planarity Testing of Biconnected Graphs

Master’s thesis presentation

Hubert Chan University of Waterloo

May 6, 2003 – p. 1/48

slide-2
SLIDE 2

Graph drawing

  • goal: visualization of graph structures
  • vertices represented by points, edges by curves
  • want drawings to satisfy certain criteria

Master’s thesis presentation – May 6, 2003 – p. 2/48

slide-3
SLIDE 3

Straight line drawing

Master’s thesis presentation – May 6, 2003 – p. 3/48

slide-4
SLIDE 4

Straight line drawing

Master’s thesis presentation – May 6, 2003 – p. 3/48

slide-5
SLIDE 5

Planarity

Master’s thesis presentation – May 6, 2003 – p. 4/48

slide-6
SLIDE 6

Planarity

Master’s thesis presentation – May 6, 2003 – p. 4/48

slide-7
SLIDE 7

Planarity

Master’s thesis presentation – May 6, 2003 – p. 4/48

slide-8
SLIDE 8

Upward planarity

Master’s thesis presentation – May 6, 2003 – p. 5/48

slide-9
SLIDE 9

Upward planarity

Master’s thesis presentation – May 6, 2003 – p. 5/48

slide-10
SLIDE 10

Our goal

  • Find an efficient solution to upward planarity

testing.

  • Testing for planarity is linear time (Hopcroft and

Tarjan 1974)

  • Testing for upward (crossings allowed) is linear

time (e.g. Cormen et al. 2001, Brassard and Bratley 1996)

Master’s thesis presentation – May 6, 2003 – p. 6/48

slide-11
SLIDE 11

Our goal

  • Find an efficient solution to upward planarity

testing.

  • Testing for planarity is linear time (Hopcroft and

Tarjan 1974)

  • Testing for upward (crossings allowed) is linear

time (e.g. Cormen et al. 2001, Brassard and Bratley 1996)

  • Unfortunately, upward planarity testing is

NP-complete (Garg and Tamassia 2001).

Master’s thesis presentation – May 6, 2003 – p. 6/48

slide-12
SLIDE 12

Related work

Class Complexity Reference

st-graph O(n)

Di Battista and Tamassia 1988 bipartite

O(n)

Di Battista, Liu, and Rival 1990 triconnected

O(n + r2)

Bertolazzi et al. 1994

  • uterplanar

O(n2)

Papakostas 1995 single source

O(n)

Bertolazzi et al. 1998

Master’s thesis presentation – May 6, 2003 – p. 7/48

slide-13
SLIDE 13

Parameterized complexity

  • developed by Downey and Fellows
  • limit combinatorial explosion to some aspect of the

problem

Master’s thesis presentation – May 6, 2003 – p. 8/48

slide-14
SLIDE 14

Parameterized complexity

  • developed by Downey and Fellows
  • limit combinatorial explosion to some aspect of the

problem

  • e.g. VERTEX COVER

Master’s thesis presentation – May 6, 2003 – p. 8/48

slide-15
SLIDE 15

Parameterized complexity

  • developed by Downey and Fellows
  • limit combinatorial explosion to some aspect of the

problem

  • e.g. VERTEX COVER
  • NP-complete

Master’s thesis presentation – May 6, 2003 – p. 8/48

slide-16
SLIDE 16

Parameterized complexity

  • developed by Downey and Fellows
  • limit combinatorial explosion to some aspect of the

problem

  • e.g. VERTEX COVER
  • NP-complete
  • to find a vertex cover of size k: O
  • kn + 4

3 kk2

(Balasubramanian et al. 1998)

Master’s thesis presentation – May 6, 2003 – p. 8/48

slide-17
SLIDE 17

Related work in parameterized complexity

  • Zhou 2001 — treewidth/pathwidth and graph

drawing

  • Dujmovi´

c et al. 2001 — layered drawings

Master’s thesis presentation – May 6, 2003 – p. 9/48

slide-18
SLIDE 18

Modified goal

Develop a parameterized algorithm for upward planarity testing.

  • ur parameter: the number of triconnected components.

Master’s thesis presentation – May 6, 2003 – p. 10/48

slide-19
SLIDE 19

k-connectivity

  • Definition. A graph is k-connected if there are at least k

vertex-disjoint paths between any two vertices.

Master’s thesis presentation – May 6, 2003 – p. 11/48

slide-20
SLIDE 20

k-connectivity

  • Definition. A graph is k-connected if there are at least k

vertex-disjoint paths between any two vertices.

Master’s thesis presentation – May 6, 2003 – p. 11/48

slide-21
SLIDE 21

k-connectivity

  • Definition. A graph is k-connected if there are at least k

vertex-disjoint paths between any two vertices. 2-connected = biconnected 3-connected = triconnected

Master’s thesis presentation – May 6, 2003 – p. 11/48

slide-22
SLIDE 22

k-connected components

  • Definition. A k-connected component is a maximal

k-connected subgraph

Master’s thesis presentation – May 6, 2003 – p. 12/48

slide-23
SLIDE 23

Preliminary definitions — Embeddings

  • T

wo different planar drawings may have similar structure

  • An embedding is a description of this structure
  • Definition. The (planar) embedding associated with a

drawing is the collection of clockwise orderings of the edges around each vertex.

1 2 3 4 5 1 2 3 4 5

Master’s thesis presentation – May 6, 2003 – p. 13/48

slide-24
SLIDE 24

Embeddings

Master’s thesis presentation – May 6, 2003 – p. 14/48

slide-25
SLIDE 25

Equivalence of drawings

  • Definition. T

wo drawings are equivalent if they have the same embedding, and are strongly equivalent if the have the same embedding and the same outer face.

Master’s thesis presentation – May 6, 2003 – p. 15/48

slide-26
SLIDE 26

Outline

  • Transformations of drawings
  • Edge contraction
  • Joining subgraphs
  • Parameterized algorithm for biconnected graphs
  • Conclusion

Master’s thesis presentation – May 6, 2003 – p. 16/48

slide-27
SLIDE 27

Transformations of drawings

  • If a graph is upward planar, we can draw it so that

a specified edge is drawn vertically

  • We can scale and translate drawings, preserving

upward planarity

Master’s thesis presentation – May 6, 2003 – p. 17/48

slide-28
SLIDE 28

Edge contraction

Master’s thesis presentation – May 6, 2003 – p. 18/48

slide-29
SLIDE 29

Edge contraction

Question: after contracting an edge ǫ, is the resulting embedding still upward planar?

Master’s thesis presentation – May 6, 2003 – p. 19/48

slide-30
SLIDE 30

Edge contraction

  • look at the edge ordering neighbours

... a b d c ... t s α β γ δ ǫ

  • consider all possibilities for the orientations of the

neighbours

Master’s thesis presentation – May 6, 2003 – p. 20/48

slide-31
SLIDE 31

Is the contracted graph upward planar?

  • yes:

? ? ? ?

(Hutton and Lubiw 1996) *

  • no:

(corollary of Tamassia and Tollis 1986)

  • if and only if G←

ǫ is upward planar: remaining

cases

Master’s thesis presentation – May 6, 2003 – p. 21/48

slide-32
SLIDE 32

Edge contraction

Use characterization by Hutton and Lubiw:

  • Theorem. Given φ, a planar drawing of a directed

acyclic graph G, there is an upward planar drawing strongly equivalent to φ if and only if every vertex v is a sink on the outer face of φv.

v v

Master’s thesis presentation – May 6, 2003 – p. 22/48

slide-33
SLIDE 33

Proof outline

In the contracted graph:

  • v is a sink (← only show this)
  • G/ǫ is acyclic
  • v is on the outer face
  • nly need to consider vertices that have s as a

predecessor but not t

s t

Master’s thesis presentation – May 6, 2003 – p. 23/48

slide-34
SLIDE 34

Proof outline

In the contracted graph:

  • v is a sink (← only show this)
  • G/ǫ is acyclic
  • v is on the outer face
  • nly need to consider vertices that have s as a

predecessor but not t

s t

Master’s thesis presentation – May 6, 2003 – p. 23/48

slide-35
SLIDE 35

Proof outline

In the contracted graph:

  • v is a sink (← only show this)
  • G/ǫ is acyclic
  • v is on the outer face
  • nly need to consider vertices that have s as a

predecessor but not t

s t

Master’s thesis presentation – May 6, 2003 – p. 23/48

slide-36
SLIDE 36

Proof outline

In the contracted graph:

  • v is a sink (← only show this)
  • G/ǫ is acyclic
  • v is on the outer face
  • nly need to consider vertices that have s as a

predecessor but not t

s t

Master’s thesis presentation – May 6, 2003 – p. 23/48

slide-37
SLIDE 37

v is a sink

  • we can draw ǫ vertically

C B D A

... c a b d t ... s

β α γ δ ǫ

Master’s thesis presentation – May 6, 2003 – p. 24/48

slide-38
SLIDE 38

v is a sink

  • we can draw ǫ vertically
  • where can vertices be in relation to ǫ?

C B D A

... c a b d t ... s

β α γ δ ǫ

Master’s thesis presentation – May 6, 2003 – p. 24/48

slide-39
SLIDE 39

Locations of vertices

  • predecessors of t must be in B or D
  • successors of s must be in A or C

C B D A

... c a b d t ... s

β α γ δ ǫ

Master’s thesis presentation – May 6, 2003 – p. 25/48

slide-40
SLIDE 40

v is a sink

  • if not: there is an outgoing edge (v, v1)
  • v was a sink in the original graph
  • v1 must be a predecessor of t
  • v must be a predecessor of t

Master’s thesis presentation – May 6, 2003 – p. 26/48

slide-41
SLIDE 41

Where can v be drawn?

  • v is a predecessor of t — must be in B or D
  • v is a successor of s — must be in A or C

C B D A

... c a b d t ... s

β α γ δ ǫ

Master’s thesis presentation – May 6, 2003 – p. 27/48

slide-42
SLIDE 42

Joining subgraphs

Contracting edges allows us to join two upward planar subgraphs

  • draw G1 and G2

G2 G1 v1 v2

Master’s thesis presentation – May 6, 2003 – p. 28/48

slide-43
SLIDE 43

Joining subgraphs

Contracting edges allows us to join two upward planar subgraphs

  • draw G1 and G2
  • draw a curve connecting v1 and v2

G2 G1 v1 v2

Master’s thesis presentation – May 6, 2003 – p. 28/48

slide-44
SLIDE 44

Joining subgraphs

Contracting edges allows us to join two upward planar subgraphs

  • draw G1 and G2
  • draw a curve connecting v1 and v2
  • contract the edge (v1, v2)

G1 G2 v

Master’s thesis presentation – May 6, 2003 – p. 28/48

slide-45
SLIDE 45

Joining subgraphs

Goal: characterize when we can join two upward planar graphs to produce a new upward planar graph

Master’s thesis presentation – May 6, 2003 – p. 29/48

slide-46
SLIDE 46

Visibility from above and below

v is visible from above (below) in an embedding Γ if

there is a drawing corresponding to Γ in which a curve can be drawn from v to a point above (below) the drawing.

v

Master’s thesis presentation – May 6, 2003 – p. 30/48

slide-47
SLIDE 47

Visibility from above and below

v v p p

Master’s thesis presentation – May 6, 2003 – p. 31/48

slide-48
SLIDE 48

Alternate definition of visibility

v is visible from above if a curve can be drawn from v to

a point on the outer face above v

v v p p

Master’s thesis presentation – May 6, 2003 – p. 32/48

slide-49
SLIDE 49

Transforming the drawing

  • draw a horizontal ray ℓ from p
  • count the number of times it crosses the boundary
  • f the outer face

Master’s thesis presentation – May 6, 2003 – p. 33/48

slide-50
SLIDE 50

Removing crossings

  • modify the drawing so that there are no crossings
  • we define a procedure that reduces the number of

crossings

  • apply the procedure until no more crossings

Master’s thesis presentation – May 6, 2003 – p. 34/48

slide-51
SLIDE 51

Removing crossings

  • modify the drawing so that there are no crossings
  • we define a procedure that reduces the number of

crossings

  • apply the procedure until no more crossings

Master’s thesis presentation – May 6, 2003 – p. 34/48

slide-52
SLIDE 52

Removing crossings

  • modify the drawing so that there are no crossings
  • we define a procedure that reduces the number of

crossings

  • apply the procedure until no more crossings

Master’s thesis presentation – May 6, 2003 – p. 34/48

slide-53
SLIDE 53

Removing crossings

  • modify the drawing so that there are no crossings
  • we define a procedure that reduces the number of

crossings

  • apply the procedure until no more crossings

Master’s thesis presentation – May 6, 2003 – p. 34/48

slide-54
SLIDE 54

Visibility from above

  • We have shown that our two definitions of

visibility are equivalent

  • Our first definition allows us to join two graphs by

drawing the edge (v1, v2)

  • Our second definition allows us to determine the

visibility of a vertex by looking at its incident edges

  • e.g. if v has an outgoing edge on the outer face,

it is visible from above

Master’s thesis presentation – May 6, 2003 – p. 35/48

slide-55
SLIDE 55

Three cases for joining subgraphs

  • v1 and v2 are both sources (or both sinks)
  • v1 is a source (or sink)
  • neither is a source nor sink (← only show this)

Master’s thesis presentation – May 6, 2003 – p. 36/48

slide-56
SLIDE 56

Neither v1 nor v2 are sources nor sinks

If neither v1 nor v2 are cutvertices, G is upward planar if and only if v1 or v2 has an outgoing and an incoming edge on the outer face that are edge ordering neighbours

G2 v1 G1 v2

Master’s thesis presentation – May 6, 2003 – p. 37/48

slide-57
SLIDE 57

Joining subgraphs — conclusions

  • We have characterizations for when we can join

two upward planar graphs to obtain a larger upward planar graph.

  • This allows us, in some cases, to join upward

planar biconnected graphs.

Master’s thesis presentation – May 6, 2003 – p. 38/48

slide-58
SLIDE 58

Biconnected graphs

  • a triconnected graph has a unique planar

embedding (Diestel 2000)

  • how many embeddings does a biconnected graph

have?

  • find a bound on the number of embeddings
  • test each embedding for upward planarity

(Bertolazzi et al. 1994)

Master’s thesis presentation – May 6, 2003 – p. 39/48

slide-59
SLIDE 59

Biconnected graphs — outline

We obtain our bound by first considering a restricted case, and building up on this case.

  • two triconnected components that share a common

vertex

  • k triconnected components that share a common

vertex

  • k triconnected components

Master’s thesis presentation – May 6, 2003 – p. 40/48

slide-60
SLIDE 60

Two triconnected components

Given two triconnected components that share at least

  • ne common vertex, how many possible embeddings do

we have for the combined graph?

G2 G1

Master’s thesis presentation – May 6, 2003 – p. 41/48

slide-61
SLIDE 61

Two triconnected components

Given two triconnected components that share at least

  • ne common vertex, how many possible embeddings do

we have for the combined graph?

G1 G2

Master’s thesis presentation – May 6, 2003 – p. 41/48

slide-62
SLIDE 62

Two triconnected components

Given two triconnected components that share at least

  • ne common vertex, how many possible embeddings do

we have for the combined graph?

G1 G2

Master’s thesis presentation – May 6, 2003 – p. 41/48

slide-63
SLIDE 63

k triconnected components

Given k triconnected components that share at least one common vertex, how many possible embeddings do we have for the combined graph?

  • similar to two triconnected components
  • we must take into account the order of the

components around the common vertex.

1 2 3 4 1 4 2 3

(k − 1)!8k−1 possibilities

Master’s thesis presentation – May 6, 2003 – p. 42/48

slide-64
SLIDE 64

k triconnected components

How many embeddings do we have for a biconnected graph with k triconnected components?

k!8k−1

Master’s thesis presentation – May 6, 2003 – p. 43/48

slide-65
SLIDE 65

Algorithm

  • split G into k triconnected components

(O(n2) time — Hopcroft and Tarjan)

  • for each possible embedding of G, and each

possible outer face (k!8k−1n iterations)

  • test if the embedding is upward planar

(O(n2) time — Bertolazzi et al.) total time: O(k!8kn3)

Master’s thesis presentation – May 6, 2003 – p. 44/48

slide-66
SLIDE 66

Conclusions - edge contraction

The contracted graph is

  • upward planar:

? ? ? ?

  • not upward planar:
  • upward planar if and only if G←

ǫ is upward planar:

Master’s thesis presentation – May 6, 2003 – p. 45/48

slide-67
SLIDE 67

Conclusions - joining subgraphs

Characterizations for

  • v1 and v2 are both sources
  • v1 is a source
  • neither is a source nor sink

Master’s thesis presentation – May 6, 2003 – p. 46/48

slide-68
SLIDE 68

Conclusions - biconnected graphs

  • parameterized algorithm where the parameter k is

the number of triconnected components.

  • running time: O(k!8kn3)

Master’s thesis presentation – May 6, 2003 – p. 47/48

slide-69
SLIDE 69

Future work

  • parameterized algorithm for general graphs
  • explore other parameters, e.g. the number of

sources and sinks

  • upward planarity testing as a maximization

problem

  • more applications of parameterized complexity

techniques to graph drawing problems

Master’s thesis presentation – May 6, 2003 – p. 48/48