Academia.eduAcademia.edu

Enumeration of (p,q)-parking functions

2002, Discrete Mathematics

Parking functions are central in many aspects of combinatorics. We deÿne in this communication a generalization of parking functions which we call (p1; : : : ; p k)-parking functions. We give a characterization of them in terms of parking functions and we show that they can be interpreted as recurrent conÿgurations in the sandpile model for some graphs. We also establish a correspondence with a Lukasiewicz language, which enables to enumerate (p1; : : : ; p k)-parking functions as well as increasing ones. Rà esumà e Les suites de parking se sont rà evà elà eesêtre au centre de di à erents probl emes combinatoires. Nous introduisons ici des k-uplets de suites qui les gà enà eralisent, et dont nous montrons qu'ils peuventêtre interprà età es comme les conÿgurations rà ecurrentes de l'automate du tas de sable sur certains graphes. Nous à etablissons à egalement une correspondance avec un langage de Lukasiewicz, ce qui nous permet d'obtenir des rà esultats d'à enumà eration.

Discrete Mathematics 256 (2002) 609 – 623 www.elsevier.com/locate/disc Enumeration of (p; q)-parking functions Robert Coria;b , Dominique Poulalhonb; ∗ a Labri, b LIX, Universite Bordeaux 1, 33405 Talence Cedex, France  Ecole polytechnique, 91128 Palaiseau Cedex, France Received 6 October 2000; received in revised form 2 April 2001; accepted 22 July 2001 Abstract Parking functions are central in many aspects of combinatorics. We de ne in this communication a generalization of parking functions which we call (p1 ; : : : ; pk )-parking functions. We give a characterization of them in terms of parking functions and we show that they can be interpreted as recurrent con gurations in the sandpile model for some graphs. We also establish a correspondence with a Lukasiewicz language, which enables to enumerate (p1 ; : : : ; pk )-parking functions as well as increasing ones. Resume Les suites de parking se sont revelees être au centre de di e rents problemes combinatoires. Nous introduisons ici des k-uplets de suites qui les generalisent, et dont nous montrons qu’ils peuvent être interpretes comme les con gurations recurrentes de l’automate du tas de sable sur certains graphes. Nous e tablissons e galement une correspondance avec un langage de Lukasiewicz, c 2002 Elsevier Science B.V. All ce qui nous permet d’obtenir des resultats d’enumeration.  rights reserved. Keywords: Parking functions; Sandpile model 1. Introduction Since parking functions were introduced more than thirty years ago in the context of hashing algorithm analysis [11,12], they gained a preponderant place in combinatorics of labelled objects. As shown by the elegant proof due to Pollack (see [7]), they are enumerated by Cayley numbers nn−2 , that play towards labelled objects the same role as ∗ Corresponding author. E-mail addresses: [email protected] (R. Cori), [email protected] (D. Poulalhon). c 2002 Elsevier Science B.V. All rights reserved. 0012-365X/02/$ - see front matter  PII: S 0 0 1 2 - 3 6 5 X ( 0 2 ) 0 0 3 3 8 - 2 610 R. Cori, D. Poulalhon / Discrete Mathematics 256 (2002) 609 – 623   Catalan numbers (1=(n+1)) 2n n towards unlabelled ones: parking functions can actually be considered as a labelled version of Dyck paths. Many bijections are now known between parking functions and combinatorial objects such as Cayley trees, factorizations of a circular permutation as a minimal product of transpositions in Sn , maximal chains in the lattice of noncrossing partitions [6,8], or cells in the Shi hyperplane arrangement [16,17]. More recently, parking functions were found to be also useful in algebraic combinatorics [9]. Among the many de nitions of parking functions, we use the following one: a parking function of length n is a sequence u =u1 u2 : : : un of n non-negative integers such that there exists a permutation  =1 2 : : : n in Sn (strictly) larger than u (which we denote ¿u), i.e. satisfying, for any index i; i ¿ui . This permutation  will be said to be a certi cate for u. For instance, 3 0 1 3 1 is a parking function since the permutation 4 1 2 5 3 is a certi cate for it; on the other hand, 0 3 2 3 2 is not a parking function. This terminology is motivated by the following greedy parking algorithm, which helps to explain in everyday words the notion of open addressing. Consider a one-way road with n parking slots numbered 0 through n − 1; n cars arrive one at a time at the head of the road, that plan to park along this road. Each driver has a preferred parking place in mind, to which he proceeds. He parks there if it is free, but otherwise he has to drive ahead and park in the next empty slot. Example. Let n=8. Consider a situation in which the four rst cars are parked in places 0, 2, 3 and 6, and suppose that car number 5 tries to park in place 2; unfortunately, places 2 and 3 are occupied, so it has to drive ahead up to place 4. The algorithm succeeds if each driver nds a parking place, and fails otherwise. Parking functions are exactly the preference functions for which the parking algorithm succeeds. It was observed [3] that there is a very simple bijection between parking functions of length n and some assignments of values to the vertices of the complete graph Kn+1 called recurrent con gurations in the sandpile model [4] introduced in statistical physics and considered by some combinatorialists as the chip ring game [1]. Since recurrent con gurations may be de ned for any graph in which a vertex is distinguished as the sink, it seems reasonable to examine recurrent con gurations of other families of graphs. The rst one which comes in mind is that of the complete k-partite graphs, but choosing a sink breaks symmetry; hence we consider the family of complete (k + 1)partite graphs of type Kp1 ;p2 ;:::;pk ; 1 , the lonely vertex being the sink. It turns out that corresponding con gurations have many similarities with parking functions, and can actually be considered as a generalization of them. These (p1 ; : : : ; pk )-parking functions are k-tuples (u1 ; : : : ; uk ) of sequences of non-negative integers satisfying some combinatorial conditions which are detailed below. R. Cori, D. Poulalhon / Discrete Mathematics 256 (2002) 609 – 623 611 Since general case is not substantially di erent, we concentrate on the particular case k =2 for the sake of readability. We prove that the number of (p; q)-parking functions is (p + q + 1)(p + 1)q−1 (q + 1)p−1 ; and that the number of increasing ones is the Narayana number    1 n+1 n+1 p q n+1 where n =p + q. The paper is organized as follows: we rst de ne (p; q)-parking functions in an elementary way without any reference to the sandpile model and give some characterizations of them. We recall some simple facts about the physical model and indicate the scheme of a possible proof for the enumerative result. Then, we use conjugacy on certain words to obtain directly this result. Finally, we extend it to the case of increasing (p; q)-parking functions. Afterwards, we state the corresponding results in the general case of k-partite parking functions. Some perspectives for future investigations are suggested at the end of the paper. 2. De nition We rst give some notations and conventions which we adopt throughout the paper. Let p and q be two positive integers, and n=p + q; for any couple (a; b) of integers such that a6b; <a; b= denotes the set of integers between a and b: <a; b= ={x | a6x6b}: A (p; q)-sequence is a pair (u; v) of sequences of non-negative integers with respective lengths p and q such that ∀i ∈ <1; p=; ui ∈ <0; q= and ∀j ∈ <1; q=; vj ∈ <0; p=: Their set is denoted Sp; q . We de ne a partial order 4 on pairs of sequences of respective lengths p and q: for any two such pairs (u; v) and (u′ ; v′ ), (u; v) 4 (u′ ; v′ ) if for all indices i and j, ui 6ui′ and vj 6vj′ . As the set Pn of parking functions, we de ne the set Pp; q of (p; q)-parking functions as an ideal for some order (here 4), determined by its maximal elements. These can be described thanks to permutations in Sp+q . Let us associate to any permutation  =1 2 : : : n in Sn a (p; q)-sequence (x ; y ) (somewhat similar to its inversion table): for any index i6p, let xi denote the ith letter of x ; then xi is the number of letters less than i among the q last ones of , and for any index j6q, the jth letter yj of y is the number of letters less than p+j among the p rst ones of . 612 R. Cori, D. Poulalhon / Discrete Mathematics 256 (2002) 609 – 623 More formally, ∀i6p; xi = |{16j6q | p+j ¡i }| ∀j6q; yj = |{16i6p | i ¡p+j }|: and Example. Let p =5; q =4, and  = 3 6 5 2 8 4  19 7 : p q For any i65; xi is the number of elements less than i in {4; 1; 9; 7}, and symmetrically for the yj ’s. Hence (x ; y )=(1 2 2 1 3; 2 0 5 4). Remark that  is not uniquely determined by (x ; y ), since, for instance, if =2 5 6 3 8 4 1 9 7, then (x ; y ) = (x ; y ). De nition 1. A (p; q)-sequence (u; v) is a (p; q)-parking function if there exists a permutation  in Sp+q such that (u; v) 4 (x ; y ). We say that the permutation  is a certi cate for (u; v). There is a more intuitive way to introduce (p; q)-parking functions, translating the de nition into a parking quiz. Suppose that p blue cars and q red ones have to park in a one-way street with n parking slots. Each driver i of a blue car asks to have at least ui red ones parked before him and each driver j of a red car asks to have at least vj blue ones parked before him. The (p; q)-sequence (u; v) is a (p; q)-parking function if there exists a parking that satis es all the wishes of the drivers. Example. (0 0 1 2 2; 0 2 3 5) is a (5; 4)-parking function, since the following parking suits. The following remark is elaborated on in Section 6. Remark 2. Pp; q is invariant under the action of Sp × Sq on (p; q)-sequences. This means that corresponding unlabelled objects exist, whose set is isomorphic to that of increasing (p; q)-parking functions. 3. Characterization 3.1. In terms of parking functions We show in what way (p; q)-parking functions themselves can be considered as a generalization of usual parking functions. We rst give a straightforward criterion for checking whether (u; v) is a (p; q)-parking function. R. Cori, D. Poulalhon / Discrete Mathematics 256 (2002) 609 – 623 613 Let u = u1 u2 : : : up be an integer sequence. The rank function of u is the mapping u : <1; p= → N i → |{16j6p | uj ¡ui }| + |{16j¡i | uj =ui }| i.e. for any index i; u (i) is the number of indices j such that either ui ¿uj or j¡i and uj =ui . Hence, u is such that the numbers ui + u (i) are all distinct and satisfy ∀i; j6p; ui ¡uj ⇒ ui + u (i)¡uj + u (j): Let ũ be the sequence of length p whose ith element is ui + u (i). Then, on the one hand, ũ (i)= |{16j6p | ũj ¡ũi }| for any index i, and on the other hand, u =ũ . Example. If u =4 0 3 4 2, then u =3 0 2 4 1 and ũ =7 0 5 8 3. Proposition 3. A (p; q)-sequence (u; v) is a (p; q)-parking function if and only if the concatenation of the sequences ũ and ṽ is a parking function. Proof. Let w =ũ · ṽ, i.e. w1 : : : wp =ũ and wp+1 : : : wp+q =ṽ. Let  =1 2 : : : n be a permutation in Sn satisfying the following monotony condition: ∀i; j6n; wi ¡wj ⇒ i ¡j : We prove that  is a certi cate for w if and only if it is a certi cate for (u; v). Consider indeed its associated (p; q)-sequence (x ; y ), and let x =x1 : : : xp . Then, for any i ∈ <1; p=, xi = |{16j6q | p+j ¡i }|. On the other hand, u (i) = ũ (i) = |{16k 6p | wk ¡wi }|=|{16k6p | k ¡i }|. Since  is a permutation, it implies that xi + u (i) = i − 1, hence: ∀i ∈ <1; p=; xi − ui = i − 1 − wi : Symmetrically, let y =y1 : : : yq ; then for all index j ∈ <1; q=, yj − vj =p+j − 1 − wp+j . Hence, w¡ if and only if (u; v)6(x ; y ). To end the proof, just observe that any parking function or (p; q)-parking function has a monotonous certi cate, hence this condition on  is not restrictive. A corollary of this Proposition is that the set of parking functions may be considered as the diagonal of the set of bipartite parking functions: Proposition 4. A sequence u =u1 u2 : : : un is a parking function if and only if (u; u) is an (n; n)-parking function. Proof. Clearly if u is a parking function, it is certi ed by the bijection i → u (i) + 1. Hence a sequence u is a parking function if and only if, for any i ∈ <1; n=, ui 6u (i), i.e. if and only if, for any i ∈ <1; n=, ũi 62u (i). 614 R. Cori, D. Poulalhon / Discrete Mathematics 256 (2002) 609 – 623 Let w be the square of ũ for concatenation. Remark that ũ is a sequence of n distinct elements, with rank function u . So w has rank function w given by ∀i ∈ <1; n=; w (i)=2u (i) and w (n + i) = 2u (i) + 1: According to the above arguments, w is a parking function if and only if, for any i ∈ <1; n=, wn+i =wi 62u (i) which gives the result. 3.2. In terms of Lukasiewicz languages We de ne a mapping ’ from the set of (p; q)-sequences Sp; q into the free monoid over the alphabet A ={a; b} × {a; b}, and give a necessary and sucient condition on ’(u; v) for (u; v) to be a (p; q)-parking function. More precisely, let (u; v) be a (p; q)-sequence; then ’(u; v) = (’q (u); ’p (v)), where ’q (u) is a word on the alphabet {a; b} with p occurrences of a and q + 1 of b de ned in the following way: consider the increasing rearrangement ũ of u, then ’q (u) is such that the ith occurrence of the letter a in it is preceded by ũi occurrences of b; ’p (v) is de ned symmetrically. Example. ’(1 5 0 2; 4 0 3 4 2)=(abababbbab; abbababaab). Observe that the positions of the occurrences of a in ’q (u) and ’p (v) are the elements of ũ and ṽ, respectively. Both words ’q (u) and ’q (v) have length p + q + 1. Hence, we may consider ’(u; v) as a word on the alphabet A= {(a; a); (b; a); (a; b); (b; b)}. For any word w in A∗ and any letter (x; y) ∈ A, |w| and |w|(x;y) denote, respectively the length of w and the number of occurrences of (x; y) in w. We de ne |w|a = 2|w|(a; a) + |w|(a; b) + |w|(b; a) = |w| + |w|(a; a) − |w|(b; b) |w|b = 2|w|(b; b) + |w|(a; b) + |w|(b; a) = |w| + |w|(b; b) − |w|(a; a) : Then |’(u; v)|a =p + q and |’(u; v)|b = p + q + 2. We de ne a morphism  from A∗ to Z by setting: (a; a) = 1; (a; b) = (b; a)=0; (b; b) = −1: With this notation, (’(u; v)) =|’(u; v)|(a; a) − |’(u; v)|(b; b) = − 1: Proposition 5. The pair (u; v) is a (p; q)-parking function if and only if ’(u; v) satis es the following condition: (w)¿0 for any factorization ’(u; v) =ww′ such that w′ = ”; R. Cori, D. Poulalhon / Discrete Mathematics 256 (2002) 609 – 623 615 i.e. if and only if ’(u; v) belongs to the (Lukasiewicz) language L de ned by the equation L = (a; a) · L2 + (a; b) · L + (b; a) · L + (b; b); where + denotes union and · concatenation. (For generalities about Lukasiewicz languages, see [14]). Observe that, for any word w in A∗ ; (w)¿0 if and only if |w|a ¿|w|b , or equivalently |w|a ¿|w|. Proof. By Proposition 3, (u; v) is a (p; q)-parking function if and only if ũ · ṽ is a parking function. Let i6p + q, and w be the pre x of length i of ’(u; v). There are as many occurrences of a in w as elements less than or equal to i in ũ · ṽ: |w|a = |{j | ũj 6i}| + |{j | ṽj 6i}| = |{j | (ũ · ṽ)j 6i}|: But ũ · ṽ is a parking function if and only if |{j | (ũ · ṽ)j 6i}|¿i, that is, if and only if |w|a ¿i =|w|. But this means exactly (w)¿0. 4. Sandpiles on Kp; q; 1 The sandpile model is de ned as an evolution process on the con gurations of a graph, i.e. on the mappings from the set of vertices of a graph into N. We consider here the graph Kp; q; 1 and we show that (p; q)-parking functions correspond to the recurrent con gurations of this model. This gives a proof for their enumeration. The complete tripartite graph Kp; q; 1 has three subsets of vertices of respective sizes p, q and 1, X ={x1 ; x2 ; : : : ; xp }, Y ={y1 ; y2 ; : : : ; yq }, and {z}, and its set of edges is (X × Y ) ∪ ({z} × (X ∪ Y )). Example. K5; 4; 1 . 616 R. Cori, D. Poulalhon / Discrete Mathematics 256 (2002) 609 – 623 A con guration of this graph is an assignment of non-negative integers to each vertex in X ∪ Y . Hence a con guration is a pair (u; v) of sequences of respective lengths p and q. The integer ui (resp. vj ) may be considered as a number of grains of sand lying in vertex xi (resp. yj ). A toppling of vertex xi ∈ X occurs if ui ¿q; in that case, the new con guration (u′ ; v′ ) is such that: • ui′ =ui − q − 1, • ∀k6p; k = i ⇒ uk′ =uk , • ∀j6q; vj′ =vj + 1. The missing grain of sand is supposed to have fallen in the sink z. A toppling of vertex yj ∈ Y is de ned similarly. Example. Two successive topplings on K3; 2; 1 (for convenience’s sake, the sink z has been omitted): 4 0 3 1 1 1 0 4 1 2 2 2 1 0 2 De nition 6. A con guration (u; v) is stable if no vertex can topple, i.e. if (u; v) is a (p; q)-sequence. A stable con guration (u; v) is recurrent if it can be obtained by a sequence of topplings from a con guration (u′ ; v′ ) such that, for any i6p, ui′ ¿q, and for any j6q; vj′ ¿p. Proposition 7. A con guration (u; v) is recurrent if and only if the pair (u′ ; v′ ) de ned by ∀i6p; ui′ =q − ui and ∀j6q; vj′ =p − vj is a (p; q)-parking function. Proof. We use a characterization due to Dhar [4] of recurrent con gurations. In the case of Kp; q; 1 , the criterion claims that (u; v) is recurrent if and only if the addition of 1 to each ui and each vj leads to a sequence of topplings in which each vertex topples exactly once. It is easy to verify that the order in which the vertices topple gives a permutation which is a certi cate for (u′ ; v′ ) and vice versa. Majumdar and Dhar [15] have also shown that recurrent con gurations on a graph are in one-to-one correspondence with its spanning trees. This supplies a proof of the enumeration formula announced in Section 1, either by using known results on the number of spanning trees of multipartite graphs or by reproving them by arguments R. Cori, D. Poulalhon / Discrete Mathematics 256 (2002) 609 – 623 617 along the lines of Joyal’s method [10,13] for Cayley’s formula. We do not detail this proof since we give another one in the next Section, that has the advantage of providing also a proof for the enumeration of increasing (p; q)-parking functions. 5. Enumeration by conjugacy In order to enumerate (p; q)-parking functions, we establish a relationship between conjugacy on words and conjugacy on integer sequences, then we use a generalization due to Chottin of the so-called cyclic lemma [2]. Recall that two words w and w′ are conjugates if w =w1 w2 and w′ = w2 w1 . Let ” denote the empty word, then any word w has |w| factorizations w =w1 w2 such that w1 = ”, which we call proper factorizations in the sequel. Hence it has at most |w| conjugates (one of which is equal to w, for w2 =”). The number of di erent conjugates of w divides |w| and each conjugate is due to the same number of distinct factorizations (see [14], p. 8). We de ne a related notion of conjugacy for integer sequences: De nition 8. Let u =u1 u2 : : : up be an integer sequence such that for any i; 06ui 6q, and let k belong to <0; q=. The kth q-conjugate of u is the sequence sqk (u) dened by ∀i ∈ <1; p=; sqk (u)i =ui + k mod q + 1: We denote by s̃qk (u) the increasing rearrangement of sqk (u). Observe that the q + 1 q-conjugates of a sequence are all di erent, but this is not the case for the sequences s̃qk (u). However, each increasing q-conjugate corresponds to the same number of q-conjugates of u. Proposition 9. The mapping ’q induces a bijection between q-conjugates of u and proper factorizations w1 w2 of ’q (u) such that w1 ends with a letter b (and realizes a bijection between increasing q-conjugates of u and conjugates of ’q (u) ending with a letter b). Proof. Let w =’q (u), then for any k in <0; q=, there is a unique factorization w =w1 w2 such that w1 ends with a b and |w2 |b =k. Clearly ’q (sqk (u)) =w2 w1 : De nition 10. Let (u; v) be a (p; q)-sequence; we de ne its conjugates as the pairs (sqi (u); spj (v)), for all i and j in <0; q= and <0; p=, respectively. The following Proposition is a special case of Theorem 4.2 of [2]. We give its proof for the sake of completeness. 618 R. Cori, D. Poulalhon / Discrete Mathematics 256 (2002) 609 – 623 Proposition 11. For any pair (w′ ; w′′ ) of words in {a; b}∗ such that |w′ |a = q, |w′′ |a =p and |w′ |= |w′′ |= p + q + 1, there exist exactly p + q + 1 ways of properly factorizing w′ and w′′ into w1′ w2′ and w1′′ w2′′ so that (w2′ w1′ ; w2′′ w1′′ ) belongs to L. Proof. There are (p + q + 1)2 pairs of proper factorizations of w′ and w′′ , which we gather in p + q + 1 classes with respect to the value of |w1′ | − |w1′′ | mod p + q + 1. Each class is constituted of one pair of the type w = (w1′ ”; w1′′ w2′′ ) and its factorizations as a word of A∗ . The cyclic lemma due to Dvoretzky and Motzkin ([5], sometimes attributed to Raney) claims that there is only one proper factorization w1 w2 of w such that w2 w1 belongs to L. Since each class corresponds to a di erent word w and since there are p + q + 1 classes, this ends the proof. Note that only (p + 1)(q + 1) among the (p + q + 1)2 ways of properly factorizing w′ and w′′ are such that both w1′ and w1′′ end with a letter b. Moreover, any of the p + q + 1 decompositions whose existence is claimed by Proposition 11 satis es this condition. Theorem 12. Exactly (p + q + 1) among the (p + 1)(q + 1) conjugates of any (p; q)sequence (u; v) are (p; q)-parking functions. Proof. Each conjugate of (u; v) corresponds to a di erent way of properly factorizing ’q (u) and ’p (v) into w1′ w2′ and w1′′ w2′′ so that w1′ and w1′′ end with a b. By Proposition 11, exactly p + q + 1 of them are such that (w2′ w1′ ; w2′′ w1′′ ) belongs to L, and by Proposition 5, this is the condition for (u; v) to be a (p; q)-parking function. Corollary 13. The number of (p; q)-parking functions is (p + q + 1) (p + 1)q−1 (q + 1)p−1 : Proof. The ratio of (p; q)-parking functions among the (p+1)q (q+1)p (p; q)-sequences is (p + q + 1)=(p + 1)(q + 1) by Theorem 12. 6. Increasing (p; q)-parking functions A (p; q)-sequence (u; v) is increasing if, for all i¡p and j¡q, ui 6ui+1 and vj 6vj+1 . The set Ip; q of increasing (p; q)-parking functions clearly constitutes a system of representatives of the orbits of the action of Sp × Sq on Pp; q . In this section, we give two di erent proofs of the following result: Proposition 14. The number of increasing (p; q)-parking functions is p+q+1 (p + 1)(q + 1)  p+q p  p+q q  : R. Cori, D. Poulalhon / Discrete Mathematics 256 (2002) 609 – 623 619 Note that these numbers are usually known as Narayana’s numbers and have many interpretations. For instance, they enumerate plane trees with n + 2 vertices and p + 1 leaves, or noncrossing partitions of <1; n + 1= into p + 1 blocks. The rst proof is an adaptation of Pollack’s one for counting parking functions: Proof 1. Consider a circular parking lot with p + q + 1 slots numbered clockwise 0 to p + q. The corresponding parking algorithm is similar to the usual one, except that preference p + q is allowed and treated like any other: if slot p + q is occupied, the car moves clockwise to the rst empty slot. The mapping (u; v) → ũ · ṽ realizes a one-to-one correspondence between Ip; q and sequences w of length p + q such that: • ∀i6p + q; 06wi 6p + q, • ∀i¡p + q; i = p ⇒ wi ¡wi+1 , • the parking process leaves slot number p + q unoccupied. Clearly for any preference function satisfying the two rst conditions, one slot is left empty, and by symmetry there are exactly as many sequences with a given empty slot as with any other. Hence the number of increasing (p; q)-parking functions is    1 p+q+1 p+q+1 ; p q p+q+1 which is of course equal to the expected result. The second proof shows that this result is also a straightforward consequence of Theorem 12. Proof 2. Consider classes of Sp; q closed by conjugacy and by the action of Sp × Sq . Let C be one of these classes; C is a disjoint union of orbits under the action of Sp × Sq . All these orbits have the same cardinality, since the action of an element of Sp × Sq is the same on all conjugates of a sequence, and each one contains exactly one increasing (p; q)-sequence. Moreover, either all elements of a given orbit are 620 R. Cori, D. Poulalhon / Discrete Mathematics 256 (2002) 609 – 623 (p; q)-parking functions or none of them is. Hence, in C, the ratio of increasing (p; q)parking functions among the increasing (p; q)-sequences is equal to the ratio of (p; q)parking functions among (p; q)-sequences. Finally, since C is a disjoint union of conjugacy classes in which the ratio of (p; q)-parking functions is the same (by Theorem 12), the ratio of increasing (p; q)-parking functions among the increasing (p; q)-sequences in C, is equal to p+q+1 : (p + 1)(q + 1) Since this is true for any class C, their ratio among the total number of increasing (p; q)-sequences is the same. But the number of increasing (p; q)-sequences is    p+q p+q ; p q thus ending the proof. Remark that another generalization of parking functions called k-valet functions is de ned in [8], whose particular case k =2 is isomorphic to increasing (p; q)-parking functions. 7. Generalization It is natural to introduce the set Pp1 ;p2 ;:::;pk of (p1 ; p2 ; : : : ; pk )-parking functions in a similar way as (p; q)-parking functions by dividing the elements of a permutation into k intervals instead of two. We adopt the following notations: let n and k be positive integers, and (p1 ; : : : ; pk ) be a composition of n into k parts, in other words, a k-tuple of positive integers such that p1 + · · · + pk =n. For any i ∈ <1; k=, let qi = n − pi . A (p1 ; : : : ; pk )-sequence is a k-tuple (u(1) ; : : : ; u(k) ) of integer sequences with respective lengths p1 ; : : : ; pk and such that ∀i ∈ <1; k=; ∀j ∈ <1; pi =; 06uj(i) 6qi : For any permutation  =1 : : : n ∈ Sn , let x = (x(1) ; : : : ; x(k) ) be the (p1 ; : : : ; pk )sequence such that, for any i ∈ <1; k= and any j ∈ <1; pi =, xj(i) =|{16k6n | k ∈ <i−1 + 1; i = and k ¡i−1 +j }|; where 0 =0 and, for any i ∈ <1; k=, i =p1 + · · · + pi . Example. Let k =3; (p1 ; p2 ; p3 )=(3; 2; 4), and 28 4  =  3 6 5   19 7 : p1 p2 p3 Then x =(2 3 3; 1 6; 2 0 5 4). R. Cori, D. Poulalhon / Discrete Mathematics 256 (2002) 609 – 623 621 De nition 15. A (p1 ; : : : ; pk )-sequence u is a (p1 ; : : : ; pk )-parking function if there exists a permutation  such that u 4 x . Observe that the limit case k =n corresponds to usual parking functions, while the case k =1 is degenerated: the only (n)-parking function is a sequence containing n letters 0. This de nition gives rise to developments analogous to above. As proofs in the generic case are essentially the same as in the case k =2, we only state the results. For instance, (p1 ; : : : ; pk )-parking functions correspond bijectively to recurrent congurations on the complete (k + 1)-partite graph Kp1 ;:::;pk ;1 , hence Pp1 ;:::;pk can be put in one-to-one correspondence with the set of its spanning trees. It can also be obtained that increasing (p1 ; : : : ; pk )-parking functions are isomorphic to k-valet functions on (p1 ; : : : ; pk ) de ned in [8]. The characterization in terms of Lukasiewicz languages suits as well: For any (p1 ; : : : ; pk )-sequence u =(u(1) ; : : : ; u(k) ), let ’(u)=(’q1 (u(1) ); : : : ; ’qk (u(k) )): ’(u) may be considered as a word over the alphabet Ak ={a; b}k . For any letter w in Ak , let |w|a denote the number of occurrences of a in it, and (w) = |w|a − 1. This de nes a morphism from A∗k to Z such that, for any (p1 ; : : : ; pk )-sequence u; (’(u)) =−1. Proposition 5 becomes. Proposition 16. Let u =(u(1) ; : : : ; u(k) ) be a (p1 ; : : : ; pk )-sequence; u is a (p1 ; : : : ; pk )parking function if and only if ’(u) belongs to the Lukasiewicz language Lk de ned by the equation |w|a w · Lk Lk = w∈Ak =(a; : : : ; a; a) · Lkk + (a; : : : ; a; b) · Lkk−1 + · · · + (b; : : : ; b; b): This enables to enumerate (p1 ; : : : ; pk )-parking functions and increasing ones thanks to an argument of conjugacy: De nition 17. Let u be a (p1 ; : : : ; pk )-sequence; its (q1 + 1) · (qk + 1) conjugates are the k-tuples (sqi11 (u(1)); : : : ; sqikk (u(k) )), for all j ∈ <1; k= and ij ∈ <0; qj =. Proposition 18. For any word (w(1) ; : : : ; w(k) ) over Ak such that for any i |w(i) |a =qi and |w(i) |b = pi + 1, exactly (n + 1)k−1 k-tuples of proper factorizations w(i) = w1(i) w2(i) are such that (w2(1) w1(1) ; : : : ; w2(k) w1(k) ) belongs to Lk . As a consequence, 622 R. Cori, D. Poulalhon / Discrete Mathematics 256 (2002) 609 – 623 Proposition 19. The ratio of (increasing) (p1 ; : : : ; pk )-parking functions in the set of (increasing) (p1 ; : : : ; pk )-sequences is (n + 1)k−1 : (n − p1 + 1) · · · (n − pk + 1) Hence, the number of (p1 ; : : : ; pk )-parking functions and increasing ones are respectively k (n − pi + 1)pi −1 (n + 1)k−1 i=1 and 1 n+1 k i=1  n+1 pi  : 8. Perspectives 8.1. Products of transpositions Since the number of parking functions of length n is equal to the number of decompositions of the (n + 1)-cycle (0 1 2 : : : n) into a product of n transpositions, it seems natural to seek for an interpretation of the number of (p; q)-parking functions as the number of decompositions of a circular permutation into a product of transpositions satisfying certain conditions. Edges of Kn+1 may be considered as transpositions, so each spanning tree of this graph corresponds to a set of n transpositions and hence to n! di erent factorizations of a circular permutation; and the enumeration follows since each of the n! circular permutations has the same number of decompositions. Trying to obtain an analogous result for (p; q)-parking functions, we consider all the spanning trees of Kp; q; 1 and compute all the possible products of the transpositions corresponding to their edges. We observe that every circular permutation on {0; 1; 2; : : : ; p + q} is obtained by this way. However the number of times each of these is obtained is not uniform as it was the case for Kn+1 . For instance, K3; 2; 1 has 216 spanning trees, each one consisting of 5 edges, which gives a total of 25920 products. The circular permutation (0 1 2 3 4 5) is obtained 131 times, (0 1 2 4 3 5), 211 times, (0 1 4 2 3 5), 261 times, (0 4 1 2 3 5), 186 times, and (0 1 4 2 5 3), 316 times. 8.2. Hyperplane arrangements The number of parking functions is equal to the number of regions in the Shi arrangement of hyperplanes, and bijections between regions and parking functions are R. Cori, D. Poulalhon / Discrete Mathematics 256 (2002) 609 – 623 623 known. It would be interesting to nd arrangements of hyperplanes whose numbers of regions is equal to the numbers of (p; q)-parking functions. References [1] N. Biggs, The Tutte polynomial as a growth function, J. Algebraic Combin. 10 (1999) 115 –133. [2] L. Chottin, Enumeration d’arbres et formules d’inversion de series formelles, J. Combin. Theory Ser. B 31 (1981) 23– 45. [3] R. Cori, D. Rossin, On the sandpile group of dual graphs, European J. Combin. 21 (2000) 447– 459. [4] D. Dhar, Self-organized critical state of sandpile automaton models, Phys. Rev. Lett. 64 (1990) 1613– 1616. [5] A. Dvoretzky, Th. Motzkin, The asymptotic density of certain sets of real numbers, Duke Math. J. 14 (1947) 315 –321. [6] P.H. Edelman, R. Simion, Chains in the lattice of noncrossing partitions, Discrete Math. 126 (1994) 107–119. [7] D. Foata, J. Riordan, Mappings of acyclic and parking functions, Aequationes Math. 10 (1974) 10 –22. [8] J.D. Gilbey, L.H. Kalikow, Parking functions, valet functions and priority queues, Discrete Math. 197=198 (1999) 351–373. [9] M.D. Haiman, Conjectures on the quotient ring by diagonal invariants, J. Algebraic Combin. 3 (1994) 17–76. [10] A. Joyal, Une theorie combinatoire des series formelles, Adv. in Math. 42 (1981) 1– 82. [11] A.G. Konheim, B. Weiss, An occupancy discipline and applications, SIAM J. Appl. Math. 14 (1966) 1266 –1274. [12] G. Kreweras, Sur les partitions non croisees d’un cycle, Discrete Math. 1 (1972) 333–350. [13] G. Labelle, Une nouvelle demonstration combinatoire des formules de Lagrange, Adv. in Math. 42 (1981) 217–247. [14] Lothaire, Combinatorics on Words, Addison-Wesley, Reading, MA, 1983. [15] S.M. Majumdar, D. Dhar, Equivalence of the abelian sandpile model and the q → 0 limit of the Potts model, Physica A 185 (1992) 129 –135. [16] R.P. Stanley, Parking functions and noncrossing partitions, Electron J. Combin. 4 (1997) R20. [17] R.P. Stanley, Hyperplane arrangements, parking functions and tree inversions, Mathematical Essays in Honor of Gian-Carlo Rota, Progr. Math., Vol. 161, Birkhauser, Boston/Basel/Berlin, 1998, pp. 359 –375.