16
Graphs and Combinatorics (2010) 26:345–360 DOI 10.1007/s00373-010-0921-1 ORIGINAL PAPER Cycle Lemma, Parking Functions and Related Multigraphs Sen-Peng Eu · Tung-Shan Fu · Chun-Ju Lai Received: 24 June 2008 / Accepted: 6 February 2010 / Published online: 2 March 2010 © Springer 2010 Abstract For positive integers a and b, an (a, b)-parking function of length n is a sequence ( p 1 ,..., p n ) of nonnegative integers whose weakly increasing order q 1 ···≤ q n satisfies the condition q i < a + (i 1)b. In this paper, we give a new proof of the enumeration formula for (a, b)-parking functions by using of the cycle lemma for words, which leads to some enumerative results for the (a, b)-parking functions with some restrictions such as symmetric property and periodic property. Based on a bijection between (a, b)-parking functions and rooted forests, we enumerate com- binatorially the (a, b)-parking functions with identical initial terms and symmetric (a, b)-parking functions with respect to the middle term. Moreover, we derive the critical group of a multigraph that is closely related to (a, b)-parking functions. Keywords Cycle lemma · Parking function · Labeled rooted forest · Critical group S.-P. Eu is partially supported by National Science Council (NSC), Taiwan under grant 98-2115-M-390-002-MY3. T.-S. Fu is partially supported by NSC under grant 97-2115-M-251-001-MY2. S.-P. Eu (B ) Department of Applied Mathematics, National University of Kaohsiung, Kaohsiung 811, Taiwan, ROC e-mail: [email protected] T.-S. Fu Mathematics Faculty, National Pingtung Institute of Commerce, Pingtung 900, Taiwan, ROC e-mail: [email protected] C.-J. Lai Department of Electrical Engineering, National Taiwan University, Taipei 106, Taiwan, ROC e-mail: [email protected] 123

Cycle Lemma, Parking Functions and Related Multigraphs

Embed Size (px)

Citation preview

Graphs and Combinatorics (2010) 26:345–360DOI 10.1007/s00373-010-0921-1

ORIGINAL PAPER

Cycle Lemma, Parking Functions and RelatedMultigraphs

Sen-Peng Eu · Tung-Shan Fu · Chun-Ju Lai

Received: 24 June 2008 / Accepted: 6 February 2010 / Published online: 2 March 2010© Springer 2010

Abstract For positive integers a and b, an (a, b)-parking function of length n is asequence (p1, . . . , pn) of nonnegative integers whose weakly increasing order q1 ≤· · · ≤ qn satisfies the condition qi < a + (i − 1)b. In this paper, we give a new proofof the enumeration formula for (a, b)-parking functions by using of the cycle lemmafor words, which leads to some enumerative results for the (a, b)-parking functionswith some restrictions such as symmetric property and periodic property. Based ona bijection between (a, b)-parking functions and rooted forests, we enumerate com-binatorially the (a, b)-parking functions with identical initial terms and symmetric(a, b)-parking functions with respect to the middle term. Moreover, we derive thecritical group of a multigraph that is closely related to (a, b)-parking functions.

Keywords Cycle lemma · Parking function · Labeled rooted forest · Critical group

S.-P. Eu is partially supported by National Science Council (NSC), Taiwan under grant98-2115-M-390-002-MY3. T.-S. Fu is partially supported by NSC under grant 97-2115-M-251-001-MY2.

S.-P. Eu (B)Department of Applied Mathematics, National University of Kaohsiung, Kaohsiung 811, Taiwan, ROCe-mail: [email protected]

T.-S. FuMathematics Faculty, National Pingtung Institute of Commerce, Pingtung 900, Taiwan, ROCe-mail: [email protected]

C.-J. LaiDepartment of Electrical Engineering, National Taiwan University, Taipei 106, Taiwan, ROCe-mail: [email protected]

123

346 Graphs and Combinatorics (2010) 26:345–360

1 Introduction

Parking functions were introduced and enumerated by Konhein and Weiss [9] in astudy of hashing problems in computer science. They derived that the number ofparking functions of length n is (n + 1)n−1, which coincides with the number oflabeled trees on n + 1 vertices by Cayley’s formula. Bijective proofs of this formulawere obtained in different ways in [8,16,18]. Pitman and Stanley [14] introduced whatis called (a, b)-parking functions as a generalization of parking functions.

Definition 1.1 For positive integers a and b, an (a, b)-parking function of length nis a sequence α = (p1, p2, . . . , pn) of nonnegative integers whose weakly increasingrearrangement q1 ≤ q2 ≤ · · · ≤ qn satisfies the condition qi < (i − 1)b + a for alli ∈ [n].

Note that when a = 1, b = 1, it is an ordinary parking function. Let P(a,b)n denote

the set of (a, b)-parking functions of length n. It is known that

|P(a,b)n | = a(a + nb)n−1. (1)

Some enumerative results on (a, b)-parking functions were also obtained (in [7,19]for instance) using a bijection with families of rooted forests. In this paper, we shallderive some enumerative results on them by using the cycle lemma for words and thebijection with rooted forests, respectively.

Making use of the cycle lemma for words, we give another proof of the enumeration

formula (1) for P(a,b)n . Moreover, by the same method, we also enumerate those (a, b)-

parking functions α = (p1, p2, . . . , pn) with a symmetric property, called symmetricparking function, i.e., pi = pn+1−i for all i ∈ [n], and those α with a periodic property,i.e., there exists a positive integer d such that d|n and pd+i = pi for 1 ≤ i ≤ n − d.

Yan [19] gave a bijection � between (a, b)-parking functions and sequencesof forests. The authors [7] modified the structure of the sequences of forests intoa-component rooted forests with an edge-coloring in b colors and gave a simplifiedconstruction of the bijection �. Sivasubramanian [17, Theorem 2] derived that thenumber of ordinary parking functions (p1, p2, . . . , pn) with p1 = p2 is equal to(n + 1)n−2 in a study of the distance enumerator for Shi hyperplane arrangement,and asked for a combinatorial proof of this fact. Making use of the bijection �, weenumerate combinatorially the (a, b)-parking functions (p1, p2, . . . , pn) with iden-tical initial k terms, i.e., p1 = · · · = pk (2 ≤ k ≤ n), which in a way answers thatquestion. Moreover, by the same technique, we obtain refined enumerative results forthe number of symmetric (a, b)-parking functions with respect to the middle term.

The (a, b)-parking functions of length n can be viewed as G-parking functions

(see [4,15]) on a multigraph K (a,b)n+1 with vertex set [0, n], where the vertex 0 is a

distinguished vertex served as the root, the multiplicity of the edge (0, j) is a for1 ≤ j ≤ n, and the multiplicity of the edge (i, j) is b for i, j > 0, i �= j . The(a, b)-parking functions also appear in the guise of the critical configurations of the

dollar game on K (a,b)n+1 [2]. We shall derive the critical group of K (a,b)

n+1 .

123

Graphs and Combinatorics (2010) 26:345–360 347

This paper is organized as follows. In Sect. 2 we review the cycle lemma for wordsand use it to enumerate (a, b)-parking functions. In Sect. 3 we review the bijection� with rooted forests and enumerate (a, b)-parking functions with identical initial kterms. In Sect. 4 we enumerate symmetric (a, b)-parking functions of odd length with

respect to the middle term. In Sect. 5 we discuss the critical group of K (a,b)n+1 .

2 Cyclic Lemma for Words and Enumeration of (a, b)-Parking Functions

We consider words on the alphabet X = {x,x1,x2, . . . ,x j , . . . }. Elements of X arecalled letters, while sequences of letters are called words. The sequence of zero lettersis called the empty word, denoted by ε. The length of a word f is denoted by | f |.A factorization of a word f is a pair ( f ′, f ′′) of words such that f = f ′ f ′′ andf ′ �= ε. A word f has then exactly | f | factorizations. Let δ : X → Z be a map fromthe alphabet to the set of integers defined by δ(x) = −1 and δ(x j ) = j for all j ≥ 1.For a word f = f1 f2 . . . fn of length n ( fi ∈ X ), we define

δ( f ) =n∑

i=1

δ( fi ).

Definition 2.1 A word f on the alphabet X is a Lukasiewicz word if δ( f ) < 0 and iffor any factorization f = f ′ f ′′, f ′ �= f one has δ( f ′) > δ( f ).

The following result is known as the cycle lemma for words.

Theorem 2.2 ([13, Theorem 11.3.6]) Every word f on the alphabet X, with δ( f ) =−p (p > 0), has exactly p factorizations f = f ′ f ′′ such that f ′′ f ′ is a Lukasiewiczword.

Note that for such factorizations the words f ′′ f ′ are not necessarily distinct. Givenpositive integers n, m, let

�n,m = {(u1, u2, . . . , un) : 0 ≤ ui < m, 1 ≤ i ≤ n},

the set of sequences of nonnegative integers of length n with all elements less than m.Note that |�n,m | = mn .

Definition 2.3 Given a β = (u1, u2, . . . , un) ∈ �n,m , a conjugate of β is a sequence(v1, v2, . . . , vn) for which there exists an integer k such that vi = ui + k (mod m) forall i ∈ [n].

It is clear that any sequence of �n,m has exactly m distinct conjugates.

Example 2.4 Let n = 3, m = 10, and β = (0, 3, 7). Then the ten conjugates of β are(1, 4, 8), (2, 5, 9), (3, 6, 0), (4, 7, 1), (5, 8, 2), (6, 9, 3), (7, 0, 4), (8, 1, 5), (9, 2, 6),and (0, 3, 7).

For any weakly increasing sequence β = (u1, u2, . . . , un) ∈ �n,m (i.e., u1 ≤ u2 ≤· · · ≤ un), let f = �(β) be the word on the alphabet {x,x} given by

f = xu1xxt1xxt2 · · ·xxtn ,

123

348 Graphs and Combinatorics (2010) 26:345–360

where ti = ui+1 − ui for i < n, and tn = m − un . By the notation x j we mean asequence of j consecutive letters x.

Proposition 2.5 The conjugates of a weakly increasing sequence β are in one-to-onecorrespondence to the words f ′′ f ′ obtained from the factorizations ( f ′, f ′′) of�(β) = f ′ f ′′ such that f ′ ends with x.

Proof It suffices to notice that if f = �(β) then ui is equal to the number of occur-rences of x preceding the i th occurrence of x in f , for each i ∈ [n]. Hence, if fis factorized as f = hxgx where g contains no occurrences of x then the sequence�−1(gxhx) is obtained from β by adding 1 modulo m to all of the ui . �Example 2.6 Let n = 3, m = 10, and return to the sequence β = (0, 3, 7) in Exam-ple 2.4. We have

�(β) = xxxxxxxxxxxxx,

which has ten factorizations ( f ′, f ′′) such that f ′ ends with x and each gives rise toone sequence �−1( f ′′ f ′) in the ten conjugates of β shown in Example 2.4.

In the following, we shall consider (a, b)-parking functions of length n and we shalldenote m = a + nb. One of the main results in this paper is the following statementwhich generalizes a well-known result concerning ordinary parking functions.

Theorem 2.7 For any sequence β ∈ �n,m, where m = a + nb, the number of conju-gates of β which are (a, b)-parking functions is equal to a.

Proof It suffices to consider weakly increasing sequences since the condition for beingan (a, b)-parking function is invariant under permutation of the elements.

Let g denote the word obtained from f = �(β) by replacing each occurrenceof x by xb. Note that g is a word on alphabet {x,xb} with n occurrences of xb andm occurrences of x, and hence δ(g) = nb − m = −a. We shall prove that g is aLukasiewicz word if and only if β is an (a, b)-parking function.

To prove that g is a Lukasiewicz word we need to prove that δ(g′) > δ(g), for anyprefix g′ of g. It suffices to consider those prefixes of g followed by an occurrence ofxb. But if g′ is followed by the i th occurrence of xb it contains exactly ui occurrencesof x and hence δ(g′) = b(i − 1) − ui . It follows that the inequality δ(g′) > δ(g)

is equivalent to ui < a + (i − 1)b which is exactly the condition for the sequenceβ to be an (a, b)-parking function. Then the assertion of Theorem 2.7 follows fromTheorem 2.2 and Proposition 2.5. �Example 2.8 Let a = 4, b = 2, n = 3, and take the (4, 2)-parking function β =(0, 3, 7). The word g associated with �(β) is given by

g = x2xxxx2xxxxx2xxx.

The four factorizations of g that give rise to Lukasiewicz words are g and the otherones

x2xxxx2xxxx2xxxx, xx2xxxx2xxxx2xxx, x2xxxxx2xxxx2xxx.

123

Graphs and Combinatorics (2010) 26:345–360 349

The corresponding conjugates of β that are (a, b)-parking functions are β and theother ones (3, 6, 0), (4, 7, 1), and (7, 0, 4).

Corollary 2.9 The number of (a, b)-parking functions in �n,m is

a(a + nb)n−1.

Proof It follows from the facts that the number of conjugate classes in �n,m is

mn

m= mn−1

and, by Theorem 2.7, the number of (a, b)-parking functions in each class is a. �A sequence (u1, u2, . . . , un) ∈ �n,m is symmetric if it is equal to its mirror image,

more precisely if ui = un+1−i , for all i ∈ [n]. We also have the following result.

Corollary 2.10 The number of symmetric (a, b)-parking functions in �n,m is a(a +nb)k−1 if n = 2k, and is a(a + nb)k if n = 2k + 1.

Proof It suffices to notice that the number of symmetric sequences of length 2k and2k + 1 are mk and mk+1, respectively, and that all the conjugates of a symmetricsequence are symmetric. �

Consider a cyclic group C of order n acting on sequences β ∈ �n,m by cyclicallyshifting the elements of β.

Corollary 2.11 For d|n, the number of (a, b)-parking functions in �n,m which areinvariant under the subgroup C n

dof order n

d of C is equal to a(a + nb)d−1.

Proof Note that a sequence β = (u1, u2, . . . , un) ∈ �n,m which is invariant underC n

dsatisfies the condition ui = ud+i = · · · = u( n

d −1)d+i , for 1 ≤ i ≤ d, and hence

there are md such sequences in �n,m . Moreover, all the conjugates of β are invariantunder C n

d. The assertion follows. �

By elementary number-theoretic facts, one can obtain the orbit structure of P(a,b)n

under the action of C .

Corollary 2.12 Let C be a cyclic group of order n acting on α ∈ P(a,b)n by cyclically

shifting the elements of α. Then

(i) the number of orbits of size d, where d|n, is

1

d

t |dμ

(d

t

)(a + nb)t−1,

(ii) and the total number of orbits is

1

n

t |nφ

(n

t

)(a + nb)t−1,

where φ is the Euler’s phi function and μ is the number-theoretic Möbius function.

123

350 Graphs and Combinatorics (2010) 26:345–360

3 Enumeration of (a, b)-Parking Functions with Identical Initial Terms

In this section, we review the construction, given in [7], of a bijection between (a, b)-parking functions and rooted forests, and enumerate (a, b)-parking functions withidentical initial terms.

First, we consider the case b = 1 to establish a bijection : P(a,1)n → F (a,1)

n ,

where P(a,1)n is the set of (a, 1)-parking functions of length n and F (a,1)

n is the setof a-component rooted forests on the vertex set {ρ0, . . . , ρa−1} ∪ [n] such that thespecified vertices ρ0, . . . , ρa−1 are the roots of the components.

Given a β = (u1, u2, . . . , un) ∈ P(a,1)n , the construction of (β) is to create a

forest Fβ as an intermediate stage, the roots of which are the triples (ρ j , 0, j), for0 ≤ j ≤ a −1, and the non-root vertices of which are the triples (i, ui , πβ(i)+a −1),for 1 ≤ i ≤ n, where

πβ(i) = Card{u j ∈ β| either u j < ui , or u j = ui and j ≤ i}. (2)

Note that πβ(i) is the position of the term ui in weakly increasing order of β. Forany two vertices v = (x1, y1, z1) and u = (x2, y2, z2), u is a child of v if and onlyif y2 = z1. Then (β) is obtained from Fβ simply by omitting the last two entries ofthe triples.

Example 3.1 For the (2, 1)-parking function α = (5, 5, 0, 1, 4, 0, 4, 3), we have thesequence (πα(i)+a −1)i≥1 = (8, 9, 2, 4, 6, 3, 7, 5). The corresponding rooted forest(α) and its intermediate stage are shown in Fig. 1.

To find −1, given an F ∈ F (a,1)n , we shall recover the triples (i, yi , zi ) for vertices

i of F , for 1 ≤ i ≤ n. The third entries zi are the breadth-first-search order of thevertices i in F , under the convention that the first root is the 0th vertex (and the firstnon-root vertex is the ath one), and that if a vertex has more than one child, then thesechildren are visited in numerical order. For the second entries yi , if the parent of i isthe kth vertex in breadth-first-search order in F , then yi = k. Sorting the triples bythe first entries, the sequence −1(F) is then obtained from the second entries of thetriples.

Now we establish a bijection � : P(a,b)n → F (a,b)

n , where P(a,b)n is the set of (a, b)-

parking functions of length n and F (a,b)n is the same set of forests as F (a,1)

n with the

0 ρ1

1 2

5

463

78

( ,0,0)ρ0 ( ,0,1)ρ1

(4,1,4)(3,0,2)

(6,0,3)

(8,3,5)

(1,5,8) (2,5,9)

(5,4,6) (7,4,7)

ρ

Fig. 1 The forest for α = (5, 5, 0, 1, 4, 0, 4, 3), where a = 2, b = 1

123

Graphs and Combinatorics (2010) 26:345–360 351

following edge-coloring. Let κ(i) denote the color of the edge that connects the vertexi and its parent. Then κ(i) = −1 (i.e., with no color) if the parent of i is a root andκ(i) ∈ [0, b − 1] otherwise.

Given an α = (p1, p2, . . . , pn) ∈ P(a,b)n , we associate α with a pair of sequences

β = (u1, u2, . . . , un) and γ = (r1, r2, . . . , rn), where

ui ={

pi if pi < a,⌊ pi −ab

⌋ + a otherwise;and ri =

{−1 if pi < a,pi − a − (ui − a)b otherwise.

(3)

Note that β ∈ P(a,1)n and γ ∈ [−1, b − 1]n with ri = −1 if pi < a. We first find the

forest (β) ∈ F (a,1)n corresponding to β, and then define the requested forest �(α)

to be (β) with the edge-coloring κ(i) = ri for each i ∈ [n].To find �−1, given an F ∈ F (a,b)

n , we can retrieve an (a, 1)-parking function(u1, . . . , un) from the vertex-labeling of F and then derive the corresponding (a, b)-parking function �−1(F) = (p1, . . . , pn) by setting pi = ui if pi < a, and pi =a + (ui − a)b + κ(i) otherwise.

Example 3.2 Consider the (2, 2)-parking function α = (8, 9, 0, 1, 6, 0, 7, 5). Theassociated pair (β, γ ) is given by β = (5, 5, 0, 1, 4, 0, 4, 3) and γ = (0, 1,−1,−1, 0,

−1, 1, 1). As shown in Example 3.1, we have obtained the forest(β). The correspond-ing forest �(α) is shown in Fig. 2, along with the edge-coloring given in parenthesis.

With the bijection �, the set F (a,b)n has the same cardinality as P(a,b)

n . Hence wehave

|F (a,b)n | = a(a + nb)n−1. (4)

For a rooted forest F and two vertices u, v ∈ F , we say that u is a descendant of v

if v is contained in the path from u to the root of the component that contains u. Letτ(v) denote the subtree of F consisting of v and the descendants of v, and let F −τ(v)

denote the induced subgraph of F when τ(v) is removed.Making use of the bijection �, we prove the following enumerative result combi-

natorially, which answers a question mentioned in [17].

Fig. 2 The forest forα = (8, 9, 0, 1, 6, 0, 7, 5), wherea = 2, b = 2

(1)

0 ρ1

1 2

5

463

78

(1)

(0) (1)

(0)

ρ

123

352 Graphs and Combinatorics (2010) 26:345–360

Theorem 3.3 For 2 ≤ k ≤ n, the number of parking functions (p1, p2, . . . , pn) ∈P(a,b)

n such that p1 = · · · = pk is equal to a(a + k + (n − k)b)n−k .

To prove this theorem, we partition such parking functions α = (p1, p2, . . . , pn) ∈P(a,b)

n into two sets A and B such that α ∈ A if p1 = · · · = pk < a, and α ∈ B ifp1 = · · · = pk ≥ a.

Proposition 3.4 We have

|A| = a(a + k)(a + k + (n − k)b)n−k−1.

Proof Let X be the set of triples (G,x, H), where G (resp. H ) is an a-component

(resp. k-component) forest such that G ∪ H ∈ F (a+k,b)n−k , and x is a root vertex of G. It

follows from Eq. (4) that |X | = a(a + k)(a + k + (n − k)b)n−k−1. We shall establisha bijection � between A and X .

Given an α = (p1, p2, . . . , pn) ∈ A, let Fα = �(α) ∈ F (a,b)n , and let vi denote

the non-root vertex with label i . Since p1 = · · · = pk < a, the vertices v1, . . . , vk

have the same parent, which is a root vertex, and κ(v1) = · · · = κ(vk) = −1.We associate α with a triple (G,x, H), where x is the parent of v1, . . . , vk , G =Fα − (τ (v1)∪ · · · ∪ τ(vk)), and H = τ(v1)∪ · · · ∪ τ(vk). (The labels for the non-rootvertices of G ∪ H can be normalized to {1, . . . , n − k}.) Then the map � is definedby �(α) = (G,x, H) ∈ X .

To find �−1, given a triple (G,x, H) ∈ X , let w1, . . . , wk be the root vertices inH . We convert the triple into a forest F by connecting the trees τ(w1), . . . , τ (wk)

to the specified root x in G. The non-root vertices of G ∪ H are then relabeled byk + 1, . . . , n, accordingly and the vertices w j are labeled by j , for 1 ≤ j ≤ k. Then�−1(G,x, H) = �−1(F) ∈ A is obtained. The assertion follows. �

To enumerate the other set B, we use the same method as above and the followingAbel’s identity (e.g., see [5]).

(x + y)n =n∑

k=0

(n

k

)x(x − kz)k−1(y + kz)n−k . (5)

Proposition 3.5 We have

|B| = ab(n − k)(a + k + (n − k)b)n−k−1.

Proof Let Y be the set of quadruples (G, y, H, c), where G (resp. H ) is an

a-component (resp. k-component) forest such that G ∪ H ∈ F (a+k,b)n−k , y is a non-

root vertex of G, and c ∈ [0, b − 1]. We shall establish a bijection �′ between B andY .

Given an α = (p1, p2, . . . , pn) ∈ B, let Fα = �(α) ∈ F (a,b)n . Since p1 = · · · =

pk ≥ a, the common parent of v1, . . . , vk is a non-root vertex and κ(v1) = · · · =κ(vk) ∈ [0, b − 1]. We associate α with a quadruple (G, y, H, c), where y is the

123

Graphs and Combinatorics (2010) 26:345–360 353

parent of v1, . . . , vk , G = Fα − (τ (v1) ∪ · · · ∪ τ(vk)), H = τ(v1) ∪ · · · ∪ τ(vk), andc = κ(v1). Then the map �′ is defined by �′(α) = (G, y, H, c) ∈ Y .

To find �′−1, given a quadruple (G, y, H, c) ∈ Y , let w1, . . . , wk be the rootvertices in H . We convert the quadruple into a forest F by connecting the treesτ(w1), . . . , τ (wk) to the vertex y in G and letting κ(w1) = · · · = κ(wk) = c.Then �−1(G, y, H, c) = �−1(F) ∈ B.

To enumerate B, we count the number of quadruples (G, y, H, c) ∈ Y with respectto the number j of non-root vertices in G, for 1 ≤ j ≤ n. There are

(n−kj

)ways to

choose j vertices from {k + 1, . . . , n} for G and y may be any one of the chosen

vertices. Moreover, G ∈ F (a,b)j , H ∈ F (k,b)

n−k− j , and c ∈ [0, b − 1]. Hence, by Eq. (4)and Abel’s identity, we have

|B| =n−k∑

j=1

(n − k

j

)· j · a(a + bj) j−1 · k(k + b(n − k − j))n−k− j−1 · b

= ab(n − k)(a + k + (n − k)b)n−k−1,

as required. �By Propositions 3.4 and 3.5, we have |A| + |B| = a(a + k + (n − k)b)n−k . This

completes the proof of Theorem 3.3. We remark that when we specialize Theorem 3.3at a = b = 1 we give a combinatorial proof of [17, Corollary 1 and Theorem 2].

4 Enumeration of Symmetric Parking Functions by the Middle Term

In [7, Theorem 4.6], the bijection � is applied to enumerate (a, b)-parking functionswith respect to the leading term. In this section, we make use of the same method asin [7, Theorem 4.6] to enumerate symmetric (a, b)-parking functions of odd length

with respect to the middle term. Let S P(a,b)n be the set of symmetric (a, b)-parking

functions of length n. As shown in Corollary 2.10, we recall that

|S P(a,b)n | =

{a(a + nb)k−1 if n = 2k

a(a + nb)k if n = 2k + 1.(6)

Let M (a,b)2n+1,d ⊆ S P(a,b)

2n+1 be the set (a, b)-parking functions (p1, p2, . . . , p2n+1) such

that pn+1 = d, and let m(a,b)2n+1,d = |M (a,b)

2n+1,d |.Lemma 4.1 For 0 ≤ d < a, we have

m(a,b)2n+1,d = (a + b)(a + b + 2nb)n−1.

Proof Note that an α ∈ M (a,b)2n+1,d with 0 ≤ d < a is a juxtaposition α = (μ, d, μ′)

of d and a symmetric (a + b, b)-parking function (μ,μ′) of length 2n, where μ′ is

123

354 Graphs and Combinatorics (2010) 26:345–360

a sequence of length n in reverse order of μ. Hence |M (a,b)2n+1,d | = |S P(a+b,b)

2n |, asrequired. �Lemma 4.2 For 0 ≤ k ≤ 2n − 1 and 0 ≤ i, j ≤ b − 1, we have

m(a,b)2n+1,a+kb+i = m(a,b)

2n+1,a+kb+ j .

Proof Given an α ∈ M (a,b)2n+1,a+kb+i , let Fα = �(α) ∈ F (a,b)

2n+1. Since pn+1 = a + kb +i ≥ a, the parent of vn+1 is a non-root vertex and κ(vn+1) = i . If pn+1 is replacedby a + kb + j in α, then it corresponds to κ(vn+1) being replaced by color j in Fα .

Hence there is a bijection between M (a,b)2n+1,a+kb+i and M (a,b)

2n+1,a+kb+ j by interchangingcolors i, j for κ(vn+1). The assertion follows. �Lemma 4.3 For 0 ≤ k ≤ n − 1, we have

m(a,b)2n+1,a+2kb = m(a,b)

2n+1,a+(2k+1)b.

Proof Given an α ∈ M (a,b)2n+1,a+2kb, let Fα = �(α) ∈ F (a,b)

2n+1. Since pn+1 = a + 2kb,we observe that the parent u of vn+1 is the (a + 2k)-th vertex in breadth-first-searchorder in Fα . (We remind the readers that the first non-root vertex is the ath vertex inthis order.) Note that vi and v2n+2−i have the same parent for each i ∈ [n] since α issymmetric. Then the subgraph Fα−τ(vn+1) contains even number of non-root verticesand one can form a new forest F from Fα by attaching τ(vn+1) to the (a + 2k + 1)thvertex w in Fα − τ(vn+1). From the resulting forest F , we find the corresponding

member �−1(F) ∈ M (a,b)2n+1,a+(2k+1)b.

Conversely, one can switch τ(vn+1) from the (a+2k+1)th vertex w back to the (a+2k)th vertex u. This establishes a bijection between M (a,b)

2n+1,a+2kb and M (a,b)2n+1,a+(2k+1)b,

as required. �It follows from Lemmas 4.2 and 4.3 that for 0 ≤ k ≤ n − 1 and 0 ≤ i, j ≤ 2b − 1

we have

m(a,b)2n+1,a+2kb+i = m(a,b)

2n+1,a+2kb+ j . (7)

With the initial values in Lemma 4.1 and the above condition (7), the enumeration ofsymmetric (a, b)-parking functions with respect to the middle term can be explicitlydetermined by the following recurrence relation.

Proposition 4.4 For 0 ≤ k ≤ n − 1, we have

m(a,b)2n+1,a+2kb−1 − m(a,b)

2n+1,a+2kb =(

n

k

)a(a + 2kb)k−1(1 + 2(n − k)b)n−k−1.

Proof Given an α ∈ M (a,b)2n+1,a+2kb−1, let Fα = �(α) ∈ F (a,b)

2n+1. Note that the parent ofvn+1 is the (a + 2k − 1)th vertex in Fα . Then the subgraph Fα − τ(vn+1) contains at

123

Graphs and Combinatorics (2010) 26:345–360 355

least 2k non-root vertices. Let M ⊆ M (a,b)2n+1,a+2kb−1 be the set of α such that the sub-

graph Fα − τ(vn+1) contains more than 2k non-root vertices. A bijection � between

M and M (a,b)2n+1,a+(2k+1)b−1 can be established as follows. Given an α ∈ M, one can

form a new forest F from Fα by attaching τ(vn+1) to the (a +2k)-th vertex in breadth-

first-search order in Fα − τ(vn+1). Then �(α) = �−1(F) ∈ M (a,b)2n+1,a+(2k+1)b−1.

To find �−1, given an α′ ∈ M (a,b)2n+1,a+(2k+1)b−1, let Fα′ = �(α′) ∈ F (a,b)

2n+1. Notethat the parent of vn+1 is the (a + 2k)th vertex in Fα′ . One can obtain a new forest F ′from Fα′ by attaching τ(vn+1) to the (a + 2k − 1)-th vertex in Fα′ − τ(vn+1). Then

�−1(α′) = �−1(F ′) ∈ M. Hence |M| = m(a,b)2n+1,a+(2k+1)b−1. Moreover, by Lemma

4.2, m(a,b)2n+1,a+2kb = m(a,b)

2n+1,a+(2k+1)b−1.

Hence m(a,b)2n+1,a+2kb−1 −m(a,b)

2n+1,a+2kb is equal to the number of α ∈ M (a,b)2n+1,a+2kb−1

such that the subgraph Fα − τ(vn+1) contains exactly 2k non-root vertices. Since thenon-root vertices vi are paired off with their partners v2n+2−i , there are

(nk

)ways to

choose k labels from [n] for the vi ∈ Fα −τ(vn+1). By Eq. (6), there are a(a+2kb)k−1

and (1 + 2(n − k)b)n−k−1 possibilities for Fα − τ(vn+1) and τ(vn+1), respectively.The assertion follows. �

In particular, for the special case pn+1 = a + 2nb − 1, the members α ∈M (a,b)

2n+1,a+2nb−1 are in one-to-one correspondence with the members β ∈ S P(a,b)2n

for which β is obtained from α with pn+1 removed. Hence we have

m(a,b)2n+1,a+2nb−1 = a(a + 2nb)n−1.

We derive the generating function for (a, b)-parking functions with respect to lengthand the middle term.

Theorem 4.5 If M (a,b)(x) = ∑a+2nb−1i=0 m(a,b)

2n+1,ixi , then

M (a,b)(x) = 1

1 − x

[(a + b)(a + b + 2nb)n−1

−n∑

k=0

(n

k

)a(a + 2kb)k−1(1 + 2(n − k)b)n−k−1xa+2kb)

].

We can apply the method used in this section to other enumerative problems on(a, b)-parking functions. See the last section for discussion.

5 The Critical Groups of K (a,b)n+1

From his studies on the dollar games, Biggs [2] introduced the notion of critical groupof a graph. Let G = (V, E) be a finite graph with multiple edges, but without loops.For any two vertices v, u ∈ V , let m(v, u) be the multiplicity of the edge (v, u).

123

356 Graphs and Combinatorics (2010) 26:345–360

The critical group K (G) of G is closely related to the Laplacian matrix L(G) of G,a |V | × |V | matrix defined by

L(G)v,u ={

deg(v) if u = v,−m(v, u) otherwise.

When G is connected, L(G) is of rank |V | − 1 and the kernel of L(G) is spanned byconstant functions on V . Thinking of L(G) as a map Z

|V | → Z|V |, its cokernel can

be expressed as

Z|V |/imL(G) ∼= Z ⊕ K (G),

where K (G) is defined to be the critical group (also known as the group of components[12], the sandpile group [6], the Picard group and Jacobian group [1]). For example,the structure of the critical group of the complete graph Kn has the form

K (Kn) ∼= (Z/nZ)n−2.

However, to determine the structure of a critical group is generally non-trivial. Thereare only a few graphs whose critical groups have been completely determined.

One typical technique to derive the critical group K (G) is to bring the Lapla-cian matrix L(G) to the Smith normal form. This is the unique diagonal matrixdiag[s1, s2, . . . , sn] equivalent to L(G), whose entries si are non-negative integersand satisfy that si |si+1. Then in this case K (G) is the torsion part of the group(Z/s1Z)⊕ · · ·⊕ (Z/snZ). We refer the readers to [3, pp. 143–151] for more informa-tion.

The (a, b)-parking functions also appear in the guise of the critical configurations

of the dollar game on the multigraph K (a,b)n+1 . In the following, we derive the crit-

ical group of the multigraph K (a,b)n+1 . Recall that K (a,b)

n+1 is on vertex set [0, n] withedge-multiplicities m(0, j) = a for 1 ≤ j ≤ n, and m(i, j) = b for i, j > 0, i �= j .

Theorem 5.1 For positive integers a and b, we have

K (K (a,b)n+1 ) ∼= (Z/dZ) ⊕ (Z/(a + nb)Z)n−2 ⊕ (Z/eZ),

where d = GCD(a, b) and e = a(a+nb)d .

Let M = L(K (a,b)n+1 ). Striking out the row and the column that correspond to the root

v0, we obtain the reduced Laplacian matrix M = (a + nb)In×n − bJn×n , where Jn×n

is the n × n all-one matrix. To determine explicitly K (K (a,b)n+1 ), we reduce M to the

Smith normal form. This can be achieved by applying a sequence of row and columnoperations that are invertible over Z. Namely, each operation is one of the three types:

(i) interchange two rows or columns,(ii) multiply a row or column by −1, or

123

Graphs and Combinatorics (2010) 26:345–360 357

(iii) add an integer multiple of one row (resp. column) to another row (resp. column).

To prove Theorem 5.1, we first derive some number-theoretic facts. Given twopositive integers a and b, let d = GCD(a, b) and let f1 = a, g1 = b. Suppose thata > b. By Euclid’s algorithm, there exist positive integers x1, . . . ,xr and y1, . . . , yr

such that

fi + xi (−gi ) = fi+1, (8)

−gi + yi fi+1 = −gi+1, (9)

where 0 < fi+1 ≤ gi , 0 ≤ gi+1 < fi+1, fr+1 = d, and gr+1 = 0. Moreover, ifwe substitute the fi+1 in (9) with fi + xi (−gi ) and substitute the −gi in (8) with−gi−1 + yi−1 fi iteratively backward, then we eventually get p f1 − qg1 = gr+1 = 0and s f1 − tg1 = fr+1 = d, for some positive integers p, q, s and t . In fact, p = b

d ,q = a

d .

Example 5.2 For a = 21 and b = 15, we have

21 − 15 = 6

−15 + 2 × 6 = −3

6 − 3 = 3

−3 + 3 = 0.

In this case, ( f1, f2, f3) = (21, 6, 3), (g1, g2, g3) = (15, 3, 0), (x1,x2) = (1, 1),and (y1, y2) = (2, 1). Substituting backward, one can check that (p, q) = (5, 7) and(s, t) = (3, 4).

For the case a ≤ b, we have similar iteration,

− gi + yi fi = −gi+1, (10)

fi + xi (−gi+1) = fi+1, (11)

where 0 ≤ gi+1 < fi , 0 < fi+1 ≤ gi+1, fr = d, and gr+1 = 0.

Lemma 5.3 Given positive integers a, b, n, let GCD(a, b) = d and let

A =(

a 0−b a + nb

).

Then the Smith normal form of A is given by

(d 00 a(a+nb)

d

). (12)

123

358 Graphs and Combinatorics (2010) 26:345–360

Proof Suppose that a > b. From the sequences x1, . . . ,xr and y1, . . . , yr of positiveintegers constructed in (8) and (9), we define the row operations on A

Xi =(

1 xi

0 1

), Yi =

(1 0yi 1

), for 1 ≤ i ≤ r .

Let F1 = A. For 1 ≤ i ≤ r , let Gi = Xi Fi and Fi+1 = Yi Gi . It follows that

Fr+1 =(

s tp q

) (a 0

−b a + nb

)=

(d t (a + nb)

0 q(a + nb)

).

Since d divides a + bn, we obtain the requested form (12) by a column operation onFr+1.

For the case a ≤ b, the assertion can be proved by the same argument and thesequences constructed in (10) and (11). �

Proof of Theorem 5.1. We start with the reduced Laplacian matrix M = (a +nb)In×n − bJn×n of K (a,b)

n+1 . Adding every other row of M to the first row, we have

⎜⎜⎜⎜⎜⎝

a a · · · a a−b a + (n − 1)b −b −b...

. . ....

−b −b a + (n − 1)b −b−b −b · · · −b a + (n − 1)b

⎟⎟⎟⎟⎟⎠

Then adding (−1) multiple of the first column to every other column, we have

⎜⎜⎜⎜⎜⎝

a−b a + nb...

. . .

−b a + nb−b a + nb

⎟⎟⎟⎟⎟⎠.

By Lemma 5.3, this matrix is equivalent to

⎜⎜⎜⎜⎜⎝

d−b a + nb...

. . .

−b a + nb0 a(a+nb)

d

⎟⎟⎟⎟⎟⎠.

123

Graphs and Combinatorics (2010) 26:345–360 359

Since d divides b, by additional row operations we obtain the Smith normal form

⎜⎜⎜⎜⎜⎝

da + nb

. . .

a + nba(a+nb)

d

⎟⎟⎟⎟⎟⎠,

as required. �

6 Concluding Remarks

In this paper, we present some techniques for enumerating (a, b)-parking functionsby using the cycle lemma for words and the bijection with rooted forests. By the samemethod as the one in Sect. 4, we can also enumerate symmetric (a, b)-parking func-tions with respect to the leading term. These results are summarized in Table 1, where

the notation �(a,b)n,k is the number of symmetric (a, b)-parking functions (a1, . . . , an)

such that a1 = k.

Table 1 Enumerating parking functions with respect to a specified term

123

360 Graphs and Combinatorics (2010) 26:345–360

In [10,11], Kung and Yan derived formulas for expected sums and higher momentsof an (a, b)-parking function of length n. Naturally one can consider the same problemon symmetric parking functions. In particular, for the case of even length, we have thefact that the symmetric (a, b)-parking functions (a1, . . . , a2n) of length 2n are in one-to-one correspondence with the (a, 2b)-parking functions (a1, . . . , an) of length n. Itfollows from [10, Theorem 4.7] that the expected sum of a symmetric (a, b)-parkingfunction of even length is given by

1

|S P(a,b)2n |

α∈S P(a,b)2n

a1 + · · · + a2n = n(a + 2nb + 1)

2− 1

2

n∑

j=1

(n

j

)j !(2b) j

(a + 2nb) j−1 .

The higher moments can be obtained similarly from [11, Theorem 1.1]. We are inter-ested in an explicit formula for expected sums (and higher moments) of symmetric(a, b)-parking functions of odd length.

Acknowledgments The authors thank one of the referees for very helpful suggestions about using thecycle lemma for words in enumeration. The current Sect. 2, due to the referee, greatly simplifies the one inthe original manuscript. The first author also thanks Andy Berget for helpful conversations.

References

1. Bacher, R., de la Harpe, P., Nagnibeda, T.: The lattice of integral flows and the lattice of integral cutson a finite graph. Bull. Soc. Math. France 125, 167–198 (1997)

2. Biggs, N.: Chip-firing and the critical group of a graph. J. Algebraic Comb. 9, 25–45 (1999)3. Cameron, P.J.: Introduction to Algebra. Oxford University Press, Oxford (1998)4. Chebikin, D., Pylyavskyy, P.: A family of bijections between G-parking functions and spanning trees.

J. Comb. Theory Ser. A 110, 31–41 (2005)5. Comtet, L.: Advanced Combinatorics. Reidel, Dordrecht (1974)6. Dhar, D.: Self-organised critical state of the sandpile automaton models. Phys. Rev. Lett. 64(14), 1613–

1616 (1990)7. Eu, S.-P., Fu, T.-S., Lai, C.-J.: On the enumeration of parking function by leading terms. Adv. Appl.

Math. 35, 392–406 (2005)8. Foata, D., Riordan, J.: Mappings of acyclic and parking functions. Aequ. Math. 10, 10–22 (1974)9. Konheim, A.G., Weiss, B.: An occupancy discipline and applications. SIAM J. Appl. Math. 14, 1266–

1274 (1996)10. Kung, J.P., Yan, C.H.: Expected sums of general parking functions. Ann. Comb. 7, 481–493 (2003).

Theory Ser. A 102, 16–37 (2003)11. Kung, J.P., Yan, C.H.: Exact formula for moments of sums of classical parking functions. Adv. Appl.

Math. 31, 215–241 (2003)12. Lorenzini, D.: A finite group attached to the Laplacian of a graph. Discrete Math. 91(3), 277–282 (1991)13. Lothaire, M.: Combinatorics on Words. Cambridge University Press, Cambridge (1997)14. Pitman, J., Stanley, R.: A polytope related to empirical distributions, plane trees, parking functions,

and the associahedron. Discrete Comput. Geom. 27(4), 603–634 (2002)15. Postnikov, A., Shapiro, B.: Trees, parking functions, syzygies, and deformations of monomial ideals.

Trans. Am. Math. Soc. 356, 3109–3142 (2004)16. Schützenberger, M.P.: On an enumeration problem. J. Comb. Theory 4, 219–221 (1968)17. Sivasubramanian, S.: On the two variable distance enumerator of the Shi hyperplane arrangement. Eur.

J. Comb. 29(5), 1104–1111 (2008)18. Stanley, R.: Parking functions and noncrossing partitions. Electron. J. Comb. 4, R20 (1997)19. Yan, C.H.: Generalized parking functions, tree inversions and multicolored graphs. Adv. Appl.

Math. 27, 641–670 (2001)

123