Therese Biedl Debajyoti Mondal Mondal Department of Computer Science University of Saskatchewan,...

Post on 24-Apr-2020

7 views 0 download

transcript

GD 2017 September 25, 2017

Debajyoti Mondal

Department of Computer Science

University of Saskatchewan, Canada

Therese Biedl

Cheriton School of Computer Science

University of Waterloo, Canada

2GD 2017 September 25, 2017

G A planar drawing

on a 4×4 grid.

[Krug and Wagner 2008, Biedl 2014]

NP-hard for

• Arbitrary planar graphs

• Planar graphs with bounded pathwidth

• Outerplanar graphs

[M et al. 2008, Biedl 2014]

Polynomial time for

• Planar 3-trees

• Planar graphs with both bounded

treewidth and bounded face-degrees

3GD 2017 September 25, 2017

T

[Alam et al. 2008, M et al 2011, Biedl 2015]

Minimizing one dimension

• Upward drawings (rooted trees)

• Strictly-upward drawings (rooted trees)

• Non-upward drawings, height (unrooted trees)

Minimizing

Height

Minimizing

Width

4GD 2017 September 25, 2017

[Bhatt and Cosmadakis 1987, Gregori 1989, Brunner

and Matzeder 2010, Bachmaier and Matzeder 2013]

NP-hard for

• Drawing ordered/unordered trees on a k-grid, k ∈ {4,

6, 8}, with unit edge length

[Supowit and Reingold 1982]

NP-hard for

• Ordered trees - under constraints such as isomorphic

subtrees must be drawn identically, left and right child

must be placed on the left and right of their parent

T

5GD 2017 September 25, 2017

Straight-line drawings of Trees?

Upward straight-line drawings of rooted Trees?

Strictly upward straight-line drawings of rooted Trees?

Strictly upward straight-line drawings of ordered rooted Trees?

T

6GD 2017 September 25, 2017

T

r

r

a

b c

d

e

f

g

a c b

f

g

Does T admit a strictly-

upward drawing

on the given grid?

d

e

A strictly-upward drawing of T

• Straight-line planar drawing

• Every child is drawn strictly below to its parent

• The ordering of the children can be chosen

A given grid

7GD 2017 September 25, 2017

A reduction from Numerical 3-Dimensional Matching (N3DM)

• Instance: Positive integers ri , gi , bi , where 1 ≤ i ≤ k, and an integer B such

that Σi (ri + bi + gi) = k · B.

• Question: Do there exist permutations π and π/ of {1, . . . , k} such that

rπ(i) + bi + gπ/(i) = B for all 1 ≤ i ≤ k?

ri

524

bi

577

gi

327

ri

254

bi

577

gi

723

Σi (ri + bi + gi) = k · B

42 = 3 · 14

+

+

+

+

+

+

=

=

=

14

14

14

8GD 2017 September 25, 2017

Remains NP-hard under the following restrictions:

• gis are huge ∈ O(k4c)

• bis are odd and large ∈ O(k2c)

• ris are small ∈ O(kc)

A reduction from Numerical 3-Dimensional Matching (N3DM)

• Instance: Positive integers ri , gi , bi , where 1 ≤ i ≤ k, and an integer B such

that Σi (ri + bi + gi) = k · B.

• Question: Do there exist permutations π and π/ of {1, . . . , k} such that

rπ(i) + bi + gπ/(i) = B for all 1 ≤ i ≤ k?

9GD 2017 September 25, 2017

ri

524

bi

577

gi

327

B+2

Supporting paths

10GD 2017 September 25, 2017

ri

524

bi

577

gi

327

Spinal path

GD 2017

ri

524

bi

577

gi

327

11 September 25, 2017

Add wall vertices

GD 2017

ri

524

bi

577

gi

327

12 September 25, 2017

GD 2017

ri

524

bi

577

gi

327

13 September 25, 2017

GD 2017

ri

524

bi

577

gi

327

14 September 25, 2017

I has an affirmative solution if and only if

T admits a drawing on a (B+4)×(2k+3) grid

I

T

GD 2017 15 September 25, 2017

ri

524

bi

577

gi

327

ri

254

bi

577

gi

723

+

+

+

+

+

+

=

=

=

14

14

14

B

B+4

2k+3

GD 2017 16 September 25, 2017

ri

524

bi

577

gi

327

ri

254

bi

577

gi

723

+

+

+

+

+

+

=

=

=

14

14

14

B

B+4

2k+3

GD 2017 17 September 25, 2017

ri

524

bi

577

gi

327

ri

254

bi

577

gi

723

+

+

+

+

+

+

=

=

=

14

14

14

B

B+4

2k+3

GD 2017 18 September 25, 2017

ri

524

bi

577

gi

327

ri

254

bi

577

gi

723

+

+

+

+

+

+

=

=

=

14

14

14

B

B+4

2k+3

All the rows (except the topmost row)

must be completely used up by the nodes of the tree.

GD 2017 19 September 25, 2017

ri

254

bi

577

gi

723

+

+

+

+

+

+

=

=

=

14

14

14

B

B+4

2k+3

v1

The bottommost layer contains

• two vertices from the supporting paths and

• Wall vertices of the bottommost wall parent.

GD 2017 20 September 25, 2017

ri

254

bi

577

gi

723

+

+

+

+

+

+

=

=

=

14

14

14

B

B+4

2k+3

v1

The next wall parent (w3)

• can have at most two children on l8 and

• all the remaining children lie consecutively on l7

w4

w3

w2

w1

l8

l6

l7

l9

l1

GD 2017 21 September 25, 2017

ri

254

bi

577

gi

723

+

+

+

+

+

+

=

=

=

14

14

14

B

B+4

2k+3

v1

w3

w2

w1

The next wall parent (w3)

• can have at most two children on l8 and

• all the remaining children lie consecutively on l7

l8

l6

l7

l9

GD 2017 22 September 25, 2017

ri

254

bi

577

gi

723

+

+

+

+

+

+

=

=

=

14

14

14

B

B+4

2k+3

v1

???

w3

w2

w1

The next wall parent (w3)

• can have at most two children on l8 and

• all the remaining children lie consecutively on l7

l8

l6

l7

l9

GD 2017 23 September 25, 2017

ri

254

bi

577

gi

723

+

+

+

+

+

+

=

=

=

14

14

14

B

B+4

2k+3

v1

w3

w2

w1

The next wall parent (w3)

• can have at most two children on l8 and

• all the remaining children lie consecutively on l7

l8

l6

l7

l9

GD 2017 24 September 25, 2017

ri

254

bi

577

gi

723

+

+

+

+

+

+

=

=

=

14

14

14

B

B+4

2k+3

v1

w3

w2

w1

The remaining space is too large for two green stars.

l8

l6

l7

l9

GD 2017 25 September 25, 2017

ri

254

bi

577

gi

723

+

+

+

+

+

+

=

=

=

14

14

14

B

B+4

2k+3

v1

w3

w2

w1

The remaining space is too large for two green stars,

and placing two red stars would violate planarity.

l8

l6

l7

l9

GD 2017 26 September 25, 2017

ri

254

bi

577

gi

723

+

+

+

+

+

+

=

=

=

14

14

14

B

B+4

2k+3

v1

w3

w2

w1

The remaining space is too large for two green stars,

and placing two red stars would violate planarity.

l8

l6

l7

l9

GD 2017 27 September 25, 2017

ri

254

bi

577

gi

723

+

+

+

+

+

+

=

=

=

14

14

14

B

B+4

2k+3

v1

w3

w2

w1

The remaining space is too large for two green stars,

and placing two red stars would violate planarity.

Since all grid points must be used up, there can be exactly

one green and one red star defining a triple that sum to B.

l8

l6

l7

l9

GD 2017 September 25, 201728

Straight-line drawings of Trees?

Upward straight-line drawings of rooted Trees?

Strictly upward straight-line drawings of rooted Trees?

Strictly upward straight-line drawings of ordered rooted Trees?

ri

254

bi

577

gi

723

+

+

+

+

+

+

=

=

=

14

14

14

B

ri

524

bi

577

gi

327