• Aucun résultat trouvé

Dissections, orientations, and trees, with applications to optimal mesh encoding and to random sampling

N/A
N/A
Protected

Academic year: 2021

Partager "Dissections, orientations, and trees, with applications to optimal mesh encoding and to random sampling"

Copied!
51
0
0

Texte intégral

(1)

HAL Id: hal-00330580

https://hal.archives-ouvertes.fr/hal-00330580v2

Submitted on 20 Oct 2008

HAL is a multi-disciplinary open access archive for the deposit and dissemination of sci- entific research documents, whether they are pub- lished or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers.

L’archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d’enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

optimal mesh encoding and to random sampling

Eric Fusy, Dominique Poulalhon, Gilles Schaeffer

To cite this version:

Eric Fusy, Dominique Poulalhon, Gilles Schaeffer. Dissections, orientations, and trees, with applica-

tions to optimal mesh encoding and to random sampling. ACM Transactions on Algorithms, Associ-

ation for Computing Machinery, 2008, 4 (2), pp.Art.19. �hal-00330580v2�

(2)

and to random sampling

ÉRICFUSY,DOMINIQUEPOULALHONandGILLESSCHAEFFER

É.FandG.S: LIX,ÉolePolytehnique. D.P:Liafa,Univ. Paris 7. Frane

Wepresentabijetionbetweensomequadrangulardissetionsofanhexagonandunrootedbinary

trees,withinterestingonsequenesforenumeration,meshompressionandgraphsampling.

Ourbijetionyieldsaneientuniformrandomsamplerfor3-onnetedplanargraphs,whih

turns out to bedeterminant for the quadrati omplexityof the urrent best known uniform

randomsamplerforlabelledplanargraphs[Fusy,AnalysisofAlgorithms2005℄.

ItalsoprovidesanenodingforthesetP(n)ofn-edge3-onnetedplanargraphsthatmathes

theentropybound

1

nlog2|P(n)|= 2 +o(1)bitsperedge(bpe). Thissolvesatheoretialproblem

reentlyraisedinmeshompression,asthesegraphsabstrattheombinatorialpartofmesheswith

spherialtopology.Wealsoahievetheoptimalparametrirate

1

nlog2|P(n, i, j)|bpeforgraphs

ofP(n)withivertiesandjfaes,mathinginpartiulartheoptimalratefortriangulations.

Ourenoding relies on alinear timealgorithmto ompute an orientation assoiatedto the

minimalShnyderwoodofa3-onnetedplanarmap.Thisalgorithmisofindependentinterest,

anditisforinstaneakeyingredientinareentstraightlinedrawingalgorithmfor3-onneted

planargraphs[Bonihonetal.,GraphDrawing2005℄.

CategoriesandSubjetDesriptors: G.2.1[DisreteMathematis℄:Combinatorialalgorithms

GeneralTerms: Algorithms

AdditionalKeyWordsandPhrases:Bijetion,Counting,Coding,Randomgeneration

1. INTRODUCTION

OneoriginofthisworkanbetraedbaktoanartileofEdBenderintheAmer-

ianMathematial Monthly [Bender1987℄,whereheaskedforasimpleexplanation

oftheremarkableasymptotiformula

|P(n, i, j)| ∼

1 3

5

2

4

ijn

2i

2 j + 2

2j

2 i + 2

(1)

fortheardinalityofthesetof 3-onneted(unlabelled) planargraphswith

i

ver-

ties,

j

faesand

n = i + j

2

edges,

n

goingtoinnity. ByatheoremofWhitney

[1933℄,thesegraphshaveessentiallyauniqueembeddingonthesphereuptohome-

omorphisms,sothattheirstudyamountstothatofrooted3-onnetedmaps,where

amapisagraphembeddedintheplaneandrooted meanswithamarkedoriented

edge.

1.1 Graphs,dissetionsandtrees

Anotherknownpropertyof3-onnetedplanargraphswith

n

edgesisthefatthat

theyarein diret one-to-one orrespondenewith dissetions ofthesphereinto

n

quadranglesthathavenonon-faial4-yle. Theheartofourpaperliesinafurther

one-to-oneorrespondene.

(3)

Theorem 1.1. There is a one-to-one orrespondene between unrooted binary

trees with

n

nodes and unrooted quadrangular dissetions of an hexagon with

n

interiorvertiesandnonon-faial 4-yle.

Themappingfrombinarytreestodissetions,whihweallthelosure,iseasily

desribedandresemblesonstrutionsthatwerereentlyproposedforsimplerkinds

ofmaps [Shaeer1997;Bouttieret al.2002; Poulalhonand Shaeer2006℄. The

proof that the mapping is a bijetion is instead rather sophistiated, relying on

new properties of onstrained orientations [Ossona de Mendez 1994℄, related to

Shnyder woods of triangulations and 3-onneted planar maps [Shnyder 1990;

di Battistaet al.1999;Felsner2001℄.

Conversely, thereonstrution of the treefrom thedissetion relies onalinear

time algorithm to ompute the minimal Shnyder woods of a 3-onneted map

(or equivalently, the minimal

α

0-orientation of the assoiated derived map, see Setion 9). This problem is of independant interest and our algorithm has for

example appliations in the graph drawing ontext [Bonihon et al. 2007℄. It is

akin to Kant's anonial ordering [Kant 1996; Chuang et al. 1998; Bonihon et

al.2003;Castelli-AleardiandDevillers2004℄,but againtheproofoforretnessis

quiteinvolved.

Theorem 1.1 leads diretly to the impliit representation of the numbers |Pn|

ountingrooted 3-onnetedmaps with

n

edgesdue toTutte [1963℄), andits

renement asdisussed in Setion 5yields that of |Pij | the number of rooted 3-

onnetedmapswith

i

vertiesand

j

faes(duetoMullinandShellenberg[1968℄) from whih Formula(1)follows. It partiallyexplains theombinatorisoftheo-

urrene of the ross produt of binomials, sine these are typial of binary tree

enumerations. Letus mentionthattheone-to-one orrespondenespeializespar-

tiularlynielytoountplanetriangulations(i.e.,3-onnetedmapswithallfaes

ofdegree 3),leadingtotherstbijetivederivationoftheountingformulaforun-

rootedplane triangulations with

i

verties,originallyfoundbyBrown[1964℄using

algebraimethods.

1.2 Randomsampling

A seond byprodut of Theorem 1.1 is an eient uniform random sampler for

rooted3-onnetedmaps,i.e.,analgorithmthat,given

n

,outputsarandomelement

in theset Pn of rooted3-onneted maps with

n

edgeswith equalhanes forall

elements. Thesamepriniplesyield auniformsamplerforPij .

The uniform random generation of lasses of maps like triangulations or 3-

onneted graphs was rst onsidered in mathematial physis(see referenes in

[Ambjørn et al. 1994; Poulalhon and Shaeer 2006℄), and various types of ran-

dom planargraphs areommonly used fortesting graph drawingalgorithms (see

[de Fraysseixetal.℄).

Thebest previouslyknown algorithm[Shaeer1999℄ hadexpetedomplexity

O(n

5/3

)

forPn, andwasmuhlesseientforPij ,havingevenexponentialom- plexityfor

i/j

or

j/i

tendingto 2(dueto Euler'sformulatheseratioarebounded

aboveby2for3-onnetedmaps). InSetion6,weshowthatourgeneratorforPn

orPij performsin lineartime exeptif

i/j

or

j/i

tends to 2whereit beomes at

mostubi.

(4)

Fromthetheoretialpointofview,itisalsodesirabletoworkwiththeuniform

distributiononplanargraphs. However,random(labelled)planargraphsappearto

behallengingmathematial objets[Osthus et al.2003; MDiarmidet al. 2005℄.

A Markovhain onverging to the uniform distribution on planar graphswith

i

vertieswasgivenbyDeniseetal.[1996℄,butitresistsknownapproahesforper-

fetsampling[Wilson2004℄,andhasunknownmixing time. Asopposed tothis,a

reursiveshemeto sampleplanargraphswasproposed byBodirsky etal. [2003℄,

with amortizedomplexity

O(n

6.5

)

. This resultis basedonareursivedeompo-

sition of planar graphs: a planar graphan be deomposed into a tree-struture

whosenodesareoupiedbyrooted3-onnetedmaps. Generatingaplanargraph

redues toomputing branhingprobabilitiessoastogenerate thedeomposition

treewithsuitableprobability;thenarandomrooted3-onnetedmapisgenerated

for eah node of the deomposition tree. Bodirsky et al.[2003℄ usethe so-alled

reursive method [Nijenhuis and Wilf 1978; Flajoletet al. 1994; Wilson 1997℄ to

takeadvantageof thereursivedeomposition ofplanargraphs. Ournewrandom

generatorforrooted3-onneted mapsredues theiramortizedostto

O(n

3

)

. Fi-

nallyanew uniformrandomgeneratorfor planargraphswasreentlydevelopped

byoneoftheauthors[Fusy2005℄,thatavoidstheexpensivepreproessingompu-

tations of[Bodirsky et al.2003℄. The reursivesheme issimilar to the oneused

in [Bodirsky et al. 2003℄, but the method to translate it to a random generator

reliesonBoltzmannsamplers,anewgeneralframeworkfortherandomgeneration

reently developed in [Duhon et al. 2004℄. Thanks to our random generatorfor

rooted 3-onneted maps, the algorithm of [Fusy 2005℄ has a time-omplexity of

O(n2

)

forexatsizeuniformsamplingandevenperformsinlineartimeforapprox-

imatesizeuniformsampling.

1.3 Suintenoding

A third byprodut ofTheorem 1.1 is thepossibility to enodein linear timea 3-

onneted planargraphwith

n

edges by abinary treewith

n

nodes. Inturn the

treeanbeenodedbyabalanedparenthesiswordof

2n

bits. Thisodeisoptimal

intheinformationtheoretisense: theentropyperedgeofthislassofgraphs,i.e.,

the quantity

1

n

log

2|P(n)|, tends to 2when

n

goesto innity, so that a ode for P

(n)

annotgiveabetterguaranteeontheompressionrate.

Appliationsallingforompatstorageandfasttransmissionof3Dgeometrial

mesheshavereentlymotivatedahugeliteratureonompression,inpartiularfor

theombinatorialpartofthemeshes. Therstompression algorithmsdealtonly

withtriangularfaes[Rossigna1999;ToumaandGotsman1998℄,butmanymeshes

inlude largerfaes,sothatpolygonalmesheshavebeome prominent(see[Alliez

andGotsman2003℄forareentsurvey).

Thequestionofoptimalityofoderswasraisedinrelationwithexeptionodes

produed by several heuristiswhen dealingwith meshes withspherialtopology

[Gotsman2003;Khodakovskyet al.2002℄. Sinethesemeshesareexatlytriangu-

lations(fortriangularmeshes)and3-onnetedplanargraphs(forpolyhedralones),

theodersin[PoulalhonandShaeer2006℄andin thepresentpaperrespetively

provethat traversalbasedalgorithmsanahieveoptimality.

On the other hand, in the ontext of suint data strutures, almost optimal

algorithmshavebeenproposed[Heetal.2000;Lu2002℄,thatarebasedonseparator

(5)

theorems. Howeverthese algorithmsarenottruly optimal(they get

ε

losetothe

entropybut at theost of an unontrolled inrease of theonstantsin thelinear

omplexity). Moreover,although theyrelyonasophistiated reursivestruture,

theydonotsupporteientadjaenyrequests.

As opposed to that, ouralgorithm shares with [Heet al.1999; Bonihon et al.

2003℄ thepropertythat it produesessentiallythe ode ofaspanning tree. More

preiselyitisjustthebalanedparenthesisodeofabinarytree,andadjaeniesof

theinitialdissetionthatarenotpresentinthetreeanbereoveredfromtheode

byasimplevariationontheinterpretation ofthesymbols. Adjaenyqueriesan

thusbe dealt within time proportionalto thedegreeof verties[Castelli-Aleardi

etal.2006℄usingtheapproahof[MunroandRaman1997;Heetal.1999℄.

FinallyweshowthattheodeanbemodiedtobeoptimalonthelassP

(n, i, j)

.

Sine the entropy of this lass is stritly smaller than that of P

(n)

as soon as

|i−

n/2| ≫ n

1/2,theresultingparametrioderis moreeientin thisrange. In

partiularinthease

j = 2i

4

ournewalgorithmspeializestoanoptimaloder

fortriangulations.

1.4 Outlineofthepaper

Thepaperstartswithtwosetionsofpreliminaries: denitionsofthemapsandtrees

involved (Setion 2), and somebasi orrespondenes between them (Setion 3).

Then omes our main result (Setion 4), the mappingbetweenbinary trees and

somedissetionsofthehexagonbyquadrangularfaes. Thefatthatthismapping

isabijetionfollowsfromtheexisteneanduniquenessofaertaintri-orientationof

ourdissetions. Theproofofthisauxiliarytheorem,whihrequirestheintrodution

oftheso-alledderivedmapsandtheir

α

0-orientations,isdelayedtoSetion8,that is, after the three setions dediated to appliations of our main result: in these

setions we suessively disuss ounting (Setion 5), sampling (Setion 6) and

oding (Setion 7) rooted 3-onneted maps. The third appliation leads us to

our seond important result: in Setion 9 we present a linear time algorithm to

ompute the minimal

α

0-orientation of the derived map of a 3-onneted planar map (whih also orresponds to the minimal Shnyder woods alluded to above).

Finally,Setion10isdediatedtotheorretnessproofofthisorientationalgorithm.

Figure 1summarizes theonnetions betweenthe dierent familiesof objetswe

onsider.

2. DEFINITIONS

2.1 Planarmaps

Aplanarmap isaproperembeddingofanunlabelledonnetedgraphintheplane,

where proper means that edges are smooth simple ars that do notmeet but at

their endpoints. A planar map is said to be rooted if oneedge of the outerfae,

alled the root-edge, is marked and oriented suh that the outer fae lays on its

right. Theoriginoftheroot-edgeisalled root-vertex. Vertiesandedgesaresaid

to be outer orinner dependingon whetherthey areinidentto theouter fae or

not.

Aplanarmapis3-onnetedifithasatleast4edgesandannotbedisonneted

bytheremovaloftwoverties. Therst3-onnetedplanarmapisthetetrahedron,

(6)

3-onnetedplanargraphs

3-onnetedmaps derivedmaps irreduible

quadrangulations

derivedmaps

withorientation dissetions

ofthehexagon

dissetionsofthehexagon

withorientation binarytrees

parenthesisode

iterative

algorithm transposition

operations opening

losure

rejetion

Whitney

folklore

Fig.1. Relationsbetweeninvolvedobjets.

whihhas6edges. WedenotebyPn (respetivelyPij )thesetofrooted3-onneted

planarmapswith

n

edges(resp.

i

vertiesand

j

faes). A3-onnetedplanarmap

isouter-triangular ifitsouterfaeistriangular.

2.2 Planetrees,andhalf-edges

Planetrees are planarmaps withasinglefaetheouterone. A vertexis alled

a leaf ifit has degree 1,and node otherwise. Edgesinident to a leaf are alled

stems,andtheotherarealledentireedges. Observethatplanetreesareunrooted

trees.

Binary trees areplanetreeswhosenodeshavedegree3. Byonventionweshall

requirethat arootedbinary tree hasaroot-edgethat is astem. The root-edgeof

a rooted binary tree thus onnets a node, alled the root-node, to a leaf, alled

theroot-leaf. Withthisdenitionofrootedbinarytree,upondrawingthetreeina

topdownmannerstartingwiththeroot-leaf,everynode(inludingtheroot-node)

hasafather, aleft sonandarightson. This (veryminor) variationon theusual

denition ofrootedbinarytreeswillbeonvenientlateron. For

n

1

, wedenote

respetivelybyBn andBn thesetsofbinaryandrootedbinarytreeswith

n

nodes

(theyhave

n + 2

leaves,asprovedbyindutionon

n

). Theserootedtreesarewell

knownto beountedbytheCatalannumbers: |Bn|

=

n+11 2nn

.

Thevertiesofabinarytreeanbegreedilybioloredsayinblakorwhite

sothat adjaentvertieshavedistintolors. Thebiolorationisuniqueuptothe

hoie of the olor of the rst node. As a onsequene, rooted biolored binary

trees are either blak-rooted or white-rooted, depending on the olor of the root

node. Thesetsofblak-rooted(resp. white-rooted)binarytreeswith

i

blaknodes

and

j

white nodes is denoted by Bij (resp. by Bij); and the total set of rooted

bioloredbinarytreeswith

i

blaknodesand

j

whitenodesisdenotedbyBij.

Itwillbeonvenientto vieweahentireedgeofatreeasapairofoppositehalf-

edges eahoneinidenttooneextremityoftheedgeandtovieweahstemas

asinglehalf-edgeinidenttothenodeholdingthestem. Moregenerallyweshall

(7)

onsidermapsthathaveentireedges (madeoftwohalf-edges)andstems (madeof

onlyonehalf-edge). Itisthenalsonaturaltoassoiateonefaeto eahhalf-edge,

say,thefae onitsright. In theaseof trees,thereis onlytheouterfae,sothat

allhalf-edgesgetthesameassoiatedfae.

2.3 Quadrangulationsanddissetions

A quadrangulation is a planar map whose faes (inluding the outer one) have

degree4. Adissetionof thehexagonbyquadrangularfaes isaplanarmapwhose

outerfaehasdegree6andinnerfaeshavedegree4.

Cylesthatdonotdelimitafaearesaidtobeseparating. Aquadrangulationor

adissetionofthehexagonbyquadrangularfaesissaidtobeirreduible ifithasat

least 4faes andhasno separating4-yle. Therst irreduiblequadrangulation

is the ube, whih has 6 faes. We denote by Qn the set of rooted irreduible

quadrangulations with

n

faes, inluding the outer one. Euler's relation ensures

thatthese quadrangulationshave

n + 2

verties. WedenotebyDn (Dn)thesetof

(rooted, respetively)irreduible dissetionsof thehexagonwith

n

inner verties.

These have

n + 2

quadrangular faes, aording to Euler's relation. From now on, irreduible dissetions of the hexagon by quadrangular faes will simply be

alled irreduible dissetions. The lasses of rooted irreduible quadrangulations

and of rooted irreduible dissetions arerespetivelydenoted byQ

=

nQn and D

=

nDn.

As faes of dissetions and quadrangulations haveeven degree, the verties of

these maps an begreedily biolored, say, in blak and white, so that eah edge

onnets a blak vertex to awhite one. Suh abioloration is unique up to the

hoie of the olors. We denote by Qij the set of rooted biolored irreduible

quadrangulationswith

i

blakvertiesand

j

whitevertiesandsuhthattheroot-

vertexisblak;and byDij theset ofrootedbioloredirreduible dissetionswith

i

blakinner vertiesand

j

whiteinner vertiesandsuh that theroot-vertexis blak.

Abioloredirreduibledissetionisomplete ifthethreeouterwhitevertiesof

thehexagonhavedegreeexatly2. Hene,thesethreevertiesareinidentto two

adjaentedgesonthehexagon.

3. CORRESPONDENCESBETWEENFAMILIESOF PLANARMAPS

This setion reallsa folklore bijetion between irreduiblequadrangulations and

3-onnetedmaps, hereafteralledangularmapping,see [MullinandShellenberg

1968℄,anditsadaptationtoouter-triangular3-onnetedmaps.

3.1 3-onnetedmapsandirreduiblequadrangulations

Letusrstreallhowtheangularmappingworks. Givenarootedquadrangulation

Q

∈ Qn endowed withits vertex bioloration,let

M

be therooted map obtained

bylinking,foreahfae

f

of

Q

(eventheouter fae),thetwodiagonallyopposed

blak vertiesof

f

; the root of

M

is hosento be the edge orresponding to the outerfaeof

Q

,orientedsothat

M

and

Q

havesameroot-vertex,seeFigure2. The map

M

is oftenalled theprimal map of

Q

. A similar onstrution using white

vertiesinsteadofblakones wouldgiveitsdual map (i.e., themapwithavertex

(8)

(a)Aquadrangulation (b)withitsblakdiagonals ()givesaplanarmap.

Fig.2.Theangularmapping:fromarootedirreduiblequadrangulationtoarooted3-onneted

planarmap.

in eahfae of

M

andedge-setorrespondingto theadjaenies betweenverties andfaesof

M

).

Theonstrutionof the primalmap is easily invertible. Givenanyrooted map

M

,theinverseonstrutiononsistsinaddingavertexalledafae-vertex ineah

fae (eventhe outerone) of

M

and linking avertex

v

andafae-vertex

v

f byan

edge if

v

is inident to the fae

f

orresponding to

v

f. Keeping onlythese fae-

vertexinidene edges yields a quadrangulation. The root is hosenas the edge

thatfollowstherootof

M

in ounter-lokwiseorderarounditsorigin.

Thefollowingtheoremisalassialresultin thetheoryofmaps.

Theorem 3.1 (Angularmapping) . The angular mapping is a bijetion be-

tween Pn andQn andmorepreisely abijetion betweenPij andQij.

3.2 Outer-triangular3-onnetedmapsandbioloredompleteirreduibledissetions

Thesameprinipleyieldsabijetion,alsoalled angularmapping,betweenouter-

triangular3-onnetedmapsand bioloredompleteirreduibledissetions,whih

will prove very useful in Setions 7 and 8. This mapping is very similar to the

angular mapping: given aomplete dissetion

D

, assoiateto

D

themap

M

ob-

tainedbylinkingthetwoblakvertiesofeahinnerfae of

D

byanewedge,see

Figure3. Themap

M

isalled theprimal map of

D

.

Theorem 3.2 (Angularmappingwith border). Theangularmapping,for-

mulated for omplete dissetions, is a bijetion between biolored omplete irre-

duible dissetions with

i

blak verties and

j

white verties and outer-triangular 3-onnetedmaps with

i

verties and

j

3

innerfaes.

Proof. Theprooffollowssimilar linesasthatof Theorem3.1,see [Mullinand

Shellenberg1968℄.

3.3 Derivedmaps

Initsversionforompletedissetions,theangularmappinganalsobeformulated

usingtheoneptofderivedmap,whihwillbeveryusefulthroughoutthisartile

(inpartiularwhendealingwithorientations).

Références

Documents relatifs

of RPA with exchange (RPAx), usually defined in terms of the density response function, 29–39 as well as between the RPAx and the SOSEX total energy approximation.. The analysis

Cette étude présente une nouvelle théorie de cisaillement de déformation raffinée pour l’analyse du comportement statique et dynamique des plaques fonctionnellement gradués.

The dimension of power inherent in the explanation of the closure of the juridical field allowed for an explanation of the fact that, within a space and context of

A class of non homogeneous self interacting random processes with applications to learning in games and vertex-reinforced random walks... hal-00284649, version 1 - 4

Afin d’analyser les cinq vidéos des interventions que j’ai faites en classe de 3-4H, j’ai utilisé l’observation systématique des comportements. Le but de ce travail

In seeking to convert these general recommendations into reality, the Congress called on IUCN to prepare a long-term programme for protected areas based on the Caracas Action Plan..

L’inscription du sujet dans des rapports de pouvoir simultanés et imbriqués, de sexe et de race notamment, permet sa reconceptualisation de manière non binaire : le féminisme noir

The walks corresponding to the first type of terms can be described by graphs obtained from the trees after the gluings of children of different parents (see figure 2).. In the