Comment reconstruire le graphe de visibilité d’un polygone? (Reconstructing visibility graphs of...

24
Comment reconstruire le graphe de visibilité d’un polygone? (Reconstructing visibility graphs of polygons) Jérémie Chalopin, Shantanu Das LIF, Aix-Marseille University Yann Disser, Matúš Mihalák, Peter Widmayer ETH Zurich, Suisse 12èmes Journées Graphes et Algorithmes, Marseille, 2010

Transcript of Comment reconstruire le graphe de visibilité d’un polygone? (Reconstructing visibility graphs of...

Page 1: Comment reconstruire le graphe de visibilité d’un polygone? (Reconstructing visibility graphs of polygons) Jérémie Chalopin, Shantanu Das LIF, Aix-Marseille.

Comment reconstruire le graphe de visibilité d’un polygone?

(Reconstructing visibility graphs of polygons)

Jérémie Chalopin, Shantanu DasLIF, Aix-Marseille University

Yann Disser, Matúš Mihalák, Peter WidmayerETH Zurich, Suisse

12èmes Journées Graphes et Algorithmes, Marseille, 2010

Page 2: Comment reconstruire le graphe de visibilité d’un polygone? (Reconstructing visibility graphs of polygons) Jérémie Chalopin, Shantanu Das LIF, Aix-Marseille.

10 Nov 2010 JGA 2010 @ Marseille 2

Robots in Polygons

• Robots move from vertex to vertex inside a polygon

• The polygon is – simple (no holes)

– finite

– of size n = # vertices

• Visibility restricted to straight lines.

Objectives:• Build a map of the polygon

• Rendezvous (Gathering of robots)

Page 3: Comment reconstruire le graphe de visibilité d’un polygone? (Reconstructing visibility graphs of polygons) Jérémie Chalopin, Shantanu Das LIF, Aix-Marseille.

10 Nov 2010 JGA 2010 @ Marseille 3

Visibility Graph of Polygons

Gvis(P):

• Vertices of Gvis <=> vertices of P

• Edge (u,v) in Gvis iff

u and v can see each-other.

(if the line u to v is inside P)

Objective:

• Construct Gvis

(up to isomorphism)

Page 4: Comment reconstruire le graphe de visibilité d’un polygone? (Reconstructing visibility graphs of polygons) Jérémie Chalopin, Shantanu Das LIF, Aix-Marseille.

10 Nov 2010 JGA 2010 @ Marseille 4

The Robot Model

• The robots sees a subset of the vertices.

• It can decide to move to one of the visible vertices

• It repeats its observation from its new location.

• The robot can not measure distances or angles.

• The robot can not distinguishable vertices.

Page 5: Comment reconstruire le graphe de visibilité d’un polygone? (Reconstructing visibility graphs of polygons) Jérémie Chalopin, Shantanu Das LIF, Aix-Marseille.

10 Nov 2010 JGA 2010 @ Marseille 5

Local Orientation

• Robot sees the visible vertices in CCW order.

There is a local orientation on edges of Gvis.

• After each move, the robot can look-back to its previous location.

Each edge of Gvis is labeled from

both sides.

1

2

3

Page 6: Comment reconstruire le graphe de visibilité d’un polygone? (Reconstructing visibility graphs of polygons) Jérémie Chalopin, Shantanu Das LIF, Aix-Marseille.

10 Nov 2010 JGA 2010 @ Marseille 6

Polygons vs. Graphs

Exploration of Polygons ≈ Exploration of edge-labeled graphs

Page 7: Comment reconstruire le graphe de visibilité d’un polygone? (Reconstructing visibility graphs of polygons) Jérémie Chalopin, Shantanu Das LIF, Aix-Marseille.

10 Nov 2010 JGA 2010 @ Marseille 7

Polygons vs. Graphs II

Exploration of Polygons ≈ Exploration of edge-labeled graphs

Property [YK 1996]: A robot exploring an edge-labeled graph of

known size n, can not always reconstruct the graph.

Page 8: Comment reconstruire le graphe de visibilité d’un polygone? (Reconstructing visibility graphs of polygons) Jérémie Chalopin, Shantanu Das LIF, Aix-Marseille.

10 Nov 2010 JGA 2010 @ Marseille 8

Polygons vs. Graphs III

Property [YK 1996]: A robot exploring an edge-labeled graph of

known size n, can not always reconstruct the graph.

Theorem: A robot exploring a polygon can always reconstruct the

visibility graph of the polygon if it knows an upper bound on n.

Exploration of Polygons ≈ Exploration of edge-labeled graphs

Page 9: Comment reconstruire le graphe de visibilité d’un polygone? (Reconstructing visibility graphs of polygons) Jérémie Chalopin, Shantanu Das LIF, Aix-Marseille.

10 Nov 2010 JGA 2010 @ Marseille 9

Graph Exploration

• The view of an exploring robot:

Minimum-base

Page 10: Comment reconstruire le graphe de visibilité d’un polygone? (Reconstructing visibility graphs of polygons) Jérémie Chalopin, Shantanu Das LIF, Aix-Marseille.

10 Nov 2010 JGA 2010 @ Marseille 10

Graph Exploration II

• The minimum-base of a graph G:

The smallest graph B such that G covers B

Property [YK 1996]: A robot exploring an edge-labeled graph can

construct the minimum-base if it knows an upper bound on n.

Page 11: Comment reconstruire le graphe de visibilité d’un polygone? (Reconstructing visibility graphs of polygons) Jérémie Chalopin, Shantanu Das LIF, Aix-Marseille.

10 Nov 2010 JGA 2010 @ Marseille 11

Exploring visibility graphs

• If C1,C2,…,Cp are the classes of vertices in G

vis

• | Ci | = q = n/p

• Classes repeat periodically on the boundary.

• How to find the internal edges (chords)?

Page 12: Comment reconstruire le graphe de visibilité d’un polygone? (Reconstructing visibility graphs of polygons) Jérémie Chalopin, Shantanu Das LIF, Aix-Marseille.

10 Nov 2010 JGA 2010 @ Marseille 12

Properties of Polygons

• Every polygon has an ear!

( If a,b,c appear in this order on the boundary: b is an ear iff a sees c.)

• Removing an ear of a simple polygon leaves a smaller polygon.

(visibility relationships are maintained)

• Every sub-polygon of four or more vertices has a chord.

Page 13: Comment reconstruire le graphe de visibilité d’un polygone? (Reconstructing visibility graphs of polygons) Jérémie Chalopin, Shantanu Das LIF, Aix-Marseille.

10 Nov 2010 JGA 2010 @ Marseille 13

Properties of Polygons II

It is easy to recognize an ear! Check for the paths:

(1, -1) (-2, 2) (1, -1)

(-1, 1) (2, -2) (-1, 1) 12

1

-2

Lemma:

If v is an ear,

every vertex in the class of v is an ear.

-1

-1

Page 14: Comment reconstruire le graphe de visibilité d’un polygone? (Reconstructing visibility graphs of polygons) Jérémie Chalopin, Shantanu Das LIF, Aix-Marseille.

10 Nov 2010 JGA 2010 @ Marseille 14

Deconstructing Polygons

Choose a class Ci of ears.

Remove all Ci vertices from P

(i.e. remove a vertex from B)

Page 15: Comment reconstruire le graphe de visibilité d’un polygone? (Reconstructing visibility graphs of polygons) Jérémie Chalopin, Shantanu Das LIF, Aix-Marseille.

10 Nov 2010 JGA 2010 @ Marseille 15

Deconstructing Polygons-II

Choose a class Ci of ears.

Remove all Ci vertices from P

(i.e. remove a vertex from B)

Repeat until a single class remains!

Page 16: Comment reconstruire le graphe de visibilité d’un polygone? (Reconstructing visibility graphs of polygons) Jérémie Chalopin, Shantanu Das LIF, Aix-Marseille.

10 Nov 2010 JGA 2010 @ Marseille 16

Deconstructing Polygons III

Choose a class Ci of ears. Remove all Ci vertices from P

(i.e. remove a vertex from B)

Repeat until a single class remains!

Remaining vertices form a clique!

Lemma:

There is a unique class C* which forms a clique.

Page 17: Comment reconstruire le graphe de visibilité d’un polygone? (Reconstructing visibility graphs of polygons) Jérémie Chalopin, Shantanu Das LIF, Aix-Marseille.

10 Nov 2010 JGA 2010 @ Marseille 17

Using class C*

C* corresponds to a vertex with q-1 self loops in the minimum-base.

=>

Robot can compute n = p*q

Lemma:

There is a unique class C* which forms a clique.

Page 18: Comment reconstruire le graphe de visibilité d’un polygone? (Reconstructing visibility graphs of polygons) Jérémie Chalopin, Shantanu Das LIF, Aix-Marseille.

10 Nov 2010 JGA 2010 @ Marseille 18

Solving Rendezvous

Solving rendezvous is easy!

1. Compute minimum-base.

2. Identify C*

3. Go to any vertex of C*

Rendezvous:

Position the robots s.t. they are mutually visible to each other.

Page 19: Comment reconstruire le graphe de visibilité d’un polygone? (Reconstructing visibility graphs of polygons) Jérémie Chalopin, Shantanu Das LIF, Aix-Marseille.

10 Nov 2010 JGA 2010 @ Marseille 19

Constructing Gvis

Edges incident to C* – Can be identified easily.

– Clique edges partitions P

– Each class appears once in each part

Same holds for any other class that forms a clique

How to identify the remaining edges?

Page 20: Comment reconstruire le graphe de visibilité d’un polygone? (Reconstructing visibility graphs of polygons) Jérémie Chalopin, Shantanu Das LIF, Aix-Marseille.

10 Nov 2010 JGA 2010 @ Marseille 20

Identifying Adjacencies

Identify edges (vi,v

i+k) of increasing

distances k = 2, 3, ..., n/2.

• Is the next unidentified vertex

vj = v

i+k or not?

• Easy, if in different classes.

• Let y be the number of dist. (k-1) backward-edges of v

i+k

• Go to vj and look back (LB)

We can show that

vj = v

i+k <=> LB = -(y+1)

Page 21: Comment reconstruire le graphe de visibilité d’un polygone? (Reconstructing visibility graphs of polygons) Jérémie Chalopin, Shantanu Das LIF, Aix-Marseille.

10 Nov 2010 JGA 2010 @ Marseille 21

Complexity of the Algorithm

• The complexity is dominated by cost of constructing minimum-base

• Walk along the boundary and identify the neighbors of each vertex.

• Use distinguishing paths to identify classes (n-1 paths of length n)

• Iteratively obtain distinguishing paths for k =1 to n

• Cost = O(n3m) moves.

(Additional cost = O(n2) moves)

Page 22: Comment reconstruire le graphe de visibilité d’un polygone? (Reconstructing visibility graphs of polygons) Jérémie Chalopin, Shantanu Das LIF, Aix-Marseille.

10 Nov 2010 JGA 2010 @ Marseille 22

Summary

• A robot moving in a polygon P that – knows an UB on n (#vertices of P)

– and can look back

• Is able to – compute the value of n

– construct the visibility graph

– solve rendezvous

• Why visibility graphs?– It is not possible to determine the exact shape of the polygon.

– Visibility graphs provide sufficient topological information.

Page 23: Comment reconstruire le graphe de visibilité d’un polygone? (Reconstructing visibility graphs of polygons) Jérémie Chalopin, Shantanu Das LIF, Aix-Marseille.

10 Nov 2010 JGA 2010 @ Marseille 23

Related Results

• With angle measurements at each vertex

A robot moving only on the boundary and knowing n, can reconstruct the polygon. [Disser et al. 2010]

• Convexity Detection + Look-back

A robot knowing n can construct the visibility graph [Bilo et al. 2009]

• Only Convexity Detection

A robot can knowing n construct the visibility graph (in exponential time) [(unpublished)]

• Impossibility

A robot moving on the boundary can not construct visibility graph even if it knows n [Bilo et al. 2009]

• Distance Measurements to visible vertices

Can the robot construct the visibility graph?

Page 24: Comment reconstruire le graphe de visibilité d’un polygone? (Reconstructing visibility graphs of polygons) Jérémie Chalopin, Shantanu Das LIF, Aix-Marseille.

10 Nov 2010 JGA 2010 @ Marseille 24

Merci de votre attention!