Sketched Representations and Orthogonal Planarity of Bounded - - PowerPoint PPT Presentation

sketched representations and orthogonal planarity of
SMART_READER_LITE
LIVE PREVIEW

Sketched Representations and Orthogonal Planarity of Bounded - - PowerPoint PPT Presentation

Sketched Representations and Orthogonal Planarity of Bounded Treewidth Graphs Emilio Di Giacomo, Giuseppe Liotta, Fabrizio Montecchiani University of Perugia, Italy GD 2019, September 17-20, 2019, Pr uhonice/Prague Orthogonal Drawings An


slide-1
SLIDE 1

Sketched Representations and Orthogonal Planarity of Bounded Treewidth Graphs

Emilio Di Giacomo, Giuseppe Liotta, Fabrizio Montecchiani University of Perugia, Italy

GD 2019, September 17-20, 2019, Pr˚ uhonice/Prague

slide-2
SLIDE 2

Orthogonal Drawings

An orthogonal drawing of a planar graph with max degree 4 is a planar drawing where each edge is drawn as a chain of horizontal and vertical segments.

slide-3
SLIDE 3

Orthogonal Drawings

An orthogonal drawing of a planar graph with max degree 4 is a planar drawing where each edge is drawn as a chain of horizontal and vertical segments.

Orthogonal drawing with 7 bends Orthogonal drawing with 4 bends Rectilinear (no bends) drawing

bend

slide-4
SLIDE 4

Orthogonal Drawings

An orthogonal drawing of a planar graph with max degree 4 is a planar drawing where each edge is drawn as a chain of horizontal and vertical segments.

Orthogonal drawing with 7 bends Orthogonal drawing with 4 bends Rectilinear (no bends) drawing

Every planar graph with max degree 4 (except the octahedron) admits an orthogonal drawing with at most 2 bends per edge and at most 2n + 2 bends in total [Biedl & Kant 1998]. bend

slide-5
SLIDE 5

Orthogonal Planarity

OrthogonalPlanarity: Given a planar graph G and an integer b, does G admit an orthogonal drawing with at most b bends?

G, b = 4

1 2 3 4

Γ

1 2 3 4

slide-6
SLIDE 6

Orthogonal Planarity

OrthogonalPlanarity: Given a planar graph G and an integer b, does G admit an orthogonal drawing with at most b bends?

  • NP-complete for b = 0 [Garg & Tamassia 2001].
  • NP-hard to approximate the minimum number of bends

with an O(n1−ε) error (ε > 0) [Garg & Tamassia 2001].

  • If G is 2-connected, FPT algorithm parametrized by the

number of degree-4 vertices [Didimo & Liotta 1998].

  • O(n4)-time algorithm for series-parallel graphs [Di Battista,

Liotta, Vargiu 1998].

G, b = 4

1 2 3 4

Γ

1 2 3 4

slide-7
SLIDE 7

Related Problems

HV-Planarity: Given planar graph G whose edges are each labeled H (horizontal) or V (vertical), does G admit a rectilinear drawing in which edge directions are consistent with their labels?

1 2 3 4 5 6 7 8 H V V V V V H H H H H V 1 2 3 4 5 6 7 8 V V H V V H H H

slide-8
SLIDE 8

Related Problems

HV-Planarity: Given planar graph G whose edges are each labeled H (horizontal) or V (vertical), does G admit a rectilinear drawing in which edge directions are consistent with their labels?

  • NP-complete [Didimo, Liotta, Patrignani 2019].
  • O(n4)-time algorithm for series-parallel graphs [Didimo, Liotta,

Patrignani 2019].

1 2 3 4 5 6 7 8 H V V V V V H H H H H V 1 2 3 4 5 6 7 8 V V H V V H H H

slide-9
SLIDE 9

Related Problems

FlexDraw: Given a planar graph G whose edges have integer weights, does G admit an orthogonal drawing where each edge has a number of bends that is at most its weight?

1 2 3 4 3 2 1 1 2 3 4 3 2 1

slide-10
SLIDE 10

Related Problems

FlexDraw: Given a planar graph G whose edges have integer weights, does G admit an orthogonal drawing where each edge has a number of bends that is at most its weight?

  • NP-complete [Garg & Tamassia 2001; Bl¨

asius, Krug, Rutter 2014].

  • O(n2)-time algorithm if weights are positive [Bl¨

asius, Krug, Rutter 2014].

  • FPT algorithm parametrized by the number of edges that

cannot be bent [Bl¨

asius, Lehmann, Rutter 2016].

1 2 3 4 3 2 1 1 2 3 4 3 2 1

slide-11
SLIDE 11

Contribution

slide-12
SLIDE 12

Contribution

Main Theorem: OrthogonalPlanarity (HV-Planarity, FlexDraw) can be solved in polynomial time for graphs of bounded treewidth.

  • The problems lie in the XP class parameterized by treewidth

(time complexity is ng(k), where k is the treewidth).

  • Can be used to minimize bends.
slide-13
SLIDE 13

Contribution

Main Theorem: OrthogonalPlanarity (HV-Planarity, FlexDraw) can be solved in polynomial time for graphs of bounded treewidth. Corollary: OrthogonalPlanarity (HV-Planarity) can be solved in O(n3 log n) time for series-parallel graphs.

  • The problems lie in the XP class parameterized by treewidth

(time complexity is ng(k), where k is the treewidth).

  • Can be used to minimize bends.
  • Improves on previous O(n4) bounds [Di Battista, Liotta, Vargiu

1998; Didimo, Liotta, Patrignani 2019].

slide-14
SLIDE 14

Proof Ideas & Tools

slide-15
SLIDE 15

An FPT Algorithm

  • Constructive proof based on FPT algorithm with parameters:

treewidth k, num. of degree-2 vertices σ and num. of bends b.

slide-16
SLIDE 16

An FPT Algorithm

Fine-grained Theorem: Let G be an n-vertex planar graph. Given a tree-decomposition of G of width k, there is an algorithm that decides OrthogonalPlanarity in f(k, σ, b) · n time, where f(k, σ, b) = kO(k)(σ + b)k log(σ + b). The algorithm computes a drawing of G, if one exists.

  • Constructive proof based on FPT algorithm with parameters:

treewidth k, num. of degree-2 vertices σ and num. of bends b.

slide-17
SLIDE 17

Tree-decomposition

A tree-decomposition of a graph G = (V, E) is a pair (X, T) s.t.:

1 2 3 4 5 6 7 8

slide-18
SLIDE 18

Tree-decomposition

A tree-decomposition of a graph G = (V, E) is a pair (X, T) s.t.:

3 6 7 3 7 8 4 7 8 3 1 3 5 2 7 8 4 8 5 3

  • X = {X1, X2, . . . , Xℓ} is a set of subsets of V called bags,

1 2 3 4 5 6 7 8

slide-19
SLIDE 19

Tree-decomposition

A tree-decomposition of a graph G = (V, E) is a pair (X, T) s.t.:

3 6 7 3 7 8 4 7 8 3 1 3 5 2 7 8 4 8 5 3

  • X = {X1, X2, . . . , Xℓ} is a set of subsets of V called bags,
  • T is a tree, each node is mapped to a bag of X,

1 2 3 4 5 6 7 8

slide-20
SLIDE 20

Tree-decomposition

A tree-decomposition of a graph G = (V, E) is a pair (X, T) s.t.:

3 6 7 3 7 8 4 7 8 3 1 3 5 2 7 8 4 8 5 3

  • X = {X1, X2, . . . , Xℓ} is a set of subsets of V called bags,
  • ∀(u, v) ∈ E, ∃Xi : u, v ∈ Xi,
  • ∀v ∈ V the bags containing v induces a non-empty subtree of T
  • T is a tree, each node is mapped to a bag of X,

1 2 3 4 5 6 7 8

slide-21
SLIDE 21

Tree-decomposition

A tree-decomposition of a graph G = (V, E) is a pair (X, T) s.t.:

3 6 7 3 7 8 4 7 8 3 1 3 5 2 7 8 4 8 5 3

  • X = {X1, X2, . . . , Xℓ} is a set of subsets of V called bags,
  • ∀(u, v) ∈ E, ∃Xi : u, v ∈ Xi,
  • ∀v ∈ V the bags containing v induces a non-empty subtree of T

The width of (X, T) is maxℓ

i=1 |Xi| − 1.

The treewidth of G is the minimum width over all its tree-decompositions.

  • T is a tree, each node is mapped to a bag of X,

1 2 3 4 5 6 7 8

width ≤ 3

slide-22
SLIDE 22

Nice Tree-decomposition

(X, T) is nice if T is a binary rooted tree and:

1 2 3 4 5 6 7 8

slide-23
SLIDE 23

Nice Tree-decomposition

(X, T) is nice if T is a binary rooted tree and:

  • (JOIN) if Xi has 2 children Xj and Xj′ then Xi = Xj = Xj′

1 2 3 4 5 6 7 8 378 378 4 85 3 4 85 3 4 85 3 378 367 367 367

slide-24
SLIDE 24

Nice Tree-decomposition

(X, T) is nice if T is a binary rooted tree and:

  • if Xi of T has only 1 child Xj then there is v ∈ V s.t. either
  • (JOIN) if Xi has 2 children Xj and Xj′ then Xi = Xj = Xj′

1 2 3 4 5 6 7 8 36 67 37 378 378 35 35 4 4 85 3 4 85 3 4 85 3 4 8 3 4 78 3 135 378 1 35 2 78 1 3 2 12 367 367 367

– (FORGET) Xi ∪ {v} = Xj – (INTRODUCE) Xi = Xj ∪ {v}, or

slide-25
SLIDE 25

Nice tree decomposition

IDEA: design a dynamic programming algorithm based on a nice tree-decomposition of the graph

slide-26
SLIDE 26

Nice tree decomposition

IDEA: design a dynamic programming algorithm based on a nice tree-decomposition of the graph

36 367

INTRODUCE vertex in all drawings

7 3 6 3 6 7

slide-27
SLIDE 27

Nice tree decomposition

IDEA: design a dynamic programming algorithm based on a nice tree-decomposition of the graph

135 1 35 2

FORGET (DEACTIVATE) vertex in all drawings

1 3 2 12 1 2 3 5 1 2 3 5

slide-28
SLIDE 28

Nice tree decomposition

IDEA: design a dynamic programming algorithm based on a nice tree-decomposition of the graph

67 37 378 378 35 35 4 4 85 3 4 85 3 4 85 3 4 8 3 4 78 3 378 78 1 3 2 12 367 367 36 135 1 35 2 367

JOIN all pairs of drawings

4 3 5 6 7 8 1 2 3 4 5 8 1 2 3 4 5 6 7 8

slide-29
SLIDE 29

Nice tree decomposition

IDEA: design a dynamic programming algorithm based on a nice tree-decomposition of the graph TODO: design abstract (small) records to replace drawings!

slide-30
SLIDE 30

Orthogonal Representations

An orthogonal representation of a plane graph G represents an equivalence class of orthogonal drawings with the same “shape”

[Tamassia, 1987].

π 2

π π π π π π π π

π 2 π 2 π 2 3π 2 π 2 π 2 π 2 π 2 π 2

  • 1
  • 1
  • 1
  • 2

π 2 3π 2

1 1 1 2

O(n) time

0 0 0 0

slide-31
SLIDE 31

Orthogonal Representations

An orthogonal representation of a plane graph G represents an equivalence class of orthogonal drawings with the same “shape”

[Tamassia, 1987].

It is a feasible assignment of angles to each vertex-face incidence and of integers to each edge-face incidence, where feasible means:

π 2

π π π π π π π π

π 2 π 2 π 2 3π 2 π 2 π 2 π 2 π 2 π 2

  • 1
  • 1
  • 1
  • 2

π 2 3π 2

1 1 1 2

2) The sum of the angles inside a face comply with an orthogonal polygon

π 2 + π 2 + π 2 +2· π 2 − π 2 =

π(4 − 2) = 2π

π 2 3π 2

1) The sum of the angles around a vertex is 2π

π 2 π 2 π 2 3π 2 2

O(n) time

0 0 0 0

slide-32
SLIDE 32

Orthogonal Sketches

ABSTRACT AWAY FROM GEOMETRY: ORTHOGONAL REP.

GOAL: Define “small” records to be assigned to bags

π 2

π π π π π π π π

π 2 π 2 π 2 3π 2 π 2 π 2 π 2 π 2 π 2

  • 1
  • 1
  • 1
  • 2

π 2 3π 2

1 1 1 2 0 0 0 0

slide-33
SLIDE 33

Orthogonal Sketches

ABSTRACT AWAY FROM GEOMETRY: ORTHOGONAL REP. FOCUS ON ACTIVE VERTICES (BAG)

GOAL: Define “small” records to be assigned to bags

π 2

π π π π π π π π

π 2 π 2 π 2 3π 2 π 2 π 2 π 2 π 2 π 2

  • 1
  • 1
  • 1
  • 2

π 2 3π 2

1 1 1 2 0 0 0 0

π 2

π π π π π π π π

π 2 π 2 π 2 3π 2 π 2 π 2 π 2 π 2 π 2

  • 1
  • 1
  • 1
  • 2

π 2 3π 2

1 1 1 2 0 0 0 0

slide-34
SLIDE 34

Orthogonal Sketches

ABSTRACT AWAY FROM GEOMETRY: ORTHOGONAL REP. FOCUS ON ACTIVE VERTICES (BAG) ABSTRACT AWAY FROM INACTIVE VERTICES: ORTHOGONAL SKETCHES∗

GOAL: Define “small” records to be assigned to bags

* Orthogonal sketches also contain dummy vertices/edges to preserve connectivity ROLL-UP NUMBER

π 2

π π π π π π π π

π 2 π 2 π 2 3π 2 π 2 π 2 π 2 π 2 π 2

  • 1
  • 1
  • 1
  • 2

π 2 3π 2

1 1 1 2 0 0 0 0

π 2

π π π π π π π π

π 2 π 2 π 2 3π 2 π 2 π 2 π 2 π 2 π 2

  • 1
  • 1
  • 1
  • 2

π 2 3π 2

1 1 1 2 0 0 0 0

  • 1+0+0=-1

1

  • 1

π π 1 1

π 2 π 2 π 2 3π 2

4 1

π 2 3π 2 π 2 π 2

  • 2

1

slide-35
SLIDE 35

Orthogonal Sketches

ABSTRACT AWAY FROM GEOMETRY: ORTHOGONAL REP. FOCUS ON ACTIVE VERTICES (BAG) ABSTRACT AWAY FROM INACTIVE VERTICES: ORTHOGONAL SKETCHES∗

Lemma: There are kO(k)(σ + b)k distinct orthogonal sketches.

* Orthogonal sketches also contain dummy vertices/edges to preserve connectivity ROLL-UP NUMBER

π 2

π π π π π π π π

π 2 π 2 π 2 3π 2 π 2 π 2 π 2 π 2 π 2

  • 1
  • 1
  • 1
  • 2

π 2 3π 2

1 1 1 2 0 0 0 0

π 2

π π π π π π π π

π 2 π 2 π 2 3π 2 π 2 π 2 π 2 π 2 π 2

  • 1
  • 1
  • 1
  • 2

π 2 3π 2

1 1 1 2 0 0 0 0

  • 1+0+0=-1

1

  • 1

π π 1 1

π 2 π 2 π 2 3π 2

4 1

π 2 3π 2 π 2 π 2

  • 2

1

slide-36
SLIDE 36

Orthogonal Sketches

Lemma: There are kO(k)(σ + b)k distinct orthogonal sketches.

  • kO(k) possible embeddings on O(k) vertices
slide-37
SLIDE 37

Orthogonal Sketches

Lemma: There are kO(k)(σ + b)k distinct orthogonal sketches.

  • kO(k) possible embeddings on O(k) vertices

– For each embedding we count: * Possible vertex-face angle assignments are 2O(k)

slide-38
SLIDE 38

Orthogonal Sketches

Lemma: There are kO(k)(σ + b)k distinct orthogonal sketches.

  • kO(k) possible embeddings on O(k) vertices

– For each embedding we count: * Possible vertex-face angle assignments are 2O(k) * Possible roll-up number assignments are (σ + b)k

slide-39
SLIDE 39

Orthogonal Sketches

Lemma: There are kO(k)(σ + b)k distinct orthogonal sketches.

  • kO(k) possible embeddings on O(k) vertices

– For each embedding we count: * Possible vertex-face angle assignments are 2O(k) * Possible roll-up number assignments are (σ + b)k |ρ(u, v)| ≤ σ + b + 4 how much a facial path rolls up depends on the number of bends and degree-2 vertices in the face

3 1 −4 π π π π ROLL-UP NUMBER

slide-40
SLIDE 40

Orthogonal Sketches

Lemma: There are kO(k)(σ + b)k distinct orthogonal sketches.

  • kO(k) possible embeddings on O(k) vertices

– For each embedding we count: * Possible vertex-face angle assignments are 2O(k) * Possible roll-up number assignments are (σ + b)k |ρ(u, v)| ≤ σ + b + 4 how much a facial path rolls up depends on the number of bends and degree-2 vertices in the face Roll-up numbers are not independent of each another, choosing k of them along a spanning tree fixes all the others

3 1 −4 π π π π ROLL-UP NUMBER

slide-41
SLIDE 41

Introduce Operation

INPUT: a set S of orthogonal sketches of a bag X and a vertex v

slide-42
SLIDE 42

Introduce Operation

INPUT: a set S of orthogonal sketches of a bag X and a vertex v for each orthogonal sketch o ∈ S: identify faces where v can be placed;

π 2

π π

π 2 π 2

π π 1 1 2

  • 2

1 2

π 2

π π

π 2 π 2

π π 1 1 2

  • 2

1 2

slide-43
SLIDE 43

Introduce Operation

INPUT: a set S of orthogonal sketches of a bag X and a vertex v for each orthogonal sketch o ∈ S: identify faces where v can be placed; foreach planar embedding: generate all roll-up number assignments for the new edges; keep only the shapes that are valid;

π 2

π π

π 2 π 2

π π 1 1 2

  • 2

1 2

π 2

π π

π 2 π 2

π π 1 1 2

  • 2

1 2

π π 1 −1

π π

OK

π 2

π

π 2 π 2

π π 1 1 2

  • 2

1 2

π 2

π

π 2 π 2

π π 1 1 2

  • 2

1 2 0 0 0 0

slide-44
SLIDE 44

Forget Operation

INPUT: a set S of orthogonal sketches of a bag X and a vertex v

π 2

π π

π 2 π 2

π π 1 1 2

  • 2

1 2

π 2

π

π 2

π π 1 3

  • 1

1 2

Update each orthogonal sketch o ∈ S

slide-45
SLIDE 45

Join Operation

INPUT: 2 sets of orthogonal sketches to be merged at a bag X

2π 2π π π −2 +2 −4 +4 π

3π 2 3π 2

π 2

+3 +2 −2 π

π 2 π 2

π π

π 2

More complex procedure to ensure efficiency.

slide-46
SLIDE 46

Open Problems & Future Work

slide-47
SLIDE 47

Open Problems & Future Work

  • 1. FPT algorithm for OrthogonalPlanarity parametrized by

treewidth and number of bends?

  • 2. Subcubic time complexity for series-parallel graphs?
  • 3. UpwardPlanarity and WindrosePlanarity

admit similar combinatorial characterizations based on vertex-angles. Our approach can be extended to prove that these problems can be solved in polynomial time on graphs

  • f bounded treewidth.
slide-48
SLIDE 48

Open Problems & Future Work

THANK YOU!