optimal succinct representations of planar mapsamturing/pub/socg06.pdf · optimal succinct...

34
Optimal succinct representations of planar maps Luca Castelli Aleardi (joint work with Olivier Devillers and Gilles Schaeffer) 6th june 2006, SoCG 2006 Projet Geometrica LIX INRIA Sophia-Antipolis Ecole Polytechnique Optimal succinct representations of planar maps – p.1/34

Upload: others

Post on 08-Jul-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Optimal succinct representations of planar mapsamturing/pub/SoCG06.pdf · Optimal succinct representations of planar maps Luca Castelli Aleardi (joint work with Olivier Devillers

Optimal succinct representationsof planar maps

Luca Castelli Aleardi

(joint work with Olivier Devillers and Gilles Schaeffer)

6th june 2006, SoCG 2006

Projet Geometrica LIX

INRIA Sophia-Antipolis Ecole Polytechnique

Optimal succinct representations of planar maps – p.1/34

Page 2: Optimal succinct representations of planar mapsamturing/pub/SoCG06.pdf · Optimal succinct representations of planar maps Luca Castelli Aleardi (joint work with Olivier Devillers

Succinct and compact representationsGiven a class Cm of objects of size m, the goal is to design aspace efficient data structure such that:

• queries on objects are answered in constant time;

• the encoding is succinct: the cost of an object R ∈ Cm

matches asymptotically the entropy of the class

size(R) = log2 ‖Cm‖(1 + o(1))

• or compact: we content of a cost

size(R) = O(‖Cm‖)

• for dynamic data structures: updates are supported in

O(lgc m) amortized time

Optimal succinct representations of planar maps – p.2/34

Page 3: Optimal succinct representations of planar mapsamturing/pub/SoCG06.pdf · Optimal succinct representations of planar maps Luca Castelli Aleardi (joint work with Olivier Devillers

Compact representations: an exampleRooted trees with n vertices

enumeration of binary trees with n vertices:

‖Bn‖ =1

n + 1

(

2n

n

)

≈ 22nn− 3

2 (1)

Optimal succinct representations of planar maps – p.3/34

Page 4: Optimal succinct representations of planar mapsamturing/pub/SoCG06.pdf · Optimal succinct representations of planar maps Luca Castelli Aleardi (joint work with Olivier Devillers

ExampleOptimal (implicit) encoding for compression

• size: log2‖Bn‖ = 2n + O(lg n) bits

• no efficient navigation

11101010001101001100

Optimal succinct representations of planar maps – p.4/34

Page 5: Optimal succinct representations of planar mapsamturing/pub/SoCG06.pdf · Optimal succinct representations of planar maps Luca Castelli Aleardi (joint work with Olivier Devillers

Example: explicit representationPointers-based representation

• size: 2n lg n bits

• constant time navigation between nodes

Cleft Cright

/

Cright

parent

Cleft Cright

parent

/ /

parent

/ /

parentCleft Cright

parent

/ /

parent

/ /

parent

/

lg n

lg n lg n

lg n

lg n

Optimal succinct representations of planar maps – p.5/34

Page 6: Optimal succinct representations of planar mapsamturing/pub/SoCG06.pdf · Optimal succinct representations of planar maps Luca Castelli Aleardi (joint work with Olivier Devillers

Compact and succinct representations(Jacobson Focs89, Munro et Raman Focs97)

• size: O(n) bits - adjacency queries in O(lg n) time

• size: 2n + o(n) bits - adjacency queries in O(1) time

0110001000 1101011101

lg n

Optimal succinct representations of planar maps – p.6/34

Page 7: Optimal succinct representations of planar mapsamturing/pub/SoCG06.pdf · Optimal succinct representations of planar maps Luca Castelli Aleardi (joint work with Olivier Devillers

MotivationCombinatorial information describing incidence relations

Which information?

Connectivity

Optimal succinct representations of planar maps – p.7/34

Page 8: Optimal succinct representations of planar mapsamturing/pub/SoCG06.pdf · Optimal succinct representations of planar maps Luca Castelli Aleardi (joint work with Olivier Devillers

MotivationGeometry information (vertex coordinates)

Geometric object

Geometric information

x

y

z

between 30 and 96 bits (192 bits ?)

Optimal succinct representations of planar maps – p.8/34

Page 9: Optimal succinct representations of planar mapsamturing/pub/SoCG06.pdf · Optimal succinct representations of planar maps Luca Castelli Aleardi (joint work with Olivier Devillers

MotivationUsual triangle-based mesh representation

Geometric object

Connectivity information

Geometric information

vertex:

triangle:

1 reference to triangle

3 references to vertices

3 references to triangles

log n to 32 bits

Optimal succinct representations of planar maps – p.9/34

Page 10: Optimal succinct representations of planar mapsamturing/pub/SoCG06.pdf · Optimal succinct representations of planar maps Luca Castelli Aleardi (joint work with Olivier Devillers

MotivationMesh compression algorithms

Touma GotsmanEdgebreaker [Rossignac]

Poulhalon SchaefferGeneral underlying idea

Encoding strategies based on a local (global) conquest

Optimal succinct representations of planar maps – p.10/34

Page 11: Optimal succinct representations of planar mapsamturing/pub/SoCG06.pdf · Optimal succinct representations of planar maps Luca Castelli Aleardi (joint work with Olivier Devillers

Graph encoding(Similarities between spanning-tree based methods, Isenburg and Snoeyink)

Edgebreaker

CCCRCCRCCRECRRELCRE

CC

C

R

C

C

R

C

CR

SC

RR

EL

C

RE

V5V5V6V5V4V5V8V5V5V4S4V3V4

Touma Gotsman(′98)

Canonical orderings and multiple parentheses

Chuang et al. (Icalp 98) - Chiang et al. (Soda 01)

( [ [ [ ) ( ] ( ] ( ] [ [ [ ) [ ) ( ] ] [ ) . . .

1101000110000010010000011001000000000

Poulalhon Schaeffer(2003)

Optimal succinct representations of planar maps – p.11/34

Page 12: Optimal succinct representations of planar mapsamturing/pub/SoCG06.pdf · Optimal succinct representations of planar maps Luca Castelli Aleardi (joint work with Olivier Devillers

MotivationMesh compression algorithms

Meshcom

pressio

n

Compact representation

VRML, 288 or 114 bits/vertex

[Touma Gotsman] 2bits/vertex (near-optimal)

Pointer based representation: 208 bits/triangle

2.175 bits/triangle

[Poulalhon Schaeffer] 3.24bits/vertex (optimal)

Optimal succinct representations of planar maps – p.12/34

Page 13: Optimal succinct representations of planar mapsamturing/pub/SoCG06.pdf · Optimal succinct representations of planar maps Luca Castelli Aleardi (joint work with Olivier Devillers

Tutte’s entropy (triangulations)(information theory asymptotic lower bound)

enumeration of rooted planar triangulations on n vertices:

Ψn =2(4n + 1)!

(3n + 2)!(n + 1)!≈

16

27

3

2πn−5/2(

256

27)n

Tutte’s entropy (1962):

e =1

nlog

2Ψn ≈ log

2(256

27) ≈ 3.2451 bits/vertex

Optimal succinct representations of planar maps – p.13/34

Page 14: Optimal succinct representations of planar mapsamturing/pub/SoCG06.pdf · Optimal succinct representations of planar maps Luca Castelli Aleardi (joint work with Olivier Devillers

Planar Triangulations with a boundary

n + 1 internal vertices, m = 2n + k faces

f(n, k) =2 · (2k − 3)! (2k + 4n − 1)!

(k − 1)! (k − 3)! (n + 1)! (2k + 3n)!

f ′(m, k) =2 · (2k − 3)! (2m − 1)!

(k − 1)! (k − 3)! (m−k2

+ 1)!

counting planar triangulations with m faces

F (m) = lg(m

k≥3

f ′(m, k)) ≈ 2.175m

3.24 bits/vertex = 1.62 bits/face < 2.17 bits/face

Optimal succinct representations of planar maps – p.14/34

Page 15: Optimal succinct representations of planar mapsamturing/pub/SoCG06.pdf · Optimal succinct representations of planar maps Luca Castelli Aleardi (joint work with Olivier Devillers

Triangulations with a boundary(Castelli Aleardi, Devillers and Schaeffer, WADS 2005)

Theorem. For planar triangulations with a boundaryhaving m faces, there exists an optimal succinctrepresentation supporting efficient navigation in O(1) time,requiring

2.175m + O(mlg lg m

lg m) = 2.175m + o(m) bits

For triangulations of genus g surfaces (g = o( m

lg m)) the

same representation requires

2.175m + 36(g − 1) lg m + O(mlg lg m

lg m+ g lg lg m) bits

Optimal succinct representations of planar maps – p.15/34

Page 16: Optimal succinct representations of planar mapsamturing/pub/SoCG06.pdf · Optimal succinct representations of planar maps Luca Castelli Aleardi (joint work with Olivier Devillers

Comparison: space efficiencygraphs with n vertices, e edges, m faces, genus g

Encoding queries 3-conn. triangl. g > 0

dynamic

Jacobson (Focs89) O(lg n) no

Munro Raman (Focs97) O(1) 8n + 2e 7m no

Chuang et al. (Icalp98) O(1) 2e + 2n 3.5m no

Chiang et al. (Soda01) O(1) 2e + 2n 4m no

Blandford et al. (Soda03) O(1) O(n) O(m) O(n)

Castelli Devillers Scha-

effer(Wads Cccg05)

O(1) no 2.175m 2.175m

our new encodings O(1) 2e 1.62m no

Optimal succinct representations of planar maps – p.16/34

Page 17: Optimal succinct representations of planar mapsamturing/pub/SoCG06.pdf · Optimal succinct representations of planar maps Luca Castelli Aleardi (joint work with Olivier Devillers

Literary digression ”La lecon”, (Eugene Ionesco, 1951)

During a private lesson, a very young student, preparing herself

for the total doctorate, talks about arithmetics with her teacher.

(teacher) If you cannot deeply understand these principles,

these arithmetic archetypes, you will never perform correctly a

”polytechnicien”job. For example, what is 3.755.918.261

multiplied by 5.162.303.508?

(student, very quickly) The result is 193891900145...

(teacher, very astonished): How have you computed it, if you

do not know the principles of arithmetic reasoning?

(student) Simple: I have learned by heart all possible results of

all possible multiplications.

Optimal succinct representations of planar maps – p.17/34

Page 18: Optimal succinct representations of planar mapsamturing/pub/SoCG06.pdf · Optimal succinct representations of planar maps Luca Castelli Aleardi (joint work with Olivier Devillers

Decomposing T into sub-triangulations• compute small triangulations of size bewteen 1

3 lg2 m

and lg2 m;

• decompose into tiny triangulations of size between112 lg m and 1

4 lg m.

Initial triangulation with m triangles Tiny triangulations with Θ(lg m) triangles Small triangulations with Θ(lg2 m) triangles

Optimal succinct representations of planar maps – p.18/34

Page 19: Optimal succinct representations of planar mapsamturing/pub/SoCG06.pdf · Optimal succinct representations of planar maps Luca Castelli Aleardi (joint work with Olivier Devillers

Decomposing T into sub-triangulations• we compute small triangulations having between 1

3 lg2 m

and lg2 m triangles;

• we decompose small triangulations into tinytriangulations containing between 1

12 lg m and 14 lg m

triangles.

Graph G linking tiny triangulationshaving Θ( m

lg m) nodes

A sub-graph Gi linking Θ(lg m) tinytriangulations lying in the same small

Graph F linking small triangulationswith Θ( m

lg2m

) nodes

Optimal succinct representations of planar maps – p.19/34

Page 20: Optimal succinct representations of planar mapsamturing/pub/SoCG06.pdf · Optimal succinct representations of planar maps Luca Castelli Aleardi (joint work with Olivier Devillers

Overview: representation of a small triangulation• adjacency relations are described by map Gi;

• internal connectivity is implicitly represented (variablesize pointers)

• boundary neighboring relations are represented byboundary coloring (variable length bit-vector)

pointer to tiny

triangulation

of size t

pointer to rank-select

of size b and weight s

t, b, s

split small

into tiny

first vertex

01

0

101

1

1 0

0

0

0

0

Optimal succinct representations of planar maps – p.20/34

Page 21: Optimal succinct representations of planar mapsamturing/pub/SoCG06.pdf · Optimal succinct representations of planar maps Luca Castelli Aleardi (joint work with Olivier Devillers

Graph Gi linking adjacent tiny triangulations• Gi has a node for each tiny triangulation and an arc for

each pair of adjacent tiny triangulations;

• Gi is a planar map, having faces of degree at least 3,multiple edges and loops are allowed;

Optimal succinct representations of planar maps – p.21/34

Page 22: Optimal succinct representations of planar mapsamturing/pub/SoCG06.pdf · Optimal succinct representations of planar maps Luca Castelli Aleardi (joint work with Olivier Devillers

i adjacency relations between tiny triangulations• Because of Euler’s formula, the overall number of arcs in

maps Gi is:∑

i

‖E(Gi)‖ = O(m

lg m)

Optimal succinct representations of planar maps – p.22/34

Page 23: Optimal succinct representations of planar mapsamturing/pub/SoCG06.pdf · Optimal succinct representations of planar maps Luca Castelli Aleardi (joint work with Olivier Devillers

Total space used• Catalog of all different tiny triangulations

O(m1

42.17 lg2 m lg lg m) = o(m)

• catalog of bit-vectors (with Rank/Select)

O(m1

42.17 lg m lg lg m) = o(m)

• representation of graph F : O( m

lg2m

lg m) = o(m)

• graphs Gi

2.17m + O(mlg lg m

lg m)

Optimal succinct representations of planar maps – p.23/34

Page 24: Optimal succinct representations of planar mapsamturing/pub/SoCG06.pdf · Optimal succinct representations of planar maps Luca Castelli Aleardi (joint work with Olivier Devillers

OptimalityOur contribution

Proposition (Castelli Aleardi, Devillers and Schaeffer).For planar maps (triangulations and 3-connected graphs) itis possible to design two optimal succinct representations,supporting efficient navigation in O(1) time, whose storagerequirements match asymptotically the entropy of therespective classes. More precisely, our representations use:

• 1.62m bits, for triangulations (without boundary) withm faces;

• 2e bits, for 3-connected graphs with e edges.

Optimal succinct representations of planar maps – p.24/34

Page 25: Optimal succinct representations of planar mapsamturing/pub/SoCG06.pdf · Optimal succinct representations of planar maps Luca Castelli Aleardi (joint work with Olivier Devillers

Optimal encodings(Poulalhon/Schaeffer 03, Fusy/Poulalhon/Schaeffer 05)

Optimal succinct representations of planar maps – p.25/34

Page 26: Optimal succinct representations of planar mapsamturing/pub/SoCG06.pdf · Optimal succinct representations of planar maps Luca Castelli Aleardi (joint work with Olivier Devillers

Original local closures

Optimal succinct representations of planar maps – p.26/34

Page 27: Optimal succinct representations of planar mapsamturing/pub/SoCG06.pdf · Optimal succinct representations of planar maps Luca Castelli Aleardi (joint work with Olivier Devillers

New ”color-based” closures

11010001010000100000000000

00100100100001

n nodes, 2n stems

n nodes, 2n stems n nodes, 2n stems

n nodes, 2n stems n nodes, 2n stems n nodes, 2n stems n nodes, 2n stems

Optimal succinct representations of planar maps – p.27/34

Page 28: Optimal succinct representations of planar mapsamturing/pub/SoCG06.pdf · Optimal succinct representations of planar maps Luca Castelli Aleardi (joint work with Olivier Devillers

”color-based” closure for 3-connected graphs

Optimal succinct representations of planar maps – p.28/34

Page 29: Optimal succinct representations of planar mapsamturing/pub/SoCG06.pdf · Optimal succinct representations of planar maps Luca Castelli Aleardi (joint work with Olivier Devillers

”color-based” closure for triangulations

11010001010000100000000000

00100100100001

n nodes, 2n stems

n nodes, 2n stems n nodes, 2n stems

n nodes, 2n stems

n nodes, 2n stems n nodes, 2n stems n nodes, 2n stems n nodes, 2n stems

Optimal succinct representations of planar maps – p.29/34

Page 30: Optimal succinct representations of planar mapsamturing/pub/SoCG06.pdf · Optimal succinct representations of planar maps Luca Castelli Aleardi (joint work with Olivier Devillers

New splitting strategies

Optimal succinct representations of planar maps – p.30/34

Page 31: Optimal succinct representations of planar mapsamturing/pub/SoCG06.pdf · Optimal succinct representations of planar maps Luca Castelli Aleardi (joint work with Olivier Devillers

Dominant cost analysisThe Catalog Ar contains all triangulations with r triangles

A reference to an element in Ar costs 2.17r bits

‖A‖ = 22.17r

r 2.17r bits reference

Optimal succinct representations of planar maps – p.31/34

Page 32: Optimal succinct representations of planar mapsamturing/pub/SoCG06.pdf · Optimal succinct representations of planar maps Luca Castelli Aleardi (joint work with Olivier Devillers

Dominant cost analysisCatalog Ar,w: all trees with r nodes, 2r stems and w false stems

A reference to an element in Ar,w costs 2.17r + w lg r bits

‖Ar,w‖ = 23.24r ·(

2r

w

)

3.24r + w lg r bits index

Optimal succinct representations of planar maps – p.32/34

Page 33: Optimal succinct representations of planar mapsamturing/pub/SoCG06.pdf · Optimal succinct representations of planar maps Luca Castelli Aleardi (joint work with Olivier Devillers

Future and related works

• Design of a practical efficient implementation (with A.Mebarki and O. Devillers)

• extension: realizers, canonical orderings and ”spanningtree”encodings for higher genus surfaces

Optimal succinct representations of planar maps – p.33/34

Page 34: Optimal succinct representations of planar mapsamturing/pub/SoCG06.pdf · Optimal succinct representations of planar maps Luca Castelli Aleardi (joint work with Olivier Devillers

Graph encodings(higher genus triangulations)

Edgebreaker

CCCRCCRCCRECRRELCRE

CC

C

R

C

C

R

C

CR

SC

RR

EL

C

RE

V5V5V6V5V4V5V8V5V5V4S4V3V4

Touma Gotsman(′98)

Edgebreaker on a torus

Canonical orderings and multiple parentheses

Chuang et al. (Icalp 98) - Chiang et al. (Soda 01)

( [ [ [ ) ( ] ( ] ( ] [ [ [ ) [ ) ( ] ] [ ) . . .

1101000110000010010000011001000000000

Poulalhon Schaeffer(2003)

?Optimal succinct representations of planar maps – p.34/34