22
Advances in Applied Mathematics 59 (2014) 26–47 Contents lists available at ScienceDirect Advances in Applied Mathematics www.elsevier.com/locate/yaama Sign imbalances of snakes and valley-signed permutations Huilan Chang, Sen-Peng Eu, Yuan-Hsun Lo Department of Applied Mathematics, National University of Kaohsiung, Kaohsiung 811, Taiwan, ROC a r t i c l e i n f o a b s t r a c t Article history: Received 10 May 2013 Accepted 7 May 2014 Available online xxxx MSC: 05A05 05A19 Keywords: Snake Inversions Sign imbalance Alternating permutation Valley-signed permutation One of the combinatorial structures counted by the Springer numbers is the set of snakes, which in type A n is the set of the alternating permutations and in type B n (or D n ) is the set of certain signed permutations. The set of valley-signed permutations, defined by Josuat-Vergès, Novelli and Thibon, is another structure counted by the Springer numbers of type B n (or D n ). In this paper we determine the sign imbalances of these sets of snakes and valley-signed permutations under various inversion statistics inv w , inv o , inv s , inv B , and inv D . © 2014 Elsevier Inc. All rights reserved. Partially supported by National Science Council of Taiwan under grants NSC 101-2115-M-390-004-MY3 (S.-P. Eu and Y.-H. Lo) and NSC 100-2115-M-390-004-MY2 (H. Chang). * Corresponding author. E-mail addresses: [email protected] (H. Chang), [email protected] (S.-P. Eu), [email protected] (Y.-H. Lo). http://dx.doi.org/10.1016/j.aam.2014.05.004 0196-8858/© 2014 Elsevier Inc. All rights reserved.

Sign imbalances of snakes and valley-signed permutations

Embed Size (px)

Citation preview

Advances in Applied Mathematics 59 (2014) 26–47

Contents lists available at ScienceDirect

Advances in Applied Mathematics

www.elsevier.com/locate/yaama

Sign imbalances of snakes and valley-signed

permutations ✩

Huilan Chang, Sen-Peng Eu, Yuan-Hsun Lo ∗

Department of Applied Mathematics, National University of Kaohsiung, Kaohsiung 811, Taiwan, ROC

a r t i c l e i n f o a b s t r a c t

Article history:Received 10 May 2013Accepted 7 May 2014Available online xxxx

MSC:05A0505A19

Keywords:SnakeInversionsSign imbalanceAlternating permutationValley-signed permutation

One of the combinatorial structures counted by the Springer numbers is the set of snakes, which in type An is the set of the alternating permutations and in type Bn (or Dn) is the set of certain signed permutations. The set of valley-signed permutations, defined by Josuat-Vergès, Novelli and Thibon, is another structure counted by the Springer numbers of type Bn (or Dn). In this paper we determine the sign imbalances of these sets of snakes and valley-signed permutations under various inversion statistics invw, invo, invs, invB , and invD.

© 2014 Elsevier Inc. All rights reserved.

✩ Partially supported by National Science Council of Taiwan under grants NSC 101-2115-M-390-004-MY3 (S.-P. Eu and Y.-H. Lo) and NSC 100-2115-M-390-004-MY2 (H. Chang).* Corresponding author.

E-mail addresses: [email protected] (H. Chang), [email protected] (S.-P. Eu), [email protected] (Y.-H. Lo).

http://dx.doi.org/10.1016/j.aam.2014.05.0040196-8858/© 2014 Elsevier Inc. All rights reserved.

H. Chang et al. / Advances in Applied Mathematics 59 (2014) 26–47 27

1. Introduction

1.1. Springer numbers and snakes

The Springer numbers were introduced by Springer [14] in the study of the Coxeter groups. Let (W, S) be an irreducible Coxeter system and � be the length function. We say D(w) := {s ∈ S : �(ws) < �(w)} is the descent set of w ∈ W . The Springer numberof (W, S) is defined by

K(W ) := maxJ⊆S

|DJ |, (1.1)

where DJ = {w ∈ W : D(w) = J}. The sequences of Springer numbers of types An, Bn

and Dn (n ≥ 0) are respectively

• type An: 1, 1, 1, 2, 5, 16, 61, 272, 1385, 7936, 50 521, . . .• type Bn: 1, 1, 3, 11, 57, 361, 2763, 24 611, 250 737, 2 873 041, 36 581 523, . . .• type Dn: 1, 1, 1, 5, 23, 151, 1141, 10 205, 103 823, 1 190 191, 15 151 981, . . .

Let Sn be the set of permutations of [n] := {1, 2, . . . , n}. A permutation π =π1π2 · · ·πn ∈ Sn is alternating if π1 > π2 < π3 > π4 < · · · . Let En be the set of alternating permutations of [n] and it is well known [17] that |En| is the Euler number.

Let [±n] := {−n, . . . , −1} ∪{1, . . . , n}. A signed permutation π = π−n · · ·π−1π1 · · ·πn

(in its one-line notation) is a bijection of [±n] to itself such that π(−i) = −π(i) for all i ∈[±n]. For simplicity we denote −i by i. The window notation of π is π = [π1 π2 · · ·πn]. For example, the signed permutation π = 1 4 5 3 2 2 3 5 4 1 has the window notation [2 3 5 4 1]. Throughout this paper, if there is no danger of confusion, we simply write 2 35 4 1 instead of [2 3 5 4 1].

Let S±n denote the set of signed permutations of [±n] and SD

n ⊆ S±n denote the

set of signed permutations π with an even number of negatives among π1, . . . , πn. It is known [2] that Sn, S±

n and SDn are respectively combinatorial descriptions of the

Coxeter groups of types An, Bn and Dn. A variety of signed alternating permutationsare given as follows.

• Sn := {π ∈ S±n : π1 > π2 < π3 > π4 < · · ·},

• S0n := {π ∈ S±

n : π1 > 0 and π1 > π2 < π3 > π4 < · · ·},• Dn := {π ∈ SD

n : π1 + π2 < 0 and π1 > π2 < π3 > π4 < · · ·}.

Arnol’d [1] proved that En, S0n and Dn are equal to some maximum sets DJ as introduced

in Eq. (1.1) for W the Coxeter groups of types An, Bn and Dn, respectively. Therefore, the cardinalities of En, S0

n and Dn are the Springer numbers of types An, Bn and Dn, respectively. Arnol’d coined the term snakes to describe the (signed) alternating

28 H. Chang et al. / Advances in Applied Mathematics 59 (2014) 26–47

permutations in these sets. We call the elements in En, S0n and Dn snakes of types An,

Bn and Dn, respectively.There are other subsets of interest in addition to the above. Let S00

n consist of type Bn snakes with (−1)nπn < 0. Josuat-Vergès [5] investigated Sn, S0

n and S00n by relating

them with the successive derivatives of trigonometric functions and deduced many nice properties. Also in [6] it was proved that the cardinality of the set D̃n, consisting of signed permutations π with 0 < π1 < π2 > π3 < π4 > · · · , is the Springer number of type Dn.

Note that S00n ⊆ S0

n ⊆ Sn. We call the elements in Sn type Bn permutations and elements in Dn or D̃n type Dn permutations.

1.2. Valley-signed permutations

Inspired by noncommutative trigonometry, in [6] Josuat-Vergès et al. introduced a new combinatorial model called the valley-signed permutations. In the window notation, a signed permutation π ∈ S±

n is a valley-signed permutation (of type Bn) if for any i ∈ [n] such that πi < 0 one has either

(1) i ≥ 3, and πi−1 > 0, and |πi−2| > πi−1 < |πi|, or(2) i = 2, and 0 < π1 < |π2|.

A valley-signed permutation is of type Dn if it satisfies π1 < 0, π2 > 0, π2 < |π1| and for any i ≥ 3, πi < 0 implies that πi−1 > 0 and |πi−2| > πi−1 < |πi|. We respectively denote by VB

n and VDn the sets of valley-signed permutations of types Bn and Dn. For instance,

• VB3 = {1 2 3, 1 2 3, 1 3 2, 1 3 2, 2 1 3, 2 1 3, 2 3 1, 2 3 1, 3 1 2, 3 1 2, 3 2 1}, and

• VD3 = {2 1 3, 2 1 3, 3 1 2, 3 1 2, 3 2 1}.

It was proved in [6] that the cardinalities of VBn and VD

n are respectively the Springer numbers of types Bn and Dn.

1.3. Inversion and sign imbalance

An inversion of π ∈ Sn is a pair of indices (i, j) with i < j and πi > πj . Let

inv(π) :=∣∣{(i, j) ∈ [n] × [n] : i < j, πi > πj

}∣∣be the number of inversions in π. The sign imbalance I(S) of a set S ⊆ Sn is defined by

I(S) =∑π∈S

(−1)inv(π),

that is, the number of even permutations minus the number of odd permutations.

H. Chang et al. / Advances in Applied Mathematics 59 (2014) 26–47 29

The concept of sign imbalance appears naturally in combinatorics. It is a basic fact in algebra and combinatorics that I(Sn) = 0 when n ≥ 2. In some settings the sign-imbalance results are rather nontrivial. For example, for the set of 321-avoiding per-mutations Sn(321) Simion and Schmidt [11] proved that I(Sn(321)) = cn−1

2, a Catalan

number, if n is odd; Lam [7] and Sjöstrand [12] independently proved that I(Tn) = �n2 �,

where Tn is the set of permutations obtained by reading the entries of English-style stan-dard Young tableaux of n boxes as reading a book. Eu et al. [4] recently proved that for the set of simsun permutations Un one has I(U2n+1) = (2n − 1)!!, a double factorial number. It is worth noting here that the simsun permutations are another combinatorial model for the type An Springer numbers. The interested readers are referred to [4,7,11,10,12,13,16] for more examples. As for the alternating permutations (the snakes of type An), it is easy to prove that I(E2n) = (−1)n and I(E2n+1) = 0 for n ≥ 1, see [9]for example.

In the case of signed permutations, there are various ways to define the ‘inv’ statistic of π ∈ S±

n . We will consider the following in this paper.

(1) invo. The one-line inversion number of π is

invo(π) :=∣∣{(i, j) ∈ [±n] × [±n] : i < j, πi > πj

}∣∣.(2) invw. The window inversion number of π is

invw(π) :=∣∣{(i, j) ∈ [n] × [n] : i < j, πi > πj

}∣∣.(3) invB . The type B inversion number of π is

invB(π) := invw(π) −∑

i∈[n], πi<0

πi.

(4) invD. The type D inversion number of π is

invD(π) :=(

invw(π) −∑

i∈[n], πi<0

πi

)− neg(π),

where neg(π) = |Neg(π)| with Neg(π) = {i ∈ [n] : πi < 0}.

For example, for π = 3 2 4 1 5 we have invo(π) = 10, invw(π) = 3, invB(π) = 6, invD(π) = 4 and invs(π) = 3. The statistics invB and invD come from the theory of Coxeter group [2, Chapter 8]. They are equal to the length �(π) of π, the minimum number of generators needed to generate π.

30 H. Chang et al. / Advances in Applied Mathematics 59 (2014) 26–47

Table 1S0

3 and its imbalances.

π invo(π) invw(π) invB(π) invs(π)3 1 2 4 2 2 03 1 2 5 2 3 03 2 1 7 2 4 03 2 1 8 2 5 02 1 3 2 1 1 12 1 3 3 1 2 12 3 1 9 2 5 02 3 1 10 2 6 01 2 3 5 1 3 11 3 2 7 1 4 11 3 2 12 2 7 0

Io(S03) = −1 Iw(S0

3) = 3 IB(S03) = −1 Is(S0

3) = 3

Another interesting statistic comes from the inversion code. For a signed alternating permutation π = π1 π2 · · ·πn, its inversion code is the sequence (c1, c2, . . . , cn) such that

ci ={ |{(π2k, π2k+1) : 1 ≤ k ≤ (n− 1)/2, i < 2k, π2k < πi < π2k+1}| if n is odd;|{(π2k−1, π2k) : 1 ≤ k ≤ n/2, i < 2k − 1, π2k−1 > πi > π2k}| if n is even.

The inversion code is used to justify a bijection between the set of snakes S0n and a

certain set of weighted ballot paths [3]. We now define the invs.

(5) invs. The insertion inversion number of π is

invs(π) :=n∑

i=1ci(π),

where (c1, . . . , cn) is the inversion code of π.

It is called the insertion inversion because each ci counts the number of pairs (πh, πh+1)in which πi can be inserted so that 0 < i < h and πh < πi < πh+1 or πh > πi > πh+1depending on the parity of n. For example, invs(1 5 3 2 4 7 6) = 3 +1 +2 +1 +1 +0 +0 = 8and invs(1 5 3 2 4 6) = 2 + 1 + 1 + 1 + 0 + 0 = 5.

For S ⊆ S±n , the sign imbalances Io(S), Iw(S), IB(S), ID(S), and Is(S) are defined

accordingly. The main results of this paper are to compute the various sign imbalances of different classes of snakes, signed alternating permutations and valley-signed permu-tations.

1.4. An example

Here we take S03 as an example. The first column in Table 1 lists all 11 type B3 snakes

in S03 and the other columns respectively record the statistics invw, invo, invs, and invB .

The four sign imbalances are Io(S03) = −1, Iw(S0

3) = 3, IB(S03) = −1, and Is(S0

3) = 3.

H. Chang et al. / Advances in Applied Mathematics 59 (2014) 26–47 31

One may wonder that if there is a closed form for the generating function S(q) =∑π∈S qinv(π), then the sign imbalance is nothing but plugging q = −1 into S(q). However,

it seems not easy to obtain S(q) in our setting. We discuss this issue in the last section.In spite of this, it turns out that the imbalances investigated here all exhibit nice

patterns, and some of them are quite nontrivial. For examples, in Theorem 2.2 we shall prove that Iw(S0

2n−1) = (2n −1) and Iw(S02n) = (−1)n(2n +1) for n ≥ 1. In Theorem 3.2

we shall prove that Iw(D2n−1) = 3 − 2n and Iw(D2n) = (−1)n · 5·22n−6n−59 for n ≥ 1.

In Theorem 4.3, we shall prove that the absolute value of Iw(VB2n−1) is the Jacobsthal

number Jn+1 while Iw(VB2n) = (−1)n for n ≥ 1.

The rest of this paper is organized as follows. The sign imbalances of various subsets of type Bn permutations, including S0

n, Sn, and S00n , are collected in Section 2. In Section 3

we deal with Dn and D̃n, and in Sections 4 and 5 we respectively investigate VBn and VD

n .

2. Type Bn permutations

Recall that S00n ⊆ S0

n ⊆ Sn. Our strategy is to pair off two permutations by exchanging the largest (or smallest) two terms.

2.1. Window inversion

We call each πi a term for π = π1 · · ·πn ∈ S±n in its window notation. Let

〈j1〉〈j2〉 · · · 〈jn〉 be the order relation of π, where πi is the ji-th smallest term in {π1, π2, . . . , πn} with respect to the linear order n < · · · < 1 < 1 < · · · < n. For example, the order relation of 3 4 2 5 1 is 〈5〉〈2〉〈4〉〈1〉〈3〉.

For 1 ≤ i < j ≤ n, let α�i,j (resp., αs

i,j) be the operator acting on π by exchanging the largest (resp., smallest) two terms among πi, πi+1, . . . , πj . It is obvious that α�

i,j

and αsi,j are involutions. Denote α�

1,n and αs1,n by α� and αs, respectively. For example,

if π = 3 5 6 1 2 4, then α�3,6(π) = 3 5 2 1 6 4 and αs

3,6(π) = 3 5 6 4 2 1. The proof of the following lemma is omitted.

Lemma 2.1. For π ∈ S±n , invw(π) and invw(α�

i,j(π)) (or invw(αsi,j(π))) are of different

parity.

It is worth noting that the sign imbalance of En can be easily obtained by Lemma 2.1. More precisely, if n is odd, all snakes can be paired off by α�; and, if n is even, all snakes can be paired off by α�, α�

1,n−2, . . . , α�1,4 step by step with only one exception:

2 1 4 3 · · ·n (n − 1). We are ready for the following result.

Theorem 2.2. Let n ≥ 1. We have

(1) Iw(S1) = 2, Iw(Sn) = (−1)n2 2n if n is even and Iw(Sn) = 0 if n ≥ 3 is odd.

(2) Iw(S0n) = (−1)n

2 (n + 1) if n is even and Iw(S0n) = n if n is odd.

(3) Iw(S001 ) = 1, Iw(S00

2 ) = −2 and Iw(S00n ) = 0 for all n ≥ 3.

32 H. Chang et al. / Advances in Applied Mathematics 59 (2014) 26–47

Proof. The case n = 1 is trivial and we assume that n ≥ 2.(1) Suppose that n is odd. For π ∈ Sn, the largest two terms of π are not adjacent in

position and α�(π) ∈ Sn. Hence Iw(Sn) = 0 by Lemma 2.1.Suppose that n is even. We have Iw(Sn) = Iw(S), where S ⊂ Sn is the set of permuta-

tions whose largest two terms are adjacent. The largest two terms of π ∈ S must be πn−1and πn, and α�

1,n−2(π) ∈ S if the third and fourth largest terms of π are not adjacent. By Lemma 2.1, permutations in S are paired off by α�

1,n−2 except for those whose largest two terms among π1, . . . , πn−2 are πn−3 and πn−2. By continuing the argument, per-mutations are paired off except for those with order relation 〈2〉〈1〉〈4〉〈3〉 · · · 〈n〉〈n − 1〉. There are 2n of these and each has n2 window inversions, hence Iw(Sn) = (−1)n

2 2n.(2) Suppose that n is odd. The largest two terms are not adjacent and α�(π) ∈ S0

n if and only if π has at least two positive terms. Let S ⊂ S0

n be the set of snakes π with πi < 0 for all i ≥ 2. Then we have Iw(S0

n) = Iw(S). Let Sk = {π ∈ S : π1 = k}. Then {π2 π3 · · ·πn : π = π1 · · ·πn ∈ Sk} is the set of (type A) alternating permutations of [n] \ {k}. Now

Iw(Sk) = (−1)(n2)I(En−1) = (−1)

(n2)+n−1

2 = 1

since invw(π) =(n2)− inv(π2 π3 · · ·πn) for π ∈ S. Hence Iw(S0

n) =∑n

k=1 Iw(Sk) = n.Suppose that n is even. We have Iw(S0

n) = Iw(S), where S ⊂ S0n is the set of snakes

whose smallest two terms are π1, π2. Now αs3,n(π) ∈ S for π ∈ S except for those with

π3, π4 being the smallest two terms among π3 · · ·πn. By continuing this argument, all snakes are paired off except for those having the order relation 〈2〉〈1〉 · · · 〈n〉〈n − 1〉. If π2 > 0, then π = 2 1 4 3 · · ·n (n − 1). If π2 < 0, then each such snake is determined by the choice of π2 and there are n + 1 of them. Note that each has n2 window inversions, thus Iw(S0

n) = (−1)n2 (n + 1).

(3) Iw(S002 ) = Iw({1 2, 2 1}) = −2 and we assume that n ≥ 3. If π ∈ S00

n has at least two positive terms, then π and α�(π) are paired off. The remaining permutations all have at least two negative terms and can be paired off by αs. Hence we complete the proof. �2.2. Type B inversion

For t ∈ [n] we define an operator βt on π ∈ S±n by changing the sign of t and t. For

S ∈ S±n , let βt(S) = {βt(π) : π ∈ S}. It is easy to see that βt is an involution and

invB(π) and invB(β1(π)) are of different parity.Since invB(π) = invw(π) −

∑πi<0 πi, it is clear that if the pair (π, α�(π)) or (π, αs(π))

has no contribution to Iw(S), then it has no contribution to IB(S) either.

Theorem 2.3. We have

(1) IB(Sn) = 0 for n ≥ 1.

H. Chang et al. / Advances in Applied Mathematics 59 (2014) 26–47 33

(2) IB(S0n) = (−1)�n

2 � for n ≥ 1.(3) IB(S00

1 ) = 1, IB(S00n ) = 0 for n ≥ 2.

Proof. The case (1) for n odd and (3) are easily derived from Theorem 2.2. For the even case of (1), the remaining 2n permutations in the proof of Theorem 2.2(1) can be paired off by β1.

We now consider (2). Following the proof of Theorem 2.2(2), if n is odd, we have

IB(Sk) = (−1)(n2)+(1+2+···+n)−kI(En−1) = (−1)

(n2)+(n+1

2)−k+n−1

2 ,

where Sk = {π ∈ S : π1 = k} and S is the set of type Bn snakes with πi < 0 for i ≥ 2. Hence IB(S0

n) = IB(S) =∑n

k=1 IB(Sk) = (−1)n−12 .

If n is even, we have IB(S0n) = IB(S) where S ⊂ S0

n is the set of snakes with order relation 〈2〉〈1〉〈4〉〈3〉 · · · 〈n〉〈n − 1〉 and each has n2 window inversions. Hence IB(S0

n) =(−1)n

2∑n

k=0(−1)k = (−1)n2 , where k = 0 corresponds to the snake 2 1 4 3 · · ·n (n − 1)

and k > 0 runs through all possible values of −π2. �2.3. Insertion inversion

The proof of the following lemma is omitted.

Lemma 2.4. For π ∈ Sn, invs(π) and invs(α�(π)) (or invs(αs(π))) are of different parity.

Theorem 2.5. Let n ≥ 3.

(1) Is(Sn) = 2n if n is even, and I(Sn) = 0 if n is odd.(2) Is(S0

n) = n + 1 if n is even, and I(S0n) = n if n is odd.

(3) Is(S00n ) = 0.

Proof. By Lemma 2.4 and the proof to Theorem 2.2, we have Is(Sn) = 0 when n is odd and Is(S00

n ) = 0. For the case S0n with n odd, following the proof for computing Iw(S0

n)we have Is(S0

n) = Is(S) =∑n

k=1 Is(Sk) and Is(Sk) = Is(En−1). By Lemma 2.4 and the argument of computing I(En) in Section 2.1, Is(En−1) = Is({2 1 4 3 · · · (n − 1)(n −2)}) = 1 and thus Is(S0

n) = n.We now consider (1) and (2) for n even. Again, following the proof of Theorem 2.2, the

remaining permutations for both cases are with order relation 〈2〉〈1〉〈4〉〈3〉 · · · 〈n〉〈n −1〉, each of which has an even number of insertion inversions. This completes the proof. �2.4. One-line inversion

Recall that βt is an involution on π ∈ S±n . By viewing the one-line notation of π as

a permutation on [±n], βt turns out to be a transposition. This implies the following lemma.

34 H. Chang et al. / Advances in Applied Mathematics 59 (2014) 26–47

Lemma 2.6. For π ∈ S±n and t ∈ [n], invo(π) and invo(βt(π)) are of different parity.

Lemma 2.7. For π ∈ S±n , invo(π) and neg(π) are of the same parity.

Proof. It is true for π with neg(π) = 0. The signed permutations can be obtained by changing the sign of some terms of permutations π with neg(π) = 0. Observe that βt changes invo by an odd number and neg by 1. Therefore, it is true for all signed permutations. �Theorem 2.8. We have

(1) Io(Sn) = 0,(2) Io(S0

n) = (−1)�n2 � for n ≥ 1,

(3) Io(S00n ) = (−1)�n

2 �2n−1 for n ≥ 1.

Proof. (1) It is clear that β1(π) ∈ Sn for π ∈ Sn, hence Io(Sn) = 0 by Lemma 2.6.(2) For π ∈ S0

n, we have β1(π) ∈ S0n if π1 �= 1. By Lemma 2.6, Io(S0

n) = Io(S) where S ⊂ S0

n is the set of permutations with π1 = 1. Next, for π ∈ S, β2(π) ∈ S if π2 �= 2. Again by Lemma 2.6, Io(S0

n) = I0(S ′) where S ′ ⊂ S0n is the set of permutations with

π1 = 1 and π2 = 2. Continuing this argument, we have Io(S0n) = Io({1 2 3 4 5 · · ·n})

(resp., Io({1 2 3 4 5 · · ·n})) if n is odd (resp., even). Hence Io(S0n) = (−1)�n

2 �.(3) A permutation π ∈ Sn is top-connected if for 1 ≤ t ≤ n, the largest t terms of π

form an interval (a contiguous set of terms) in π. For example, 3 5 4 2 1 is top-connected and 5 3 4 2 1 is not. A signed permutation π ∈ S±

n is signed top-connected if (i) πi > 0 if and only if i is odd, and (ii) |π| := |π1||π2| . . . |πn| is top-connected. Denote by Tn and T ±

n

respectively the sets of top-connected and signed top-connected permutations of length nand it is easy to see that |T ±

n | = |Tn| = 2n−1. For example, T ±3 = {1 2 3, 1 3 2, 2 3 1, 3 2 1}.

Following the proof of (2), one can see that Io(S00n ) = Io(T ±

n ) and hence it remains to show that for π ∈ T ±

n one must have

(−1)invo(π) = (−1)�n2 �,

which can be done by Lemma 2.7. �3. Type Dn permutations

In this section we consider Dn (type Dn snakes) and D̃n (type Dn alternating per-mutations).

3.1. Type Dn snakes

Each π ∈ Dn has an even number of negative terms, and thus by Lemma 2.7 we have the following sign imbalance of Dn.

H. Chang et al. / Advances in Applied Mathematics 59 (2014) 26–47 35

Theorem 3.1. Io(Dn) = |Dn| for all n ≥ 1.

Next we consider the window inversions.

Theorem 3.2. We have Iw(Dn) = 2 − n if n is odd and

Iw(Dn) = (−1)n2

5 · 2n − 3n− 59

if n is even.

Proof. (1) Suppose that n is odd. For π ∈ Dn with at least three positive terms, π′ :=α�

2,n(π) is also in Dn. Then π and π′ are paired off by Lemma 2.1. Therefore Iw(Dn) =Iw(S), where S is the set of snakes in Dn with exactly one positive term. We partition S into disjoint sets S1, . . . , SN , where N = n+1

2 and Si = {π ∈ S : π2i−1 > 0}.We look at S1 first. By applying α�

2,n, α�4,n, . . . in order we can pair off snakes except

for those with the order relation

〈n〉〈n− 2〉〈n− 1〉 · · · 〈3〉〈4〉〈1〉〈2〉.

Since π1 + π2 < 0, there are only two such snakes, namely 1 3 2 5 4 · · ·nn− 1 and 2 3 1 5 4 · · ·nn− 1. Hence Iw(S1) = 2.

Fix i ≥ 2. We will pair off the snakes in Si step by step. The first step is to exchange the two largest terms among negative terms. In this way we can pair off snakes except for those with order relation either

· · · 〈n− 1〉〈n− 2〉〈n〉 · · · or · · · 〈n〉〈n− 2〉〈n− 1〉 · · · .

We say the relative orders of these three terms are determined. Note that in the above expression 〈n〉 is in fact π2i−1.

Next we exchange the two largest terms among those terms whose relative orders are not yet determined, and after each step we can locate the relative order of two additional terms neighboring to the determined ones. By continuing the process the order relation of the snakes left can be determined completely.

For example, for n = 7, i = 2, after the first step, the unpaired snakes are of the order relations either 〈6〉〈5〉〈7〉〈·〉〈·〉〈·〉〈·〉 or 〈·〉〈·〉〈7〉〈5〉〈6〉〈·〉〈·〉. After the second step, the unpaired snakes are of the order relations 〈6〉〈5〉〈7〉〈3〉〈4〉〈·〉〈·〉, 〈4〉〈3〉〈7〉〈5〉〈6〉〈·〉〈·〉or 〈·〉〈·〉〈7〉〈5〉〈6〉〈3〉〈4〉. After the third step, the unpaired snakes are of the order relations

〈6〉〈5〉〈7〉〈3〉〈4〉〈1〉〈2〉, 〈4〉〈3〉〈7〉〈5〉〈6〉〈1〉〈2〉, or 〈2〉〈1〉〈7〉〈5〉〈6〉〈3〉〈4〉.

Eventually, there are

(N − 1)! =(N − 1

)

(N − i)!(i− 1)! i− 1

36 H. Chang et al. / Advances in Applied Mathematics 59 (2014) 26–47

possible order relations left. For each order relation, there are n choices for the unique positive term ‘〈n〉’ and only one choice for the rest. It is easy to see that each snake contributes (−1)i−1 to Iw(Si). Therefore,

Iw(Dn) =N∑i=1

Iw(Si) = 2 +N∑i=2

(−1)i−1n

(N − 1i− 1

)= 2 − n.

(2) Suppose that n is even. Let Dn = D+n D−

n , where D+n and D−

n respectively denote the sets of snakes with π1 > 0 and π1 < 0. We compute Iw(D−

n ) first. Start with D−

n and apply αs1,n, αs

3,n, . . . in order. The set of remaining snakes B consists of those with the order relation 〈2〉〈1〉〈4〉〈3〉 · · · 〈n〉〈n −1〉, each of which has n2 window inversions.

Partition B into disjoint sets B1, B2, . . . , Bn−1, where Bi consists of those snakes with π1 = −i. For each π ∈ Bi, there are n − i choices for π2 and the rest n − 2 terms belong to

{±1,±2, . . . ,±(i− 1)

}∪ {i + 1, i + 2, . . . , n} \

{|π2|

}.

Since there are even number of negatives,

|Bi| = (n− i) ·((

i− 10

)+

(i− 1

2

)+ · · ·

).

Therefore, |B1| = n − 1 and |Bi| = 2i−2(n − i) for all i ≥ 2. Thus,

Iw(D−

n

)=

n−1∑i=1

Iw(Bi) = (−1)n2

((n− 1) +

n−1∑i=2

2i−2(n− i)). (3.1)

For π ∈ D+n , αs(π) ∈ D+

n if π2 is not one of the two smallest terms, or π2 is one of them while the other plus π1 is negative. Therefore, after applying αs on D+

n , the unpaired snakes have π2 < πi and π1 + πi > 0 for all i ≥ 3.

By applying αs3,n, α

s5,n, . . . in order on the above unpaired snakes we can pair off snakes

further except for those in the set A, where

A ={π ∈ D+

n : π1 + πi > 0 for all i ≥ 3, andπ2 · · ·πn has the order relation 〈1〉〈3〉〈2〉〈5〉〈4〉 · · · 〈n− 1〉〈n− 2〉

}.

Similar to the arguments above, we have A1 = ∅ and |Ai| = |Bi| for 2 ≤ i ≤ n − 1, where Ai = {π ∈ A : π1 = i}. Each snake in Ai has n2 + i − 1 window inversions, hence

Iw(D+

n

)=

n−1∑Iw(Ai) =

n−1∑(−1)n

2 +i−1 · 2i−2(n− i). (3.2)

i=1 i=2

H. Chang et al. / Advances in Applied Mathematics 59 (2014) 26–47 37

Combining Eqs. (3.1) and (3.2), we have

Iw(Dn) = Iw(D+

n

)+ Iw

(D−

n

)= (−1)n

25 · 2n − 3n− 5

9 . �Similar to the argument in Theorem 3.2 we can prove the following. The proof is

omitted.

Theorem 3.3. We have Is(Dn) = 2 − n if n is odd and 5·2n−3n−59 if n is even.

We will use the proof of Theorem 3.2 to compute type D sign imbalances.

Theorem 3.4. ID(D1) = 1 and ID(Dn) = (−1)�n2 �+1 for n ≥ 2.

Proof. We only prove the case for n odd as the even case can be dealt with in the same way. Notice that for π′ = α�

i,j(π) or αsi,j(π), if (−1)invw(π) + (−1)invw(π′) = 0, then

(−1)invD(π) + (−1)invD(π′) = 0. Therefore, following the proof of Theorem 3.2, we have ID(Dn) =

∑Ni=1 ID(Si), where Si = {π ∈ Dn : πk > 0 if and only if k = 2i − 1}.

Continuing to follow the proof of Theorem 3.2, we have

ID(S1) = ID({1 3 2 · · ·nn− 1, 2 3 1 · · ·nn− 1}

)= 0

and for i ≥ 2, the unpaired snakes in Si can be partitioned into (N−1i−1

)classes according to

their order relations, where each class consists of n snakes. Let π be any of the unpaired snakes in Si. Observe that

invD(π) = i− 1 +(n(n + 1)

2 − π2i−1

)− (n− 1) = i +

(N − 1i− 1

)− π2i−1.

Therefore, we can continue to pair off the snakes in each class according to the parity of π2i−1, and suppose the remaining snake π has π2i−1 = 1. This implies that

ID(Si) =(N − 1i− 1

)(−1)invD(π) =

(N − 1i− 1

)(−1)i−1+n−1

2 .

Hence we have

ID(Dn) =N∑i=1

ID(Si) = (−1)n−1

2

N∑i=2

(−1)i−1(N − 1i− 1

)= (−1)

n+12 = (−1)�n

2 �+1. �

3.2. Type Dn alternating permutations

Now we use imbalances of Sn and S0n to derive the imbalance of type Dn alternating

permutations.

38 H. Chang et al. / Advances in Applied Mathematics 59 (2014) 26–47

For a set S of signed permutations, denote S := {π : π ∈ S}, where πi = πi for 1 ≤ i ≤ n. By the definition of D̃n, it can be easily checked that

D̃n = Sn \ S0n. (3.3)

Theorem 3.5. Let n ≥ 1. We have the following.

(1) Io(D̃n) = (−1)�n−12 �.

(2) Iw(D̃1) = 1. Iw(D̃n) = 2n − n − 1 if n is even, and Iw(D̃n) = (−1)n+12 n if n ≥ 3 is

odd.(3) For n ≥ 3, Is(D̃n) = 2n − n − 1 if n is even, and Is(D̃n) = −n if n is odd.(4) ID(D̃1) = 1 and ID(D̃n) = (−1)�n

2 �+1 for n ≥ 2.

Proof. (1) For π ∈ D̃n, invo(π) = n2 + 2(n2)− invo(π). Then the result follows from

Theorem 2.8 and Eq. (3.3).(2) For π ∈ D̃n, invw(π) =

(n2)− invw(π). Then the result follows from Theorem 2.2

and Eq. (3.3).(3) For π ∈ D̃n, invs(π) = invs(π). Then the result follows from Theorem 2.5 and

Eq. (3.3).(4) ID(D̃1) = 1 is trivial, so we assume that n ≥ 2. For π ∈ D̃n,

invD(π) = invw(π) − neg(π) −∑

i∈[n], πi<0

πi

=(n

2

)− invw(π) − n + neg(π) −

(n + 1

2

)+

∑i∈[n], πi<0

πi

= 2n− invD(π),

which implies that invD(π) and invD(π) are of the same parity. Then we have

ID(D̃n) = ID(Sn) − ID(S0n

)= ID(Sn) − ID

(S0n

).

Notice that if the pair (π, π′) has no contribution to Iw(Sn) (resp., Iw(S0n)), where

π′ = α�i,j(π) or αs

i,j(π), then it has no contribution to ID(Sn) (resp., ID(S0n)). By slightly

adjusting the proof of Theorem 2.3, one has ID(Sn) = IB(Sn) and ID(S0n) = IB(S0

n). Hence the result follows. �4. Valley-signed permutations of type Bn

In this section we consider the imbalances of valley-signed permutations of type Bn. The highlight of the results is Theorem 4.3, which states that Iw(VB

n ) is a signed Jacob-sthal number.

H. Chang et al. / Advances in Applied Mathematics 59 (2014) 26–47 39

4.1. Imbalances in the one-line notation

We first describe how to construct the set of valley-signed permutations VBn from Sn.

For π = π1π2 · · ·πn ∈ Sn, we say πi is a valley if πi−1 > πi < πi+1, with the convention π0 = n + 1 and πn+1 = 0. We say πi+1 is a changeable position if πi is a valley. From the definition of VB

n , it can be seen that each valley-signed permutation can be obtained by putting minus signs on some of the changeable positions of π ∈ Sn. For example, one can produce 8 valley-signed permutations from the permutation 2 8 7 5 1 9 3 4 6, since 8, 9, 4 are changeable. For convenience, we call |π| := |π1| |π2| · · · |πn| the underlying permutation of π.

Given a signed permutation π, for 1 ≤ t ≤ n, let

χπ(t) ={

1, if t appears in π,

0, if t appears in π.

Note that χπ(1) = 0 for every valley-signed permutation π and neg(π) =∑n

t=1 χπ(t). For any π ∈ VB

n with χπ(t) = 1, it is easy to see from the definition of valley-signed permutations that βt(π) is also in VB

n ; hence by Lemma 2.6, π and βt(π) are of different parity and thus can be paired off when computing Io(VB

n ). This observation leads us to the following result.

Theorem 4.1. Io(VBn ) = 1 for n ≥ 1.

Proof. We first partition elements of VBn into some classes according to their underlying

permutations. Let S be one of these classes. Applying the observation preceding the theorem, Io(S) = 0 if its associated underlying permutation has at least one changeable position. More precisely, the valley-signed permutations having an odd number of nega-tives are paired off with those having an even number of negatives. Hence we reduce VB

n

to the class whose associated underlying permutation has no changeable positions. Such a class consists of only one element, namely n · · · 3 2 1. So Io(VB

n ) = 1. �4.2. Imbalances in the window notation

We need some preparation. For π ∈ VBn we define its partition f1f2 · · · using the

following steps.

(1) If π2 < 0, then π1 connects to π2.(2) For any i ≥ 3, if πi < 0, then πi−2 connects to πi−1 and πi−1 connects to πi.(3) Label the connected components left to right by f1, f2, . . . by requiring that the size

of f1 is even. If the size of the first component is odd, then define f1 = ∅.

The partition of π can be illustrated by its shape, which is a zig-zag broken line defined as follows. Draw from left to right n nodes labeled by π1, . . . , πn so that πi is northeast

40 H. Chang et al. / Advances in Applied Mathematics 59 (2014) 26–47

Fig. 1. The shape of 2 8 7 5 1 9 3 4 6.

of πi−1 if |πi| > |πi−1|, or southeast otherwise, and then connect node πi−1 and node πi

by a straight line if πi−1 connects to πi in the partition of π.For example, π = 2 8 7 5 1 9 3 4 6 is split into f1 = 2 8, f2 = 7, f3 = 5 1 9 3 4 and f4 = 6,

see Fig. 1 for its shape. For π = 7 2 8 5 1 9 3 4 6, then f1 = ∅, f2 = 7 2 8, f3 = 5 1 9 3 4 and f4 = 6. Define �(fi) to be the number of terms in fi. Notice that �(f1) is even and �(fi) is odd for i ≥ 2, and in f1 one has a1 < |a2| > a3 < · · · < |a�(f1)| while in other connected components one has a1 > a2 < |a3| > a4 < · · · < |a�(fi)| if the terms of a component are a1, a2, . . . , a�(fi).

Let VBn (k) := {π ∈ VB

n : neg(π) = k}. The following equation is obvious.

Iw(VB

n

)=

�n2 �∑

k=0

Iw(VB

n (k)). (4.1)

Lemma 4.2. For 0 ≤ k ≤ �n2 � − 1, Iw(VB

n (k)) = 0.

Proof. Let f1f2 · · · ft be the partition of π ∈ VBn (k). If t ≤ 2, then π has at least

�(f1)2 + � �(f2)−1

2 � ≥ n−12 negatives, which is a contradiction. Hence t ≥ 3 and π has at

least two odd connected components, especially ft−1 and ft. Then f1f2 · · · ft−2ftft−1 is the partition of some valley-signed permutation π′ in VB

n (k). Furthermore, invw(π) and invw(π′) are of different parity and we are done. �

We are ready for the main result in this section.

Theorem 4.3. If n is even, then Iw(VBn ) = (−1)n

2 . If n is odd, then

Iw(VB

n

)= (−1)

n+32 Jn+3

2,

where Jn is the Jacobsthal number, defined by J0 = 0, J1 = 1 and Jn = 2Jn−1 − (−1)n.

Proof. Firstly, by Eq. (4.1) and Lemma 4.2, we have

Iw(VB

n

)=

{Iw(VB

2m(m)) if n = 2m;Iw(VB

2m+1(m)) if n = 2m + 1.

Suppose that n = 2m. For any π ∈ VB2m(m), Neg(π) = {2, 4, . . . , 2m} and χπ(n) = 1.

If χπ(n − 1) = 1, then αs(π) ∈ VB2m(m) and can be paired off with π. The remaining

H. Chang et al. / Advances in Applied Mathematics 59 (2014) 26–47 41

Table 2List of Iw(n, e) for n ≤ 13.

n 1 3 5 7 9 11 13Iw(n, 0) 1 −2 2 −2 2 −2 2Iw(n, 2) −1 2 −4 6 −8 10Iw(n, 4) 1 −4 8 −14 22Iw(n, 6) −1 4 −12 26Iw(n, 8) 1 −6 18Iw(n, 10) −1 6Iw(n, 12) 1

Iw(VBn ) 1 −3 5 −11 21 −43 85

valley-signed permutations have χπ(n) = 1 and χπ(n − 1) = 0, thus π1 = n − 1, π2 = n. Let S be the set of these permutations and σ ∈ S. If χσ(n − 2) = χσ(n − 3) = 1, then αs

3,n(σ) ∈ S and can be paired off with σ. By applying αs5,n, α

s7,n, . . . in order, all

permutations can be paired off except for the one

(n− 1)n (n− 3)n− 2 · · · 3 4 1 2.

Therefore, Iw(VB2m(m)) = (−1)m.

Next, we consider the case n = 2m + 1. Let π ∈ VB2m+1(m). There are m negatives

in π, so there are m +1 kinds of Neg(π): {2, 4, . . . , 2m −2, 2m}, {2, 4, . . . , 2m −2, 2m +1}, · · · , {3, 5, . . . , 2m − 1, 2m + 1}. Hence the partition of π must be π = f1f2, where �(f1)could be 2m, 2m − 2, . . . , or 0. Let

V2m+1,e :={π ∈ VB

2m+1(m) : �(f1) = e}.

For example, V1,0 = {1}, V3,1 = {3 1 2, 2 1 3}, and V3,2 = {2 3 1, 1 2 3, 1 3 2}.In what follows, we denote Iw(V2m+1,e) by Iw(n, e). Table 2 lists the value Iw(n, e) for

some small n. For convenience’ sake, let Iw(n, e) = 0 if e is odd. The first two columns are easily derived, and Iw(VB

3 ) = −2Iw(VB1 ) − 1.

We will show that the following four properties hold for n ≥ 5 by induction on n.

(i) Iw(n, 0) = −Iw(n − 2, 0).(ii) Iw(n, e) = −Iw(n − 2, e) − Iw(n − 2, e − 2) for 2 ≤ e ≤ n − 5.(iii) Iw(n, n − 3) = −Iw(n − 2, n − 3) − Iw(n − 2, n − 5) − 1.(iv) Iw(n, n − 1) = −Iw(n − 2, n − 3).

Then, from (i) to (iv) we have

Iw(VB

n

)=

n−1∑e=0

Iw(n, e)

= −Iw(n− 2, 0) −(

n−3∑Iw(n− 2, e) + Iw(n− 2, e− 2)

)

e=2

42 H. Chang et al. / Advances in Applied Mathematics 59 (2014) 26–47

Fig. 2. The possible shapes of a remaining permutation in (ii).

Fig. 3. The shape of a remaining permutation in C′.

− 1 − Iw(n− 2, n− 3)

= −2(

n−3∑e=0

Iw(n− 2, e))

− 1 = −2(Iw

(VB

n−2))

− 1.

Hence the proof is completed from the initial values Iw(VB1 ) = 1 and Iw(VB

3 ) = −3.Now we prove the four properties above.

Proof of (i). Let π ∈ Vn,0. In this case, Neg(π) = {3, 5, . . . , n} and χπ(1) = 0. Assume that χπ(2) = 0. If 1 and 2 are not adjacent, then π′, obtained from π by exchanging 1and 2, is in Vn,0 and can be paired off with π.

If 1 and 2 are adjacent (i.e., π1 = 2 and π2 = 1), then χπ(n) = χπ(n −1) = 1 and thus π is paired off with αs(π). Therefore, it remains to consider the set S of the remaining permutations π with χπ(2) = 1.

It is clear that πn−1 = 1 and πn = 2 for any π ∈ S. There is a natural bijection φ : S → Vn−2,0 defined by φ(π) = πi − 2 if πi > 0 and φ(π) = πi + 2 if πi < 0, for 1 ≤ i ≤ n − 2. For example, φ(5463712) = 32415. Then invw(π) and invw(φ(π)) are of different parity and hence

Iw(n, 0) = Iw(S) = −Iw(n− 2, 0).

Proof of (ii). Similar to (i), permutations with χπ(2) = 0 and adjacent 1, 2 can be paired off. There are three types of the remaining permutations π: (a) πn−1 = 1 and πn = 2; (b) πe−1 = 1 and πe = 2; and (c) πe+1 = 2 and πe+2 = 1. Fig. 2 illustrates the shapes of a permutation in each case. Denote these three sets of permutations by A, B and C, respectively. By bijections similar to φ, sets A and B can be mapped with Vn−2,e and Vn−2,e−2, respectively. Thus Iw(A) = −Iw(n − 2, e) and Iw(B) = −Iw(n − 2, e − 2).

Let π ∈ C. In this case, Neg(π) = {2, 4, . . . , e, e + 3, e + 5, . . . , n} for some even e with 2 ≤ e ≤ n − 5. There are at least two negatives in {πi : e +3 ≤ i ≤ n}. Again, αs

e+3,n(π)is in C and can be paired off with π. Therefore, Iw(C) = 0.

Proof of (iii). Following the proof of (ii), it suffices to consider the set C′ of the remaining permutations π with πn−2 = 2 and πn−1 = 1 (see Fig. 3 for the shape of π). By the same argument used in the even n case, all permutations in C′ can be paired off except for

H. Chang et al. / Advances in Applied Mathematics 59 (2014) 26–47 43

(n − 1) n (n − 3) n− 2 · · · 4 5 2 1 3, which has an odd number of window inversions. Thus Iw(C′) = −1.

Proof of (iv). Let π ∈ Vn,n−1. Now any two positives in π are not adjacent. If χπ(1) =χπ(2) = 0, by exchanging 1 and 2 we obtain a valley-signed permutation which can be paired off with π. If χπ(1) = 0 and χπ(2) = 1, we may follow the argument in the case (b) of (ii). Thus,

Iw(n, n− 1) = −Iw(n− 2, n− 3). �Remark. The explicit formula for the Jacobsthal number is Jn = 2n+(−1)n−1

3 . See A001045 in [8] for reference.

Next we consider the type B imbalance.

Theorem 4.4. We have IB(VBn ) = (−1)�n

2 � for n ≥ 1.

Proof. Let π ∈ VBn . Note that, if π′ is obtained from π by exchanging some two terms

and π and π′ are paired off when computing Iw, so do they when computing IB.The case of even n is trivial by following the proof of Theorem 4.3. As for odd n, we

only need to replace the property (iii) in the proof of Theorem 4.3 by

(iii)′ IB(n, n− 3) = −IB(n− 2, n− 3) − IB(n− 2, n− 5) + (−1)n+1

2

with initial values IB(1, 0) = 1 and IB(3, 0) = 0, where IB(n, e) := IB(V2m+1,e). The details are omitted. Therefore, we have

IB(VB

n

)= −2IB

(VB

n−2)

+ (−1)n+1

2

and the result follows. �5. Valley-signed permutations of type Dn

We first describe how to generate VDn from some subset of Sn as we did at the

beginning of the previous section. Let S be composed of permutations π ∈ Sn having π1 > π2. From the definition of VD

n , each valley-signed permutation of type Dn can be obtained by putting minus sign on π1 and some of the changeable positions of π ∈ S.

The computation of Io(VDn ) can be done by the argument of computing Io(VB

n ) in Theorem 4.1. Here the unique remaining permutation is

n (n− 1) (n− 2) · · · 4 3 2 1

and the proof is omitted.

44 H. Chang et al. / Advances in Applied Mathematics 59 (2014) 26–47

Theorem 5.1. Io(VDn ) = −1 for all n ≥ 1.

The argument for computing Iw(VDn ) is similar to that of Iw(VB

n ). As in the beginning of Section 4.2, we define the partition f1f2 · · · of π ∈ VD

n by steps (1)–(3) except that the size of f1 is allowed to be odd. In fact, from the definition of VD

n , �(fi) is odd for i ≥ 1.

Let VDn (m) = {π ∈ VD

n : neg(π) = m}. Since there are at most �n2 � negatives in

π ∈ VDn , we have

Iw(VD

n

)=

�n2 ∑

m=1Iw

(VD

n (m)). (5.1)

Analogous to Lemma 4.2, one can check that

Iw(VD

n (m))

= 0 for m = 1, 2, . . . ,⌊n

2

⌋− 1. (5.2)

Theorem 5.2. If n is even, then Iw(VDn ) = (−1)n

2 −1; if n is odd, then

Iw(VD

n

)= Iw

(VB

n

)+ (−1)

n−12 · 2

= (−1)n+1

2 Jn+32

+ (−1)n−1

2 · 2.

Proof. By Eqs. (5.1) and (5.2), we have

Iw(VD

n

)=

{Iw(VD

n (m)) if n = 2m;Iw(VD

n (m)) + Iw(VDn (m + 1)) if n = 2m + 1.

We first consider the case n = 2m. Assume that m ≥ 2 as m = 1 is trivial. For any π ∈ VD

n (m), Neg(π) = {1, 3, 5, . . . , 2m − 1} or {1, 4, 6, . . . , 2m}. Permutations in the former class can be paired off by applying αs. Permutations in the latter class can be dealt with as in the proof for the even case of Theorem 4.3. The unique remaining permutation is

n (n− 1) (n− 3)n− 2 (n− 5)n− 4 · · · 1 2,

and the sign imbalance is (−1)m−1.Now we consider the case n = 2m + 1. We will prove

Iw(VD

n

)= −Iw

(VB

n

)+ (−1)

n−12 · 2

by induction. Note that the case n = 1 is trivially true.First of all, observe that Iw(VD

n (m + 1)) = 0 by applying the operator αs, so it suffices to consider that there are exactly m negatives. Let S be the set of permutations

H. Chang et al. / Advances in Applied Mathematics 59 (2014) 26–47 45

Table 3List of I′

w(n, e) for 3 ≤ n ≤ 13.

n 3 5 7 9 11 13I′w(n, 1) 1 −2 4 −6 8 −10

I′w(n, 3) −1 4 −8 14 −22

I′w(n, 5) 1 −4 12 −26

I′w(n, 7) −1 6 −18

I′w(n, 9) 1 −6

I′w(n, 11) −1

Iw(VDn ) 1 −3 9 −19 41 −83

π ∈ VDn (m) with π3 < 0. Consider the subset S ′ = {π ∈ S : π1 = a, π2 = b, π3 = c} for

some fixed a < 0, b > 0, c < 0. The subword π4π5 · · ·π2m+1 of π ∈ S ′ can be viewed as a type Bn valley-signed permutation on [±n] \ {±a, ±b, ±c} with m − 2 negatives. By the argument in the proof of Lemma 4.2, Iw(S ′) = 0 for every fixed a, b, c, hence Iw(S) = 0.

Now π3 > 0 and there are m negatives, it suffices to consider the following m kinds of Neg:

{1, 5, 7, 9, . . . , 2m + 1}, {1, 4, 7, 9, . . . , 2m + 1}, . . . , {1, 4, 6, 8, . . . , 2m}.

The partition of π must be π = f1f2f3, where �(f1) = 1 and 1 ≤ �(f2) ≤ 2m − 1 is an odd number. Let

VDn,e :=

{π ∈ VD

n (m) \ S : �(f2) = e}.

For example, VD3,1 = {2 1 3, 3 2 1, 3 1 2}, VD

5,1 = {2 1 5 3 4, 2 1 4 3 5, 3 2 5 1 4, 3 2 4 1 5,3 1 5 2 4, . . .}, and VD

5,3 = {3 2 1 4 5, 3 2 1 5 4, 4 3 2 5 1, 4 3 1 2 5, 4 3 1 5 2, . . .}.Similar to the proof of Theorem 4.3, we denote Iw(VD

n,e) by I ′w(n, e) and list the first few values as in Table 3. The first two columns in Table 3 are easily derived. Analogous to that in Theorem 4.3, we have the following four corresponding recursive relations for n ≥ 7. The proof is omitted due to similarity.

(i) I ′w(n, 1) = −I ′w(n − 2, 1) + (−1)n+12 2.

(ii) I ′w(n, e) = −I ′w(n − 2, e) − I ′w(n − 2, e − 2) for 3 ≤ e ≤ n − 6.(iii) I ′w(n, n − 4) = −I ′w(n − 2, n − 4) − I ′w(n − 2, n − 6) + 1.(iv) I ′w(n, n − 2) = −I ′w(n − 2, n − 4).

From (i) to (iv) we have

Iw(VD

n

)=

n−2∑e=1

I ′w(n, e)

= −I ′w(n− 2, 1) + (−1)n+1

2 · 2 −n−4∑(

I ′w(n− 2, e) + I ′w(n− 2, e− 2))

e=3

46 H. Chang et al. / Advances in Applied Mathematics 59 (2014) 26–47

Table 4List of sign imbalances.

Io Iw IB ID Is

Sn 0 0 0 – 0(−1)

n

2 · 2n 2n

S0n (−1)�

n

2� n (−1)�

n

2� – n

(−1)n

2 (n + 1) n + 1

S00n (−1)�

n

2� · 2n−1 0 0 – 0

Dn |Dn| 2 − n – (−1)�n

2�+1 2 − n

(−1)n

2 · 5·2n−3n−59

5·2n−3n−59

D̃n (−1)�n−1

2� (−1)

n+12 – (−1)�

n

2�+1 −n

2n − n − 1 2n − n − 1

VBn 1 (−1)

n+32 J n+3

2(−1)�

n

2� – –

(−1)n

2

VDn −1 (−1)

n+12 J n+3

2+ (−1)

n−12 · 2 – −1 –

(−1)n

2−1

+ 1 − I ′w(n− 2, n− 4)

= −2(

n−4∑e=1

I ′w(n− 2, e))

+ 1 + (−1)n+1

2 · 2

= −2(Iw

(VD

n−2))

+ 1 + (−1)n+1

2 · 2

= −Iw(VB

n

)+ (−1)

n+12 · 2,

with the last equality by the induction hypothesis. The result follows from Theo-rem 4.3. �

Our last result is the type D imbalances.

Theorem 5.3. We have ID(VD1 ) = 1 and ID(VD

n ) = −1 for n ≥ 2.

The proof is similar to that of Theorem 4.4 by using the result of Theorem 5.2 and is omitted.

6. Concluding remarks

In this paper we compute the sign imbalances of signed alternating permutations, snakes and valley-signed permutations in various settings and here we collect the results in Table 4. The upper formula of an entry corresponds to odd n while the lower one corresponds to even n. Isolated initial values are also omitted.

Theoretically speaking, the sign imbalance of a set of permutations S can be computed by plugging q = −1 in the generating function S(q) =

∑π∈S qinv(π). However, for those

various permutations considered in this paper, their generating functions with respect to

H. Chang et al. / Advances in Applied Mathematics 59 (2014) 26–47 47

various inversions are elusive to us. Note that, even in type An the generating function approach is highly nontrivial. By letting En(q) :=

∑π∈En

qinv(π), Stanley [15] proved that

∑n≥0

En(q) xn

[n]! = 1 + sinq(x)cosq(x) ,

where cosq(x) =∑

n≥0(−1)nq(2n

2)x2n

[2n]! , sinq(x) =∑

n≥0(−1)nq(2n+1

2)

x2n+1

[2n+1]! and [n]! :=(1 − q)(1 − q2) · · · (1 − qn). To our knowledge, counterpart results in other types are not known. Another aspect is to consider the imbalances with respect to other Mahonian or Eulerian statistics. We leave these problems to the interested readers.

Acknowledgments

The authors would like to express their gratitude to the referees for their valuable comments and suggestions in improving the presentation of this paper.

References

[1] V.I. Arnol’d, The calculus of snakes and the combinatorics of Bernoulli, Euler, and Springer numbers for Coxeter groups, Russian Math. Surveys 47 (1992) 1–51.

[2] A. Björner, F. Brenti, Combinatorics of Coxeter Groups, Grad. Texts in Math., vol. 231, Springer, New York, 2005.

[3] W.Y.C. Chen, N.J.Y. Fan, J.Y.T. Jia, Labeled ballot paths and the Springer numbers, SIAM J. Discrete Math. 25 (2011) 1530–1546.

[4] S.-P. Eu, T.-S. Fu, Y.-J. Pan, A refined sign-balance of simsun permutations, European J. Combin. 36 (2014) 97–109.

[5] M. Josuat-Vergès, Enumeration of snakes and cycle-alternating permutations, preprint, arXiv:1011.0929.

[6] M. Josuat-Vergès, J.-C. Novelli, J.-Y. Thibon, The algebraic combinatorics of snakes, J. Combin. Theory Ser. A 119 (2012) 1613–1638.

[7] T. Lam, Signed differential posets and sign-imbalance, J. Combin. Theory Ser. A 115 (2008) 466–484.[8] OEIS Foundation Inc., The on-line encyclopedia of integer sequences, http://oeis.org.[9] F. Ruskey, Transposition generation of alternating permutations, Order 6 (1989) 227–233.

[10] M. Shattuck, C. Wagner, Parity theorems for statistics on domino arrangements, Electron. J. Com-bin. 12 (2005), #N10.

[11] R. Simion, F.W. Schmidt, Restricted permutations, European J. Combin. 6 (1985) 383–406.[12] J. Sjöstrand, On the sign-imbalance of partition shapes, J. Combin. Theory Ser. A 111 (2005)

190–203.[13] J. Sjöstrand, On the sign-imbalance of skew partition shapes, European J. Combin. 28 (2007)

1582–1594.[14] T.A. Springer, Remarks on a combinatorial problem, Nieuw Arch. Wiskd. 19 (1971) 30–36.[15] R.P. Stanley, Binomial posets, Möbius inversion, and permutation enumeration, J. Combin. Theory

Ser. A 119 (1976) 336–356.[16] R.P. Stanley, Some remarks on sign-balanced and maj-balanced posets, Adv. in Appl. Math. 34

(2005) 880–902.[17] R.P. Stanley, A survey of alternating permutations, Contemp. Math. 531 (2010) 165–196.