rectangle visibility graphs: characterization, construction, compaction ileana streinu (smith) sue...

29
Rectangle Visibility Graphs: Characterization, Construction, Compaction Ileana Streinu (Smith) Sue Whitesides (McGill U.)

Post on 20-Dec-2015

217 views

Category:

Documents


2 download

TRANSCRIPT

Rectangle Visibility Graphs:Characterization, Construction,

Compaction

Ileana Streinu (Smith)

Sue Whitesides (McGill U.)

Rectangle Visibility Graphs

We study horizontal and vertical visibilities of non-overlapping, axis aligned rectangles in 2D .

A

B

C

D

A

BC

D

a) a set of rectangles b) their visibility graph

Rectangles are open; visibility lines are “thick” but may have 0 length.

Rectangle Visibility Graph Recognition

Problemgiven: graph G = (V,E)question: Can G be realized as the visibility graph of rectangles?

A

BC

D

A

B

C

D

?

NP-complete (Shermer)

Missing Information …

• horizontal vs. vertical visibility• direction info. (e.g, north, east)

A

BD

. . . .

B sees A vertically, to the north;

B sees D horizontally, to the east

… missing information …

• multiple edges

A

B

C

D

A sees C on both sides of B .

….

…. missing information …

• the cyclic ordering of visibilities around a rectangle

A

B

C

D

Traversing the boundary of B clockwise, starting at the upper left corner, the bug sees

A to the north, then

D to the east, then

C to the south.

….

…. missing information

• which rectangles can see infinitely far in some direction

A

B

C

D

e.g., B sees infinitely far to the west; D sees infinitely far in 4 directions.

A Frame for the Rectangles

A

B

C

D

N

S

EW

We add 4 new rectangles to capture seeing infinitely far.

New Notion of Visibility Graph

We redefine the visibility graph of a set of rectangles to capture the missing topological information.

Given a set of rectangles, weGiven a set of rectangles, we

• frame the set

• define a graph define a graph DDV V which captures vertical visibilitieswhich captures vertical visibilities

• define a graph define a graph DDHH which captures horizontal visibilities which captures horizontal visibilities

as follows …

The Vertical Visibility Graph DV

of a set of given rectangles

A

B

C

D

N

S

DV is an s,t graphs,t graph ::

• planar DAG

• embedded

• 2-connected underlying graph

• single source, single sink

• source and sink on outside face

The Horizontal Visibility Graph DH

of a given set of rectangles

E

WA

B

C

D

DH is an s,t graphs,t graph

Topological Rectangle Visibility Graphs ( TRVG s)

Definition: A (pseudo) topological rectangle visibility graph

is a pair ( DV , DH ) of s,t graphs ;

i.e., it is a combinatorial, topological structure that might arise from the visibilities of some set of rectangles.

Notation: A set R of rectangles gives rise to a topological rectangle visibility graph , denoted

( DV ( ) , DH ( ) ) . R R

New Problem:

Given a topological rectangle visibility graph ( DV , DH ) , does there exist a set of rectangles R

such that

( DV , DH ) = ( DV ( ) , DH ( ) ) ? R R

This is the TRVG Recognition problem .

Our Results

• a combinatorial, topological characterization of TRVG’s• a polynomial time algorithm that tests whether a

(pseudo) TRVG arises from some set or rectangles, and if so, constructs such a set

In fact, if rectangles are required to have all corners at grid points, our construction gives a set of rectangles whose bounding box has minimum possible width and minimum possible height.

R

Possible Application: Compaction

Given a set of rectangles whose visibilities we would like to preserve , we can in linear time :

• compute ( DV ( ) , DH ( ) )

(no need to apply the recognition algorithm)• apply our construction algorithm to produce a new,

optimally compact set

R

R R

R’

Prerequisites for stating the characterization

Since DV and DH are embedded, planar graphs, they

have duals.

notation: The dual of DV is DV* ; the dual of DH is DH*

Watch out ! The dual of DV is not equal to DH .

DV* = DH ; DH* = DV

/ /

fact: The dual of an s,t graph is also an s,t graph; hence

DV , DH , DV*, and DH* are all s,t graphs.

Another Prequisite:

Fact: At any node of an s,t graph, the incoming and outgoing arcs are separated.

u

the right face of uthe left face of u

Notation for the Dual Graphs

u

the right face of u

the left face of u

node

LV*(u)

node

RV*(u)

DV*

Arcs of DV* cross arcs of DV left to right.

DH* similarly has LH*(u) and RH*(u)

(but dual arcs cross primal ones right to left)

Our Characterization of TRVG’s

Theorem. A pair ( DV , DH ) of s,t graphs can be realized as the

TRVG of some set of rectangles if and only if 1) AND 2) hold:

Weaves together properties of 4 distinct graphs DV , DH , DV*, DH* .

u

v

in DVLH*(u)

RH*(v)

AND

in DH*

uv

in DHRV*(u)

LV*(v)

in DV*

1) for all u, v in DV

IF THEN

2) for all u, v in DH

IF THEN

Intuition for the Necessity of the Conditions

E

A

B

C

D

W

LH*( C)

RH*( A)

There is a path of vertical visibilities from C to A . Use the

vertical visibility segments to cross the edges of DH to get

a path from LH*( C ) to RH*( A ) in DH* .

The Construction of the Rectangle Setwhen ( DV, DH ) passes conditions 1) and 2)

• Compute DV* and DH*

• Assign 0 to the source node in each of the two dual graphs DV* and DH*

• Number all other nodes of DV* and DH* by the length

of a longest path from the respective source• Make a rectangle for each node u :

u

# LV*(u) # RV*(u)

# LH*(u)

# RH*(u)

A Tool for the Proof of Correctness of Construction

Lemma (Tamassia and Tollis): In an s,t graph such as DV ,

for each pair of nodes u,v , exactly one of the following holds:

1. DV has a directed path from u to v OR

2. DV has a directed path from v to u OR

3. DV* has a directed path from RV* ( u ) to LV *( v ) OR

4. DV* has a directed path from RV*( v ) to LV*( u ) .

This lemma appeared in their characterization of bar visibility graphs . Part of our motivation was to generalize their results (obtained also by Wismath).

Conclusion

• Extensions to higher dimensions? Not by these techniques – 3D vertical visibility graphs of floating rectangles need not be planar

• Faster algorithm for testing conditions 1) and 2) ?

A

B

C

D

N

S

E

A

D

B

C

N

S

EWA

example at A :

Horizontal visibilities at A , in E and W sectors

Record all the topological visibility information.

A New Notion of Visibility Graph

Missing Information

• horizontal vs. vertical visibility• direction info. (e.g, east, north)• multiple edges• cyclic ordering of visibilities around a vertex• which rectangles can see infinitely far to the north, east,

south, west

intuition

A

B

C

D

N

S

Intuition

E

A

WB

C

D

N

S