Dissections, orientations, and trees, with applications to optimal mesh encoding and to random sampling
aa r X i v : . [ m a t h . C O ] O c t Disse tions, orientations, and trees,with appli ations to optimal mesh en odingand to random samplingÉRIC FUSY, DOMINIQUE POULALHON and GILLES SCHAEFFERÉ.F and G.S: LIX, É ole Polyte hnique. D.P: Liafa, Univ. Paris 7. Fran eWe present a bije tion between some quadrangular disse tions of an hexagon and unrooted binarytrees, with interesting onsequen es for enumeration, mesh ompression and graph sampling.Our bije tion yields an e(cid:30) ient uniform random sampler for 3- onne ted planar graphs, whi hturns out to be determinant for the quadrati omplexity of the urrent best known uniformrandom sampler for labelled planar graphs [Fusy, Analysis of Algorithms 2005℄.It also provides an en oding for the set P ( n ) of n -edge 3- onne ted planar graphs that mat hesthe entropy bound n log |P ( n ) | = 2 + o (1) bits per edge (bpe). This solves a theoreti al problemre ently raised in mesh ompression, as these graphs abstra t the ombinatorial part of meshes withspheri al topology. We also a hieve the optimal parametri rate n log |P ( n, i, j ) | bpe for graphsof P ( n ) with i verti es and j fa es, mat hing in parti ular the optimal rate for triangulations.Our en oding relies on a linear time algorithm to ompute an orientation asso iated to theminimal S hnyder wood of a 3- onne ted planar map. This algorithm is of independent interest,and it is for instan e a key ingredient in a re ent straight line drawing algorithm for 3- onne tedplanar graphs [Boni hon et al., Graph Drawing 2005℄.Categories and Subje t Des riptors: G.2.1 [Dis rete Mathemati s℄: Combinatorial algorithmsGeneral Terms: AlgorithmsAdditional Key Words and Phrases: Bije tion, Counting, Coding, Random generation1. INTRODUCTIONOne origin of this work an be tra ed ba k to an arti le of Ed Bender in the Amer-i an Mathemati al Monthly [Bender 1987℄, where he asked for a simple explanationof the remarkable asymptoti formula |P ( n, i, j ) | ∼ ijn (cid:18) i − j + 2 (cid:19)(cid:18) j − i + 2 (cid:19) (1)for the ardinality of the set of 3- onne ted (unlabelled) planar graphs with i ver-ti es, j fa es and n = i + j − edges, n going to in(cid:28)nity. By a theorem of Whitney[1933℄, these graphs have essentially a unique embedding on the sphere up to home-omorphisms, so that their study amounts to that of rooted 3- onne ted maps, wherea map is a graph embedded in the plane and rooted means with a marked orientededge.1.1 Graphs, disse tions and treesAnother known property of 3- onne ted planar graphs with n edges is the fa t thatthey are in dire t one-to-one orresponden e with disse tions of the sphere into n quadrangles that have no non-fa ial 4- y le. The heart of our paper lies in a furtherone-to-one orresponden e. ACM Journal Name, Vol. V, No. N, Month 20YY, Pages 1(cid:21)0??. · Éri Fusy et al.Theorem 1.1. There is a one-to-one orresponden e between unrooted binarytrees with n nodes and unrooted quadrangular disse tions of an hexagon with n interior verti es and no non-fa ial 4- y le.The mapping from binary trees to disse tions, whi h we all the losure, is easilydes ribed and resembles onstru tions that were re ently proposed for simpler kindsof maps [S hae(cid:27)er 1997; Bouttier et al. 2002; Poulalhon and S hae(cid:27)er 2006℄. Theproof that the mapping is a bije tion is instead rather sophisti ated, relying onnew properties of onstrained orientations [Ossona de Mendez 1994℄, related toS hnyder woods of triangulations and 3- onne ted planar maps [S hnyder 1990;di Battista et al. 1999; Felsner 2001℄ .Conversely, the re onstru tion of the tree from the disse tion relies on a lineartime algorithm to ompute the minimal S hnyder woods of a 3- onne ted map(or equivalently, the minimal α -orientation of the asso iated derived map, seeSe tion 9). This problem is of independant interest and our algorithm has forexample appli ations in the graph drawing ontext [Boni hon et al. 2007℄. It isakin to Kant's anoni al ordering [Kant 1996; Chuang et al. 1998; Boni hon etal. 2003; Castelli-Aleardi and Devillers 2004℄, but again the proof of orre tness isquite involved.Theorem 1.1 leads dire tly to the impli it representation of the numbers |P ′ n | (cid:22) ounting rooted 3- onne ted maps with n edges(cid:22) due to Tutte [1963℄), and itsre(cid:28)nement as dis ussed in Se tion 5 yields that of |P ′ ij | the number of rooted 3- onne ted maps with i verti es and j fa es (due to Mullin and S hellenberg [1968℄)from whi h Formula (1) follows. It partially explains the ombinatori s of the o - urren e of the ross produ t of binomials, sin e these are typi al of binary treeenumerations. Let us mention that the one-to-one orresponden e spe ializes par-ti ularly ni ely to ount plane triangulations (i.e., 3- onne ted maps with all fa esof degree 3), leading to the (cid:28)rst bije tive derivation of the ounting formula for un-rooted plane triangulations with i verti es, originally found by Brown [1964℄ usingalgebrai methods.1.2 Random samplingA se ond byprodu t of Theorem 1.1 is an e(cid:30) ient uniform random sampler forrooted 3- onne ted maps, i.e., an algorithm that, given n , outputs a random elementin the set P ′ n of rooted 3- onne ted maps with n edges with equal han es for allelements. The same prin iples yield a uniform sampler for P ′ ij .The uniform random generation of lasses of maps like triangulations or 3- onne ted graphs was (cid:28)rst onsidered in mathemati al physi s (see referen es in[Ambjørn et al. 1994; Poulalhon and S hae(cid:27)er 2006℄), and various types of ran-dom planar graphs are ommonly used for testing graph drawing algorithms (see[de Fraysseix et al.℄).The best previously known algorithm [S hae(cid:27)er 1999℄ had expe ted omplexity O ( n / ) for P ′ n , and was mu h less e(cid:30) ient for P ′ ij , having even exponential om-plexity for i/j or j/i tending to 2 (due to Euler's formula these ratio are boundedabove by 2 for 3- onne ted maps). In Se tion 6, we show that our generator for P ′ n or P ′ ij performs in linear time ex ept if i/j or j/i tends to 2 where it be omes atmost ubi .ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees · i verti es was given by Denise et al. [1996℄, but it resists known approa hes for per-fe t sampling [Wilson 2004℄, and has unknown mixing time. As opposed to this, are ursive s heme to sample planar graphs was proposed by Bodirsky et al. [2003℄,with amortized omplexity O ( n . ) . This result is based on a re ursive de ompo-sition of planar graphs: a planar graph an be de omposed into a tree-stru turewhose nodes are o upied by rooted 3- onne ted maps. Generating a planar graphredu es to omputing bran hing probabilities so as to generate the de ompositiontree with suitable probability; then a random rooted 3- onne ted map is generatedfor ea h node of the de omposition tree. Bodirsky et al. [2003℄ use the so- alledre ursive method [Nijenhuis and Wilf 1978; Flajolet et al. 1994; Wilson 1997℄ totake advantage of the re ursive de omposition of planar graphs. Our new randomgenerator for rooted 3- onne ted maps redu es their amortized ost to O ( n ) . Fi-nally a new uniform random generator for planar graphs was re ently developpedby one of the authors [Fusy 2005℄, that avoids the expensive prepro essing ompu-tations of [Bodirsky et al. 2003℄. The re ursive s heme is similar to the one usedin [Bodirsky et al. 2003℄, but the method to translate it to a random generatorrelies on Boltzmann samplers, a new general framework for the random generationre ently developed in [Du hon et al. 2004℄. Thanks to our random generator forrooted 3- onne ted maps, the algorithm of [Fusy 2005℄ has a time- omplexity of O ( n ) for exa t size uniform sampling and even performs in linear time for approx-imate size uniform sampling.1.3 Su in t en odingA third byprodu t of Theorem 1.1 is the possibility to en ode in linear time a 3- onne ted planar graph with n edges by a binary tree with n nodes. In turn thetree an be en oded by a balan ed parenthesis word of n bits. This ode is optimalin the information theoreti sense: the entropy per edge of this lass of graphs, i.e.,the quantity n log |P ( n ) | , tends to 2 when n goes to in(cid:28)nity, so that a ode for P ( n ) annot give a better guarantee on the ompression rate.Appli ations alling for ompa t storage and fast transmission of 3D geometri almeshes have re ently motivated a huge literature on ompression, in parti ular forthe ombinatorial part of the meshes. The (cid:28)rst ompression algorithms dealt onlywith triangular fa es [Rossigna 1999; Touma and Gotsman 1998℄, but many meshesin lude larger fa es, so that polygonal meshes have be ome prominent (see [Alliezand Gotsman 2003℄ for a re ent survey).The question of optimality of oders was raised in relation with ex eption odesprodu ed by several heuristi s when dealing with meshes with spheri al topology[Gotsman 2003; Khodakovsky et al. 2002℄. Sin e these meshes are exa tly triangu-lations (for triangular meshes) and 3- onne ted planar graphs (for polyhedral ones),the oders in [Poulalhon and S hae(cid:27)er 2006℄ and in the present paper respe tivelyprove that traversal based algorithms an a hieve optimality.On the other hand, in the ontext of su in t data stru tures, almost optimalalgorithms have been proposed [He et al. 2000; Lu 2002℄, that are based on separatorACM Journal Name, Vol. V, No. N, Month 20YY. · Éri Fusy et al.theorems. However these algorithms are not truly optimal (they get ε lose to theentropy but at the ost of an un ontrolled in rease of the onstants in the linear omplexity). Moreover, although they rely on a sophisti ated re ursive stru ture,they do not support e(cid:30) ient adja en y requests.As opposed to that, our algorithm shares with [He et al. 1999; Boni hon et al.2003℄ the property that it produ es essentially the ode of a spanning tree. Morepre isely it is just the balan ed parenthesis ode of a binary tree, and adja en ies ofthe initial disse tion that are not present in the tree an be re overed from the odeby a simple variation on the interpretation of the symbols. Adja en y queries anthus be dealt with in time proportional to the degree of verti es [Castelli-Aleardiet al. 2006℄ using the approa h of [Munro and Raman 1997; He et al. 1999℄.Finally we show that the ode an be modi(cid:28)ed to be optimal on the lass P ( n, i, j ) .Sin e the entropy of this lass is stri tly smaller than that of P ( n ) as soon as | i − n/ | ≫ n / , the resulting parametri oder is more e(cid:30) ient in this range. Inparti ular in the ase j = 2 i − our new algorithm spe ializes to an optimal oderfor triangulations.1.4 Outline of the paperThe paper starts with two se tions of preliminaries: de(cid:28)nitions of the maps and treesinvolved (Se tion 2), and some basi orresponden es between them (Se tion 3).Then omes our main result (Se tion 4), the mapping between binary trees andsome disse tions of the hexagon by quadrangular fa es. The fa t that this mappingis a bije tion follows from the existen e and uniqueness of a ertain tri-orientation ofour disse tions. The proof of this auxiliary theorem, whi h requires the introdu tionof the so- alled derived maps and their α -orientations, is delayed to Se tion 8, thatis, after the three se tions dedi ated to appli ations of our main result: in thesese tions we su essively dis uss ounting (Se tion 5), sampling (Se tion 6) and oding (Se tion 7) rooted 3- onne ted maps. The third appli ation leads us toour se ond important result: in Se tion 9 we present a linear time algorithm to ompute the minimal α -orientation of the derived map of a 3- onne ted planarmap (whi h also orresponds to the minimal S hnyder woods alluded to above).Finally, Se tion 10 is dedi ated to the orre tness proof of this orientation algorithm.Figure 1 summarizes the onne tions between the di(cid:27)erent families of obje ts we onsider.2. DEFINITIONS2.1 Planar mapsA planar map is a proper embedding of an unlabelled onne ted graph in the plane,where proper means that edges are smooth simple ar s that do not meet but attheir endpoints. A planar map is said to be rooted if one edge of the outer fa e, alled the root-edge, is marked and oriented su h that the outer fa e lays on itsright. The origin of the root-edge is alled root-vertex. Verti es and edges are saidto be outer or inner depending on whether they are in ident to the outer fa e ornot.A planar map is 3- onne ted if it has at least 4 edges and an not be dis onne tedby the removal of two verti es. The (cid:28)rst 3- onne ted planar map is the tetrahedron,ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees · P ′ n (respe tively P ′ ij ) the set of rooted 3- onne tedplanar maps with n edges (resp. i verti es and j fa es). A 3- onne ted planar mapis outer-triangular if its outer fa e is triangular.2.2 Plane trees, and half-edgesPlane trees are planar maps with a single fa e (cid:22)the outer one. A vertex is alleda leaf if it has degree 1, and node otherwise. Edges in ident to a leaf are alledstems, and the other are alled entire edges. Observe that plane trees are unrootedtrees.Binary trees are plane trees whose nodes have degree 3. By onvention we shallrequire that a rooted binary tree has a root-edge that is a stem. The root-edge ofa rooted binary tree thus onne ts a node, alled the root-node, to a leaf, alledthe root-leaf. With this de(cid:28)nition of rooted binary tree, upon drawing the tree in atop down manner starting with the root-leaf, every node (in luding the root-node)has a father, a left son and a right son. This (very minor) variation on the usualde(cid:28)nition of rooted binary trees will be onvenient later on. For n ≥ , we denoterespe tively by B n and B ′ n the sets of binary and rooted binary trees with n nodes(they have n + 2 leaves, as proved by indu tion on n ). These rooted trees are wellknown to be ounted by the Catalan numbers: |B ′ n | = n +1 (cid:0) nn (cid:1) .The verti es of a binary tree an be greedily bi olored (cid:22)say in bla k or white(cid:22)so that adja ent verti es have distin t olors. The bi oloration is unique up to the hoi e of the olor of the (cid:28)rst node. As a onsequen e, rooted bi olored binarytrees are either bla k-rooted or white-rooted, depending on the olor of the rootnode. The sets of bla k-rooted (resp. white-rooted) binary trees with i bla k nodesand j white nodes is denoted by B • ij (resp. by B ◦ ij ); and the total set of rootedbi olored binary trees with i bla k nodes and j white nodes is denoted by B ′ ij .It will be onvenient to view ea h entire edge of a tree as a pair of opposite half-edges (cid:22)ea h one in ident to one extremity of the edge(cid:22) and to view ea h stem asa single half-edge (cid:22)in ident to the node holding the stem. More generally we shallACM Journal Name, Vol. V, No. N, Month 20YY. · Éri Fusy et al. onsider maps that have entire edges (made of two half-edges) and stems (made ofonly one half-edge). It is then also natural to asso iate one fa e to ea h half-edge,say, the fa e on its right. In the ase of trees, there is only the outer fa e, so thatall half-edges get the same asso iated fa e.2.3 Quadrangulations and disse tionsA quadrangulation is a planar map whose fa es (in luding the outer one) havedegree 4. A disse tion of the hexagon by quadrangular fa es is a planar map whoseouter fa e has degree 6 and inner fa es have degree 4.Cy les that do not delimit a fa e are said to be separating. A quadrangulation ora disse tion of the hexagon by quadrangular fa es is said to be irredu ible if it has atleast 4 fa es and has no separating 4- y le. The (cid:28)rst irredu ible quadrangulationis the ube, whi h has 6 fa es. We denote by Q ′ n the set of rooted irredu iblequadrangulations with n fa es, in luding the outer one. Euler's relation ensuresthat these quadrangulations have n + 2 verti es. We denote by D n ( D ′ n ) the set of(rooted, respe tively) irredu ible disse tions of the hexagon with n inner verti es.These have n + 2 quadrangular fa es, a ording to Euler's relation. From nowon, irredu ible disse tions of the hexagon by quadrangular fa es will simply be alled irredu ible disse tions. The lasses of rooted irredu ible quadrangulationsand of rooted irredu ible disse tions are respe tively denoted by Q ′ = ∪ n Q ′ n and D ′ = ∪ n D ′ n .As fa es of disse tions and quadrangulations have even degree, the verti es ofthese maps an be greedily bi olored, say, in bla k and white, so that ea h edge onne ts a bla k vertex to a white one. Su h a bi oloration is unique up to the hoi e of the olors. We denote by Q ′ ij the set of rooted bi olored irredu iblequadrangulations with i bla k verti es and j white verti es and su h that the root-vertex is bla k; and by D ′ ij the set of rooted bi olored irredu ible disse tions with i bla k inner verti es and j white inner verti es and su h that the root-vertex isbla k.A bi olored irredu ible disse tion is omplete if the three outer white verti es ofthe hexagon have degree exa tly 2. Hen e, these three verti es are in ident to twoadja ent edges on the hexagon.3. CORRESPONDENCES BETWEEN FAMILIES OF PLANAR MAPSThis se tion re alls a folklore bije tion between irredu ible quadrangulations and3- onne ted maps, hereafter alled angular mapping, see [Mullin and S hellenberg1968℄, and its adaptation to outer-triangular 3- onne ted maps.3.1 3- onne ted maps and irredu ible quadrangulationsLet us (cid:28)rst re all how the angular mapping works. Given a rooted quadrangulation Q ∈ Q ′ n endowed with its vertex bi oloration, let M be the rooted map obtainedby linking, for ea h fa e f of Q (even the outer fa e), the two diagonally opposedbla k verti es of f ; the root of M is hosen to be the edge orresponding to theouter fa e of Q , oriented so that M and Q have same root-vertex, see Figure 2. Themap M is often alled the primal map of Q . A similar onstru tion using whiteverti es instead of bla k ones would give its dual map (i.e., the map with a vertexACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees · M and edge-set orresponding to the adja en ies between verti esand fa es of M ).The onstru tion of the primal map is easily invertible. Given any rooted map M , the inverse onstru tion onsists in adding a vertex alled a fa e-vertex in ea hfa e (even the outer one) of M and linking a vertex v and a fa e-vertex v f by anedge if v is in ident to the fa e f orresponding to v f . Keeping only these fa e-vertex in iden e edges yields a quadrangulation. The root is hosen as the edgethat follows the root of M in ounter- lo kwise order around its origin.The following theorem is a lassi al result in the theory of maps.Theorem 3.1 (Angular mapping). The angular mapping is a bije tion be-tween P ′ n and Q ′ n and more pre isely a bije tion between P ′ ij and Q ′ ij .3.2 Outer-triangular 3- onne ted maps and bi olored omplete irredu ible disse tionsThe same prin iple yields a bije tion, also alled angular mapping, between outer-triangular 3- onne ted maps and bi olored omplete irredu ible disse tions, whi hwill prove very useful in Se tions 7 and 8. This mapping is very similar to theangular mapping: given a omplete disse tion D , asso iate to D the map M ob-tained by linking the two bla k verti es of ea h inner fa e of D by a new edge, seeFigure 3. The map M is alled the primal map of D .Theorem 3.2 (Angular mapping with border). The angular mapping, for-mulated for omplete disse tions, is a bije tion between bi olored omplete irre-du ible disse tions with i bla k verti es and j white verti es and outer-triangular3- onne ted maps with i verti es and j − inner fa es.Proof. The proof follows similar lines as that of Theorem 3.1, see [Mullin andS hellenberg 1968℄.3.3 Derived mapsIn its version for omplete disse tions, the angular mapping an also be formulatedusing the on ept of derived map, whi h will be very useful throughout this arti le(in parti ular when dealing with orientations).Let M be an outer-triangular 3- onne ted map, and let M ∗ be the map obtainedfrom the dual of M by removing the dual vertex orresponding to the outer fa e of M . Then the derived map M ′ of M is the superimposition of M and M ∗ , whereACM Journal Name, Vol. V, No. N, Month 20YY. · Éri Fusy et al.(a) A disse tion, (b) bla k diagonals, ( ) the 3- onne ted map, (d) the derived map.Fig. 3. The angular mapping with border: from a bi olored omplete irredu ible disse tion (a) toan outer-triangular 3- onne ted map ( ). The ommon derived map is shown in (d).ea h outer vertex re eives an additional half-edge dire ted toward the outer fa e.For example, Figure 3(d) shows the derived map of the map given in Figure 3( ).The map M is alled the primal map of M ′ and the map M ∗ is alled the dual mapof M ′ . Observe that the superimposition of M and M ∗ reates a vertex of degree 4for ea h edge e of M , due to the interse tion of e with its dual edge. These verti esof M ′ are alled edge-verti es. An edge of M ′ either orresponds to an half-edge of M when it onne ts an edge-vertex and a primal vertex, or to an half-edge of M ∗ when it onne ts an edge-vertex and a dual vertex.Similarly, one de(cid:28)nes derived maps of omplete irredu ible disse tions. Given abi olored omplete irredu ible disse tion D , the derived map M ′ of D is onstru tedas follows; for ea h inner fa e f of D , link the two bla k verti es in ident to f bya primal edge, and the two white ones by a dual edge. These two edges, whi hare the two diagonals of f , interse t at a new vertex alled an edge-vertex. Thederived map is then obtained by keeping the primal and dual edges and all verti esex ept the three outer white ones and their in ident edges. Finally, for the sakeof regularity, ea h of the six outer verti es of M ′ re eives an additional half-edgedire ted toward the outer fa e. For example, the derived map of the disse tion ofFigure 3(a) is shown in Figure 3(d). Bla k verti es are alled primal verti es andwhite verti es are alled dual verti es of the derived map M ′ . The submap M ( M ∗ )of M ′ onsisting of the primal verti es and primal edges (resp. the dual verti esand dual edges) is alled the primal map (resp. the dual map) of the derived map.Clearly, M has a triangular outer fa e; and, by onstru tion, a bi olored ompleteirredu ible disse tion and its primal map have the same derived map.4. BIJECTION BETWEEN BINARY TREES AND IRREDUCIBLE DISSECTIONS4.1 Closure mapping: from trees to disse tionsLo al and partial losure. Given a map with entire edges and stems (for instan ea tree), we de(cid:28)ne a lo al losure operation, whi h is based on a ounter- lo kwisewalk around the map: this walk alongside the boundary of the outer map visitsa su ession of stems and entire edges, or more pre isely, a sequen e of half-edgeshaving the outer fa e on their right-hand side. When a stem is immediately followedin this walk by three entire edges, its lo al losure onsists in the reation of anopposite half-edge for this stem, whi h is atta hed to farthest endpoint of the thirdentire edge: this amounts to ompleting the stem into an entire edge, so as to reate(cid:22)or lose(cid:22) a quadrangular fa e. This operation is illustrated in Figure 4(b).ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees · (cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1) (a) Generi ase when r = 2 and s = 2 . (b) Case of the binary tree of Figure 4(a).Fig. 5. The omplete losure.Given a binary tree T , the lo al losure an be performed greedily until no morelo al losure is possible. Ea h lo al losure reates a new entire edge, maybe makinga new lo al losure possible. It is easy to see that the (cid:28)nal map, alled the partial losure of T , does not depend on the order of the lo al losures. Indeed, a y li parenthesis word is asso iated to the ounter- lo kwise boundary of the tree, withan opening parenthesis of weight 3 for a stem and a losing parenthesis for a side ofentire edge; then the future lo al losures orrespond to mat hings of the parenthesisword. An example of partial losure is shown in Figure 4( ).Complete losure. Let us now omplete the partial losure operation to obtain adisse tion of the hexagon with quadrangular fa es. An outer entire half-edge is anhalf-edge belonging to an entire edge and in ident to the outer fa e. Observe thata binary tree T with n nodes has n + 2 stems and n − outer entire half-edges.Ea h lo al losure de reases by 1 the number of stems and by 2 the number ofouter entire half-edges. Hen e, if k denotes the number of (unmat hed) stems inthe partial losure of T , there are k − outer entire half-edges. Moreover, stemsdelimit intervals of inner half-edges on the ontour of the outer fa e; these intervalshave length at most 2, otherwise a lo al losure would be possible. Let r be thenumber of su h intervals of length 1 and s be the number of su h intervals of length 0(that is, the number of nodes in ident to two unmat hed stems). Then r and s are learly related by the relation r + 2 s = 6 .The omplete losure onsists in ompleting all unmat hed stems with half-edgesACM Journal Name, Vol. V, No. N, Month 20YY.0 · Éri Fusy et al.(a) A tri-oriented binary tree, (b) and its tri-oriented losure.Fig. 6. Examples of tri-orientations.in ident to verti es of the hexagon in the unique way (up to rotation of the hexagon)that reates only quadrangular bounded fa es. Figure 5(a) illustrates the omplete losure for the ase ( r = 2 , s = 2) , and a parti ular example is given in Figure 5(b).Lemma 4.1. The losure of a binary tree is an irredu ible disse tion of thehexagon.Proof. Assume that there exists a separating 4- y le C in the losure of T . Let m ≥ be the number of verti es in the interior of C . Then there are m edges inthe interior of C a ording to Euler's relation. Let v be a vertex of T that belongs tothe interior of C after the losure. Consider the orientation of edges of T away from v (only for the sake of this proof). Then nodes of T have outdegree 2, ex ept v ,whi h has outdegree 3. This orientation naturally indu es an orientation of edges ofthe losure-disse tion with the same property (ex ept that verti es of the hexagonhave outdegree 0). Hen e there are at least m + 1 edges in the interior of C , a ontradi tion.4.2 Tri-orientations and openingTri-orientations. In order to de(cid:28)ne the mapping inverse to the losure, we need abetter des ription of the stru ture indu ed on the losure map by the original tree.Let us onsider orientations of the half-edges of a map (in ontrast to the usualnotion of orientation, where edges are oriented). An half-edge is said to be inwardif it is oriented toward its origin and outward if it is oriented out of its origin. Ifa map is endowed with an orientation of its half-edges, the outdegree of a vertex v is naturally de(cid:28)ned as the number of its in ident half-edges oriented outward.The (unique) tri-orientation of a binary tree is de(cid:28)ned as the orientation of itshalf-edges su h that any node has outdegree 3, see Figure 6(a) for an example. Atri-orientation of a disse tion is an orientation of its inner half-edges (i.e., half-edges belonging to inner edges) su h that outer and inner verti es have respe tivelyoutdegree 0 and 3, and su h that two half-edges of a same inner edge an not bothbe oriented inward, see Figure 6(b). An edge is said to be simply oriented if its twohalf-edges have same dire tion (that is, one is oriented inward and the other oneoutward), and bi-oriented if they are both oriented outward.Let D be an irredu ible disse tion endowed with a tri-orientation. A lo kwiseACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ··
aa r X i v : . [ m a t h . C O ] O c t Disse tions, orientations, and trees,with appli ations to optimal mesh en odingand to random samplingÉRIC FUSY, DOMINIQUE POULALHON and GILLES SCHAEFFERÉ.F and G.S: LIX, É ole Polyte hnique. D.P: Liafa, Univ. Paris 7. Fran eWe present a bije tion between some quadrangular disse tions of an hexagon and unrooted binarytrees, with interesting onsequen es for enumeration, mesh ompression and graph sampling.Our bije tion yields an e(cid:30) ient uniform random sampler for 3- onne ted planar graphs, whi hturns out to be determinant for the quadrati omplexity of the urrent best known uniformrandom sampler for labelled planar graphs [Fusy, Analysis of Algorithms 2005℄.It also provides an en oding for the set P ( n ) of n -edge 3- onne ted planar graphs that mat hesthe entropy bound n log |P ( n ) | = 2 + o (1) bits per edge (bpe). This solves a theoreti al problemre ently raised in mesh ompression, as these graphs abstra t the ombinatorial part of meshes withspheri al topology. We also a hieve the optimal parametri rate n log |P ( n, i, j ) | bpe for graphsof P ( n ) with i verti es and j fa es, mat hing in parti ular the optimal rate for triangulations.Our en oding relies on a linear time algorithm to ompute an orientation asso iated to theminimal S hnyder wood of a 3- onne ted planar map. This algorithm is of independent interest,and it is for instan e a key ingredient in a re ent straight line drawing algorithm for 3- onne tedplanar graphs [Boni hon et al., Graph Drawing 2005℄.Categories and Subje t Des riptors: G.2.1 [Dis rete Mathemati s℄: Combinatorial algorithmsGeneral Terms: AlgorithmsAdditional Key Words and Phrases: Bije tion, Counting, Coding, Random generation1. INTRODUCTIONOne origin of this work an be tra ed ba k to an arti le of Ed Bender in the Amer-i an Mathemati al Monthly [Bender 1987℄, where he asked for a simple explanationof the remarkable asymptoti formula |P ( n, i, j ) | ∼ ijn (cid:18) i − j + 2 (cid:19)(cid:18) j − i + 2 (cid:19) (1)for the ardinality of the set of 3- onne ted (unlabelled) planar graphs with i ver-ti es, j fa es and n = i + j − edges, n going to in(cid:28)nity. By a theorem of Whitney[1933℄, these graphs have essentially a unique embedding on the sphere up to home-omorphisms, so that their study amounts to that of rooted 3- onne ted maps, wherea map is a graph embedded in the plane and rooted means with a marked orientededge.1.1 Graphs, disse tions and treesAnother known property of 3- onne ted planar graphs with n edges is the fa t thatthey are in dire t one-to-one orresponden e with disse tions of the sphere into n quadrangles that have no non-fa ial 4- y le. The heart of our paper lies in a furtherone-to-one orresponden e. ACM Journal Name, Vol. V, No. N, Month 20YY, Pages 1(cid:21)0??. · Éri Fusy et al.Theorem 1.1. There is a one-to-one orresponden e between unrooted binarytrees with n nodes and unrooted quadrangular disse tions of an hexagon with n interior verti es and no non-fa ial 4- y le.The mapping from binary trees to disse tions, whi h we all the losure, is easilydes ribed and resembles onstru tions that were re ently proposed for simpler kindsof maps [S hae(cid:27)er 1997; Bouttier et al. 2002; Poulalhon and S hae(cid:27)er 2006℄. Theproof that the mapping is a bije tion is instead rather sophisti ated, relying onnew properties of onstrained orientations [Ossona de Mendez 1994℄, related toS hnyder woods of triangulations and 3- onne ted planar maps [S hnyder 1990;di Battista et al. 1999; Felsner 2001℄ .Conversely, the re onstru tion of the tree from the disse tion relies on a lineartime algorithm to ompute the minimal S hnyder woods of a 3- onne ted map(or equivalently, the minimal α -orientation of the asso iated derived map, seeSe tion 9). This problem is of independant interest and our algorithm has forexample appli ations in the graph drawing ontext [Boni hon et al. 2007℄. It isakin to Kant's anoni al ordering [Kant 1996; Chuang et al. 1998; Boni hon etal. 2003; Castelli-Aleardi and Devillers 2004℄, but again the proof of orre tness isquite involved.Theorem 1.1 leads dire tly to the impli it representation of the numbers |P ′ n | (cid:22) ounting rooted 3- onne ted maps with n edges(cid:22) due to Tutte [1963℄), and itsre(cid:28)nement as dis ussed in Se tion 5 yields that of |P ′ ij | the number of rooted 3- onne ted maps with i verti es and j fa es (due to Mullin and S hellenberg [1968℄)from whi h Formula (1) follows. It partially explains the ombinatori s of the o - urren e of the ross produ t of binomials, sin e these are typi al of binary treeenumerations. Let us mention that the one-to-one orresponden e spe ializes par-ti ularly ni ely to ount plane triangulations (i.e., 3- onne ted maps with all fa esof degree 3), leading to the (cid:28)rst bije tive derivation of the ounting formula for un-rooted plane triangulations with i verti es, originally found by Brown [1964℄ usingalgebrai methods.1.2 Random samplingA se ond byprodu t of Theorem 1.1 is an e(cid:30) ient uniform random sampler forrooted 3- onne ted maps, i.e., an algorithm that, given n , outputs a random elementin the set P ′ n of rooted 3- onne ted maps with n edges with equal han es for allelements. The same prin iples yield a uniform sampler for P ′ ij .The uniform random generation of lasses of maps like triangulations or 3- onne ted graphs was (cid:28)rst onsidered in mathemati al physi s (see referen es in[Ambjørn et al. 1994; Poulalhon and S hae(cid:27)er 2006℄), and various types of ran-dom planar graphs are ommonly used for testing graph drawing algorithms (see[de Fraysseix et al.℄).The best previously known algorithm [S hae(cid:27)er 1999℄ had expe ted omplexity O ( n / ) for P ′ n , and was mu h less e(cid:30) ient for P ′ ij , having even exponential om-plexity for i/j or j/i tending to 2 (due to Euler's formula these ratio are boundedabove by 2 for 3- onne ted maps). In Se tion 6, we show that our generator for P ′ n or P ′ ij performs in linear time ex ept if i/j or j/i tends to 2 where it be omes atmost ubi .ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees · i verti es was given by Denise et al. [1996℄, but it resists known approa hes for per-fe t sampling [Wilson 2004℄, and has unknown mixing time. As opposed to this, are ursive s heme to sample planar graphs was proposed by Bodirsky et al. [2003℄,with amortized omplexity O ( n . ) . This result is based on a re ursive de ompo-sition of planar graphs: a planar graph an be de omposed into a tree-stru turewhose nodes are o upied by rooted 3- onne ted maps. Generating a planar graphredu es to omputing bran hing probabilities so as to generate the de ompositiontree with suitable probability; then a random rooted 3- onne ted map is generatedfor ea h node of the de omposition tree. Bodirsky et al. [2003℄ use the so- alledre ursive method [Nijenhuis and Wilf 1978; Flajolet et al. 1994; Wilson 1997℄ totake advantage of the re ursive de omposition of planar graphs. Our new randomgenerator for rooted 3- onne ted maps redu es their amortized ost to O ( n ) . Fi-nally a new uniform random generator for planar graphs was re ently developpedby one of the authors [Fusy 2005℄, that avoids the expensive prepro essing ompu-tations of [Bodirsky et al. 2003℄. The re ursive s heme is similar to the one usedin [Bodirsky et al. 2003℄, but the method to translate it to a random generatorrelies on Boltzmann samplers, a new general framework for the random generationre ently developed in [Du hon et al. 2004℄. Thanks to our random generator forrooted 3- onne ted maps, the algorithm of [Fusy 2005℄ has a time- omplexity of O ( n ) for exa t size uniform sampling and even performs in linear time for approx-imate size uniform sampling.1.3 Su in t en odingA third byprodu t of Theorem 1.1 is the possibility to en ode in linear time a 3- onne ted planar graph with n edges by a binary tree with n nodes. In turn thetree an be en oded by a balan ed parenthesis word of n bits. This ode is optimalin the information theoreti sense: the entropy per edge of this lass of graphs, i.e.,the quantity n log |P ( n ) | , tends to 2 when n goes to in(cid:28)nity, so that a ode for P ( n ) annot give a better guarantee on the ompression rate.Appli ations alling for ompa t storage and fast transmission of 3D geometri almeshes have re ently motivated a huge literature on ompression, in parti ular forthe ombinatorial part of the meshes. The (cid:28)rst ompression algorithms dealt onlywith triangular fa es [Rossigna 1999; Touma and Gotsman 1998℄, but many meshesin lude larger fa es, so that polygonal meshes have be ome prominent (see [Alliezand Gotsman 2003℄ for a re ent survey).The question of optimality of oders was raised in relation with ex eption odesprodu ed by several heuristi s when dealing with meshes with spheri al topology[Gotsman 2003; Khodakovsky et al. 2002℄. Sin e these meshes are exa tly triangu-lations (for triangular meshes) and 3- onne ted planar graphs (for polyhedral ones),the oders in [Poulalhon and S hae(cid:27)er 2006℄ and in the present paper respe tivelyprove that traversal based algorithms an a hieve optimality.On the other hand, in the ontext of su in t data stru tures, almost optimalalgorithms have been proposed [He et al. 2000; Lu 2002℄, that are based on separatorACM Journal Name, Vol. V, No. N, Month 20YY. · Éri Fusy et al.theorems. However these algorithms are not truly optimal (they get ε lose to theentropy but at the ost of an un ontrolled in rease of the onstants in the linear omplexity). Moreover, although they rely on a sophisti ated re ursive stru ture,they do not support e(cid:30) ient adja en y requests.As opposed to that, our algorithm shares with [He et al. 1999; Boni hon et al.2003℄ the property that it produ es essentially the ode of a spanning tree. Morepre isely it is just the balan ed parenthesis ode of a binary tree, and adja en ies ofthe initial disse tion that are not present in the tree an be re overed from the odeby a simple variation on the interpretation of the symbols. Adja en y queries anthus be dealt with in time proportional to the degree of verti es [Castelli-Aleardiet al. 2006℄ using the approa h of [Munro and Raman 1997; He et al. 1999℄.Finally we show that the ode an be modi(cid:28)ed to be optimal on the lass P ( n, i, j ) .Sin e the entropy of this lass is stri tly smaller than that of P ( n ) as soon as | i − n/ | ≫ n / , the resulting parametri oder is more e(cid:30) ient in this range. Inparti ular in the ase j = 2 i − our new algorithm spe ializes to an optimal oderfor triangulations.1.4 Outline of the paperThe paper starts with two se tions of preliminaries: de(cid:28)nitions of the maps and treesinvolved (Se tion 2), and some basi orresponden es between them (Se tion 3).Then omes our main result (Se tion 4), the mapping between binary trees andsome disse tions of the hexagon by quadrangular fa es. The fa t that this mappingis a bije tion follows from the existen e and uniqueness of a ertain tri-orientation ofour disse tions. The proof of this auxiliary theorem, whi h requires the introdu tionof the so- alled derived maps and their α -orientations, is delayed to Se tion 8, thatis, after the three se tions dedi ated to appli ations of our main result: in thesese tions we su essively dis uss ounting (Se tion 5), sampling (Se tion 6) and oding (Se tion 7) rooted 3- onne ted maps. The third appli ation leads us toour se ond important result: in Se tion 9 we present a linear time algorithm to ompute the minimal α -orientation of the derived map of a 3- onne ted planarmap (whi h also orresponds to the minimal S hnyder woods alluded to above).Finally, Se tion 10 is dedi ated to the orre tness proof of this orientation algorithm.Figure 1 summarizes the onne tions between the di(cid:27)erent families of obje ts we onsider.2. DEFINITIONS2.1 Planar mapsA planar map is a proper embedding of an unlabelled onne ted graph in the plane,where proper means that edges are smooth simple ar s that do not meet but attheir endpoints. A planar map is said to be rooted if one edge of the outer fa e, alled the root-edge, is marked and oriented su h that the outer fa e lays on itsright. The origin of the root-edge is alled root-vertex. Verti es and edges are saidto be outer or inner depending on whether they are in ident to the outer fa e ornot.A planar map is 3- onne ted if it has at least 4 edges and an not be dis onne tedby the removal of two verti es. The (cid:28)rst 3- onne ted planar map is the tetrahedron,ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees · P ′ n (respe tively P ′ ij ) the set of rooted 3- onne tedplanar maps with n edges (resp. i verti es and j fa es). A 3- onne ted planar mapis outer-triangular if its outer fa e is triangular.2.2 Plane trees, and half-edgesPlane trees are planar maps with a single fa e (cid:22)the outer one. A vertex is alleda leaf if it has degree 1, and node otherwise. Edges in ident to a leaf are alledstems, and the other are alled entire edges. Observe that plane trees are unrootedtrees.Binary trees are plane trees whose nodes have degree 3. By onvention we shallrequire that a rooted binary tree has a root-edge that is a stem. The root-edge ofa rooted binary tree thus onne ts a node, alled the root-node, to a leaf, alledthe root-leaf. With this de(cid:28)nition of rooted binary tree, upon drawing the tree in atop down manner starting with the root-leaf, every node (in luding the root-node)has a father, a left son and a right son. This (very minor) variation on the usualde(cid:28)nition of rooted binary trees will be onvenient later on. For n ≥ , we denoterespe tively by B n and B ′ n the sets of binary and rooted binary trees with n nodes(they have n + 2 leaves, as proved by indu tion on n ). These rooted trees are wellknown to be ounted by the Catalan numbers: |B ′ n | = n +1 (cid:0) nn (cid:1) .The verti es of a binary tree an be greedily bi olored (cid:22)say in bla k or white(cid:22)so that adja ent verti es have distin t olors. The bi oloration is unique up to the hoi e of the olor of the (cid:28)rst node. As a onsequen e, rooted bi olored binarytrees are either bla k-rooted or white-rooted, depending on the olor of the rootnode. The sets of bla k-rooted (resp. white-rooted) binary trees with i bla k nodesand j white nodes is denoted by B • ij (resp. by B ◦ ij ); and the total set of rootedbi olored binary trees with i bla k nodes and j white nodes is denoted by B ′ ij .It will be onvenient to view ea h entire edge of a tree as a pair of opposite half-edges (cid:22)ea h one in ident to one extremity of the edge(cid:22) and to view ea h stem asa single half-edge (cid:22)in ident to the node holding the stem. More generally we shallACM Journal Name, Vol. V, No. N, Month 20YY. · Éri Fusy et al. onsider maps that have entire edges (made of two half-edges) and stems (made ofonly one half-edge). It is then also natural to asso iate one fa e to ea h half-edge,say, the fa e on its right. In the ase of trees, there is only the outer fa e, so thatall half-edges get the same asso iated fa e.2.3 Quadrangulations and disse tionsA quadrangulation is a planar map whose fa es (in luding the outer one) havedegree 4. A disse tion of the hexagon by quadrangular fa es is a planar map whoseouter fa e has degree 6 and inner fa es have degree 4.Cy les that do not delimit a fa e are said to be separating. A quadrangulation ora disse tion of the hexagon by quadrangular fa es is said to be irredu ible if it has atleast 4 fa es and has no separating 4- y le. The (cid:28)rst irredu ible quadrangulationis the ube, whi h has 6 fa es. We denote by Q ′ n the set of rooted irredu iblequadrangulations with n fa es, in luding the outer one. Euler's relation ensuresthat these quadrangulations have n + 2 verti es. We denote by D n ( D ′ n ) the set of(rooted, respe tively) irredu ible disse tions of the hexagon with n inner verti es.These have n + 2 quadrangular fa es, a ording to Euler's relation. From nowon, irredu ible disse tions of the hexagon by quadrangular fa es will simply be alled irredu ible disse tions. The lasses of rooted irredu ible quadrangulationsand of rooted irredu ible disse tions are respe tively denoted by Q ′ = ∪ n Q ′ n and D ′ = ∪ n D ′ n .As fa es of disse tions and quadrangulations have even degree, the verti es ofthese maps an be greedily bi olored, say, in bla k and white, so that ea h edge onne ts a bla k vertex to a white one. Su h a bi oloration is unique up to the hoi e of the olors. We denote by Q ′ ij the set of rooted bi olored irredu iblequadrangulations with i bla k verti es and j white verti es and su h that the root-vertex is bla k; and by D ′ ij the set of rooted bi olored irredu ible disse tions with i bla k inner verti es and j white inner verti es and su h that the root-vertex isbla k.A bi olored irredu ible disse tion is omplete if the three outer white verti es ofthe hexagon have degree exa tly 2. Hen e, these three verti es are in ident to twoadja ent edges on the hexagon.3. CORRESPONDENCES BETWEEN FAMILIES OF PLANAR MAPSThis se tion re alls a folklore bije tion between irredu ible quadrangulations and3- onne ted maps, hereafter alled angular mapping, see [Mullin and S hellenberg1968℄, and its adaptation to outer-triangular 3- onne ted maps.3.1 3- onne ted maps and irredu ible quadrangulationsLet us (cid:28)rst re all how the angular mapping works. Given a rooted quadrangulation Q ∈ Q ′ n endowed with its vertex bi oloration, let M be the rooted map obtainedby linking, for ea h fa e f of Q (even the outer fa e), the two diagonally opposedbla k verti es of f ; the root of M is hosen to be the edge orresponding to theouter fa e of Q , oriented so that M and Q have same root-vertex, see Figure 2. Themap M is often alled the primal map of Q . A similar onstru tion using whiteverti es instead of bla k ones would give its dual map (i.e., the map with a vertexACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees · M and edge-set orresponding to the adja en ies between verti esand fa es of M ).The onstru tion of the primal map is easily invertible. Given any rooted map M , the inverse onstru tion onsists in adding a vertex alled a fa e-vertex in ea hfa e (even the outer one) of M and linking a vertex v and a fa e-vertex v f by anedge if v is in ident to the fa e f orresponding to v f . Keeping only these fa e-vertex in iden e edges yields a quadrangulation. The root is hosen as the edgethat follows the root of M in ounter- lo kwise order around its origin.The following theorem is a lassi al result in the theory of maps.Theorem 3.1 (Angular mapping). The angular mapping is a bije tion be-tween P ′ n and Q ′ n and more pre isely a bije tion between P ′ ij and Q ′ ij .3.2 Outer-triangular 3- onne ted maps and bi olored omplete irredu ible disse tionsThe same prin iple yields a bije tion, also alled angular mapping, between outer-triangular 3- onne ted maps and bi olored omplete irredu ible disse tions, whi hwill prove very useful in Se tions 7 and 8. This mapping is very similar to theangular mapping: given a omplete disse tion D , asso iate to D the map M ob-tained by linking the two bla k verti es of ea h inner fa e of D by a new edge, seeFigure 3. The map M is alled the primal map of D .Theorem 3.2 (Angular mapping with border). The angular mapping, for-mulated for omplete disse tions, is a bije tion between bi olored omplete irre-du ible disse tions with i bla k verti es and j white verti es and outer-triangular3- onne ted maps with i verti es and j − inner fa es.Proof. The proof follows similar lines as that of Theorem 3.1, see [Mullin andS hellenberg 1968℄.3.3 Derived mapsIn its version for omplete disse tions, the angular mapping an also be formulatedusing the on ept of derived map, whi h will be very useful throughout this arti le(in parti ular when dealing with orientations).Let M be an outer-triangular 3- onne ted map, and let M ∗ be the map obtainedfrom the dual of M by removing the dual vertex orresponding to the outer fa e of M . Then the derived map M ′ of M is the superimposition of M and M ∗ , whereACM Journal Name, Vol. V, No. N, Month 20YY. · Éri Fusy et al.(a) A disse tion, (b) bla k diagonals, ( ) the 3- onne ted map, (d) the derived map.Fig. 3. The angular mapping with border: from a bi olored omplete irredu ible disse tion (a) toan outer-triangular 3- onne ted map ( ). The ommon derived map is shown in (d).ea h outer vertex re eives an additional half-edge dire ted toward the outer fa e.For example, Figure 3(d) shows the derived map of the map given in Figure 3( ).The map M is alled the primal map of M ′ and the map M ∗ is alled the dual mapof M ′ . Observe that the superimposition of M and M ∗ reates a vertex of degree 4for ea h edge e of M , due to the interse tion of e with its dual edge. These verti esof M ′ are alled edge-verti es. An edge of M ′ either orresponds to an half-edge of M when it onne ts an edge-vertex and a primal vertex, or to an half-edge of M ∗ when it onne ts an edge-vertex and a dual vertex.Similarly, one de(cid:28)nes derived maps of omplete irredu ible disse tions. Given abi olored omplete irredu ible disse tion D , the derived map M ′ of D is onstru tedas follows; for ea h inner fa e f of D , link the two bla k verti es in ident to f bya primal edge, and the two white ones by a dual edge. These two edges, whi hare the two diagonals of f , interse t at a new vertex alled an edge-vertex. Thederived map is then obtained by keeping the primal and dual edges and all verti esex ept the three outer white ones and their in ident edges. Finally, for the sakeof regularity, ea h of the six outer verti es of M ′ re eives an additional half-edgedire ted toward the outer fa e. For example, the derived map of the disse tion ofFigure 3(a) is shown in Figure 3(d). Bla k verti es are alled primal verti es andwhite verti es are alled dual verti es of the derived map M ′ . The submap M ( M ∗ )of M ′ onsisting of the primal verti es and primal edges (resp. the dual verti esand dual edges) is alled the primal map (resp. the dual map) of the derived map.Clearly, M has a triangular outer fa e; and, by onstru tion, a bi olored ompleteirredu ible disse tion and its primal map have the same derived map.4. BIJECTION BETWEEN BINARY TREES AND IRREDUCIBLE DISSECTIONS4.1 Closure mapping: from trees to disse tionsLo al and partial losure. Given a map with entire edges and stems (for instan ea tree), we de(cid:28)ne a lo al losure operation, whi h is based on a ounter- lo kwisewalk around the map: this walk alongside the boundary of the outer map visitsa su ession of stems and entire edges, or more pre isely, a sequen e of half-edgeshaving the outer fa e on their right-hand side. When a stem is immediately followedin this walk by three entire edges, its lo al losure onsists in the reation of anopposite half-edge for this stem, whi h is atta hed to farthest endpoint of the thirdentire edge: this amounts to ompleting the stem into an entire edge, so as to reate(cid:22)or lose(cid:22) a quadrangular fa e. This operation is illustrated in Figure 4(b).ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees · (cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1) (a) Generi ase when r = 2 and s = 2 . (b) Case of the binary tree of Figure 4(a).Fig. 5. The omplete losure.Given a binary tree T , the lo al losure an be performed greedily until no morelo al losure is possible. Ea h lo al losure reates a new entire edge, maybe makinga new lo al losure possible. It is easy to see that the (cid:28)nal map, alled the partial losure of T , does not depend on the order of the lo al losures. Indeed, a y li parenthesis word is asso iated to the ounter- lo kwise boundary of the tree, withan opening parenthesis of weight 3 for a stem and a losing parenthesis for a side ofentire edge; then the future lo al losures orrespond to mat hings of the parenthesisword. An example of partial losure is shown in Figure 4( ).Complete losure. Let us now omplete the partial losure operation to obtain adisse tion of the hexagon with quadrangular fa es. An outer entire half-edge is anhalf-edge belonging to an entire edge and in ident to the outer fa e. Observe thata binary tree T with n nodes has n + 2 stems and n − outer entire half-edges.Ea h lo al losure de reases by 1 the number of stems and by 2 the number ofouter entire half-edges. Hen e, if k denotes the number of (unmat hed) stems inthe partial losure of T , there are k − outer entire half-edges. Moreover, stemsdelimit intervals of inner half-edges on the ontour of the outer fa e; these intervalshave length at most 2, otherwise a lo al losure would be possible. Let r be thenumber of su h intervals of length 1 and s be the number of su h intervals of length 0(that is, the number of nodes in ident to two unmat hed stems). Then r and s are learly related by the relation r + 2 s = 6 .The omplete losure onsists in ompleting all unmat hed stems with half-edgesACM Journal Name, Vol. V, No. N, Month 20YY.0 · Éri Fusy et al.(a) A tri-oriented binary tree, (b) and its tri-oriented losure.Fig. 6. Examples of tri-orientations.in ident to verti es of the hexagon in the unique way (up to rotation of the hexagon)that reates only quadrangular bounded fa es. Figure 5(a) illustrates the omplete losure for the ase ( r = 2 , s = 2) , and a parti ular example is given in Figure 5(b).Lemma 4.1. The losure of a binary tree is an irredu ible disse tion of thehexagon.Proof. Assume that there exists a separating 4- y le C in the losure of T . Let m ≥ be the number of verti es in the interior of C . Then there are m edges inthe interior of C a ording to Euler's relation. Let v be a vertex of T that belongs tothe interior of C after the losure. Consider the orientation of edges of T away from v (only for the sake of this proof). Then nodes of T have outdegree 2, ex ept v ,whi h has outdegree 3. This orientation naturally indu es an orientation of edges ofthe losure-disse tion with the same property (ex ept that verti es of the hexagonhave outdegree 0). Hen e there are at least m + 1 edges in the interior of C , a ontradi tion.4.2 Tri-orientations and openingTri-orientations. In order to de(cid:28)ne the mapping inverse to the losure, we need abetter des ription of the stru ture indu ed on the losure map by the original tree.Let us onsider orientations of the half-edges of a map (in ontrast to the usualnotion of orientation, where edges are oriented). An half-edge is said to be inwardif it is oriented toward its origin and outward if it is oriented out of its origin. Ifa map is endowed with an orientation of its half-edges, the outdegree of a vertex v is naturally de(cid:28)ned as the number of its in ident half-edges oriented outward.The (unique) tri-orientation of a binary tree is de(cid:28)ned as the orientation of itshalf-edges su h that any node has outdegree 3, see Figure 6(a) for an example. Atri-orientation of a disse tion is an orientation of its inner half-edges (i.e., half-edges belonging to inner edges) su h that outer and inner verti es have respe tivelyoutdegree 0 and 3, and su h that two half-edges of a same inner edge an not bothbe oriented inward, see Figure 6(b). An edge is said to be simply oriented if its twohalf-edges have same dire tion (that is, one is oriented inward and the other oneoutward), and bi-oriented if they are both oriented outward.Let D be an irredu ible disse tion endowed with a tri-orientation. A lo kwiseACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· D is a simple y le C onsisting of edges that are either bi-oriented orsimply oriented with the interior of C on their right.Lemma 4.2. Let D be an irredu ible disse tion with n inner verti es. Then atri-orientation of D has n − bi-oriented edges and n + 2 simply oriented edges.If a tri-orientation of a disse tion has no lo kwise ir uit, then its bi-orientededges form a tree spanning the inner verti es of the disse tion.Proof. Let s and r denote the numbers of simply and bi-oriented edges of D .A ording to Euler's relation (using the degrees of the fa es), D has n + 1 inneredges, i.e., n + 1 = r + s . Moreover, as all inner verti es have outdegree 3, n = 2 r + s . Hen e r = n − and s = n + 2 .If the tri-orientation has no lo kwise ir uit, the subgraph H indu ed by the bi-oriented edges has r = n − edges, no y le (otherwise the y le ould be traversed lo kwise, as all its edges are bi-oriented), and is in ident to at most n verti es,whi h are the inner verti es of D . A ording to a lassi al result of graph theory, H is a tree spanning the n inner verti es of D .Closure-tri-orientation of a disse tion. Let D be a disse tion obtained as the losureof a binary tree T . The tri-orientation of T learly indu es via the losure a tri-orientation of D , alled losure-tri-orientation. On this tri-orientation, bi-orientededges orrespond to inner edges of the original binary tree, see Figure 6(b).Lemma 4.3. A losure-tri-orientation has no lo kwise ir uit.Proof. Sin e verti es of the hexagon have outdegree 0, they an not belong toany ir uit. Hen e lo kwise ir uits may only be reated during a lo al losure.However losure edges are simply oriented with the outer fa e on their right, hen emay only reate ounter lo kwise ir uits.This property is indeed quite strong: the following theorem ensures that theproperty of having no lo kwise ir uit hara terizes the losure-tri-orientation andthat a tri-orientation without lo kwise ir uit exists for any irredu ible disse tion.The proof of this theorem is delayed to Se tion 8.Theorem 4.4. Any irredu ible disse tion has a unique tri-orientation without lo kwise ir uit.Re overing the tree: the opening mapping. Lemma 4.2 and the present se tion giveall ne essary elements to des ribe the inverse mapping of the losure, whi h is alled the opening: let D be an irredu ible disse tion endowed with its (unique byTheorem 4.4) tri-orientation without lo kwise ir uit. The opening of D is thebinary tree obtained from D by deleting outer verti es, outer edges, and all inwardhalf-edges.4.3 The losure is a bije tionIn this se tion, we show that the opening is inverse to the losure. By onstru tionof the opening, the following lemma is straightforward:Lemma 4.5. Let D be an irredu ible disse tion obtained as the losure of a binarytree T . Then the opening of D is T . ACM Journal Name, Vol. V, No. N, Month 20YY.2 · Éri Fusy et al.Conversely, the following also holds:Lemma 4.6. Let T be a binary tree obtained as the opening of an irredu ibledisse tion D . Then the losure of T is D .Proof. The proof relies on the de(cid:28)nition of an order for removing inward half-edges. Start with the half-edges in ident to outer verti es (that are all orientedinward): this learly inverses the ompletion step of the losure. Ea h furtherremoval must orrespond to a lo al losure, that is, the removed half-edge musthave the outer fa e on its right.Let M k be the submap of the disse tion indu ed by remaining half-edges after k removals. Then M k overs the n inner verti es, and, as long as some inwardhalf-edge remains, it has at least n entire edges (see Lemma 4.2). Hen e, there isat least one y le, and a simple one C an be extra ted from the boundary of theouter fa e of M k . Sin e there is no lo kwise ir uit, at least one edge of C is simplyoriented with the interior of C on its left; the orresponding inward half-edge anbe sele ted for the next removal.Assuming Theorem 4.4, the bije tive result follows from Lemmas 4.5 and 4.6:Theorem 4.7. For ea h n ≥ , the losure mapping is a bije tion between theset B n of binary trees with n nodes and the set D n of irredu ible disse tions with n inner verti es.For ea h integer pair ( i, j ) with i + j ≥ , the losure mapping is a bije tionbetween the set B ij of bi olored binary trees with i bla k nodes and j white nodes,and the set D ij of bi olored irredu ible disse tions with i bla k inner verti es and j white inner verti es.The inverse mapping of the losure is the opening.We an state three analogous versions of Theorem 4.7 for rooted obje ts:Theorem 4.8. The losure mapping indu es the following orresponden es be-tween sets of rooted obje ts: B ′ n × { , . . . , } ≡ D ′ n × { , . . . , n + 2 } , B ′ ij × { , , } ≡ D ′ ij × { , . . . , i + j + 2 } , B • ij × { , , } ≡ D ′ ij × { , . . . , i − j + 1 } . Proof. We de(cid:28)ne a bi-rooted irredu ible disse tion as a rooted irredu ible disse -tion endowed with its tri-orientation without lo kwise ir uit and where a simplyoriented edge is marked. We write D ′′ n for the set of bi-rooted irredu ible disse -tions with n inner verti es. Opening and rerooting on the stem orresponding tothe marked edge de(cid:28)nes a surje tion from D ′′ n onto B ′ n , for whi h ea h element of B ′ n has learly six preimages, sin e the disse tion ould have been rooted at any edgeof the hexagon. Moreover, erasing the mark learly de(cid:28)nes a surje tion from D ′′ n to D ′ n , for whi h ea h element of D ′ n has n + 2 preimages a ording to Lemma 4.2.Hen e, the losure de(cid:28)nes a ( n + 2) -to-6 mapping between B ′ n and D ′ n . The proofof the ( i + j + 2) -to-3 orresponden e between B ′ ij and D ′ ij is the same.The (2 i − j + 1) -to-3 orresponden e between B • ij and D ′ ij indu ed by the losure an be proved similarly, with the di(cid:27)eren e that the marked simply oriented edgeACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ··
aa r X i v : . [ m a t h . C O ] O c t Disse tions, orientations, and trees,with appli ations to optimal mesh en odingand to random samplingÉRIC FUSY, DOMINIQUE POULALHON and GILLES SCHAEFFERÉ.F and G.S: LIX, É ole Polyte hnique. D.P: Liafa, Univ. Paris 7. Fran eWe present a bije tion between some quadrangular disse tions of an hexagon and unrooted binarytrees, with interesting onsequen es for enumeration, mesh ompression and graph sampling.Our bije tion yields an e(cid:30) ient uniform random sampler for 3- onne ted planar graphs, whi hturns out to be determinant for the quadrati omplexity of the urrent best known uniformrandom sampler for labelled planar graphs [Fusy, Analysis of Algorithms 2005℄.It also provides an en oding for the set P ( n ) of n -edge 3- onne ted planar graphs that mat hesthe entropy bound n log |P ( n ) | = 2 + o (1) bits per edge (bpe). This solves a theoreti al problemre ently raised in mesh ompression, as these graphs abstra t the ombinatorial part of meshes withspheri al topology. We also a hieve the optimal parametri rate n log |P ( n, i, j ) | bpe for graphsof P ( n ) with i verti es and j fa es, mat hing in parti ular the optimal rate for triangulations.Our en oding relies on a linear time algorithm to ompute an orientation asso iated to theminimal S hnyder wood of a 3- onne ted planar map. This algorithm is of independent interest,and it is for instan e a key ingredient in a re ent straight line drawing algorithm for 3- onne tedplanar graphs [Boni hon et al., Graph Drawing 2005℄.Categories and Subje t Des riptors: G.2.1 [Dis rete Mathemati s℄: Combinatorial algorithmsGeneral Terms: AlgorithmsAdditional Key Words and Phrases: Bije tion, Counting, Coding, Random generation1. INTRODUCTIONOne origin of this work an be tra ed ba k to an arti le of Ed Bender in the Amer-i an Mathemati al Monthly [Bender 1987℄, where he asked for a simple explanationof the remarkable asymptoti formula |P ( n, i, j ) | ∼ ijn (cid:18) i − j + 2 (cid:19)(cid:18) j − i + 2 (cid:19) (1)for the ardinality of the set of 3- onne ted (unlabelled) planar graphs with i ver-ti es, j fa es and n = i + j − edges, n going to in(cid:28)nity. By a theorem of Whitney[1933℄, these graphs have essentially a unique embedding on the sphere up to home-omorphisms, so that their study amounts to that of rooted 3- onne ted maps, wherea map is a graph embedded in the plane and rooted means with a marked orientededge.1.1 Graphs, disse tions and treesAnother known property of 3- onne ted planar graphs with n edges is the fa t thatthey are in dire t one-to-one orresponden e with disse tions of the sphere into n quadrangles that have no non-fa ial 4- y le. The heart of our paper lies in a furtherone-to-one orresponden e. ACM Journal Name, Vol. V, No. N, Month 20YY, Pages 1(cid:21)0??. · Éri Fusy et al.Theorem 1.1. There is a one-to-one orresponden e between unrooted binarytrees with n nodes and unrooted quadrangular disse tions of an hexagon with n interior verti es and no non-fa ial 4- y le.The mapping from binary trees to disse tions, whi h we all the losure, is easilydes ribed and resembles onstru tions that were re ently proposed for simpler kindsof maps [S hae(cid:27)er 1997; Bouttier et al. 2002; Poulalhon and S hae(cid:27)er 2006℄. Theproof that the mapping is a bije tion is instead rather sophisti ated, relying onnew properties of onstrained orientations [Ossona de Mendez 1994℄, related toS hnyder woods of triangulations and 3- onne ted planar maps [S hnyder 1990;di Battista et al. 1999; Felsner 2001℄ .Conversely, the re onstru tion of the tree from the disse tion relies on a lineartime algorithm to ompute the minimal S hnyder woods of a 3- onne ted map(or equivalently, the minimal α -orientation of the asso iated derived map, seeSe tion 9). This problem is of independant interest and our algorithm has forexample appli ations in the graph drawing ontext [Boni hon et al. 2007℄. It isakin to Kant's anoni al ordering [Kant 1996; Chuang et al. 1998; Boni hon etal. 2003; Castelli-Aleardi and Devillers 2004℄, but again the proof of orre tness isquite involved.Theorem 1.1 leads dire tly to the impli it representation of the numbers |P ′ n | (cid:22) ounting rooted 3- onne ted maps with n edges(cid:22) due to Tutte [1963℄), and itsre(cid:28)nement as dis ussed in Se tion 5 yields that of |P ′ ij | the number of rooted 3- onne ted maps with i verti es and j fa es (due to Mullin and S hellenberg [1968℄)from whi h Formula (1) follows. It partially explains the ombinatori s of the o - urren e of the ross produ t of binomials, sin e these are typi al of binary treeenumerations. Let us mention that the one-to-one orresponden e spe ializes par-ti ularly ni ely to ount plane triangulations (i.e., 3- onne ted maps with all fa esof degree 3), leading to the (cid:28)rst bije tive derivation of the ounting formula for un-rooted plane triangulations with i verti es, originally found by Brown [1964℄ usingalgebrai methods.1.2 Random samplingA se ond byprodu t of Theorem 1.1 is an e(cid:30) ient uniform random sampler forrooted 3- onne ted maps, i.e., an algorithm that, given n , outputs a random elementin the set P ′ n of rooted 3- onne ted maps with n edges with equal han es for allelements. The same prin iples yield a uniform sampler for P ′ ij .The uniform random generation of lasses of maps like triangulations or 3- onne ted graphs was (cid:28)rst onsidered in mathemati al physi s (see referen es in[Ambjørn et al. 1994; Poulalhon and S hae(cid:27)er 2006℄), and various types of ran-dom planar graphs are ommonly used for testing graph drawing algorithms (see[de Fraysseix et al.℄).The best previously known algorithm [S hae(cid:27)er 1999℄ had expe ted omplexity O ( n / ) for P ′ n , and was mu h less e(cid:30) ient for P ′ ij , having even exponential om-plexity for i/j or j/i tending to 2 (due to Euler's formula these ratio are boundedabove by 2 for 3- onne ted maps). In Se tion 6, we show that our generator for P ′ n or P ′ ij performs in linear time ex ept if i/j or j/i tends to 2 where it be omes atmost ubi .ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees · i verti es was given by Denise et al. [1996℄, but it resists known approa hes for per-fe t sampling [Wilson 2004℄, and has unknown mixing time. As opposed to this, are ursive s heme to sample planar graphs was proposed by Bodirsky et al. [2003℄,with amortized omplexity O ( n . ) . This result is based on a re ursive de ompo-sition of planar graphs: a planar graph an be de omposed into a tree-stru turewhose nodes are o upied by rooted 3- onne ted maps. Generating a planar graphredu es to omputing bran hing probabilities so as to generate the de ompositiontree with suitable probability; then a random rooted 3- onne ted map is generatedfor ea h node of the de omposition tree. Bodirsky et al. [2003℄ use the so- alledre ursive method [Nijenhuis and Wilf 1978; Flajolet et al. 1994; Wilson 1997℄ totake advantage of the re ursive de omposition of planar graphs. Our new randomgenerator for rooted 3- onne ted maps redu es their amortized ost to O ( n ) . Fi-nally a new uniform random generator for planar graphs was re ently developpedby one of the authors [Fusy 2005℄, that avoids the expensive prepro essing ompu-tations of [Bodirsky et al. 2003℄. The re ursive s heme is similar to the one usedin [Bodirsky et al. 2003℄, but the method to translate it to a random generatorrelies on Boltzmann samplers, a new general framework for the random generationre ently developed in [Du hon et al. 2004℄. Thanks to our random generator forrooted 3- onne ted maps, the algorithm of [Fusy 2005℄ has a time- omplexity of O ( n ) for exa t size uniform sampling and even performs in linear time for approx-imate size uniform sampling.1.3 Su in t en odingA third byprodu t of Theorem 1.1 is the possibility to en ode in linear time a 3- onne ted planar graph with n edges by a binary tree with n nodes. In turn thetree an be en oded by a balan ed parenthesis word of n bits. This ode is optimalin the information theoreti sense: the entropy per edge of this lass of graphs, i.e.,the quantity n log |P ( n ) | , tends to 2 when n goes to in(cid:28)nity, so that a ode for P ( n ) annot give a better guarantee on the ompression rate.Appli ations alling for ompa t storage and fast transmission of 3D geometri almeshes have re ently motivated a huge literature on ompression, in parti ular forthe ombinatorial part of the meshes. The (cid:28)rst ompression algorithms dealt onlywith triangular fa es [Rossigna 1999; Touma and Gotsman 1998℄, but many meshesin lude larger fa es, so that polygonal meshes have be ome prominent (see [Alliezand Gotsman 2003℄ for a re ent survey).The question of optimality of oders was raised in relation with ex eption odesprodu ed by several heuristi s when dealing with meshes with spheri al topology[Gotsman 2003; Khodakovsky et al. 2002℄. Sin e these meshes are exa tly triangu-lations (for triangular meshes) and 3- onne ted planar graphs (for polyhedral ones),the oders in [Poulalhon and S hae(cid:27)er 2006℄ and in the present paper respe tivelyprove that traversal based algorithms an a hieve optimality.On the other hand, in the ontext of su in t data stru tures, almost optimalalgorithms have been proposed [He et al. 2000; Lu 2002℄, that are based on separatorACM Journal Name, Vol. V, No. N, Month 20YY. · Éri Fusy et al.theorems. However these algorithms are not truly optimal (they get ε lose to theentropy but at the ost of an un ontrolled in rease of the onstants in the linear omplexity). Moreover, although they rely on a sophisti ated re ursive stru ture,they do not support e(cid:30) ient adja en y requests.As opposed to that, our algorithm shares with [He et al. 1999; Boni hon et al.2003℄ the property that it produ es essentially the ode of a spanning tree. Morepre isely it is just the balan ed parenthesis ode of a binary tree, and adja en ies ofthe initial disse tion that are not present in the tree an be re overed from the odeby a simple variation on the interpretation of the symbols. Adja en y queries anthus be dealt with in time proportional to the degree of verti es [Castelli-Aleardiet al. 2006℄ using the approa h of [Munro and Raman 1997; He et al. 1999℄.Finally we show that the ode an be modi(cid:28)ed to be optimal on the lass P ( n, i, j ) .Sin e the entropy of this lass is stri tly smaller than that of P ( n ) as soon as | i − n/ | ≫ n / , the resulting parametri oder is more e(cid:30) ient in this range. Inparti ular in the ase j = 2 i − our new algorithm spe ializes to an optimal oderfor triangulations.1.4 Outline of the paperThe paper starts with two se tions of preliminaries: de(cid:28)nitions of the maps and treesinvolved (Se tion 2), and some basi orresponden es between them (Se tion 3).Then omes our main result (Se tion 4), the mapping between binary trees andsome disse tions of the hexagon by quadrangular fa es. The fa t that this mappingis a bije tion follows from the existen e and uniqueness of a ertain tri-orientation ofour disse tions. The proof of this auxiliary theorem, whi h requires the introdu tionof the so- alled derived maps and their α -orientations, is delayed to Se tion 8, thatis, after the three se tions dedi ated to appli ations of our main result: in thesese tions we su essively dis uss ounting (Se tion 5), sampling (Se tion 6) and oding (Se tion 7) rooted 3- onne ted maps. The third appli ation leads us toour se ond important result: in Se tion 9 we present a linear time algorithm to ompute the minimal α -orientation of the derived map of a 3- onne ted planarmap (whi h also orresponds to the minimal S hnyder woods alluded to above).Finally, Se tion 10 is dedi ated to the orre tness proof of this orientation algorithm.Figure 1 summarizes the onne tions between the di(cid:27)erent families of obje ts we onsider.2. DEFINITIONS2.1 Planar mapsA planar map is a proper embedding of an unlabelled onne ted graph in the plane,where proper means that edges are smooth simple ar s that do not meet but attheir endpoints. A planar map is said to be rooted if one edge of the outer fa e, alled the root-edge, is marked and oriented su h that the outer fa e lays on itsright. The origin of the root-edge is alled root-vertex. Verti es and edges are saidto be outer or inner depending on whether they are in ident to the outer fa e ornot.A planar map is 3- onne ted if it has at least 4 edges and an not be dis onne tedby the removal of two verti es. The (cid:28)rst 3- onne ted planar map is the tetrahedron,ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees · P ′ n (respe tively P ′ ij ) the set of rooted 3- onne tedplanar maps with n edges (resp. i verti es and j fa es). A 3- onne ted planar mapis outer-triangular if its outer fa e is triangular.2.2 Plane trees, and half-edgesPlane trees are planar maps with a single fa e (cid:22)the outer one. A vertex is alleda leaf if it has degree 1, and node otherwise. Edges in ident to a leaf are alledstems, and the other are alled entire edges. Observe that plane trees are unrootedtrees.Binary trees are plane trees whose nodes have degree 3. By onvention we shallrequire that a rooted binary tree has a root-edge that is a stem. The root-edge ofa rooted binary tree thus onne ts a node, alled the root-node, to a leaf, alledthe root-leaf. With this de(cid:28)nition of rooted binary tree, upon drawing the tree in atop down manner starting with the root-leaf, every node (in luding the root-node)has a father, a left son and a right son. This (very minor) variation on the usualde(cid:28)nition of rooted binary trees will be onvenient later on. For n ≥ , we denoterespe tively by B n and B ′ n the sets of binary and rooted binary trees with n nodes(they have n + 2 leaves, as proved by indu tion on n ). These rooted trees are wellknown to be ounted by the Catalan numbers: |B ′ n | = n +1 (cid:0) nn (cid:1) .The verti es of a binary tree an be greedily bi olored (cid:22)say in bla k or white(cid:22)so that adja ent verti es have distin t olors. The bi oloration is unique up to the hoi e of the olor of the (cid:28)rst node. As a onsequen e, rooted bi olored binarytrees are either bla k-rooted or white-rooted, depending on the olor of the rootnode. The sets of bla k-rooted (resp. white-rooted) binary trees with i bla k nodesand j white nodes is denoted by B • ij (resp. by B ◦ ij ); and the total set of rootedbi olored binary trees with i bla k nodes and j white nodes is denoted by B ′ ij .It will be onvenient to view ea h entire edge of a tree as a pair of opposite half-edges (cid:22)ea h one in ident to one extremity of the edge(cid:22) and to view ea h stem asa single half-edge (cid:22)in ident to the node holding the stem. More generally we shallACM Journal Name, Vol. V, No. N, Month 20YY. · Éri Fusy et al. onsider maps that have entire edges (made of two half-edges) and stems (made ofonly one half-edge). It is then also natural to asso iate one fa e to ea h half-edge,say, the fa e on its right. In the ase of trees, there is only the outer fa e, so thatall half-edges get the same asso iated fa e.2.3 Quadrangulations and disse tionsA quadrangulation is a planar map whose fa es (in luding the outer one) havedegree 4. A disse tion of the hexagon by quadrangular fa es is a planar map whoseouter fa e has degree 6 and inner fa es have degree 4.Cy les that do not delimit a fa e are said to be separating. A quadrangulation ora disse tion of the hexagon by quadrangular fa es is said to be irredu ible if it has atleast 4 fa es and has no separating 4- y le. The (cid:28)rst irredu ible quadrangulationis the ube, whi h has 6 fa es. We denote by Q ′ n the set of rooted irredu iblequadrangulations with n fa es, in luding the outer one. Euler's relation ensuresthat these quadrangulations have n + 2 verti es. We denote by D n ( D ′ n ) the set of(rooted, respe tively) irredu ible disse tions of the hexagon with n inner verti es.These have n + 2 quadrangular fa es, a ording to Euler's relation. From nowon, irredu ible disse tions of the hexagon by quadrangular fa es will simply be alled irredu ible disse tions. The lasses of rooted irredu ible quadrangulationsand of rooted irredu ible disse tions are respe tively denoted by Q ′ = ∪ n Q ′ n and D ′ = ∪ n D ′ n .As fa es of disse tions and quadrangulations have even degree, the verti es ofthese maps an be greedily bi olored, say, in bla k and white, so that ea h edge onne ts a bla k vertex to a white one. Su h a bi oloration is unique up to the hoi e of the olors. We denote by Q ′ ij the set of rooted bi olored irredu iblequadrangulations with i bla k verti es and j white verti es and su h that the root-vertex is bla k; and by D ′ ij the set of rooted bi olored irredu ible disse tions with i bla k inner verti es and j white inner verti es and su h that the root-vertex isbla k.A bi olored irredu ible disse tion is omplete if the three outer white verti es ofthe hexagon have degree exa tly 2. Hen e, these three verti es are in ident to twoadja ent edges on the hexagon.3. CORRESPONDENCES BETWEEN FAMILIES OF PLANAR MAPSThis se tion re alls a folklore bije tion between irredu ible quadrangulations and3- onne ted maps, hereafter alled angular mapping, see [Mullin and S hellenberg1968℄, and its adaptation to outer-triangular 3- onne ted maps.3.1 3- onne ted maps and irredu ible quadrangulationsLet us (cid:28)rst re all how the angular mapping works. Given a rooted quadrangulation Q ∈ Q ′ n endowed with its vertex bi oloration, let M be the rooted map obtainedby linking, for ea h fa e f of Q (even the outer fa e), the two diagonally opposedbla k verti es of f ; the root of M is hosen to be the edge orresponding to theouter fa e of Q , oriented so that M and Q have same root-vertex, see Figure 2. Themap M is often alled the primal map of Q . A similar onstru tion using whiteverti es instead of bla k ones would give its dual map (i.e., the map with a vertexACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees · M and edge-set orresponding to the adja en ies between verti esand fa es of M ).The onstru tion of the primal map is easily invertible. Given any rooted map M , the inverse onstru tion onsists in adding a vertex alled a fa e-vertex in ea hfa e (even the outer one) of M and linking a vertex v and a fa e-vertex v f by anedge if v is in ident to the fa e f orresponding to v f . Keeping only these fa e-vertex in iden e edges yields a quadrangulation. The root is hosen as the edgethat follows the root of M in ounter- lo kwise order around its origin.The following theorem is a lassi al result in the theory of maps.Theorem 3.1 (Angular mapping). The angular mapping is a bije tion be-tween P ′ n and Q ′ n and more pre isely a bije tion between P ′ ij and Q ′ ij .3.2 Outer-triangular 3- onne ted maps and bi olored omplete irredu ible disse tionsThe same prin iple yields a bije tion, also alled angular mapping, between outer-triangular 3- onne ted maps and bi olored omplete irredu ible disse tions, whi hwill prove very useful in Se tions 7 and 8. This mapping is very similar to theangular mapping: given a omplete disse tion D , asso iate to D the map M ob-tained by linking the two bla k verti es of ea h inner fa e of D by a new edge, seeFigure 3. The map M is alled the primal map of D .Theorem 3.2 (Angular mapping with border). The angular mapping, for-mulated for omplete disse tions, is a bije tion between bi olored omplete irre-du ible disse tions with i bla k verti es and j white verti es and outer-triangular3- onne ted maps with i verti es and j − inner fa es.Proof. The proof follows similar lines as that of Theorem 3.1, see [Mullin andS hellenberg 1968℄.3.3 Derived mapsIn its version for omplete disse tions, the angular mapping an also be formulatedusing the on ept of derived map, whi h will be very useful throughout this arti le(in parti ular when dealing with orientations).Let M be an outer-triangular 3- onne ted map, and let M ∗ be the map obtainedfrom the dual of M by removing the dual vertex orresponding to the outer fa e of M . Then the derived map M ′ of M is the superimposition of M and M ∗ , whereACM Journal Name, Vol. V, No. N, Month 20YY. · Éri Fusy et al.(a) A disse tion, (b) bla k diagonals, ( ) the 3- onne ted map, (d) the derived map.Fig. 3. The angular mapping with border: from a bi olored omplete irredu ible disse tion (a) toan outer-triangular 3- onne ted map ( ). The ommon derived map is shown in (d).ea h outer vertex re eives an additional half-edge dire ted toward the outer fa e.For example, Figure 3(d) shows the derived map of the map given in Figure 3( ).The map M is alled the primal map of M ′ and the map M ∗ is alled the dual mapof M ′ . Observe that the superimposition of M and M ∗ reates a vertex of degree 4for ea h edge e of M , due to the interse tion of e with its dual edge. These verti esof M ′ are alled edge-verti es. An edge of M ′ either orresponds to an half-edge of M when it onne ts an edge-vertex and a primal vertex, or to an half-edge of M ∗ when it onne ts an edge-vertex and a dual vertex.Similarly, one de(cid:28)nes derived maps of omplete irredu ible disse tions. Given abi olored omplete irredu ible disse tion D , the derived map M ′ of D is onstru tedas follows; for ea h inner fa e f of D , link the two bla k verti es in ident to f bya primal edge, and the two white ones by a dual edge. These two edges, whi hare the two diagonals of f , interse t at a new vertex alled an edge-vertex. Thederived map is then obtained by keeping the primal and dual edges and all verti esex ept the three outer white ones and their in ident edges. Finally, for the sakeof regularity, ea h of the six outer verti es of M ′ re eives an additional half-edgedire ted toward the outer fa e. For example, the derived map of the disse tion ofFigure 3(a) is shown in Figure 3(d). Bla k verti es are alled primal verti es andwhite verti es are alled dual verti es of the derived map M ′ . The submap M ( M ∗ )of M ′ onsisting of the primal verti es and primal edges (resp. the dual verti esand dual edges) is alled the primal map (resp. the dual map) of the derived map.Clearly, M has a triangular outer fa e; and, by onstru tion, a bi olored ompleteirredu ible disse tion and its primal map have the same derived map.4. BIJECTION BETWEEN BINARY TREES AND IRREDUCIBLE DISSECTIONS4.1 Closure mapping: from trees to disse tionsLo al and partial losure. Given a map with entire edges and stems (for instan ea tree), we de(cid:28)ne a lo al losure operation, whi h is based on a ounter- lo kwisewalk around the map: this walk alongside the boundary of the outer map visitsa su ession of stems and entire edges, or more pre isely, a sequen e of half-edgeshaving the outer fa e on their right-hand side. When a stem is immediately followedin this walk by three entire edges, its lo al losure onsists in the reation of anopposite half-edge for this stem, whi h is atta hed to farthest endpoint of the thirdentire edge: this amounts to ompleting the stem into an entire edge, so as to reate(cid:22)or lose(cid:22) a quadrangular fa e. This operation is illustrated in Figure 4(b).ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees · (cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1) (a) Generi ase when r = 2 and s = 2 . (b) Case of the binary tree of Figure 4(a).Fig. 5. The omplete losure.Given a binary tree T , the lo al losure an be performed greedily until no morelo al losure is possible. Ea h lo al losure reates a new entire edge, maybe makinga new lo al losure possible. It is easy to see that the (cid:28)nal map, alled the partial losure of T , does not depend on the order of the lo al losures. Indeed, a y li parenthesis word is asso iated to the ounter- lo kwise boundary of the tree, withan opening parenthesis of weight 3 for a stem and a losing parenthesis for a side ofentire edge; then the future lo al losures orrespond to mat hings of the parenthesisword. An example of partial losure is shown in Figure 4( ).Complete losure. Let us now omplete the partial losure operation to obtain adisse tion of the hexagon with quadrangular fa es. An outer entire half-edge is anhalf-edge belonging to an entire edge and in ident to the outer fa e. Observe thata binary tree T with n nodes has n + 2 stems and n − outer entire half-edges.Ea h lo al losure de reases by 1 the number of stems and by 2 the number ofouter entire half-edges. Hen e, if k denotes the number of (unmat hed) stems inthe partial losure of T , there are k − outer entire half-edges. Moreover, stemsdelimit intervals of inner half-edges on the ontour of the outer fa e; these intervalshave length at most 2, otherwise a lo al losure would be possible. Let r be thenumber of su h intervals of length 1 and s be the number of su h intervals of length 0(that is, the number of nodes in ident to two unmat hed stems). Then r and s are learly related by the relation r + 2 s = 6 .The omplete losure onsists in ompleting all unmat hed stems with half-edgesACM Journal Name, Vol. V, No. N, Month 20YY.0 · Éri Fusy et al.(a) A tri-oriented binary tree, (b) and its tri-oriented losure.Fig. 6. Examples of tri-orientations.in ident to verti es of the hexagon in the unique way (up to rotation of the hexagon)that reates only quadrangular bounded fa es. Figure 5(a) illustrates the omplete losure for the ase ( r = 2 , s = 2) , and a parti ular example is given in Figure 5(b).Lemma 4.1. The losure of a binary tree is an irredu ible disse tion of thehexagon.Proof. Assume that there exists a separating 4- y le C in the losure of T . Let m ≥ be the number of verti es in the interior of C . Then there are m edges inthe interior of C a ording to Euler's relation. Let v be a vertex of T that belongs tothe interior of C after the losure. Consider the orientation of edges of T away from v (only for the sake of this proof). Then nodes of T have outdegree 2, ex ept v ,whi h has outdegree 3. This orientation naturally indu es an orientation of edges ofthe losure-disse tion with the same property (ex ept that verti es of the hexagonhave outdegree 0). Hen e there are at least m + 1 edges in the interior of C , a ontradi tion.4.2 Tri-orientations and openingTri-orientations. In order to de(cid:28)ne the mapping inverse to the losure, we need abetter des ription of the stru ture indu ed on the losure map by the original tree.Let us onsider orientations of the half-edges of a map (in ontrast to the usualnotion of orientation, where edges are oriented). An half-edge is said to be inwardif it is oriented toward its origin and outward if it is oriented out of its origin. Ifa map is endowed with an orientation of its half-edges, the outdegree of a vertex v is naturally de(cid:28)ned as the number of its in ident half-edges oriented outward.The (unique) tri-orientation of a binary tree is de(cid:28)ned as the orientation of itshalf-edges su h that any node has outdegree 3, see Figure 6(a) for an example. Atri-orientation of a disse tion is an orientation of its inner half-edges (i.e., half-edges belonging to inner edges) su h that outer and inner verti es have respe tivelyoutdegree 0 and 3, and su h that two half-edges of a same inner edge an not bothbe oriented inward, see Figure 6(b). An edge is said to be simply oriented if its twohalf-edges have same dire tion (that is, one is oriented inward and the other oneoutward), and bi-oriented if they are both oriented outward.Let D be an irredu ible disse tion endowed with a tri-orientation. A lo kwiseACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· D is a simple y le C onsisting of edges that are either bi-oriented orsimply oriented with the interior of C on their right.Lemma 4.2. Let D be an irredu ible disse tion with n inner verti es. Then atri-orientation of D has n − bi-oriented edges and n + 2 simply oriented edges.If a tri-orientation of a disse tion has no lo kwise ir uit, then its bi-orientededges form a tree spanning the inner verti es of the disse tion.Proof. Let s and r denote the numbers of simply and bi-oriented edges of D .A ording to Euler's relation (using the degrees of the fa es), D has n + 1 inneredges, i.e., n + 1 = r + s . Moreover, as all inner verti es have outdegree 3, n = 2 r + s . Hen e r = n − and s = n + 2 .If the tri-orientation has no lo kwise ir uit, the subgraph H indu ed by the bi-oriented edges has r = n − edges, no y le (otherwise the y le ould be traversed lo kwise, as all its edges are bi-oriented), and is in ident to at most n verti es,whi h are the inner verti es of D . A ording to a lassi al result of graph theory, H is a tree spanning the n inner verti es of D .Closure-tri-orientation of a disse tion. Let D be a disse tion obtained as the losureof a binary tree T . The tri-orientation of T learly indu es via the losure a tri-orientation of D , alled losure-tri-orientation. On this tri-orientation, bi-orientededges orrespond to inner edges of the original binary tree, see Figure 6(b).Lemma 4.3. A losure-tri-orientation has no lo kwise ir uit.Proof. Sin e verti es of the hexagon have outdegree 0, they an not belong toany ir uit. Hen e lo kwise ir uits may only be reated during a lo al losure.However losure edges are simply oriented with the outer fa e on their right, hen emay only reate ounter lo kwise ir uits.This property is indeed quite strong: the following theorem ensures that theproperty of having no lo kwise ir uit hara terizes the losure-tri-orientation andthat a tri-orientation without lo kwise ir uit exists for any irredu ible disse tion.The proof of this theorem is delayed to Se tion 8.Theorem 4.4. Any irredu ible disse tion has a unique tri-orientation without lo kwise ir uit.Re overing the tree: the opening mapping. Lemma 4.2 and the present se tion giveall ne essary elements to des ribe the inverse mapping of the losure, whi h is alled the opening: let D be an irredu ible disse tion endowed with its (unique byTheorem 4.4) tri-orientation without lo kwise ir uit. The opening of D is thebinary tree obtained from D by deleting outer verti es, outer edges, and all inwardhalf-edges.4.3 The losure is a bije tionIn this se tion, we show that the opening is inverse to the losure. By onstru tionof the opening, the following lemma is straightforward:Lemma 4.5. Let D be an irredu ible disse tion obtained as the losure of a binarytree T . Then the opening of D is T . ACM Journal Name, Vol. V, No. N, Month 20YY.2 · Éri Fusy et al.Conversely, the following also holds:Lemma 4.6. Let T be a binary tree obtained as the opening of an irredu ibledisse tion D . Then the losure of T is D .Proof. The proof relies on the de(cid:28)nition of an order for removing inward half-edges. Start with the half-edges in ident to outer verti es (that are all orientedinward): this learly inverses the ompletion step of the losure. Ea h furtherremoval must orrespond to a lo al losure, that is, the removed half-edge musthave the outer fa e on its right.Let M k be the submap of the disse tion indu ed by remaining half-edges after k removals. Then M k overs the n inner verti es, and, as long as some inwardhalf-edge remains, it has at least n entire edges (see Lemma 4.2). Hen e, there isat least one y le, and a simple one C an be extra ted from the boundary of theouter fa e of M k . Sin e there is no lo kwise ir uit, at least one edge of C is simplyoriented with the interior of C on its left; the orresponding inward half-edge anbe sele ted for the next removal.Assuming Theorem 4.4, the bije tive result follows from Lemmas 4.5 and 4.6:Theorem 4.7. For ea h n ≥ , the losure mapping is a bije tion between theset B n of binary trees with n nodes and the set D n of irredu ible disse tions with n inner verti es.For ea h integer pair ( i, j ) with i + j ≥ , the losure mapping is a bije tionbetween the set B ij of bi olored binary trees with i bla k nodes and j white nodes,and the set D ij of bi olored irredu ible disse tions with i bla k inner verti es and j white inner verti es.The inverse mapping of the losure is the opening.We an state three analogous versions of Theorem 4.7 for rooted obje ts:Theorem 4.8. The losure mapping indu es the following orresponden es be-tween sets of rooted obje ts: B ′ n × { , . . . , } ≡ D ′ n × { , . . . , n + 2 } , B ′ ij × { , , } ≡ D ′ ij × { , . . . , i + j + 2 } , B • ij × { , , } ≡ D ′ ij × { , . . . , i − j + 1 } . Proof. We de(cid:28)ne a bi-rooted irredu ible disse tion as a rooted irredu ible disse -tion endowed with its tri-orientation without lo kwise ir uit and where a simplyoriented edge is marked. We write D ′′ n for the set of bi-rooted irredu ible disse -tions with n inner verti es. Opening and rerooting on the stem orresponding tothe marked edge de(cid:28)nes a surje tion from D ′′ n onto B ′ n , for whi h ea h element of B ′ n has learly six preimages, sin e the disse tion ould have been rooted at any edgeof the hexagon. Moreover, erasing the mark learly de(cid:28)nes a surje tion from D ′′ n to D ′ n , for whi h ea h element of D ′ n has n + 2 preimages a ording to Lemma 4.2.Hen e, the losure de(cid:28)nes a ( n + 2) -to-6 mapping between B ′ n and D ′ n . The proofof the ( i + j + 2) -to-3 orresponden e between B ′ ij and D ′ ij is the same.The (2 i − j + 1) -to-3 orresponden e between B • ij and D ′ ij indu ed by the losure an be proved similarly, with the di(cid:27)eren e that the marked simply oriented edgeACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· D ′ ij endowed with its tri-orientation without lo kwise ir uit has (2 i − j + 1) simply oriented edges whose origin is a bla k vertex.Let us mention that the ( i + j + 2) -to-3 orresponden e between B ′ ij and D ′ ij is akey ingredient to the planar graph generators presented in [Fusy 2005℄.The oe(cid:30) ient |B ′ n | is well-known to be the n -th Catalan number n +1 (cid:0) nn (cid:1) , andre(cid:28)nements of the standard proofs yield |B • ij | = j +1 (cid:0) j +1 i (cid:1)(cid:0) ij (cid:1) , as detailed belowin Se tion 4.5. Theorem 4.8 thus implies the following enumerative results:Corollary 4.9. The oe(cid:30) ients ounting rooted irredu ible disse tions have thefollowing expressions, |D ′ n | = 6 n + 2 |B ′ n | = 6( n + 2)( n + 1) (cid:18) nn (cid:19) , (2) |D ′ ij | = 32 i − j + 1 |B • ij | = 3(2 i + 1)(2 j + 1) (cid:18) j + 1 i (cid:19)(cid:18) i + 1 j (cid:19) . (3)These enumerative results have already been obtained by Mullin and S hellenberg[1968℄ using algebrai methods. Our method provides a dire t bije tive proof.Noti e that the ardinality of D ′ n is S ( n, where S ( n, m ) = (2 n )!(2 m )! n ! m !( n + m )! is the n -th super-Catalan number of order m . (These numbers are dis ussed by Gessel[1992℄.) Our bije tion gives an interpretation of these numbers for m = 2 .4.4 Spe ialization to triangulationsA ni e feature of the losure mapping is that it spe ializes to a bije tion betweenplane triangulations and a simple subfamily of binary trees. In this way, we get the(cid:28)rst bije tive proof for the formula giving the number of unrooted plane triangu-lations with n verti es, found by Brown [1964℄, and re over the ounting formulafor rooted triangulations, already obtained by Tutte [1962℄ and by Poulalhon andS hae(cid:27)er [2006℄ using a di(cid:27)erent bije tion.Theorem 4.10. The losure mapping is a bije tion between the set T n of (un-rooted) plane triangulations with n inner verti es and the set S n of bi olored binarytrees with n bla k nodes and no stem (i.e., leaf ) in ident to a bla k node.The losure mapping indu es the following orresponden e between the set T ′ n ofrooted triangulations with n inner verti es and the set S ′ n of trees in S n rooted at astem: S ′ n × { , , } ≡ T ′ n × { , . . . , n + 3 } . Proof. Plane triangulations are exa tly 3- onne ted planar maps where all fa eshave degree 3. Hen e, the angular mapping with border (Theorem 3.2) indu es abije tion between T n and the set of omplete bi olored irredu ible disse tions with n inner bla k verti es and all inner white verti es of degree 3. In a tri-orientation,the indegree of ea h inner white vertex v is deg( v ) − and the indegree of ea houter white vertex v is deg( v ) − , hen e the disse tions onsidered here have noingoing half-edge in ident to a white vertex. Hen e the opening of the disse tion(by removing ingoing half-edges) is a binary tree with no stem in ident to a bla kACM Journal Name, Vol. V, No. N, Month 20YY.4 · Éri Fusy et al.(a) (b)( ) (d)Fig. 7. The bije tion between triangulations and bi olored binary trees with no leaf in ident to abla k node.node. Conversely, starting from su h a binary tree, the half-edges reated duringthe losure mapping are opposite to a stem. As all stems are in ident to whiteverti es, the half-edges reated are in ident to bla k verti es. Hen e the degree ofea h white vertex does not in rease during the losure mapping, i.e., remains equalto 3 for inner white verti es and equal to 2 for outer white verti es. This on ludesthe proof of the bije tion S n ≡ T n .The bije tion S ′ n × { , , } ≡ T ′ n × { , . . . , n + 3 } follows easily (see the proofof Theorem 4.8), using the fa t that a tree of S n has n + 3 leaves.This bije tion, illustrated in Figure 7, makes it possible to ount plane unrootedand rooted triangulations, as the subfamily of binary trees involved is easily enu-merated.Corollary 4.11. For n ≥ , the number of rooted triangulations with n innerACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ··
aa r X i v : . [ m a t h . C O ] O c t Disse tions, orientations, and trees,with appli ations to optimal mesh en odingand to random samplingÉRIC FUSY, DOMINIQUE POULALHON and GILLES SCHAEFFERÉ.F and G.S: LIX, É ole Polyte hnique. D.P: Liafa, Univ. Paris 7. Fran eWe present a bije tion between some quadrangular disse tions of an hexagon and unrooted binarytrees, with interesting onsequen es for enumeration, mesh ompression and graph sampling.Our bije tion yields an e(cid:30) ient uniform random sampler for 3- onne ted planar graphs, whi hturns out to be determinant for the quadrati omplexity of the urrent best known uniformrandom sampler for labelled planar graphs [Fusy, Analysis of Algorithms 2005℄.It also provides an en oding for the set P ( n ) of n -edge 3- onne ted planar graphs that mat hesthe entropy bound n log |P ( n ) | = 2 + o (1) bits per edge (bpe). This solves a theoreti al problemre ently raised in mesh ompression, as these graphs abstra t the ombinatorial part of meshes withspheri al topology. We also a hieve the optimal parametri rate n log |P ( n, i, j ) | bpe for graphsof P ( n ) with i verti es and j fa es, mat hing in parti ular the optimal rate for triangulations.Our en oding relies on a linear time algorithm to ompute an orientation asso iated to theminimal S hnyder wood of a 3- onne ted planar map. This algorithm is of independent interest,and it is for instan e a key ingredient in a re ent straight line drawing algorithm for 3- onne tedplanar graphs [Boni hon et al., Graph Drawing 2005℄.Categories and Subje t Des riptors: G.2.1 [Dis rete Mathemati s℄: Combinatorial algorithmsGeneral Terms: AlgorithmsAdditional Key Words and Phrases: Bije tion, Counting, Coding, Random generation1. INTRODUCTIONOne origin of this work an be tra ed ba k to an arti le of Ed Bender in the Amer-i an Mathemati al Monthly [Bender 1987℄, where he asked for a simple explanationof the remarkable asymptoti formula |P ( n, i, j ) | ∼ ijn (cid:18) i − j + 2 (cid:19)(cid:18) j − i + 2 (cid:19) (1)for the ardinality of the set of 3- onne ted (unlabelled) planar graphs with i ver-ti es, j fa es and n = i + j − edges, n going to in(cid:28)nity. By a theorem of Whitney[1933℄, these graphs have essentially a unique embedding on the sphere up to home-omorphisms, so that their study amounts to that of rooted 3- onne ted maps, wherea map is a graph embedded in the plane and rooted means with a marked orientededge.1.1 Graphs, disse tions and treesAnother known property of 3- onne ted planar graphs with n edges is the fa t thatthey are in dire t one-to-one orresponden e with disse tions of the sphere into n quadrangles that have no non-fa ial 4- y le. The heart of our paper lies in a furtherone-to-one orresponden e. ACM Journal Name, Vol. V, No. N, Month 20YY, Pages 1(cid:21)0??. · Éri Fusy et al.Theorem 1.1. There is a one-to-one orresponden e between unrooted binarytrees with n nodes and unrooted quadrangular disse tions of an hexagon with n interior verti es and no non-fa ial 4- y le.The mapping from binary trees to disse tions, whi h we all the losure, is easilydes ribed and resembles onstru tions that were re ently proposed for simpler kindsof maps [S hae(cid:27)er 1997; Bouttier et al. 2002; Poulalhon and S hae(cid:27)er 2006℄. Theproof that the mapping is a bije tion is instead rather sophisti ated, relying onnew properties of onstrained orientations [Ossona de Mendez 1994℄, related toS hnyder woods of triangulations and 3- onne ted planar maps [S hnyder 1990;di Battista et al. 1999; Felsner 2001℄ .Conversely, the re onstru tion of the tree from the disse tion relies on a lineartime algorithm to ompute the minimal S hnyder woods of a 3- onne ted map(or equivalently, the minimal α -orientation of the asso iated derived map, seeSe tion 9). This problem is of independant interest and our algorithm has forexample appli ations in the graph drawing ontext [Boni hon et al. 2007℄. It isakin to Kant's anoni al ordering [Kant 1996; Chuang et al. 1998; Boni hon etal. 2003; Castelli-Aleardi and Devillers 2004℄, but again the proof of orre tness isquite involved.Theorem 1.1 leads dire tly to the impli it representation of the numbers |P ′ n | (cid:22) ounting rooted 3- onne ted maps with n edges(cid:22) due to Tutte [1963℄), and itsre(cid:28)nement as dis ussed in Se tion 5 yields that of |P ′ ij | the number of rooted 3- onne ted maps with i verti es and j fa es (due to Mullin and S hellenberg [1968℄)from whi h Formula (1) follows. It partially explains the ombinatori s of the o - urren e of the ross produ t of binomials, sin e these are typi al of binary treeenumerations. Let us mention that the one-to-one orresponden e spe ializes par-ti ularly ni ely to ount plane triangulations (i.e., 3- onne ted maps with all fa esof degree 3), leading to the (cid:28)rst bije tive derivation of the ounting formula for un-rooted plane triangulations with i verti es, originally found by Brown [1964℄ usingalgebrai methods.1.2 Random samplingA se ond byprodu t of Theorem 1.1 is an e(cid:30) ient uniform random sampler forrooted 3- onne ted maps, i.e., an algorithm that, given n , outputs a random elementin the set P ′ n of rooted 3- onne ted maps with n edges with equal han es for allelements. The same prin iples yield a uniform sampler for P ′ ij .The uniform random generation of lasses of maps like triangulations or 3- onne ted graphs was (cid:28)rst onsidered in mathemati al physi s (see referen es in[Ambjørn et al. 1994; Poulalhon and S hae(cid:27)er 2006℄), and various types of ran-dom planar graphs are ommonly used for testing graph drawing algorithms (see[de Fraysseix et al.℄).The best previously known algorithm [S hae(cid:27)er 1999℄ had expe ted omplexity O ( n / ) for P ′ n , and was mu h less e(cid:30) ient for P ′ ij , having even exponential om-plexity for i/j or j/i tending to 2 (due to Euler's formula these ratio are boundedabove by 2 for 3- onne ted maps). In Se tion 6, we show that our generator for P ′ n or P ′ ij performs in linear time ex ept if i/j or j/i tends to 2 where it be omes atmost ubi .ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees · i verti es was given by Denise et al. [1996℄, but it resists known approa hes for per-fe t sampling [Wilson 2004℄, and has unknown mixing time. As opposed to this, are ursive s heme to sample planar graphs was proposed by Bodirsky et al. [2003℄,with amortized omplexity O ( n . ) . This result is based on a re ursive de ompo-sition of planar graphs: a planar graph an be de omposed into a tree-stru turewhose nodes are o upied by rooted 3- onne ted maps. Generating a planar graphredu es to omputing bran hing probabilities so as to generate the de ompositiontree with suitable probability; then a random rooted 3- onne ted map is generatedfor ea h node of the de omposition tree. Bodirsky et al. [2003℄ use the so- alledre ursive method [Nijenhuis and Wilf 1978; Flajolet et al. 1994; Wilson 1997℄ totake advantage of the re ursive de omposition of planar graphs. Our new randomgenerator for rooted 3- onne ted maps redu es their amortized ost to O ( n ) . Fi-nally a new uniform random generator for planar graphs was re ently developpedby one of the authors [Fusy 2005℄, that avoids the expensive prepro essing ompu-tations of [Bodirsky et al. 2003℄. The re ursive s heme is similar to the one usedin [Bodirsky et al. 2003℄, but the method to translate it to a random generatorrelies on Boltzmann samplers, a new general framework for the random generationre ently developed in [Du hon et al. 2004℄. Thanks to our random generator forrooted 3- onne ted maps, the algorithm of [Fusy 2005℄ has a time- omplexity of O ( n ) for exa t size uniform sampling and even performs in linear time for approx-imate size uniform sampling.1.3 Su in t en odingA third byprodu t of Theorem 1.1 is the possibility to en ode in linear time a 3- onne ted planar graph with n edges by a binary tree with n nodes. In turn thetree an be en oded by a balan ed parenthesis word of n bits. This ode is optimalin the information theoreti sense: the entropy per edge of this lass of graphs, i.e.,the quantity n log |P ( n ) | , tends to 2 when n goes to in(cid:28)nity, so that a ode for P ( n ) annot give a better guarantee on the ompression rate.Appli ations alling for ompa t storage and fast transmission of 3D geometri almeshes have re ently motivated a huge literature on ompression, in parti ular forthe ombinatorial part of the meshes. The (cid:28)rst ompression algorithms dealt onlywith triangular fa es [Rossigna 1999; Touma and Gotsman 1998℄, but many meshesin lude larger fa es, so that polygonal meshes have be ome prominent (see [Alliezand Gotsman 2003℄ for a re ent survey).The question of optimality of oders was raised in relation with ex eption odesprodu ed by several heuristi s when dealing with meshes with spheri al topology[Gotsman 2003; Khodakovsky et al. 2002℄. Sin e these meshes are exa tly triangu-lations (for triangular meshes) and 3- onne ted planar graphs (for polyhedral ones),the oders in [Poulalhon and S hae(cid:27)er 2006℄ and in the present paper respe tivelyprove that traversal based algorithms an a hieve optimality.On the other hand, in the ontext of su in t data stru tures, almost optimalalgorithms have been proposed [He et al. 2000; Lu 2002℄, that are based on separatorACM Journal Name, Vol. V, No. N, Month 20YY. · Éri Fusy et al.theorems. However these algorithms are not truly optimal (they get ε lose to theentropy but at the ost of an un ontrolled in rease of the onstants in the linear omplexity). Moreover, although they rely on a sophisti ated re ursive stru ture,they do not support e(cid:30) ient adja en y requests.As opposed to that, our algorithm shares with [He et al. 1999; Boni hon et al.2003℄ the property that it produ es essentially the ode of a spanning tree. Morepre isely it is just the balan ed parenthesis ode of a binary tree, and adja en ies ofthe initial disse tion that are not present in the tree an be re overed from the odeby a simple variation on the interpretation of the symbols. Adja en y queries anthus be dealt with in time proportional to the degree of verti es [Castelli-Aleardiet al. 2006℄ using the approa h of [Munro and Raman 1997; He et al. 1999℄.Finally we show that the ode an be modi(cid:28)ed to be optimal on the lass P ( n, i, j ) .Sin e the entropy of this lass is stri tly smaller than that of P ( n ) as soon as | i − n/ | ≫ n / , the resulting parametri oder is more e(cid:30) ient in this range. Inparti ular in the ase j = 2 i − our new algorithm spe ializes to an optimal oderfor triangulations.1.4 Outline of the paperThe paper starts with two se tions of preliminaries: de(cid:28)nitions of the maps and treesinvolved (Se tion 2), and some basi orresponden es between them (Se tion 3).Then omes our main result (Se tion 4), the mapping between binary trees andsome disse tions of the hexagon by quadrangular fa es. The fa t that this mappingis a bije tion follows from the existen e and uniqueness of a ertain tri-orientation ofour disse tions. The proof of this auxiliary theorem, whi h requires the introdu tionof the so- alled derived maps and their α -orientations, is delayed to Se tion 8, thatis, after the three se tions dedi ated to appli ations of our main result: in thesese tions we su essively dis uss ounting (Se tion 5), sampling (Se tion 6) and oding (Se tion 7) rooted 3- onne ted maps. The third appli ation leads us toour se ond important result: in Se tion 9 we present a linear time algorithm to ompute the minimal α -orientation of the derived map of a 3- onne ted planarmap (whi h also orresponds to the minimal S hnyder woods alluded to above).Finally, Se tion 10 is dedi ated to the orre tness proof of this orientation algorithm.Figure 1 summarizes the onne tions between the di(cid:27)erent families of obje ts we onsider.2. DEFINITIONS2.1 Planar mapsA planar map is a proper embedding of an unlabelled onne ted graph in the plane,where proper means that edges are smooth simple ar s that do not meet but attheir endpoints. A planar map is said to be rooted if one edge of the outer fa e, alled the root-edge, is marked and oriented su h that the outer fa e lays on itsright. The origin of the root-edge is alled root-vertex. Verti es and edges are saidto be outer or inner depending on whether they are in ident to the outer fa e ornot.A planar map is 3- onne ted if it has at least 4 edges and an not be dis onne tedby the removal of two verti es. The (cid:28)rst 3- onne ted planar map is the tetrahedron,ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees · P ′ n (respe tively P ′ ij ) the set of rooted 3- onne tedplanar maps with n edges (resp. i verti es and j fa es). A 3- onne ted planar mapis outer-triangular if its outer fa e is triangular.2.2 Plane trees, and half-edgesPlane trees are planar maps with a single fa e (cid:22)the outer one. A vertex is alleda leaf if it has degree 1, and node otherwise. Edges in ident to a leaf are alledstems, and the other are alled entire edges. Observe that plane trees are unrootedtrees.Binary trees are plane trees whose nodes have degree 3. By onvention we shallrequire that a rooted binary tree has a root-edge that is a stem. The root-edge ofa rooted binary tree thus onne ts a node, alled the root-node, to a leaf, alledthe root-leaf. With this de(cid:28)nition of rooted binary tree, upon drawing the tree in atop down manner starting with the root-leaf, every node (in luding the root-node)has a father, a left son and a right son. This (very minor) variation on the usualde(cid:28)nition of rooted binary trees will be onvenient later on. For n ≥ , we denoterespe tively by B n and B ′ n the sets of binary and rooted binary trees with n nodes(they have n + 2 leaves, as proved by indu tion on n ). These rooted trees are wellknown to be ounted by the Catalan numbers: |B ′ n | = n +1 (cid:0) nn (cid:1) .The verti es of a binary tree an be greedily bi olored (cid:22)say in bla k or white(cid:22)so that adja ent verti es have distin t olors. The bi oloration is unique up to the hoi e of the olor of the (cid:28)rst node. As a onsequen e, rooted bi olored binarytrees are either bla k-rooted or white-rooted, depending on the olor of the rootnode. The sets of bla k-rooted (resp. white-rooted) binary trees with i bla k nodesand j white nodes is denoted by B • ij (resp. by B ◦ ij ); and the total set of rootedbi olored binary trees with i bla k nodes and j white nodes is denoted by B ′ ij .It will be onvenient to view ea h entire edge of a tree as a pair of opposite half-edges (cid:22)ea h one in ident to one extremity of the edge(cid:22) and to view ea h stem asa single half-edge (cid:22)in ident to the node holding the stem. More generally we shallACM Journal Name, Vol. V, No. N, Month 20YY. · Éri Fusy et al. onsider maps that have entire edges (made of two half-edges) and stems (made ofonly one half-edge). It is then also natural to asso iate one fa e to ea h half-edge,say, the fa e on its right. In the ase of trees, there is only the outer fa e, so thatall half-edges get the same asso iated fa e.2.3 Quadrangulations and disse tionsA quadrangulation is a planar map whose fa es (in luding the outer one) havedegree 4. A disse tion of the hexagon by quadrangular fa es is a planar map whoseouter fa e has degree 6 and inner fa es have degree 4.Cy les that do not delimit a fa e are said to be separating. A quadrangulation ora disse tion of the hexagon by quadrangular fa es is said to be irredu ible if it has atleast 4 fa es and has no separating 4- y le. The (cid:28)rst irredu ible quadrangulationis the ube, whi h has 6 fa es. We denote by Q ′ n the set of rooted irredu iblequadrangulations with n fa es, in luding the outer one. Euler's relation ensuresthat these quadrangulations have n + 2 verti es. We denote by D n ( D ′ n ) the set of(rooted, respe tively) irredu ible disse tions of the hexagon with n inner verti es.These have n + 2 quadrangular fa es, a ording to Euler's relation. From nowon, irredu ible disse tions of the hexagon by quadrangular fa es will simply be alled irredu ible disse tions. The lasses of rooted irredu ible quadrangulationsand of rooted irredu ible disse tions are respe tively denoted by Q ′ = ∪ n Q ′ n and D ′ = ∪ n D ′ n .As fa es of disse tions and quadrangulations have even degree, the verti es ofthese maps an be greedily bi olored, say, in bla k and white, so that ea h edge onne ts a bla k vertex to a white one. Su h a bi oloration is unique up to the hoi e of the olors. We denote by Q ′ ij the set of rooted bi olored irredu iblequadrangulations with i bla k verti es and j white verti es and su h that the root-vertex is bla k; and by D ′ ij the set of rooted bi olored irredu ible disse tions with i bla k inner verti es and j white inner verti es and su h that the root-vertex isbla k.A bi olored irredu ible disse tion is omplete if the three outer white verti es ofthe hexagon have degree exa tly 2. Hen e, these three verti es are in ident to twoadja ent edges on the hexagon.3. CORRESPONDENCES BETWEEN FAMILIES OF PLANAR MAPSThis se tion re alls a folklore bije tion between irredu ible quadrangulations and3- onne ted maps, hereafter alled angular mapping, see [Mullin and S hellenberg1968℄, and its adaptation to outer-triangular 3- onne ted maps.3.1 3- onne ted maps and irredu ible quadrangulationsLet us (cid:28)rst re all how the angular mapping works. Given a rooted quadrangulation Q ∈ Q ′ n endowed with its vertex bi oloration, let M be the rooted map obtainedby linking, for ea h fa e f of Q (even the outer fa e), the two diagonally opposedbla k verti es of f ; the root of M is hosen to be the edge orresponding to theouter fa e of Q , oriented so that M and Q have same root-vertex, see Figure 2. Themap M is often alled the primal map of Q . A similar onstru tion using whiteverti es instead of bla k ones would give its dual map (i.e., the map with a vertexACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees · M and edge-set orresponding to the adja en ies between verti esand fa es of M ).The onstru tion of the primal map is easily invertible. Given any rooted map M , the inverse onstru tion onsists in adding a vertex alled a fa e-vertex in ea hfa e (even the outer one) of M and linking a vertex v and a fa e-vertex v f by anedge if v is in ident to the fa e f orresponding to v f . Keeping only these fa e-vertex in iden e edges yields a quadrangulation. The root is hosen as the edgethat follows the root of M in ounter- lo kwise order around its origin.The following theorem is a lassi al result in the theory of maps.Theorem 3.1 (Angular mapping). The angular mapping is a bije tion be-tween P ′ n and Q ′ n and more pre isely a bije tion between P ′ ij and Q ′ ij .3.2 Outer-triangular 3- onne ted maps and bi olored omplete irredu ible disse tionsThe same prin iple yields a bije tion, also alled angular mapping, between outer-triangular 3- onne ted maps and bi olored omplete irredu ible disse tions, whi hwill prove very useful in Se tions 7 and 8. This mapping is very similar to theangular mapping: given a omplete disse tion D , asso iate to D the map M ob-tained by linking the two bla k verti es of ea h inner fa e of D by a new edge, seeFigure 3. The map M is alled the primal map of D .Theorem 3.2 (Angular mapping with border). The angular mapping, for-mulated for omplete disse tions, is a bije tion between bi olored omplete irre-du ible disse tions with i bla k verti es and j white verti es and outer-triangular3- onne ted maps with i verti es and j − inner fa es.Proof. The proof follows similar lines as that of Theorem 3.1, see [Mullin andS hellenberg 1968℄.3.3 Derived mapsIn its version for omplete disse tions, the angular mapping an also be formulatedusing the on ept of derived map, whi h will be very useful throughout this arti le(in parti ular when dealing with orientations).Let M be an outer-triangular 3- onne ted map, and let M ∗ be the map obtainedfrom the dual of M by removing the dual vertex orresponding to the outer fa e of M . Then the derived map M ′ of M is the superimposition of M and M ∗ , whereACM Journal Name, Vol. V, No. N, Month 20YY. · Éri Fusy et al.(a) A disse tion, (b) bla k diagonals, ( ) the 3- onne ted map, (d) the derived map.Fig. 3. The angular mapping with border: from a bi olored omplete irredu ible disse tion (a) toan outer-triangular 3- onne ted map ( ). The ommon derived map is shown in (d).ea h outer vertex re eives an additional half-edge dire ted toward the outer fa e.For example, Figure 3(d) shows the derived map of the map given in Figure 3( ).The map M is alled the primal map of M ′ and the map M ∗ is alled the dual mapof M ′ . Observe that the superimposition of M and M ∗ reates a vertex of degree 4for ea h edge e of M , due to the interse tion of e with its dual edge. These verti esof M ′ are alled edge-verti es. An edge of M ′ either orresponds to an half-edge of M when it onne ts an edge-vertex and a primal vertex, or to an half-edge of M ∗ when it onne ts an edge-vertex and a dual vertex.Similarly, one de(cid:28)nes derived maps of omplete irredu ible disse tions. Given abi olored omplete irredu ible disse tion D , the derived map M ′ of D is onstru tedas follows; for ea h inner fa e f of D , link the two bla k verti es in ident to f bya primal edge, and the two white ones by a dual edge. These two edges, whi hare the two diagonals of f , interse t at a new vertex alled an edge-vertex. Thederived map is then obtained by keeping the primal and dual edges and all verti esex ept the three outer white ones and their in ident edges. Finally, for the sakeof regularity, ea h of the six outer verti es of M ′ re eives an additional half-edgedire ted toward the outer fa e. For example, the derived map of the disse tion ofFigure 3(a) is shown in Figure 3(d). Bla k verti es are alled primal verti es andwhite verti es are alled dual verti es of the derived map M ′ . The submap M ( M ∗ )of M ′ onsisting of the primal verti es and primal edges (resp. the dual verti esand dual edges) is alled the primal map (resp. the dual map) of the derived map.Clearly, M has a triangular outer fa e; and, by onstru tion, a bi olored ompleteirredu ible disse tion and its primal map have the same derived map.4. BIJECTION BETWEEN BINARY TREES AND IRREDUCIBLE DISSECTIONS4.1 Closure mapping: from trees to disse tionsLo al and partial losure. Given a map with entire edges and stems (for instan ea tree), we de(cid:28)ne a lo al losure operation, whi h is based on a ounter- lo kwisewalk around the map: this walk alongside the boundary of the outer map visitsa su ession of stems and entire edges, or more pre isely, a sequen e of half-edgeshaving the outer fa e on their right-hand side. When a stem is immediately followedin this walk by three entire edges, its lo al losure onsists in the reation of anopposite half-edge for this stem, whi h is atta hed to farthest endpoint of the thirdentire edge: this amounts to ompleting the stem into an entire edge, so as to reate(cid:22)or lose(cid:22) a quadrangular fa e. This operation is illustrated in Figure 4(b).ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees · (cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1) (a) Generi ase when r = 2 and s = 2 . (b) Case of the binary tree of Figure 4(a).Fig. 5. The omplete losure.Given a binary tree T , the lo al losure an be performed greedily until no morelo al losure is possible. Ea h lo al losure reates a new entire edge, maybe makinga new lo al losure possible. It is easy to see that the (cid:28)nal map, alled the partial losure of T , does not depend on the order of the lo al losures. Indeed, a y li parenthesis word is asso iated to the ounter- lo kwise boundary of the tree, withan opening parenthesis of weight 3 for a stem and a losing parenthesis for a side ofentire edge; then the future lo al losures orrespond to mat hings of the parenthesisword. An example of partial losure is shown in Figure 4( ).Complete losure. Let us now omplete the partial losure operation to obtain adisse tion of the hexagon with quadrangular fa es. An outer entire half-edge is anhalf-edge belonging to an entire edge and in ident to the outer fa e. Observe thata binary tree T with n nodes has n + 2 stems and n − outer entire half-edges.Ea h lo al losure de reases by 1 the number of stems and by 2 the number ofouter entire half-edges. Hen e, if k denotes the number of (unmat hed) stems inthe partial losure of T , there are k − outer entire half-edges. Moreover, stemsdelimit intervals of inner half-edges on the ontour of the outer fa e; these intervalshave length at most 2, otherwise a lo al losure would be possible. Let r be thenumber of su h intervals of length 1 and s be the number of su h intervals of length 0(that is, the number of nodes in ident to two unmat hed stems). Then r and s are learly related by the relation r + 2 s = 6 .The omplete losure onsists in ompleting all unmat hed stems with half-edgesACM Journal Name, Vol. V, No. N, Month 20YY.0 · Éri Fusy et al.(a) A tri-oriented binary tree, (b) and its tri-oriented losure.Fig. 6. Examples of tri-orientations.in ident to verti es of the hexagon in the unique way (up to rotation of the hexagon)that reates only quadrangular bounded fa es. Figure 5(a) illustrates the omplete losure for the ase ( r = 2 , s = 2) , and a parti ular example is given in Figure 5(b).Lemma 4.1. The losure of a binary tree is an irredu ible disse tion of thehexagon.Proof. Assume that there exists a separating 4- y le C in the losure of T . Let m ≥ be the number of verti es in the interior of C . Then there are m edges inthe interior of C a ording to Euler's relation. Let v be a vertex of T that belongs tothe interior of C after the losure. Consider the orientation of edges of T away from v (only for the sake of this proof). Then nodes of T have outdegree 2, ex ept v ,whi h has outdegree 3. This orientation naturally indu es an orientation of edges ofthe losure-disse tion with the same property (ex ept that verti es of the hexagonhave outdegree 0). Hen e there are at least m + 1 edges in the interior of C , a ontradi tion.4.2 Tri-orientations and openingTri-orientations. In order to de(cid:28)ne the mapping inverse to the losure, we need abetter des ription of the stru ture indu ed on the losure map by the original tree.Let us onsider orientations of the half-edges of a map (in ontrast to the usualnotion of orientation, where edges are oriented). An half-edge is said to be inwardif it is oriented toward its origin and outward if it is oriented out of its origin. Ifa map is endowed with an orientation of its half-edges, the outdegree of a vertex v is naturally de(cid:28)ned as the number of its in ident half-edges oriented outward.The (unique) tri-orientation of a binary tree is de(cid:28)ned as the orientation of itshalf-edges su h that any node has outdegree 3, see Figure 6(a) for an example. Atri-orientation of a disse tion is an orientation of its inner half-edges (i.e., half-edges belonging to inner edges) su h that outer and inner verti es have respe tivelyoutdegree 0 and 3, and su h that two half-edges of a same inner edge an not bothbe oriented inward, see Figure 6(b). An edge is said to be simply oriented if its twohalf-edges have same dire tion (that is, one is oriented inward and the other oneoutward), and bi-oriented if they are both oriented outward.Let D be an irredu ible disse tion endowed with a tri-orientation. A lo kwiseACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· D is a simple y le C onsisting of edges that are either bi-oriented orsimply oriented with the interior of C on their right.Lemma 4.2. Let D be an irredu ible disse tion with n inner verti es. Then atri-orientation of D has n − bi-oriented edges and n + 2 simply oriented edges.If a tri-orientation of a disse tion has no lo kwise ir uit, then its bi-orientededges form a tree spanning the inner verti es of the disse tion.Proof. Let s and r denote the numbers of simply and bi-oriented edges of D .A ording to Euler's relation (using the degrees of the fa es), D has n + 1 inneredges, i.e., n + 1 = r + s . Moreover, as all inner verti es have outdegree 3, n = 2 r + s . Hen e r = n − and s = n + 2 .If the tri-orientation has no lo kwise ir uit, the subgraph H indu ed by the bi-oriented edges has r = n − edges, no y le (otherwise the y le ould be traversed lo kwise, as all its edges are bi-oriented), and is in ident to at most n verti es,whi h are the inner verti es of D . A ording to a lassi al result of graph theory, H is a tree spanning the n inner verti es of D .Closure-tri-orientation of a disse tion. Let D be a disse tion obtained as the losureof a binary tree T . The tri-orientation of T learly indu es via the losure a tri-orientation of D , alled losure-tri-orientation. On this tri-orientation, bi-orientededges orrespond to inner edges of the original binary tree, see Figure 6(b).Lemma 4.3. A losure-tri-orientation has no lo kwise ir uit.Proof. Sin e verti es of the hexagon have outdegree 0, they an not belong toany ir uit. Hen e lo kwise ir uits may only be reated during a lo al losure.However losure edges are simply oriented with the outer fa e on their right, hen emay only reate ounter lo kwise ir uits.This property is indeed quite strong: the following theorem ensures that theproperty of having no lo kwise ir uit hara terizes the losure-tri-orientation andthat a tri-orientation without lo kwise ir uit exists for any irredu ible disse tion.The proof of this theorem is delayed to Se tion 8.Theorem 4.4. Any irredu ible disse tion has a unique tri-orientation without lo kwise ir uit.Re overing the tree: the opening mapping. Lemma 4.2 and the present se tion giveall ne essary elements to des ribe the inverse mapping of the losure, whi h is alled the opening: let D be an irredu ible disse tion endowed with its (unique byTheorem 4.4) tri-orientation without lo kwise ir uit. The opening of D is thebinary tree obtained from D by deleting outer verti es, outer edges, and all inwardhalf-edges.4.3 The losure is a bije tionIn this se tion, we show that the opening is inverse to the losure. By onstru tionof the opening, the following lemma is straightforward:Lemma 4.5. Let D be an irredu ible disse tion obtained as the losure of a binarytree T . Then the opening of D is T . ACM Journal Name, Vol. V, No. N, Month 20YY.2 · Éri Fusy et al.Conversely, the following also holds:Lemma 4.6. Let T be a binary tree obtained as the opening of an irredu ibledisse tion D . Then the losure of T is D .Proof. The proof relies on the de(cid:28)nition of an order for removing inward half-edges. Start with the half-edges in ident to outer verti es (that are all orientedinward): this learly inverses the ompletion step of the losure. Ea h furtherremoval must orrespond to a lo al losure, that is, the removed half-edge musthave the outer fa e on its right.Let M k be the submap of the disse tion indu ed by remaining half-edges after k removals. Then M k overs the n inner verti es, and, as long as some inwardhalf-edge remains, it has at least n entire edges (see Lemma 4.2). Hen e, there isat least one y le, and a simple one C an be extra ted from the boundary of theouter fa e of M k . Sin e there is no lo kwise ir uit, at least one edge of C is simplyoriented with the interior of C on its left; the orresponding inward half-edge anbe sele ted for the next removal.Assuming Theorem 4.4, the bije tive result follows from Lemmas 4.5 and 4.6:Theorem 4.7. For ea h n ≥ , the losure mapping is a bije tion between theset B n of binary trees with n nodes and the set D n of irredu ible disse tions with n inner verti es.For ea h integer pair ( i, j ) with i + j ≥ , the losure mapping is a bije tionbetween the set B ij of bi olored binary trees with i bla k nodes and j white nodes,and the set D ij of bi olored irredu ible disse tions with i bla k inner verti es and j white inner verti es.The inverse mapping of the losure is the opening.We an state three analogous versions of Theorem 4.7 for rooted obje ts:Theorem 4.8. The losure mapping indu es the following orresponden es be-tween sets of rooted obje ts: B ′ n × { , . . . , } ≡ D ′ n × { , . . . , n + 2 } , B ′ ij × { , , } ≡ D ′ ij × { , . . . , i + j + 2 } , B • ij × { , , } ≡ D ′ ij × { , . . . , i − j + 1 } . Proof. We de(cid:28)ne a bi-rooted irredu ible disse tion as a rooted irredu ible disse -tion endowed with its tri-orientation without lo kwise ir uit and where a simplyoriented edge is marked. We write D ′′ n for the set of bi-rooted irredu ible disse -tions with n inner verti es. Opening and rerooting on the stem orresponding tothe marked edge de(cid:28)nes a surje tion from D ′′ n onto B ′ n , for whi h ea h element of B ′ n has learly six preimages, sin e the disse tion ould have been rooted at any edgeof the hexagon. Moreover, erasing the mark learly de(cid:28)nes a surje tion from D ′′ n to D ′ n , for whi h ea h element of D ′ n has n + 2 preimages a ording to Lemma 4.2.Hen e, the losure de(cid:28)nes a ( n + 2) -to-6 mapping between B ′ n and D ′ n . The proofof the ( i + j + 2) -to-3 orresponden e between B ′ ij and D ′ ij is the same.The (2 i − j + 1) -to-3 orresponden e between B • ij and D ′ ij indu ed by the losure an be proved similarly, with the di(cid:27)eren e that the marked simply oriented edgeACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· D ′ ij endowed with its tri-orientation without lo kwise ir uit has (2 i − j + 1) simply oriented edges whose origin is a bla k vertex.Let us mention that the ( i + j + 2) -to-3 orresponden e between B ′ ij and D ′ ij is akey ingredient to the planar graph generators presented in [Fusy 2005℄.The oe(cid:30) ient |B ′ n | is well-known to be the n -th Catalan number n +1 (cid:0) nn (cid:1) , andre(cid:28)nements of the standard proofs yield |B • ij | = j +1 (cid:0) j +1 i (cid:1)(cid:0) ij (cid:1) , as detailed belowin Se tion 4.5. Theorem 4.8 thus implies the following enumerative results:Corollary 4.9. The oe(cid:30) ients ounting rooted irredu ible disse tions have thefollowing expressions, |D ′ n | = 6 n + 2 |B ′ n | = 6( n + 2)( n + 1) (cid:18) nn (cid:19) , (2) |D ′ ij | = 32 i − j + 1 |B • ij | = 3(2 i + 1)(2 j + 1) (cid:18) j + 1 i (cid:19)(cid:18) i + 1 j (cid:19) . (3)These enumerative results have already been obtained by Mullin and S hellenberg[1968℄ using algebrai methods. Our method provides a dire t bije tive proof.Noti e that the ardinality of D ′ n is S ( n, where S ( n, m ) = (2 n )!(2 m )! n ! m !( n + m )! is the n -th super-Catalan number of order m . (These numbers are dis ussed by Gessel[1992℄.) Our bije tion gives an interpretation of these numbers for m = 2 .4.4 Spe ialization to triangulationsA ni e feature of the losure mapping is that it spe ializes to a bije tion betweenplane triangulations and a simple subfamily of binary trees. In this way, we get the(cid:28)rst bije tive proof for the formula giving the number of unrooted plane triangu-lations with n verti es, found by Brown [1964℄, and re over the ounting formulafor rooted triangulations, already obtained by Tutte [1962℄ and by Poulalhon andS hae(cid:27)er [2006℄ using a di(cid:27)erent bije tion.Theorem 4.10. The losure mapping is a bije tion between the set T n of (un-rooted) plane triangulations with n inner verti es and the set S n of bi olored binarytrees with n bla k nodes and no stem (i.e., leaf ) in ident to a bla k node.The losure mapping indu es the following orresponden e between the set T ′ n ofrooted triangulations with n inner verti es and the set S ′ n of trees in S n rooted at astem: S ′ n × { , , } ≡ T ′ n × { , . . . , n + 3 } . Proof. Plane triangulations are exa tly 3- onne ted planar maps where all fa eshave degree 3. Hen e, the angular mapping with border (Theorem 3.2) indu es abije tion between T n and the set of omplete bi olored irredu ible disse tions with n inner bla k verti es and all inner white verti es of degree 3. In a tri-orientation,the indegree of ea h inner white vertex v is deg( v ) − and the indegree of ea houter white vertex v is deg( v ) − , hen e the disse tions onsidered here have noingoing half-edge in ident to a white vertex. Hen e the opening of the disse tion(by removing ingoing half-edges) is a binary tree with no stem in ident to a bla kACM Journal Name, Vol. V, No. N, Month 20YY.4 · Éri Fusy et al.(a) (b)( ) (d)Fig. 7. The bije tion between triangulations and bi olored binary trees with no leaf in ident to abla k node.node. Conversely, starting from su h a binary tree, the half-edges reated duringthe losure mapping are opposite to a stem. As all stems are in ident to whiteverti es, the half-edges reated are in ident to bla k verti es. Hen e the degree ofea h white vertex does not in rease during the losure mapping, i.e., remains equalto 3 for inner white verti es and equal to 2 for outer white verti es. This on ludesthe proof of the bije tion S n ≡ T n .The bije tion S ′ n × { , , } ≡ T ′ n × { , . . . , n + 3 } follows easily (see the proofof Theorem 4.8), using the fa t that a tree of S n has n + 3 leaves.This bije tion, illustrated in Figure 7, makes it possible to ount plane unrootedand rooted triangulations, as the subfamily of binary trees involved is easily enu-merated.Corollary 4.11. For n ≥ , the number of rooted triangulations with n innerACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· |T ′ n | = 2 (4 n + 1)!( n + 1)!(3 n + 2)! . The number of unrooted plane triangulations with n inner verti es is |T n | = 23 (4 n + 1)!( n + 1)!(3 n + 2)! if n ≡ , |T n | = 23 (4 n + 1)!( n + 1)!(3 n + 2)! + 43 (4 k + 1)! k !(3 k + 2)! if n ≡ n = 3 k + 1] , |T n | = 23 (4 n + 1)!( n + 1)!(3 n + 2)! + 23 (4 k )! k !(3 k + 1)! if n ≡ n = 3 k ] . Proof. Let S ′ = ∪ n S ′ n be the lass of rooted binary trees with no leaf in identto a bla k node and let R ′ = ∪ n R ′ n be the lass of rooted binary trees wherethe root leaf is in ident to a bla k node and all other leaves are in ident to whitenodes. Let S ( x ) and R ( x ) be the generating fun tions of S ′ and R ′ with respe tto the number of bla k nodes. Clearly the two subtrees pending from the (white)root node of a tree of S ′ are either empty or in R ′ . Hen e S ( x ) = (1 + R ( x )) .Similarly, a tree in R ′ de omposes at the root node into two trees in S ′ , so that R ( x ) = xS ( x ) . Hen e, R ( x ) = x (1 + R ( x )) is equal to the generating fun tionof quaternary trees, and S ( x ) = (1 + R ( x )) is equal to the generating fun tionof pairs of quaternary trees (the empty tree being allowed). Using a Luka iewi zen oding and the y li lemma, the number of pairs of quaternary trees with atotal of n nodes is easily shown to be n +2 (4 n +2)! n !(3 n +2)! . This expression of |S ′ n | andthe (3 n + 3) -to-3 orresponden e between S ′ n and T ′ n yield the expression of |T ′ n | .Let us now prove the formula for |T n | = |S n | . Clearly, the only possible symmetryfor a bi olored binary tree is a rotation of order 3. Let S sym n be the set of trees of S n with a rotation symmetry and let S asy n be the set of trees of S n with no symmetry.Let S ′ asy n and S ′ sym n be the sets of trees of S asy n and S sym n that are rooted at a leaf.It is easily shown that a tree of S n has n + 3 leaves. Clearly the tree gives riseto n + 3 rooted trees if it is asymmetri and gives rise to n + 1 rooted trees if itis symmetri . Hen e |S asy n | = |S ′ asy n | / (3 n + 3) and |S sym n | = |S ′ sym n | / ( n + 1) . Using |S n | = |S asy n | + |S sym n | and |S ′ n | = |S ′ asy n | + |S ′ sym n | , we obtain |S n | = 13 n + 3 |S ′ n | + 23 |S sym n | . The entre of rotation of a tree in S sym n is either a bla k node, in whi h ase n = 3 k + 1 for some integer k ≥ , or is a white node, in whi h ase n = 3 k forsome integer k ≥ . In the (cid:28)rst ase, a tree τ ∈ S sym n is obtained by atta hing toa bla k node 3 opies of a tree in S ′ k . Hen e |S sym3 k +1 | = |S ′ k | = 2 (4 k +1)! k !(3 k +2)! . In these ond ase, a tree τ ∈ S sym n is obtained by atta hing to a white node 3 opies of atree in R ′ k . Hen e |S sym3 k | = |R ′ k | = (4 k )! k !(3 k +1)! . The result follows.4.5 Counting, oding and sampling rooted bi olored binary treesACM Journal Name, Vol. V, No. N, Month 20YY.6 · Éri Fusy et al. δ = 1 δ = 1 δ = − δ = − δ = 3 (a) A •◦ , (b) A • , ( ) A ◦ .Fig. 8. The three alphabets for words asso iated to bi olored binary trees. ΦΨ w •◦ = w • = w ◦ = Fig. 9. A bi olored rooted binary tree, and the orresponding words w •◦ , w • , and w ◦ .4.5.1 From a bi olored tree to a pair of words. There exist general methods toen ode a family of trees spe i(cid:28)ed by several parameters. This se tion makes su hmethods expli it for the family of bi olored binary trees. Let T be a bla k-rootedbi olored binary tree with i bla k nodes and j white nodes. Doing a depth-(cid:28)rsttraversal of T from left to right, we obtain a word w •◦ of length (2 j + 1) on thealphabet A •◦ represented in Figure 8(a), see Figure 9 for an example, the mappingbeing denoted by Ψ . Classi ally, the sum of the weights of the letters of any stri tpre(cid:28)x of w •◦ is nonnegative and the sum of the weights of the letters of w •◦ is equalto -1. In addition, w •◦ is the unique word in its y li equivalen e- lass that hasthese two properties.The se ond step is to map w •◦ to a pair ( w • , w ◦ ) := Φ( w •◦ ) of words su h that:(cid:22) w • is a word of length (2 j + 1) on the alphabet A • shown in Figure 8(b) with i bla k-node-letters.(cid:22) w ◦ is a word of length i on the alphabet A ◦ shown in Figure 8( ) with j white-node-letters.Figure 9 illustrates the mapping Φ on an example.4.5.2 Inverse mapping: from a pair of words to a tree. Conversely, let ( w • , w ◦ ) bea pair of words su h that w • is of length (2 j + 1) on A • and has i bla k-node-letters, and w ◦ is of length i on A ◦ and has j white-node-letters. First, to the pair ( w • , w ◦ ) we asso iate a word e w •◦ of length (2 j + 1) on A •◦ by doing the inverse ofthe mapping Φ shown in the right part of Figure 9. The word e w •◦ has the propertythat the sum of the weights of its letters is equal to -1. There is a unique word w •◦ in the y li equivalen e- lass of e w •◦ su h that the sum of the weights of theletters of any stri t pre(cid:28)x is nonnegative. We asso iate to w •◦ the binary tree ofACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ··
aa r X i v : . [ m a t h . C O ] O c t Disse tions, orientations, and trees,with appli ations to optimal mesh en odingand to random samplingÉRIC FUSY, DOMINIQUE POULALHON and GILLES SCHAEFFERÉ.F and G.S: LIX, É ole Polyte hnique. D.P: Liafa, Univ. Paris 7. Fran eWe present a bije tion between some quadrangular disse tions of an hexagon and unrooted binarytrees, with interesting onsequen es for enumeration, mesh ompression and graph sampling.Our bije tion yields an e(cid:30) ient uniform random sampler for 3- onne ted planar graphs, whi hturns out to be determinant for the quadrati omplexity of the urrent best known uniformrandom sampler for labelled planar graphs [Fusy, Analysis of Algorithms 2005℄.It also provides an en oding for the set P ( n ) of n -edge 3- onne ted planar graphs that mat hesthe entropy bound n log |P ( n ) | = 2 + o (1) bits per edge (bpe). This solves a theoreti al problemre ently raised in mesh ompression, as these graphs abstra t the ombinatorial part of meshes withspheri al topology. We also a hieve the optimal parametri rate n log |P ( n, i, j ) | bpe for graphsof P ( n ) with i verti es and j fa es, mat hing in parti ular the optimal rate for triangulations.Our en oding relies on a linear time algorithm to ompute an orientation asso iated to theminimal S hnyder wood of a 3- onne ted planar map. This algorithm is of independent interest,and it is for instan e a key ingredient in a re ent straight line drawing algorithm for 3- onne tedplanar graphs [Boni hon et al., Graph Drawing 2005℄.Categories and Subje t Des riptors: G.2.1 [Dis rete Mathemati s℄: Combinatorial algorithmsGeneral Terms: AlgorithmsAdditional Key Words and Phrases: Bije tion, Counting, Coding, Random generation1. INTRODUCTIONOne origin of this work an be tra ed ba k to an arti le of Ed Bender in the Amer-i an Mathemati al Monthly [Bender 1987℄, where he asked for a simple explanationof the remarkable asymptoti formula |P ( n, i, j ) | ∼ ijn (cid:18) i − j + 2 (cid:19)(cid:18) j − i + 2 (cid:19) (1)for the ardinality of the set of 3- onne ted (unlabelled) planar graphs with i ver-ti es, j fa es and n = i + j − edges, n going to in(cid:28)nity. By a theorem of Whitney[1933℄, these graphs have essentially a unique embedding on the sphere up to home-omorphisms, so that their study amounts to that of rooted 3- onne ted maps, wherea map is a graph embedded in the plane and rooted means with a marked orientededge.1.1 Graphs, disse tions and treesAnother known property of 3- onne ted planar graphs with n edges is the fa t thatthey are in dire t one-to-one orresponden e with disse tions of the sphere into n quadrangles that have no non-fa ial 4- y le. The heart of our paper lies in a furtherone-to-one orresponden e. ACM Journal Name, Vol. V, No. N, Month 20YY, Pages 1(cid:21)0??. · Éri Fusy et al.Theorem 1.1. There is a one-to-one orresponden e between unrooted binarytrees with n nodes and unrooted quadrangular disse tions of an hexagon with n interior verti es and no non-fa ial 4- y le.The mapping from binary trees to disse tions, whi h we all the losure, is easilydes ribed and resembles onstru tions that were re ently proposed for simpler kindsof maps [S hae(cid:27)er 1997; Bouttier et al. 2002; Poulalhon and S hae(cid:27)er 2006℄. Theproof that the mapping is a bije tion is instead rather sophisti ated, relying onnew properties of onstrained orientations [Ossona de Mendez 1994℄, related toS hnyder woods of triangulations and 3- onne ted planar maps [S hnyder 1990;di Battista et al. 1999; Felsner 2001℄ .Conversely, the re onstru tion of the tree from the disse tion relies on a lineartime algorithm to ompute the minimal S hnyder woods of a 3- onne ted map(or equivalently, the minimal α -orientation of the asso iated derived map, seeSe tion 9). This problem is of independant interest and our algorithm has forexample appli ations in the graph drawing ontext [Boni hon et al. 2007℄. It isakin to Kant's anoni al ordering [Kant 1996; Chuang et al. 1998; Boni hon etal. 2003; Castelli-Aleardi and Devillers 2004℄, but again the proof of orre tness isquite involved.Theorem 1.1 leads dire tly to the impli it representation of the numbers |P ′ n | (cid:22) ounting rooted 3- onne ted maps with n edges(cid:22) due to Tutte [1963℄), and itsre(cid:28)nement as dis ussed in Se tion 5 yields that of |P ′ ij | the number of rooted 3- onne ted maps with i verti es and j fa es (due to Mullin and S hellenberg [1968℄)from whi h Formula (1) follows. It partially explains the ombinatori s of the o - urren e of the ross produ t of binomials, sin e these are typi al of binary treeenumerations. Let us mention that the one-to-one orresponden e spe ializes par-ti ularly ni ely to ount plane triangulations (i.e., 3- onne ted maps with all fa esof degree 3), leading to the (cid:28)rst bije tive derivation of the ounting formula for un-rooted plane triangulations with i verti es, originally found by Brown [1964℄ usingalgebrai methods.1.2 Random samplingA se ond byprodu t of Theorem 1.1 is an e(cid:30) ient uniform random sampler forrooted 3- onne ted maps, i.e., an algorithm that, given n , outputs a random elementin the set P ′ n of rooted 3- onne ted maps with n edges with equal han es for allelements. The same prin iples yield a uniform sampler for P ′ ij .The uniform random generation of lasses of maps like triangulations or 3- onne ted graphs was (cid:28)rst onsidered in mathemati al physi s (see referen es in[Ambjørn et al. 1994; Poulalhon and S hae(cid:27)er 2006℄), and various types of ran-dom planar graphs are ommonly used for testing graph drawing algorithms (see[de Fraysseix et al.℄).The best previously known algorithm [S hae(cid:27)er 1999℄ had expe ted omplexity O ( n / ) for P ′ n , and was mu h less e(cid:30) ient for P ′ ij , having even exponential om-plexity for i/j or j/i tending to 2 (due to Euler's formula these ratio are boundedabove by 2 for 3- onne ted maps). In Se tion 6, we show that our generator for P ′ n or P ′ ij performs in linear time ex ept if i/j or j/i tends to 2 where it be omes atmost ubi .ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees · i verti es was given by Denise et al. [1996℄, but it resists known approa hes for per-fe t sampling [Wilson 2004℄, and has unknown mixing time. As opposed to this, are ursive s heme to sample planar graphs was proposed by Bodirsky et al. [2003℄,with amortized omplexity O ( n . ) . This result is based on a re ursive de ompo-sition of planar graphs: a planar graph an be de omposed into a tree-stru turewhose nodes are o upied by rooted 3- onne ted maps. Generating a planar graphredu es to omputing bran hing probabilities so as to generate the de ompositiontree with suitable probability; then a random rooted 3- onne ted map is generatedfor ea h node of the de omposition tree. Bodirsky et al. [2003℄ use the so- alledre ursive method [Nijenhuis and Wilf 1978; Flajolet et al. 1994; Wilson 1997℄ totake advantage of the re ursive de omposition of planar graphs. Our new randomgenerator for rooted 3- onne ted maps redu es their amortized ost to O ( n ) . Fi-nally a new uniform random generator for planar graphs was re ently developpedby one of the authors [Fusy 2005℄, that avoids the expensive prepro essing ompu-tations of [Bodirsky et al. 2003℄. The re ursive s heme is similar to the one usedin [Bodirsky et al. 2003℄, but the method to translate it to a random generatorrelies on Boltzmann samplers, a new general framework for the random generationre ently developed in [Du hon et al. 2004℄. Thanks to our random generator forrooted 3- onne ted maps, the algorithm of [Fusy 2005℄ has a time- omplexity of O ( n ) for exa t size uniform sampling and even performs in linear time for approx-imate size uniform sampling.1.3 Su in t en odingA third byprodu t of Theorem 1.1 is the possibility to en ode in linear time a 3- onne ted planar graph with n edges by a binary tree with n nodes. In turn thetree an be en oded by a balan ed parenthesis word of n bits. This ode is optimalin the information theoreti sense: the entropy per edge of this lass of graphs, i.e.,the quantity n log |P ( n ) | , tends to 2 when n goes to in(cid:28)nity, so that a ode for P ( n ) annot give a better guarantee on the ompression rate.Appli ations alling for ompa t storage and fast transmission of 3D geometri almeshes have re ently motivated a huge literature on ompression, in parti ular forthe ombinatorial part of the meshes. The (cid:28)rst ompression algorithms dealt onlywith triangular fa es [Rossigna 1999; Touma and Gotsman 1998℄, but many meshesin lude larger fa es, so that polygonal meshes have be ome prominent (see [Alliezand Gotsman 2003℄ for a re ent survey).The question of optimality of oders was raised in relation with ex eption odesprodu ed by several heuristi s when dealing with meshes with spheri al topology[Gotsman 2003; Khodakovsky et al. 2002℄. Sin e these meshes are exa tly triangu-lations (for triangular meshes) and 3- onne ted planar graphs (for polyhedral ones),the oders in [Poulalhon and S hae(cid:27)er 2006℄ and in the present paper respe tivelyprove that traversal based algorithms an a hieve optimality.On the other hand, in the ontext of su in t data stru tures, almost optimalalgorithms have been proposed [He et al. 2000; Lu 2002℄, that are based on separatorACM Journal Name, Vol. V, No. N, Month 20YY. · Éri Fusy et al.theorems. However these algorithms are not truly optimal (they get ε lose to theentropy but at the ost of an un ontrolled in rease of the onstants in the linear omplexity). Moreover, although they rely on a sophisti ated re ursive stru ture,they do not support e(cid:30) ient adja en y requests.As opposed to that, our algorithm shares with [He et al. 1999; Boni hon et al.2003℄ the property that it produ es essentially the ode of a spanning tree. Morepre isely it is just the balan ed parenthesis ode of a binary tree, and adja en ies ofthe initial disse tion that are not present in the tree an be re overed from the odeby a simple variation on the interpretation of the symbols. Adja en y queries anthus be dealt with in time proportional to the degree of verti es [Castelli-Aleardiet al. 2006℄ using the approa h of [Munro and Raman 1997; He et al. 1999℄.Finally we show that the ode an be modi(cid:28)ed to be optimal on the lass P ( n, i, j ) .Sin e the entropy of this lass is stri tly smaller than that of P ( n ) as soon as | i − n/ | ≫ n / , the resulting parametri oder is more e(cid:30) ient in this range. Inparti ular in the ase j = 2 i − our new algorithm spe ializes to an optimal oderfor triangulations.1.4 Outline of the paperThe paper starts with two se tions of preliminaries: de(cid:28)nitions of the maps and treesinvolved (Se tion 2), and some basi orresponden es between them (Se tion 3).Then omes our main result (Se tion 4), the mapping between binary trees andsome disse tions of the hexagon by quadrangular fa es. The fa t that this mappingis a bije tion follows from the existen e and uniqueness of a ertain tri-orientation ofour disse tions. The proof of this auxiliary theorem, whi h requires the introdu tionof the so- alled derived maps and their α -orientations, is delayed to Se tion 8, thatis, after the three se tions dedi ated to appli ations of our main result: in thesese tions we su essively dis uss ounting (Se tion 5), sampling (Se tion 6) and oding (Se tion 7) rooted 3- onne ted maps. The third appli ation leads us toour se ond important result: in Se tion 9 we present a linear time algorithm to ompute the minimal α -orientation of the derived map of a 3- onne ted planarmap (whi h also orresponds to the minimal S hnyder woods alluded to above).Finally, Se tion 10 is dedi ated to the orre tness proof of this orientation algorithm.Figure 1 summarizes the onne tions between the di(cid:27)erent families of obje ts we onsider.2. DEFINITIONS2.1 Planar mapsA planar map is a proper embedding of an unlabelled onne ted graph in the plane,where proper means that edges are smooth simple ar s that do not meet but attheir endpoints. A planar map is said to be rooted if one edge of the outer fa e, alled the root-edge, is marked and oriented su h that the outer fa e lays on itsright. The origin of the root-edge is alled root-vertex. Verti es and edges are saidto be outer or inner depending on whether they are in ident to the outer fa e ornot.A planar map is 3- onne ted if it has at least 4 edges and an not be dis onne tedby the removal of two verti es. The (cid:28)rst 3- onne ted planar map is the tetrahedron,ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees · P ′ n (respe tively P ′ ij ) the set of rooted 3- onne tedplanar maps with n edges (resp. i verti es and j fa es). A 3- onne ted planar mapis outer-triangular if its outer fa e is triangular.2.2 Plane trees, and half-edgesPlane trees are planar maps with a single fa e (cid:22)the outer one. A vertex is alleda leaf if it has degree 1, and node otherwise. Edges in ident to a leaf are alledstems, and the other are alled entire edges. Observe that plane trees are unrootedtrees.Binary trees are plane trees whose nodes have degree 3. By onvention we shallrequire that a rooted binary tree has a root-edge that is a stem. The root-edge ofa rooted binary tree thus onne ts a node, alled the root-node, to a leaf, alledthe root-leaf. With this de(cid:28)nition of rooted binary tree, upon drawing the tree in atop down manner starting with the root-leaf, every node (in luding the root-node)has a father, a left son and a right son. This (very minor) variation on the usualde(cid:28)nition of rooted binary trees will be onvenient later on. For n ≥ , we denoterespe tively by B n and B ′ n the sets of binary and rooted binary trees with n nodes(they have n + 2 leaves, as proved by indu tion on n ). These rooted trees are wellknown to be ounted by the Catalan numbers: |B ′ n | = n +1 (cid:0) nn (cid:1) .The verti es of a binary tree an be greedily bi olored (cid:22)say in bla k or white(cid:22)so that adja ent verti es have distin t olors. The bi oloration is unique up to the hoi e of the olor of the (cid:28)rst node. As a onsequen e, rooted bi olored binarytrees are either bla k-rooted or white-rooted, depending on the olor of the rootnode. The sets of bla k-rooted (resp. white-rooted) binary trees with i bla k nodesand j white nodes is denoted by B • ij (resp. by B ◦ ij ); and the total set of rootedbi olored binary trees with i bla k nodes and j white nodes is denoted by B ′ ij .It will be onvenient to view ea h entire edge of a tree as a pair of opposite half-edges (cid:22)ea h one in ident to one extremity of the edge(cid:22) and to view ea h stem asa single half-edge (cid:22)in ident to the node holding the stem. More generally we shallACM Journal Name, Vol. V, No. N, Month 20YY. · Éri Fusy et al. onsider maps that have entire edges (made of two half-edges) and stems (made ofonly one half-edge). It is then also natural to asso iate one fa e to ea h half-edge,say, the fa e on its right. In the ase of trees, there is only the outer fa e, so thatall half-edges get the same asso iated fa e.2.3 Quadrangulations and disse tionsA quadrangulation is a planar map whose fa es (in luding the outer one) havedegree 4. A disse tion of the hexagon by quadrangular fa es is a planar map whoseouter fa e has degree 6 and inner fa es have degree 4.Cy les that do not delimit a fa e are said to be separating. A quadrangulation ora disse tion of the hexagon by quadrangular fa es is said to be irredu ible if it has atleast 4 fa es and has no separating 4- y le. The (cid:28)rst irredu ible quadrangulationis the ube, whi h has 6 fa es. We denote by Q ′ n the set of rooted irredu iblequadrangulations with n fa es, in luding the outer one. Euler's relation ensuresthat these quadrangulations have n + 2 verti es. We denote by D n ( D ′ n ) the set of(rooted, respe tively) irredu ible disse tions of the hexagon with n inner verti es.These have n + 2 quadrangular fa es, a ording to Euler's relation. From nowon, irredu ible disse tions of the hexagon by quadrangular fa es will simply be alled irredu ible disse tions. The lasses of rooted irredu ible quadrangulationsand of rooted irredu ible disse tions are respe tively denoted by Q ′ = ∪ n Q ′ n and D ′ = ∪ n D ′ n .As fa es of disse tions and quadrangulations have even degree, the verti es ofthese maps an be greedily bi olored, say, in bla k and white, so that ea h edge onne ts a bla k vertex to a white one. Su h a bi oloration is unique up to the hoi e of the olors. We denote by Q ′ ij the set of rooted bi olored irredu iblequadrangulations with i bla k verti es and j white verti es and su h that the root-vertex is bla k; and by D ′ ij the set of rooted bi olored irredu ible disse tions with i bla k inner verti es and j white inner verti es and su h that the root-vertex isbla k.A bi olored irredu ible disse tion is omplete if the three outer white verti es ofthe hexagon have degree exa tly 2. Hen e, these three verti es are in ident to twoadja ent edges on the hexagon.3. CORRESPONDENCES BETWEEN FAMILIES OF PLANAR MAPSThis se tion re alls a folklore bije tion between irredu ible quadrangulations and3- onne ted maps, hereafter alled angular mapping, see [Mullin and S hellenberg1968℄, and its adaptation to outer-triangular 3- onne ted maps.3.1 3- onne ted maps and irredu ible quadrangulationsLet us (cid:28)rst re all how the angular mapping works. Given a rooted quadrangulation Q ∈ Q ′ n endowed with its vertex bi oloration, let M be the rooted map obtainedby linking, for ea h fa e f of Q (even the outer fa e), the two diagonally opposedbla k verti es of f ; the root of M is hosen to be the edge orresponding to theouter fa e of Q , oriented so that M and Q have same root-vertex, see Figure 2. Themap M is often alled the primal map of Q . A similar onstru tion using whiteverti es instead of bla k ones would give its dual map (i.e., the map with a vertexACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees · M and edge-set orresponding to the adja en ies between verti esand fa es of M ).The onstru tion of the primal map is easily invertible. Given any rooted map M , the inverse onstru tion onsists in adding a vertex alled a fa e-vertex in ea hfa e (even the outer one) of M and linking a vertex v and a fa e-vertex v f by anedge if v is in ident to the fa e f orresponding to v f . Keeping only these fa e-vertex in iden e edges yields a quadrangulation. The root is hosen as the edgethat follows the root of M in ounter- lo kwise order around its origin.The following theorem is a lassi al result in the theory of maps.Theorem 3.1 (Angular mapping). The angular mapping is a bije tion be-tween P ′ n and Q ′ n and more pre isely a bije tion between P ′ ij and Q ′ ij .3.2 Outer-triangular 3- onne ted maps and bi olored omplete irredu ible disse tionsThe same prin iple yields a bije tion, also alled angular mapping, between outer-triangular 3- onne ted maps and bi olored omplete irredu ible disse tions, whi hwill prove very useful in Se tions 7 and 8. This mapping is very similar to theangular mapping: given a omplete disse tion D , asso iate to D the map M ob-tained by linking the two bla k verti es of ea h inner fa e of D by a new edge, seeFigure 3. The map M is alled the primal map of D .Theorem 3.2 (Angular mapping with border). The angular mapping, for-mulated for omplete disse tions, is a bije tion between bi olored omplete irre-du ible disse tions with i bla k verti es and j white verti es and outer-triangular3- onne ted maps with i verti es and j − inner fa es.Proof. The proof follows similar lines as that of Theorem 3.1, see [Mullin andS hellenberg 1968℄.3.3 Derived mapsIn its version for omplete disse tions, the angular mapping an also be formulatedusing the on ept of derived map, whi h will be very useful throughout this arti le(in parti ular when dealing with orientations).Let M be an outer-triangular 3- onne ted map, and let M ∗ be the map obtainedfrom the dual of M by removing the dual vertex orresponding to the outer fa e of M . Then the derived map M ′ of M is the superimposition of M and M ∗ , whereACM Journal Name, Vol. V, No. N, Month 20YY. · Éri Fusy et al.(a) A disse tion, (b) bla k diagonals, ( ) the 3- onne ted map, (d) the derived map.Fig. 3. The angular mapping with border: from a bi olored omplete irredu ible disse tion (a) toan outer-triangular 3- onne ted map ( ). The ommon derived map is shown in (d).ea h outer vertex re eives an additional half-edge dire ted toward the outer fa e.For example, Figure 3(d) shows the derived map of the map given in Figure 3( ).The map M is alled the primal map of M ′ and the map M ∗ is alled the dual mapof M ′ . Observe that the superimposition of M and M ∗ reates a vertex of degree 4for ea h edge e of M , due to the interse tion of e with its dual edge. These verti esof M ′ are alled edge-verti es. An edge of M ′ either orresponds to an half-edge of M when it onne ts an edge-vertex and a primal vertex, or to an half-edge of M ∗ when it onne ts an edge-vertex and a dual vertex.Similarly, one de(cid:28)nes derived maps of omplete irredu ible disse tions. Given abi olored omplete irredu ible disse tion D , the derived map M ′ of D is onstru tedas follows; for ea h inner fa e f of D , link the two bla k verti es in ident to f bya primal edge, and the two white ones by a dual edge. These two edges, whi hare the two diagonals of f , interse t at a new vertex alled an edge-vertex. Thederived map is then obtained by keeping the primal and dual edges and all verti esex ept the three outer white ones and their in ident edges. Finally, for the sakeof regularity, ea h of the six outer verti es of M ′ re eives an additional half-edgedire ted toward the outer fa e. For example, the derived map of the disse tion ofFigure 3(a) is shown in Figure 3(d). Bla k verti es are alled primal verti es andwhite verti es are alled dual verti es of the derived map M ′ . The submap M ( M ∗ )of M ′ onsisting of the primal verti es and primal edges (resp. the dual verti esand dual edges) is alled the primal map (resp. the dual map) of the derived map.Clearly, M has a triangular outer fa e; and, by onstru tion, a bi olored ompleteirredu ible disse tion and its primal map have the same derived map.4. BIJECTION BETWEEN BINARY TREES AND IRREDUCIBLE DISSECTIONS4.1 Closure mapping: from trees to disse tionsLo al and partial losure. Given a map with entire edges and stems (for instan ea tree), we de(cid:28)ne a lo al losure operation, whi h is based on a ounter- lo kwisewalk around the map: this walk alongside the boundary of the outer map visitsa su ession of stems and entire edges, or more pre isely, a sequen e of half-edgeshaving the outer fa e on their right-hand side. When a stem is immediately followedin this walk by three entire edges, its lo al losure onsists in the reation of anopposite half-edge for this stem, whi h is atta hed to farthest endpoint of the thirdentire edge: this amounts to ompleting the stem into an entire edge, so as to reate(cid:22)or lose(cid:22) a quadrangular fa e. This operation is illustrated in Figure 4(b).ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees · (cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1) (a) Generi ase when r = 2 and s = 2 . (b) Case of the binary tree of Figure 4(a).Fig. 5. The omplete losure.Given a binary tree T , the lo al losure an be performed greedily until no morelo al losure is possible. Ea h lo al losure reates a new entire edge, maybe makinga new lo al losure possible. It is easy to see that the (cid:28)nal map, alled the partial losure of T , does not depend on the order of the lo al losures. Indeed, a y li parenthesis word is asso iated to the ounter- lo kwise boundary of the tree, withan opening parenthesis of weight 3 for a stem and a losing parenthesis for a side ofentire edge; then the future lo al losures orrespond to mat hings of the parenthesisword. An example of partial losure is shown in Figure 4( ).Complete losure. Let us now omplete the partial losure operation to obtain adisse tion of the hexagon with quadrangular fa es. An outer entire half-edge is anhalf-edge belonging to an entire edge and in ident to the outer fa e. Observe thata binary tree T with n nodes has n + 2 stems and n − outer entire half-edges.Ea h lo al losure de reases by 1 the number of stems and by 2 the number ofouter entire half-edges. Hen e, if k denotes the number of (unmat hed) stems inthe partial losure of T , there are k − outer entire half-edges. Moreover, stemsdelimit intervals of inner half-edges on the ontour of the outer fa e; these intervalshave length at most 2, otherwise a lo al losure would be possible. Let r be thenumber of su h intervals of length 1 and s be the number of su h intervals of length 0(that is, the number of nodes in ident to two unmat hed stems). Then r and s are learly related by the relation r + 2 s = 6 .The omplete losure onsists in ompleting all unmat hed stems with half-edgesACM Journal Name, Vol. V, No. N, Month 20YY.0 · Éri Fusy et al.(a) A tri-oriented binary tree, (b) and its tri-oriented losure.Fig. 6. Examples of tri-orientations.in ident to verti es of the hexagon in the unique way (up to rotation of the hexagon)that reates only quadrangular bounded fa es. Figure 5(a) illustrates the omplete losure for the ase ( r = 2 , s = 2) , and a parti ular example is given in Figure 5(b).Lemma 4.1. The losure of a binary tree is an irredu ible disse tion of thehexagon.Proof. Assume that there exists a separating 4- y le C in the losure of T . Let m ≥ be the number of verti es in the interior of C . Then there are m edges inthe interior of C a ording to Euler's relation. Let v be a vertex of T that belongs tothe interior of C after the losure. Consider the orientation of edges of T away from v (only for the sake of this proof). Then nodes of T have outdegree 2, ex ept v ,whi h has outdegree 3. This orientation naturally indu es an orientation of edges ofthe losure-disse tion with the same property (ex ept that verti es of the hexagonhave outdegree 0). Hen e there are at least m + 1 edges in the interior of C , a ontradi tion.4.2 Tri-orientations and openingTri-orientations. In order to de(cid:28)ne the mapping inverse to the losure, we need abetter des ription of the stru ture indu ed on the losure map by the original tree.Let us onsider orientations of the half-edges of a map (in ontrast to the usualnotion of orientation, where edges are oriented). An half-edge is said to be inwardif it is oriented toward its origin and outward if it is oriented out of its origin. Ifa map is endowed with an orientation of its half-edges, the outdegree of a vertex v is naturally de(cid:28)ned as the number of its in ident half-edges oriented outward.The (unique) tri-orientation of a binary tree is de(cid:28)ned as the orientation of itshalf-edges su h that any node has outdegree 3, see Figure 6(a) for an example. Atri-orientation of a disse tion is an orientation of its inner half-edges (i.e., half-edges belonging to inner edges) su h that outer and inner verti es have respe tivelyoutdegree 0 and 3, and su h that two half-edges of a same inner edge an not bothbe oriented inward, see Figure 6(b). An edge is said to be simply oriented if its twohalf-edges have same dire tion (that is, one is oriented inward and the other oneoutward), and bi-oriented if they are both oriented outward.Let D be an irredu ible disse tion endowed with a tri-orientation. A lo kwiseACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· D is a simple y le C onsisting of edges that are either bi-oriented orsimply oriented with the interior of C on their right.Lemma 4.2. Let D be an irredu ible disse tion with n inner verti es. Then atri-orientation of D has n − bi-oriented edges and n + 2 simply oriented edges.If a tri-orientation of a disse tion has no lo kwise ir uit, then its bi-orientededges form a tree spanning the inner verti es of the disse tion.Proof. Let s and r denote the numbers of simply and bi-oriented edges of D .A ording to Euler's relation (using the degrees of the fa es), D has n + 1 inneredges, i.e., n + 1 = r + s . Moreover, as all inner verti es have outdegree 3, n = 2 r + s . Hen e r = n − and s = n + 2 .If the tri-orientation has no lo kwise ir uit, the subgraph H indu ed by the bi-oriented edges has r = n − edges, no y le (otherwise the y le ould be traversed lo kwise, as all its edges are bi-oriented), and is in ident to at most n verti es,whi h are the inner verti es of D . A ording to a lassi al result of graph theory, H is a tree spanning the n inner verti es of D .Closure-tri-orientation of a disse tion. Let D be a disse tion obtained as the losureof a binary tree T . The tri-orientation of T learly indu es via the losure a tri-orientation of D , alled losure-tri-orientation. On this tri-orientation, bi-orientededges orrespond to inner edges of the original binary tree, see Figure 6(b).Lemma 4.3. A losure-tri-orientation has no lo kwise ir uit.Proof. Sin e verti es of the hexagon have outdegree 0, they an not belong toany ir uit. Hen e lo kwise ir uits may only be reated during a lo al losure.However losure edges are simply oriented with the outer fa e on their right, hen emay only reate ounter lo kwise ir uits.This property is indeed quite strong: the following theorem ensures that theproperty of having no lo kwise ir uit hara terizes the losure-tri-orientation andthat a tri-orientation without lo kwise ir uit exists for any irredu ible disse tion.The proof of this theorem is delayed to Se tion 8.Theorem 4.4. Any irredu ible disse tion has a unique tri-orientation without lo kwise ir uit.Re overing the tree: the opening mapping. Lemma 4.2 and the present se tion giveall ne essary elements to des ribe the inverse mapping of the losure, whi h is alled the opening: let D be an irredu ible disse tion endowed with its (unique byTheorem 4.4) tri-orientation without lo kwise ir uit. The opening of D is thebinary tree obtained from D by deleting outer verti es, outer edges, and all inwardhalf-edges.4.3 The losure is a bije tionIn this se tion, we show that the opening is inverse to the losure. By onstru tionof the opening, the following lemma is straightforward:Lemma 4.5. Let D be an irredu ible disse tion obtained as the losure of a binarytree T . Then the opening of D is T . ACM Journal Name, Vol. V, No. N, Month 20YY.2 · Éri Fusy et al.Conversely, the following also holds:Lemma 4.6. Let T be a binary tree obtained as the opening of an irredu ibledisse tion D . Then the losure of T is D .Proof. The proof relies on the de(cid:28)nition of an order for removing inward half-edges. Start with the half-edges in ident to outer verti es (that are all orientedinward): this learly inverses the ompletion step of the losure. Ea h furtherremoval must orrespond to a lo al losure, that is, the removed half-edge musthave the outer fa e on its right.Let M k be the submap of the disse tion indu ed by remaining half-edges after k removals. Then M k overs the n inner verti es, and, as long as some inwardhalf-edge remains, it has at least n entire edges (see Lemma 4.2). Hen e, there isat least one y le, and a simple one C an be extra ted from the boundary of theouter fa e of M k . Sin e there is no lo kwise ir uit, at least one edge of C is simplyoriented with the interior of C on its left; the orresponding inward half-edge anbe sele ted for the next removal.Assuming Theorem 4.4, the bije tive result follows from Lemmas 4.5 and 4.6:Theorem 4.7. For ea h n ≥ , the losure mapping is a bije tion between theset B n of binary trees with n nodes and the set D n of irredu ible disse tions with n inner verti es.For ea h integer pair ( i, j ) with i + j ≥ , the losure mapping is a bije tionbetween the set B ij of bi olored binary trees with i bla k nodes and j white nodes,and the set D ij of bi olored irredu ible disse tions with i bla k inner verti es and j white inner verti es.The inverse mapping of the losure is the opening.We an state three analogous versions of Theorem 4.7 for rooted obje ts:Theorem 4.8. The losure mapping indu es the following orresponden es be-tween sets of rooted obje ts: B ′ n × { , . . . , } ≡ D ′ n × { , . . . , n + 2 } , B ′ ij × { , , } ≡ D ′ ij × { , . . . , i + j + 2 } , B • ij × { , , } ≡ D ′ ij × { , . . . , i − j + 1 } . Proof. We de(cid:28)ne a bi-rooted irredu ible disse tion as a rooted irredu ible disse -tion endowed with its tri-orientation without lo kwise ir uit and where a simplyoriented edge is marked. We write D ′′ n for the set of bi-rooted irredu ible disse -tions with n inner verti es. Opening and rerooting on the stem orresponding tothe marked edge de(cid:28)nes a surje tion from D ′′ n onto B ′ n , for whi h ea h element of B ′ n has learly six preimages, sin e the disse tion ould have been rooted at any edgeof the hexagon. Moreover, erasing the mark learly de(cid:28)nes a surje tion from D ′′ n to D ′ n , for whi h ea h element of D ′ n has n + 2 preimages a ording to Lemma 4.2.Hen e, the losure de(cid:28)nes a ( n + 2) -to-6 mapping between B ′ n and D ′ n . The proofof the ( i + j + 2) -to-3 orresponden e between B ′ ij and D ′ ij is the same.The (2 i − j + 1) -to-3 orresponden e between B • ij and D ′ ij indu ed by the losure an be proved similarly, with the di(cid:27)eren e that the marked simply oriented edgeACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· D ′ ij endowed with its tri-orientation without lo kwise ir uit has (2 i − j + 1) simply oriented edges whose origin is a bla k vertex.Let us mention that the ( i + j + 2) -to-3 orresponden e between B ′ ij and D ′ ij is akey ingredient to the planar graph generators presented in [Fusy 2005℄.The oe(cid:30) ient |B ′ n | is well-known to be the n -th Catalan number n +1 (cid:0) nn (cid:1) , andre(cid:28)nements of the standard proofs yield |B • ij | = j +1 (cid:0) j +1 i (cid:1)(cid:0) ij (cid:1) , as detailed belowin Se tion 4.5. Theorem 4.8 thus implies the following enumerative results:Corollary 4.9. The oe(cid:30) ients ounting rooted irredu ible disse tions have thefollowing expressions, |D ′ n | = 6 n + 2 |B ′ n | = 6( n + 2)( n + 1) (cid:18) nn (cid:19) , (2) |D ′ ij | = 32 i − j + 1 |B • ij | = 3(2 i + 1)(2 j + 1) (cid:18) j + 1 i (cid:19)(cid:18) i + 1 j (cid:19) . (3)These enumerative results have already been obtained by Mullin and S hellenberg[1968℄ using algebrai methods. Our method provides a dire t bije tive proof.Noti e that the ardinality of D ′ n is S ( n, where S ( n, m ) = (2 n )!(2 m )! n ! m !( n + m )! is the n -th super-Catalan number of order m . (These numbers are dis ussed by Gessel[1992℄.) Our bije tion gives an interpretation of these numbers for m = 2 .4.4 Spe ialization to triangulationsA ni e feature of the losure mapping is that it spe ializes to a bije tion betweenplane triangulations and a simple subfamily of binary trees. In this way, we get the(cid:28)rst bije tive proof for the formula giving the number of unrooted plane triangu-lations with n verti es, found by Brown [1964℄, and re over the ounting formulafor rooted triangulations, already obtained by Tutte [1962℄ and by Poulalhon andS hae(cid:27)er [2006℄ using a di(cid:27)erent bije tion.Theorem 4.10. The losure mapping is a bije tion between the set T n of (un-rooted) plane triangulations with n inner verti es and the set S n of bi olored binarytrees with n bla k nodes and no stem (i.e., leaf ) in ident to a bla k node.The losure mapping indu es the following orresponden e between the set T ′ n ofrooted triangulations with n inner verti es and the set S ′ n of trees in S n rooted at astem: S ′ n × { , , } ≡ T ′ n × { , . . . , n + 3 } . Proof. Plane triangulations are exa tly 3- onne ted planar maps where all fa eshave degree 3. Hen e, the angular mapping with border (Theorem 3.2) indu es abije tion between T n and the set of omplete bi olored irredu ible disse tions with n inner bla k verti es and all inner white verti es of degree 3. In a tri-orientation,the indegree of ea h inner white vertex v is deg( v ) − and the indegree of ea houter white vertex v is deg( v ) − , hen e the disse tions onsidered here have noingoing half-edge in ident to a white vertex. Hen e the opening of the disse tion(by removing ingoing half-edges) is a binary tree with no stem in ident to a bla kACM Journal Name, Vol. V, No. N, Month 20YY.4 · Éri Fusy et al.(a) (b)( ) (d)Fig. 7. The bije tion between triangulations and bi olored binary trees with no leaf in ident to abla k node.node. Conversely, starting from su h a binary tree, the half-edges reated duringthe losure mapping are opposite to a stem. As all stems are in ident to whiteverti es, the half-edges reated are in ident to bla k verti es. Hen e the degree ofea h white vertex does not in rease during the losure mapping, i.e., remains equalto 3 for inner white verti es and equal to 2 for outer white verti es. This on ludesthe proof of the bije tion S n ≡ T n .The bije tion S ′ n × { , , } ≡ T ′ n × { , . . . , n + 3 } follows easily (see the proofof Theorem 4.8), using the fa t that a tree of S n has n + 3 leaves.This bije tion, illustrated in Figure 7, makes it possible to ount plane unrootedand rooted triangulations, as the subfamily of binary trees involved is easily enu-merated.Corollary 4.11. For n ≥ , the number of rooted triangulations with n innerACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· |T ′ n | = 2 (4 n + 1)!( n + 1)!(3 n + 2)! . The number of unrooted plane triangulations with n inner verti es is |T n | = 23 (4 n + 1)!( n + 1)!(3 n + 2)! if n ≡ , |T n | = 23 (4 n + 1)!( n + 1)!(3 n + 2)! + 43 (4 k + 1)! k !(3 k + 2)! if n ≡ n = 3 k + 1] , |T n | = 23 (4 n + 1)!( n + 1)!(3 n + 2)! + 23 (4 k )! k !(3 k + 1)! if n ≡ n = 3 k ] . Proof. Let S ′ = ∪ n S ′ n be the lass of rooted binary trees with no leaf in identto a bla k node and let R ′ = ∪ n R ′ n be the lass of rooted binary trees wherethe root leaf is in ident to a bla k node and all other leaves are in ident to whitenodes. Let S ( x ) and R ( x ) be the generating fun tions of S ′ and R ′ with respe tto the number of bla k nodes. Clearly the two subtrees pending from the (white)root node of a tree of S ′ are either empty or in R ′ . Hen e S ( x ) = (1 + R ( x )) .Similarly, a tree in R ′ de omposes at the root node into two trees in S ′ , so that R ( x ) = xS ( x ) . Hen e, R ( x ) = x (1 + R ( x )) is equal to the generating fun tionof quaternary trees, and S ( x ) = (1 + R ( x )) is equal to the generating fun tionof pairs of quaternary trees (the empty tree being allowed). Using a Luka iewi zen oding and the y li lemma, the number of pairs of quaternary trees with atotal of n nodes is easily shown to be n +2 (4 n +2)! n !(3 n +2)! . This expression of |S ′ n | andthe (3 n + 3) -to-3 orresponden e between S ′ n and T ′ n yield the expression of |T ′ n | .Let us now prove the formula for |T n | = |S n | . Clearly, the only possible symmetryfor a bi olored binary tree is a rotation of order 3. Let S sym n be the set of trees of S n with a rotation symmetry and let S asy n be the set of trees of S n with no symmetry.Let S ′ asy n and S ′ sym n be the sets of trees of S asy n and S sym n that are rooted at a leaf.It is easily shown that a tree of S n has n + 3 leaves. Clearly the tree gives riseto n + 3 rooted trees if it is asymmetri and gives rise to n + 1 rooted trees if itis symmetri . Hen e |S asy n | = |S ′ asy n | / (3 n + 3) and |S sym n | = |S ′ sym n | / ( n + 1) . Using |S n | = |S asy n | + |S sym n | and |S ′ n | = |S ′ asy n | + |S ′ sym n | , we obtain |S n | = 13 n + 3 |S ′ n | + 23 |S sym n | . The entre of rotation of a tree in S sym n is either a bla k node, in whi h ase n = 3 k + 1 for some integer k ≥ , or is a white node, in whi h ase n = 3 k forsome integer k ≥ . In the (cid:28)rst ase, a tree τ ∈ S sym n is obtained by atta hing toa bla k node 3 opies of a tree in S ′ k . Hen e |S sym3 k +1 | = |S ′ k | = 2 (4 k +1)! k !(3 k +2)! . In these ond ase, a tree τ ∈ S sym n is obtained by atta hing to a white node 3 opies of atree in R ′ k . Hen e |S sym3 k | = |R ′ k | = (4 k )! k !(3 k +1)! . The result follows.4.5 Counting, oding and sampling rooted bi olored binary treesACM Journal Name, Vol. V, No. N, Month 20YY.6 · Éri Fusy et al. δ = 1 δ = 1 δ = − δ = − δ = 3 (a) A •◦ , (b) A • , ( ) A ◦ .Fig. 8. The three alphabets for words asso iated to bi olored binary trees. ΦΨ w •◦ = w • = w ◦ = Fig. 9. A bi olored rooted binary tree, and the orresponding words w •◦ , w • , and w ◦ .4.5.1 From a bi olored tree to a pair of words. There exist general methods toen ode a family of trees spe i(cid:28)ed by several parameters. This se tion makes su hmethods expli it for the family of bi olored binary trees. Let T be a bla k-rootedbi olored binary tree with i bla k nodes and j white nodes. Doing a depth-(cid:28)rsttraversal of T from left to right, we obtain a word w •◦ of length (2 j + 1) on thealphabet A •◦ represented in Figure 8(a), see Figure 9 for an example, the mappingbeing denoted by Ψ . Classi ally, the sum of the weights of the letters of any stri tpre(cid:28)x of w •◦ is nonnegative and the sum of the weights of the letters of w •◦ is equalto -1. In addition, w •◦ is the unique word in its y li equivalen e- lass that hasthese two properties.The se ond step is to map w •◦ to a pair ( w • , w ◦ ) := Φ( w •◦ ) of words su h that:(cid:22) w • is a word of length (2 j + 1) on the alphabet A • shown in Figure 8(b) with i bla k-node-letters.(cid:22) w ◦ is a word of length i on the alphabet A ◦ shown in Figure 8( ) with j white-node-letters.Figure 9 illustrates the mapping Φ on an example.4.5.2 Inverse mapping: from a pair of words to a tree. Conversely, let ( w • , w ◦ ) bea pair of words su h that w • is of length (2 j + 1) on A • and has i bla k-node-letters, and w ◦ is of length i on A ◦ and has j white-node-letters. First, to the pair ( w • , w ◦ ) we asso iate a word e w •◦ of length (2 j + 1) on A •◦ by doing the inverse ofthe mapping Φ shown in the right part of Figure 9. The word e w •◦ has the propertythat the sum of the weights of its letters is equal to -1. There is a unique word w •◦ in the y li equivalen e- lass of e w •◦ su h that the sum of the weights of theletters of any stri t pre(cid:28)x is nonnegative. We asso iate to w •◦ the binary tree ofACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· B • ij obtained by doing the inverse of the mapping Ψ shown in Figure 9.This method allows us to sample uniformly obje ts of B • ij in linear time andensures that |B • ij | = 12 j + 1 (cid:18) j + 1 i (cid:19)(cid:18) ij (cid:19) . (4)5. APPLICATION: COUNTING ROOTED 3-CONNECTED MAPS5.1 Generating fun tions of rooted disse tionsEven if the ounting formulas obtained in Corollary 4.9 are simple, it proves use-ful to have an expression of the orresponding generating fun tions. Indeed, thede omposition-method we develop is suitably handled by generating fun tions.Let r ( x • , x ◦ ) := P |B • ij | x i • x j ◦ and r ( x • , x ◦ ) := P |B ◦ ij | x i • x j ◦ be the series ofbla k-rooted and white-rooted bi olored binary trees. By de omposition at theroot, r ( x • , x ◦ ) and r ( x • , x ◦ ) are the solutions of the system: (cid:26) r ( x • , x ◦ ) = x • (1 + r ( x • , x ◦ )) ,r ( x • , x ◦ ) = x ◦ (1 + r ( x • , x ◦ )) . (5)De(cid:28)ne an edge-marked bi olored binary tree as a bi olored binary tree with amarked inner edge. Let ¯ B ij be the set of edge-marked bi olored binary trees with i bla k nodes and j white nodes. Cutting the marked edge of su h a tree yieldsa pair made of a bla k-rooted and a white-rooted binary tree. As a onsequen e,the generating fun tion ounting edge-marked bi olored binary trees is r · r , i.e., r · r = P ij | ¯ B ij | x i • x j ◦ .Let us onsider bi-rooted obje ts as in the proof of Theorem 4.8; sin e any obje tof B ij has (2 i − j + 1) white leaves ( onne ted to a bla k node) and (2 j − i + 1) bla k leaves ( onne ted to a white node), |B ◦ ij | = 2 j − i + 12 i − j + 1 |B • ij | . Similarly, ounting in two ways the obje ts of B • ij having a marked edge yields | ¯ B ij | = i + j − i − j + 1 |B • ij | . Thus, we have |B • ij | + |B ◦ ij | − | ¯ B ij | = i − j +1 |B • ij | = |D ′ ij | (using (3)), so that X i,j |D ′ ij | x i • x j ◦ = r ( x • , x ◦ ) + r ( x • , x ◦ ) − r ( x • , x ◦ ) r ( x • , x ◦ ) . (6)Substituting x • and x ◦ by x , we obtain: X n |D ′ n | x n = 2 r ( x ) − r ( x ) , (7)where r ( x ) = x (1 + r ( x )) is the generating fun tion of binary trees a ording tothe number of inner nodes. ACM Journal Name, Vol. V, No. N, Month 20YY.8 · Éri Fusy et al.5.2 Generating fun tion of rooted 3- onne ted mapsInje tion from Q ′ to D ′ . Let us onsider the mapping ι de(cid:28)ned on rooted quad-rangulations by the removal of the root-edge and rerooting on the next edge in ounter lo kwise order around the root-vertex; ι is learly inje tive, and for anyquadrangulation Q , ι ( Q ) has only quadrangular fa es but the outer one, whi h ishexagonal. In addition, ι ( Q ) an not have more separating 4- y les than Q . Hen ethe restri tion of ι to Q ′ is an inje tion from Q ′ to D ′ , more pre isely from Q ′ n to D ′ n − and from Q ′ ij to D ′ i − ,j − .It is however not a bije tion, sin e the inverse edge-adding operation π , per-formed on an irredu ible disse tion, an reate a separating 4- y le on the obtainedquadrangulation. Pre isely, given D a rooted irredu ible disse tion (cid:22)with s theroot-vertex and t the vertex of the hexagon opposite to s (cid:22) a path of length 3 be-tween s and t is alled a de omposition path. The two paths of edges of the hexagon onne ting s to t are alled outer de omposition paths, and the other ones, if any,are alled inner de omposition paths of D .Observe that inner de omposition paths of D are in one-to-one orresponden ewith separating 4- y les of the quadrangulation π ( D ) (i.e., the quadrangulationobtained from D by adding a root-edge between s and t oriented out of s ).A rooted irredu ible disse tion without inner de omposition path is said to beunde omposable. The orresponding lass is denoted by U ′ . The dis ussion onde omposition paths yields the following result.Lemma 5.1. Denote by U ′ n the set of rooted unde omposable disse tions with n inner verti es and by U ′ ij the set of rooted unde omposable disse tions with i innerbla k verti es and j inner white verti es. Then U ′ n − is in bije tion with P ′ n and U ′ i − ,j − is in bije tion with P ′ ij .Proof. A rooted irredu ible quadrangulation is mapped by ι to a rooted dis-se tion su h that the inverse edge-adding operation π does not reate a separating4- y le, i.e., an unde omposable disse tion. Moreover, Euler's relation ensures thatthe image of a quadrangulation with n fa es has n − inner verti es. By inje tivity, ι is bije tive to its image, i.e., ι is a bije tion between Q ′ n and U ′ n − ; and a bije tionbetween Q ′ ij and U ′ i − ,j − . The result follows, as Q ′ n and Q ′ ij are respe tively inbije tion with P ′ n and P ′ ij via the angular mapping (Theorem 3.1).Thanks to Lemma 5.1, enumerating rooted 3- onne ted maps redu es to enumer-ating rooted unde omposable disse tions.De omposition of rooted irredu ible disse tions. Sin e irredu ible disse tions do nothave multiple edges nor y les of odd length, de omposition paths satisfy the fol-lowing properties:Lemma 5.2. Let D be a rooted irredu ible disse tion, and let P and P be twodi(cid:27)erent de omposition paths of D . Then:(cid:22) either P ∩ P = { s, t } , in whi h ase P and P are said to be internallydisjoint;(cid:22) or there exists one inner vertex v su h that P ∩ P = { s } ∪ { t } ∪ { v } , inwhi h ase P and P are said to be upper or lower joint whether v is adja ent to s or t .ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ··
aa r X i v : . [ m a t h . C O ] O c t Disse tions, orientations, and trees,with appli ations to optimal mesh en odingand to random samplingÉRIC FUSY, DOMINIQUE POULALHON and GILLES SCHAEFFERÉ.F and G.S: LIX, É ole Polyte hnique. D.P: Liafa, Univ. Paris 7. Fran eWe present a bije tion between some quadrangular disse tions of an hexagon and unrooted binarytrees, with interesting onsequen es for enumeration, mesh ompression and graph sampling.Our bije tion yields an e(cid:30) ient uniform random sampler for 3- onne ted planar graphs, whi hturns out to be determinant for the quadrati omplexity of the urrent best known uniformrandom sampler for labelled planar graphs [Fusy, Analysis of Algorithms 2005℄.It also provides an en oding for the set P ( n ) of n -edge 3- onne ted planar graphs that mat hesthe entropy bound n log |P ( n ) | = 2 + o (1) bits per edge (bpe). This solves a theoreti al problemre ently raised in mesh ompression, as these graphs abstra t the ombinatorial part of meshes withspheri al topology. We also a hieve the optimal parametri rate n log |P ( n, i, j ) | bpe for graphsof P ( n ) with i verti es and j fa es, mat hing in parti ular the optimal rate for triangulations.Our en oding relies on a linear time algorithm to ompute an orientation asso iated to theminimal S hnyder wood of a 3- onne ted planar map. This algorithm is of independent interest,and it is for instan e a key ingredient in a re ent straight line drawing algorithm for 3- onne tedplanar graphs [Boni hon et al., Graph Drawing 2005℄.Categories and Subje t Des riptors: G.2.1 [Dis rete Mathemati s℄: Combinatorial algorithmsGeneral Terms: AlgorithmsAdditional Key Words and Phrases: Bije tion, Counting, Coding, Random generation1. INTRODUCTIONOne origin of this work an be tra ed ba k to an arti le of Ed Bender in the Amer-i an Mathemati al Monthly [Bender 1987℄, where he asked for a simple explanationof the remarkable asymptoti formula |P ( n, i, j ) | ∼ ijn (cid:18) i − j + 2 (cid:19)(cid:18) j − i + 2 (cid:19) (1)for the ardinality of the set of 3- onne ted (unlabelled) planar graphs with i ver-ti es, j fa es and n = i + j − edges, n going to in(cid:28)nity. By a theorem of Whitney[1933℄, these graphs have essentially a unique embedding on the sphere up to home-omorphisms, so that their study amounts to that of rooted 3- onne ted maps, wherea map is a graph embedded in the plane and rooted means with a marked orientededge.1.1 Graphs, disse tions and treesAnother known property of 3- onne ted planar graphs with n edges is the fa t thatthey are in dire t one-to-one orresponden e with disse tions of the sphere into n quadrangles that have no non-fa ial 4- y le. The heart of our paper lies in a furtherone-to-one orresponden e. ACM Journal Name, Vol. V, No. N, Month 20YY, Pages 1(cid:21)0??. · Éri Fusy et al.Theorem 1.1. There is a one-to-one orresponden e between unrooted binarytrees with n nodes and unrooted quadrangular disse tions of an hexagon with n interior verti es and no non-fa ial 4- y le.The mapping from binary trees to disse tions, whi h we all the losure, is easilydes ribed and resembles onstru tions that were re ently proposed for simpler kindsof maps [S hae(cid:27)er 1997; Bouttier et al. 2002; Poulalhon and S hae(cid:27)er 2006℄. Theproof that the mapping is a bije tion is instead rather sophisti ated, relying onnew properties of onstrained orientations [Ossona de Mendez 1994℄, related toS hnyder woods of triangulations and 3- onne ted planar maps [S hnyder 1990;di Battista et al. 1999; Felsner 2001℄ .Conversely, the re onstru tion of the tree from the disse tion relies on a lineartime algorithm to ompute the minimal S hnyder woods of a 3- onne ted map(or equivalently, the minimal α -orientation of the asso iated derived map, seeSe tion 9). This problem is of independant interest and our algorithm has forexample appli ations in the graph drawing ontext [Boni hon et al. 2007℄. It isakin to Kant's anoni al ordering [Kant 1996; Chuang et al. 1998; Boni hon etal. 2003; Castelli-Aleardi and Devillers 2004℄, but again the proof of orre tness isquite involved.Theorem 1.1 leads dire tly to the impli it representation of the numbers |P ′ n | (cid:22) ounting rooted 3- onne ted maps with n edges(cid:22) due to Tutte [1963℄), and itsre(cid:28)nement as dis ussed in Se tion 5 yields that of |P ′ ij | the number of rooted 3- onne ted maps with i verti es and j fa es (due to Mullin and S hellenberg [1968℄)from whi h Formula (1) follows. It partially explains the ombinatori s of the o - urren e of the ross produ t of binomials, sin e these are typi al of binary treeenumerations. Let us mention that the one-to-one orresponden e spe ializes par-ti ularly ni ely to ount plane triangulations (i.e., 3- onne ted maps with all fa esof degree 3), leading to the (cid:28)rst bije tive derivation of the ounting formula for un-rooted plane triangulations with i verti es, originally found by Brown [1964℄ usingalgebrai methods.1.2 Random samplingA se ond byprodu t of Theorem 1.1 is an e(cid:30) ient uniform random sampler forrooted 3- onne ted maps, i.e., an algorithm that, given n , outputs a random elementin the set P ′ n of rooted 3- onne ted maps with n edges with equal han es for allelements. The same prin iples yield a uniform sampler for P ′ ij .The uniform random generation of lasses of maps like triangulations or 3- onne ted graphs was (cid:28)rst onsidered in mathemati al physi s (see referen es in[Ambjørn et al. 1994; Poulalhon and S hae(cid:27)er 2006℄), and various types of ran-dom planar graphs are ommonly used for testing graph drawing algorithms (see[de Fraysseix et al.℄).The best previously known algorithm [S hae(cid:27)er 1999℄ had expe ted omplexity O ( n / ) for P ′ n , and was mu h less e(cid:30) ient for P ′ ij , having even exponential om-plexity for i/j or j/i tending to 2 (due to Euler's formula these ratio are boundedabove by 2 for 3- onne ted maps). In Se tion 6, we show that our generator for P ′ n or P ′ ij performs in linear time ex ept if i/j or j/i tends to 2 where it be omes atmost ubi .ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees · i verti es was given by Denise et al. [1996℄, but it resists known approa hes for per-fe t sampling [Wilson 2004℄, and has unknown mixing time. As opposed to this, are ursive s heme to sample planar graphs was proposed by Bodirsky et al. [2003℄,with amortized omplexity O ( n . ) . This result is based on a re ursive de ompo-sition of planar graphs: a planar graph an be de omposed into a tree-stru turewhose nodes are o upied by rooted 3- onne ted maps. Generating a planar graphredu es to omputing bran hing probabilities so as to generate the de ompositiontree with suitable probability; then a random rooted 3- onne ted map is generatedfor ea h node of the de omposition tree. Bodirsky et al. [2003℄ use the so- alledre ursive method [Nijenhuis and Wilf 1978; Flajolet et al. 1994; Wilson 1997℄ totake advantage of the re ursive de omposition of planar graphs. Our new randomgenerator for rooted 3- onne ted maps redu es their amortized ost to O ( n ) . Fi-nally a new uniform random generator for planar graphs was re ently developpedby one of the authors [Fusy 2005℄, that avoids the expensive prepro essing ompu-tations of [Bodirsky et al. 2003℄. The re ursive s heme is similar to the one usedin [Bodirsky et al. 2003℄, but the method to translate it to a random generatorrelies on Boltzmann samplers, a new general framework for the random generationre ently developed in [Du hon et al. 2004℄. Thanks to our random generator forrooted 3- onne ted maps, the algorithm of [Fusy 2005℄ has a time- omplexity of O ( n ) for exa t size uniform sampling and even performs in linear time for approx-imate size uniform sampling.1.3 Su in t en odingA third byprodu t of Theorem 1.1 is the possibility to en ode in linear time a 3- onne ted planar graph with n edges by a binary tree with n nodes. In turn thetree an be en oded by a balan ed parenthesis word of n bits. This ode is optimalin the information theoreti sense: the entropy per edge of this lass of graphs, i.e.,the quantity n log |P ( n ) | , tends to 2 when n goes to in(cid:28)nity, so that a ode for P ( n ) annot give a better guarantee on the ompression rate.Appli ations alling for ompa t storage and fast transmission of 3D geometri almeshes have re ently motivated a huge literature on ompression, in parti ular forthe ombinatorial part of the meshes. The (cid:28)rst ompression algorithms dealt onlywith triangular fa es [Rossigna 1999; Touma and Gotsman 1998℄, but many meshesin lude larger fa es, so that polygonal meshes have be ome prominent (see [Alliezand Gotsman 2003℄ for a re ent survey).The question of optimality of oders was raised in relation with ex eption odesprodu ed by several heuristi s when dealing with meshes with spheri al topology[Gotsman 2003; Khodakovsky et al. 2002℄. Sin e these meshes are exa tly triangu-lations (for triangular meshes) and 3- onne ted planar graphs (for polyhedral ones),the oders in [Poulalhon and S hae(cid:27)er 2006℄ and in the present paper respe tivelyprove that traversal based algorithms an a hieve optimality.On the other hand, in the ontext of su in t data stru tures, almost optimalalgorithms have been proposed [He et al. 2000; Lu 2002℄, that are based on separatorACM Journal Name, Vol. V, No. N, Month 20YY. · Éri Fusy et al.theorems. However these algorithms are not truly optimal (they get ε lose to theentropy but at the ost of an un ontrolled in rease of the onstants in the linear omplexity). Moreover, although they rely on a sophisti ated re ursive stru ture,they do not support e(cid:30) ient adja en y requests.As opposed to that, our algorithm shares with [He et al. 1999; Boni hon et al.2003℄ the property that it produ es essentially the ode of a spanning tree. Morepre isely it is just the balan ed parenthesis ode of a binary tree, and adja en ies ofthe initial disse tion that are not present in the tree an be re overed from the odeby a simple variation on the interpretation of the symbols. Adja en y queries anthus be dealt with in time proportional to the degree of verti es [Castelli-Aleardiet al. 2006℄ using the approa h of [Munro and Raman 1997; He et al. 1999℄.Finally we show that the ode an be modi(cid:28)ed to be optimal on the lass P ( n, i, j ) .Sin e the entropy of this lass is stri tly smaller than that of P ( n ) as soon as | i − n/ | ≫ n / , the resulting parametri oder is more e(cid:30) ient in this range. Inparti ular in the ase j = 2 i − our new algorithm spe ializes to an optimal oderfor triangulations.1.4 Outline of the paperThe paper starts with two se tions of preliminaries: de(cid:28)nitions of the maps and treesinvolved (Se tion 2), and some basi orresponden es between them (Se tion 3).Then omes our main result (Se tion 4), the mapping between binary trees andsome disse tions of the hexagon by quadrangular fa es. The fa t that this mappingis a bije tion follows from the existen e and uniqueness of a ertain tri-orientation ofour disse tions. The proof of this auxiliary theorem, whi h requires the introdu tionof the so- alled derived maps and their α -orientations, is delayed to Se tion 8, thatis, after the three se tions dedi ated to appli ations of our main result: in thesese tions we su essively dis uss ounting (Se tion 5), sampling (Se tion 6) and oding (Se tion 7) rooted 3- onne ted maps. The third appli ation leads us toour se ond important result: in Se tion 9 we present a linear time algorithm to ompute the minimal α -orientation of the derived map of a 3- onne ted planarmap (whi h also orresponds to the minimal S hnyder woods alluded to above).Finally, Se tion 10 is dedi ated to the orre tness proof of this orientation algorithm.Figure 1 summarizes the onne tions between the di(cid:27)erent families of obje ts we onsider.2. DEFINITIONS2.1 Planar mapsA planar map is a proper embedding of an unlabelled onne ted graph in the plane,where proper means that edges are smooth simple ar s that do not meet but attheir endpoints. A planar map is said to be rooted if one edge of the outer fa e, alled the root-edge, is marked and oriented su h that the outer fa e lays on itsright. The origin of the root-edge is alled root-vertex. Verti es and edges are saidto be outer or inner depending on whether they are in ident to the outer fa e ornot.A planar map is 3- onne ted if it has at least 4 edges and an not be dis onne tedby the removal of two verti es. The (cid:28)rst 3- onne ted planar map is the tetrahedron,ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees · P ′ n (respe tively P ′ ij ) the set of rooted 3- onne tedplanar maps with n edges (resp. i verti es and j fa es). A 3- onne ted planar mapis outer-triangular if its outer fa e is triangular.2.2 Plane trees, and half-edgesPlane trees are planar maps with a single fa e (cid:22)the outer one. A vertex is alleda leaf if it has degree 1, and node otherwise. Edges in ident to a leaf are alledstems, and the other are alled entire edges. Observe that plane trees are unrootedtrees.Binary trees are plane trees whose nodes have degree 3. By onvention we shallrequire that a rooted binary tree has a root-edge that is a stem. The root-edge ofa rooted binary tree thus onne ts a node, alled the root-node, to a leaf, alledthe root-leaf. With this de(cid:28)nition of rooted binary tree, upon drawing the tree in atop down manner starting with the root-leaf, every node (in luding the root-node)has a father, a left son and a right son. This (very minor) variation on the usualde(cid:28)nition of rooted binary trees will be onvenient later on. For n ≥ , we denoterespe tively by B n and B ′ n the sets of binary and rooted binary trees with n nodes(they have n + 2 leaves, as proved by indu tion on n ). These rooted trees are wellknown to be ounted by the Catalan numbers: |B ′ n | = n +1 (cid:0) nn (cid:1) .The verti es of a binary tree an be greedily bi olored (cid:22)say in bla k or white(cid:22)so that adja ent verti es have distin t olors. The bi oloration is unique up to the hoi e of the olor of the (cid:28)rst node. As a onsequen e, rooted bi olored binarytrees are either bla k-rooted or white-rooted, depending on the olor of the rootnode. The sets of bla k-rooted (resp. white-rooted) binary trees with i bla k nodesand j white nodes is denoted by B • ij (resp. by B ◦ ij ); and the total set of rootedbi olored binary trees with i bla k nodes and j white nodes is denoted by B ′ ij .It will be onvenient to view ea h entire edge of a tree as a pair of opposite half-edges (cid:22)ea h one in ident to one extremity of the edge(cid:22) and to view ea h stem asa single half-edge (cid:22)in ident to the node holding the stem. More generally we shallACM Journal Name, Vol. V, No. N, Month 20YY. · Éri Fusy et al. onsider maps that have entire edges (made of two half-edges) and stems (made ofonly one half-edge). It is then also natural to asso iate one fa e to ea h half-edge,say, the fa e on its right. In the ase of trees, there is only the outer fa e, so thatall half-edges get the same asso iated fa e.2.3 Quadrangulations and disse tionsA quadrangulation is a planar map whose fa es (in luding the outer one) havedegree 4. A disse tion of the hexagon by quadrangular fa es is a planar map whoseouter fa e has degree 6 and inner fa es have degree 4.Cy les that do not delimit a fa e are said to be separating. A quadrangulation ora disse tion of the hexagon by quadrangular fa es is said to be irredu ible if it has atleast 4 fa es and has no separating 4- y le. The (cid:28)rst irredu ible quadrangulationis the ube, whi h has 6 fa es. We denote by Q ′ n the set of rooted irredu iblequadrangulations with n fa es, in luding the outer one. Euler's relation ensuresthat these quadrangulations have n + 2 verti es. We denote by D n ( D ′ n ) the set of(rooted, respe tively) irredu ible disse tions of the hexagon with n inner verti es.These have n + 2 quadrangular fa es, a ording to Euler's relation. From nowon, irredu ible disse tions of the hexagon by quadrangular fa es will simply be alled irredu ible disse tions. The lasses of rooted irredu ible quadrangulationsand of rooted irredu ible disse tions are respe tively denoted by Q ′ = ∪ n Q ′ n and D ′ = ∪ n D ′ n .As fa es of disse tions and quadrangulations have even degree, the verti es ofthese maps an be greedily bi olored, say, in bla k and white, so that ea h edge onne ts a bla k vertex to a white one. Su h a bi oloration is unique up to the hoi e of the olors. We denote by Q ′ ij the set of rooted bi olored irredu iblequadrangulations with i bla k verti es and j white verti es and su h that the root-vertex is bla k; and by D ′ ij the set of rooted bi olored irredu ible disse tions with i bla k inner verti es and j white inner verti es and su h that the root-vertex isbla k.A bi olored irredu ible disse tion is omplete if the three outer white verti es ofthe hexagon have degree exa tly 2. Hen e, these three verti es are in ident to twoadja ent edges on the hexagon.3. CORRESPONDENCES BETWEEN FAMILIES OF PLANAR MAPSThis se tion re alls a folklore bije tion between irredu ible quadrangulations and3- onne ted maps, hereafter alled angular mapping, see [Mullin and S hellenberg1968℄, and its adaptation to outer-triangular 3- onne ted maps.3.1 3- onne ted maps and irredu ible quadrangulationsLet us (cid:28)rst re all how the angular mapping works. Given a rooted quadrangulation Q ∈ Q ′ n endowed with its vertex bi oloration, let M be the rooted map obtainedby linking, for ea h fa e f of Q (even the outer fa e), the two diagonally opposedbla k verti es of f ; the root of M is hosen to be the edge orresponding to theouter fa e of Q , oriented so that M and Q have same root-vertex, see Figure 2. Themap M is often alled the primal map of Q . A similar onstru tion using whiteverti es instead of bla k ones would give its dual map (i.e., the map with a vertexACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees · M and edge-set orresponding to the adja en ies between verti esand fa es of M ).The onstru tion of the primal map is easily invertible. Given any rooted map M , the inverse onstru tion onsists in adding a vertex alled a fa e-vertex in ea hfa e (even the outer one) of M and linking a vertex v and a fa e-vertex v f by anedge if v is in ident to the fa e f orresponding to v f . Keeping only these fa e-vertex in iden e edges yields a quadrangulation. The root is hosen as the edgethat follows the root of M in ounter- lo kwise order around its origin.The following theorem is a lassi al result in the theory of maps.Theorem 3.1 (Angular mapping). The angular mapping is a bije tion be-tween P ′ n and Q ′ n and more pre isely a bije tion between P ′ ij and Q ′ ij .3.2 Outer-triangular 3- onne ted maps and bi olored omplete irredu ible disse tionsThe same prin iple yields a bije tion, also alled angular mapping, between outer-triangular 3- onne ted maps and bi olored omplete irredu ible disse tions, whi hwill prove very useful in Se tions 7 and 8. This mapping is very similar to theangular mapping: given a omplete disse tion D , asso iate to D the map M ob-tained by linking the two bla k verti es of ea h inner fa e of D by a new edge, seeFigure 3. The map M is alled the primal map of D .Theorem 3.2 (Angular mapping with border). The angular mapping, for-mulated for omplete disse tions, is a bije tion between bi olored omplete irre-du ible disse tions with i bla k verti es and j white verti es and outer-triangular3- onne ted maps with i verti es and j − inner fa es.Proof. The proof follows similar lines as that of Theorem 3.1, see [Mullin andS hellenberg 1968℄.3.3 Derived mapsIn its version for omplete disse tions, the angular mapping an also be formulatedusing the on ept of derived map, whi h will be very useful throughout this arti le(in parti ular when dealing with orientations).Let M be an outer-triangular 3- onne ted map, and let M ∗ be the map obtainedfrom the dual of M by removing the dual vertex orresponding to the outer fa e of M . Then the derived map M ′ of M is the superimposition of M and M ∗ , whereACM Journal Name, Vol. V, No. N, Month 20YY. · Éri Fusy et al.(a) A disse tion, (b) bla k diagonals, ( ) the 3- onne ted map, (d) the derived map.Fig. 3. The angular mapping with border: from a bi olored omplete irredu ible disse tion (a) toan outer-triangular 3- onne ted map ( ). The ommon derived map is shown in (d).ea h outer vertex re eives an additional half-edge dire ted toward the outer fa e.For example, Figure 3(d) shows the derived map of the map given in Figure 3( ).The map M is alled the primal map of M ′ and the map M ∗ is alled the dual mapof M ′ . Observe that the superimposition of M and M ∗ reates a vertex of degree 4for ea h edge e of M , due to the interse tion of e with its dual edge. These verti esof M ′ are alled edge-verti es. An edge of M ′ either orresponds to an half-edge of M when it onne ts an edge-vertex and a primal vertex, or to an half-edge of M ∗ when it onne ts an edge-vertex and a dual vertex.Similarly, one de(cid:28)nes derived maps of omplete irredu ible disse tions. Given abi olored omplete irredu ible disse tion D , the derived map M ′ of D is onstru tedas follows; for ea h inner fa e f of D , link the two bla k verti es in ident to f bya primal edge, and the two white ones by a dual edge. These two edges, whi hare the two diagonals of f , interse t at a new vertex alled an edge-vertex. Thederived map is then obtained by keeping the primal and dual edges and all verti esex ept the three outer white ones and their in ident edges. Finally, for the sakeof regularity, ea h of the six outer verti es of M ′ re eives an additional half-edgedire ted toward the outer fa e. For example, the derived map of the disse tion ofFigure 3(a) is shown in Figure 3(d). Bla k verti es are alled primal verti es andwhite verti es are alled dual verti es of the derived map M ′ . The submap M ( M ∗ )of M ′ onsisting of the primal verti es and primal edges (resp. the dual verti esand dual edges) is alled the primal map (resp. the dual map) of the derived map.Clearly, M has a triangular outer fa e; and, by onstru tion, a bi olored ompleteirredu ible disse tion and its primal map have the same derived map.4. BIJECTION BETWEEN BINARY TREES AND IRREDUCIBLE DISSECTIONS4.1 Closure mapping: from trees to disse tionsLo al and partial losure. Given a map with entire edges and stems (for instan ea tree), we de(cid:28)ne a lo al losure operation, whi h is based on a ounter- lo kwisewalk around the map: this walk alongside the boundary of the outer map visitsa su ession of stems and entire edges, or more pre isely, a sequen e of half-edgeshaving the outer fa e on their right-hand side. When a stem is immediately followedin this walk by three entire edges, its lo al losure onsists in the reation of anopposite half-edge for this stem, whi h is atta hed to farthest endpoint of the thirdentire edge: this amounts to ompleting the stem into an entire edge, so as to reate(cid:22)or lose(cid:22) a quadrangular fa e. This operation is illustrated in Figure 4(b).ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees · (cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:0)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1) (a) Generi ase when r = 2 and s = 2 . (b) Case of the binary tree of Figure 4(a).Fig. 5. The omplete losure.Given a binary tree T , the lo al losure an be performed greedily until no morelo al losure is possible. Ea h lo al losure reates a new entire edge, maybe makinga new lo al losure possible. It is easy to see that the (cid:28)nal map, alled the partial losure of T , does not depend on the order of the lo al losures. Indeed, a y li parenthesis word is asso iated to the ounter- lo kwise boundary of the tree, withan opening parenthesis of weight 3 for a stem and a losing parenthesis for a side ofentire edge; then the future lo al losures orrespond to mat hings of the parenthesisword. An example of partial losure is shown in Figure 4( ).Complete losure. Let us now omplete the partial losure operation to obtain adisse tion of the hexagon with quadrangular fa es. An outer entire half-edge is anhalf-edge belonging to an entire edge and in ident to the outer fa e. Observe thata binary tree T with n nodes has n + 2 stems and n − outer entire half-edges.Ea h lo al losure de reases by 1 the number of stems and by 2 the number ofouter entire half-edges. Hen e, if k denotes the number of (unmat hed) stems inthe partial losure of T , there are k − outer entire half-edges. Moreover, stemsdelimit intervals of inner half-edges on the ontour of the outer fa e; these intervalshave length at most 2, otherwise a lo al losure would be possible. Let r be thenumber of su h intervals of length 1 and s be the number of su h intervals of length 0(that is, the number of nodes in ident to two unmat hed stems). Then r and s are learly related by the relation r + 2 s = 6 .The omplete losure onsists in ompleting all unmat hed stems with half-edgesACM Journal Name, Vol. V, No. N, Month 20YY.0 · Éri Fusy et al.(a) A tri-oriented binary tree, (b) and its tri-oriented losure.Fig. 6. Examples of tri-orientations.in ident to verti es of the hexagon in the unique way (up to rotation of the hexagon)that reates only quadrangular bounded fa es. Figure 5(a) illustrates the omplete losure for the ase ( r = 2 , s = 2) , and a parti ular example is given in Figure 5(b).Lemma 4.1. The losure of a binary tree is an irredu ible disse tion of thehexagon.Proof. Assume that there exists a separating 4- y le C in the losure of T . Let m ≥ be the number of verti es in the interior of C . Then there are m edges inthe interior of C a ording to Euler's relation. Let v be a vertex of T that belongs tothe interior of C after the losure. Consider the orientation of edges of T away from v (only for the sake of this proof). Then nodes of T have outdegree 2, ex ept v ,whi h has outdegree 3. This orientation naturally indu es an orientation of edges ofthe losure-disse tion with the same property (ex ept that verti es of the hexagonhave outdegree 0). Hen e there are at least m + 1 edges in the interior of C , a ontradi tion.4.2 Tri-orientations and openingTri-orientations. In order to de(cid:28)ne the mapping inverse to the losure, we need abetter des ription of the stru ture indu ed on the losure map by the original tree.Let us onsider orientations of the half-edges of a map (in ontrast to the usualnotion of orientation, where edges are oriented). An half-edge is said to be inwardif it is oriented toward its origin and outward if it is oriented out of its origin. Ifa map is endowed with an orientation of its half-edges, the outdegree of a vertex v is naturally de(cid:28)ned as the number of its in ident half-edges oriented outward.The (unique) tri-orientation of a binary tree is de(cid:28)ned as the orientation of itshalf-edges su h that any node has outdegree 3, see Figure 6(a) for an example. Atri-orientation of a disse tion is an orientation of its inner half-edges (i.e., half-edges belonging to inner edges) su h that outer and inner verti es have respe tivelyoutdegree 0 and 3, and su h that two half-edges of a same inner edge an not bothbe oriented inward, see Figure 6(b). An edge is said to be simply oriented if its twohalf-edges have same dire tion (that is, one is oriented inward and the other oneoutward), and bi-oriented if they are both oriented outward.Let D be an irredu ible disse tion endowed with a tri-orientation. A lo kwiseACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· D is a simple y le C onsisting of edges that are either bi-oriented orsimply oriented with the interior of C on their right.Lemma 4.2. Let D be an irredu ible disse tion with n inner verti es. Then atri-orientation of D has n − bi-oriented edges and n + 2 simply oriented edges.If a tri-orientation of a disse tion has no lo kwise ir uit, then its bi-orientededges form a tree spanning the inner verti es of the disse tion.Proof. Let s and r denote the numbers of simply and bi-oriented edges of D .A ording to Euler's relation (using the degrees of the fa es), D has n + 1 inneredges, i.e., n + 1 = r + s . Moreover, as all inner verti es have outdegree 3, n = 2 r + s . Hen e r = n − and s = n + 2 .If the tri-orientation has no lo kwise ir uit, the subgraph H indu ed by the bi-oriented edges has r = n − edges, no y le (otherwise the y le ould be traversed lo kwise, as all its edges are bi-oriented), and is in ident to at most n verti es,whi h are the inner verti es of D . A ording to a lassi al result of graph theory, H is a tree spanning the n inner verti es of D .Closure-tri-orientation of a disse tion. Let D be a disse tion obtained as the losureof a binary tree T . The tri-orientation of T learly indu es via the losure a tri-orientation of D , alled losure-tri-orientation. On this tri-orientation, bi-orientededges orrespond to inner edges of the original binary tree, see Figure 6(b).Lemma 4.3. A losure-tri-orientation has no lo kwise ir uit.Proof. Sin e verti es of the hexagon have outdegree 0, they an not belong toany ir uit. Hen e lo kwise ir uits may only be reated during a lo al losure.However losure edges are simply oriented with the outer fa e on their right, hen emay only reate ounter lo kwise ir uits.This property is indeed quite strong: the following theorem ensures that theproperty of having no lo kwise ir uit hara terizes the losure-tri-orientation andthat a tri-orientation without lo kwise ir uit exists for any irredu ible disse tion.The proof of this theorem is delayed to Se tion 8.Theorem 4.4. Any irredu ible disse tion has a unique tri-orientation without lo kwise ir uit.Re overing the tree: the opening mapping. Lemma 4.2 and the present se tion giveall ne essary elements to des ribe the inverse mapping of the losure, whi h is alled the opening: let D be an irredu ible disse tion endowed with its (unique byTheorem 4.4) tri-orientation without lo kwise ir uit. The opening of D is thebinary tree obtained from D by deleting outer verti es, outer edges, and all inwardhalf-edges.4.3 The losure is a bije tionIn this se tion, we show that the opening is inverse to the losure. By onstru tionof the opening, the following lemma is straightforward:Lemma 4.5. Let D be an irredu ible disse tion obtained as the losure of a binarytree T . Then the opening of D is T . ACM Journal Name, Vol. V, No. N, Month 20YY.2 · Éri Fusy et al.Conversely, the following also holds:Lemma 4.6. Let T be a binary tree obtained as the opening of an irredu ibledisse tion D . Then the losure of T is D .Proof. The proof relies on the de(cid:28)nition of an order for removing inward half-edges. Start with the half-edges in ident to outer verti es (that are all orientedinward): this learly inverses the ompletion step of the losure. Ea h furtherremoval must orrespond to a lo al losure, that is, the removed half-edge musthave the outer fa e on its right.Let M k be the submap of the disse tion indu ed by remaining half-edges after k removals. Then M k overs the n inner verti es, and, as long as some inwardhalf-edge remains, it has at least n entire edges (see Lemma 4.2). Hen e, there isat least one y le, and a simple one C an be extra ted from the boundary of theouter fa e of M k . Sin e there is no lo kwise ir uit, at least one edge of C is simplyoriented with the interior of C on its left; the orresponding inward half-edge anbe sele ted for the next removal.Assuming Theorem 4.4, the bije tive result follows from Lemmas 4.5 and 4.6:Theorem 4.7. For ea h n ≥ , the losure mapping is a bije tion between theset B n of binary trees with n nodes and the set D n of irredu ible disse tions with n inner verti es.For ea h integer pair ( i, j ) with i + j ≥ , the losure mapping is a bije tionbetween the set B ij of bi olored binary trees with i bla k nodes and j white nodes,and the set D ij of bi olored irredu ible disse tions with i bla k inner verti es and j white inner verti es.The inverse mapping of the losure is the opening.We an state three analogous versions of Theorem 4.7 for rooted obje ts:Theorem 4.8. The losure mapping indu es the following orresponden es be-tween sets of rooted obje ts: B ′ n × { , . . . , } ≡ D ′ n × { , . . . , n + 2 } , B ′ ij × { , , } ≡ D ′ ij × { , . . . , i + j + 2 } , B • ij × { , , } ≡ D ′ ij × { , . . . , i − j + 1 } . Proof. We de(cid:28)ne a bi-rooted irredu ible disse tion as a rooted irredu ible disse -tion endowed with its tri-orientation without lo kwise ir uit and where a simplyoriented edge is marked. We write D ′′ n for the set of bi-rooted irredu ible disse -tions with n inner verti es. Opening and rerooting on the stem orresponding tothe marked edge de(cid:28)nes a surje tion from D ′′ n onto B ′ n , for whi h ea h element of B ′ n has learly six preimages, sin e the disse tion ould have been rooted at any edgeof the hexagon. Moreover, erasing the mark learly de(cid:28)nes a surje tion from D ′′ n to D ′ n , for whi h ea h element of D ′ n has n + 2 preimages a ording to Lemma 4.2.Hen e, the losure de(cid:28)nes a ( n + 2) -to-6 mapping between B ′ n and D ′ n . The proofof the ( i + j + 2) -to-3 orresponden e between B ′ ij and D ′ ij is the same.The (2 i − j + 1) -to-3 orresponden e between B • ij and D ′ ij indu ed by the losure an be proved similarly, with the di(cid:27)eren e that the marked simply oriented edgeACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· D ′ ij endowed with its tri-orientation without lo kwise ir uit has (2 i − j + 1) simply oriented edges whose origin is a bla k vertex.Let us mention that the ( i + j + 2) -to-3 orresponden e between B ′ ij and D ′ ij is akey ingredient to the planar graph generators presented in [Fusy 2005℄.The oe(cid:30) ient |B ′ n | is well-known to be the n -th Catalan number n +1 (cid:0) nn (cid:1) , andre(cid:28)nements of the standard proofs yield |B • ij | = j +1 (cid:0) j +1 i (cid:1)(cid:0) ij (cid:1) , as detailed belowin Se tion 4.5. Theorem 4.8 thus implies the following enumerative results:Corollary 4.9. The oe(cid:30) ients ounting rooted irredu ible disse tions have thefollowing expressions, |D ′ n | = 6 n + 2 |B ′ n | = 6( n + 2)( n + 1) (cid:18) nn (cid:19) , (2) |D ′ ij | = 32 i − j + 1 |B • ij | = 3(2 i + 1)(2 j + 1) (cid:18) j + 1 i (cid:19)(cid:18) i + 1 j (cid:19) . (3)These enumerative results have already been obtained by Mullin and S hellenberg[1968℄ using algebrai methods. Our method provides a dire t bije tive proof.Noti e that the ardinality of D ′ n is S ( n, where S ( n, m ) = (2 n )!(2 m )! n ! m !( n + m )! is the n -th super-Catalan number of order m . (These numbers are dis ussed by Gessel[1992℄.) Our bije tion gives an interpretation of these numbers for m = 2 .4.4 Spe ialization to triangulationsA ni e feature of the losure mapping is that it spe ializes to a bije tion betweenplane triangulations and a simple subfamily of binary trees. In this way, we get the(cid:28)rst bije tive proof for the formula giving the number of unrooted plane triangu-lations with n verti es, found by Brown [1964℄, and re over the ounting formulafor rooted triangulations, already obtained by Tutte [1962℄ and by Poulalhon andS hae(cid:27)er [2006℄ using a di(cid:27)erent bije tion.Theorem 4.10. The losure mapping is a bije tion between the set T n of (un-rooted) plane triangulations with n inner verti es and the set S n of bi olored binarytrees with n bla k nodes and no stem (i.e., leaf ) in ident to a bla k node.The losure mapping indu es the following orresponden e between the set T ′ n ofrooted triangulations with n inner verti es and the set S ′ n of trees in S n rooted at astem: S ′ n × { , , } ≡ T ′ n × { , . . . , n + 3 } . Proof. Plane triangulations are exa tly 3- onne ted planar maps where all fa eshave degree 3. Hen e, the angular mapping with border (Theorem 3.2) indu es abije tion between T n and the set of omplete bi olored irredu ible disse tions with n inner bla k verti es and all inner white verti es of degree 3. In a tri-orientation,the indegree of ea h inner white vertex v is deg( v ) − and the indegree of ea houter white vertex v is deg( v ) − , hen e the disse tions onsidered here have noingoing half-edge in ident to a white vertex. Hen e the opening of the disse tion(by removing ingoing half-edges) is a binary tree with no stem in ident to a bla kACM Journal Name, Vol. V, No. N, Month 20YY.4 · Éri Fusy et al.(a) (b)( ) (d)Fig. 7. The bije tion between triangulations and bi olored binary trees with no leaf in ident to abla k node.node. Conversely, starting from su h a binary tree, the half-edges reated duringthe losure mapping are opposite to a stem. As all stems are in ident to whiteverti es, the half-edges reated are in ident to bla k verti es. Hen e the degree ofea h white vertex does not in rease during the losure mapping, i.e., remains equalto 3 for inner white verti es and equal to 2 for outer white verti es. This on ludesthe proof of the bije tion S n ≡ T n .The bije tion S ′ n × { , , } ≡ T ′ n × { , . . . , n + 3 } follows easily (see the proofof Theorem 4.8), using the fa t that a tree of S n has n + 3 leaves.This bije tion, illustrated in Figure 7, makes it possible to ount plane unrootedand rooted triangulations, as the subfamily of binary trees involved is easily enu-merated.Corollary 4.11. For n ≥ , the number of rooted triangulations with n innerACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· |T ′ n | = 2 (4 n + 1)!( n + 1)!(3 n + 2)! . The number of unrooted plane triangulations with n inner verti es is |T n | = 23 (4 n + 1)!( n + 1)!(3 n + 2)! if n ≡ , |T n | = 23 (4 n + 1)!( n + 1)!(3 n + 2)! + 43 (4 k + 1)! k !(3 k + 2)! if n ≡ n = 3 k + 1] , |T n | = 23 (4 n + 1)!( n + 1)!(3 n + 2)! + 23 (4 k )! k !(3 k + 1)! if n ≡ n = 3 k ] . Proof. Let S ′ = ∪ n S ′ n be the lass of rooted binary trees with no leaf in identto a bla k node and let R ′ = ∪ n R ′ n be the lass of rooted binary trees wherethe root leaf is in ident to a bla k node and all other leaves are in ident to whitenodes. Let S ( x ) and R ( x ) be the generating fun tions of S ′ and R ′ with respe tto the number of bla k nodes. Clearly the two subtrees pending from the (white)root node of a tree of S ′ are either empty or in R ′ . Hen e S ( x ) = (1 + R ( x )) .Similarly, a tree in R ′ de omposes at the root node into two trees in S ′ , so that R ( x ) = xS ( x ) . Hen e, R ( x ) = x (1 + R ( x )) is equal to the generating fun tionof quaternary trees, and S ( x ) = (1 + R ( x )) is equal to the generating fun tionof pairs of quaternary trees (the empty tree being allowed). Using a Luka iewi zen oding and the y li lemma, the number of pairs of quaternary trees with atotal of n nodes is easily shown to be n +2 (4 n +2)! n !(3 n +2)! . This expression of |S ′ n | andthe (3 n + 3) -to-3 orresponden e between S ′ n and T ′ n yield the expression of |T ′ n | .Let us now prove the formula for |T n | = |S n | . Clearly, the only possible symmetryfor a bi olored binary tree is a rotation of order 3. Let S sym n be the set of trees of S n with a rotation symmetry and let S asy n be the set of trees of S n with no symmetry.Let S ′ asy n and S ′ sym n be the sets of trees of S asy n and S sym n that are rooted at a leaf.It is easily shown that a tree of S n has n + 3 leaves. Clearly the tree gives riseto n + 3 rooted trees if it is asymmetri and gives rise to n + 1 rooted trees if itis symmetri . Hen e |S asy n | = |S ′ asy n | / (3 n + 3) and |S sym n | = |S ′ sym n | / ( n + 1) . Using |S n | = |S asy n | + |S sym n | and |S ′ n | = |S ′ asy n | + |S ′ sym n | , we obtain |S n | = 13 n + 3 |S ′ n | + 23 |S sym n | . The entre of rotation of a tree in S sym n is either a bla k node, in whi h ase n = 3 k + 1 for some integer k ≥ , or is a white node, in whi h ase n = 3 k forsome integer k ≥ . In the (cid:28)rst ase, a tree τ ∈ S sym n is obtained by atta hing toa bla k node 3 opies of a tree in S ′ k . Hen e |S sym3 k +1 | = |S ′ k | = 2 (4 k +1)! k !(3 k +2)! . In these ond ase, a tree τ ∈ S sym n is obtained by atta hing to a white node 3 opies of atree in R ′ k . Hen e |S sym3 k | = |R ′ k | = (4 k )! k !(3 k +1)! . The result follows.4.5 Counting, oding and sampling rooted bi olored binary treesACM Journal Name, Vol. V, No. N, Month 20YY.6 · Éri Fusy et al. δ = 1 δ = 1 δ = − δ = − δ = 3 (a) A •◦ , (b) A • , ( ) A ◦ .Fig. 8. The three alphabets for words asso iated to bi olored binary trees. ΦΨ w •◦ = w • = w ◦ = Fig. 9. A bi olored rooted binary tree, and the orresponding words w •◦ , w • , and w ◦ .4.5.1 From a bi olored tree to a pair of words. There exist general methods toen ode a family of trees spe i(cid:28)ed by several parameters. This se tion makes su hmethods expli it for the family of bi olored binary trees. Let T be a bla k-rootedbi olored binary tree with i bla k nodes and j white nodes. Doing a depth-(cid:28)rsttraversal of T from left to right, we obtain a word w •◦ of length (2 j + 1) on thealphabet A •◦ represented in Figure 8(a), see Figure 9 for an example, the mappingbeing denoted by Ψ . Classi ally, the sum of the weights of the letters of any stri tpre(cid:28)x of w •◦ is nonnegative and the sum of the weights of the letters of w •◦ is equalto -1. In addition, w •◦ is the unique word in its y li equivalen e- lass that hasthese two properties.The se ond step is to map w •◦ to a pair ( w • , w ◦ ) := Φ( w •◦ ) of words su h that:(cid:22) w • is a word of length (2 j + 1) on the alphabet A • shown in Figure 8(b) with i bla k-node-letters.(cid:22) w ◦ is a word of length i on the alphabet A ◦ shown in Figure 8( ) with j white-node-letters.Figure 9 illustrates the mapping Φ on an example.4.5.2 Inverse mapping: from a pair of words to a tree. Conversely, let ( w • , w ◦ ) bea pair of words su h that w • is of length (2 j + 1) on A • and has i bla k-node-letters, and w ◦ is of length i on A ◦ and has j white-node-letters. First, to the pair ( w • , w ◦ ) we asso iate a word e w •◦ of length (2 j + 1) on A •◦ by doing the inverse ofthe mapping Φ shown in the right part of Figure 9. The word e w •◦ has the propertythat the sum of the weights of its letters is equal to -1. There is a unique word w •◦ in the y li equivalen e- lass of e w •◦ su h that the sum of the weights of theletters of any stri t pre(cid:28)x is nonnegative. We asso iate to w •◦ the binary tree ofACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· B • ij obtained by doing the inverse of the mapping Ψ shown in Figure 9.This method allows us to sample uniformly obje ts of B • ij in linear time andensures that |B • ij | = 12 j + 1 (cid:18) j + 1 i (cid:19)(cid:18) ij (cid:19) . (4)5. APPLICATION: COUNTING ROOTED 3-CONNECTED MAPS5.1 Generating fun tions of rooted disse tionsEven if the ounting formulas obtained in Corollary 4.9 are simple, it proves use-ful to have an expression of the orresponding generating fun tions. Indeed, thede omposition-method we develop is suitably handled by generating fun tions.Let r ( x • , x ◦ ) := P |B • ij | x i • x j ◦ and r ( x • , x ◦ ) := P |B ◦ ij | x i • x j ◦ be the series ofbla k-rooted and white-rooted bi olored binary trees. By de omposition at theroot, r ( x • , x ◦ ) and r ( x • , x ◦ ) are the solutions of the system: (cid:26) r ( x • , x ◦ ) = x • (1 + r ( x • , x ◦ )) ,r ( x • , x ◦ ) = x ◦ (1 + r ( x • , x ◦ )) . (5)De(cid:28)ne an edge-marked bi olored binary tree as a bi olored binary tree with amarked inner edge. Let ¯ B ij be the set of edge-marked bi olored binary trees with i bla k nodes and j white nodes. Cutting the marked edge of su h a tree yieldsa pair made of a bla k-rooted and a white-rooted binary tree. As a onsequen e,the generating fun tion ounting edge-marked bi olored binary trees is r · r , i.e., r · r = P ij | ¯ B ij | x i • x j ◦ .Let us onsider bi-rooted obje ts as in the proof of Theorem 4.8; sin e any obje tof B ij has (2 i − j + 1) white leaves ( onne ted to a bla k node) and (2 j − i + 1) bla k leaves ( onne ted to a white node), |B ◦ ij | = 2 j − i + 12 i − j + 1 |B • ij | . Similarly, ounting in two ways the obje ts of B • ij having a marked edge yields | ¯ B ij | = i + j − i − j + 1 |B • ij | . Thus, we have |B • ij | + |B ◦ ij | − | ¯ B ij | = i − j +1 |B • ij | = |D ′ ij | (using (3)), so that X i,j |D ′ ij | x i • x j ◦ = r ( x • , x ◦ ) + r ( x • , x ◦ ) − r ( x • , x ◦ ) r ( x • , x ◦ ) . (6)Substituting x • and x ◦ by x , we obtain: X n |D ′ n | x n = 2 r ( x ) − r ( x ) , (7)where r ( x ) = x (1 + r ( x )) is the generating fun tion of binary trees a ording tothe number of inner nodes. ACM Journal Name, Vol. V, No. N, Month 20YY.8 · Éri Fusy et al.5.2 Generating fun tion of rooted 3- onne ted mapsInje tion from Q ′ to D ′ . Let us onsider the mapping ι de(cid:28)ned on rooted quad-rangulations by the removal of the root-edge and rerooting on the next edge in ounter lo kwise order around the root-vertex; ι is learly inje tive, and for anyquadrangulation Q , ι ( Q ) has only quadrangular fa es but the outer one, whi h ishexagonal. In addition, ι ( Q ) an not have more separating 4- y les than Q . Hen ethe restri tion of ι to Q ′ is an inje tion from Q ′ to D ′ , more pre isely from Q ′ n to D ′ n − and from Q ′ ij to D ′ i − ,j − .It is however not a bije tion, sin e the inverse edge-adding operation π , per-formed on an irredu ible disse tion, an reate a separating 4- y le on the obtainedquadrangulation. Pre isely, given D a rooted irredu ible disse tion (cid:22)with s theroot-vertex and t the vertex of the hexagon opposite to s (cid:22) a path of length 3 be-tween s and t is alled a de omposition path. The two paths of edges of the hexagon onne ting s to t are alled outer de omposition paths, and the other ones, if any,are alled inner de omposition paths of D .Observe that inner de omposition paths of D are in one-to-one orresponden ewith separating 4- y les of the quadrangulation π ( D ) (i.e., the quadrangulationobtained from D by adding a root-edge between s and t oriented out of s ).A rooted irredu ible disse tion without inner de omposition path is said to beunde omposable. The orresponding lass is denoted by U ′ . The dis ussion onde omposition paths yields the following result.Lemma 5.1. Denote by U ′ n the set of rooted unde omposable disse tions with n inner verti es and by U ′ ij the set of rooted unde omposable disse tions with i innerbla k verti es and j inner white verti es. Then U ′ n − is in bije tion with P ′ n and U ′ i − ,j − is in bije tion with P ′ ij .Proof. A rooted irredu ible quadrangulation is mapped by ι to a rooted dis-se tion su h that the inverse edge-adding operation π does not reate a separating4- y le, i.e., an unde omposable disse tion. Moreover, Euler's relation ensures thatthe image of a quadrangulation with n fa es has n − inner verti es. By inje tivity, ι is bije tive to its image, i.e., ι is a bije tion between Q ′ n and U ′ n − ; and a bije tionbetween Q ′ ij and U ′ i − ,j − . The result follows, as Q ′ n and Q ′ ij are respe tively inbije tion with P ′ n and P ′ ij via the angular mapping (Theorem 3.1).Thanks to Lemma 5.1, enumerating rooted 3- onne ted maps redu es to enumer-ating rooted unde omposable disse tions.De omposition of rooted irredu ible disse tions. Sin e irredu ible disse tions do nothave multiple edges nor y les of odd length, de omposition paths satisfy the fol-lowing properties:Lemma 5.2. Let D be a rooted irredu ible disse tion, and let P and P be twodi(cid:27)erent de omposition paths of D . Then:(cid:22) either P ∩ P = { s, t } , in whi h ase P and P are said to be internallydisjoint;(cid:22) or there exists one inner vertex v su h that P ∩ P = { s } ∪ { t } ∪ { v } , inwhi h ase P and P are said to be upper or lower joint whether v is adja ent to s or t .ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· ts = ⇒ w = tsUsts, where U = Fig. 10. Example of de omposition of a rooted irredu ible disse tion and of its asso iated de om-position word.Lemma 5.2 implies in parti ular that two de omposition paths an not ross ea hother. Hen e the de omposition paths of an irredu ible disse tion D follow a left-to-right order, from the outer de omposition path ontaining the root (cid:22) alled leftouter path(cid:22) to the other outer de omposition path (cid:22) alled right outer path.Lemma 5.3. Let D be a rooted irredu ible disse tion, and let P and P be twoupper joint (resp. lower joint) de omposition paths of D . Then the interior of thearea delimited by P and P onsists of a unique fa e in ident to t (resp. to s ).Proof. Follows from the fa t that the interior of ea h 4- y le of D is a fa e.De omposition word of an irredu ible disse tion. Let D ∈ D ′ and let {P , . . . , P ℓ } be the sequen e of de omposition paths of D ordered from left to right. Let us onsider the alphabet A = { s } ∪ { t } ∪ U ′ ; the de omposition word of D is the word w = w . . . w ℓ of length ℓ on A su h that, for any ≤ i ≤ ℓ : if P i − and P i areupper joint, then w i = s ; if P i − and P i are lower joint, then w i = t ; if P i − and P i are internally disjoint, then w i = U , where U is the unde omposable disse tiondelimited by P i − and P i , rooted at the (cid:28)rst edge of P i − and with s as root-vertex,see Figure 10. This en oding is inje tive, an easy onsequen e of Lemma 5.3.Chara terization of de omposition words of elements of D ′ . The fa t that D has noseparating 4- y le easily implies that its de omposition word has no fa tor ss nor tt , and these are the only forbidden fa tors. Moreover, as a disse tion has at leastone inner vertex, a de omposition word an neither be the empty word, nor theone-letter words s and t , nor the two-letter words st and ts . It is easily seen thatall other words en ode irredu ible disse tions of the hexagon.This leads to the following equation linking the generating fun tions D ( x ) and U ( x ) ounting D ′ and U ′ a ording to the number of inner verti es, x D ( x ) + 2 x + 2 x + 1 = (cid:18) x − x (cid:19) · − x U ( x ) (cid:16) x − x (cid:17) . (8)Similarly, let D ( x • , x ◦ ) := P |D ′ ij | x i • x j ◦ and U ( x • , x ◦ ) := P |U ′ ij | x i • x j ◦ . Then the hara terization of the oding words gives x • x ◦ D ( x • , x ◦ ) + 2 x • x ◦ + x • + x ◦ + 1= (1 + x • ) · − x ◦ x • · (1 + x ◦ ) · − x • x ◦ U ( x • , x ◦ )(1 + x • ) − x ◦ x • (1 + x ◦ ) . (9)ACM Journal Name, Vol. V, No. N, Month 20YY.0 · Éri Fusy et al.Theorem 5.4. Let P ′ n be the number of rooted 3- onne ted maps with n edgesand P ′ ij the number of rooted 3- onne ted maps with i verti es and j fa es. Then X n |P ′ n +2 | x n = 1 − x x −
11 + 2 x + 2 x + x (2 r ( x ) − r ( x ) ) , where r ( x ) = x (1 + r ( x )) , and X i,j |P ′ i +2 ,j +2 | x i • x j ◦ = 1 − x • x ◦ (1 + x • )(1 + x ◦ ) −
11 + x • + x ◦ + 2 x • x ◦ + x • x ◦ ( r + r − r r ) , (10)where (cid:26) r ( x • , x ◦ ) = x • (1 + r ( x • , x ◦ )) r ( x • , x ◦ ) = x ◦ (1 + r ( x • , x ◦ )) .Proof. Lemma 5.1 ensures that P n |P ′ n +2 | x n = x U ( x ) and, more pre isely, P i,j |P ′ i +2 ,j +2 | x i • x j ◦ = x • x ◦ U ( x • , x ◦ ) . Moreover, Equations (8) and Equation (9)yield expressions of x U ( x ) and x • x ◦ U ( x • , x ◦ ) respe tively in terms of D ( x ) and D ( x • , x ◦ ) . In these expressions, repla e D ( x ) and D ( x • , x ◦ ) by their respe tiveexpression in terms of r and of r and r , as given by Equations (6) and (7).6. APPLICATION: SAMPLING ROOTED 3-CONNECTED MAPS6.1 Sampling rooted 3- onne ted maps with n edgesTheorem 4.8 ((cid:28)rst identity) ensures that the following algorithm samples rooted3- onne ted maps with n edges uniformly at random:(1) Sample an obje t T ∈ B ′ n − uniformly (e.g. using parenthesis words).(2) Perform the losure of T to obtain an irredu ible disse tion D with ( n − verti es. Choose randomly one of the six edges of the hexagon of D to arrythe root. If D is not unde omposable, then reje t and restart.(3) Conne t by a new edge e the root-vertex of D to the opposite outer vertex.Take e as root edge, with the same root-vertex as in D . This gives a rootedirredu ible quadrangulation Q with n fa es.(4) Return the rooted 3- onne ted map in P ′ n asso iated to Q by the angularmapping.Proposition 6.1. The su ess probability of the sampler at ea h trial is equalto |P ′ n | / |D ′ n − | , whi h satis(cid:28)es |P ′ n ||D ′ n − | → n →∞ . Hen e, the number of reje tions follows a geometri law whose mean is asymptoti- ally c = 3 / . As the losure mapping has linear-time omplexity, the samplingalgorithm has expe ted linear-time omplexity.Proof. A ording to Se tion 4.3, |D ′ n | = n +2 |B ′ n | = n )!( n +2)! n ! . Stirling formulayields |D ′ n − | ∼ √ π n n / . Moreover, a ording to [Tutte 1963℄, |P ′ n | ∼ √ π n n / .This yields the limit of |P ′ n | / |D ′ n − | .ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ··
11 + x • + x ◦ + 2 x • x ◦ + x • x ◦ ( r + r − r r ) , (10)where (cid:26) r ( x • , x ◦ ) = x • (1 + r ( x • , x ◦ )) r ( x • , x ◦ ) = x ◦ (1 + r ( x • , x ◦ )) .Proof. Lemma 5.1 ensures that P n |P ′ n +2 | x n = x U ( x ) and, more pre isely, P i,j |P ′ i +2 ,j +2 | x i • x j ◦ = x • x ◦ U ( x • , x ◦ ) . Moreover, Equations (8) and Equation (9)yield expressions of x U ( x ) and x • x ◦ U ( x • , x ◦ ) respe tively in terms of D ( x ) and D ( x • , x ◦ ) . In these expressions, repla e D ( x ) and D ( x • , x ◦ ) by their respe tiveexpression in terms of r and of r and r , as given by Equations (6) and (7).6. APPLICATION: SAMPLING ROOTED 3-CONNECTED MAPS6.1 Sampling rooted 3- onne ted maps with n edgesTheorem 4.8 ((cid:28)rst identity) ensures that the following algorithm samples rooted3- onne ted maps with n edges uniformly at random:(1) Sample an obje t T ∈ B ′ n − uniformly (e.g. using parenthesis words).(2) Perform the losure of T to obtain an irredu ible disse tion D with ( n − verti es. Choose randomly one of the six edges of the hexagon of D to arrythe root. If D is not unde omposable, then reje t and restart.(3) Conne t by a new edge e the root-vertex of D to the opposite outer vertex.Take e as root edge, with the same root-vertex as in D . This gives a rootedirredu ible quadrangulation Q with n fa es.(4) Return the rooted 3- onne ted map in P ′ n asso iated to Q by the angularmapping.Proposition 6.1. The su ess probability of the sampler at ea h trial is equalto |P ′ n | / |D ′ n − | , whi h satis(cid:28)es |P ′ n ||D ′ n − | → n →∞ . Hen e, the number of reje tions follows a geometri law whose mean is asymptoti- ally c = 3 / . As the losure mapping has linear-time omplexity, the samplingalgorithm has expe ted linear-time omplexity.Proof. A ording to Se tion 4.3, |D ′ n | = n +2 |B ′ n | = n )!( n +2)! n ! . Stirling formulayields |D ′ n − | ∼ √ π n n / . Moreover, a ording to [Tutte 1963℄, |P ′ n | ∼ √ π n n / .This yields the limit of |P ′ n | / |D ′ n − | .ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· i verti es and j fa esSimilarly, Theorem 4.8 (third identity), ensures that the following algorithm sam-ples rooted 3- onne ted maps with i verti es and j fa es uniformly at random:(1) Sample an obje t T ∈ B • i − ,j − uniformly at random. A simple method isdes ribed in Se tion 4.5.2.(2) Perform the losure of T to obtain an irredu ible disse tion D with ( i − inner bla k verti es and ( j − inner white verti es. Choose randomly theroot-vertex among the three bla k verti es of the hexagon. If the disse tion isnot unde omposable, then reje t and restart.(3) Conne t by a new edge e the root-vertex of D to the opposite outer vertex.Take e as root edge, with the same root-vertex as in D . This gives a rootedirredu ible quadrangulation Q with i bla k verti es and j white verti es.(4) Return the rooted 3- onne ted map in P ′ ij asso iated to Q by the angularmapping.Proposition 6.2. The su ess probability of the sampler at ea h trial is equalto |P ′ ij | / |D ′ i − ,j − | . Let α ∈ ]1 / , ; if i and j are orrelated by ij → α as i → ∞ ,then |P ′ ij ||D ′ i − ,j − | ∼ (2 − α ) (2 α − α =: 1 c α . Hen e, when ij → α , the number of reje tions follows a geometri law whose mean isasymptoti ally c α . Under these onditions, the sampling algorithm has an expe tedlinear-time omplexity, the linearity fa tor being asymptoti ally proportional to c α .Moreover, in the worst ase of triangulations where j = 2 i − , the mean numberof reje tions is quadrati , so that the sampling omplexity is ubi .Proof. These asymptoti results are easy onsequen es of the expression of |D ′ ij | obtained in Corollary 4.9 and of the asymptoti result |P ′ ij | ∼ ij (cid:0) i − j +2 (cid:1)(cid:0) j − i +2 (cid:1) given in [Bender 1987℄.7. APPLICATION: CODING 3-CONNECTED MAPSThis se tion introdu es an algorithm, derived from the inverse of the losure map-ping, to en ode a 3- onne ted map. Pre isely, the algorithm en odes an outer-triangular 3- onne ted map, but it is then easily extended to en ode any 3- onne tedmap. Indeed, if the outer fa e of G is not triangular, (cid:28)x three onse utive verti es v , v ′ and v ′′ in ident to the outer fa e of G and link v and v ′′ by an edge to obtainan outer-triangular 3- onne ted planar map e G ; the oding of G is obtained as the oding of e G plus one bit indi ating if an edge-addition has been done.7.1 Des ription of the oding algorithmLet G be an outer-triangular 3- onne ted map and let G ′ be its derived map, asde(cid:28)ned in Se tion 3.2. The oding algorithm relies on the following steps, illustratedin Figure 11. ACM Journal Name, Vol. V, No. N, Month 20YY.2 · Éri Fusy et al. a a a (a) a a a (b) a a a ( ) a a a (d)(e) (f)Fig. 11. Exe ution of the en oding algorithm on an example.7.1.1 Compute a parti ular orientation of the derived map G ′ (Fig. 11(b)-( )). The(cid:28)rst step of the algorithm is to ompute a spe i(cid:28) orientation X of the edges ofthe derived map G ′ , su h that X has no lo kwise ir uit, ea h primal or dualvertex has outdegree 3 and ea h edge-vertex has outdegree 1. Su h an orientationof G ′ exists and is unique, as we will see in Theorem 8.1. A linear time algorithmto ompute X is given in Se tion 9.7.1.2 Compute the irredu ible disse tion D asso iated to G (Fig. 11(d)). Considerthe bi olored omplete irredu ible disse tion D asso iated to G by the bije tionACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ··
11 + x • + x ◦ + 2 x • x ◦ + x • x ◦ ( r + r − r r ) , (10)where (cid:26) r ( x • , x ◦ ) = x • (1 + r ( x • , x ◦ )) r ( x • , x ◦ ) = x ◦ (1 + r ( x • , x ◦ )) .Proof. Lemma 5.1 ensures that P n |P ′ n +2 | x n = x U ( x ) and, more pre isely, P i,j |P ′ i +2 ,j +2 | x i • x j ◦ = x • x ◦ U ( x • , x ◦ ) . Moreover, Equations (8) and Equation (9)yield expressions of x U ( x ) and x • x ◦ U ( x • , x ◦ ) respe tively in terms of D ( x ) and D ( x • , x ◦ ) . In these expressions, repla e D ( x ) and D ( x • , x ◦ ) by their respe tiveexpression in terms of r and of r and r , as given by Equations (6) and (7).6. APPLICATION: SAMPLING ROOTED 3-CONNECTED MAPS6.1 Sampling rooted 3- onne ted maps with n edgesTheorem 4.8 ((cid:28)rst identity) ensures that the following algorithm samples rooted3- onne ted maps with n edges uniformly at random:(1) Sample an obje t T ∈ B ′ n − uniformly (e.g. using parenthesis words).(2) Perform the losure of T to obtain an irredu ible disse tion D with ( n − verti es. Choose randomly one of the six edges of the hexagon of D to arrythe root. If D is not unde omposable, then reje t and restart.(3) Conne t by a new edge e the root-vertex of D to the opposite outer vertex.Take e as root edge, with the same root-vertex as in D . This gives a rootedirredu ible quadrangulation Q with n fa es.(4) Return the rooted 3- onne ted map in P ′ n asso iated to Q by the angularmapping.Proposition 6.1. The su ess probability of the sampler at ea h trial is equalto |P ′ n | / |D ′ n − | , whi h satis(cid:28)es |P ′ n ||D ′ n − | → n →∞ . Hen e, the number of reje tions follows a geometri law whose mean is asymptoti- ally c = 3 / . As the losure mapping has linear-time omplexity, the samplingalgorithm has expe ted linear-time omplexity.Proof. A ording to Se tion 4.3, |D ′ n | = n +2 |B ′ n | = n )!( n +2)! n ! . Stirling formulayields |D ′ n − | ∼ √ π n n / . Moreover, a ording to [Tutte 1963℄, |P ′ n | ∼ √ π n n / .This yields the limit of |P ′ n | / |D ′ n − | .ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· i verti es and j fa esSimilarly, Theorem 4.8 (third identity), ensures that the following algorithm sam-ples rooted 3- onne ted maps with i verti es and j fa es uniformly at random:(1) Sample an obje t T ∈ B • i − ,j − uniformly at random. A simple method isdes ribed in Se tion 4.5.2.(2) Perform the losure of T to obtain an irredu ible disse tion D with ( i − inner bla k verti es and ( j − inner white verti es. Choose randomly theroot-vertex among the three bla k verti es of the hexagon. If the disse tion isnot unde omposable, then reje t and restart.(3) Conne t by a new edge e the root-vertex of D to the opposite outer vertex.Take e as root edge, with the same root-vertex as in D . This gives a rootedirredu ible quadrangulation Q with i bla k verti es and j white verti es.(4) Return the rooted 3- onne ted map in P ′ ij asso iated to Q by the angularmapping.Proposition 6.2. The su ess probability of the sampler at ea h trial is equalto |P ′ ij | / |D ′ i − ,j − | . Let α ∈ ]1 / , ; if i and j are orrelated by ij → α as i → ∞ ,then |P ′ ij ||D ′ i − ,j − | ∼ (2 − α ) (2 α − α =: 1 c α . Hen e, when ij → α , the number of reje tions follows a geometri law whose mean isasymptoti ally c α . Under these onditions, the sampling algorithm has an expe tedlinear-time omplexity, the linearity fa tor being asymptoti ally proportional to c α .Moreover, in the worst ase of triangulations where j = 2 i − , the mean numberof reje tions is quadrati , so that the sampling omplexity is ubi .Proof. These asymptoti results are easy onsequen es of the expression of |D ′ ij | obtained in Corollary 4.9 and of the asymptoti result |P ′ ij | ∼ ij (cid:0) i − j +2 (cid:1)(cid:0) j − i +2 (cid:1) given in [Bender 1987℄.7. APPLICATION: CODING 3-CONNECTED MAPSThis se tion introdu es an algorithm, derived from the inverse of the losure map-ping, to en ode a 3- onne ted map. Pre isely, the algorithm en odes an outer-triangular 3- onne ted map, but it is then easily extended to en ode any 3- onne tedmap. Indeed, if the outer fa e of G is not triangular, (cid:28)x three onse utive verti es v , v ′ and v ′′ in ident to the outer fa e of G and link v and v ′′ by an edge to obtainan outer-triangular 3- onne ted planar map e G ; the oding of G is obtained as the oding of e G plus one bit indi ating if an edge-addition has been done.7.1 Des ription of the oding algorithmLet G be an outer-triangular 3- onne ted map and let G ′ be its derived map, asde(cid:28)ned in Se tion 3.2. The oding algorithm relies on the following steps, illustratedin Figure 11. ACM Journal Name, Vol. V, No. N, Month 20YY.2 · Éri Fusy et al. a a a (a) a a a (b) a a a ( ) a a a (d)(e) (f)Fig. 11. Exe ution of the en oding algorithm on an example.7.1.1 Compute a parti ular orientation of the derived map G ′ (Fig. 11(b)-( )). The(cid:28)rst step of the algorithm is to ompute a spe i(cid:28) orientation X of the edges ofthe derived map G ′ , su h that X has no lo kwise ir uit, ea h primal or dualvertex has outdegree 3 and ea h edge-vertex has outdegree 1. Su h an orientationof G ′ exists and is unique, as we will see in Theorem 8.1. A linear time algorithmto ompute X is given in Se tion 9.7.1.2 Compute the irredu ible disse tion D asso iated to G (Fig. 11(d)). Considerthe bi olored omplete irredu ible disse tion D asso iated to G by the bije tionACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· G . Noti e that D has n inner fa es if G has n edges. Hen e,a ording to Euler's relation, D has n − inner verti es. Similarly, if G has i verti esand j inner fa es, then D has i bla k verti es and j + 3 white verti es.7.1.3 Compute the tri-orientation of D without lo kwise ir uit (Fig. 11(d)). Weorient ea h half-edge h of D belonging to an inner edge as follows: h is dire tedinward if its in ident vertex belongs to the hexagon; otherwise, h re eives the ori-entation of the w-following edge of G ′ . As shown in Se tion 8 (more pre isely inLemma 8.13, omposed with the orresponden e of Figure 13), this pro ess yieldsthe unique tri-orientation of D without lo kwise ir uit.7.1.4 Open the disse tion D into a binary tree T (Fig. 11(f)). On e the tri-orientationwithout lo kwise ir uit is omputed, D is opened into a binary tree T , by deletingouter verti es, outer edges, and all ingoing half-edges (see Se tion 4.2).7.1.5 En ode the tree T . First, hoose an arbitrary leaf of T , root T at this leaf,and en ode the obtained rooted binary tree using a parenthesis word (also alledDy k word ). The opening of a 3- onne ted map with n edges is a binary tree with n − inner nodes, yielding an en oding Dy k word of length n − .Similarly, the opening of a 3- onne ted map with i verti es and j inner fa es isa bla k-rooted bi olored binary tree with i − bla k nodes and j white nodes. Abla k-rooted bi olored binary trees with a given number of bla k and white nodesis en oded by a pair of words, as explained in Se tion 4.5.1. Then the two words an be asymptoti ally optimally en oded in linear time, a ording to [Boni hon etal. 2003, Lem.7℄.Theorem 7.1. The oding algorithm has linear-time omplexity and is asymp-toti ally optimal: the number of bits per edge of the ode of a map in P ′ n (resp. in P ′ ij ) is asymptoti ally equal to the binary entropy per edge, de(cid:28)ned as n log ( |P ′ n | ) (resp. i + j − log ( |P ′ ij | ) ).Proof. It is lear that the en oding algorithm has linear-time omplexity, pro-vided the algorithm omputing the onstrained orientation without lo kwise ir uitof the derived map has linear-time omplexity (whi h will be proved in Se tion 9and Se tion 10).A ording to Corollary 4.9, Proposition 6.1 and 6.2, |B ′ n | / |P ′ n | and |B • ij | / |P ′ ij | are bounded by (cid:28)xed polynomials. Hen e, the entropy per edge of B ′ n and P ′ n areasymptoti ally equal, and the binary entropy per edge of B • ij and P ′ ij are asymp-toti ally equal. As the en oding of obje ts of B ′ n ( B • ij ) using parenthesis words isasymptoti ally optimal, the en oding of obje ts of P ′ n ( P ′ ij , respe tively) is alsoasymptoti ally optimal.8. PROOF OF THEOREM 4.4This se tion is devoted to the proof of Theorem 4.4, whi h states that ea h irre-du ible disse tion has a unique tri-orientation without lo kwise ir uit.ACM Journal Name, Vol. V, No. N, Month 20YY.4 · Éri Fusy et al.8.1 α -orientations and outline of the proofDe(cid:28)nition. Let G = ( V, E ) be a planar map. Consider a fun tion α : V → N . An α -orientation of G is an orientation of the edges of G su h that the outdegree ofea h vertex v of G is α ( v ) . If an α -orientation exists, then the fun tion α is said tobe feasible for G .Existen e and uniqueness of α -orientations. The following results are proved in [Fel-sner 2004℄ (the (cid:28)rst point had already been proved in [Ossona de Mendez 1994℄):Theorem 8.1 ([Felsner 2004℄). Given a planar map G and a feasible fun -tion α , there exists a unique α -orientation of G without lo kwise ir uit. This α -orientation is alled the minimal 1 α -orientation of G .Given the derived map of an outer-triangular 3- onne ted planar map, the fun -tion α su h that α ( v ) = 3 for all primal and dual verti es and α ( v ) = 1 for alledge-verti es is a feasible fun tion.Theorem 8.1 ensures uniqueness of the orientation without lo kwise ir uit of agraph with pres ribed outdegree for ea h vertex. However, this property does notdire tly imply uniqueness in Theorem 4.4, be ause a tri-orientation has bi-orientededges.To use Theorem 8.1, we work with the derived map G ′ of an irredu ible disse -tion D , as de(cid:28)ned in Se tion 3.3. We have de(cid:28)ned derived maps only for a subset ofirredu ible disse tions, namely for bi olored omplete irredu ible disse tions (re allthat these are bi olored disse tions su h that the 3 outer white verti es have de-gree 2). As a onsequen e, a (cid:28)rst step toward proving Theorem 4.4 is to redu e itsproof to the proof of existen e and uniqueness of a so- alled omplete-tri-orientation(a slight adaptation of the de(cid:28)nition of tri-orientation) without lo kwise ir uit forany bi olored omplete irredu ible disse tion.We prove that a omplete-tri-orientation without lo kwise ir uit of a bi olored omplete irredu ible disse tion D is transposed inje tively into an α -orientationwithout lo kwise ir uit of its derived map G ′ . By inje tivity and by uniquenessof the α -orientation without lo kwise ir uit of G ′ , this implies uniqueness of atri-orientation without lo kwise ir uit for D .The (cid:28)nal step will be to prove that an α -orientation without lo kwise ir uit of G ′ is transposed into a omplete-tri-orientation without lo kwise ir uit of D . Byexisten e of an α -orientation without lo kwise ir uit for G ′ (Theorem 8.1), thisimplies the existen e of a omplete-tri-orientation without lo kwise ir uit of D .8.2 Redu tion to the ase of bi olored omplete disse tionsIntrodu tion. The aim of this se tion is to redu e the proof of Theorem 4.4 to the lass of omplete bi olored irredu ible disse tions. We state the following propo-sition where the term (cid:16) omplete-tri-orientation(cid:17), to be de(cid:28)ned later, is a slightadaptation of the notion of tri-orientation.Proposition 8.2. The existen e and uniqueness of a omplete-tri-orientationwithout lo kwise ir uit for any bi olored omplete irredu ible disse tion implies The term minimal refers to the fa t that the set of all α -orientations of G forms a distributivelatti e, the (cid:16)(cid:29)ip(cid:17) operation being a ir uit reversion.ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ··
11 + x • + x ◦ + 2 x • x ◦ + x • x ◦ ( r + r − r r ) , (10)where (cid:26) r ( x • , x ◦ ) = x • (1 + r ( x • , x ◦ )) r ( x • , x ◦ ) = x ◦ (1 + r ( x • , x ◦ )) .Proof. Lemma 5.1 ensures that P n |P ′ n +2 | x n = x U ( x ) and, more pre isely, P i,j |P ′ i +2 ,j +2 | x i • x j ◦ = x • x ◦ U ( x • , x ◦ ) . Moreover, Equations (8) and Equation (9)yield expressions of x U ( x ) and x • x ◦ U ( x • , x ◦ ) respe tively in terms of D ( x ) and D ( x • , x ◦ ) . In these expressions, repla e D ( x ) and D ( x • , x ◦ ) by their respe tiveexpression in terms of r and of r and r , as given by Equations (6) and (7).6. APPLICATION: SAMPLING ROOTED 3-CONNECTED MAPS6.1 Sampling rooted 3- onne ted maps with n edgesTheorem 4.8 ((cid:28)rst identity) ensures that the following algorithm samples rooted3- onne ted maps with n edges uniformly at random:(1) Sample an obje t T ∈ B ′ n − uniformly (e.g. using parenthesis words).(2) Perform the losure of T to obtain an irredu ible disse tion D with ( n − verti es. Choose randomly one of the six edges of the hexagon of D to arrythe root. If D is not unde omposable, then reje t and restart.(3) Conne t by a new edge e the root-vertex of D to the opposite outer vertex.Take e as root edge, with the same root-vertex as in D . This gives a rootedirredu ible quadrangulation Q with n fa es.(4) Return the rooted 3- onne ted map in P ′ n asso iated to Q by the angularmapping.Proposition 6.1. The su ess probability of the sampler at ea h trial is equalto |P ′ n | / |D ′ n − | , whi h satis(cid:28)es |P ′ n ||D ′ n − | → n →∞ . Hen e, the number of reje tions follows a geometri law whose mean is asymptoti- ally c = 3 / . As the losure mapping has linear-time omplexity, the samplingalgorithm has expe ted linear-time omplexity.Proof. A ording to Se tion 4.3, |D ′ n | = n +2 |B ′ n | = n )!( n +2)! n ! . Stirling formulayields |D ′ n − | ∼ √ π n n / . Moreover, a ording to [Tutte 1963℄, |P ′ n | ∼ √ π n n / .This yields the limit of |P ′ n | / |D ′ n − | .ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· i verti es and j fa esSimilarly, Theorem 4.8 (third identity), ensures that the following algorithm sam-ples rooted 3- onne ted maps with i verti es and j fa es uniformly at random:(1) Sample an obje t T ∈ B • i − ,j − uniformly at random. A simple method isdes ribed in Se tion 4.5.2.(2) Perform the losure of T to obtain an irredu ible disse tion D with ( i − inner bla k verti es and ( j − inner white verti es. Choose randomly theroot-vertex among the three bla k verti es of the hexagon. If the disse tion isnot unde omposable, then reje t and restart.(3) Conne t by a new edge e the root-vertex of D to the opposite outer vertex.Take e as root edge, with the same root-vertex as in D . This gives a rootedirredu ible quadrangulation Q with i bla k verti es and j white verti es.(4) Return the rooted 3- onne ted map in P ′ ij asso iated to Q by the angularmapping.Proposition 6.2. The su ess probability of the sampler at ea h trial is equalto |P ′ ij | / |D ′ i − ,j − | . Let α ∈ ]1 / , ; if i and j are orrelated by ij → α as i → ∞ ,then |P ′ ij ||D ′ i − ,j − | ∼ (2 − α ) (2 α − α =: 1 c α . Hen e, when ij → α , the number of reje tions follows a geometri law whose mean isasymptoti ally c α . Under these onditions, the sampling algorithm has an expe tedlinear-time omplexity, the linearity fa tor being asymptoti ally proportional to c α .Moreover, in the worst ase of triangulations where j = 2 i − , the mean numberof reje tions is quadrati , so that the sampling omplexity is ubi .Proof. These asymptoti results are easy onsequen es of the expression of |D ′ ij | obtained in Corollary 4.9 and of the asymptoti result |P ′ ij | ∼ ij (cid:0) i − j +2 (cid:1)(cid:0) j − i +2 (cid:1) given in [Bender 1987℄.7. APPLICATION: CODING 3-CONNECTED MAPSThis se tion introdu es an algorithm, derived from the inverse of the losure map-ping, to en ode a 3- onne ted map. Pre isely, the algorithm en odes an outer-triangular 3- onne ted map, but it is then easily extended to en ode any 3- onne tedmap. Indeed, if the outer fa e of G is not triangular, (cid:28)x three onse utive verti es v , v ′ and v ′′ in ident to the outer fa e of G and link v and v ′′ by an edge to obtainan outer-triangular 3- onne ted planar map e G ; the oding of G is obtained as the oding of e G plus one bit indi ating if an edge-addition has been done.7.1 Des ription of the oding algorithmLet G be an outer-triangular 3- onne ted map and let G ′ be its derived map, asde(cid:28)ned in Se tion 3.2. The oding algorithm relies on the following steps, illustratedin Figure 11. ACM Journal Name, Vol. V, No. N, Month 20YY.2 · Éri Fusy et al. a a a (a) a a a (b) a a a ( ) a a a (d)(e) (f)Fig. 11. Exe ution of the en oding algorithm on an example.7.1.1 Compute a parti ular orientation of the derived map G ′ (Fig. 11(b)-( )). The(cid:28)rst step of the algorithm is to ompute a spe i(cid:28) orientation X of the edges ofthe derived map G ′ , su h that X has no lo kwise ir uit, ea h primal or dualvertex has outdegree 3 and ea h edge-vertex has outdegree 1. Su h an orientationof G ′ exists and is unique, as we will see in Theorem 8.1. A linear time algorithmto ompute X is given in Se tion 9.7.1.2 Compute the irredu ible disse tion D asso iated to G (Fig. 11(d)). Considerthe bi olored omplete irredu ible disse tion D asso iated to G by the bije tionACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· G . Noti e that D has n inner fa es if G has n edges. Hen e,a ording to Euler's relation, D has n − inner verti es. Similarly, if G has i verti esand j inner fa es, then D has i bla k verti es and j + 3 white verti es.7.1.3 Compute the tri-orientation of D without lo kwise ir uit (Fig. 11(d)). Weorient ea h half-edge h of D belonging to an inner edge as follows: h is dire tedinward if its in ident vertex belongs to the hexagon; otherwise, h re eives the ori-entation of the w-following edge of G ′ . As shown in Se tion 8 (more pre isely inLemma 8.13, omposed with the orresponden e of Figure 13), this pro ess yieldsthe unique tri-orientation of D without lo kwise ir uit.7.1.4 Open the disse tion D into a binary tree T (Fig. 11(f)). On e the tri-orientationwithout lo kwise ir uit is omputed, D is opened into a binary tree T , by deletingouter verti es, outer edges, and all ingoing half-edges (see Se tion 4.2).7.1.5 En ode the tree T . First, hoose an arbitrary leaf of T , root T at this leaf,and en ode the obtained rooted binary tree using a parenthesis word (also alledDy k word ). The opening of a 3- onne ted map with n edges is a binary tree with n − inner nodes, yielding an en oding Dy k word of length n − .Similarly, the opening of a 3- onne ted map with i verti es and j inner fa es isa bla k-rooted bi olored binary tree with i − bla k nodes and j white nodes. Abla k-rooted bi olored binary trees with a given number of bla k and white nodesis en oded by a pair of words, as explained in Se tion 4.5.1. Then the two words an be asymptoti ally optimally en oded in linear time, a ording to [Boni hon etal. 2003, Lem.7℄.Theorem 7.1. The oding algorithm has linear-time omplexity and is asymp-toti ally optimal: the number of bits per edge of the ode of a map in P ′ n (resp. in P ′ ij ) is asymptoti ally equal to the binary entropy per edge, de(cid:28)ned as n log ( |P ′ n | ) (resp. i + j − log ( |P ′ ij | ) ).Proof. It is lear that the en oding algorithm has linear-time omplexity, pro-vided the algorithm omputing the onstrained orientation without lo kwise ir uitof the derived map has linear-time omplexity (whi h will be proved in Se tion 9and Se tion 10).A ording to Corollary 4.9, Proposition 6.1 and 6.2, |B ′ n | / |P ′ n | and |B • ij | / |P ′ ij | are bounded by (cid:28)xed polynomials. Hen e, the entropy per edge of B ′ n and P ′ n areasymptoti ally equal, and the binary entropy per edge of B • ij and P ′ ij are asymp-toti ally equal. As the en oding of obje ts of B ′ n ( B • ij ) using parenthesis words isasymptoti ally optimal, the en oding of obje ts of P ′ n ( P ′ ij , respe tively) is alsoasymptoti ally optimal.8. PROOF OF THEOREM 4.4This se tion is devoted to the proof of Theorem 4.4, whi h states that ea h irre-du ible disse tion has a unique tri-orientation without lo kwise ir uit.ACM Journal Name, Vol. V, No. N, Month 20YY.4 · Éri Fusy et al.8.1 α -orientations and outline of the proofDe(cid:28)nition. Let G = ( V, E ) be a planar map. Consider a fun tion α : V → N . An α -orientation of G is an orientation of the edges of G su h that the outdegree ofea h vertex v of G is α ( v ) . If an α -orientation exists, then the fun tion α is said tobe feasible for G .Existen e and uniqueness of α -orientations. The following results are proved in [Fel-sner 2004℄ (the (cid:28)rst point had already been proved in [Ossona de Mendez 1994℄):Theorem 8.1 ([Felsner 2004℄). Given a planar map G and a feasible fun -tion α , there exists a unique α -orientation of G without lo kwise ir uit. This α -orientation is alled the minimal 1 α -orientation of G .Given the derived map of an outer-triangular 3- onne ted planar map, the fun -tion α su h that α ( v ) = 3 for all primal and dual verti es and α ( v ) = 1 for alledge-verti es is a feasible fun tion.Theorem 8.1 ensures uniqueness of the orientation without lo kwise ir uit of agraph with pres ribed outdegree for ea h vertex. However, this property does notdire tly imply uniqueness in Theorem 4.4, be ause a tri-orientation has bi-orientededges.To use Theorem 8.1, we work with the derived map G ′ of an irredu ible disse -tion D , as de(cid:28)ned in Se tion 3.3. We have de(cid:28)ned derived maps only for a subset ofirredu ible disse tions, namely for bi olored omplete irredu ible disse tions (re allthat these are bi olored disse tions su h that the 3 outer white verti es have de-gree 2). As a onsequen e, a (cid:28)rst step toward proving Theorem 4.4 is to redu e itsproof to the proof of existen e and uniqueness of a so- alled omplete-tri-orientation(a slight adaptation of the de(cid:28)nition of tri-orientation) without lo kwise ir uit forany bi olored omplete irredu ible disse tion.We prove that a omplete-tri-orientation without lo kwise ir uit of a bi olored omplete irredu ible disse tion D is transposed inje tively into an α -orientationwithout lo kwise ir uit of its derived map G ′ . By inje tivity and by uniquenessof the α -orientation without lo kwise ir uit of G ′ , this implies uniqueness of atri-orientation without lo kwise ir uit for D .The (cid:28)nal step will be to prove that an α -orientation without lo kwise ir uit of G ′ is transposed into a omplete-tri-orientation without lo kwise ir uit of D . Byexisten e of an α -orientation without lo kwise ir uit for G ′ (Theorem 8.1), thisimplies the existen e of a omplete-tri-orientation without lo kwise ir uit of D .8.2 Redu tion to the ase of bi olored omplete disse tionsIntrodu tion. The aim of this se tion is to redu e the proof of Theorem 4.4 to the lass of omplete bi olored irredu ible disse tions. We state the following propo-sition where the term (cid:16) omplete-tri-orientation(cid:17), to be de(cid:28)ned later, is a slightadaptation of the notion of tri-orientation.Proposition 8.2. The existen e and uniqueness of a omplete-tri-orientationwithout lo kwise ir uit for any bi olored omplete irredu ible disse tion implies The term minimal refers to the fa t that the set of all α -orientations of G forms a distributivelatti e, the (cid:16)(cid:29)ip(cid:17) operation being a ir uit reversion.ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· D , we de(cid:28)ne its ompleted disse tion D c as follows . For ea h white vertex v of the hexagon, we denote by e l ( v ) ( e r ( v ) ) the outer edge starting from v withthe interior of the hexagon on the left (right, respe tively) and denote by l ( v ) and r ( v ) the neighbours of v in ident to e l ( v ) and to e r ( v ) . We perform the followingoperation: if v has degree at least 3, a new white vertex v ′ is reated outside of thehexagon and is linked to l ( v ) and to r ( v ) by two new edges e l ( v ′ ) and e r ( v ′ ) , seeFigure 12. The vertex v ′ is said to over the vertex v .The disse tion obtained is a bi olored disse tion of the hexagon su h that thethree white verti es of the hexagon have two in ident edges, see the transitionbetween Figure 13(a) and Figure 13(b) (ignore here the orientation of edges).Lemma 8.3. The ompletion D c of a bi olored irredu ible disse tion D is a bi- olored omplete irredu ible disse tion.Proof. The outer white verti es of D c have degree 2 by onstru tion. Hen e,we just have to prove that D c is irredu ible. As D is irredu ible, if a separating4- y le C appears in D c when the ompletion is performed, then it must ontain awhite vertex v ′ of the hexagon of D c added during the ompletion, so as to overan outer white vertex v of degree greater than 2. Two edges of C are the edges e l ( v ′ ) and e r ( v ′ ) in ident to v ′ in D c . The two other edges ǫ and ǫ of C form apath of length 2 onne ting the verti es l ( v ) and r ( v ) and passing by the interiorof D (otherwise, C would en lose a fa e). As D is irredu ible, the 4- y le C ′ of D onsisting of the edges e l ( v ) , e r ( v ) , ǫ and ǫ delimits a fa e. Hen e e l ( v ) and e r ( v ) are in ident to the same inner fa e of D , whi h implies that v has degree 2, a ontradi tion.Tri-orientations. Let D be a bi olored irredu ible disse tion and let D c be its om-pleted bi olored disse tion. We de(cid:28)ne a mapping Φ from the tri-orientations of D c to the tri-orientations of D . Given a tri-orientation Y of D c , we remove the edgesthat have been added to obtain D c from D , erase the orientation of the edges ofthe hexagon of D , and orient inward all inner half-edges in ident to an outer ver-tex of D . We obtain thus a tri-orientation Φ( Y ) of D , see the transition betweenFigure 13(b) and Figure 13(a).Lemma 8.4. Let Y be a tri-orientation of D c without lo kwise ir uit. Thenthe tri-orientation Φ( Y ) of D has no lo kwise ir uit.For ea h tri-orientation X of D without lo kwise ir uit, there exists a tri-orientation Y of D c without lo kwise ir uit su h that Φ( Y ) = X .ACM Journal Name, Vol. V, No. N, Month 20YY.6 · Éri Fusy et al. e l ( v ) e r ( v ) vl ( v ) r ( v ) h h h h h e l ( v ) e r ( v ) vl ( v ) r ( v ) h h h h h e l ( v ′ ) e r ( v ′ ) v ′ f Fig. 12. From a tri-orientation X of D without lo kwise ir uit, onstru tion of a tri-orientation Y of D c without lo kwise ir uit su h that Φ( Y ) = X .Proof. The (cid:28)rst point is trivial, as the tri-orientation Φ( Y ) is just obtained byremoving some edges and some orientations of half-edges.For the se ond point, the preimage Y is onstru ted as follows. Consider ea hwhite vertex v of the hexagon of D whi h has degree at least 3. Let ( h , . . . , h m ) ( m ≥ be the series of half-edges in ident to v in D in ounter- lo kwise orderaround v , with h and h belonging respe tively to the edges e r ( v ) and e l ( v ) . As m ≥ , the vertex v gives rise to a overing vertex v ′ with two in ident edges e l ( v ′ ) and e r ( v ′ ) su h that the edges e l ( v ) , e r ( v ) , e l ( v ′ ) and e r ( v ′ ) form a new fa e f . Theedges e l ( v ) and e r ( v ) be ome inner edges of D c when v ′ is added, and have thus tobe dire ted.We orient the two half-edges of e l ( v ) and e r ( v ) respe tively toward l ( v ) andtoward r ( v ) , see Figure 12. The vertex v re eives thus two outgoing half-edges, andwe have to give to v a third outgoing half-edge. The suitable hoi e to avoid theappearan e of a lo kwise ir uit is to orient h outward, see Figure 12. Indeed,assume a ontrario that a simple lo kwise ir uit C is reated. Then the ir uitmust pass by v . It goes into v using one of the half-edges h i dire ted toward v , i.e., i ≥ . Moreover, it must go out of v using the half-edge h (indeed, if the ir uituses h or h to go out of v , then it rea hes an outer vertex, whi h has outdegree0). Hen e, the interior of the lo kwise ir uit C must ontain all fa es in identto v that are on the right of v when we traverse v from h i and go out using h .Hen e, the interior of C must ontain the new fa e f of D c , see Figure 12. But f is in ident to outer edges of D c , hen e the lo kwise ir uit C must pass by outeredges of D c , whi h are not oriented, a ontradi tion. Thus, we have onstru teda tri-orientation Y of D c without lo kwise ir uit and su h that Φ( Y ) = X . Anexample of this onstru tion an be seen as the transition between Figure 13(a)and Figure 13(b).Lemma 8.5. The existen e and uniqueness of a tri-orientation without lo k-wise ir uit for any bi olored omplete irredu ible disse tion implies the existen eand uniqueness of a tri-orientation without lo kwise ir uit for any irredu ibledisse tion, i.e., implies Theorem 4.4.Proof. This is a lear onsequen e of Lemma 8.3 and Lemma 8.4.Complete-tri-orientations. A omplete-tri-orientation of a bi olored omplete irre-du ible disse tion D is an orientation of the half-edges of D that satis(cid:28)es the fol-lowing onditions (very similar to the onditions of a tri-orientation): all bla kverti es and all inner white verti es of D have outdegree 3, the three white verti esACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ··
11 + x • + x ◦ + 2 x • x ◦ + x • x ◦ ( r + r − r r ) , (10)where (cid:26) r ( x • , x ◦ ) = x • (1 + r ( x • , x ◦ )) r ( x • , x ◦ ) = x ◦ (1 + r ( x • , x ◦ )) .Proof. Lemma 5.1 ensures that P n |P ′ n +2 | x n = x U ( x ) and, more pre isely, P i,j |P ′ i +2 ,j +2 | x i • x j ◦ = x • x ◦ U ( x • , x ◦ ) . Moreover, Equations (8) and Equation (9)yield expressions of x U ( x ) and x • x ◦ U ( x • , x ◦ ) respe tively in terms of D ( x ) and D ( x • , x ◦ ) . In these expressions, repla e D ( x ) and D ( x • , x ◦ ) by their respe tiveexpression in terms of r and of r and r , as given by Equations (6) and (7).6. APPLICATION: SAMPLING ROOTED 3-CONNECTED MAPS6.1 Sampling rooted 3- onne ted maps with n edgesTheorem 4.8 ((cid:28)rst identity) ensures that the following algorithm samples rooted3- onne ted maps with n edges uniformly at random:(1) Sample an obje t T ∈ B ′ n − uniformly (e.g. using parenthesis words).(2) Perform the losure of T to obtain an irredu ible disse tion D with ( n − verti es. Choose randomly one of the six edges of the hexagon of D to arrythe root. If D is not unde omposable, then reje t and restart.(3) Conne t by a new edge e the root-vertex of D to the opposite outer vertex.Take e as root edge, with the same root-vertex as in D . This gives a rootedirredu ible quadrangulation Q with n fa es.(4) Return the rooted 3- onne ted map in P ′ n asso iated to Q by the angularmapping.Proposition 6.1. The su ess probability of the sampler at ea h trial is equalto |P ′ n | / |D ′ n − | , whi h satis(cid:28)es |P ′ n ||D ′ n − | → n →∞ . Hen e, the number of reje tions follows a geometri law whose mean is asymptoti- ally c = 3 / . As the losure mapping has linear-time omplexity, the samplingalgorithm has expe ted linear-time omplexity.Proof. A ording to Se tion 4.3, |D ′ n | = n +2 |B ′ n | = n )!( n +2)! n ! . Stirling formulayields |D ′ n − | ∼ √ π n n / . Moreover, a ording to [Tutte 1963℄, |P ′ n | ∼ √ π n n / .This yields the limit of |P ′ n | / |D ′ n − | .ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· i verti es and j fa esSimilarly, Theorem 4.8 (third identity), ensures that the following algorithm sam-ples rooted 3- onne ted maps with i verti es and j fa es uniformly at random:(1) Sample an obje t T ∈ B • i − ,j − uniformly at random. A simple method isdes ribed in Se tion 4.5.2.(2) Perform the losure of T to obtain an irredu ible disse tion D with ( i − inner bla k verti es and ( j − inner white verti es. Choose randomly theroot-vertex among the three bla k verti es of the hexagon. If the disse tion isnot unde omposable, then reje t and restart.(3) Conne t by a new edge e the root-vertex of D to the opposite outer vertex.Take e as root edge, with the same root-vertex as in D . This gives a rootedirredu ible quadrangulation Q with i bla k verti es and j white verti es.(4) Return the rooted 3- onne ted map in P ′ ij asso iated to Q by the angularmapping.Proposition 6.2. The su ess probability of the sampler at ea h trial is equalto |P ′ ij | / |D ′ i − ,j − | . Let α ∈ ]1 / , ; if i and j are orrelated by ij → α as i → ∞ ,then |P ′ ij ||D ′ i − ,j − | ∼ (2 − α ) (2 α − α =: 1 c α . Hen e, when ij → α , the number of reje tions follows a geometri law whose mean isasymptoti ally c α . Under these onditions, the sampling algorithm has an expe tedlinear-time omplexity, the linearity fa tor being asymptoti ally proportional to c α .Moreover, in the worst ase of triangulations where j = 2 i − , the mean numberof reje tions is quadrati , so that the sampling omplexity is ubi .Proof. These asymptoti results are easy onsequen es of the expression of |D ′ ij | obtained in Corollary 4.9 and of the asymptoti result |P ′ ij | ∼ ij (cid:0) i − j +2 (cid:1)(cid:0) j − i +2 (cid:1) given in [Bender 1987℄.7. APPLICATION: CODING 3-CONNECTED MAPSThis se tion introdu es an algorithm, derived from the inverse of the losure map-ping, to en ode a 3- onne ted map. Pre isely, the algorithm en odes an outer-triangular 3- onne ted map, but it is then easily extended to en ode any 3- onne tedmap. Indeed, if the outer fa e of G is not triangular, (cid:28)x three onse utive verti es v , v ′ and v ′′ in ident to the outer fa e of G and link v and v ′′ by an edge to obtainan outer-triangular 3- onne ted planar map e G ; the oding of G is obtained as the oding of e G plus one bit indi ating if an edge-addition has been done.7.1 Des ription of the oding algorithmLet G be an outer-triangular 3- onne ted map and let G ′ be its derived map, asde(cid:28)ned in Se tion 3.2. The oding algorithm relies on the following steps, illustratedin Figure 11. ACM Journal Name, Vol. V, No. N, Month 20YY.2 · Éri Fusy et al. a a a (a) a a a (b) a a a ( ) a a a (d)(e) (f)Fig. 11. Exe ution of the en oding algorithm on an example.7.1.1 Compute a parti ular orientation of the derived map G ′ (Fig. 11(b)-( )). The(cid:28)rst step of the algorithm is to ompute a spe i(cid:28) orientation X of the edges ofthe derived map G ′ , su h that X has no lo kwise ir uit, ea h primal or dualvertex has outdegree 3 and ea h edge-vertex has outdegree 1. Su h an orientationof G ′ exists and is unique, as we will see in Theorem 8.1. A linear time algorithmto ompute X is given in Se tion 9.7.1.2 Compute the irredu ible disse tion D asso iated to G (Fig. 11(d)). Considerthe bi olored omplete irredu ible disse tion D asso iated to G by the bije tionACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· G . Noti e that D has n inner fa es if G has n edges. Hen e,a ording to Euler's relation, D has n − inner verti es. Similarly, if G has i verti esand j inner fa es, then D has i bla k verti es and j + 3 white verti es.7.1.3 Compute the tri-orientation of D without lo kwise ir uit (Fig. 11(d)). Weorient ea h half-edge h of D belonging to an inner edge as follows: h is dire tedinward if its in ident vertex belongs to the hexagon; otherwise, h re eives the ori-entation of the w-following edge of G ′ . As shown in Se tion 8 (more pre isely inLemma 8.13, omposed with the orresponden e of Figure 13), this pro ess yieldsthe unique tri-orientation of D without lo kwise ir uit.7.1.4 Open the disse tion D into a binary tree T (Fig. 11(f)). On e the tri-orientationwithout lo kwise ir uit is omputed, D is opened into a binary tree T , by deletingouter verti es, outer edges, and all ingoing half-edges (see Se tion 4.2).7.1.5 En ode the tree T . First, hoose an arbitrary leaf of T , root T at this leaf,and en ode the obtained rooted binary tree using a parenthesis word (also alledDy k word ). The opening of a 3- onne ted map with n edges is a binary tree with n − inner nodes, yielding an en oding Dy k word of length n − .Similarly, the opening of a 3- onne ted map with i verti es and j inner fa es isa bla k-rooted bi olored binary tree with i − bla k nodes and j white nodes. Abla k-rooted bi olored binary trees with a given number of bla k and white nodesis en oded by a pair of words, as explained in Se tion 4.5.1. Then the two words an be asymptoti ally optimally en oded in linear time, a ording to [Boni hon etal. 2003, Lem.7℄.Theorem 7.1. The oding algorithm has linear-time omplexity and is asymp-toti ally optimal: the number of bits per edge of the ode of a map in P ′ n (resp. in P ′ ij ) is asymptoti ally equal to the binary entropy per edge, de(cid:28)ned as n log ( |P ′ n | ) (resp. i + j − log ( |P ′ ij | ) ).Proof. It is lear that the en oding algorithm has linear-time omplexity, pro-vided the algorithm omputing the onstrained orientation without lo kwise ir uitof the derived map has linear-time omplexity (whi h will be proved in Se tion 9and Se tion 10).A ording to Corollary 4.9, Proposition 6.1 and 6.2, |B ′ n | / |P ′ n | and |B • ij | / |P ′ ij | are bounded by (cid:28)xed polynomials. Hen e, the entropy per edge of B ′ n and P ′ n areasymptoti ally equal, and the binary entropy per edge of B • ij and P ′ ij are asymp-toti ally equal. As the en oding of obje ts of B ′ n ( B • ij ) using parenthesis words isasymptoti ally optimal, the en oding of obje ts of P ′ n ( P ′ ij , respe tively) is alsoasymptoti ally optimal.8. PROOF OF THEOREM 4.4This se tion is devoted to the proof of Theorem 4.4, whi h states that ea h irre-du ible disse tion has a unique tri-orientation without lo kwise ir uit.ACM Journal Name, Vol. V, No. N, Month 20YY.4 · Éri Fusy et al.8.1 α -orientations and outline of the proofDe(cid:28)nition. Let G = ( V, E ) be a planar map. Consider a fun tion α : V → N . An α -orientation of G is an orientation of the edges of G su h that the outdegree ofea h vertex v of G is α ( v ) . If an α -orientation exists, then the fun tion α is said tobe feasible for G .Existen e and uniqueness of α -orientations. The following results are proved in [Fel-sner 2004℄ (the (cid:28)rst point had already been proved in [Ossona de Mendez 1994℄):Theorem 8.1 ([Felsner 2004℄). Given a planar map G and a feasible fun -tion α , there exists a unique α -orientation of G without lo kwise ir uit. This α -orientation is alled the minimal 1 α -orientation of G .Given the derived map of an outer-triangular 3- onne ted planar map, the fun -tion α su h that α ( v ) = 3 for all primal and dual verti es and α ( v ) = 1 for alledge-verti es is a feasible fun tion.Theorem 8.1 ensures uniqueness of the orientation without lo kwise ir uit of agraph with pres ribed outdegree for ea h vertex. However, this property does notdire tly imply uniqueness in Theorem 4.4, be ause a tri-orientation has bi-orientededges.To use Theorem 8.1, we work with the derived map G ′ of an irredu ible disse -tion D , as de(cid:28)ned in Se tion 3.3. We have de(cid:28)ned derived maps only for a subset ofirredu ible disse tions, namely for bi olored omplete irredu ible disse tions (re allthat these are bi olored disse tions su h that the 3 outer white verti es have de-gree 2). As a onsequen e, a (cid:28)rst step toward proving Theorem 4.4 is to redu e itsproof to the proof of existen e and uniqueness of a so- alled omplete-tri-orientation(a slight adaptation of the de(cid:28)nition of tri-orientation) without lo kwise ir uit forany bi olored omplete irredu ible disse tion.We prove that a omplete-tri-orientation without lo kwise ir uit of a bi olored omplete irredu ible disse tion D is transposed inje tively into an α -orientationwithout lo kwise ir uit of its derived map G ′ . By inje tivity and by uniquenessof the α -orientation without lo kwise ir uit of G ′ , this implies uniqueness of atri-orientation without lo kwise ir uit for D .The (cid:28)nal step will be to prove that an α -orientation without lo kwise ir uit of G ′ is transposed into a omplete-tri-orientation without lo kwise ir uit of D . Byexisten e of an α -orientation without lo kwise ir uit for G ′ (Theorem 8.1), thisimplies the existen e of a omplete-tri-orientation without lo kwise ir uit of D .8.2 Redu tion to the ase of bi olored omplete disse tionsIntrodu tion. The aim of this se tion is to redu e the proof of Theorem 4.4 to the lass of omplete bi olored irredu ible disse tions. We state the following propo-sition where the term (cid:16) omplete-tri-orientation(cid:17), to be de(cid:28)ned later, is a slightadaptation of the notion of tri-orientation.Proposition 8.2. The existen e and uniqueness of a omplete-tri-orientationwithout lo kwise ir uit for any bi olored omplete irredu ible disse tion implies The term minimal refers to the fa t that the set of all α -orientations of G forms a distributivelatti e, the (cid:16)(cid:29)ip(cid:17) operation being a ir uit reversion.ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· D , we de(cid:28)ne its ompleted disse tion D c as follows . For ea h white vertex v of the hexagon, we denote by e l ( v ) ( e r ( v ) ) the outer edge starting from v withthe interior of the hexagon on the left (right, respe tively) and denote by l ( v ) and r ( v ) the neighbours of v in ident to e l ( v ) and to e r ( v ) . We perform the followingoperation: if v has degree at least 3, a new white vertex v ′ is reated outside of thehexagon and is linked to l ( v ) and to r ( v ) by two new edges e l ( v ′ ) and e r ( v ′ ) , seeFigure 12. The vertex v ′ is said to over the vertex v .The disse tion obtained is a bi olored disse tion of the hexagon su h that thethree white verti es of the hexagon have two in ident edges, see the transitionbetween Figure 13(a) and Figure 13(b) (ignore here the orientation of edges).Lemma 8.3. The ompletion D c of a bi olored irredu ible disse tion D is a bi- olored omplete irredu ible disse tion.Proof. The outer white verti es of D c have degree 2 by onstru tion. Hen e,we just have to prove that D c is irredu ible. As D is irredu ible, if a separating4- y le C appears in D c when the ompletion is performed, then it must ontain awhite vertex v ′ of the hexagon of D c added during the ompletion, so as to overan outer white vertex v of degree greater than 2. Two edges of C are the edges e l ( v ′ ) and e r ( v ′ ) in ident to v ′ in D c . The two other edges ǫ and ǫ of C form apath of length 2 onne ting the verti es l ( v ) and r ( v ) and passing by the interiorof D (otherwise, C would en lose a fa e). As D is irredu ible, the 4- y le C ′ of D onsisting of the edges e l ( v ) , e r ( v ) , ǫ and ǫ delimits a fa e. Hen e e l ( v ) and e r ( v ) are in ident to the same inner fa e of D , whi h implies that v has degree 2, a ontradi tion.Tri-orientations. Let D be a bi olored irredu ible disse tion and let D c be its om-pleted bi olored disse tion. We de(cid:28)ne a mapping Φ from the tri-orientations of D c to the tri-orientations of D . Given a tri-orientation Y of D c , we remove the edgesthat have been added to obtain D c from D , erase the orientation of the edges ofthe hexagon of D , and orient inward all inner half-edges in ident to an outer ver-tex of D . We obtain thus a tri-orientation Φ( Y ) of D , see the transition betweenFigure 13(b) and Figure 13(a).Lemma 8.4. Let Y be a tri-orientation of D c without lo kwise ir uit. Thenthe tri-orientation Φ( Y ) of D has no lo kwise ir uit.For ea h tri-orientation X of D without lo kwise ir uit, there exists a tri-orientation Y of D c without lo kwise ir uit su h that Φ( Y ) = X .ACM Journal Name, Vol. V, No. N, Month 20YY.6 · Éri Fusy et al. e l ( v ) e r ( v ) vl ( v ) r ( v ) h h h h h e l ( v ) e r ( v ) vl ( v ) r ( v ) h h h h h e l ( v ′ ) e r ( v ′ ) v ′ f Fig. 12. From a tri-orientation X of D without lo kwise ir uit, onstru tion of a tri-orientation Y of D c without lo kwise ir uit su h that Φ( Y ) = X .Proof. The (cid:28)rst point is trivial, as the tri-orientation Φ( Y ) is just obtained byremoving some edges and some orientations of half-edges.For the se ond point, the preimage Y is onstru ted as follows. Consider ea hwhite vertex v of the hexagon of D whi h has degree at least 3. Let ( h , . . . , h m ) ( m ≥ be the series of half-edges in ident to v in D in ounter- lo kwise orderaround v , with h and h belonging respe tively to the edges e r ( v ) and e l ( v ) . As m ≥ , the vertex v gives rise to a overing vertex v ′ with two in ident edges e l ( v ′ ) and e r ( v ′ ) su h that the edges e l ( v ) , e r ( v ) , e l ( v ′ ) and e r ( v ′ ) form a new fa e f . Theedges e l ( v ) and e r ( v ) be ome inner edges of D c when v ′ is added, and have thus tobe dire ted.We orient the two half-edges of e l ( v ) and e r ( v ) respe tively toward l ( v ) andtoward r ( v ) , see Figure 12. The vertex v re eives thus two outgoing half-edges, andwe have to give to v a third outgoing half-edge. The suitable hoi e to avoid theappearan e of a lo kwise ir uit is to orient h outward, see Figure 12. Indeed,assume a ontrario that a simple lo kwise ir uit C is reated. Then the ir uitmust pass by v . It goes into v using one of the half-edges h i dire ted toward v , i.e., i ≥ . Moreover, it must go out of v using the half-edge h (indeed, if the ir uituses h or h to go out of v , then it rea hes an outer vertex, whi h has outdegree0). Hen e, the interior of the lo kwise ir uit C must ontain all fa es in identto v that are on the right of v when we traverse v from h i and go out using h .Hen e, the interior of C must ontain the new fa e f of D c , see Figure 12. But f is in ident to outer edges of D c , hen e the lo kwise ir uit C must pass by outeredges of D c , whi h are not oriented, a ontradi tion. Thus, we have onstru teda tri-orientation Y of D c without lo kwise ir uit and su h that Φ( Y ) = X . Anexample of this onstru tion an be seen as the transition between Figure 13(a)and Figure 13(b).Lemma 8.5. The existen e and uniqueness of a tri-orientation without lo k-wise ir uit for any bi olored omplete irredu ible disse tion implies the existen eand uniqueness of a tri-orientation without lo kwise ir uit for any irredu ibledisse tion, i.e., implies Theorem 4.4.Proof. This is a lear onsequen e of Lemma 8.3 and Lemma 8.4.Complete-tri-orientations. A omplete-tri-orientation of a bi olored omplete irre-du ible disse tion D is an orientation of the half-edges of D that satis(cid:28)es the fol-lowing onditions (very similar to the onditions of a tri-orientation): all bla kverti es and all inner white verti es of D have outdegree 3, the three white verti esACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· D endowed with a tri-orientation X without lo kwise ir uit (Figure a). The asso iated ompleted disse tion D c (the two added white verti es aresurrounded) endowed with the tri-orientation Y su h that Φ( Y ) = X (Figure b). The disse tion D c endowed with the omplete-tri-orientation Z su h that Ψ( Z ) = Y (Figure ).of the hexagon have outdegree 0, and the two half-edges of an edge of D an notboth be oriented inward. The di(cid:27)eren e with the de(cid:28)nition of tri-orientation isthat the half-edges of the hexagon are oriented, with pres ribed outdegree for theouter verti es. Similarly as in a tri-orientation, edges of D are distinguished intosimply-oriented edges and bi-oriented edges.Lemma 8.6. Let D ∈ D n be a bi olored omplete irredu ible disse tion endowedwith a omplete-tri-orientation without lo kwise ir uit. Then the subgraph T of D onsisting of the bi-oriented edges of D is a tree in ident to all verti es of D ex ept the three outer white verti es.Proof. We reason similarly as in Lemma 4.2. Let r and s be the numbers of bi-oriented and simply oriented edges of D . From Euler's relation (using the degreesof the fa es of D ), D has n + 7 edges, i.e., r + s = 2 n + 7 . In addition, the n inner verti es and the three bla k (resp. white) verti es of the hexagon of D haveoutdegree 3 (resp. 0). Hen e, r + s = 3( n + 3) . Thus, r = n + 2 and s = n + 5 .Hen e, the subgraph T has n + 2 edges, has no y le (otherwise, a lo kwise ir uitof D would exist), and is in ident to at most ( n + 3) verti es, whi h are the innerverti es and the three outer bla k verti es of D . A lassi al result of graph theoryensures that T is a tree spanning these ( n + 3) verti es.Lemma 8.7. Let D ∈ D n be a bi olored omplete irredu ible disse tion endowedwith a omplete-tri-orientation Z without lo kwise ir uit. Then, for ea h outerbla k vertex v of D , the unique outgoing inner half-edge in ident to v belongs to abi-oriented edge.Proof. The subgraph T onsisting of the bi-oriented edges of D is a tree span-ning all verti es of D ex ept the three outer white verti es. Hen e, there is abi-oriented edge e in ident to ea h bla k vertex v of the hexagon and this edge onsitutes the third outgoing edge of v .Let D be a bi olored omplete irredu ible disse tion and Z be a omplete-tri-orientation of D without lo kwise ir uit. We asso iate to Z a tri-orientation Ψ( Z ) as follows: erase the orientation of the edges of the hexagon of D ; for ea h bla kACM Journal Name, Vol. V, No. N, Month 20YY.8 · Éri Fusy et al.(a) (b) ( )Fig. 14. The onstru tion of the derived map of a bi olored omplete irredu ible disse tion. Thedisse tion is endowed with a omplete-tri-orientation without lo kwise ir uit, and the derivedmap is endowed with the orientation obtained using the transposition rules for orientations.vertex v of the hexagon, hange the orientation of the unique outgoing inner half-edge h of v . A ording to Lemma 8.7, h belongs to a bi-oriented edge e , so thatthe hange of orientation of h turns e into an edge simply oriented toward v . Thus,the obtained orientation Ψ( Z ) is a tri-orientation.Lemma 8.8. Let D be a bi olored omplete irredu ible disse tion. Let Z be a omplete-tri-orientation of D without lo kwise ir uit. Then the tri-orientation Ψ( Z ) of D has no lo kwise ir uit.For ea h tri-orientation Y of D without lo kwise ir uit, there exists a omplete-tri-orientation Z of D without lo kwise ir uit su h that Ψ( Z ) = Y .Proof. The (cid:28)rst point is trivial. For the se ond point, we reason similarly as inLemma 8.4. For ea h bla k vertex v of the hexagon of D , let ( h , . . . , h m ) ( m ≥ be the sequen e of half-edges of D in ident to v in ounter- lo kwise order around v , with h and h belonging to the two outer edges e r ( v ) and e l ( v ) of D that arein ident to v . To onstru t the preimage Z of Y , we make the edges e l ( v ) and e r ( v ) simply oriented toward their in ident white vertex. The third outgoing half-edge is hosen to be h , whi h is the (cid:16)leftmost(cid:17) inner half-edge of v . An argument similar asin the proof of the se ond point of Lemma 8.4 ensures that this hoi e is judi ious toavoid the reation of a lo kwise ir uit. An example of this onstru tion is shownin Figure 13(b)-( ).Finally, Proposition 8.2 follows dire tly from Lemma 8.5 and Lemma 8.8.Proposition 8.5 redu es the proof of Theorem 4.4 to proving the existen e anduniqueness of a omplete-tri-orientation without w ir uit for any bi olored om-plete irredu ible disse tion. From now on, we will work with these disse tions.8.3 Transposition rules for orientationsLet D be a bi olored omplete irredu ible disse tion and let G ′ be the derived mapof D . We asso iate to a omplete-tri-orientation of D an orientation of the edgesof G ′ of D as follows, see Figure 14: ea h edge e = ( v, v ′ ) (cid:22)with v the primal/dualvertex and v ′ the edge-vertex(cid:22) re eives the dire tion of the half-edge of D following e in w order around v .ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ··
11 + x • + x ◦ + 2 x • x ◦ + x • x ◦ ( r + r − r r ) , (10)where (cid:26) r ( x • , x ◦ ) = x • (1 + r ( x • , x ◦ )) r ( x • , x ◦ ) = x ◦ (1 + r ( x • , x ◦ )) .Proof. Lemma 5.1 ensures that P n |P ′ n +2 | x n = x U ( x ) and, more pre isely, P i,j |P ′ i +2 ,j +2 | x i • x j ◦ = x • x ◦ U ( x • , x ◦ ) . Moreover, Equations (8) and Equation (9)yield expressions of x U ( x ) and x • x ◦ U ( x • , x ◦ ) respe tively in terms of D ( x ) and D ( x • , x ◦ ) . In these expressions, repla e D ( x ) and D ( x • , x ◦ ) by their respe tiveexpression in terms of r and of r and r , as given by Equations (6) and (7).6. APPLICATION: SAMPLING ROOTED 3-CONNECTED MAPS6.1 Sampling rooted 3- onne ted maps with n edgesTheorem 4.8 ((cid:28)rst identity) ensures that the following algorithm samples rooted3- onne ted maps with n edges uniformly at random:(1) Sample an obje t T ∈ B ′ n − uniformly (e.g. using parenthesis words).(2) Perform the losure of T to obtain an irredu ible disse tion D with ( n − verti es. Choose randomly one of the six edges of the hexagon of D to arrythe root. If D is not unde omposable, then reje t and restart.(3) Conne t by a new edge e the root-vertex of D to the opposite outer vertex.Take e as root edge, with the same root-vertex as in D . This gives a rootedirredu ible quadrangulation Q with n fa es.(4) Return the rooted 3- onne ted map in P ′ n asso iated to Q by the angularmapping.Proposition 6.1. The su ess probability of the sampler at ea h trial is equalto |P ′ n | / |D ′ n − | , whi h satis(cid:28)es |P ′ n ||D ′ n − | → n →∞ . Hen e, the number of reje tions follows a geometri law whose mean is asymptoti- ally c = 3 / . As the losure mapping has linear-time omplexity, the samplingalgorithm has expe ted linear-time omplexity.Proof. A ording to Se tion 4.3, |D ′ n | = n +2 |B ′ n | = n )!( n +2)! n ! . Stirling formulayields |D ′ n − | ∼ √ π n n / . Moreover, a ording to [Tutte 1963℄, |P ′ n | ∼ √ π n n / .This yields the limit of |P ′ n | / |D ′ n − | .ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· i verti es and j fa esSimilarly, Theorem 4.8 (third identity), ensures that the following algorithm sam-ples rooted 3- onne ted maps with i verti es and j fa es uniformly at random:(1) Sample an obje t T ∈ B • i − ,j − uniformly at random. A simple method isdes ribed in Se tion 4.5.2.(2) Perform the losure of T to obtain an irredu ible disse tion D with ( i − inner bla k verti es and ( j − inner white verti es. Choose randomly theroot-vertex among the three bla k verti es of the hexagon. If the disse tion isnot unde omposable, then reje t and restart.(3) Conne t by a new edge e the root-vertex of D to the opposite outer vertex.Take e as root edge, with the same root-vertex as in D . This gives a rootedirredu ible quadrangulation Q with i bla k verti es and j white verti es.(4) Return the rooted 3- onne ted map in P ′ ij asso iated to Q by the angularmapping.Proposition 6.2. The su ess probability of the sampler at ea h trial is equalto |P ′ ij | / |D ′ i − ,j − | . Let α ∈ ]1 / , ; if i and j are orrelated by ij → α as i → ∞ ,then |P ′ ij ||D ′ i − ,j − | ∼ (2 − α ) (2 α − α =: 1 c α . Hen e, when ij → α , the number of reje tions follows a geometri law whose mean isasymptoti ally c α . Under these onditions, the sampling algorithm has an expe tedlinear-time omplexity, the linearity fa tor being asymptoti ally proportional to c α .Moreover, in the worst ase of triangulations where j = 2 i − , the mean numberof reje tions is quadrati , so that the sampling omplexity is ubi .Proof. These asymptoti results are easy onsequen es of the expression of |D ′ ij | obtained in Corollary 4.9 and of the asymptoti result |P ′ ij | ∼ ij (cid:0) i − j +2 (cid:1)(cid:0) j − i +2 (cid:1) given in [Bender 1987℄.7. APPLICATION: CODING 3-CONNECTED MAPSThis se tion introdu es an algorithm, derived from the inverse of the losure map-ping, to en ode a 3- onne ted map. Pre isely, the algorithm en odes an outer-triangular 3- onne ted map, but it is then easily extended to en ode any 3- onne tedmap. Indeed, if the outer fa e of G is not triangular, (cid:28)x three onse utive verti es v , v ′ and v ′′ in ident to the outer fa e of G and link v and v ′′ by an edge to obtainan outer-triangular 3- onne ted planar map e G ; the oding of G is obtained as the oding of e G plus one bit indi ating if an edge-addition has been done.7.1 Des ription of the oding algorithmLet G be an outer-triangular 3- onne ted map and let G ′ be its derived map, asde(cid:28)ned in Se tion 3.2. The oding algorithm relies on the following steps, illustratedin Figure 11. ACM Journal Name, Vol. V, No. N, Month 20YY.2 · Éri Fusy et al. a a a (a) a a a (b) a a a ( ) a a a (d)(e) (f)Fig. 11. Exe ution of the en oding algorithm on an example.7.1.1 Compute a parti ular orientation of the derived map G ′ (Fig. 11(b)-( )). The(cid:28)rst step of the algorithm is to ompute a spe i(cid:28) orientation X of the edges ofthe derived map G ′ , su h that X has no lo kwise ir uit, ea h primal or dualvertex has outdegree 3 and ea h edge-vertex has outdegree 1. Su h an orientationof G ′ exists and is unique, as we will see in Theorem 8.1. A linear time algorithmto ompute X is given in Se tion 9.7.1.2 Compute the irredu ible disse tion D asso iated to G (Fig. 11(d)). Considerthe bi olored omplete irredu ible disse tion D asso iated to G by the bije tionACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· G . Noti e that D has n inner fa es if G has n edges. Hen e,a ording to Euler's relation, D has n − inner verti es. Similarly, if G has i verti esand j inner fa es, then D has i bla k verti es and j + 3 white verti es.7.1.3 Compute the tri-orientation of D without lo kwise ir uit (Fig. 11(d)). Weorient ea h half-edge h of D belonging to an inner edge as follows: h is dire tedinward if its in ident vertex belongs to the hexagon; otherwise, h re eives the ori-entation of the w-following edge of G ′ . As shown in Se tion 8 (more pre isely inLemma 8.13, omposed with the orresponden e of Figure 13), this pro ess yieldsthe unique tri-orientation of D without lo kwise ir uit.7.1.4 Open the disse tion D into a binary tree T (Fig. 11(f)). On e the tri-orientationwithout lo kwise ir uit is omputed, D is opened into a binary tree T , by deletingouter verti es, outer edges, and all ingoing half-edges (see Se tion 4.2).7.1.5 En ode the tree T . First, hoose an arbitrary leaf of T , root T at this leaf,and en ode the obtained rooted binary tree using a parenthesis word (also alledDy k word ). The opening of a 3- onne ted map with n edges is a binary tree with n − inner nodes, yielding an en oding Dy k word of length n − .Similarly, the opening of a 3- onne ted map with i verti es and j inner fa es isa bla k-rooted bi olored binary tree with i − bla k nodes and j white nodes. Abla k-rooted bi olored binary trees with a given number of bla k and white nodesis en oded by a pair of words, as explained in Se tion 4.5.1. Then the two words an be asymptoti ally optimally en oded in linear time, a ording to [Boni hon etal. 2003, Lem.7℄.Theorem 7.1. The oding algorithm has linear-time omplexity and is asymp-toti ally optimal: the number of bits per edge of the ode of a map in P ′ n (resp. in P ′ ij ) is asymptoti ally equal to the binary entropy per edge, de(cid:28)ned as n log ( |P ′ n | ) (resp. i + j − log ( |P ′ ij | ) ).Proof. It is lear that the en oding algorithm has linear-time omplexity, pro-vided the algorithm omputing the onstrained orientation without lo kwise ir uitof the derived map has linear-time omplexity (whi h will be proved in Se tion 9and Se tion 10).A ording to Corollary 4.9, Proposition 6.1 and 6.2, |B ′ n | / |P ′ n | and |B • ij | / |P ′ ij | are bounded by (cid:28)xed polynomials. Hen e, the entropy per edge of B ′ n and P ′ n areasymptoti ally equal, and the binary entropy per edge of B • ij and P ′ ij are asymp-toti ally equal. As the en oding of obje ts of B ′ n ( B • ij ) using parenthesis words isasymptoti ally optimal, the en oding of obje ts of P ′ n ( P ′ ij , respe tively) is alsoasymptoti ally optimal.8. PROOF OF THEOREM 4.4This se tion is devoted to the proof of Theorem 4.4, whi h states that ea h irre-du ible disse tion has a unique tri-orientation without lo kwise ir uit.ACM Journal Name, Vol. V, No. N, Month 20YY.4 · Éri Fusy et al.8.1 α -orientations and outline of the proofDe(cid:28)nition. Let G = ( V, E ) be a planar map. Consider a fun tion α : V → N . An α -orientation of G is an orientation of the edges of G su h that the outdegree ofea h vertex v of G is α ( v ) . If an α -orientation exists, then the fun tion α is said tobe feasible for G .Existen e and uniqueness of α -orientations. The following results are proved in [Fel-sner 2004℄ (the (cid:28)rst point had already been proved in [Ossona de Mendez 1994℄):Theorem 8.1 ([Felsner 2004℄). Given a planar map G and a feasible fun -tion α , there exists a unique α -orientation of G without lo kwise ir uit. This α -orientation is alled the minimal 1 α -orientation of G .Given the derived map of an outer-triangular 3- onne ted planar map, the fun -tion α su h that α ( v ) = 3 for all primal and dual verti es and α ( v ) = 1 for alledge-verti es is a feasible fun tion.Theorem 8.1 ensures uniqueness of the orientation without lo kwise ir uit of agraph with pres ribed outdegree for ea h vertex. However, this property does notdire tly imply uniqueness in Theorem 4.4, be ause a tri-orientation has bi-orientededges.To use Theorem 8.1, we work with the derived map G ′ of an irredu ible disse -tion D , as de(cid:28)ned in Se tion 3.3. We have de(cid:28)ned derived maps only for a subset ofirredu ible disse tions, namely for bi olored omplete irredu ible disse tions (re allthat these are bi olored disse tions su h that the 3 outer white verti es have de-gree 2). As a onsequen e, a (cid:28)rst step toward proving Theorem 4.4 is to redu e itsproof to the proof of existen e and uniqueness of a so- alled omplete-tri-orientation(a slight adaptation of the de(cid:28)nition of tri-orientation) without lo kwise ir uit forany bi olored omplete irredu ible disse tion.We prove that a omplete-tri-orientation without lo kwise ir uit of a bi olored omplete irredu ible disse tion D is transposed inje tively into an α -orientationwithout lo kwise ir uit of its derived map G ′ . By inje tivity and by uniquenessof the α -orientation without lo kwise ir uit of G ′ , this implies uniqueness of atri-orientation without lo kwise ir uit for D .The (cid:28)nal step will be to prove that an α -orientation without lo kwise ir uit of G ′ is transposed into a omplete-tri-orientation without lo kwise ir uit of D . Byexisten e of an α -orientation without lo kwise ir uit for G ′ (Theorem 8.1), thisimplies the existen e of a omplete-tri-orientation without lo kwise ir uit of D .8.2 Redu tion to the ase of bi olored omplete disse tionsIntrodu tion. The aim of this se tion is to redu e the proof of Theorem 4.4 to the lass of omplete bi olored irredu ible disse tions. We state the following propo-sition where the term (cid:16) omplete-tri-orientation(cid:17), to be de(cid:28)ned later, is a slightadaptation of the notion of tri-orientation.Proposition 8.2. The existen e and uniqueness of a omplete-tri-orientationwithout lo kwise ir uit for any bi olored omplete irredu ible disse tion implies The term minimal refers to the fa t that the set of all α -orientations of G forms a distributivelatti e, the (cid:16)(cid:29)ip(cid:17) operation being a ir uit reversion.ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· D , we de(cid:28)ne its ompleted disse tion D c as follows . For ea h white vertex v of the hexagon, we denote by e l ( v ) ( e r ( v ) ) the outer edge starting from v withthe interior of the hexagon on the left (right, respe tively) and denote by l ( v ) and r ( v ) the neighbours of v in ident to e l ( v ) and to e r ( v ) . We perform the followingoperation: if v has degree at least 3, a new white vertex v ′ is reated outside of thehexagon and is linked to l ( v ) and to r ( v ) by two new edges e l ( v ′ ) and e r ( v ′ ) , seeFigure 12. The vertex v ′ is said to over the vertex v .The disse tion obtained is a bi olored disse tion of the hexagon su h that thethree white verti es of the hexagon have two in ident edges, see the transitionbetween Figure 13(a) and Figure 13(b) (ignore here the orientation of edges).Lemma 8.3. The ompletion D c of a bi olored irredu ible disse tion D is a bi- olored omplete irredu ible disse tion.Proof. The outer white verti es of D c have degree 2 by onstru tion. Hen e,we just have to prove that D c is irredu ible. As D is irredu ible, if a separating4- y le C appears in D c when the ompletion is performed, then it must ontain awhite vertex v ′ of the hexagon of D c added during the ompletion, so as to overan outer white vertex v of degree greater than 2. Two edges of C are the edges e l ( v ′ ) and e r ( v ′ ) in ident to v ′ in D c . The two other edges ǫ and ǫ of C form apath of length 2 onne ting the verti es l ( v ) and r ( v ) and passing by the interiorof D (otherwise, C would en lose a fa e). As D is irredu ible, the 4- y le C ′ of D onsisting of the edges e l ( v ) , e r ( v ) , ǫ and ǫ delimits a fa e. Hen e e l ( v ) and e r ( v ) are in ident to the same inner fa e of D , whi h implies that v has degree 2, a ontradi tion.Tri-orientations. Let D be a bi olored irredu ible disse tion and let D c be its om-pleted bi olored disse tion. We de(cid:28)ne a mapping Φ from the tri-orientations of D c to the tri-orientations of D . Given a tri-orientation Y of D c , we remove the edgesthat have been added to obtain D c from D , erase the orientation of the edges ofthe hexagon of D , and orient inward all inner half-edges in ident to an outer ver-tex of D . We obtain thus a tri-orientation Φ( Y ) of D , see the transition betweenFigure 13(b) and Figure 13(a).Lemma 8.4. Let Y be a tri-orientation of D c without lo kwise ir uit. Thenthe tri-orientation Φ( Y ) of D has no lo kwise ir uit.For ea h tri-orientation X of D without lo kwise ir uit, there exists a tri-orientation Y of D c without lo kwise ir uit su h that Φ( Y ) = X .ACM Journal Name, Vol. V, No. N, Month 20YY.6 · Éri Fusy et al. e l ( v ) e r ( v ) vl ( v ) r ( v ) h h h h h e l ( v ) e r ( v ) vl ( v ) r ( v ) h h h h h e l ( v ′ ) e r ( v ′ ) v ′ f Fig. 12. From a tri-orientation X of D without lo kwise ir uit, onstru tion of a tri-orientation Y of D c without lo kwise ir uit su h that Φ( Y ) = X .Proof. The (cid:28)rst point is trivial, as the tri-orientation Φ( Y ) is just obtained byremoving some edges and some orientations of half-edges.For the se ond point, the preimage Y is onstru ted as follows. Consider ea hwhite vertex v of the hexagon of D whi h has degree at least 3. Let ( h , . . . , h m ) ( m ≥ be the series of half-edges in ident to v in D in ounter- lo kwise orderaround v , with h and h belonging respe tively to the edges e r ( v ) and e l ( v ) . As m ≥ , the vertex v gives rise to a overing vertex v ′ with two in ident edges e l ( v ′ ) and e r ( v ′ ) su h that the edges e l ( v ) , e r ( v ) , e l ( v ′ ) and e r ( v ′ ) form a new fa e f . Theedges e l ( v ) and e r ( v ) be ome inner edges of D c when v ′ is added, and have thus tobe dire ted.We orient the two half-edges of e l ( v ) and e r ( v ) respe tively toward l ( v ) andtoward r ( v ) , see Figure 12. The vertex v re eives thus two outgoing half-edges, andwe have to give to v a third outgoing half-edge. The suitable hoi e to avoid theappearan e of a lo kwise ir uit is to orient h outward, see Figure 12. Indeed,assume a ontrario that a simple lo kwise ir uit C is reated. Then the ir uitmust pass by v . It goes into v using one of the half-edges h i dire ted toward v , i.e., i ≥ . Moreover, it must go out of v using the half-edge h (indeed, if the ir uituses h or h to go out of v , then it rea hes an outer vertex, whi h has outdegree0). Hen e, the interior of the lo kwise ir uit C must ontain all fa es in identto v that are on the right of v when we traverse v from h i and go out using h .Hen e, the interior of C must ontain the new fa e f of D c , see Figure 12. But f is in ident to outer edges of D c , hen e the lo kwise ir uit C must pass by outeredges of D c , whi h are not oriented, a ontradi tion. Thus, we have onstru teda tri-orientation Y of D c without lo kwise ir uit and su h that Φ( Y ) = X . Anexample of this onstru tion an be seen as the transition between Figure 13(a)and Figure 13(b).Lemma 8.5. The existen e and uniqueness of a tri-orientation without lo k-wise ir uit for any bi olored omplete irredu ible disse tion implies the existen eand uniqueness of a tri-orientation without lo kwise ir uit for any irredu ibledisse tion, i.e., implies Theorem 4.4.Proof. This is a lear onsequen e of Lemma 8.3 and Lemma 8.4.Complete-tri-orientations. A omplete-tri-orientation of a bi olored omplete irre-du ible disse tion D is an orientation of the half-edges of D that satis(cid:28)es the fol-lowing onditions (very similar to the onditions of a tri-orientation): all bla kverti es and all inner white verti es of D have outdegree 3, the three white verti esACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· D endowed with a tri-orientation X without lo kwise ir uit (Figure a). The asso iated ompleted disse tion D c (the two added white verti es aresurrounded) endowed with the tri-orientation Y su h that Φ( Y ) = X (Figure b). The disse tion D c endowed with the omplete-tri-orientation Z su h that Ψ( Z ) = Y (Figure ).of the hexagon have outdegree 0, and the two half-edges of an edge of D an notboth be oriented inward. The di(cid:27)eren e with the de(cid:28)nition of tri-orientation isthat the half-edges of the hexagon are oriented, with pres ribed outdegree for theouter verti es. Similarly as in a tri-orientation, edges of D are distinguished intosimply-oriented edges and bi-oriented edges.Lemma 8.6. Let D ∈ D n be a bi olored omplete irredu ible disse tion endowedwith a omplete-tri-orientation without lo kwise ir uit. Then the subgraph T of D onsisting of the bi-oriented edges of D is a tree in ident to all verti es of D ex ept the three outer white verti es.Proof. We reason similarly as in Lemma 4.2. Let r and s be the numbers of bi-oriented and simply oriented edges of D . From Euler's relation (using the degreesof the fa es of D ), D has n + 7 edges, i.e., r + s = 2 n + 7 . In addition, the n inner verti es and the three bla k (resp. white) verti es of the hexagon of D haveoutdegree 3 (resp. 0). Hen e, r + s = 3( n + 3) . Thus, r = n + 2 and s = n + 5 .Hen e, the subgraph T has n + 2 edges, has no y le (otherwise, a lo kwise ir uitof D would exist), and is in ident to at most ( n + 3) verti es, whi h are the innerverti es and the three outer bla k verti es of D . A lassi al result of graph theoryensures that T is a tree spanning these ( n + 3) verti es.Lemma 8.7. Let D ∈ D n be a bi olored omplete irredu ible disse tion endowedwith a omplete-tri-orientation Z without lo kwise ir uit. Then, for ea h outerbla k vertex v of D , the unique outgoing inner half-edge in ident to v belongs to abi-oriented edge.Proof. The subgraph T onsisting of the bi-oriented edges of D is a tree span-ning all verti es of D ex ept the three outer white verti es. Hen e, there is abi-oriented edge e in ident to ea h bla k vertex v of the hexagon and this edge onsitutes the third outgoing edge of v .Let D be a bi olored omplete irredu ible disse tion and Z be a omplete-tri-orientation of D without lo kwise ir uit. We asso iate to Z a tri-orientation Ψ( Z ) as follows: erase the orientation of the edges of the hexagon of D ; for ea h bla kACM Journal Name, Vol. V, No. N, Month 20YY.8 · Éri Fusy et al.(a) (b) ( )Fig. 14. The onstru tion of the derived map of a bi olored omplete irredu ible disse tion. Thedisse tion is endowed with a omplete-tri-orientation without lo kwise ir uit, and the derivedmap is endowed with the orientation obtained using the transposition rules for orientations.vertex v of the hexagon, hange the orientation of the unique outgoing inner half-edge h of v . A ording to Lemma 8.7, h belongs to a bi-oriented edge e , so thatthe hange of orientation of h turns e into an edge simply oriented toward v . Thus,the obtained orientation Ψ( Z ) is a tri-orientation.Lemma 8.8. Let D be a bi olored omplete irredu ible disse tion. Let Z be a omplete-tri-orientation of D without lo kwise ir uit. Then the tri-orientation Ψ( Z ) of D has no lo kwise ir uit.For ea h tri-orientation Y of D without lo kwise ir uit, there exists a omplete-tri-orientation Z of D without lo kwise ir uit su h that Ψ( Z ) = Y .Proof. The (cid:28)rst point is trivial. For the se ond point, we reason similarly as inLemma 8.4. For ea h bla k vertex v of the hexagon of D , let ( h , . . . , h m ) ( m ≥ be the sequen e of half-edges of D in ident to v in ounter- lo kwise order around v , with h and h belonging to the two outer edges e r ( v ) and e l ( v ) of D that arein ident to v . To onstru t the preimage Z of Y , we make the edges e l ( v ) and e r ( v ) simply oriented toward their in ident white vertex. The third outgoing half-edge is hosen to be h , whi h is the (cid:16)leftmost(cid:17) inner half-edge of v . An argument similar asin the proof of the se ond point of Lemma 8.4 ensures that this hoi e is judi ious toavoid the reation of a lo kwise ir uit. An example of this onstru tion is shownin Figure 13(b)-( ).Finally, Proposition 8.2 follows dire tly from Lemma 8.5 and Lemma 8.8.Proposition 8.5 redu es the proof of Theorem 4.4 to proving the existen e anduniqueness of a omplete-tri-orientation without w ir uit for any bi olored om-plete irredu ible disse tion. From now on, we will work with these disse tions.8.3 Transposition rules for orientationsLet D be a bi olored omplete irredu ible disse tion and let G ′ be the derived mapof D . We asso iate to a omplete-tri-orientation of D an orientation of the edgesof G ′ of D as follows, see Figure 14: ea h edge e = ( v, v ′ ) (cid:22)with v the primal/dualvertex and v ′ the edge-vertex(cid:22) re eives the dire tion of the half-edge of D following e in w order around v .ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· D be a bi olored omplete irredu ible disse tion endowed witha omplete-tri-orientation without lo kwise ir uit. Then the orientation of thederived map G ′ of D obtained using the transposition rules has the following prop-erties:(cid:22)ea h primal or dual vertex of G ′ has outdegree 3.(cid:22)ea h edge-vertex of G ′ has outdegree 1.In other words, the orientation of G ′ obtained by applying the transposition rules isan α -orientation.Proof. The (cid:28)rst point is trivial. For the se ond point, let f be an inner fa eof D and v f the asso iated edge-vertex of G ′ (we re all that v f is the interse tionof the two diagonals of f ). The transposition rules for orientation ensures thatthe outdegree of v f in G ′ is the number n f of inward half-edges of D in ident to f . Hen e, to prove that ea h edge-vertex of G ′ has outdegree 1, we have to provethat n f = 1 for ea h inner fa e f of D . Observe that n f is a positive number,otherwise the ontour of f would be a lo kwise ir uit. Let n be the number ofinner verti es of D . Euler's relation implies that D has ( n + 2) inner fa es and (4 n + 14) half-edges. By de(cid:28)nition of a omplete-tri-orientation, n + 3) half-edgesare outgoing. Hen e, ( n + 5) half-edges are ingoing. Among these ( n + 5) ingoinghalf-edges, exa tly three are in ident to the outer fa e (see Figure 13( )). Hen e, D has ( n + 2) half-edges in ident to an inner fa e, so that P f n f = n + 2 . As P f n f is a sum of ( n + 2) positive numbers adding to ( n + 2) , the pigeonhole's prin ipleensures that n f = 1 for ea h inner fa e f of D .8.4 Uniqueness of a tri-orientation without lo kwise ir uitThe following lemma is the ompanion of Lemma 8.9 and is ru ial to establishthe uniqueness of a tri-orientation without lo kwise ir uit for any irredu ibledisse tion.Lemma 8.10. Let D be a bi olored omplete irredu ible disse tion endowed witha omplete-tri-orientation Z without lo kwise ir uit. Let G ′ be the derived mapof D . Then the α -orientation X of G ′ obtained from Z by the transposition ruleshas no lo kwise ir uit.Proof. Assume that X has a lo kwise ir uit C . Ea h edge of G ′ onne ts anedge-vertex and a vertex of the original disse tion D . Hen e, the ir uit C onsistsof a sequen e of pairs ( e, e ) of onse utive edges of G ′ su h that e goes from a vertex v of the disse tion toward an edge-vertex v ′ of G ′ and e goes from v ′ toward a vertex v of the disse tion. Let ( e ′ , . . . , e ′ m ) be the sequen e of edges of G ′ between e and e in lo kwise order around v ′ , so that e ′ = e ; and e ′ m = e and let ( v , . . . , v m ) betheir respe tive extremities, so that v = v and v m = v . Noti e that ≤ m ≤ .As ea h edge-vertex has outdegree 1 in X and as e ′ m is going out of v ′ , the edges e ′ , . . . , e ′ m − are dire ted toward v ′ . Hen e, the transposition rules for orientationsensure that the edges ( v i , v i +1 ) , for ≤ i ≤ m − , are all bi-oriented or orientedfrom v i to v i +1 in the omplete-tri-orientation Z of D . Hen e, we an go from v to v passing by the exterior of C and using only edges of D , see Figure 15 for anexample, where m = 3 . ACM Journal Name, Vol. V, No. N, Month 20YY.0 · Éri Fusy et al. ev e vv v ′ C eev v ′ v Fig. 15. An oriented path of edges of the disse tion an be asso iated to ea h pair ( e, e ) of onse utive edges of C sharing an edge-vertex. Fig. 16. A simple lo kwise ir uit an be extra ted from an oriented path en losing a boundedsimply onne ted region on its right.Con atenating the paths of edges of D asso iated to ea h pair ( e, e ) of C , we obtaina losed oriented path of edges of D en losing the interior of C on its right. Clearly,a simple lo kwise ir uit an be extra ted from this losed path, see Figure 16. Asthe omplete-tri-orientation Z has no lo kwise ir uit, this yields a ontradi tion.Proposition 8.11. Ea h irredu ible disse tion has at most one tri-orientationwithout lo kwise ir uit.Proof. Let D be a bi olored omplete irredu ible disse tion and G ′ its derivedmap. A (cid:28)rst important remark is that the transposition rules for orientations learlyde(cid:28)ne an inje tive mapping. In addition, Lemma 8.10 ensures that the image of a omplete-tri-orientation of D without lo kwise ir uit is an α -orientation of G ′ without lo kwise ir uit. Hen e, inje tivity of the mapping and uniqueness of an α -orientation without lo kwise ir uit of G ′ (Theorem 8.1) ensure that D has atmost one omplete-tri-orientation without lo kwise ir uit. Hen e, Proposition 8.2implies that ea h irredu ible disse tion has at most one tri-orientation without lo kwise ir uit.8.5 Existen e of a tri-orientation without lo kwise ir uitInverse of the transposition rules. Let D be a bi olored omplete irredu ible disse -tion and G ′ its derived map. Given an α -orientation of G ′ , we asso iate to thisorientation an orientation of the half-edges of D by performing the inverse of thetransposition rules: ea h half-edge h of D re eives the orientation of the edge of G ′ that follows h in lo kwise order around its in ident vertex, see Figure 14(b).Lemma 8.12. Let D be an irredu ible disse tion and G ′ the derived map of D ,endowed with its minimal α -orientation. Then the inverse of the transpositionrules for orientations yields a omplete-tri-orientation of D .ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ··
11 + x • + x ◦ + 2 x • x ◦ + x • x ◦ ( r + r − r r ) , (10)where (cid:26) r ( x • , x ◦ ) = x • (1 + r ( x • , x ◦ )) r ( x • , x ◦ ) = x ◦ (1 + r ( x • , x ◦ )) .Proof. Lemma 5.1 ensures that P n |P ′ n +2 | x n = x U ( x ) and, more pre isely, P i,j |P ′ i +2 ,j +2 | x i • x j ◦ = x • x ◦ U ( x • , x ◦ ) . Moreover, Equations (8) and Equation (9)yield expressions of x U ( x ) and x • x ◦ U ( x • , x ◦ ) respe tively in terms of D ( x ) and D ( x • , x ◦ ) . In these expressions, repla e D ( x ) and D ( x • , x ◦ ) by their respe tiveexpression in terms of r and of r and r , as given by Equations (6) and (7).6. APPLICATION: SAMPLING ROOTED 3-CONNECTED MAPS6.1 Sampling rooted 3- onne ted maps with n edgesTheorem 4.8 ((cid:28)rst identity) ensures that the following algorithm samples rooted3- onne ted maps with n edges uniformly at random:(1) Sample an obje t T ∈ B ′ n − uniformly (e.g. using parenthesis words).(2) Perform the losure of T to obtain an irredu ible disse tion D with ( n − verti es. Choose randomly one of the six edges of the hexagon of D to arrythe root. If D is not unde omposable, then reje t and restart.(3) Conne t by a new edge e the root-vertex of D to the opposite outer vertex.Take e as root edge, with the same root-vertex as in D . This gives a rootedirredu ible quadrangulation Q with n fa es.(4) Return the rooted 3- onne ted map in P ′ n asso iated to Q by the angularmapping.Proposition 6.1. The su ess probability of the sampler at ea h trial is equalto |P ′ n | / |D ′ n − | , whi h satis(cid:28)es |P ′ n ||D ′ n − | → n →∞ . Hen e, the number of reje tions follows a geometri law whose mean is asymptoti- ally c = 3 / . As the losure mapping has linear-time omplexity, the samplingalgorithm has expe ted linear-time omplexity.Proof. A ording to Se tion 4.3, |D ′ n | = n +2 |B ′ n | = n )!( n +2)! n ! . Stirling formulayields |D ′ n − | ∼ √ π n n / . Moreover, a ording to [Tutte 1963℄, |P ′ n | ∼ √ π n n / .This yields the limit of |P ′ n | / |D ′ n − | .ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· i verti es and j fa esSimilarly, Theorem 4.8 (third identity), ensures that the following algorithm sam-ples rooted 3- onne ted maps with i verti es and j fa es uniformly at random:(1) Sample an obje t T ∈ B • i − ,j − uniformly at random. A simple method isdes ribed in Se tion 4.5.2.(2) Perform the losure of T to obtain an irredu ible disse tion D with ( i − inner bla k verti es and ( j − inner white verti es. Choose randomly theroot-vertex among the three bla k verti es of the hexagon. If the disse tion isnot unde omposable, then reje t and restart.(3) Conne t by a new edge e the root-vertex of D to the opposite outer vertex.Take e as root edge, with the same root-vertex as in D . This gives a rootedirredu ible quadrangulation Q with i bla k verti es and j white verti es.(4) Return the rooted 3- onne ted map in P ′ ij asso iated to Q by the angularmapping.Proposition 6.2. The su ess probability of the sampler at ea h trial is equalto |P ′ ij | / |D ′ i − ,j − | . Let α ∈ ]1 / , ; if i and j are orrelated by ij → α as i → ∞ ,then |P ′ ij ||D ′ i − ,j − | ∼ (2 − α ) (2 α − α =: 1 c α . Hen e, when ij → α , the number of reje tions follows a geometri law whose mean isasymptoti ally c α . Under these onditions, the sampling algorithm has an expe tedlinear-time omplexity, the linearity fa tor being asymptoti ally proportional to c α .Moreover, in the worst ase of triangulations where j = 2 i − , the mean numberof reje tions is quadrati , so that the sampling omplexity is ubi .Proof. These asymptoti results are easy onsequen es of the expression of |D ′ ij | obtained in Corollary 4.9 and of the asymptoti result |P ′ ij | ∼ ij (cid:0) i − j +2 (cid:1)(cid:0) j − i +2 (cid:1) given in [Bender 1987℄.7. APPLICATION: CODING 3-CONNECTED MAPSThis se tion introdu es an algorithm, derived from the inverse of the losure map-ping, to en ode a 3- onne ted map. Pre isely, the algorithm en odes an outer-triangular 3- onne ted map, but it is then easily extended to en ode any 3- onne tedmap. Indeed, if the outer fa e of G is not triangular, (cid:28)x three onse utive verti es v , v ′ and v ′′ in ident to the outer fa e of G and link v and v ′′ by an edge to obtainan outer-triangular 3- onne ted planar map e G ; the oding of G is obtained as the oding of e G plus one bit indi ating if an edge-addition has been done.7.1 Des ription of the oding algorithmLet G be an outer-triangular 3- onne ted map and let G ′ be its derived map, asde(cid:28)ned in Se tion 3.2. The oding algorithm relies on the following steps, illustratedin Figure 11. ACM Journal Name, Vol. V, No. N, Month 20YY.2 · Éri Fusy et al. a a a (a) a a a (b) a a a ( ) a a a (d)(e) (f)Fig. 11. Exe ution of the en oding algorithm on an example.7.1.1 Compute a parti ular orientation of the derived map G ′ (Fig. 11(b)-( )). The(cid:28)rst step of the algorithm is to ompute a spe i(cid:28) orientation X of the edges ofthe derived map G ′ , su h that X has no lo kwise ir uit, ea h primal or dualvertex has outdegree 3 and ea h edge-vertex has outdegree 1. Su h an orientationof G ′ exists and is unique, as we will see in Theorem 8.1. A linear time algorithmto ompute X is given in Se tion 9.7.1.2 Compute the irredu ible disse tion D asso iated to G (Fig. 11(d)). Considerthe bi olored omplete irredu ible disse tion D asso iated to G by the bije tionACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· G . Noti e that D has n inner fa es if G has n edges. Hen e,a ording to Euler's relation, D has n − inner verti es. Similarly, if G has i verti esand j inner fa es, then D has i bla k verti es and j + 3 white verti es.7.1.3 Compute the tri-orientation of D without lo kwise ir uit (Fig. 11(d)). Weorient ea h half-edge h of D belonging to an inner edge as follows: h is dire tedinward if its in ident vertex belongs to the hexagon; otherwise, h re eives the ori-entation of the w-following edge of G ′ . As shown in Se tion 8 (more pre isely inLemma 8.13, omposed with the orresponden e of Figure 13), this pro ess yieldsthe unique tri-orientation of D without lo kwise ir uit.7.1.4 Open the disse tion D into a binary tree T (Fig. 11(f)). On e the tri-orientationwithout lo kwise ir uit is omputed, D is opened into a binary tree T , by deletingouter verti es, outer edges, and all ingoing half-edges (see Se tion 4.2).7.1.5 En ode the tree T . First, hoose an arbitrary leaf of T , root T at this leaf,and en ode the obtained rooted binary tree using a parenthesis word (also alledDy k word ). The opening of a 3- onne ted map with n edges is a binary tree with n − inner nodes, yielding an en oding Dy k word of length n − .Similarly, the opening of a 3- onne ted map with i verti es and j inner fa es isa bla k-rooted bi olored binary tree with i − bla k nodes and j white nodes. Abla k-rooted bi olored binary trees with a given number of bla k and white nodesis en oded by a pair of words, as explained in Se tion 4.5.1. Then the two words an be asymptoti ally optimally en oded in linear time, a ording to [Boni hon etal. 2003, Lem.7℄.Theorem 7.1. The oding algorithm has linear-time omplexity and is asymp-toti ally optimal: the number of bits per edge of the ode of a map in P ′ n (resp. in P ′ ij ) is asymptoti ally equal to the binary entropy per edge, de(cid:28)ned as n log ( |P ′ n | ) (resp. i + j − log ( |P ′ ij | ) ).Proof. It is lear that the en oding algorithm has linear-time omplexity, pro-vided the algorithm omputing the onstrained orientation without lo kwise ir uitof the derived map has linear-time omplexity (whi h will be proved in Se tion 9and Se tion 10).A ording to Corollary 4.9, Proposition 6.1 and 6.2, |B ′ n | / |P ′ n | and |B • ij | / |P ′ ij | are bounded by (cid:28)xed polynomials. Hen e, the entropy per edge of B ′ n and P ′ n areasymptoti ally equal, and the binary entropy per edge of B • ij and P ′ ij are asymp-toti ally equal. As the en oding of obje ts of B ′ n ( B • ij ) using parenthesis words isasymptoti ally optimal, the en oding of obje ts of P ′ n ( P ′ ij , respe tively) is alsoasymptoti ally optimal.8. PROOF OF THEOREM 4.4This se tion is devoted to the proof of Theorem 4.4, whi h states that ea h irre-du ible disse tion has a unique tri-orientation without lo kwise ir uit.ACM Journal Name, Vol. V, No. N, Month 20YY.4 · Éri Fusy et al.8.1 α -orientations and outline of the proofDe(cid:28)nition. Let G = ( V, E ) be a planar map. Consider a fun tion α : V → N . An α -orientation of G is an orientation of the edges of G su h that the outdegree ofea h vertex v of G is α ( v ) . If an α -orientation exists, then the fun tion α is said tobe feasible for G .Existen e and uniqueness of α -orientations. The following results are proved in [Fel-sner 2004℄ (the (cid:28)rst point had already been proved in [Ossona de Mendez 1994℄):Theorem 8.1 ([Felsner 2004℄). Given a planar map G and a feasible fun -tion α , there exists a unique α -orientation of G without lo kwise ir uit. This α -orientation is alled the minimal 1 α -orientation of G .Given the derived map of an outer-triangular 3- onne ted planar map, the fun -tion α su h that α ( v ) = 3 for all primal and dual verti es and α ( v ) = 1 for alledge-verti es is a feasible fun tion.Theorem 8.1 ensures uniqueness of the orientation without lo kwise ir uit of agraph with pres ribed outdegree for ea h vertex. However, this property does notdire tly imply uniqueness in Theorem 4.4, be ause a tri-orientation has bi-orientededges.To use Theorem 8.1, we work with the derived map G ′ of an irredu ible disse -tion D , as de(cid:28)ned in Se tion 3.3. We have de(cid:28)ned derived maps only for a subset ofirredu ible disse tions, namely for bi olored omplete irredu ible disse tions (re allthat these are bi olored disse tions su h that the 3 outer white verti es have de-gree 2). As a onsequen e, a (cid:28)rst step toward proving Theorem 4.4 is to redu e itsproof to the proof of existen e and uniqueness of a so- alled omplete-tri-orientation(a slight adaptation of the de(cid:28)nition of tri-orientation) without lo kwise ir uit forany bi olored omplete irredu ible disse tion.We prove that a omplete-tri-orientation without lo kwise ir uit of a bi olored omplete irredu ible disse tion D is transposed inje tively into an α -orientationwithout lo kwise ir uit of its derived map G ′ . By inje tivity and by uniquenessof the α -orientation without lo kwise ir uit of G ′ , this implies uniqueness of atri-orientation without lo kwise ir uit for D .The (cid:28)nal step will be to prove that an α -orientation without lo kwise ir uit of G ′ is transposed into a omplete-tri-orientation without lo kwise ir uit of D . Byexisten e of an α -orientation without lo kwise ir uit for G ′ (Theorem 8.1), thisimplies the existen e of a omplete-tri-orientation without lo kwise ir uit of D .8.2 Redu tion to the ase of bi olored omplete disse tionsIntrodu tion. The aim of this se tion is to redu e the proof of Theorem 4.4 to the lass of omplete bi olored irredu ible disse tions. We state the following propo-sition where the term (cid:16) omplete-tri-orientation(cid:17), to be de(cid:28)ned later, is a slightadaptation of the notion of tri-orientation.Proposition 8.2. The existen e and uniqueness of a omplete-tri-orientationwithout lo kwise ir uit for any bi olored omplete irredu ible disse tion implies The term minimal refers to the fa t that the set of all α -orientations of G forms a distributivelatti e, the (cid:16)(cid:29)ip(cid:17) operation being a ir uit reversion.ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· D , we de(cid:28)ne its ompleted disse tion D c as follows . For ea h white vertex v of the hexagon, we denote by e l ( v ) ( e r ( v ) ) the outer edge starting from v withthe interior of the hexagon on the left (right, respe tively) and denote by l ( v ) and r ( v ) the neighbours of v in ident to e l ( v ) and to e r ( v ) . We perform the followingoperation: if v has degree at least 3, a new white vertex v ′ is reated outside of thehexagon and is linked to l ( v ) and to r ( v ) by two new edges e l ( v ′ ) and e r ( v ′ ) , seeFigure 12. The vertex v ′ is said to over the vertex v .The disse tion obtained is a bi olored disse tion of the hexagon su h that thethree white verti es of the hexagon have two in ident edges, see the transitionbetween Figure 13(a) and Figure 13(b) (ignore here the orientation of edges).Lemma 8.3. The ompletion D c of a bi olored irredu ible disse tion D is a bi- olored omplete irredu ible disse tion.Proof. The outer white verti es of D c have degree 2 by onstru tion. Hen e,we just have to prove that D c is irredu ible. As D is irredu ible, if a separating4- y le C appears in D c when the ompletion is performed, then it must ontain awhite vertex v ′ of the hexagon of D c added during the ompletion, so as to overan outer white vertex v of degree greater than 2. Two edges of C are the edges e l ( v ′ ) and e r ( v ′ ) in ident to v ′ in D c . The two other edges ǫ and ǫ of C form apath of length 2 onne ting the verti es l ( v ) and r ( v ) and passing by the interiorof D (otherwise, C would en lose a fa e). As D is irredu ible, the 4- y le C ′ of D onsisting of the edges e l ( v ) , e r ( v ) , ǫ and ǫ delimits a fa e. Hen e e l ( v ) and e r ( v ) are in ident to the same inner fa e of D , whi h implies that v has degree 2, a ontradi tion.Tri-orientations. Let D be a bi olored irredu ible disse tion and let D c be its om-pleted bi olored disse tion. We de(cid:28)ne a mapping Φ from the tri-orientations of D c to the tri-orientations of D . Given a tri-orientation Y of D c , we remove the edgesthat have been added to obtain D c from D , erase the orientation of the edges ofthe hexagon of D , and orient inward all inner half-edges in ident to an outer ver-tex of D . We obtain thus a tri-orientation Φ( Y ) of D , see the transition betweenFigure 13(b) and Figure 13(a).Lemma 8.4. Let Y be a tri-orientation of D c without lo kwise ir uit. Thenthe tri-orientation Φ( Y ) of D has no lo kwise ir uit.For ea h tri-orientation X of D without lo kwise ir uit, there exists a tri-orientation Y of D c without lo kwise ir uit su h that Φ( Y ) = X .ACM Journal Name, Vol. V, No. N, Month 20YY.6 · Éri Fusy et al. e l ( v ) e r ( v ) vl ( v ) r ( v ) h h h h h e l ( v ) e r ( v ) vl ( v ) r ( v ) h h h h h e l ( v ′ ) e r ( v ′ ) v ′ f Fig. 12. From a tri-orientation X of D without lo kwise ir uit, onstru tion of a tri-orientation Y of D c without lo kwise ir uit su h that Φ( Y ) = X .Proof. The (cid:28)rst point is trivial, as the tri-orientation Φ( Y ) is just obtained byremoving some edges and some orientations of half-edges.For the se ond point, the preimage Y is onstru ted as follows. Consider ea hwhite vertex v of the hexagon of D whi h has degree at least 3. Let ( h , . . . , h m ) ( m ≥ be the series of half-edges in ident to v in D in ounter- lo kwise orderaround v , with h and h belonging respe tively to the edges e r ( v ) and e l ( v ) . As m ≥ , the vertex v gives rise to a overing vertex v ′ with two in ident edges e l ( v ′ ) and e r ( v ′ ) su h that the edges e l ( v ) , e r ( v ) , e l ( v ′ ) and e r ( v ′ ) form a new fa e f . Theedges e l ( v ) and e r ( v ) be ome inner edges of D c when v ′ is added, and have thus tobe dire ted.We orient the two half-edges of e l ( v ) and e r ( v ) respe tively toward l ( v ) andtoward r ( v ) , see Figure 12. The vertex v re eives thus two outgoing half-edges, andwe have to give to v a third outgoing half-edge. The suitable hoi e to avoid theappearan e of a lo kwise ir uit is to orient h outward, see Figure 12. Indeed,assume a ontrario that a simple lo kwise ir uit C is reated. Then the ir uitmust pass by v . It goes into v using one of the half-edges h i dire ted toward v , i.e., i ≥ . Moreover, it must go out of v using the half-edge h (indeed, if the ir uituses h or h to go out of v , then it rea hes an outer vertex, whi h has outdegree0). Hen e, the interior of the lo kwise ir uit C must ontain all fa es in identto v that are on the right of v when we traverse v from h i and go out using h .Hen e, the interior of C must ontain the new fa e f of D c , see Figure 12. But f is in ident to outer edges of D c , hen e the lo kwise ir uit C must pass by outeredges of D c , whi h are not oriented, a ontradi tion. Thus, we have onstru teda tri-orientation Y of D c without lo kwise ir uit and su h that Φ( Y ) = X . Anexample of this onstru tion an be seen as the transition between Figure 13(a)and Figure 13(b).Lemma 8.5. The existen e and uniqueness of a tri-orientation without lo k-wise ir uit for any bi olored omplete irredu ible disse tion implies the existen eand uniqueness of a tri-orientation without lo kwise ir uit for any irredu ibledisse tion, i.e., implies Theorem 4.4.Proof. This is a lear onsequen e of Lemma 8.3 and Lemma 8.4.Complete-tri-orientations. A omplete-tri-orientation of a bi olored omplete irre-du ible disse tion D is an orientation of the half-edges of D that satis(cid:28)es the fol-lowing onditions (very similar to the onditions of a tri-orientation): all bla kverti es and all inner white verti es of D have outdegree 3, the three white verti esACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· D endowed with a tri-orientation X without lo kwise ir uit (Figure a). The asso iated ompleted disse tion D c (the two added white verti es aresurrounded) endowed with the tri-orientation Y su h that Φ( Y ) = X (Figure b). The disse tion D c endowed with the omplete-tri-orientation Z su h that Ψ( Z ) = Y (Figure ).of the hexagon have outdegree 0, and the two half-edges of an edge of D an notboth be oriented inward. The di(cid:27)eren e with the de(cid:28)nition of tri-orientation isthat the half-edges of the hexagon are oriented, with pres ribed outdegree for theouter verti es. Similarly as in a tri-orientation, edges of D are distinguished intosimply-oriented edges and bi-oriented edges.Lemma 8.6. Let D ∈ D n be a bi olored omplete irredu ible disse tion endowedwith a omplete-tri-orientation without lo kwise ir uit. Then the subgraph T of D onsisting of the bi-oriented edges of D is a tree in ident to all verti es of D ex ept the three outer white verti es.Proof. We reason similarly as in Lemma 4.2. Let r and s be the numbers of bi-oriented and simply oriented edges of D . From Euler's relation (using the degreesof the fa es of D ), D has n + 7 edges, i.e., r + s = 2 n + 7 . In addition, the n inner verti es and the three bla k (resp. white) verti es of the hexagon of D haveoutdegree 3 (resp. 0). Hen e, r + s = 3( n + 3) . Thus, r = n + 2 and s = n + 5 .Hen e, the subgraph T has n + 2 edges, has no y le (otherwise, a lo kwise ir uitof D would exist), and is in ident to at most ( n + 3) verti es, whi h are the innerverti es and the three outer bla k verti es of D . A lassi al result of graph theoryensures that T is a tree spanning these ( n + 3) verti es.Lemma 8.7. Let D ∈ D n be a bi olored omplete irredu ible disse tion endowedwith a omplete-tri-orientation Z without lo kwise ir uit. Then, for ea h outerbla k vertex v of D , the unique outgoing inner half-edge in ident to v belongs to abi-oriented edge.Proof. The subgraph T onsisting of the bi-oriented edges of D is a tree span-ning all verti es of D ex ept the three outer white verti es. Hen e, there is abi-oriented edge e in ident to ea h bla k vertex v of the hexagon and this edge onsitutes the third outgoing edge of v .Let D be a bi olored omplete irredu ible disse tion and Z be a omplete-tri-orientation of D without lo kwise ir uit. We asso iate to Z a tri-orientation Ψ( Z ) as follows: erase the orientation of the edges of the hexagon of D ; for ea h bla kACM Journal Name, Vol. V, No. N, Month 20YY.8 · Éri Fusy et al.(a) (b) ( )Fig. 14. The onstru tion of the derived map of a bi olored omplete irredu ible disse tion. Thedisse tion is endowed with a omplete-tri-orientation without lo kwise ir uit, and the derivedmap is endowed with the orientation obtained using the transposition rules for orientations.vertex v of the hexagon, hange the orientation of the unique outgoing inner half-edge h of v . A ording to Lemma 8.7, h belongs to a bi-oriented edge e , so thatthe hange of orientation of h turns e into an edge simply oriented toward v . Thus,the obtained orientation Ψ( Z ) is a tri-orientation.Lemma 8.8. Let D be a bi olored omplete irredu ible disse tion. Let Z be a omplete-tri-orientation of D without lo kwise ir uit. Then the tri-orientation Ψ( Z ) of D has no lo kwise ir uit.For ea h tri-orientation Y of D without lo kwise ir uit, there exists a omplete-tri-orientation Z of D without lo kwise ir uit su h that Ψ( Z ) = Y .Proof. The (cid:28)rst point is trivial. For the se ond point, we reason similarly as inLemma 8.4. For ea h bla k vertex v of the hexagon of D , let ( h , . . . , h m ) ( m ≥ be the sequen e of half-edges of D in ident to v in ounter- lo kwise order around v , with h and h belonging to the two outer edges e r ( v ) and e l ( v ) of D that arein ident to v . To onstru t the preimage Z of Y , we make the edges e l ( v ) and e r ( v ) simply oriented toward their in ident white vertex. The third outgoing half-edge is hosen to be h , whi h is the (cid:16)leftmost(cid:17) inner half-edge of v . An argument similar asin the proof of the se ond point of Lemma 8.4 ensures that this hoi e is judi ious toavoid the reation of a lo kwise ir uit. An example of this onstru tion is shownin Figure 13(b)-( ).Finally, Proposition 8.2 follows dire tly from Lemma 8.5 and Lemma 8.8.Proposition 8.5 redu es the proof of Theorem 4.4 to proving the existen e anduniqueness of a omplete-tri-orientation without w ir uit for any bi olored om-plete irredu ible disse tion. From now on, we will work with these disse tions.8.3 Transposition rules for orientationsLet D be a bi olored omplete irredu ible disse tion and let G ′ be the derived mapof D . We asso iate to a omplete-tri-orientation of D an orientation of the edgesof G ′ of D as follows, see Figure 14: ea h edge e = ( v, v ′ ) (cid:22)with v the primal/dualvertex and v ′ the edge-vertex(cid:22) re eives the dire tion of the half-edge of D following e in w order around v .ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· D be a bi olored omplete irredu ible disse tion endowed witha omplete-tri-orientation without lo kwise ir uit. Then the orientation of thederived map G ′ of D obtained using the transposition rules has the following prop-erties:(cid:22)ea h primal or dual vertex of G ′ has outdegree 3.(cid:22)ea h edge-vertex of G ′ has outdegree 1.In other words, the orientation of G ′ obtained by applying the transposition rules isan α -orientation.Proof. The (cid:28)rst point is trivial. For the se ond point, let f be an inner fa eof D and v f the asso iated edge-vertex of G ′ (we re all that v f is the interse tionof the two diagonals of f ). The transposition rules for orientation ensures thatthe outdegree of v f in G ′ is the number n f of inward half-edges of D in ident to f . Hen e, to prove that ea h edge-vertex of G ′ has outdegree 1, we have to provethat n f = 1 for ea h inner fa e f of D . Observe that n f is a positive number,otherwise the ontour of f would be a lo kwise ir uit. Let n be the number ofinner verti es of D . Euler's relation implies that D has ( n + 2) inner fa es and (4 n + 14) half-edges. By de(cid:28)nition of a omplete-tri-orientation, n + 3) half-edgesare outgoing. Hen e, ( n + 5) half-edges are ingoing. Among these ( n + 5) ingoinghalf-edges, exa tly three are in ident to the outer fa e (see Figure 13( )). Hen e, D has ( n + 2) half-edges in ident to an inner fa e, so that P f n f = n + 2 . As P f n f is a sum of ( n + 2) positive numbers adding to ( n + 2) , the pigeonhole's prin ipleensures that n f = 1 for ea h inner fa e f of D .8.4 Uniqueness of a tri-orientation without lo kwise ir uitThe following lemma is the ompanion of Lemma 8.9 and is ru ial to establishthe uniqueness of a tri-orientation without lo kwise ir uit for any irredu ibledisse tion.Lemma 8.10. Let D be a bi olored omplete irredu ible disse tion endowed witha omplete-tri-orientation Z without lo kwise ir uit. Let G ′ be the derived mapof D . Then the α -orientation X of G ′ obtained from Z by the transposition ruleshas no lo kwise ir uit.Proof. Assume that X has a lo kwise ir uit C . Ea h edge of G ′ onne ts anedge-vertex and a vertex of the original disse tion D . Hen e, the ir uit C onsistsof a sequen e of pairs ( e, e ) of onse utive edges of G ′ su h that e goes from a vertex v of the disse tion toward an edge-vertex v ′ of G ′ and e goes from v ′ toward a vertex v of the disse tion. Let ( e ′ , . . . , e ′ m ) be the sequen e of edges of G ′ between e and e in lo kwise order around v ′ , so that e ′ = e ; and e ′ m = e and let ( v , . . . , v m ) betheir respe tive extremities, so that v = v and v m = v . Noti e that ≤ m ≤ .As ea h edge-vertex has outdegree 1 in X and as e ′ m is going out of v ′ , the edges e ′ , . . . , e ′ m − are dire ted toward v ′ . Hen e, the transposition rules for orientationsensure that the edges ( v i , v i +1 ) , for ≤ i ≤ m − , are all bi-oriented or orientedfrom v i to v i +1 in the omplete-tri-orientation Z of D . Hen e, we an go from v to v passing by the exterior of C and using only edges of D , see Figure 15 for anexample, where m = 3 . ACM Journal Name, Vol. V, No. N, Month 20YY.0 · Éri Fusy et al. ev e vv v ′ C eev v ′ v Fig. 15. An oriented path of edges of the disse tion an be asso iated to ea h pair ( e, e ) of onse utive edges of C sharing an edge-vertex. Fig. 16. A simple lo kwise ir uit an be extra ted from an oriented path en losing a boundedsimply onne ted region on its right.Con atenating the paths of edges of D asso iated to ea h pair ( e, e ) of C , we obtaina losed oriented path of edges of D en losing the interior of C on its right. Clearly,a simple lo kwise ir uit an be extra ted from this losed path, see Figure 16. Asthe omplete-tri-orientation Z has no lo kwise ir uit, this yields a ontradi tion.Proposition 8.11. Ea h irredu ible disse tion has at most one tri-orientationwithout lo kwise ir uit.Proof. Let D be a bi olored omplete irredu ible disse tion and G ′ its derivedmap. A (cid:28)rst important remark is that the transposition rules for orientations learlyde(cid:28)ne an inje tive mapping. In addition, Lemma 8.10 ensures that the image of a omplete-tri-orientation of D without lo kwise ir uit is an α -orientation of G ′ without lo kwise ir uit. Hen e, inje tivity of the mapping and uniqueness of an α -orientation without lo kwise ir uit of G ′ (Theorem 8.1) ensure that D has atmost one omplete-tri-orientation without lo kwise ir uit. Hen e, Proposition 8.2implies that ea h irredu ible disse tion has at most one tri-orientation without lo kwise ir uit.8.5 Existen e of a tri-orientation without lo kwise ir uitInverse of the transposition rules. Let D be a bi olored omplete irredu ible disse -tion and G ′ its derived map. Given an α -orientation of G ′ , we asso iate to thisorientation an orientation of the half-edges of D by performing the inverse of thetransposition rules: ea h half-edge h of D re eives the orientation of the edge of G ′ that follows h in lo kwise order around its in ident vertex, see Figure 14(b).Lemma 8.12. Let D be an irredu ible disse tion and G ′ the derived map of D ,endowed with its minimal α -orientation. Then the inverse of the transpositionrules for orientations yields a omplete-tri-orientation of D .ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· e e Fig. 17. The ase where the two half-edges of e are oriented inward implies that the boundary ofthe asso iated fa e of G ′ is a lo kwise ir uit.Proof. The inverse of the transposition rules is learly su h that a vertex has thesame outdegree in the orientation of D as in the α -orientation of G ′ . Hen e, ea hvertex of D has outdegree 3 ex ept the 3 outer white verti es that have outdegree 0,see Figure 14(b).To prove that the orientation of D is a omplete-tri-orientation, it remains toshow that the two half-edges of an edge e of D an not both be oriented inward.Assume a ontrario that there exists su h an edge e . The transposition rules fororientation and the fa t that ea h edge-vertex of G ′ has outdegree 1 imply that theboundary of the fa e f e of G ′ asso iated to e is a lo kwise ir uit, see Figure 17.This yields a ontradi tion with the minimality of the α -orientation.Lemma 8.13. Let D be a bi olored omplete irredu ible disse tion and let G ′ beits derived map. Then the omplete-tri-orientation of D asso iated with the minimal α -orientation of G ′ has no w ir uit.Proof. Let X be the minimal α -orientation of G ′ and let Z be the asso iated omplete-tri-orientation of D . Assume that Z has a lo kwise ir uit C . For ea hvertex v on C , we denote by h v the half-edge of C starting from v with the interiorof C on its right, and we denote by e v the edge of G ′ that follows h v in lo kwiseorder around v . As C is a lo kwise ir uit for Z , h v is going out of v . Hen e,by de(cid:28)nition of the transposition rules, e v is going out of v . Observe that, in theinterior of C , e v is the most ounter- lo kwise edge of G ′ in ident to v .We use this observation to build iteratively a lo kwise ir uit of X , yielding a ontradi tion. First we state the following result proved in [Felsner 2004℄: (cid:16)for ea hvertex v ∈ G ′ there exists a simple oriented path P v in G ′ , alled the straight pathof v , whi h starts at v and ends at a vertex in ident to the outer fa e of G ′ ". Let v be a vertex on C , and P v be the straight path starting at e v for the orientation X . Then P v has to rea h C at a vertex v di(cid:27)erent from v . Denote by P thepart of P v between v and v , by Λ the part of the lo kwise ir uit C between v and v , and by C the y le en losed by the on atenation of P and Λ . Let P v be the straight path starting at e v . The fa t that e v is the most ounter lo kwisein ident edge of v in the interior of C ensures that P v starts in the interior of C .Then, the path P v has to rea h C at a vertex v = v . We denote by P the partof the path P v between v and v . If v belongs to P , then the on atenationof the part of P between v and v and of the part of P between v and v is a lo kwise ir uit, a ontradi tion. Hen e, v is on Λ stri tly between v and v .We denote by P the on atenation of P and P , and by Λ the part of C goingfrom v to v . As v is stri tly between v and v , Λ is stri tly in luded in Λ .Finally, we denote by C the y le made of the on atenation of P and Λ . Hen e,ACM Journal Name, Vol. V, No. N, Month 20YY.2 · Éri Fusy et al. v P P P P v v v v e v P e v C Λ Fig. 18. The presen e of a lo kwise ir uit in Z implies the presen e of a lo kwise ir uit in X .similarly as for the path P v , the straight path P v starting at e v must start in theinterior of C .Then we ontinue iteratively, see Figure 18. At ea h step k , we onsider thestraight path P v k starting at e v k . This path starts in the interior of the y le C k , and rea hes C k at another vertex v k +1 . This vertex v k +1 an not belong to P k := P ∪ . . . ∪ P k , otherwise a lo kwise ir uit of X would be reated. Hen e, v k +1 is on C stri tly between v k and v . In parti ular the path Λ k +1 going from v k +1 to v on C , is stri tly in luded in the path Λ k going from v k to v on C , i.e., Λ k shrinks stri tly at ea h step. Thus, there must be a step k when P v k rea hes C k at a vertex on P k , reating a lo kwise ir uit of X , a ontradi tion.Proposition 8.14. For ea h irredu ible disse tion, there exists a tri-orientationwithout lo kwise ir uit.Proof. Lemma 8.13 ensures that ea h bi olored omplete irredu ible disse tion D has a omplete-tri-orientation Z without lo kwise ir uit; and Proposition 8.2ensures that the existen e of a omplete-tri-orientation without lo kwise ir uitfor any bi olored omplete irredu ible disse tion implies the existen e of a tri-orientation without lo kwise ir uit for any irredu ible disse tion.Finally, Theorem 4.4 follows from Proposition 8.11 and Proposition 8.14.9. COMPUTING THE MINIMAL α -ORIENTATION OF A DERIVED MAPWe des ribe in this se tion a linear-time algorithm to ompute the minimal α -orientation of the derived map of an outer-triangular 3- onne ted plane graph.This result is ru ial for the en oding algorithm of Se tion 7 to have linear time omplexity (see the transition between Figure 11(b) and Figure 11( )).As dis ussed in [Felsner 2004℄, given a 3- onne ted map G and its derived map G ′ , an α -orientations of G ′ orresponds to a so- alled S hnyder wood of G . TheseS hnyder woods of 3- onne ted maps are the right generalisations of S hnyderwoods of triangulations [S hnyder 1990℄. Quite naturally, our algorithm is a gen-eralization of the algorithm to ompute the minimal S hnyder wood of a trian-gulation [Brehm 2000℄. The ideas for the extension to 3- onne ted maps havealready been introdu ed by [Kant 1996℄ and [di Battista et al. 1999℄. The algo-rithm of [di Battista et al. 1999℄ outputs a S hnyder wood of a 3- onne ted map;ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ··
11 + x • + x ◦ + 2 x • x ◦ + x • x ◦ ( r + r − r r ) , (10)where (cid:26) r ( x • , x ◦ ) = x • (1 + r ( x • , x ◦ )) r ( x • , x ◦ ) = x ◦ (1 + r ( x • , x ◦ )) .Proof. Lemma 5.1 ensures that P n |P ′ n +2 | x n = x U ( x ) and, more pre isely, P i,j |P ′ i +2 ,j +2 | x i • x j ◦ = x • x ◦ U ( x • , x ◦ ) . Moreover, Equations (8) and Equation (9)yield expressions of x U ( x ) and x • x ◦ U ( x • , x ◦ ) respe tively in terms of D ( x ) and D ( x • , x ◦ ) . In these expressions, repla e D ( x ) and D ( x • , x ◦ ) by their respe tiveexpression in terms of r and of r and r , as given by Equations (6) and (7).6. APPLICATION: SAMPLING ROOTED 3-CONNECTED MAPS6.1 Sampling rooted 3- onne ted maps with n edgesTheorem 4.8 ((cid:28)rst identity) ensures that the following algorithm samples rooted3- onne ted maps with n edges uniformly at random:(1) Sample an obje t T ∈ B ′ n − uniformly (e.g. using parenthesis words).(2) Perform the losure of T to obtain an irredu ible disse tion D with ( n − verti es. Choose randomly one of the six edges of the hexagon of D to arrythe root. If D is not unde omposable, then reje t and restart.(3) Conne t by a new edge e the root-vertex of D to the opposite outer vertex.Take e as root edge, with the same root-vertex as in D . This gives a rootedirredu ible quadrangulation Q with n fa es.(4) Return the rooted 3- onne ted map in P ′ n asso iated to Q by the angularmapping.Proposition 6.1. The su ess probability of the sampler at ea h trial is equalto |P ′ n | / |D ′ n − | , whi h satis(cid:28)es |P ′ n ||D ′ n − | → n →∞ . Hen e, the number of reje tions follows a geometri law whose mean is asymptoti- ally c = 3 / . As the losure mapping has linear-time omplexity, the samplingalgorithm has expe ted linear-time omplexity.Proof. A ording to Se tion 4.3, |D ′ n | = n +2 |B ′ n | = n )!( n +2)! n ! . Stirling formulayields |D ′ n − | ∼ √ π n n / . Moreover, a ording to [Tutte 1963℄, |P ′ n | ∼ √ π n n / .This yields the limit of |P ′ n | / |D ′ n − | .ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· i verti es and j fa esSimilarly, Theorem 4.8 (third identity), ensures that the following algorithm sam-ples rooted 3- onne ted maps with i verti es and j fa es uniformly at random:(1) Sample an obje t T ∈ B • i − ,j − uniformly at random. A simple method isdes ribed in Se tion 4.5.2.(2) Perform the losure of T to obtain an irredu ible disse tion D with ( i − inner bla k verti es and ( j − inner white verti es. Choose randomly theroot-vertex among the three bla k verti es of the hexagon. If the disse tion isnot unde omposable, then reje t and restart.(3) Conne t by a new edge e the root-vertex of D to the opposite outer vertex.Take e as root edge, with the same root-vertex as in D . This gives a rootedirredu ible quadrangulation Q with i bla k verti es and j white verti es.(4) Return the rooted 3- onne ted map in P ′ ij asso iated to Q by the angularmapping.Proposition 6.2. The su ess probability of the sampler at ea h trial is equalto |P ′ ij | / |D ′ i − ,j − | . Let α ∈ ]1 / , ; if i and j are orrelated by ij → α as i → ∞ ,then |P ′ ij ||D ′ i − ,j − | ∼ (2 − α ) (2 α − α =: 1 c α . Hen e, when ij → α , the number of reje tions follows a geometri law whose mean isasymptoti ally c α . Under these onditions, the sampling algorithm has an expe tedlinear-time omplexity, the linearity fa tor being asymptoti ally proportional to c α .Moreover, in the worst ase of triangulations where j = 2 i − , the mean numberof reje tions is quadrati , so that the sampling omplexity is ubi .Proof. These asymptoti results are easy onsequen es of the expression of |D ′ ij | obtained in Corollary 4.9 and of the asymptoti result |P ′ ij | ∼ ij (cid:0) i − j +2 (cid:1)(cid:0) j − i +2 (cid:1) given in [Bender 1987℄.7. APPLICATION: CODING 3-CONNECTED MAPSThis se tion introdu es an algorithm, derived from the inverse of the losure map-ping, to en ode a 3- onne ted map. Pre isely, the algorithm en odes an outer-triangular 3- onne ted map, but it is then easily extended to en ode any 3- onne tedmap. Indeed, if the outer fa e of G is not triangular, (cid:28)x three onse utive verti es v , v ′ and v ′′ in ident to the outer fa e of G and link v and v ′′ by an edge to obtainan outer-triangular 3- onne ted planar map e G ; the oding of G is obtained as the oding of e G plus one bit indi ating if an edge-addition has been done.7.1 Des ription of the oding algorithmLet G be an outer-triangular 3- onne ted map and let G ′ be its derived map, asde(cid:28)ned in Se tion 3.2. The oding algorithm relies on the following steps, illustratedin Figure 11. ACM Journal Name, Vol. V, No. N, Month 20YY.2 · Éri Fusy et al. a a a (a) a a a (b) a a a ( ) a a a (d)(e) (f)Fig. 11. Exe ution of the en oding algorithm on an example.7.1.1 Compute a parti ular orientation of the derived map G ′ (Fig. 11(b)-( )). The(cid:28)rst step of the algorithm is to ompute a spe i(cid:28) orientation X of the edges ofthe derived map G ′ , su h that X has no lo kwise ir uit, ea h primal or dualvertex has outdegree 3 and ea h edge-vertex has outdegree 1. Su h an orientationof G ′ exists and is unique, as we will see in Theorem 8.1. A linear time algorithmto ompute X is given in Se tion 9.7.1.2 Compute the irredu ible disse tion D asso iated to G (Fig. 11(d)). Considerthe bi olored omplete irredu ible disse tion D asso iated to G by the bije tionACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· G . Noti e that D has n inner fa es if G has n edges. Hen e,a ording to Euler's relation, D has n − inner verti es. Similarly, if G has i verti esand j inner fa es, then D has i bla k verti es and j + 3 white verti es.7.1.3 Compute the tri-orientation of D without lo kwise ir uit (Fig. 11(d)). Weorient ea h half-edge h of D belonging to an inner edge as follows: h is dire tedinward if its in ident vertex belongs to the hexagon; otherwise, h re eives the ori-entation of the w-following edge of G ′ . As shown in Se tion 8 (more pre isely inLemma 8.13, omposed with the orresponden e of Figure 13), this pro ess yieldsthe unique tri-orientation of D without lo kwise ir uit.7.1.4 Open the disse tion D into a binary tree T (Fig. 11(f)). On e the tri-orientationwithout lo kwise ir uit is omputed, D is opened into a binary tree T , by deletingouter verti es, outer edges, and all ingoing half-edges (see Se tion 4.2).7.1.5 En ode the tree T . First, hoose an arbitrary leaf of T , root T at this leaf,and en ode the obtained rooted binary tree using a parenthesis word (also alledDy k word ). The opening of a 3- onne ted map with n edges is a binary tree with n − inner nodes, yielding an en oding Dy k word of length n − .Similarly, the opening of a 3- onne ted map with i verti es and j inner fa es isa bla k-rooted bi olored binary tree with i − bla k nodes and j white nodes. Abla k-rooted bi olored binary trees with a given number of bla k and white nodesis en oded by a pair of words, as explained in Se tion 4.5.1. Then the two words an be asymptoti ally optimally en oded in linear time, a ording to [Boni hon etal. 2003, Lem.7℄.Theorem 7.1. The oding algorithm has linear-time omplexity and is asymp-toti ally optimal: the number of bits per edge of the ode of a map in P ′ n (resp. in P ′ ij ) is asymptoti ally equal to the binary entropy per edge, de(cid:28)ned as n log ( |P ′ n | ) (resp. i + j − log ( |P ′ ij | ) ).Proof. It is lear that the en oding algorithm has linear-time omplexity, pro-vided the algorithm omputing the onstrained orientation without lo kwise ir uitof the derived map has linear-time omplexity (whi h will be proved in Se tion 9and Se tion 10).A ording to Corollary 4.9, Proposition 6.1 and 6.2, |B ′ n | / |P ′ n | and |B • ij | / |P ′ ij | are bounded by (cid:28)xed polynomials. Hen e, the entropy per edge of B ′ n and P ′ n areasymptoti ally equal, and the binary entropy per edge of B • ij and P ′ ij are asymp-toti ally equal. As the en oding of obje ts of B ′ n ( B • ij ) using parenthesis words isasymptoti ally optimal, the en oding of obje ts of P ′ n ( P ′ ij , respe tively) is alsoasymptoti ally optimal.8. PROOF OF THEOREM 4.4This se tion is devoted to the proof of Theorem 4.4, whi h states that ea h irre-du ible disse tion has a unique tri-orientation without lo kwise ir uit.ACM Journal Name, Vol. V, No. N, Month 20YY.4 · Éri Fusy et al.8.1 α -orientations and outline of the proofDe(cid:28)nition. Let G = ( V, E ) be a planar map. Consider a fun tion α : V → N . An α -orientation of G is an orientation of the edges of G su h that the outdegree ofea h vertex v of G is α ( v ) . If an α -orientation exists, then the fun tion α is said tobe feasible for G .Existen e and uniqueness of α -orientations. The following results are proved in [Fel-sner 2004℄ (the (cid:28)rst point had already been proved in [Ossona de Mendez 1994℄):Theorem 8.1 ([Felsner 2004℄). Given a planar map G and a feasible fun -tion α , there exists a unique α -orientation of G without lo kwise ir uit. This α -orientation is alled the minimal 1 α -orientation of G .Given the derived map of an outer-triangular 3- onne ted planar map, the fun -tion α su h that α ( v ) = 3 for all primal and dual verti es and α ( v ) = 1 for alledge-verti es is a feasible fun tion.Theorem 8.1 ensures uniqueness of the orientation without lo kwise ir uit of agraph with pres ribed outdegree for ea h vertex. However, this property does notdire tly imply uniqueness in Theorem 4.4, be ause a tri-orientation has bi-orientededges.To use Theorem 8.1, we work with the derived map G ′ of an irredu ible disse -tion D , as de(cid:28)ned in Se tion 3.3. We have de(cid:28)ned derived maps only for a subset ofirredu ible disse tions, namely for bi olored omplete irredu ible disse tions (re allthat these are bi olored disse tions su h that the 3 outer white verti es have de-gree 2). As a onsequen e, a (cid:28)rst step toward proving Theorem 4.4 is to redu e itsproof to the proof of existen e and uniqueness of a so- alled omplete-tri-orientation(a slight adaptation of the de(cid:28)nition of tri-orientation) without lo kwise ir uit forany bi olored omplete irredu ible disse tion.We prove that a omplete-tri-orientation without lo kwise ir uit of a bi olored omplete irredu ible disse tion D is transposed inje tively into an α -orientationwithout lo kwise ir uit of its derived map G ′ . By inje tivity and by uniquenessof the α -orientation without lo kwise ir uit of G ′ , this implies uniqueness of atri-orientation without lo kwise ir uit for D .The (cid:28)nal step will be to prove that an α -orientation without lo kwise ir uit of G ′ is transposed into a omplete-tri-orientation without lo kwise ir uit of D . Byexisten e of an α -orientation without lo kwise ir uit for G ′ (Theorem 8.1), thisimplies the existen e of a omplete-tri-orientation without lo kwise ir uit of D .8.2 Redu tion to the ase of bi olored omplete disse tionsIntrodu tion. The aim of this se tion is to redu e the proof of Theorem 4.4 to the lass of omplete bi olored irredu ible disse tions. We state the following propo-sition where the term (cid:16) omplete-tri-orientation(cid:17), to be de(cid:28)ned later, is a slightadaptation of the notion of tri-orientation.Proposition 8.2. The existen e and uniqueness of a omplete-tri-orientationwithout lo kwise ir uit for any bi olored omplete irredu ible disse tion implies The term minimal refers to the fa t that the set of all α -orientations of G forms a distributivelatti e, the (cid:16)(cid:29)ip(cid:17) operation being a ir uit reversion.ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· D , we de(cid:28)ne its ompleted disse tion D c as follows . For ea h white vertex v of the hexagon, we denote by e l ( v ) ( e r ( v ) ) the outer edge starting from v withthe interior of the hexagon on the left (right, respe tively) and denote by l ( v ) and r ( v ) the neighbours of v in ident to e l ( v ) and to e r ( v ) . We perform the followingoperation: if v has degree at least 3, a new white vertex v ′ is reated outside of thehexagon and is linked to l ( v ) and to r ( v ) by two new edges e l ( v ′ ) and e r ( v ′ ) , seeFigure 12. The vertex v ′ is said to over the vertex v .The disse tion obtained is a bi olored disse tion of the hexagon su h that thethree white verti es of the hexagon have two in ident edges, see the transitionbetween Figure 13(a) and Figure 13(b) (ignore here the orientation of edges).Lemma 8.3. The ompletion D c of a bi olored irredu ible disse tion D is a bi- olored omplete irredu ible disse tion.Proof. The outer white verti es of D c have degree 2 by onstru tion. Hen e,we just have to prove that D c is irredu ible. As D is irredu ible, if a separating4- y le C appears in D c when the ompletion is performed, then it must ontain awhite vertex v ′ of the hexagon of D c added during the ompletion, so as to overan outer white vertex v of degree greater than 2. Two edges of C are the edges e l ( v ′ ) and e r ( v ′ ) in ident to v ′ in D c . The two other edges ǫ and ǫ of C form apath of length 2 onne ting the verti es l ( v ) and r ( v ) and passing by the interiorof D (otherwise, C would en lose a fa e). As D is irredu ible, the 4- y le C ′ of D onsisting of the edges e l ( v ) , e r ( v ) , ǫ and ǫ delimits a fa e. Hen e e l ( v ) and e r ( v ) are in ident to the same inner fa e of D , whi h implies that v has degree 2, a ontradi tion.Tri-orientations. Let D be a bi olored irredu ible disse tion and let D c be its om-pleted bi olored disse tion. We de(cid:28)ne a mapping Φ from the tri-orientations of D c to the tri-orientations of D . Given a tri-orientation Y of D c , we remove the edgesthat have been added to obtain D c from D , erase the orientation of the edges ofthe hexagon of D , and orient inward all inner half-edges in ident to an outer ver-tex of D . We obtain thus a tri-orientation Φ( Y ) of D , see the transition betweenFigure 13(b) and Figure 13(a).Lemma 8.4. Let Y be a tri-orientation of D c without lo kwise ir uit. Thenthe tri-orientation Φ( Y ) of D has no lo kwise ir uit.For ea h tri-orientation X of D without lo kwise ir uit, there exists a tri-orientation Y of D c without lo kwise ir uit su h that Φ( Y ) = X .ACM Journal Name, Vol. V, No. N, Month 20YY.6 · Éri Fusy et al. e l ( v ) e r ( v ) vl ( v ) r ( v ) h h h h h e l ( v ) e r ( v ) vl ( v ) r ( v ) h h h h h e l ( v ′ ) e r ( v ′ ) v ′ f Fig. 12. From a tri-orientation X of D without lo kwise ir uit, onstru tion of a tri-orientation Y of D c without lo kwise ir uit su h that Φ( Y ) = X .Proof. The (cid:28)rst point is trivial, as the tri-orientation Φ( Y ) is just obtained byremoving some edges and some orientations of half-edges.For the se ond point, the preimage Y is onstru ted as follows. Consider ea hwhite vertex v of the hexagon of D whi h has degree at least 3. Let ( h , . . . , h m ) ( m ≥ be the series of half-edges in ident to v in D in ounter- lo kwise orderaround v , with h and h belonging respe tively to the edges e r ( v ) and e l ( v ) . As m ≥ , the vertex v gives rise to a overing vertex v ′ with two in ident edges e l ( v ′ ) and e r ( v ′ ) su h that the edges e l ( v ) , e r ( v ) , e l ( v ′ ) and e r ( v ′ ) form a new fa e f . Theedges e l ( v ) and e r ( v ) be ome inner edges of D c when v ′ is added, and have thus tobe dire ted.We orient the two half-edges of e l ( v ) and e r ( v ) respe tively toward l ( v ) andtoward r ( v ) , see Figure 12. The vertex v re eives thus two outgoing half-edges, andwe have to give to v a third outgoing half-edge. The suitable hoi e to avoid theappearan e of a lo kwise ir uit is to orient h outward, see Figure 12. Indeed,assume a ontrario that a simple lo kwise ir uit C is reated. Then the ir uitmust pass by v . It goes into v using one of the half-edges h i dire ted toward v , i.e., i ≥ . Moreover, it must go out of v using the half-edge h (indeed, if the ir uituses h or h to go out of v , then it rea hes an outer vertex, whi h has outdegree0). Hen e, the interior of the lo kwise ir uit C must ontain all fa es in identto v that are on the right of v when we traverse v from h i and go out using h .Hen e, the interior of C must ontain the new fa e f of D c , see Figure 12. But f is in ident to outer edges of D c , hen e the lo kwise ir uit C must pass by outeredges of D c , whi h are not oriented, a ontradi tion. Thus, we have onstru teda tri-orientation Y of D c without lo kwise ir uit and su h that Φ( Y ) = X . Anexample of this onstru tion an be seen as the transition between Figure 13(a)and Figure 13(b).Lemma 8.5. The existen e and uniqueness of a tri-orientation without lo k-wise ir uit for any bi olored omplete irredu ible disse tion implies the existen eand uniqueness of a tri-orientation without lo kwise ir uit for any irredu ibledisse tion, i.e., implies Theorem 4.4.Proof. This is a lear onsequen e of Lemma 8.3 and Lemma 8.4.Complete-tri-orientations. A omplete-tri-orientation of a bi olored omplete irre-du ible disse tion D is an orientation of the half-edges of D that satis(cid:28)es the fol-lowing onditions (very similar to the onditions of a tri-orientation): all bla kverti es and all inner white verti es of D have outdegree 3, the three white verti esACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· D endowed with a tri-orientation X without lo kwise ir uit (Figure a). The asso iated ompleted disse tion D c (the two added white verti es aresurrounded) endowed with the tri-orientation Y su h that Φ( Y ) = X (Figure b). The disse tion D c endowed with the omplete-tri-orientation Z su h that Ψ( Z ) = Y (Figure ).of the hexagon have outdegree 0, and the two half-edges of an edge of D an notboth be oriented inward. The di(cid:27)eren e with the de(cid:28)nition of tri-orientation isthat the half-edges of the hexagon are oriented, with pres ribed outdegree for theouter verti es. Similarly as in a tri-orientation, edges of D are distinguished intosimply-oriented edges and bi-oriented edges.Lemma 8.6. Let D ∈ D n be a bi olored omplete irredu ible disse tion endowedwith a omplete-tri-orientation without lo kwise ir uit. Then the subgraph T of D onsisting of the bi-oriented edges of D is a tree in ident to all verti es of D ex ept the three outer white verti es.Proof. We reason similarly as in Lemma 4.2. Let r and s be the numbers of bi-oriented and simply oriented edges of D . From Euler's relation (using the degreesof the fa es of D ), D has n + 7 edges, i.e., r + s = 2 n + 7 . In addition, the n inner verti es and the three bla k (resp. white) verti es of the hexagon of D haveoutdegree 3 (resp. 0). Hen e, r + s = 3( n + 3) . Thus, r = n + 2 and s = n + 5 .Hen e, the subgraph T has n + 2 edges, has no y le (otherwise, a lo kwise ir uitof D would exist), and is in ident to at most ( n + 3) verti es, whi h are the innerverti es and the three outer bla k verti es of D . A lassi al result of graph theoryensures that T is a tree spanning these ( n + 3) verti es.Lemma 8.7. Let D ∈ D n be a bi olored omplete irredu ible disse tion endowedwith a omplete-tri-orientation Z without lo kwise ir uit. Then, for ea h outerbla k vertex v of D , the unique outgoing inner half-edge in ident to v belongs to abi-oriented edge.Proof. The subgraph T onsisting of the bi-oriented edges of D is a tree span-ning all verti es of D ex ept the three outer white verti es. Hen e, there is abi-oriented edge e in ident to ea h bla k vertex v of the hexagon and this edge onsitutes the third outgoing edge of v .Let D be a bi olored omplete irredu ible disse tion and Z be a omplete-tri-orientation of D without lo kwise ir uit. We asso iate to Z a tri-orientation Ψ( Z ) as follows: erase the orientation of the edges of the hexagon of D ; for ea h bla kACM Journal Name, Vol. V, No. N, Month 20YY.8 · Éri Fusy et al.(a) (b) ( )Fig. 14. The onstru tion of the derived map of a bi olored omplete irredu ible disse tion. Thedisse tion is endowed with a omplete-tri-orientation without lo kwise ir uit, and the derivedmap is endowed with the orientation obtained using the transposition rules for orientations.vertex v of the hexagon, hange the orientation of the unique outgoing inner half-edge h of v . A ording to Lemma 8.7, h belongs to a bi-oriented edge e , so thatthe hange of orientation of h turns e into an edge simply oriented toward v . Thus,the obtained orientation Ψ( Z ) is a tri-orientation.Lemma 8.8. Let D be a bi olored omplete irredu ible disse tion. Let Z be a omplete-tri-orientation of D without lo kwise ir uit. Then the tri-orientation Ψ( Z ) of D has no lo kwise ir uit.For ea h tri-orientation Y of D without lo kwise ir uit, there exists a omplete-tri-orientation Z of D without lo kwise ir uit su h that Ψ( Z ) = Y .Proof. The (cid:28)rst point is trivial. For the se ond point, we reason similarly as inLemma 8.4. For ea h bla k vertex v of the hexagon of D , let ( h , . . . , h m ) ( m ≥ be the sequen e of half-edges of D in ident to v in ounter- lo kwise order around v , with h and h belonging to the two outer edges e r ( v ) and e l ( v ) of D that arein ident to v . To onstru t the preimage Z of Y , we make the edges e l ( v ) and e r ( v ) simply oriented toward their in ident white vertex. The third outgoing half-edge is hosen to be h , whi h is the (cid:16)leftmost(cid:17) inner half-edge of v . An argument similar asin the proof of the se ond point of Lemma 8.4 ensures that this hoi e is judi ious toavoid the reation of a lo kwise ir uit. An example of this onstru tion is shownin Figure 13(b)-( ).Finally, Proposition 8.2 follows dire tly from Lemma 8.5 and Lemma 8.8.Proposition 8.5 redu es the proof of Theorem 4.4 to proving the existen e anduniqueness of a omplete-tri-orientation without w ir uit for any bi olored om-plete irredu ible disse tion. From now on, we will work with these disse tions.8.3 Transposition rules for orientationsLet D be a bi olored omplete irredu ible disse tion and let G ′ be the derived mapof D . We asso iate to a omplete-tri-orientation of D an orientation of the edgesof G ′ of D as follows, see Figure 14: ea h edge e = ( v, v ′ ) (cid:22)with v the primal/dualvertex and v ′ the edge-vertex(cid:22) re eives the dire tion of the half-edge of D following e in w order around v .ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· D be a bi olored omplete irredu ible disse tion endowed witha omplete-tri-orientation without lo kwise ir uit. Then the orientation of thederived map G ′ of D obtained using the transposition rules has the following prop-erties:(cid:22)ea h primal or dual vertex of G ′ has outdegree 3.(cid:22)ea h edge-vertex of G ′ has outdegree 1.In other words, the orientation of G ′ obtained by applying the transposition rules isan α -orientation.Proof. The (cid:28)rst point is trivial. For the se ond point, let f be an inner fa eof D and v f the asso iated edge-vertex of G ′ (we re all that v f is the interse tionof the two diagonals of f ). The transposition rules for orientation ensures thatthe outdegree of v f in G ′ is the number n f of inward half-edges of D in ident to f . Hen e, to prove that ea h edge-vertex of G ′ has outdegree 1, we have to provethat n f = 1 for ea h inner fa e f of D . Observe that n f is a positive number,otherwise the ontour of f would be a lo kwise ir uit. Let n be the number ofinner verti es of D . Euler's relation implies that D has ( n + 2) inner fa es and (4 n + 14) half-edges. By de(cid:28)nition of a omplete-tri-orientation, n + 3) half-edgesare outgoing. Hen e, ( n + 5) half-edges are ingoing. Among these ( n + 5) ingoinghalf-edges, exa tly three are in ident to the outer fa e (see Figure 13( )). Hen e, D has ( n + 2) half-edges in ident to an inner fa e, so that P f n f = n + 2 . As P f n f is a sum of ( n + 2) positive numbers adding to ( n + 2) , the pigeonhole's prin ipleensures that n f = 1 for ea h inner fa e f of D .8.4 Uniqueness of a tri-orientation without lo kwise ir uitThe following lemma is the ompanion of Lemma 8.9 and is ru ial to establishthe uniqueness of a tri-orientation without lo kwise ir uit for any irredu ibledisse tion.Lemma 8.10. Let D be a bi olored omplete irredu ible disse tion endowed witha omplete-tri-orientation Z without lo kwise ir uit. Let G ′ be the derived mapof D . Then the α -orientation X of G ′ obtained from Z by the transposition ruleshas no lo kwise ir uit.Proof. Assume that X has a lo kwise ir uit C . Ea h edge of G ′ onne ts anedge-vertex and a vertex of the original disse tion D . Hen e, the ir uit C onsistsof a sequen e of pairs ( e, e ) of onse utive edges of G ′ su h that e goes from a vertex v of the disse tion toward an edge-vertex v ′ of G ′ and e goes from v ′ toward a vertex v of the disse tion. Let ( e ′ , . . . , e ′ m ) be the sequen e of edges of G ′ between e and e in lo kwise order around v ′ , so that e ′ = e ; and e ′ m = e and let ( v , . . . , v m ) betheir respe tive extremities, so that v = v and v m = v . Noti e that ≤ m ≤ .As ea h edge-vertex has outdegree 1 in X and as e ′ m is going out of v ′ , the edges e ′ , . . . , e ′ m − are dire ted toward v ′ . Hen e, the transposition rules for orientationsensure that the edges ( v i , v i +1 ) , for ≤ i ≤ m − , are all bi-oriented or orientedfrom v i to v i +1 in the omplete-tri-orientation Z of D . Hen e, we an go from v to v passing by the exterior of C and using only edges of D , see Figure 15 for anexample, where m = 3 . ACM Journal Name, Vol. V, No. N, Month 20YY.0 · Éri Fusy et al. ev e vv v ′ C eev v ′ v Fig. 15. An oriented path of edges of the disse tion an be asso iated to ea h pair ( e, e ) of onse utive edges of C sharing an edge-vertex. Fig. 16. A simple lo kwise ir uit an be extra ted from an oriented path en losing a boundedsimply onne ted region on its right.Con atenating the paths of edges of D asso iated to ea h pair ( e, e ) of C , we obtaina losed oriented path of edges of D en losing the interior of C on its right. Clearly,a simple lo kwise ir uit an be extra ted from this losed path, see Figure 16. Asthe omplete-tri-orientation Z has no lo kwise ir uit, this yields a ontradi tion.Proposition 8.11. Ea h irredu ible disse tion has at most one tri-orientationwithout lo kwise ir uit.Proof. Let D be a bi olored omplete irredu ible disse tion and G ′ its derivedmap. A (cid:28)rst important remark is that the transposition rules for orientations learlyde(cid:28)ne an inje tive mapping. In addition, Lemma 8.10 ensures that the image of a omplete-tri-orientation of D without lo kwise ir uit is an α -orientation of G ′ without lo kwise ir uit. Hen e, inje tivity of the mapping and uniqueness of an α -orientation without lo kwise ir uit of G ′ (Theorem 8.1) ensure that D has atmost one omplete-tri-orientation without lo kwise ir uit. Hen e, Proposition 8.2implies that ea h irredu ible disse tion has at most one tri-orientation without lo kwise ir uit.8.5 Existen e of a tri-orientation without lo kwise ir uitInverse of the transposition rules. Let D be a bi olored omplete irredu ible disse -tion and G ′ its derived map. Given an α -orientation of G ′ , we asso iate to thisorientation an orientation of the half-edges of D by performing the inverse of thetransposition rules: ea h half-edge h of D re eives the orientation of the edge of G ′ that follows h in lo kwise order around its in ident vertex, see Figure 14(b).Lemma 8.12. Let D be an irredu ible disse tion and G ′ the derived map of D ,endowed with its minimal α -orientation. Then the inverse of the transpositionrules for orientations yields a omplete-tri-orientation of D .ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· e e Fig. 17. The ase where the two half-edges of e are oriented inward implies that the boundary ofthe asso iated fa e of G ′ is a lo kwise ir uit.Proof. The inverse of the transposition rules is learly su h that a vertex has thesame outdegree in the orientation of D as in the α -orientation of G ′ . Hen e, ea hvertex of D has outdegree 3 ex ept the 3 outer white verti es that have outdegree 0,see Figure 14(b).To prove that the orientation of D is a omplete-tri-orientation, it remains toshow that the two half-edges of an edge e of D an not both be oriented inward.Assume a ontrario that there exists su h an edge e . The transposition rules fororientation and the fa t that ea h edge-vertex of G ′ has outdegree 1 imply that theboundary of the fa e f e of G ′ asso iated to e is a lo kwise ir uit, see Figure 17.This yields a ontradi tion with the minimality of the α -orientation.Lemma 8.13. Let D be a bi olored omplete irredu ible disse tion and let G ′ beits derived map. Then the omplete-tri-orientation of D asso iated with the minimal α -orientation of G ′ has no w ir uit.Proof. Let X be the minimal α -orientation of G ′ and let Z be the asso iated omplete-tri-orientation of D . Assume that Z has a lo kwise ir uit C . For ea hvertex v on C , we denote by h v the half-edge of C starting from v with the interiorof C on its right, and we denote by e v the edge of G ′ that follows h v in lo kwiseorder around v . As C is a lo kwise ir uit for Z , h v is going out of v . Hen e,by de(cid:28)nition of the transposition rules, e v is going out of v . Observe that, in theinterior of C , e v is the most ounter- lo kwise edge of G ′ in ident to v .We use this observation to build iteratively a lo kwise ir uit of X , yielding a ontradi tion. First we state the following result proved in [Felsner 2004℄: (cid:16)for ea hvertex v ∈ G ′ there exists a simple oriented path P v in G ′ , alled the straight pathof v , whi h starts at v and ends at a vertex in ident to the outer fa e of G ′ ". Let v be a vertex on C , and P v be the straight path starting at e v for the orientation X . Then P v has to rea h C at a vertex v di(cid:27)erent from v . Denote by P thepart of P v between v and v , by Λ the part of the lo kwise ir uit C between v and v , and by C the y le en losed by the on atenation of P and Λ . Let P v be the straight path starting at e v . The fa t that e v is the most ounter lo kwisein ident edge of v in the interior of C ensures that P v starts in the interior of C .Then, the path P v has to rea h C at a vertex v = v . We denote by P the partof the path P v between v and v . If v belongs to P , then the on atenationof the part of P between v and v and of the part of P between v and v is a lo kwise ir uit, a ontradi tion. Hen e, v is on Λ stri tly between v and v .We denote by P the on atenation of P and P , and by Λ the part of C goingfrom v to v . As v is stri tly between v and v , Λ is stri tly in luded in Λ .Finally, we denote by C the y le made of the on atenation of P and Λ . Hen e,ACM Journal Name, Vol. V, No. N, Month 20YY.2 · Éri Fusy et al. v P P P P v v v v e v P e v C Λ Fig. 18. The presen e of a lo kwise ir uit in Z implies the presen e of a lo kwise ir uit in X .similarly as for the path P v , the straight path P v starting at e v must start in theinterior of C .Then we ontinue iteratively, see Figure 18. At ea h step k , we onsider thestraight path P v k starting at e v k . This path starts in the interior of the y le C k , and rea hes C k at another vertex v k +1 . This vertex v k +1 an not belong to P k := P ∪ . . . ∪ P k , otherwise a lo kwise ir uit of X would be reated. Hen e, v k +1 is on C stri tly between v k and v . In parti ular the path Λ k +1 going from v k +1 to v on C , is stri tly in luded in the path Λ k going from v k to v on C , i.e., Λ k shrinks stri tly at ea h step. Thus, there must be a step k when P v k rea hes C k at a vertex on P k , reating a lo kwise ir uit of X , a ontradi tion.Proposition 8.14. For ea h irredu ible disse tion, there exists a tri-orientationwithout lo kwise ir uit.Proof. Lemma 8.13 ensures that ea h bi olored omplete irredu ible disse tion D has a omplete-tri-orientation Z without lo kwise ir uit; and Proposition 8.2ensures that the existen e of a omplete-tri-orientation without lo kwise ir uitfor any bi olored omplete irredu ible disse tion implies the existen e of a tri-orientation without lo kwise ir uit for any irredu ible disse tion.Finally, Theorem 4.4 follows from Proposition 8.11 and Proposition 8.14.9. COMPUTING THE MINIMAL α -ORIENTATION OF A DERIVED MAPWe des ribe in this se tion a linear-time algorithm to ompute the minimal α -orientation of the derived map of an outer-triangular 3- onne ted plane graph.This result is ru ial for the en oding algorithm of Se tion 7 to have linear time omplexity (see the transition between Figure 11(b) and Figure 11( )).As dis ussed in [Felsner 2004℄, given a 3- onne ted map G and its derived map G ′ , an α -orientations of G ′ orresponds to a so- alled S hnyder wood of G . TheseS hnyder woods of 3- onne ted maps are the right generalisations of S hnyderwoods of triangulations [S hnyder 1990℄. Quite naturally, our algorithm is a gen-eralization of the algorithm to ompute the minimal S hnyder wood of a trian-gulation [Brehm 2000℄. The ideas for the extension to 3- onne ted maps havealready been introdu ed by [Kant 1996℄ and [di Battista et al. 1999℄. The algo-rithm of [di Battista et al. 1999℄ outputs a S hnyder wood of a 3- onne ted map;ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· α -orientation), also in linear time. In itself our algorithm for 3- onne ted mapsis only slightly more involved than the algorithm for triangulations, as opposed tothe orre tness proof, whi h is mu h harder (see the dis ussion at the beginningof Se tion 10). Be ause of this we give a rather proof-oriented des ription of thealgorithm.Our algorithm is also of independent interest in onne tion with S hnyder woods,and it has appli ations in the ontext of graph drawing. Indeed, the minimalS hnyder wood orientation is also a key ingredient for the straight-line drawingalgorithm presented in [Boni hon et al. 2007℄. This algorithm relies on operations ofedge-deletion, embedding of the obtained graph, and then embedding of the deletededges. The grid size is guaranteed to be bounded by ( n − × ( n − (cid:22)equallingat least S hnyder's algorithm [S hnyder 1990℄(cid:22) provided the S hnyder wood usedis the one asso iated to the minimal α -orientation. An implementation of thisdrawing algorithm in luding our orientation algorithm has been made available byBoni hon in [de Fraysseix et al. ℄.9.1 Prin iple of the algorithmLet G be an outer-triangular 3- onne ted planar graph and let G ′ be its derivedmap and G ∗ its dual map. We denote by a , a and a the outer verti es of G in lo kwise order. We des ribe here a linear-time iterative algorithm to ompute theminimal α -orientation of G ′ . The idea is to maintain a simple y le of edges of G ;at ea h step k , the y le, denoted by C k , is shrinked by hoosing a so- alled eligiblevertex v on C k , and by removing from the interior of C k all fa es in ident to v . Theeligible vertex is always di(cid:27)erent from a and a , so that the edge ( a , a ) , alledbase-edge, is always on C k . The edges of G ′ easing to be on C k or in the interior of C k are oriented so that the following invariants remain satis(cid:28)ed.Orientation invariants:(cid:22) For ea h edge e of G outside C k , the 4 edges of G ′ in ident to the edge-vertex v e asso iated to e have been oriented at a step j < k and v e has outdegree 1.(cid:22) All other edges of G ′ are not yet oriented.Moreover, the edges that orrespond to half-edges of G also re eive a label in { , , } , so that the following invariants for labels remain satis(cid:28)ed:Labelling invariants:(cid:22) At ea h step k , every vertex v of G outside of C k has one outgoing half-edgefor ea h label 1, 2 and 3 and these outgoing edges appear in lo kwise order around v . In addition, all edges between the outgoing edges with labels i and i + 1 arein oming with label i − , see Figure 19(a).(cid:22) Let v be a vertex of G on C k having at least one in ident edge of G ′ outside of G k . Then exa tly one of these edges, denoted by e ′ , is going out of v . In additionit has label 1. The edges of G ′ in ident to v and between e ′ and its left neighbourACM Journal Name, Vol. V, No. N, Month 20YY.4 · Éri Fusy et al. (a) (b) ( )Fig. 19. The invariants for the labels of the half-edges of G maintained during the algorithm.on C k are in oming with label 2; and the edges in ident to v in G ′ between e ′ andits right neighbour on C k are in oming with label 3, see Figure 19(b).(cid:22) For ea h edge e of G outside of G k , let e ′ be the unique outgoing edge of itsasso iated edge-vertex v e . Two ases an o ur:(cid:22) If e ′ is an half-edge of G then the two edges of G ′ in ident to v e and formingthe edge e are identi ally labelled. This orresponds to the ase where e is (cid:16)simplyoriented(cid:17).(cid:22) If e ′ is an half-edge of G ∗ , we denote by ≤ i ≤ the label of the edgeof G ′ following e ′ in lo kwise order around v e . Then the edge of G ′ following e ′ in ounter- lo kwise order around v e is labelled i + 1 , see Figure 19( ). This orresponds to the ase where e is (cid:16)bi-oriented(cid:17).A tually, the labels are not needed to ompute the orientation, but they will bevery useful to prove that the algorithm outputs the minimal α -orientation. Theselabels are in fa t the ones of the S hnyder woods of G , as dis ussed in [Felsner2004℄.In the following, we write G k for the submap of G obtained by removing allverti es and edges outside of C k (at step k ). In addition, we order the verti es of C k from left to right a ording to the order indu ed by the path C k \{ a , a } , with a as left extremity and a as right extremity. In other words, a vertex v ∈ C k ison the left of a vertex v ′ ∈ C k if the path of C k going from v to v ′ without passingby the edge ( a , a ) has the interior of C k on its right.9.2 Des ription of the main iterationLet us now des ribe the k -th step of the algorithm, during whi h the y le C k isshrinked so that the invariants for orientation and labelling remain satis(cid:28)ed. Thedes ription requires some de(cid:28)nitions.De(cid:28)nitions. A vertex of C k is said to be a tive if it is in ident to at least one edge of G \ G k . Otherwise, the vertex is passive. By onvention, before the (cid:28)rst step of thealgorithm, the vertex a is onsidered as a tive and its in ident half-edge dire tedtoward the outer fa e is labelled 1.For ea h pair of verti es ( v , v ) of C k (cid:22)with v is on the left of v (cid:22), the path on C k going from v to v without passing by the edge ( a , a ) is denoted by [ v , v ] .We also write ] v , v [ for [ v , v ] deprived from the endverti es v and v .A pair ( v , v ) of verti es of C k is separating if there exists an inner fa e f of G k su h that v and v are in ident to f but the edges of [ v , v ] are not all in identto f . Su h a fa e is alled a separating fa e and the triple ( v , v , f ) is alled aACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ··
11 + x • + x ◦ + 2 x • x ◦ + x • x ◦ ( r + r − r r ) , (10)where (cid:26) r ( x • , x ◦ ) = x • (1 + r ( x • , x ◦ )) r ( x • , x ◦ ) = x ◦ (1 + r ( x • , x ◦ )) .Proof. Lemma 5.1 ensures that P n |P ′ n +2 | x n = x U ( x ) and, more pre isely, P i,j |P ′ i +2 ,j +2 | x i • x j ◦ = x • x ◦ U ( x • , x ◦ ) . Moreover, Equations (8) and Equation (9)yield expressions of x U ( x ) and x • x ◦ U ( x • , x ◦ ) respe tively in terms of D ( x ) and D ( x • , x ◦ ) . In these expressions, repla e D ( x ) and D ( x • , x ◦ ) by their respe tiveexpression in terms of r and of r and r , as given by Equations (6) and (7).6. APPLICATION: SAMPLING ROOTED 3-CONNECTED MAPS6.1 Sampling rooted 3- onne ted maps with n edgesTheorem 4.8 ((cid:28)rst identity) ensures that the following algorithm samples rooted3- onne ted maps with n edges uniformly at random:(1) Sample an obje t T ∈ B ′ n − uniformly (e.g. using parenthesis words).(2) Perform the losure of T to obtain an irredu ible disse tion D with ( n − verti es. Choose randomly one of the six edges of the hexagon of D to arrythe root. If D is not unde omposable, then reje t and restart.(3) Conne t by a new edge e the root-vertex of D to the opposite outer vertex.Take e as root edge, with the same root-vertex as in D . This gives a rootedirredu ible quadrangulation Q with n fa es.(4) Return the rooted 3- onne ted map in P ′ n asso iated to Q by the angularmapping.Proposition 6.1. The su ess probability of the sampler at ea h trial is equalto |P ′ n | / |D ′ n − | , whi h satis(cid:28)es |P ′ n ||D ′ n − | → n →∞ . Hen e, the number of reje tions follows a geometri law whose mean is asymptoti- ally c = 3 / . As the losure mapping has linear-time omplexity, the samplingalgorithm has expe ted linear-time omplexity.Proof. A ording to Se tion 4.3, |D ′ n | = n +2 |B ′ n | = n )!( n +2)! n ! . Stirling formulayields |D ′ n − | ∼ √ π n n / . Moreover, a ording to [Tutte 1963℄, |P ′ n | ∼ √ π n n / .This yields the limit of |P ′ n | / |D ′ n − | .ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· i verti es and j fa esSimilarly, Theorem 4.8 (third identity), ensures that the following algorithm sam-ples rooted 3- onne ted maps with i verti es and j fa es uniformly at random:(1) Sample an obje t T ∈ B • i − ,j − uniformly at random. A simple method isdes ribed in Se tion 4.5.2.(2) Perform the losure of T to obtain an irredu ible disse tion D with ( i − inner bla k verti es and ( j − inner white verti es. Choose randomly theroot-vertex among the three bla k verti es of the hexagon. If the disse tion isnot unde omposable, then reje t and restart.(3) Conne t by a new edge e the root-vertex of D to the opposite outer vertex.Take e as root edge, with the same root-vertex as in D . This gives a rootedirredu ible quadrangulation Q with i bla k verti es and j white verti es.(4) Return the rooted 3- onne ted map in P ′ ij asso iated to Q by the angularmapping.Proposition 6.2. The su ess probability of the sampler at ea h trial is equalto |P ′ ij | / |D ′ i − ,j − | . Let α ∈ ]1 / , ; if i and j are orrelated by ij → α as i → ∞ ,then |P ′ ij ||D ′ i − ,j − | ∼ (2 − α ) (2 α − α =: 1 c α . Hen e, when ij → α , the number of reje tions follows a geometri law whose mean isasymptoti ally c α . Under these onditions, the sampling algorithm has an expe tedlinear-time omplexity, the linearity fa tor being asymptoti ally proportional to c α .Moreover, in the worst ase of triangulations where j = 2 i − , the mean numberof reje tions is quadrati , so that the sampling omplexity is ubi .Proof. These asymptoti results are easy onsequen es of the expression of |D ′ ij | obtained in Corollary 4.9 and of the asymptoti result |P ′ ij | ∼ ij (cid:0) i − j +2 (cid:1)(cid:0) j − i +2 (cid:1) given in [Bender 1987℄.7. APPLICATION: CODING 3-CONNECTED MAPSThis se tion introdu es an algorithm, derived from the inverse of the losure map-ping, to en ode a 3- onne ted map. Pre isely, the algorithm en odes an outer-triangular 3- onne ted map, but it is then easily extended to en ode any 3- onne tedmap. Indeed, if the outer fa e of G is not triangular, (cid:28)x three onse utive verti es v , v ′ and v ′′ in ident to the outer fa e of G and link v and v ′′ by an edge to obtainan outer-triangular 3- onne ted planar map e G ; the oding of G is obtained as the oding of e G plus one bit indi ating if an edge-addition has been done.7.1 Des ription of the oding algorithmLet G be an outer-triangular 3- onne ted map and let G ′ be its derived map, asde(cid:28)ned in Se tion 3.2. The oding algorithm relies on the following steps, illustratedin Figure 11. ACM Journal Name, Vol. V, No. N, Month 20YY.2 · Éri Fusy et al. a a a (a) a a a (b) a a a ( ) a a a (d)(e) (f)Fig. 11. Exe ution of the en oding algorithm on an example.7.1.1 Compute a parti ular orientation of the derived map G ′ (Fig. 11(b)-( )). The(cid:28)rst step of the algorithm is to ompute a spe i(cid:28) orientation X of the edges ofthe derived map G ′ , su h that X has no lo kwise ir uit, ea h primal or dualvertex has outdegree 3 and ea h edge-vertex has outdegree 1. Su h an orientationof G ′ exists and is unique, as we will see in Theorem 8.1. A linear time algorithmto ompute X is given in Se tion 9.7.1.2 Compute the irredu ible disse tion D asso iated to G (Fig. 11(d)). Considerthe bi olored omplete irredu ible disse tion D asso iated to G by the bije tionACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· G . Noti e that D has n inner fa es if G has n edges. Hen e,a ording to Euler's relation, D has n − inner verti es. Similarly, if G has i verti esand j inner fa es, then D has i bla k verti es and j + 3 white verti es.7.1.3 Compute the tri-orientation of D without lo kwise ir uit (Fig. 11(d)). Weorient ea h half-edge h of D belonging to an inner edge as follows: h is dire tedinward if its in ident vertex belongs to the hexagon; otherwise, h re eives the ori-entation of the w-following edge of G ′ . As shown in Se tion 8 (more pre isely inLemma 8.13, omposed with the orresponden e of Figure 13), this pro ess yieldsthe unique tri-orientation of D without lo kwise ir uit.7.1.4 Open the disse tion D into a binary tree T (Fig. 11(f)). On e the tri-orientationwithout lo kwise ir uit is omputed, D is opened into a binary tree T , by deletingouter verti es, outer edges, and all ingoing half-edges (see Se tion 4.2).7.1.5 En ode the tree T . First, hoose an arbitrary leaf of T , root T at this leaf,and en ode the obtained rooted binary tree using a parenthesis word (also alledDy k word ). The opening of a 3- onne ted map with n edges is a binary tree with n − inner nodes, yielding an en oding Dy k word of length n − .Similarly, the opening of a 3- onne ted map with i verti es and j inner fa es isa bla k-rooted bi olored binary tree with i − bla k nodes and j white nodes. Abla k-rooted bi olored binary trees with a given number of bla k and white nodesis en oded by a pair of words, as explained in Se tion 4.5.1. Then the two words an be asymptoti ally optimally en oded in linear time, a ording to [Boni hon etal. 2003, Lem.7℄.Theorem 7.1. The oding algorithm has linear-time omplexity and is asymp-toti ally optimal: the number of bits per edge of the ode of a map in P ′ n (resp. in P ′ ij ) is asymptoti ally equal to the binary entropy per edge, de(cid:28)ned as n log ( |P ′ n | ) (resp. i + j − log ( |P ′ ij | ) ).Proof. It is lear that the en oding algorithm has linear-time omplexity, pro-vided the algorithm omputing the onstrained orientation without lo kwise ir uitof the derived map has linear-time omplexity (whi h will be proved in Se tion 9and Se tion 10).A ording to Corollary 4.9, Proposition 6.1 and 6.2, |B ′ n | / |P ′ n | and |B • ij | / |P ′ ij | are bounded by (cid:28)xed polynomials. Hen e, the entropy per edge of B ′ n and P ′ n areasymptoti ally equal, and the binary entropy per edge of B • ij and P ′ ij are asymp-toti ally equal. As the en oding of obje ts of B ′ n ( B • ij ) using parenthesis words isasymptoti ally optimal, the en oding of obje ts of P ′ n ( P ′ ij , respe tively) is alsoasymptoti ally optimal.8. PROOF OF THEOREM 4.4This se tion is devoted to the proof of Theorem 4.4, whi h states that ea h irre-du ible disse tion has a unique tri-orientation without lo kwise ir uit.ACM Journal Name, Vol. V, No. N, Month 20YY.4 · Éri Fusy et al.8.1 α -orientations and outline of the proofDe(cid:28)nition. Let G = ( V, E ) be a planar map. Consider a fun tion α : V → N . An α -orientation of G is an orientation of the edges of G su h that the outdegree ofea h vertex v of G is α ( v ) . If an α -orientation exists, then the fun tion α is said tobe feasible for G .Existen e and uniqueness of α -orientations. The following results are proved in [Fel-sner 2004℄ (the (cid:28)rst point had already been proved in [Ossona de Mendez 1994℄):Theorem 8.1 ([Felsner 2004℄). Given a planar map G and a feasible fun -tion α , there exists a unique α -orientation of G without lo kwise ir uit. This α -orientation is alled the minimal 1 α -orientation of G .Given the derived map of an outer-triangular 3- onne ted planar map, the fun -tion α su h that α ( v ) = 3 for all primal and dual verti es and α ( v ) = 1 for alledge-verti es is a feasible fun tion.Theorem 8.1 ensures uniqueness of the orientation without lo kwise ir uit of agraph with pres ribed outdegree for ea h vertex. However, this property does notdire tly imply uniqueness in Theorem 4.4, be ause a tri-orientation has bi-orientededges.To use Theorem 8.1, we work with the derived map G ′ of an irredu ible disse -tion D , as de(cid:28)ned in Se tion 3.3. We have de(cid:28)ned derived maps only for a subset ofirredu ible disse tions, namely for bi olored omplete irredu ible disse tions (re allthat these are bi olored disse tions su h that the 3 outer white verti es have de-gree 2). As a onsequen e, a (cid:28)rst step toward proving Theorem 4.4 is to redu e itsproof to the proof of existen e and uniqueness of a so- alled omplete-tri-orientation(a slight adaptation of the de(cid:28)nition of tri-orientation) without lo kwise ir uit forany bi olored omplete irredu ible disse tion.We prove that a omplete-tri-orientation without lo kwise ir uit of a bi olored omplete irredu ible disse tion D is transposed inje tively into an α -orientationwithout lo kwise ir uit of its derived map G ′ . By inje tivity and by uniquenessof the α -orientation without lo kwise ir uit of G ′ , this implies uniqueness of atri-orientation without lo kwise ir uit for D .The (cid:28)nal step will be to prove that an α -orientation without lo kwise ir uit of G ′ is transposed into a omplete-tri-orientation without lo kwise ir uit of D . Byexisten e of an α -orientation without lo kwise ir uit for G ′ (Theorem 8.1), thisimplies the existen e of a omplete-tri-orientation without lo kwise ir uit of D .8.2 Redu tion to the ase of bi olored omplete disse tionsIntrodu tion. The aim of this se tion is to redu e the proof of Theorem 4.4 to the lass of omplete bi olored irredu ible disse tions. We state the following propo-sition where the term (cid:16) omplete-tri-orientation(cid:17), to be de(cid:28)ned later, is a slightadaptation of the notion of tri-orientation.Proposition 8.2. The existen e and uniqueness of a omplete-tri-orientationwithout lo kwise ir uit for any bi olored omplete irredu ible disse tion implies The term minimal refers to the fa t that the set of all α -orientations of G forms a distributivelatti e, the (cid:16)(cid:29)ip(cid:17) operation being a ir uit reversion.ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· D , we de(cid:28)ne its ompleted disse tion D c as follows . For ea h white vertex v of the hexagon, we denote by e l ( v ) ( e r ( v ) ) the outer edge starting from v withthe interior of the hexagon on the left (right, respe tively) and denote by l ( v ) and r ( v ) the neighbours of v in ident to e l ( v ) and to e r ( v ) . We perform the followingoperation: if v has degree at least 3, a new white vertex v ′ is reated outside of thehexagon and is linked to l ( v ) and to r ( v ) by two new edges e l ( v ′ ) and e r ( v ′ ) , seeFigure 12. The vertex v ′ is said to over the vertex v .The disse tion obtained is a bi olored disse tion of the hexagon su h that thethree white verti es of the hexagon have two in ident edges, see the transitionbetween Figure 13(a) and Figure 13(b) (ignore here the orientation of edges).Lemma 8.3. The ompletion D c of a bi olored irredu ible disse tion D is a bi- olored omplete irredu ible disse tion.Proof. The outer white verti es of D c have degree 2 by onstru tion. Hen e,we just have to prove that D c is irredu ible. As D is irredu ible, if a separating4- y le C appears in D c when the ompletion is performed, then it must ontain awhite vertex v ′ of the hexagon of D c added during the ompletion, so as to overan outer white vertex v of degree greater than 2. Two edges of C are the edges e l ( v ′ ) and e r ( v ′ ) in ident to v ′ in D c . The two other edges ǫ and ǫ of C form apath of length 2 onne ting the verti es l ( v ) and r ( v ) and passing by the interiorof D (otherwise, C would en lose a fa e). As D is irredu ible, the 4- y le C ′ of D onsisting of the edges e l ( v ) , e r ( v ) , ǫ and ǫ delimits a fa e. Hen e e l ( v ) and e r ( v ) are in ident to the same inner fa e of D , whi h implies that v has degree 2, a ontradi tion.Tri-orientations. Let D be a bi olored irredu ible disse tion and let D c be its om-pleted bi olored disse tion. We de(cid:28)ne a mapping Φ from the tri-orientations of D c to the tri-orientations of D . Given a tri-orientation Y of D c , we remove the edgesthat have been added to obtain D c from D , erase the orientation of the edges ofthe hexagon of D , and orient inward all inner half-edges in ident to an outer ver-tex of D . We obtain thus a tri-orientation Φ( Y ) of D , see the transition betweenFigure 13(b) and Figure 13(a).Lemma 8.4. Let Y be a tri-orientation of D c without lo kwise ir uit. Thenthe tri-orientation Φ( Y ) of D has no lo kwise ir uit.For ea h tri-orientation X of D without lo kwise ir uit, there exists a tri-orientation Y of D c without lo kwise ir uit su h that Φ( Y ) = X .ACM Journal Name, Vol. V, No. N, Month 20YY.6 · Éri Fusy et al. e l ( v ) e r ( v ) vl ( v ) r ( v ) h h h h h e l ( v ) e r ( v ) vl ( v ) r ( v ) h h h h h e l ( v ′ ) e r ( v ′ ) v ′ f Fig. 12. From a tri-orientation X of D without lo kwise ir uit, onstru tion of a tri-orientation Y of D c without lo kwise ir uit su h that Φ( Y ) = X .Proof. The (cid:28)rst point is trivial, as the tri-orientation Φ( Y ) is just obtained byremoving some edges and some orientations of half-edges.For the se ond point, the preimage Y is onstru ted as follows. Consider ea hwhite vertex v of the hexagon of D whi h has degree at least 3. Let ( h , . . . , h m ) ( m ≥ be the series of half-edges in ident to v in D in ounter- lo kwise orderaround v , with h and h belonging respe tively to the edges e r ( v ) and e l ( v ) . As m ≥ , the vertex v gives rise to a overing vertex v ′ with two in ident edges e l ( v ′ ) and e r ( v ′ ) su h that the edges e l ( v ) , e r ( v ) , e l ( v ′ ) and e r ( v ′ ) form a new fa e f . Theedges e l ( v ) and e r ( v ) be ome inner edges of D c when v ′ is added, and have thus tobe dire ted.We orient the two half-edges of e l ( v ) and e r ( v ) respe tively toward l ( v ) andtoward r ( v ) , see Figure 12. The vertex v re eives thus two outgoing half-edges, andwe have to give to v a third outgoing half-edge. The suitable hoi e to avoid theappearan e of a lo kwise ir uit is to orient h outward, see Figure 12. Indeed,assume a ontrario that a simple lo kwise ir uit C is reated. Then the ir uitmust pass by v . It goes into v using one of the half-edges h i dire ted toward v , i.e., i ≥ . Moreover, it must go out of v using the half-edge h (indeed, if the ir uituses h or h to go out of v , then it rea hes an outer vertex, whi h has outdegree0). Hen e, the interior of the lo kwise ir uit C must ontain all fa es in identto v that are on the right of v when we traverse v from h i and go out using h .Hen e, the interior of C must ontain the new fa e f of D c , see Figure 12. But f is in ident to outer edges of D c , hen e the lo kwise ir uit C must pass by outeredges of D c , whi h are not oriented, a ontradi tion. Thus, we have onstru teda tri-orientation Y of D c without lo kwise ir uit and su h that Φ( Y ) = X . Anexample of this onstru tion an be seen as the transition between Figure 13(a)and Figure 13(b).Lemma 8.5. The existen e and uniqueness of a tri-orientation without lo k-wise ir uit for any bi olored omplete irredu ible disse tion implies the existen eand uniqueness of a tri-orientation without lo kwise ir uit for any irredu ibledisse tion, i.e., implies Theorem 4.4.Proof. This is a lear onsequen e of Lemma 8.3 and Lemma 8.4.Complete-tri-orientations. A omplete-tri-orientation of a bi olored omplete irre-du ible disse tion D is an orientation of the half-edges of D that satis(cid:28)es the fol-lowing onditions (very similar to the onditions of a tri-orientation): all bla kverti es and all inner white verti es of D have outdegree 3, the three white verti esACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· D endowed with a tri-orientation X without lo kwise ir uit (Figure a). The asso iated ompleted disse tion D c (the two added white verti es aresurrounded) endowed with the tri-orientation Y su h that Φ( Y ) = X (Figure b). The disse tion D c endowed with the omplete-tri-orientation Z su h that Ψ( Z ) = Y (Figure ).of the hexagon have outdegree 0, and the two half-edges of an edge of D an notboth be oriented inward. The di(cid:27)eren e with the de(cid:28)nition of tri-orientation isthat the half-edges of the hexagon are oriented, with pres ribed outdegree for theouter verti es. Similarly as in a tri-orientation, edges of D are distinguished intosimply-oriented edges and bi-oriented edges.Lemma 8.6. Let D ∈ D n be a bi olored omplete irredu ible disse tion endowedwith a omplete-tri-orientation without lo kwise ir uit. Then the subgraph T of D onsisting of the bi-oriented edges of D is a tree in ident to all verti es of D ex ept the three outer white verti es.Proof. We reason similarly as in Lemma 4.2. Let r and s be the numbers of bi-oriented and simply oriented edges of D . From Euler's relation (using the degreesof the fa es of D ), D has n + 7 edges, i.e., r + s = 2 n + 7 . In addition, the n inner verti es and the three bla k (resp. white) verti es of the hexagon of D haveoutdegree 3 (resp. 0). Hen e, r + s = 3( n + 3) . Thus, r = n + 2 and s = n + 5 .Hen e, the subgraph T has n + 2 edges, has no y le (otherwise, a lo kwise ir uitof D would exist), and is in ident to at most ( n + 3) verti es, whi h are the innerverti es and the three outer bla k verti es of D . A lassi al result of graph theoryensures that T is a tree spanning these ( n + 3) verti es.Lemma 8.7. Let D ∈ D n be a bi olored omplete irredu ible disse tion endowedwith a omplete-tri-orientation Z without lo kwise ir uit. Then, for ea h outerbla k vertex v of D , the unique outgoing inner half-edge in ident to v belongs to abi-oriented edge.Proof. The subgraph T onsisting of the bi-oriented edges of D is a tree span-ning all verti es of D ex ept the three outer white verti es. Hen e, there is abi-oriented edge e in ident to ea h bla k vertex v of the hexagon and this edge onsitutes the third outgoing edge of v .Let D be a bi olored omplete irredu ible disse tion and Z be a omplete-tri-orientation of D without lo kwise ir uit. We asso iate to Z a tri-orientation Ψ( Z ) as follows: erase the orientation of the edges of the hexagon of D ; for ea h bla kACM Journal Name, Vol. V, No. N, Month 20YY.8 · Éri Fusy et al.(a) (b) ( )Fig. 14. The onstru tion of the derived map of a bi olored omplete irredu ible disse tion. Thedisse tion is endowed with a omplete-tri-orientation without lo kwise ir uit, and the derivedmap is endowed with the orientation obtained using the transposition rules for orientations.vertex v of the hexagon, hange the orientation of the unique outgoing inner half-edge h of v . A ording to Lemma 8.7, h belongs to a bi-oriented edge e , so thatthe hange of orientation of h turns e into an edge simply oriented toward v . Thus,the obtained orientation Ψ( Z ) is a tri-orientation.Lemma 8.8. Let D be a bi olored omplete irredu ible disse tion. Let Z be a omplete-tri-orientation of D without lo kwise ir uit. Then the tri-orientation Ψ( Z ) of D has no lo kwise ir uit.For ea h tri-orientation Y of D without lo kwise ir uit, there exists a omplete-tri-orientation Z of D without lo kwise ir uit su h that Ψ( Z ) = Y .Proof. The (cid:28)rst point is trivial. For the se ond point, we reason similarly as inLemma 8.4. For ea h bla k vertex v of the hexagon of D , let ( h , . . . , h m ) ( m ≥ be the sequen e of half-edges of D in ident to v in ounter- lo kwise order around v , with h and h belonging to the two outer edges e r ( v ) and e l ( v ) of D that arein ident to v . To onstru t the preimage Z of Y , we make the edges e l ( v ) and e r ( v ) simply oriented toward their in ident white vertex. The third outgoing half-edge is hosen to be h , whi h is the (cid:16)leftmost(cid:17) inner half-edge of v . An argument similar asin the proof of the se ond point of Lemma 8.4 ensures that this hoi e is judi ious toavoid the reation of a lo kwise ir uit. An example of this onstru tion is shownin Figure 13(b)-( ).Finally, Proposition 8.2 follows dire tly from Lemma 8.5 and Lemma 8.8.Proposition 8.5 redu es the proof of Theorem 4.4 to proving the existen e anduniqueness of a omplete-tri-orientation without w ir uit for any bi olored om-plete irredu ible disse tion. From now on, we will work with these disse tions.8.3 Transposition rules for orientationsLet D be a bi olored omplete irredu ible disse tion and let G ′ be the derived mapof D . We asso iate to a omplete-tri-orientation of D an orientation of the edgesof G ′ of D as follows, see Figure 14: ea h edge e = ( v, v ′ ) (cid:22)with v the primal/dualvertex and v ′ the edge-vertex(cid:22) re eives the dire tion of the half-edge of D following e in w order around v .ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· D be a bi olored omplete irredu ible disse tion endowed witha omplete-tri-orientation without lo kwise ir uit. Then the orientation of thederived map G ′ of D obtained using the transposition rules has the following prop-erties:(cid:22)ea h primal or dual vertex of G ′ has outdegree 3.(cid:22)ea h edge-vertex of G ′ has outdegree 1.In other words, the orientation of G ′ obtained by applying the transposition rules isan α -orientation.Proof. The (cid:28)rst point is trivial. For the se ond point, let f be an inner fa eof D and v f the asso iated edge-vertex of G ′ (we re all that v f is the interse tionof the two diagonals of f ). The transposition rules for orientation ensures thatthe outdegree of v f in G ′ is the number n f of inward half-edges of D in ident to f . Hen e, to prove that ea h edge-vertex of G ′ has outdegree 1, we have to provethat n f = 1 for ea h inner fa e f of D . Observe that n f is a positive number,otherwise the ontour of f would be a lo kwise ir uit. Let n be the number ofinner verti es of D . Euler's relation implies that D has ( n + 2) inner fa es and (4 n + 14) half-edges. By de(cid:28)nition of a omplete-tri-orientation, n + 3) half-edgesare outgoing. Hen e, ( n + 5) half-edges are ingoing. Among these ( n + 5) ingoinghalf-edges, exa tly three are in ident to the outer fa e (see Figure 13( )). Hen e, D has ( n + 2) half-edges in ident to an inner fa e, so that P f n f = n + 2 . As P f n f is a sum of ( n + 2) positive numbers adding to ( n + 2) , the pigeonhole's prin ipleensures that n f = 1 for ea h inner fa e f of D .8.4 Uniqueness of a tri-orientation without lo kwise ir uitThe following lemma is the ompanion of Lemma 8.9 and is ru ial to establishthe uniqueness of a tri-orientation without lo kwise ir uit for any irredu ibledisse tion.Lemma 8.10. Let D be a bi olored omplete irredu ible disse tion endowed witha omplete-tri-orientation Z without lo kwise ir uit. Let G ′ be the derived mapof D . Then the α -orientation X of G ′ obtained from Z by the transposition ruleshas no lo kwise ir uit.Proof. Assume that X has a lo kwise ir uit C . Ea h edge of G ′ onne ts anedge-vertex and a vertex of the original disse tion D . Hen e, the ir uit C onsistsof a sequen e of pairs ( e, e ) of onse utive edges of G ′ su h that e goes from a vertex v of the disse tion toward an edge-vertex v ′ of G ′ and e goes from v ′ toward a vertex v of the disse tion. Let ( e ′ , . . . , e ′ m ) be the sequen e of edges of G ′ between e and e in lo kwise order around v ′ , so that e ′ = e ; and e ′ m = e and let ( v , . . . , v m ) betheir respe tive extremities, so that v = v and v m = v . Noti e that ≤ m ≤ .As ea h edge-vertex has outdegree 1 in X and as e ′ m is going out of v ′ , the edges e ′ , . . . , e ′ m − are dire ted toward v ′ . Hen e, the transposition rules for orientationsensure that the edges ( v i , v i +1 ) , for ≤ i ≤ m − , are all bi-oriented or orientedfrom v i to v i +1 in the omplete-tri-orientation Z of D . Hen e, we an go from v to v passing by the exterior of C and using only edges of D , see Figure 15 for anexample, where m = 3 . ACM Journal Name, Vol. V, No. N, Month 20YY.0 · Éri Fusy et al. ev e vv v ′ C eev v ′ v Fig. 15. An oriented path of edges of the disse tion an be asso iated to ea h pair ( e, e ) of onse utive edges of C sharing an edge-vertex. Fig. 16. A simple lo kwise ir uit an be extra ted from an oriented path en losing a boundedsimply onne ted region on its right.Con atenating the paths of edges of D asso iated to ea h pair ( e, e ) of C , we obtaina losed oriented path of edges of D en losing the interior of C on its right. Clearly,a simple lo kwise ir uit an be extra ted from this losed path, see Figure 16. Asthe omplete-tri-orientation Z has no lo kwise ir uit, this yields a ontradi tion.Proposition 8.11. Ea h irredu ible disse tion has at most one tri-orientationwithout lo kwise ir uit.Proof. Let D be a bi olored omplete irredu ible disse tion and G ′ its derivedmap. A (cid:28)rst important remark is that the transposition rules for orientations learlyde(cid:28)ne an inje tive mapping. In addition, Lemma 8.10 ensures that the image of a omplete-tri-orientation of D without lo kwise ir uit is an α -orientation of G ′ without lo kwise ir uit. Hen e, inje tivity of the mapping and uniqueness of an α -orientation without lo kwise ir uit of G ′ (Theorem 8.1) ensure that D has atmost one omplete-tri-orientation without lo kwise ir uit. Hen e, Proposition 8.2implies that ea h irredu ible disse tion has at most one tri-orientation without lo kwise ir uit.8.5 Existen e of a tri-orientation without lo kwise ir uitInverse of the transposition rules. Let D be a bi olored omplete irredu ible disse -tion and G ′ its derived map. Given an α -orientation of G ′ , we asso iate to thisorientation an orientation of the half-edges of D by performing the inverse of thetransposition rules: ea h half-edge h of D re eives the orientation of the edge of G ′ that follows h in lo kwise order around its in ident vertex, see Figure 14(b).Lemma 8.12. Let D be an irredu ible disse tion and G ′ the derived map of D ,endowed with its minimal α -orientation. Then the inverse of the transpositionrules for orientations yields a omplete-tri-orientation of D .ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· e e Fig. 17. The ase where the two half-edges of e are oriented inward implies that the boundary ofthe asso iated fa e of G ′ is a lo kwise ir uit.Proof. The inverse of the transposition rules is learly su h that a vertex has thesame outdegree in the orientation of D as in the α -orientation of G ′ . Hen e, ea hvertex of D has outdegree 3 ex ept the 3 outer white verti es that have outdegree 0,see Figure 14(b).To prove that the orientation of D is a omplete-tri-orientation, it remains toshow that the two half-edges of an edge e of D an not both be oriented inward.Assume a ontrario that there exists su h an edge e . The transposition rules fororientation and the fa t that ea h edge-vertex of G ′ has outdegree 1 imply that theboundary of the fa e f e of G ′ asso iated to e is a lo kwise ir uit, see Figure 17.This yields a ontradi tion with the minimality of the α -orientation.Lemma 8.13. Let D be a bi olored omplete irredu ible disse tion and let G ′ beits derived map. Then the omplete-tri-orientation of D asso iated with the minimal α -orientation of G ′ has no w ir uit.Proof. Let X be the minimal α -orientation of G ′ and let Z be the asso iated omplete-tri-orientation of D . Assume that Z has a lo kwise ir uit C . For ea hvertex v on C , we denote by h v the half-edge of C starting from v with the interiorof C on its right, and we denote by e v the edge of G ′ that follows h v in lo kwiseorder around v . As C is a lo kwise ir uit for Z , h v is going out of v . Hen e,by de(cid:28)nition of the transposition rules, e v is going out of v . Observe that, in theinterior of C , e v is the most ounter- lo kwise edge of G ′ in ident to v .We use this observation to build iteratively a lo kwise ir uit of X , yielding a ontradi tion. First we state the following result proved in [Felsner 2004℄: (cid:16)for ea hvertex v ∈ G ′ there exists a simple oriented path P v in G ′ , alled the straight pathof v , whi h starts at v and ends at a vertex in ident to the outer fa e of G ′ ". Let v be a vertex on C , and P v be the straight path starting at e v for the orientation X . Then P v has to rea h C at a vertex v di(cid:27)erent from v . Denote by P thepart of P v between v and v , by Λ the part of the lo kwise ir uit C between v and v , and by C the y le en losed by the on atenation of P and Λ . Let P v be the straight path starting at e v . The fa t that e v is the most ounter lo kwisein ident edge of v in the interior of C ensures that P v starts in the interior of C .Then, the path P v has to rea h C at a vertex v = v . We denote by P the partof the path P v between v and v . If v belongs to P , then the on atenationof the part of P between v and v and of the part of P between v and v is a lo kwise ir uit, a ontradi tion. Hen e, v is on Λ stri tly between v and v .We denote by P the on atenation of P and P , and by Λ the part of C goingfrom v to v . As v is stri tly between v and v , Λ is stri tly in luded in Λ .Finally, we denote by C the y le made of the on atenation of P and Λ . Hen e,ACM Journal Name, Vol. V, No. N, Month 20YY.2 · Éri Fusy et al. v P P P P v v v v e v P e v C Λ Fig. 18. The presen e of a lo kwise ir uit in Z implies the presen e of a lo kwise ir uit in X .similarly as for the path P v , the straight path P v starting at e v must start in theinterior of C .Then we ontinue iteratively, see Figure 18. At ea h step k , we onsider thestraight path P v k starting at e v k . This path starts in the interior of the y le C k , and rea hes C k at another vertex v k +1 . This vertex v k +1 an not belong to P k := P ∪ . . . ∪ P k , otherwise a lo kwise ir uit of X would be reated. Hen e, v k +1 is on C stri tly between v k and v . In parti ular the path Λ k +1 going from v k +1 to v on C , is stri tly in luded in the path Λ k going from v k to v on C , i.e., Λ k shrinks stri tly at ea h step. Thus, there must be a step k when P v k rea hes C k at a vertex on P k , reating a lo kwise ir uit of X , a ontradi tion.Proposition 8.14. For ea h irredu ible disse tion, there exists a tri-orientationwithout lo kwise ir uit.Proof. Lemma 8.13 ensures that ea h bi olored omplete irredu ible disse tion D has a omplete-tri-orientation Z without lo kwise ir uit; and Proposition 8.2ensures that the existen e of a omplete-tri-orientation without lo kwise ir uitfor any bi olored omplete irredu ible disse tion implies the existen e of a tri-orientation without lo kwise ir uit for any irredu ible disse tion.Finally, Theorem 4.4 follows from Proposition 8.11 and Proposition 8.14.9. COMPUTING THE MINIMAL α -ORIENTATION OF A DERIVED MAPWe des ribe in this se tion a linear-time algorithm to ompute the minimal α -orientation of the derived map of an outer-triangular 3- onne ted plane graph.This result is ru ial for the en oding algorithm of Se tion 7 to have linear time omplexity (see the transition between Figure 11(b) and Figure 11( )).As dis ussed in [Felsner 2004℄, given a 3- onne ted map G and its derived map G ′ , an α -orientations of G ′ orresponds to a so- alled S hnyder wood of G . TheseS hnyder woods of 3- onne ted maps are the right generalisations of S hnyderwoods of triangulations [S hnyder 1990℄. Quite naturally, our algorithm is a gen-eralization of the algorithm to ompute the minimal S hnyder wood of a trian-gulation [Brehm 2000℄. The ideas for the extension to 3- onne ted maps havealready been introdu ed by [Kant 1996℄ and [di Battista et al. 1999℄. The algo-rithm of [di Battista et al. 1999℄ outputs a S hnyder wood of a 3- onne ted map;ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· α -orientation), also in linear time. In itself our algorithm for 3- onne ted mapsis only slightly more involved than the algorithm for triangulations, as opposed tothe orre tness proof, whi h is mu h harder (see the dis ussion at the beginningof Se tion 10). Be ause of this we give a rather proof-oriented des ription of thealgorithm.Our algorithm is also of independent interest in onne tion with S hnyder woods,and it has appli ations in the ontext of graph drawing. Indeed, the minimalS hnyder wood orientation is also a key ingredient for the straight-line drawingalgorithm presented in [Boni hon et al. 2007℄. This algorithm relies on operations ofedge-deletion, embedding of the obtained graph, and then embedding of the deletededges. The grid size is guaranteed to be bounded by ( n − × ( n − (cid:22)equallingat least S hnyder's algorithm [S hnyder 1990℄(cid:22) provided the S hnyder wood usedis the one asso iated to the minimal α -orientation. An implementation of thisdrawing algorithm in luding our orientation algorithm has been made available byBoni hon in [de Fraysseix et al. ℄.9.1 Prin iple of the algorithmLet G be an outer-triangular 3- onne ted planar graph and let G ′ be its derivedmap and G ∗ its dual map. We denote by a , a and a the outer verti es of G in lo kwise order. We des ribe here a linear-time iterative algorithm to ompute theminimal α -orientation of G ′ . The idea is to maintain a simple y le of edges of G ;at ea h step k , the y le, denoted by C k , is shrinked by hoosing a so- alled eligiblevertex v on C k , and by removing from the interior of C k all fa es in ident to v . Theeligible vertex is always di(cid:27)erent from a and a , so that the edge ( a , a ) , alledbase-edge, is always on C k . The edges of G ′ easing to be on C k or in the interior of C k are oriented so that the following invariants remain satis(cid:28)ed.Orientation invariants:(cid:22) For ea h edge e of G outside C k , the 4 edges of G ′ in ident to the edge-vertex v e asso iated to e have been oriented at a step j < k and v e has outdegree 1.(cid:22) All other edges of G ′ are not yet oriented.Moreover, the edges that orrespond to half-edges of G also re eive a label in { , , } , so that the following invariants for labels remain satis(cid:28)ed:Labelling invariants:(cid:22) At ea h step k , every vertex v of G outside of C k has one outgoing half-edgefor ea h label 1, 2 and 3 and these outgoing edges appear in lo kwise order around v . In addition, all edges between the outgoing edges with labels i and i + 1 arein oming with label i − , see Figure 19(a).(cid:22) Let v be a vertex of G on C k having at least one in ident edge of G ′ outside of G k . Then exa tly one of these edges, denoted by e ′ , is going out of v . In additionit has label 1. The edges of G ′ in ident to v and between e ′ and its left neighbourACM Journal Name, Vol. V, No. N, Month 20YY.4 · Éri Fusy et al. (a) (b) ( )Fig. 19. The invariants for the labels of the half-edges of G maintained during the algorithm.on C k are in oming with label 2; and the edges in ident to v in G ′ between e ′ andits right neighbour on C k are in oming with label 3, see Figure 19(b).(cid:22) For ea h edge e of G outside of G k , let e ′ be the unique outgoing edge of itsasso iated edge-vertex v e . Two ases an o ur:(cid:22) If e ′ is an half-edge of G then the two edges of G ′ in ident to v e and formingthe edge e are identi ally labelled. This orresponds to the ase where e is (cid:16)simplyoriented(cid:17).(cid:22) If e ′ is an half-edge of G ∗ , we denote by ≤ i ≤ the label of the edgeof G ′ following e ′ in lo kwise order around v e . Then the edge of G ′ following e ′ in ounter- lo kwise order around v e is labelled i + 1 , see Figure 19( ). This orresponds to the ase where e is (cid:16)bi-oriented(cid:17).A tually, the labels are not needed to ompute the orientation, but they will bevery useful to prove that the algorithm outputs the minimal α -orientation. Theselabels are in fa t the ones of the S hnyder woods of G , as dis ussed in [Felsner2004℄.In the following, we write G k for the submap of G obtained by removing allverti es and edges outside of C k (at step k ). In addition, we order the verti es of C k from left to right a ording to the order indu ed by the path C k \{ a , a } , with a as left extremity and a as right extremity. In other words, a vertex v ∈ C k ison the left of a vertex v ′ ∈ C k if the path of C k going from v to v ′ without passingby the edge ( a , a ) has the interior of C k on its right.9.2 Des ription of the main iterationLet us now des ribe the k -th step of the algorithm, during whi h the y le C k isshrinked so that the invariants for orientation and labelling remain satis(cid:28)ed. Thedes ription requires some de(cid:28)nitions.De(cid:28)nitions. A vertex of C k is said to be a tive if it is in ident to at least one edge of G \ G k . Otherwise, the vertex is passive. By onvention, before the (cid:28)rst step of thealgorithm, the vertex a is onsidered as a tive and its in ident half-edge dire tedtoward the outer fa e is labelled 1.For ea h pair of verti es ( v , v ) of C k (cid:22)with v is on the left of v (cid:22), the path on C k going from v to v without passing by the edge ( a , a ) is denoted by [ v , v ] .We also write ] v , v [ for [ v , v ] deprived from the endverti es v and v .A pair ( v , v ) of verti es of C k is separating if there exists an inner fa e f of G k su h that v and v are in ident to f but the edges of [ v , v ] are not all in identto f . Su h a fa e is alled a separating fa e and the triple ( v , v , f ) is alled aACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· [ v , v ] and by the path of edgesof f going from v to v with the interior of f on its right is alled the separatedarea of ( v , v , f ) and is denoted by Sep( v , v , f ) .A vertex v on C k is said to be blo ked if it belongs to a separating pair. It iseasily he ked that a vertex is blo ked i(cid:27) it is in ident to a separating fa e of G k . Inparti ular, a non blo ked vertex does not belong to any separating pair of verti es.By onvention, the verti es a and a are always onsidered as blo ked. A vertex v on C k is eligible if it is a tive and not blo ked.Finally, for ea h vertex v of C k , we de(cid:28)ne its left- onne tion vertex left( v ) asthe leftmost vertex on C k su h that the verti es of ]left( v ) , v [ all have degree 2 in G k . The path [left( v ) , v ] is alled the left- hain of v and the (cid:28)rst edge of [left( v ) , v ] is alled the left- onne tion edge of v . Similarly, we de(cid:28)ne the right- onne tionvertex, the right- hain, and the right- onne tion edge of v . Noti e that all verti esof ]left( v ) , v [ and of ] v, right( v )[ are a tive, as ea h vertex of a 3- onne ted graphhas degree at least 3.Operations at step k . First, we hoose the rightmost eligible vertex of C k and we all v ( k ) this vertex. (We will prove in Lemma 9.2 that there always exists an eligiblevertex on C k as long as G k is not redu ed to the edge ( a , a ) .) Noti e that thiseligible vertex an not be a nor a be ause a and a are blo ked.We denote by f , . . . , f m the bounded fa es of G k in ident to v ( k ) from right toleft, and by e , . . . , e m +1 the edges of G k in ident to v ( k ) from right to left. Hen e,for ea h ≤ i ≤ m , f i orresponds to the se tor between e i and e i +1 .An important remark is that the right- hain of v ( k ) is redu ed to one edge.Indeed, if there exists a vertex v in ] v ( k ) , right( v ( k ) )[ , then v is a tive, as dis ussedabove. In addition, v is in ident to only one inner fa e of G k , namely f . As f is in ident to v ( k ) and as v ( k ) is non blo ked, f is not separating. Hen e v is notblo ked. Thus v is eligible and is on the right of v ( k ) , in ontradi tion with the fa tthat v ( k ) is the rightmost eligible vertex on C k .We label and orient the edges of G ′ in ident to the edge-verti es on the left- hainof v ( k ) and on the edges e , . . . e m , see Figure 20:(cid:22) Inner edges: For ea h edge e i with ≤ i ≤ m , we denote by v e i the orresponding edge-vertex of G ′ . Orient the two edges of G ′ forming e i toward v ( k ) and give label 1 to these two edges. Orient the two other in ident edges of v e i toward v e i , so that v e i has outdegree 1.(cid:22) Left- hain: For ea h edge e of the left- hain of v ( k ) (cid:22)traversed from v ( k ) to left( v ( k ) ) (cid:22) di(cid:27)erent from the left- onne tion edge, bi-orient e and give label 3(resp. label 2) to the (cid:28)rst (resp. se ond) traversed half-edge. Choose the uniqueoutgoing edge of the edge-vertex v e asso iated to e to be the edge going out of e toward the interior of C k (cid:22) Left- onne tion edge: If left( v ( k ) ) is passive, bi-orient the left- onne tionedge e of v ( k ) , give label 1 to the half-edge in ident to left( v ( k ) ) and label 3 to theother half-edge, and hoose the unique outgoing edge of the edge-vertex v e to bethe edge going out of v e toward the exterior of C k . If left( v ( k ) ) is a tive, label 3and orient toward left( v ( k ) ) the two edges of G ′ forming e , and orient the two dualedges in ident to v e toward v e . ACM Journal Name, Vol. V, No. N, Month 20YY.6 · Éri Fusy et al. v ( k ) v ( k ) v ( k )
11 1 1 1 12 232323 ( ) v ( k )
21 1 1 123223 3 3 (d)Fig. 20. The operations performed at step k of the algorithm, whether left( v ( k ) ) and right( v ( k ) ) are passive-passive (Fig. a) or a tive-passive (Fig. b) or passive-a tive (Fig. ) or a tive-a tive(Fig. d). A tive verti es are surrounded.(cid:22) Right- onne tion edge: The edge e , whi h is the right- onne tion edge of v ( k ) , is treated symmetri ally as the left- onne tion edge. If right( v ( k ) ) is passive,bi-orient e , give label 1 to the half-edge in ident to right( v ( k ) ) and label 2 to theother half-edge, and hoose the unique outgoing edge of the edge-vertex v e to bethe edge going out of v e toward the exterior of C k . If right( v ( k ) ) is a tive, label 2and orient toward right( v ( k ) ) the two edges of G ′ forming e , and orient the twodual edges in ident to v e toward v e .After these operations, all fa es in ident to v ( k ) are removed from the interiorof C k , produ ing a (shrinked) y le C k +1 . As a and a are blo ked on C k , C k +1 still ontains the edge ( a , a ) . In addition, if C k +1 is not redu ed to ( a , a ) , theproperty of 3- onne tivity of G and the fa t that the hosen vertex v ( k ) is notin ident to any separating fa e easily ensure that C k +1 is a simple y le, i.e., it doesnot ontain any separating vertex.It is also easy to get onvin ed from Figure 19 and Figure 20 that the operationsperformed at step k maintain the invariants of orientation and labelling.The purpose of the next two lemmas is to prove that the algorithm terminates.Lemma 9.1. Let ( v , v , f ) be a separator on C k . Then there exists an eligiblevertex in ] v , v [ .Proof. Consider the (non empty) set of separators whose separated area isin luded or equal to the separated area of ( v , v , f ) , and let ( v ′ , v ′ , f ′ ) be su h aseparator minimal w.r.t. the in lusion of the separated areas. Observe that v ′ and v ′ are in [ v , v ] .Assume that no vertex of ] v ′ , v ′ [ is a tive. Then the removal of v ′ and v ′ dis onne ts Sep( v ′ , v ′ , f ) from G \ Sep( v ′ , v ′ , f ) . This is in ontradi tion with 3- onne tivity of G , be ause these two sets are easily proved to ontain at least onevertex di(cid:27)erent from v ′ and v ′ .Hen e, there exists an a tive vertex v in ] v ′ , v ′ [ , also in ] v , v [ . If v was in identto a separating fa e, this fa e would be in luded in the separated area of ( v ′ , v ′ , f ′ ) ,ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ··
21 1 1 123223 3 3 (d)Fig. 20. The operations performed at step k of the algorithm, whether left( v ( k ) ) and right( v ( k ) ) are passive-passive (Fig. a) or a tive-passive (Fig. b) or passive-a tive (Fig. ) or a tive-a tive(Fig. d). A tive verti es are surrounded.(cid:22) Right- onne tion edge: The edge e , whi h is the right- onne tion edge of v ( k ) , is treated symmetri ally as the left- onne tion edge. If right( v ( k ) ) is passive,bi-orient e , give label 1 to the half-edge in ident to right( v ( k ) ) and label 2 to theother half-edge, and hoose the unique outgoing edge of the edge-vertex v e to bethe edge going out of v e toward the exterior of C k . If right( v ( k ) ) is a tive, label 2and orient toward right( v ( k ) ) the two edges of G ′ forming e , and orient the twodual edges in ident to v e toward v e .After these operations, all fa es in ident to v ( k ) are removed from the interiorof C k , produ ing a (shrinked) y le C k +1 . As a and a are blo ked on C k , C k +1 still ontains the edge ( a , a ) . In addition, if C k +1 is not redu ed to ( a , a ) , theproperty of 3- onne tivity of G and the fa t that the hosen vertex v ( k ) is notin ident to any separating fa e easily ensure that C k +1 is a simple y le, i.e., it doesnot ontain any separating vertex.It is also easy to get onvin ed from Figure 19 and Figure 20 that the operationsperformed at step k maintain the invariants of orientation and labelling.The purpose of the next two lemmas is to prove that the algorithm terminates.Lemma 9.1. Let ( v , v , f ) be a separator on C k . Then there exists an eligiblevertex in ] v , v [ .Proof. Consider the (non empty) set of separators whose separated area isin luded or equal to the separated area of ( v , v , f ) , and let ( v ′ , v ′ , f ′ ) be su h aseparator minimal w.r.t. the in lusion of the separated areas. Observe that v ′ and v ′ are in [ v , v ] .Assume that no vertex of ] v ′ , v ′ [ is a tive. Then the removal of v ′ and v ′ dis onne ts Sep( v ′ , v ′ , f ) from G \ Sep( v ′ , v ′ , f ) . This is in ontradi tion with 3- onne tivity of G , be ause these two sets are easily proved to ontain at least onevertex di(cid:27)erent from v ′ and v ′ .Hen e, there exists an a tive vertex v in ] v ′ , v ′ [ , also in ] v , v [ . If v was in identto a separating fa e, this fa e would be in luded in the separated area of ( v ′ , v ′ , f ′ ) ,ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· ( v ′ , v ′ , f ′ ) . Hen e, the a tive vertex v is notblo ked, i.e., is eligible.Lemma 9.2. As long as C k is not redu ed to ( a , a ) , there exists an eligiblevertex on C k .Proof. Assume that there exists no separating pair of verti es on C k . In this ase, an a tive vertex on C k di(cid:27)erent from a and a is eligible. Hen e we justhave to prove the existen e of su h a vertex. At the (cid:28)rst step of the algorithm,there exists an a tive vertex on C \{ a , a } be ause a is a tive by onvention. Atany other step, there exists an a tive vertex on C k \{ a , a } , otherwise the removalof a and a would dis onne t G k \{ a , a } from G \ G k , in ontradi tion with the3- onne tivity of G .If there exists at least one separator ( v , v , f ) , Lemma 9.1 ensures that thereexists an eligible vertex v in ] v , v [ .Last step of the algorithm. Lemma 9.2 implies that, at the end of the iterations,only the edge e = ( a , a ) remains. To omplete the orientation, bi-orient e andlabel 3 (resp. label 2) the half-edge of e whose origin is a (resp. a ); the outgoingedge of the edge-vertex v e (asso iated to e ) is hosen to be the edge going out of v e toward the outer fa e. We also label respe tively 2 and 3 the half-edges in ident to a and a and dire ted toward the outer fa e.Figure 21 illustrates the exe ution of the algorithm on an example, where theedges of C k are bla k and bolder. In addition, the a tive verti es are surroundedand the rightmost eligible vertex v ( k ) is doubly surrounded.Theorem 9.3. The algorithm outputs the minimal α -orientation of the derivedmap.Se tion 10 is dedi ated to the proof of this theorem.Remark. As stated in Theorem 9.3, our orientation algorithm outputs a parti ular α -orientation, namely the minimal one. The absen e of lo kwise ir uit is dueto the fa t that among all eligible verti es, the rightmost one is hosen at ea hstep. The algorithm is easily adapted to other hoi es of eligible verti es: the onlydi(cid:27)eren e is that the right- onne tion hain of the hosen eligible vertex mightnot be redu ed to an edge, in whi h ase it must be dealt with in a symmetri way as the left- onne tion hain (that is, 2 be omes 3 and left be omes right in thedes ription of edge labelling and orientation). This yields a (cid:16)generi (cid:17) algorithm that an produ e any α -orientations of G ′ . Indeed, given a parti ular α -orientation X of G ′ , it is easy to ompute a s enario (i.e., a suitable hoi e of the eligible vertexat ea h step) that outputs X . Su h a s enario orresponds to a so- alled anoni alordering for treating the verti es, see [Kant 1996℄.Implementation. Following [Kant 1996℄ (see also [Brehm 2000℄ for the ase of trian-gulations), an e(cid:30) ient implementation is obtained by maintaining, for ea h vertex v ∈ C k , the number s ( v ) of separating fa es in ident to v . Thus, a vertex is blo kedi(cid:27) s ( v ) > . Noti e that a fa e f is separating i(cid:27) the numbers v ( f ) and e ( f ) ofverti es and edges (ex ept ( a , a ) ) of f belonging to C k satisfy v ( f ) > e ( f ) + 1 .Thus, it is easy to test if a fa e is separating, so that the parameters s ( f ) are alsoACM Journal Name, Vol. V, No. N, Month 20YY.8 · Éri Fusy et al. a a a a a a a a a a a a a a a a a a a a a a a a Fig. 21. The exe ution of the algorithm of orientation on an example.ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ··
21 1 1 123223 3 3 (d)Fig. 20. The operations performed at step k of the algorithm, whether left( v ( k ) ) and right( v ( k ) ) are passive-passive (Fig. a) or a tive-passive (Fig. b) or passive-a tive (Fig. ) or a tive-a tive(Fig. d). A tive verti es are surrounded.(cid:22) Right- onne tion edge: The edge e , whi h is the right- onne tion edge of v ( k ) , is treated symmetri ally as the left- onne tion edge. If right( v ( k ) ) is passive,bi-orient e , give label 1 to the half-edge in ident to right( v ( k ) ) and label 2 to theother half-edge, and hoose the unique outgoing edge of the edge-vertex v e to bethe edge going out of v e toward the exterior of C k . If right( v ( k ) ) is a tive, label 2and orient toward right( v ( k ) ) the two edges of G ′ forming e , and orient the twodual edges in ident to v e toward v e .After these operations, all fa es in ident to v ( k ) are removed from the interiorof C k , produ ing a (shrinked) y le C k +1 . As a and a are blo ked on C k , C k +1 still ontains the edge ( a , a ) . In addition, if C k +1 is not redu ed to ( a , a ) , theproperty of 3- onne tivity of G and the fa t that the hosen vertex v ( k ) is notin ident to any separating fa e easily ensure that C k +1 is a simple y le, i.e., it doesnot ontain any separating vertex.It is also easy to get onvin ed from Figure 19 and Figure 20 that the operationsperformed at step k maintain the invariants of orientation and labelling.The purpose of the next two lemmas is to prove that the algorithm terminates.Lemma 9.1. Let ( v , v , f ) be a separator on C k . Then there exists an eligiblevertex in ] v , v [ .Proof. Consider the (non empty) set of separators whose separated area isin luded or equal to the separated area of ( v , v , f ) , and let ( v ′ , v ′ , f ′ ) be su h aseparator minimal w.r.t. the in lusion of the separated areas. Observe that v ′ and v ′ are in [ v , v ] .Assume that no vertex of ] v ′ , v ′ [ is a tive. Then the removal of v ′ and v ′ dis onne ts Sep( v ′ , v ′ , f ) from G \ Sep( v ′ , v ′ , f ) . This is in ontradi tion with 3- onne tivity of G , be ause these two sets are easily proved to ontain at least onevertex di(cid:27)erent from v ′ and v ′ .Hen e, there exists an a tive vertex v in ] v ′ , v ′ [ , also in ] v , v [ . If v was in identto a separating fa e, this fa e would be in luded in the separated area of ( v ′ , v ′ , f ′ ) ,ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· ( v ′ , v ′ , f ′ ) . Hen e, the a tive vertex v is notblo ked, i.e., is eligible.Lemma 9.2. As long as C k is not redu ed to ( a , a ) , there exists an eligiblevertex on C k .Proof. Assume that there exists no separating pair of verti es on C k . In this ase, an a tive vertex on C k di(cid:27)erent from a and a is eligible. Hen e we justhave to prove the existen e of su h a vertex. At the (cid:28)rst step of the algorithm,there exists an a tive vertex on C \{ a , a } be ause a is a tive by onvention. Atany other step, there exists an a tive vertex on C k \{ a , a } , otherwise the removalof a and a would dis onne t G k \{ a , a } from G \ G k , in ontradi tion with the3- onne tivity of G .If there exists at least one separator ( v , v , f ) , Lemma 9.1 ensures that thereexists an eligible vertex v in ] v , v [ .Last step of the algorithm. Lemma 9.2 implies that, at the end of the iterations,only the edge e = ( a , a ) remains. To omplete the orientation, bi-orient e andlabel 3 (resp. label 2) the half-edge of e whose origin is a (resp. a ); the outgoingedge of the edge-vertex v e (asso iated to e ) is hosen to be the edge going out of v e toward the outer fa e. We also label respe tively 2 and 3 the half-edges in ident to a and a and dire ted toward the outer fa e.Figure 21 illustrates the exe ution of the algorithm on an example, where theedges of C k are bla k and bolder. In addition, the a tive verti es are surroundedand the rightmost eligible vertex v ( k ) is doubly surrounded.Theorem 9.3. The algorithm outputs the minimal α -orientation of the derivedmap.Se tion 10 is dedi ated to the proof of this theorem.Remark. As stated in Theorem 9.3, our orientation algorithm outputs a parti ular α -orientation, namely the minimal one. The absen e of lo kwise ir uit is dueto the fa t that among all eligible verti es, the rightmost one is hosen at ea hstep. The algorithm is easily adapted to other hoi es of eligible verti es: the onlydi(cid:27)eren e is that the right- onne tion hain of the hosen eligible vertex mightnot be redu ed to an edge, in whi h ase it must be dealt with in a symmetri way as the left- onne tion hain (that is, 2 be omes 3 and left be omes right in thedes ription of edge labelling and orientation). This yields a (cid:16)generi (cid:17) algorithm that an produ e any α -orientations of G ′ . Indeed, given a parti ular α -orientation X of G ′ , it is easy to ompute a s enario (i.e., a suitable hoi e of the eligible vertexat ea h step) that outputs X . Su h a s enario orresponds to a so- alled anoni alordering for treating the verti es, see [Kant 1996℄.Implementation. Following [Kant 1996℄ (see also [Brehm 2000℄ for the ase of trian-gulations), an e(cid:30) ient implementation is obtained by maintaining, for ea h vertex v ∈ C k , the number s ( v ) of separating fa es in ident to v . Thus, a vertex is blo kedi(cid:27) s ( v ) > . Noti e that a fa e f is separating i(cid:27) the numbers v ( f ) and e ( f ) ofverti es and edges (ex ept ( a , a ) ) of f belonging to C k satisfy v ( f ) > e ( f ) + 1 .Thus, it is easy to test if a fa e is separating, so that the parameters s ( f ) are alsoACM Journal Name, Vol. V, No. N, Month 20YY.8 · Éri Fusy et al. a a a a a a a a a a a a a a a a a a a a a a a a Fig. 21. The exe ution of the algorithm of orientation on an example.ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· a , whi his the rightmost eligible vertex at the (cid:28)rst step. During the exe ution, on e thevertex v ( k ) is treated, the pointer is moved to v the right neighbour of v ( k ) on C k .The ru ial point is that, if v is blo ked, then no vertex on the right of v an beeligible (be ause of the nested stru ture of separating fa es). Thus, in this ase,the pointer is moved to the left until an eligible vertex is en ountered. Noti e alsothat v is a tive after v ( k ) is treated. Thus, if v is not blo ked, then v is eligibleat step k + 1 . In this ase, the nested stru ture of separating fa es ensures thatthe rightmost eligible vertex at step k + 1 , if not v , is either the right- onne tionvertex r ( v ) of v , or the left neighbour of r ( v ) on C k +1 (in the ase where r ( v ) is noteligible). Noti e that, in the ase where v is not blo ked, the pointer is moved tothe right but the edges traversed will be immediately treated (i.e., removed from C k +1 ) at step k + 1 . This ensures that an edge an be traversed at most twi e bythe pointer: on e from right to left and subsequently on e from left to right. Thus,the omplexity is linear.10. PROOF OF THEOREM 9.3Let G be an outer-triangular 3- onne ted map, and let X be the orientation of thederived map G ′ omputed by the orientation algorithm. This se tion is dedi atedto proving that X is the minimal α -orientation of G ′ .Our proof is inspired by the proof by Brehm [2000℄ that ensures that, for a trian-gulation, the hoi e of the rightmost eligible vertex at ea h step yields the S hnyderwoods without lo kwise ir uit. The argument is the following: the presen e ofa lo kwise ir uit implies the presen e of an (cid:16)in lusion-minimal(cid:17) lo kwise ir uitwhi h is, in the ase of a triangulation, a 3- y le ( x, y, z ) . Then the lo kwise ori-entation of ( x, y, z ) determines unambiguously (up to rotation) the labels of the 3edges of ( x, y, z ) . These labels determine an order of treatment of the 3 verti es x , y and z that is not ompatible with the fa t that the eligible vertex hosen at ea hstep is the rightmost one.In the general ase of 3- onne ted maps, whi h we onsider here, the proof ismore involved but follows the same lines. This time there is a (cid:28)nite set of minimalpatterns (for a triangulation this set is restri ted to the triangle), su h that aminimal lo kwise ir uit C in the orientation X of the derived map G ′ an only orrespond to one of these patterns (the list is shown in Figure 26). A ommon hara teristi is that the presen e of a lo kwise ir uit C for ea h of these patternsimplies the presen e of three paths P , P , P of edges of G whose on atenationforms a simple y le in G (in the ase of a triangulation, the three paths are redu edto one edge). In addition, the fa t that C is lo kwise determines unambiguously thelabels and orientations of the edges of P , P and P . Writing v , v and v for therespe tive origins of these three paths, our proof (as in the ase of triangulations,but with quite an amount of te hni al details) relies on the fa t that the labels of P , P , P imply an order for pro essing { v , v , v } that is not ompatible withthe fa t that the eligible vertex hosen at ea h step is the rightmost one.ACM Journal Name, Vol. V, No. N, Month 20YY.0 · Éri Fusy et al.
Fig. 22. The dual vertex of a fa e f has one outgoing edge onne ted to the lower path of f .10.1 The algorithm outputs an α -orientationBy onstru tion of the orientation, ea h primal vertex of the derived map G ′ has oneoutgoing edge in ea h label 1, 2 and 3, hen e it has outdegree 3. By onstru tionalso, ea h edge-vertex of G ′ has outdegree 1. Hen e, to prove that X is an α -orientation, it just remains to prove that ea h dual vertex of G ′ has outdegree 3in X .Let f be an inner fa e of G and v f the orresponding dual vertex in G ∗ . Let k bethe step during whi h f is merged with the outer fa e of G . At this step, a sequen eof onse utive edges of f has been removed. This path of removed onse utive edgesis alled the upper path of f . The path of edges of f that are not in the upper pathof f is alled the lower path of f . By onstru tion of the orientation (see Figure 20),exa tly two edges of G ′ onne ting v f to an edge-vertex of the upper path of f aregoing out of v f : these are the edge-verti es orresponding to the two extremal edgesof the upper path.Hen e it just remains to prove that exa tly one edge of G ′ onne ting v f to anedge-vertex of the lower path of f is going out of v f . First, observe that the lowerpath P of f is a non empty path of edges on C k +1 , su h that the two extremities v l and v r of the path are a tive and all verti es of ] v l , v r [ are passive on C k +1 , seeFigure 20. The fa t that exa tly one edge of G ′ onne ting v f to an edge-vertex of P is going out of v f is a dire t onsequen e of the following lemma, see Figure 22.Lemma 10.1. At a step k of the algorithm, let v and v be two a tive verti eson C k su h that all verti es of ] v , v [ are passive. Then the path [ v , v ] on C k ispartitioned into(cid:22) a (possibly empty) path [ v , v ] whose edges are bi-oriented in the (cid:28)nally om-puted orientation X , the left half-edge having label 2 and the right half-edge label 1,(cid:22) an edge e = [ v, v ′ ] either simply oriented with label 2 from v to v ′ , or simplyoriented with label 3 from v ′ to v , or bi-oriented, with label 2 on the half-edgein ident to v and label 3 on the half-edge in ident to v ′ ,(cid:22) a (possibly empty) path [ v ′ , v ] su h that, ea h edge of [ v ′ , v ] is bi-oriented,with label 1 on the left half-edge and label 3 on the right half-edge.Proof. The proof is by indu tion on the length L of [ v , v ] . Assume that L = 1 .Then [ v , v ] is redu ed to an edge. If v is removed at an earlier step than v , thenthe edge ( v , v ) is simply oriented with label 2 from v to v . If v is removed atan earlier step than v , then the edge ( v , v ) is simply oriented with label 3 from v to v . If v and v are removed at the same step, then ( v , v ) is bi-oriented,with label 2 on v 's side and label 3 on v 's side, see Figure 20.ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ··
Fig. 22. The dual vertex of a fa e f has one outgoing edge onne ted to the lower path of f .10.1 The algorithm outputs an α -orientationBy onstru tion of the orientation, ea h primal vertex of the derived map G ′ has oneoutgoing edge in ea h label 1, 2 and 3, hen e it has outdegree 3. By onstru tionalso, ea h edge-vertex of G ′ has outdegree 1. Hen e, to prove that X is an α -orientation, it just remains to prove that ea h dual vertex of G ′ has outdegree 3in X .Let f be an inner fa e of G and v f the orresponding dual vertex in G ∗ . Let k bethe step during whi h f is merged with the outer fa e of G . At this step, a sequen eof onse utive edges of f has been removed. This path of removed onse utive edgesis alled the upper path of f . The path of edges of f that are not in the upper pathof f is alled the lower path of f . By onstru tion of the orientation (see Figure 20),exa tly two edges of G ′ onne ting v f to an edge-vertex of the upper path of f aregoing out of v f : these are the edge-verti es orresponding to the two extremal edgesof the upper path.Hen e it just remains to prove that exa tly one edge of G ′ onne ting v f to anedge-vertex of the lower path of f is going out of v f . First, observe that the lowerpath P of f is a non empty path of edges on C k +1 , su h that the two extremities v l and v r of the path are a tive and all verti es of ] v l , v r [ are passive on C k +1 , seeFigure 20. The fa t that exa tly one edge of G ′ onne ting v f to an edge-vertex of P is going out of v f is a dire t onsequen e of the following lemma, see Figure 22.Lemma 10.1. At a step k of the algorithm, let v and v be two a tive verti eson C k su h that all verti es of ] v , v [ are passive. Then the path [ v , v ] on C k ispartitioned into(cid:22) a (possibly empty) path [ v , v ] whose edges are bi-oriented in the (cid:28)nally om-puted orientation X , the left half-edge having label 2 and the right half-edge label 1,(cid:22) an edge e = [ v, v ′ ] either simply oriented with label 2 from v to v ′ , or simplyoriented with label 3 from v ′ to v , or bi-oriented, with label 2 on the half-edgein ident to v and label 3 on the half-edge in ident to v ′ ,(cid:22) a (possibly empty) path [ v ′ , v ] su h that, ea h edge of [ v ′ , v ] is bi-oriented,with label 1 on the left half-edge and label 3 on the right half-edge.Proof. The proof is by indu tion on the length L of [ v , v ] . Assume that L = 1 .Then [ v , v ] is redu ed to an edge. If v is removed at an earlier step than v , thenthe edge ( v , v ) is simply oriented with label 2 from v to v . If v is removed atan earlier step than v , then the edge ( v , v ) is simply oriented with label 3 from v to v . If v and v are removed at the same step, then ( v , v ) is bi-oriented,with label 2 on v 's side and label 3 on v 's side, see Figure 20.ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· P v prec v ′ v ( k ) f v (a) P v ′ v ( k ) vf v prec (b)Fig. 23. The two possible on(cid:28)gurations related to the next a tive vertex on the right of v ( k ) .Assume that L > . Observe that the outer path [ v , v ] remains un hanged aslong as none of v or v is removed. This remark follows from the fa t that allverti es of ] v , v [ are passive, so that no vertex of [ v , v ] an be treated as long asnone of v or v is treated.Then, two ases an arise: if v is removed before v , the right neighbour v of v be omes a tive and the edge ( v , v ) is bi-oriented, with label 2 on v 's side and label1 on v 's side, see Figure 20. Similarly if v is removed before v , the left neighour v of v be omes a tive and the edge ( v, v ) is bi-oriented with label 3 on v 's sideand label 1 on v 's side.The result follows by indu tion on L , with a re ursive all to the path [ v, v ] inthe (cid:28)rst ase and to the path [ v , v ] in the se ond ase.10.2 The algorithm outputs the minimal α -orientation of the derived map10.2.1 De(cid:28)nitions and preliminary lemmas.Maximal bilabelled paths. Let v be a vertex of G . For ≤ i ≤ , the i -path of v isthe unique path P iv = ( v , . . . , v m ) of edges of G starting at v and su h that ea hedge ( v p , v p +1 ) is the outgoing edge of v p with label i (i.e., the edge of G ontainingthe outgoing half-edge of v p with label i ). A y li ity properties of S hnyder woodsensure that P iv ends at the outer vertex a i , see [Felsner 2004℄. For ≤ i ≤ and ≤ j ≤ with i = j , we de(cid:28)ne the maximal i − j path starting at v as follows. Let l ≤ m be the maximal index su h that the subpath ( v , . . . , v l ) of P iv only onsistsof bi-oriented edges with labels i − j . Then the maximal i − j path starting at v isde(cid:28)ned to be the path ( v , . . . , v l ) and is denoted by P i − jv .At a step k ≥ , let v ( k ) be the hosen vertex, i.e., the rightmost eligible vertexon C k . First, observe that there exists an a tive vertex on the right of v ( k ) . Indeed,the rightmost vertex a is a tive as soon as k ≥ . In addition a is non eligibleon C k be ause it is blo ked, so that a is di(cid:27)erent from v ( k ) . Hen e, a is an a tivevertex on the right of v ( k ) .We de(cid:28)ne the next a tive vertex on the right of v ( k ) as the unique vertex v onthe right of v ( k ) on C k su h that all verti es of ] v ( k ) , v [ are passive.Lemma 10.2. At a step k ≥ , let v ( k ) be the hosen vertex. Let v be the nexta tive vertex on the right of v ( k ) . Let v prec be the left neighbour of v on C k . Then,in the orientation X (cid:28)nally omputed, ea h edge of [ v ( k ) , v prec ] is bi-oriented, withlabel 2 on its left side and label 1 on its right side. The edge e = ( v prec , v ) is eithersimply oriented with label 2 from v prec to v or bi-oriented, with label 2 on v prec 'sside and label 3 on v 's side. In other words, P − v ( k ) = [ v ( k ) , v prec ] and the outgoingedge of v prec with label 2 is ( v prec , v ) . ACM Journal Name, Vol. V, No. N, Month 20YY.2 · Éri Fusy et al.
P P v ′ fB v ( k ) G k vv − fv − v ′ v v ( k ) f G k = G k Fig. 24. The path between v and v − will onsist of bi-oriented edges bilabelled 3-2.Proof. To prove this lemma, using the result of Lemma 10.1, we just have toprove that ( v prec , v ) is neither bi-oriented with label 1 on v prec 's side and label 3 on v 's side, nor simply oriented with label 3 from v to v prec , see Figure 22.First, as the a tive vertex v is on the right of v ( k ) , it an not be eligible, so that v is blo ked. As a onsequen e there exists a vertex v ′ and a fa e f su h that ( v, v ′ , f ) is a separator. Lemma 9.1 ensures that there exists an eligible vertex in ] v ′ , v [ . Hen e the vertex v ′ is on the left of v ( k ) on C k , otherwise v ( k ) would not bethe rightmost eligible vertex. Let P be the path on the boundary of f going from v to v ′ with f on its left. Two ases an arise:(1) the (cid:28)rst edge of P is di(cid:27)erent from ( v, v prec ) , so that v prec is above P , seeFigure 23(a). Clearly, v remains blo ked as long as all verti es above P have notbeen treated. Hen e, v prec will be treated at an earlier step that v . As v is a tive,it implies (see Figure 20) that ( v prec , v ) is simply oriented with label 2 from v prec to v .(2) the (cid:28)rst edge of P is ( v, v prec ) , see Figure 23(b). Observe that v prec an notbe equal to v ′ . Indeed v is on the right of v ( k ) , so that v prec is on the right orequal to v ( k ) , whereas v ′ is on the left of v ( k ) . Hen e, P has length greater than 1.As a onsequen e, when f will ease to be separating, v prec will only be in identto f . Figure 20 ensures that, when su h a vertex is treated, the edge onne tingthis vertex to its right neighbour is always bi-oriented and bi-labelled 2-3, whi h on ludes the proof.Lemma 10.3. At a step k ≥ , let v ( k ) be the rightmost eligible vertex and v thenext a tive vertex on the right of v ( k ) . Let v − be the extremity of P − v in X and e the outgoing edge of v − with label 3. If e is bi-oriented, it is bi-labelled 3-1 andwe de(cid:28)ne v = v − . Otherwise e is simply oriented, we de(cid:28)ne v as the extremityof e .Then v belongs to C k and is on the left of v ( k ) .Proof. First, observe that ea h vertex v ′′ su h that the pair { v ′′ , v } is separatingis on the left of v ( k ) , otherwise, Lemma 9.1 ensures that there exists an eligiblevertex in ] v ′′ , v [ , in ontradi tion with the fa t that v ( k ) is the rightmost eligiblevertex.Observe also that the set S of separators ( v ′′ , v, f ) involving v and endowed withthe in lusion-relation for the separated areas is not only a partial order but a totalorder. In parti ular, for two separators ( v ′′ , v, f ) and ( v ′′ , v, f ) , if v ′′ is on the leftof v ′′ , then the separated area of ( v ′′ , v, f ) is stri tly in luded in the separated areaof ( v ′′ , v, f ) . In addition, S is non empty be ause v is the next a tive vertex onthe right of v ( k ) , hen e v is blo ked.ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ··
P P v ′ fB v ( k ) G k vv − fv − v ′ v v ( k ) f G k = G k Fig. 24. The path between v and v − will onsist of bi-oriented edges bilabelled 3-2.Proof. To prove this lemma, using the result of Lemma 10.1, we just have toprove that ( v prec , v ) is neither bi-oriented with label 1 on v prec 's side and label 3 on v 's side, nor simply oriented with label 3 from v to v prec , see Figure 22.First, as the a tive vertex v is on the right of v ( k ) , it an not be eligible, so that v is blo ked. As a onsequen e there exists a vertex v ′ and a fa e f su h that ( v, v ′ , f ) is a separator. Lemma 9.1 ensures that there exists an eligible vertex in ] v ′ , v [ . Hen e the vertex v ′ is on the left of v ( k ) on C k , otherwise v ( k ) would not bethe rightmost eligible vertex. Let P be the path on the boundary of f going from v to v ′ with f on its left. Two ases an arise:(1) the (cid:28)rst edge of P is di(cid:27)erent from ( v, v prec ) , so that v prec is above P , seeFigure 23(a). Clearly, v remains blo ked as long as all verti es above P have notbeen treated. Hen e, v prec will be treated at an earlier step that v . As v is a tive,it implies (see Figure 20) that ( v prec , v ) is simply oriented with label 2 from v prec to v .(2) the (cid:28)rst edge of P is ( v, v prec ) , see Figure 23(b). Observe that v prec an notbe equal to v ′ . Indeed v is on the right of v ( k ) , so that v prec is on the right orequal to v ( k ) , whereas v ′ is on the left of v ( k ) . Hen e, P has length greater than 1.As a onsequen e, when f will ease to be separating, v prec will only be in identto f . Figure 20 ensures that, when su h a vertex is treated, the edge onne tingthis vertex to its right neighbour is always bi-oriented and bi-labelled 2-3, whi h on ludes the proof.Lemma 10.3. At a step k ≥ , let v ( k ) be the rightmost eligible vertex and v thenext a tive vertex on the right of v ( k ) . Let v − be the extremity of P − v in X and e the outgoing edge of v − with label 3. If e is bi-oriented, it is bi-labelled 3-1 andwe de(cid:28)ne v = v − . Otherwise e is simply oriented, we de(cid:28)ne v as the extremityof e .Then v belongs to C k and is on the left of v ( k ) .Proof. First, observe that ea h vertex v ′′ su h that the pair { v ′′ , v } is separatingis on the left of v ( k ) , otherwise, Lemma 9.1 ensures that there exists an eligiblevertex in ] v ′′ , v [ , in ontradi tion with the fa t that v ( k ) is the rightmost eligiblevertex.Observe also that the set S of separators ( v ′′ , v, f ) involving v and endowed withthe in lusion-relation for the separated areas is not only a partial order but a totalorder. In parti ular, for two separators ( v ′′ , v, f ) and ( v ′′ , v, f ) , if v ′′ is on the leftof v ′′ , then the separated area of ( v ′′ , v, f ) is stri tly in luded in the separated areaof ( v ′′ , v, f ) . In addition, S is non empty be ause v is the next a tive vertex onthe right of v ( k ) , hen e v is blo ked.ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· ( v ′ , v, f ) be the maximal separator for the totally ordered set S . Then theseparated area of ( v ′ , v, f ) ontains all separating fa es in ident to v ex ept f . Let P be the path of edges on the boundary of f going from v to v ′ with the interior of f on its left, and let B be the separated area of ( v ′ , v, f ) . Let f G k be the submapof G obtained by removing B from G k , and let f C k be the boundary of f G k .We laim that f is not separating in f G k . Otherwise, there would exist a vertex v on the right of v su h that ( v, v , f ) is a separator or there would exist a vertex v on the left of v ′ su h that ( v , v ′ , f ) is a separator: the (cid:28)rst ase is in ontradi tionwith the fa t that all separators { v, v } involving v are su h that v is on the right of v . The se ond ase is in ontradi tion with the fa t that ( v ′ , v, f ) is the maximalseparator involving v .We laim that only verti es of B will be removed from step k on, until all verti esof B are removed. Indeed, all separating fa es in ident to verti es on the right of v are fa es of f G k , hen e they will remain separating as long as not all verti es of B are removed. As all verti es on the right of v are either blo ked or passive, itis easy to see indu tively that all these verti es will keep the same status until allverti es of B are removed.Let k be the (cid:28)rst step where all verti es of B have been removed. Then G k = f G k . Hen e f is not separating anymore on C k , but all other fa es of f G k that areseparating at step k are still separating at step k . We have seen that the separatingfa es in ident to v at step k are the fa e f and fa es in B . In addition, all fa es of G k , ex ept f , have kept their separating-status between step k and step k . Hen e v is eligible on C k , and the rightmost eligible vertex v ( k ) at step k is a vertexin ident to f . It is either v or a vertex of f on the right of v (on C k ) su h that [ v, v ( k ) ] only onsists of edges in ident to f (otherwise f would be separating), seeFigure 24, where v ( k ) is the right neighbour of v .Moreover, the left- onne tion vertex of v ( k ) is v ′ . Otherwise there would be avertex of f on f C k and on the left of v ′ . This vertex would also be on C k (be auseonly verti es of B are removed to obtain f G k from G k ), in ontradi tion with thefa t that ( v ′ , v, f ) is the maximal separator of C k involving v .Then two ases an arise whether v ′ is passive or a tive on C k :(1) v ′ is passive on C k . Then v ′ is not in ident to any edge of G \ G k . Inparti ular v ′ is not in ident to any edge of B \ G k . Hen e the right neighbour of v ′ on C k and on C k are the same vertex, that is, the vertex v pre eding v ′ on P .Observe that v is on the left of v ( k ) on C k , indeed, v an not be equal to v ( k ) atstep k be ause v is in ident to f , whi h is separating at this step. By de(cid:28)nition of v and by onstru tion of the orientation (see Figure 20), P − v ( k is equal to [ v , v ( k ) ] taken from right to left, and ( v , v ′ ) is bi-oriented bi-labelled − from v to v ′ .As v ∈ [ v , v ( k ) ] at step k , [ v, v ( k ) ] ⊆ [ v , v ( k ) ] , so that P − v is equal to [ v, v ( k ) ] taken from right to left. As ( v , v ′ ) is bi-oriented bi-labelled − from v to v ′ ,this on ludes the proof for the (cid:28)rst ase (i.e., v = v − ).(2) v ′ is a tive on C k . In this ase, upon taking v to be the vertex v ′ , a similarargument as for the previous paragraph applies: indeed v is a vertex on C k on theleft of v ( k ) , and P − v is the path on C k going from v to the right neighbour of v on C k , and the edge onne ting the right neighbour of v to v is simply orientedwith label 3 toward v (see Figure 20). ACM Journal Name, Vol. V, No. N, Month 20YY.4 · Éri Fusy et al. e ′ next v ′ = v ( k ) e ′ v e f
12 33 v (a) fv = v ( k ) v ′ v (b)Fig. 25. Con(cid:28)guration of a fa e f of G ′ whose boundary is a lo kwise ir uit and su h that theoutgoing edge of the unique primal vertex of f has label 1 (Fig. a) and label 3 (Fig. b).Lemma 10.4. The verti es a , a and a an not belong to any lo kwise ir uit.Proof. Let us onsider a (the ases of a and a an be dealt with identi ally).The outgoing edge of a with label 1 is dire ted toward the outer fa e. The outgoingedges of a with labels 2 and 3 onne t respe tively a to two edge-verti es whoseunique outgoing edge is dire ted toward the outer fa e. Hen e ea h dire ted pathstarting at a (cid:28)nishes immediately in the outer fa e.10.2.2 Possible on(cid:28)gurations for a minimal lo kwise ir uit of X Lemma 10.5. Let f be an inner fa e of G ′ . Then the boundary of f is not a lo kwise ir uit in X .Proof. Assume that the ontour of f is a lo kwise ir uit. We re all that the ontour of f has two edge-verti es, one dual vertex, and one primal vertex v . Let i be the label of the edge e ′ of f going out of v . The edge e ′ is the (cid:28)rst half-edgeof an edge e of G . We denote by v e the edge-vertex of G ′ asso iated to e and by v ′ the vertex of G su h that e = ( v, v ′ ) . As the ontour of f is a lo kwise ir uit, theunique outgoing edge of v e follows the edge ( v e , v ) in w order around v e . Hen e,a ording to Figure 19( ), the edge e is bi-oriented and the se ond half-edge of e has label i + 1 . We denote by e next the edge of G following e in lo kwise orderaround v . The edge e ′ next of G ′ following e ′ in lo kwise order around v is the edgeof f dire ted toward v . Hen e, the rules of labelling (Figure 19(a)) ensure that e ′ next has label i − . As e ′ next is the se ond half-edge of e next , this ensures that e next issimply oriented with label i − toward v .We now deal separately with the three possible ases i = 1 , , :(cid:22) Case i = 1 : The edge e is bi-labelled 1-2 from v to v ′ and e next is simplyoriented with label 3 toward v , see Figure 25(a). Let k be the step of the algorithmduring whi h the vertex v ′ is treated. Figure 20 ensures that, if v ′ is not equalto the rightmost eligible vertex v ( k ) , then the outgoing edge with label 2 of v ′ isbi-oriented with label 3 on the other half-edge, whi h is not the ase here. Hen e v ′ = v ( k ) .In addition, as ( v ′ , v ) is bi-labelled 2-1 from v ′ to v , the vertex v is passive on C k .Hen e, writing e v → for the edge of C k whose left extremity is v , there is no edge of G \ G k between e and e v → in lo kwise order around v , so that e v → = e next .We laim that k ≥ . Otherwise v ′ would be equal to a . As e = ( v, v ′ ) is bi-labelled1-2 from v to v ′ , v would be equal to a . But a ording to Lemma 10.4, a an notbelong to any lo kwise ir uit.ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ··
12 33 v (a) fv = v ( k ) v ′ v (b)Fig. 25. Con(cid:28)guration of a fa e f of G ′ whose boundary is a lo kwise ir uit and su h that theoutgoing edge of the unique primal vertex of f has label 1 (Fig. a) and label 3 (Fig. b).Lemma 10.4. The verti es a , a and a an not belong to any lo kwise ir uit.Proof. Let us onsider a (the ases of a and a an be dealt with identi ally).The outgoing edge of a with label 1 is dire ted toward the outer fa e. The outgoingedges of a with labels 2 and 3 onne t respe tively a to two edge-verti es whoseunique outgoing edge is dire ted toward the outer fa e. Hen e ea h dire ted pathstarting at a (cid:28)nishes immediately in the outer fa e.10.2.2 Possible on(cid:28)gurations for a minimal lo kwise ir uit of X Lemma 10.5. Let f be an inner fa e of G ′ . Then the boundary of f is not a lo kwise ir uit in X .Proof. Assume that the ontour of f is a lo kwise ir uit. We re all that the ontour of f has two edge-verti es, one dual vertex, and one primal vertex v . Let i be the label of the edge e ′ of f going out of v . The edge e ′ is the (cid:28)rst half-edgeof an edge e of G . We denote by v e the edge-vertex of G ′ asso iated to e and by v ′ the vertex of G su h that e = ( v, v ′ ) . As the ontour of f is a lo kwise ir uit, theunique outgoing edge of v e follows the edge ( v e , v ) in w order around v e . Hen e,a ording to Figure 19( ), the edge e is bi-oriented and the se ond half-edge of e has label i + 1 . We denote by e next the edge of G following e in lo kwise orderaround v . The edge e ′ next of G ′ following e ′ in lo kwise order around v is the edgeof f dire ted toward v . Hen e, the rules of labelling (Figure 19(a)) ensure that e ′ next has label i − . As e ′ next is the se ond half-edge of e next , this ensures that e next issimply oriented with label i − toward v .We now deal separately with the three possible ases i = 1 , , :(cid:22) Case i = 1 : The edge e is bi-labelled 1-2 from v to v ′ and e next is simplyoriented with label 3 toward v , see Figure 25(a). Let k be the step of the algorithmduring whi h the vertex v ′ is treated. Figure 20 ensures that, if v ′ is not equalto the rightmost eligible vertex v ( k ) , then the outgoing edge with label 2 of v ′ isbi-oriented with label 3 on the other half-edge, whi h is not the ase here. Hen e v ′ = v ( k ) .In addition, as ( v ′ , v ) is bi-labelled 2-1 from v ′ to v , the vertex v is passive on C k .Hen e, writing e v → for the edge of C k whose left extremity is v , there is no edge of G \ G k between e and e v → in lo kwise order around v , so that e v → = e next .We laim that k ≥ . Otherwise v ′ would be equal to a . As e = ( v, v ′ ) is bi-labelled1-2 from v to v ′ , v would be equal to a . But a ording to Lemma 10.4, a an notbelong to any lo kwise ir uit.ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· n (3) e = 3 n (4) e = 0 (b) n (3) e = 2 n (4) e = 2 ( ) n (3) e = 1 n (4) e = 4 (d) n (3) e = 0 n (4) e = 6 Fig. 26. The possible on(cid:28)gurations for a minimal lo kwise ir uit of X .Hen e k ≥ and we an use Lemma 10.2. In parti ular, this lemma ensures that e v → is the outgoing edge of v with label 2. We obtain here a ontradi tion withthe fa t that e next is going toward v with label 3 and e v → = e next .(cid:22) Case i = 2 : The edge e is bi-labelled 2-3 from v to v ′ and e next is simplyoriented with label 1 toward v . Let k be the step during whi h v is treated. By onstru tion of the orientation (see Figure 20), at step k the vertex v belongsto ]left( v ( k ) ) , v ( k ) [ and e next is the outgoing edge of v with label 3. This is in ontradi tion with the fa t that e next is simply oriented toward v with label 1.(cid:22) Case i = 3 : The edge e is bi-labelled 3-1 from v to v ′ and e next is simplyoriented with label 2 toward v , see Figure 25(b). Let v be the origin of e next and let k be the step during whi h v is removed from G k . As e next is simply oriented withlabel 2 from v to v , we have v = v ( k ) and v = right( v ( k ) ) . Lemma 10.2 ensures that v is the next a tive vertex on the right of v ( k ) on C k . In addition, k ≥ , otherwise v ( k ) = a , in ontradi tion with the fa t that the outgoing edge of a with label2 is bi-oriented. Hen e, we an use Lemma 10.3: here, the next a tive vertex onthe right of v ( k ) is v and the path P − v is empty be ause the outgoing edge withlabel 3 of v is bi-labelled 3-1. Hen e the vertex denoted by v in the statement ofLemma 10.3 is here v . Lemma 10.3 ensures that v is a vertex of C k on the left of v ( k ) , in ontradi tion with the fa t that v is the right neighbour of v ( k ) on C k .Lemma 10.6 [Felsner 2004℄. The possible on(cid:28)gurations of an essential ir- uit of X are illustrated in Figure 26, where n (3) e (resp. n (4) e ) denotes the numbersof edge-verti es on the ir uit that have respe tively 3 (resp. 4) in ident edges onor inside the ir uit.Proof. Felsner [2004, Lem.17℄ shows that an essential ir uit C of an α -orientationhas no edge in its interior whose origin is on C . In addition, if C is not the bound-ary of a fa e, he shows that all edge-verti es have either one in ident edge or twoin ident edges inside C , whi h implies that the length of C is 6, 8, 10, or 12. Theonly possible on(cid:28)gurations are those listed in Figure 26. As X has no lo kwise ir uit of length 4 a ording to Lemma 10.5, this on ludes the proof.10.2.3 No on(cid:28)guration of Figure 26 an be a lo kwise ir uit in X . We haverestri ted the number of possible on(cid:28)gurations for a lo kwise ir uit of X toACM Journal Name, Vol. V, No. N, Month 20YY.6 · Éri Fusy et al.the list represented in Figure 26. In this se tion, we des ribe a method ensuringthat the presen e of a lo kwise ir uit for ea h on(cid:28)guration of Figure 26 yields a ontradi tion. The method relies on Lemma 10.2, Lemma 10.3, and on the followinglemma:Lemma 10.7. At a step k , let v and v ′ be two verti es on C k su h that v is on theleft of v ′ . Assume that there exists a path P = ( v , . . . , v l ) of edges of G su h that v = v , v l = v ′ , and for ea h ≤ i ≤ l − , the edge ( v i , v i +1 ) is the outgoing edgeof v i with label 1 in X . Then P = [ v, v ′ ] on C k and all edges of P are bi-orientedbilabelled 1-3.Proof. Proving that P = [ v, v ′ ] omes down to proving that all edges of P areon C k . By onstru tion of the orientation (see Figure 20), for ea h vertex w of G ,the extremity w ∈ G of the outgoing edge of w with label 1 is removed at an earlierstep than w . Moreover, a vertex in G \ G k is removed at a step j < k . Hen e, if w is in G \ G k , then w is also in G \ G k . Hen e, if P passes by a vertex outside of G k ,it an not rea h C k again. By de(cid:28)nition of an a tive vertex of C k , the extremityof its outgoing edge with label 1 is a vertex of G \ G k . Hen e none of the verti es v , . . . v l − an be a tive, otherwise P would pass by a vertex outside of G k and ould not rea h C k again.Hen e, all verti es of C k en ountered by P before rea hing v ′ are passive. It justremains to prove that the outgoing edge with label 1 of ea h passive vertex of C k isan edge of C k and will be bi-oriented and bilabelled 1-3 in X .Let w be a passive vertex of C k and let w l and w r be respe tively the left and theright neighbour of w on C k . We laim that the outgoing edge of w with label 1 isthe edge ( w, w l ) if w l will be removed before w r and is the edge ( w, w r ) if w r willbe removed before w l . Indeed, as long as none of w l or w r is removed, w remainspassive and keeps w l and w r as left and right neighbour. Let k be the (cid:28)rst stepwhere w l or w r is removed. By onstru tion of the orientation, two verti es v and v on the boundary of C k su h that ] v , v [ ontains a passive vertex an not beremoved at the same step. Hen e, at step k , either w l or w r is removed. Assumethat the removed vertex at step k is w l . Then, at step k , ( w, w l ) is given a bi-orientation and re eives label 1 on w 's side and label 2 on w l 's side, see Figure 20.Similarly, if the removed vertex is w r then, at step k , ( w, w r ) is bi-orientated andre eives label 1 on w 's side and label 3 on w r 's side.Finally, it is easy to see that only this se ond ase an happen in the path P ,be ause the starting vertex of P is on the left of the end vertex of P on C k .Lemma 10.8. None of the on(cid:28)gurations of Figure 26 an be the boundary of a lo kwise ir uit in X .Proof. We take here the example of the third on(cid:28)guration of the ase { n (3) e =2 , n (4) e = 2 } of Figure 26 and show why this on(cid:28)guration an not be a lo kwise ir uit in X . Let C be a lo kwise ir uit orresponding to su h a on(cid:28)guration.Then C ontains two su essive dual edges e ∗ and e ∗ (cid:22)in ounter- lo kwise orderaround C (cid:22) and a unique primal vertex whi h we denote by v C . Let M ′ be thesubmap of G ′ obtained by removing all edges and verti es outside of C . Let M bethe submap of G obtained by keeping only the edges whose asso iated edge-vertexbelongs to M ′ and by keeping the verti es in ident to these edges. As C is anACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ··
12 33 v (a) fv = v ( k ) v ′ v (b)Fig. 25. Con(cid:28)guration of a fa e f of G ′ whose boundary is a lo kwise ir uit and su h that theoutgoing edge of the unique primal vertex of f has label 1 (Fig. a) and label 3 (Fig. b).Lemma 10.4. The verti es a , a and a an not belong to any lo kwise ir uit.Proof. Let us onsider a (the ases of a and a an be dealt with identi ally).The outgoing edge of a with label 1 is dire ted toward the outer fa e. The outgoingedges of a with labels 2 and 3 onne t respe tively a to two edge-verti es whoseunique outgoing edge is dire ted toward the outer fa e. Hen e ea h dire ted pathstarting at a (cid:28)nishes immediately in the outer fa e.10.2.2 Possible on(cid:28)gurations for a minimal lo kwise ir uit of X Lemma 10.5. Let f be an inner fa e of G ′ . Then the boundary of f is not a lo kwise ir uit in X .Proof. Assume that the ontour of f is a lo kwise ir uit. We re all that the ontour of f has two edge-verti es, one dual vertex, and one primal vertex v . Let i be the label of the edge e ′ of f going out of v . The edge e ′ is the (cid:28)rst half-edgeof an edge e of G . We denote by v e the edge-vertex of G ′ asso iated to e and by v ′ the vertex of G su h that e = ( v, v ′ ) . As the ontour of f is a lo kwise ir uit, theunique outgoing edge of v e follows the edge ( v e , v ) in w order around v e . Hen e,a ording to Figure 19( ), the edge e is bi-oriented and the se ond half-edge of e has label i + 1 . We denote by e next the edge of G following e in lo kwise orderaround v . The edge e ′ next of G ′ following e ′ in lo kwise order around v is the edgeof f dire ted toward v . Hen e, the rules of labelling (Figure 19(a)) ensure that e ′ next has label i − . As e ′ next is the se ond half-edge of e next , this ensures that e next issimply oriented with label i − toward v .We now deal separately with the three possible ases i = 1 , , :(cid:22) Case i = 1 : The edge e is bi-labelled 1-2 from v to v ′ and e next is simplyoriented with label 3 toward v , see Figure 25(a). Let k be the step of the algorithmduring whi h the vertex v ′ is treated. Figure 20 ensures that, if v ′ is not equalto the rightmost eligible vertex v ( k ) , then the outgoing edge with label 2 of v ′ isbi-oriented with label 3 on the other half-edge, whi h is not the ase here. Hen e v ′ = v ( k ) .In addition, as ( v ′ , v ) is bi-labelled 2-1 from v ′ to v , the vertex v is passive on C k .Hen e, writing e v → for the edge of C k whose left extremity is v , there is no edge of G \ G k between e and e v → in lo kwise order around v , so that e v → = e next .We laim that k ≥ . Otherwise v ′ would be equal to a . As e = ( v, v ′ ) is bi-labelled1-2 from v to v ′ , v would be equal to a . But a ording to Lemma 10.4, a an notbelong to any lo kwise ir uit.ACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· n (3) e = 3 n (4) e = 0 (b) n (3) e = 2 n (4) e = 2 ( ) n (3) e = 1 n (4) e = 4 (d) n (3) e = 0 n (4) e = 6 Fig. 26. The possible on(cid:28)gurations for a minimal lo kwise ir uit of X .Hen e k ≥ and we an use Lemma 10.2. In parti ular, this lemma ensures that e v → is the outgoing edge of v with label 2. We obtain here a ontradi tion withthe fa t that e next is going toward v with label 3 and e v → = e next .(cid:22) Case i = 2 : The edge e is bi-labelled 2-3 from v to v ′ and e next is simplyoriented with label 1 toward v . Let k be the step during whi h v is treated. By onstru tion of the orientation (see Figure 20), at step k the vertex v belongsto ]left( v ( k ) ) , v ( k ) [ and e next is the outgoing edge of v with label 3. This is in ontradi tion with the fa t that e next is simply oriented toward v with label 1.(cid:22) Case i = 3 : The edge e is bi-labelled 3-1 from v to v ′ and e next is simplyoriented with label 2 toward v , see Figure 25(b). Let v be the origin of e next and let k be the step during whi h v is removed from G k . As e next is simply oriented withlabel 2 from v to v , we have v = v ( k ) and v = right( v ( k ) ) . Lemma 10.2 ensures that v is the next a tive vertex on the right of v ( k ) on C k . In addition, k ≥ , otherwise v ( k ) = a , in ontradi tion with the fa t that the outgoing edge of a with label2 is bi-oriented. Hen e, we an use Lemma 10.3: here, the next a tive vertex onthe right of v ( k ) is v and the path P − v is empty be ause the outgoing edge withlabel 3 of v is bi-labelled 3-1. Hen e the vertex denoted by v in the statement ofLemma 10.3 is here v . Lemma 10.3 ensures that v is a vertex of C k on the left of v ( k ) , in ontradi tion with the fa t that v is the right neighbour of v ( k ) on C k .Lemma 10.6 [Felsner 2004℄. The possible on(cid:28)gurations of an essential ir- uit of X are illustrated in Figure 26, where n (3) e (resp. n (4) e ) denotes the numbersof edge-verti es on the ir uit that have respe tively 3 (resp. 4) in ident edges onor inside the ir uit.Proof. Felsner [2004, Lem.17℄ shows that an essential ir uit C of an α -orientationhas no edge in its interior whose origin is on C . In addition, if C is not the bound-ary of a fa e, he shows that all edge-verti es have either one in ident edge or twoin ident edges inside C , whi h implies that the length of C is 6, 8, 10, or 12. Theonly possible on(cid:28)gurations are those listed in Figure 26. As X has no lo kwise ir uit of length 4 a ording to Lemma 10.5, this on ludes the proof.10.2.3 No on(cid:28)guration of Figure 26 an be a lo kwise ir uit in X . We haverestri ted the number of possible on(cid:28)gurations for a lo kwise ir uit of X toACM Journal Name, Vol. V, No. N, Month 20YY.6 · Éri Fusy et al.the list represented in Figure 26. In this se tion, we des ribe a method ensuringthat the presen e of a lo kwise ir uit for ea h on(cid:28)guration of Figure 26 yields a ontradi tion. The method relies on Lemma 10.2, Lemma 10.3, and on the followinglemma:Lemma 10.7. At a step k , let v and v ′ be two verti es on C k su h that v is on theleft of v ′ . Assume that there exists a path P = ( v , . . . , v l ) of edges of G su h that v = v , v l = v ′ , and for ea h ≤ i ≤ l − , the edge ( v i , v i +1 ) is the outgoing edgeof v i with label 1 in X . Then P = [ v, v ′ ] on C k and all edges of P are bi-orientedbilabelled 1-3.Proof. Proving that P = [ v, v ′ ] omes down to proving that all edges of P areon C k . By onstru tion of the orientation (see Figure 20), for ea h vertex w of G ,the extremity w ∈ G of the outgoing edge of w with label 1 is removed at an earlierstep than w . Moreover, a vertex in G \ G k is removed at a step j < k . Hen e, if w is in G \ G k , then w is also in G \ G k . Hen e, if P passes by a vertex outside of G k ,it an not rea h C k again. By de(cid:28)nition of an a tive vertex of C k , the extremityof its outgoing edge with label 1 is a vertex of G \ G k . Hen e none of the verti es v , . . . v l − an be a tive, otherwise P would pass by a vertex outside of G k and ould not rea h C k again.Hen e, all verti es of C k en ountered by P before rea hing v ′ are passive. It justremains to prove that the outgoing edge with label 1 of ea h passive vertex of C k isan edge of C k and will be bi-oriented and bilabelled 1-3 in X .Let w be a passive vertex of C k and let w l and w r be respe tively the left and theright neighbour of w on C k . We laim that the outgoing edge of w with label 1 isthe edge ( w, w l ) if w l will be removed before w r and is the edge ( w, w r ) if w r willbe removed before w l . Indeed, as long as none of w l or w r is removed, w remainspassive and keeps w l and w r as left and right neighbour. Let k be the (cid:28)rst stepwhere w l or w r is removed. By onstru tion of the orientation, two verti es v and v on the boundary of C k su h that ] v , v [ ontains a passive vertex an not beremoved at the same step. Hen e, at step k , either w l or w r is removed. Assumethat the removed vertex at step k is w l . Then, at step k , ( w, w l ) is given a bi-orientation and re eives label 1 on w 's side and label 2 on w l 's side, see Figure 20.Similarly, if the removed vertex is w r then, at step k , ( w, w r ) is bi-orientated andre eives label 1 on w 's side and label 3 on w r 's side.Finally, it is easy to see that only this se ond ase an happen in the path P ,be ause the starting vertex of P is on the left of the end vertex of P on C k .Lemma 10.8. None of the on(cid:28)gurations of Figure 26 an be the boundary of a lo kwise ir uit in X .Proof. We take here the example of the third on(cid:28)guration of the ase { n (3) e =2 , n (4) e = 2 } of Figure 26 and show why this on(cid:28)guration an not be a lo kwise ir uit in X . Let C be a lo kwise ir uit orresponding to su h a on(cid:28)guration.Then C ontains two su essive dual edges e ∗ and e ∗ (cid:22)in ounter- lo kwise orderaround C (cid:22) and a unique primal vertex whi h we denote by v C . Let M ′ be thesubmap of G ′ obtained by removing all edges and verti es outside of C . Let M bethe submap of G obtained by keeping only the edges whose asso iated edge-vertexbelongs to M ′ and by keeping the verti es in ident to these edges. As C is anACM Journal Name, Vol. V, No. N, Month 20YY.isse tions and trees ·· b v b v ˆ v b v ′ e ∗ e ∗ (a) b v b v ˆ v e ∗ e ∗ (b) 1 b v ˆ v b v e ∗ e ∗ ( )Fig. 27. The 3 possible ases for the boundary of the map M asso iated to the third on(cid:28)gurationof the ase { n (3) e = 2 , n (4) e = 2 } in Figure 26.essential ir uit, no edge inside C has its origin on C , see [Felsner 2004, Lem.17℄. Therules of labelling (see Figure 19), the fa t that all edge-verti es have outdegree 1,and the fa t that no edge goes from a vertex of C toward the interior of C determineunambiguously the labels and orientations of all the edges on the boundary of M in X , up to the label of the outgoing edge of v C on C . Figures 27(a), 27(b) and 27( )represent the respe tive on(cid:28)gurations when the label of the outgoing edge of v C on C is 1, 2 or 3.First, we deal with the ase of Figure 27(a). Let ˆ v (resp. b v ) be the primal vertexoutside of C and adja ent to the edge-vertex asso iated to e ∗ (resp. e ∗ ). Let b v ′ bethe primal vertex inside of C and adja ent to the edge-vertex asso iated to e ∗ . Let k be the step at whi h ˆ v is treated. As already explained in pre eding proofs (forexample in the proof of Lemma 10.5), it is easy to see that k ≥ and that ˆ v is the hosen vertex v ( k ) . Hen e we an use Lemma 10.2 and Lemma 10.3. Lemma 10.2and the on(cid:28)guration of Figure 27(a) ensure that b v ′ is the right neighbour of ˆ v on C k and that b v is the next a tive vertex on the right of ˆ v on C k . Moreover, the on(cid:28)guration of Figure 27(a) ensures that b v orresponds to the vertex v in thestatement of Lemma 10.3. Hen e Lemma 10.3 ensures that b v is on C k on the leftof ˆ v . We see on Figure 27(a) that there is an oriented path P going from b v to b v su h that ea h edge of the path is leaving with label 1. Lemma 10.7 ensuresthat all edges of P are bilabelled 1-3, in ontradi tion with the fa t that ( b v ′ , v ) isbilabelled 1-2.We deal with the ase of Figure 27(b) similarly. We de(cid:28)ne ˆ v := v C and denoteby b v the primal vertex outside of C and adja ent to the edge-vertex asso iated to e ∗ . We denote by b v the primal vertex inside of C and adja ent to the edge-vertexasso iated to e ∗ . Let k be the step where ˆ v is removed. Then it is easy to see that k ≥ and ˆ v = v ( k ) . Hen e we an use Lemma 10.2 and Lemma 10.3. Lemma 10.2and the on(cid:28)guration of Figure 27(b) ensure that b v is the next a tive vertex onthe right of ˆ v on C k . We see on Figure 27(b) that the vertex b v orresponds to thevertex v in the statement of Lemma 10.3. Hen e, Lemma 10.3 ensures that b v ison C k on the left of ˆ v . We see on Figure 27(b) that there exists an oriented path P going from b v to ˆ v su h that ea h edge of P leaves with label 1; but the last edgeof P is simply oriented, in ontradi tion with Lemma 10.7.The ase of Figure 27( ) an be treated similarly, as well as all on(cid:28)gurations ofACM Journal Name, Vol. V, No. N, Month 20YY.8 · Éri Fusy et al.Figure 26.Finally, Theorem 9.3 follows from Lemma 10.8 and from the fa t that all possible on(cid:28)gurations for a lo kwise ir uit of X ··