Rectangular Representation of Weighted Outerplanar Graphs Lorenz - - PowerPoint PPT Presentation

rectangular representation of weighted outerplanar graphs
SMART_READER_LITE
LIVE PREVIEW

Rectangular Representation of Weighted Outerplanar Graphs Lorenz - - PowerPoint PPT Presentation

Bachelor Colloquium Rectangular Representation of Weighted Outerplanar Graphs Lorenz Reinhart October 01, 2014 Supervisors Philipp Kindermann & Alexander Wolff Chair of Computer Science I Universit at W urzburg Motivation


slide-1
SLIDE 1

Rectangular Representation of Weighted Outerplanar Graphs

Chair of Computer Science I Universit¨ at W¨ urzburg Supervisors Philipp Kindermann & Alexander Wolff

Bachelor Colloquium Lorenz Reinhart October 01, 2014

slide-2
SLIDE 2

Motivation

Rectangular Cartograms: Representation of maps where every region is represented by a rectangle.

slide-3
SLIDE 3

Motivation

Rectangular Cartograms: DE DK NL BE FR CH AT CZ PL Representation of maps where every region is represented by a rectangle.

slide-4
SLIDE 4

Motivation

Rectangular Cartograms: DE DK NL BE FR CH AT CZ PL Representation of maps where every region is represented by a rectangle.

slide-5
SLIDE 5

Motivation

Rectangular Cartograms: DE DK NL BE FR CH AT CZ PL Representation of maps where every region is represented by a rectangle.

NE

slide-6
SLIDE 6

Motivation

Rectangular Cartograms: DE DK NL BE FR CH AT CZ PL Representation of maps where every region is represented by a rectangle.

NE

Problems: wrong representation of some maps graphs without geographic information

slide-7
SLIDE 7

Targets

draw the rectangles with the desired size

slide-8
SLIDE 8

Targets

draw the rectangles with the desired size every rectangular representation should be possible to draw

slide-9
SLIDE 9

Targets

draw the rectangles with the desired size every rectangular representation should be possible to draw no need for a surrounding rectangle

slide-10
SLIDE 10

Targets

draw the rectangles with the desired size every rectangular representation should be possible to draw no need for a surrounding rectangle extension to general graphs DE DK NL BE FR CH AT CZ PL IT ES apple banana pear

  • range
slide-11
SLIDE 11

Targets

draw the rectangles with the desired size every rectangular representation should be possible to draw no need for a surrounding rectangle DE DK NL BE FR CH AT CZ PL IT ES apple banana pear

  • range

extension to general graphs?

slide-12
SLIDE 12

Targets

draw the rectangles with the desired size every rectangular representation should be possible to draw no need for a surrounding rectangle DE DK NL BE FR CH AT CZ PL IT ES apple banana pear

  • range

extension to general graph classes!

slide-13
SLIDE 13

Basic Graphs

Graph G = (V , E)

slide-14
SLIDE 14

Basic Graphs

Graph G = (V , E)

slide-15
SLIDE 15

Basic Graphs

Graph G = (V , E)

slide-16
SLIDE 16

Basic Graphs

A Planar Graph G = (V , E) can be drawn in such a way that no edges cross each other

slide-17
SLIDE 17

Basic Graphs

A Planar Graph G = (V , E) can be drawn in such a way that no edges cross each other Dual Graph G*=(V*,E*): a vertex corresponding to each face of G an edge joining two neighboring faces for each edge in G

slide-18
SLIDE 18

Maximal Outerplanar Graphs

Outerplanar graph: all vertices belong to the unbounded face

slide-19
SLIDE 19

Maximal Outerplanar Graphs

Outerplanar graph: all vertices belong to the unbounded face

slide-20
SLIDE 20

Maximal Outerplanar Graphs

Outerplanar graph: all vertices belong to the unbounded face Maximal outerplanar Graph: cannot have any additional edges while preserving outerplanarity

slide-21
SLIDE 21

Maximal Outerplanar Graphs

Outerplanar graph: all vertices belong to the unbounded face Maximal outerplanar Graph: cannot have any additional edges while preserving outerplanarity Every surface is surrounded by a triangle!

slide-22
SLIDE 22

Rectangles

Rectangular representation v A vertex v is corresponding to a rectangle r(v) with size a(v) y x a(v) r(v)

slide-23
SLIDE 23

Rectangles

Rectangular representation v A vertex v is corresponding to a rectangle r(v) with size a(v) y x lv rv ∆xv a(v) r(v)

slide-24
SLIDE 24

Rectangles

Rectangular representation v A vertex v is corresponding to a rectangle r(v) with size a(v) y x tv bv lv rv ∆xv a(v) ∆yv r(v)

slide-25
SLIDE 25

Rectangles

Rectangular representation v ∈ V r ∈ R r : V → R v v ∈ V a ∈ A a : V → A A vertex v is corresponding to a rectangle r(v) with size a(v) y x tv bv lv rv ∆xv a(v) ∆yv r(v)

slide-26
SLIDE 26

Rectangles

Rectangular representation v u r(u) r(v) u, v ∈ V and uv ∈ E → r(u) and r(v) are adjacent

slide-27
SLIDE 27

Faces and Corners

slide-28
SLIDE 28

Faces and Corners

slide-29
SLIDE 29

Faces and Corners

slide-30
SLIDE 30

Faces and Corners

Not planar!

slide-31
SLIDE 31

Faces and Corners

Not outerplanar!

slide-32
SLIDE 32

Faces and Corners

There are only corners with at most three involved rectangles!

slide-33
SLIDE 33

Placing the first two rectangles

u0 u1 u2 u3 u4 u5

slide-34
SLIDE 34

Placing the first two rectangles

u0 u1 u2 u3 u4 u5 r(u0) r(u1)

slide-35
SLIDE 35

Placing the first two rectangles

u0 u1 u2 u3 u4 u5 r(u0) r(u1) Draw the two rectangles neighboring each other with: the same height at the bottom and the same width bu0 = bu1 and ∆xu0 = ∆xu1

slide-36
SLIDE 36

Placing the first two rectangles

u0 u1 u2 u3 u4 u5 r(u0) r(u1) If a(u0) = a(u1) we don’t get a new edge to place the next rectangle

slide-37
SLIDE 37

Placing the first two rectangles

u0 u1 u2 u3 u4 u5 r(u0) r(u1) If a(u0) = a(u1) we don’t get a new edge to place the next rectangle → Reduce the width of one rectangle!

slide-38
SLIDE 38

Treatment of an inner facet

u0 u1 u2 u3 u4 u5 u0 u1 u2 u3 u4 u5 r(u0) r(u1) r(u4) is adjacent to r(u0) and r(u1)

slide-39
SLIDE 39

Treatment of an inner facet

u0 u1 u2 u3 u4 u5 u0 u1 u2 u3 u4 u5 r(u0) r(u1) r(u4) is adjacent to r(u0) and r(u1) r(u4) Place r(u4) on top of the rectangle with the lower top edge bu4 = tu0

slide-40
SLIDE 40

Treatment of an inner facet

u0 u1 u2 u3 u4 u5 u0 u1 u2 u3 u4 u5 r(u0) r(u1) r(u4) is adjacent to r(u0) and r(u1) r(u4) bu4 = tu0 and ru4 = lu1 Place r(u4) on top of the rectangle with the lower top edge and to the left of the other one

slide-41
SLIDE 41

Treatment of an inner facet

u0 u1 u2 u3 u4 u5 u0 u1 u2 u3 u4 u5 r(u0) r(u1) r(u4) is adjacent to r(u0) and r(u1) r(u4) Leave free space for the rectangles adjacent to r(u0) and r(u4)

  • r r(u1) and r(u4)

∆xu4 = 0.5 · Free(u0)

slide-42
SLIDE 42

Treatment of an inner facet

r(u4) u0 u1 u2 u3 u4 u5 u0 u1 u2 u3 u4 u5 r(u0) r(u1) What can we do if there is no free space?

slide-43
SLIDE 43

Treatment of an inner facet

u0 u1 u2 u3 u4 u5 u0 u1 u2 u3 u4 u5 r(u0) r(u1) What can we do if there is no free space? r(u4) → Reduce the width of the new rectangle!

slide-44
SLIDE 44

Treatment of an inner facet

u0 u1 u2 u3 u4 u5 u0 u1 u2 u3 u4 u5 r(u0) r(u1) r(u4) The new Rectangle r(u4) is adjacent to r(u0) and r(u1) Possibility to place the two rectangles neighboring r(u0) and r(u4) or r(u1) and r(u4)

slide-45
SLIDE 45

Finishing the graph

u0 u1 u2 u3 u4 u5 u0 u1 u2 u3 u4 u5 r(u0) r(u1) r(u4) Choose one direction to work on first

slide-46
SLIDE 46

Finishing the graph

r(u0) r(u1) r(u4) Choose one direction to work on first u0 u1 u2 u3 u4 u5 u0 u1 u2 u3 u4 u5 r(u5) Place r(u5) next to r(u0) and r(u4)

slide-47
SLIDE 47

Finishing the graph

r(u0) r(u1) r(u4) Choose one direction to work on first u0 u1 u2 u3 u4 u5 u0 u1 u2 u3 u4 u5 r(u5) r(u3) Place r(u5) next to r(u0) and r(u4) Place r(u3) next to r(u1) and r(u4)

slide-48
SLIDE 48

Finishing the graph

r(u0) r(u1) r(u4) Choose one direction to work on first u0 u1 u2 u3 u4 u5 u0 u1 u2 u3 u4 u5 r(u5) r(u3) r(u2) Place r(u5) next to r(u0) and r(u4) Place r(u3) next to r(u1) and r(u4) Place r(u2) next to r(u1) and r(u3)

slide-49
SLIDE 49

Proof of correctness

The correctness is proved by induction on the number of rectangles placed so far.

slide-50
SLIDE 50

Proof of correctness

The correctness is proved by induction on the number of rectangles placed so far. Graph Gk = (Vk, Ek) is a subgraph of the graph G = (V , E) to be drawn with

slide-51
SLIDE 51

Proof of correctness

The correctness is proved by induction on the number of rectangles placed so far. Graph Gk = (Vk, Ek) is a subgraph of the graph G = (V , E) to be drawn with Vk ⊆ V and Ek = {(u, v) ∈ E | u, v ∈ Vk} and Gk has a rectangular representation with k placed rectangles.

slide-52
SLIDE 52

Proof of correctness

The correctness is proved by induction on the number of rectangles placed so far. Invariant: There is a free corner for the next rectangle r(w) to be placed with w ∈ V \ Vk, in such a way that it is adjacent to its predecessors r(u) and r(v) with u, v ∈ Vk. Graph Gk = (Vk, Ek) is a subgraph of the graph G = (V , E) to be drawn with Vk ⊆ V and Ek = {(u, v) ∈ E | u, v ∈ Vk} and Gk has a rectangular representation with k placed rectangles.

slide-53
SLIDE 53

Proof of correctness

The correctness is proved by induction on the number of rectangles placed so far. Graph Gk = (Vk, Ek) is a subgraph of the graph G = (V , E) to be drawn with Vk ⊆ V and Ek = {(u, v) ∈ E | u, v ∈ Vk} and Gk has a rectangular representation with k placed rectangles. Invariant: There is a free corner for the next rectangle r(w) to be placed with w ∈ V \ Vk, in such a way that it is adjacent to its predecessors r(u) and r(v) with u, v ∈ Vk.

slide-54
SLIDE 54

Proof of correctness

u0 u1 u2 u3 u4 u5 r(u0) r(u1) G2

slide-55
SLIDE 55

Proof of correctness

u0 u1 u2 u3 u4 u5 r(u0) r(u1) G2 The invariant is fulfilled because we have one corner where r(u4) can be placed adjacent to its predecessors r(u0) and r(u1)

slide-56
SLIDE 56

Proof of correctness

u0 u1 u2 u3 u4 u5 r(u0) r(u1) G2 The invariant is fulfilled because we have one corner where r(u4) can be placed adjacent to its predecessors r(u0) and r(u1) r(u4)

slide-57
SLIDE 57

Proof of correctness

r(u0) r(u1) The invariant is fulfilled because we have one corner where r(u4) can be placed adjacent to its predecessors r(u0) and r(u1) r(u4) u0 u1 u2 u3 u4 u5 G3

slide-58
SLIDE 58

Proof of correctness

r(u0) r(u1) The invariant is fulfilled because we have one corner where r(u4) can be placed adjacent to its predecessors r(u0) and r(u1) r(u4) u0 u1 u2 u3 u4 u5 G3 There is a corner for r(u5) and r(u3) where they can be placed adjacent to their predecessors.

slide-59
SLIDE 59

Outerplanar Graphs

Outerplanar graph: all vertices belong to the unbounded face u0 u1 u2 u3 u4 u5

slide-60
SLIDE 60

Outerplanar Graphs

Outerplanar graph: all vertices belong to the unbounded face r(u0) r(u1) r(u4) r(u5) r(u3) r(u2) u0 u1 u2 u3 u4 u5

slide-61
SLIDE 61

Outerplanar Graphs

Outerplanar graph: all vertices belong to the unbounded face but not all faces are triangles! r(u0) r(u1) r(u4) r(u5) r(u3) r(u2) u0 u1 u2 u3 u4 u5

slide-62
SLIDE 62

Outerplanar Graphs

Outerplanar graph: all vertices belong to the unbounded face but not all faces are triangles! u0 u1 u2 u3 u4 u5 r(u1) and r(u4) are not adjacent anymore r(u0) r(u1) r(u4) r(u5) r(u3) r(u2)

slide-63
SLIDE 63

Outerplanar Graphs

Outerplanar graph: all vertices belong to the unbounded face but not all faces are triangles! r(u1) and r(u4) are not adjacent anymore r(u0) r(u1) r(u4) r(u5) r(u3) r(u2) u0 u1 u2 u3 u4 u5 There are vertices that are connected with only one edge

slide-64
SLIDE 64

Outerplanar Graphs

Outerplanar graph: all vertices belong to the unbounded face but not all faces are triangles! r(u1) and r(u4) are not adjacent anymore u0 u1 u2 u3 u4 u5 There are vertices that are connected with only one edge r(u0) r(u1) r(u4) r(u5) r(u3) r(u2)

slide-65
SLIDE 65

Dummy-nodes

u0 u1 u2 u3 u4 u5

slide-66
SLIDE 66

Dummy-nodes

u0 u1 u2 u3 u4 u5 Insert an inner dummy-node v ∈ Vi for every not triangular inner face and connect it to the surrounding vertices with vu ∈ Ei. v

slide-67
SLIDE 67

Dummy-nodes

u0 u1 u2 u3 u4 u5 Insert an inner dummy-node v ∈ Vi for every not triangular inner face and connect it to the surrounding vertices with vu ∈ Ei. v Insert an outer dummy-node w ∈ Va for every separating vertex in the graph and add the edges wu ∈ Ea. w

slide-68
SLIDE 68

Dummy-nodes

u0 u1 u2 u3 u4 u5 Insert an inner dummy-node v ∈ Vi for every not triangular inner face and connect it to the surrounding vertices with vu ∈ Ei. v Insert an outer dummy-node w ∈ Va for every separating vertex in the graph and add the edges wu ∈ Ea. w G ′ = (V ′, E ′) = (V ∪ Vi ∪ Va, E ∪ Ei ∪ Ea)

slide-69
SLIDE 69

Placing the first two rectangles

Start with an edge in E = E ′ \ {Ea ∪ Ei} u0 u1 u2 u3 u4 u5 v w

slide-70
SLIDE 70

Placing the first two rectangles

Start with an edge in E = E ′ \ {Ea ∪ Ei} u0 u1 u2 u3 u4 u5 v w r(u0) r(u1)

slide-71
SLIDE 71

Placing the first two rectangles

Start with an edge in E = E ′ \ {Ea ∪ Ei} u0 u1 u2 u3 u4 u5 v w r(u0) r(u1) Differentiate between three cases: Inner dummy-node v ∈ Vi Outer dummy-node v ∈ Va Normal vertex v ∈ V = V ′ \ {Vi ∪ Va}

slide-72
SLIDE 72

An inner dummy-node

u0 u1 u2 u3 u4 u5 v w r(u0) r(u1) Place the free space corresponding to the node v

slide-73
SLIDE 73

An inner dummy-node

r(u0) r(u1) Place the free space corresponding to the node v Place r(v) on top of the rectangle with the lower top edge u0 u1 u2 u3 u4 u5 v w r(v)

slide-74
SLIDE 74

An inner dummy-node

r(u0) r(u1) Place the free space corresponding to the node v Place r(v) on top of the rectangle with the lower top edge The top edge of r(v) must be below the top edge of r(u1) with tv = 1/2 · (tu0 + tu1) u0 u1 u2 u3 u4 u5 v w r(v)

slide-75
SLIDE 75

An inner dummy-node

r(u0) r(u1) u0 u1 u2 u3 u4 u5 v w Place the free space corresponding to the node v Place r(v) on top of the rectangle with the lower top edge The top edge of r(v) must be below the top edge of r(u1) with tv = 1/2 · (tu0 + tu1) Walk clockwise around the inner dummy-node r(v)

slide-76
SLIDE 76

An inner dummy-node

r(u0) r(u1) Place all following vertices on top of r(v) except the last one r(u3) u0 u1 u2 u3 u4 u5 v w r(v)

slide-77
SLIDE 77

An inner dummy-node

r(u0) r(u1) Place all following vertices on top of r(v) except the last one The last but one rectangle, in this case r(u3), must fill the remaining free space on top of r(v) r(u3) u0 u1 u2 u3 u4 u5 v w r(v)

slide-78
SLIDE 78

An inner dummy-node

r(u0) r(u1) Place all following vertices on top of r(v) except the last one The last but one rectangle, in this case r(u3), must fill the remaining free space on top of r(v) r(u3) r(v) The last rectangle must connect its predecessor with the first rectangle r(u4) u0 u1 u2 u3 u4 u5 v w

slide-79
SLIDE 79

An inner dummy-node

r(u0) r(u1) r(u3) r(v) If r(u4) is too small to connect both rectangles reduce the width to increase its height r(u4) u0 u1 u2 u3 u4 u5 v w

slide-80
SLIDE 80

An inner dummy-node

r(u0) r(u1) r(u3) r(v) r(u4) If r(u4) is too small to connect both rectangles reduce the width to increase its height u0 u1 u2 u3 u4 u5 v w All rectangles adjacent to r(v) have been placed correctly → Finally visit all adjacent faces in G ′

slide-81
SLIDE 81

An outer dummy-node

u0 u1 u2 u3 u4 u5 v w r(u0) r(u1) r(u3) r(v) r(u4) Insert the outer dummy-node into the rectangular representation with size a(w) = 1

slide-82
SLIDE 82

An outer dummy-node

r(u0) r(u1) r(u3) r(v) r(u4) Insert the outer dummy-node into the rectangular representation with size a(w) = 1 r(w) u0 u1 u2 u3 u4 u5 v w

slide-83
SLIDE 83

An outer dummy-node

r(u0) r(u1) r(u3) r(v) r(u4) Insert the outer dummy-node into the rectangular representation with size a(w) = 1 r(w) Add the rectangle r(u2) adjacent to the dummy-node and the separating vertex r(u2) u0 u1 u2 u3 u4 u5 v w

slide-84
SLIDE 84

An outer dummy-node

r(u0) r(u1) r(u3) r(v) r(u4) Insert the outer dummy-node into the rectangular representation with size a(w) = 1 r(w) Add the rectangle r(u2) adjacent to the dummy-node and the separating vertex r(u2) u0 u1 u2 u3 u4 u5 v w r(u5)

slide-85
SLIDE 85

Proof of correctness for outerplanar graphs

The correctness is proved similarly to the maximal outerplanar graphs by induction on the number of placed rectangles

slide-86
SLIDE 86

Proof of correctness for outerplanar graphs

The correctness is proved similarly to the maximal outerplanar graphs by induction on the number of placed rectangles Distinguish between normal node, inner and outer dummy-node: → Process all faces adjacent to a dummy-node in one step!

slide-87
SLIDE 87

Proof of correctness for outerplanar graphs

The correctness is proved similarly to the maximal outerplanar graphs by induction on the number of placed rectangles Distinguish between normal node, inner and outer dummy-node: → Process all faces adjacent to a dummy-node in one step! u0 u1 u2 r(u1) r(u0) w r(w) u3 r(u2) u4 u12 u23 u34 u40 u01 r(u12) r(u3) r(u4) r(u23) r(u34) r(u40)

slide-88
SLIDE 88

Proof of correctness for outerplanar graphs

u0 u1 u2 r(u1) r(u0) w r(w) u3 r(u2) u4 u12 u23 u34 u40 u01 r(u12) r(u3) r(u4) r(u23) r(u34) r(u40) Invariant: There is a free corner for the next rectangle r(w) to be placed with w ∈ V \ Vk, in such a way that it is adjacent to its predecessors r(u) and r(v) with u, v ∈ Vk.

slide-89
SLIDE 89

K-outerplanar graphs

A graph is k-outerplanar if removing all vertices on the outer face in its embedding results in a (k − 1)-outerplanar graph

slide-90
SLIDE 90

K-outerplanar graphs

A graph is k-outerplanar if removing all vertices on the outer face in its embedding results in a (k − 1)-outerplanar graph u0 u1 u2 u3 u4 u5 G

slide-91
SLIDE 91

K-outerplanar graphs

A graph is k-outerplanar if removing all vertices on the outer face in its embedding results in a (k − 1)-outerplanar graph G is a 2-outerplanar graph: removing all vertices on the unbounded face results in a 1-outerplanar graph u1 u4 u5 G

slide-92
SLIDE 92

K-outerplanar graphs

A graph is k-outerplanar if removing all vertices on the outer face in its embedding results in a (k − 1)-outerplanar graph u0 u1 u2 u3 u4 u5 G G is a 2-outerplanar graph: removing all vertices on the unbounded face results in a 1-outerplanar graph

slide-93
SLIDE 93

K-outerplanar graphs

A graph is k-outerplanar if removing all vertices on the outer face in its embedding results in a (k − 1)-outerplanar graph u0 u1 u2 u3 u4 u5 G G is a 2-outerplanar graph: removing all vertices on the unbounded face results in a 1-outerplanar graph r(u5) r(u1) r(u2) r(u3) r(u4)

slide-94
SLIDE 94

K-outerplanar graphs

A graph is k-outerplanar if removing all vertices on the outer face in its embedding results in a (k − 1)-outerplanar graph u0 u1 u2 u3 u4 u5 G G is a 2-outerplanar graph: removing all vertices on the unbounded face results in a 1-outerplanar graph r(u5) r(u1) r(u2) r(u3) r(u4) It is not possible to draw r(u0) adjacent to all rectangles surrounding r(u5)!

slide-95
SLIDE 95

K-outerplanar graphs

A graph is k-outerplanar if removing all vertices on the outer face in its embedding results in a (k − 1)-outerplanar graph u0 u1 u2 u3 u4 u5 G G is a 2-outerplanar graph: removing all vertices on the unbounded face results in a 1-outerplanar graph r(u5) r(u1) r(u2) r(u3) r(u4) It is not possible to draw r(u0) adjacent to all rectangles surrounding r(u5)! There are 2-outerplanar graphs, which can not be drawn!

slide-96
SLIDE 96

Recapitulation

Draw the rectangles with the desired size

slide-97
SLIDE 97

Recapitulation

Draw the rectangles with the desired size No need for a surrounding rectangle

slide-98
SLIDE 98

Recapitulation

Draw the rectangles with the desired size No need for a surrounding rectangle Extension to general graph classes

slide-99
SLIDE 99

Recapitulation

Draw the rectangles with the desired size No need for a surrounding rectangle Extension to general graph classes Every rectangular representation is possible to draw

slide-100
SLIDE 100

Recapitulation

Draw the rectangles with the desired size No need for a surrounding rectangle Extension to general graph classes Every rectangular representation is possible to draw

slide-101
SLIDE 101

Recapitulation

Draw the rectangles with the desired size No need for a surrounding rectangle Extension to general graph classes Every rectangular representation is possible to draw Future work: Improve the aspect ratio of the rectangles with a better distribution of the free space on top of the rectangles

slide-102
SLIDE 102

Recapitulation

Draw the rectangles with the desired size No need for a surrounding rectangle Extension to general graph classes Every rectangular representation is possible to draw Future work: Improve the aspect ratio of the rectangles with a better distribution of the free space on top of the rectangles Consider other graph classes, e.g. series-parallel graphs

slide-103
SLIDE 103

Recapitulation

Draw the rectangles with the desired size No need for a surrounding rectangle Extension to general graph classes Every rectangular representation is possible to draw Future work: Improve the aspect ratio of the rectangles with a better distribution of the free space on top of the rectangles Consider other graph classes, e.g. series-parallel graphs Thank you for your attention! Questions?