13
Cent. Eur. J. Math. • 12(9) • 2014 • 1390-1402 DOI: 10.2478/s11533-014-0421-2 Central European Journal of Mathematics Parity-alternating permutations and successions Research Article Augustine O. Munagi 1* 1 School of Mathematics, University of the Witwatersrand, Private Bag 3, Wits 2050, Johannesburg, South Africa Received 24 January 2013; accepted 10 September 2013 Abstract: The study of parity-alternating permutations of {1 2} is extended to permutations containing a prescribed number of parity successions – adjacent pairs of elements of the same parity. Several enumeration formulae are computed for permutations containing a given number of parity successions, in conjunction with further parity and length restrictions. The objects are classified using direct construction and elementary combinatorial techniques. Analogous results are derived for circular permutations. MSC: 05A05, 05A15 Keywords: Parity-alternating permutation • Succession block • Circular permutation © Versita Sp. z o.o. 1. Introduction We consider the enumeration of linear permutations ( 1 2 ) of elements of the set []= {1 2} with respect to pairs of entries ( +1 ) satisfying +1 (mod 2) > 0 (1) An ordered pair ( +1 ) satisfying (1) will also be called a parity succession, or simply a succession. This terminology is adapted from an analogous usage in the study of finite integer sequences (π(1)π(N)) in which a succession refers to a pair π()π( + 1) with π( + 1) = π() + 1 (see for example [2, 3, 6, 8]). The concept of parity succession was first introduced in [5] in connection with certain general results in the study of alternating subsets of integers. Our definition immediately generalizes the class of parity-alternating permutations, that is, linear arrangements of distinct positive integers in which the terms assume even and odd values alternately. Since there is no pair of adjacent elements satisfying (1), a parity-alternating permutation always contains 0 successions. * E-mail: [email protected] 1390

Parity-alternating permutations and successions

Embed Size (px)

Citation preview

Page 1: Parity-alternating permutations and successions

Cent. Eur. J. Math. • 12(9) • 2014 • 1390-1402DOI: 10.2478/s11533-014-0421-2

Central European Journal of Mathematics

Parity-alternating permutations and successions

Research Article

Augustine O. Munagi1∗

1 School of Mathematics, University of the Witwatersrand, Private Bag 3, Wits 2050, Johannesburg, South Africa

Received 24 January 2013; accepted 10 September 2013

Abstract: The study of parity-alternating permutations of {1, 2, . . . , n} is extended to permutations containing a prescribednumber of parity successions – adjacent pairs of elements of the same parity. Several enumeration formulae arecomputed for permutations containing a given number of parity successions, in conjunction with further parity andlength restrictions. The objects are classified using direct construction and elementary combinatorial techniques.Analogous results are derived for circular permutations.

MSC: 05A05, 05A15

Keywords: Parity-alternating permutation • Succession block • Circular permutation© Versita Sp. z o.o.

1. Introduction

We consider the enumeration of linear permutations (p1, p2, . . . ) of elements of the set [n] = {1, 2, . . . , n} with respectto pairs of entries (pi, pi+1) satisfyingpi ≡ pi+1 (mod 2), i > 0. (1)

An ordered pair (pi, pi+1) satisfying (1) will also be called a parity succession, or simply a succession. This terminologyis adapted from an analogous usage in the study of finite integer sequences (π(1), . . . , π(N)) in which a successionrefers to a pair π(i), π(i + 1) with π(i + 1) = π(i) + 1 (see for example [2, 3, 6, 8]). The concept of parity successionwas first introduced in [5] in connection with certain general results in the study of alternating subsets of integers. Ourdefinition immediately generalizes the class of parity-alternating permutations, that is, linear arrangements of distinctpositive integers in which the terms assume even and odd values alternately. Since there is no pair of adjacent elementssatisfying (1), a parity-alternating permutation always contains 0 successions.∗ E-mail: [email protected]

1390

Page 2: Parity-alternating permutations and successions

A.O. Munagi

Enumeration study of permutations of [n] according to parity of individual elements is still at a budding stage. Tanimotohas applied the properties of parity-alternating permutations to the investigation of signed Eulerian numbers [7]. Butwe found only one relevant enumeration result, namely (2) below. In [4] the author provides permutation analogues ofclassical theorems on alternating subsets such as the theorems of Terquem and Skolem, with some generalizations.This paper supplies a budget of enumeration formulae for permutations classified by assorted parity criteria. Permutationsare arguably the most popular objects in combinatorics, and it should not come as a surprise to find more interestingresults here than those from alternating subsets.The number f0(n) of parity-alternating permutations of [n] may be stated as follows:f0(n) = 3 + (−1)n2

⌊n2⌋!⌊n+ 12

⌋! (2)We will obtain several generalizations of (2) by imposing restrictions on the number of elements of a fixed parity, thenumber of parity successions, and so forth (Section 2). We begin by devising a fundamental algorithm for constructing therelevant permutations (proof of Theorem 2.1). By a succession block we understand a maximal (sub-)string of elementsof the same parity. A sequence of consecutive succession blocks will also be referred to as alternating. For example,the permutation (10, 1, 3, 9, 5, 12, 4, 11, 6, 2, 7, 8) has seven alternating blocks, (10), (1, 3, 9, 5), (12, 4), (11), (6, 2), (7), (8),consisting of three blocks of odd integers and four blocks of even integers, with a total of five parity successions of whichtwo are contributed by even integers. The final section deals with the enumeration of circular permutations of [n] undersimilar parity restrictions (Section 3). The section opens with a brief description of these permutations.The following basic facts and notations will be used in the proofs.• The number c(n,m) of compositions (or ordered partitions) of a positive integer n into m parts is given by [1, p. 54]:c(n,m) = (n−1

m−1).• A permutation of [n] taken k at a time, will be referred to as a k-permutation of [n]. If a k-permutation contains rparity successions and v alternating succession blocks, then v = k − r: representing the lengths of the blocks byb1, . . . , bv , we have k = b1 + · · ·+ bv = (b1 − 1) + · · ·+ (bv − 1) + v = r + v .• The number of odd and even integers in [n] will be denoted, respectively, by D(n) and E(n), that is, D(n) = b(n+1)/2c,E(n) = bn/2c.• The formula for the number p(N, k) of k-permutations of [N] has three forms, namely,

p(N, k) = N!(N − k)! = k!(Nk) = Nk ,

where Nk denotes the falling factorial, Nk = N(N − 1) · · · (N − k + 1), N0 = 1. Our choice of expression for p(N, k),at any time, will depend on brevity, typesetting convenience or aesthetic appeal.• If n ≥ 0, then the binomial coefficient (nk) will assume the value zero if k is negative or not integral.2. Enumeration of permutations by parity successions

Let f(n, k, s, r) denote the number of k-permutations of [n] containing s odd integers and r parity successions. Thenf(n, 1, s, r) = 0 if r > 0 since a singleton cannot contain a succession, and f(n, 1, 0, 0) = E(n), that is,

f(n, 1, 0, r) = ⌊n2⌋δr,0,

where δij is the Kronecker delta. We also havef(n, s, s, r) = ⌊n+ 12

⌋sδr,s−1,

1391

Page 3: Parity-alternating permutations and successions

Parity-alternating permutations and successions

since an s-permutation consisting of odd integers contains s− 1 successions.In every permutation enumerated by f(n, k, s, r), the number k − r of alternating blocks of even and odd integers cannotexceed 2s or 2s + 1, depending on parity. Hence s ≥ b(k − r)/2c. For an upper bound we consider an object in whichthe first and last entries are odd integers. If odd integers account for all the successions, then there are k − s evenintegers separating the blocks of odd integers. Thus in general, k − r = 2(k − s) + 1, or 2s = k + r + 1. Hencef(n, k, s, r) > 0 =⇒ ⌊

k − r2⌋≤ s ≤

⌊k + r + 12

⌋, (3)

where the last quantity is independently bounded above by k and D(n).We remark that the number of k-permutations of [n] containing s0 even integers and r parity successions is given byf(n, k, k − s0, r).Theorem 2.1.Let n, k, s, r be positive integers, 2 ≤ k < n, 1 ≤ s < k , with s satisfying equation (3). Then

f(n, k, s, r) = ⌊n+ 12

⌋s

⌊n2⌋k−s

s− 1⌊

k − r − 12⌋ k − s− 1⌊

k − r − 22⌋+ s− 1⌊

k − r − 22⌋ k − s− 1⌊

k − r − 12⌋.

Proof. We construct an enumerated object B as follows. The symbols o and e will represent an unspecified odd andeven integer, respectively. Take any s-permutation of [n] consisting of odd integers (o1, o2, . . . , os), in p(D(n), s) ways,and a (k − s)-permutation of [n] consisting of even integers. Then obtain a composition (b1, b2, . . . , bv1 ) of s, in c(s, v1)ways, to represent the sequence of sizes of the blocks of odd integers in B. Let the block sizes of even integers be(c1, c2, . . . , cv0 ). So the sequence of lengths of the alternating blocks of B (assuming an odd first element) has the form(b1, c1, b2, c2, . . . ).To specify B, we insert separators in the permutation (o1, o2, . . . , os) so that a separator immediately follows the j-thelement, where j = b1, b1 + b2, b1 + b2 + b3, . . . The (k − s)-permutation of even integers is similarly separated. Nowcombine the two sequences of succession blocks, alternately, in a unique manner consistent with the prescribed formof B.Let f(n, k, s, r)T denote the number of permutations counted by f(n, k, s, r) in which the first element has parity T . If Tis of either parity, it follows thatf(n, k, s, r)T = p(D(n), s)p(E(n), k − s)c(s, v1)c(k − s, v0),

that is,f(n, k, s, r)T = p(D(n), s)p(E(n), k − s)( s− 1

v1 − 1)(

k − s− 1v0 − 1

). (4)

It remains to specify the lengths of the blocks of even and odd integers, v0 and v1, subject to the pattern of B and theparity of k − r, the number of alternating succession blocks. Note thatf(n, k, s, r) = f(n, k, s, r)odd + f(n, k, s, r)even. (5)

First assume that the first element of B is odd. Then the blocks satisfy v1 = v0 = q1 > 0 if k − r = 2q1, andv1 = v0 + 1 = q2 + 1 > 1 if k − r = 2q2 + 1, which correspond to permutations of the form (o, . . . , e) and (o, . . . , o),respectively. Hence we obtain from (4),

f(n, k, s, r)oddp(D(n), s)p(E(n), k − s) = (

s− 1q1 − 1

)(k − s− 1q1 − 1

)+ (s− 1q2

)(k − s− 1q2 − 1

)= s− 1

k − r − 22k − s− 1

k − r − 22+ s− 1

k − r − 12k − s− 1

k − r − 32,

1392

Page 4: Parity-alternating permutations and successions

A.O. Munagi

which is equivalent tof(n, k, s, r)odd = p(D(n), s)p(E(n), k − s) s− 1⌊

k − r − 12⌋ k − s− 1⌊

k − r − 22⌋. (6)

Similarly for permutations of the form (e, . . . , o) or (e, . . . , e), we have v1 = v0 = q1, or v1 + 1 = v0 = q2 + 1 > 1. Hence,f(n, k, s, r)even

p(D(n), s)p(E(n), k − s) = (s− 1q1 − 1

)(k − s− 1q1 − 1

)+ ( s− 1q2 − 1

)(k − s− 1

q2),

which givesf(n, k, s, r)even = p(D(n), s)p(E(n), k − s) s− 1⌊

k − r − 22⌋ k − s− 1⌊

k − r − 12⌋. (7)

The asserted result follows from (5), with (6) and (7), and the notations.Remark 2.2.We emphasize that Theorem 2.1, or any other result throughout the paper, stated in terms of the length k of a permutationand the number r of parity successions, has an equivalent statement in terms of k and the number v of succession blocks,due to the relation v = k − r. Thus the theorem has the following alternative form: The number of k-permutations of [n]containing s odd integers and v parity succession blocks is given by f(n, k, s, k − v):

⌊n+ 12

⌋s

⌊n2⌋k−s

s− 1⌊

v − 12⌋k − s− 1⌊

v − 22⌋+ s− 1⌊

v − 22⌋k − s− 1⌊

v − 12⌋.

The number of k-permutations of [n] containing r parity successions is obtained from Theorem 2.1 by summation over s,∑s f(n, k, s, r). However, there are three range cases to the summation index which correspond to the forms, (o, . . . , e)(with (e, . . . , o)), (o, . . . , o) and (e, . . . , e). Thus the upper summation indices in the following corollary are, respectively,

min(k − 1,⌊n+ 12⌋)

, min(k,⌊n+ 12⌋)

, min(k − 2,⌊n+ 12⌋)

.

Corollary 2.3.The number fr(n, k) of k-permutations of [n] containing r parity successions is given by

fr(n, k) = 2∑s≥1⌊n+ 12

⌋s

⌊n2⌋k−s

( s− 1k − r − 22

)(k − s− 1k − r − 22

),

provided that k − r is even; and by

fr(n, k) = ∑s≥2⌊n+ 12

⌋s

⌊n2⌋k−s

( s− 1k − r − 12

)(k − s− 1k − r − 32

)+∑s≥0⌊n+ 12

⌋s

⌊n2⌋k−s

( s− 1k − r − 32

)(k − s− 1k − r − 12

),

provided that k − r is odd.

In particular, taking the last term of each sum in Corollary 2.3, when k = n, we obtain the formula for fr(n, n) = fr(n).1393

Page 5: Parity-alternating permutations and successions

Parity-alternating permutations and successions

Corollary 2.4.The number of permutations of [n] containing r parity successions is given by

fr(n) = ⌊n2⌋!⌊n+ 12

⌋!

⌊n− 12

⌋⌊n− r − 12

⌊n− 22

⌋⌊n− r − 22

⌋+

⌊n− 12

⌋⌊n− r − 22

⌊n− 22

⌋⌊n− r − 12

⌋.

Remark 2.5.When r = 0 in Corollary 2.4, we recover (2).Remark 2.6.When r = 0 in Corollary 2.3, we obtain the formula for the number of parity-alternating k-permutations of [n]:

f0(n, k) = ⌊k + 12

⌋!⌊k2⌋!⌊n+ 12

⌋⌊k + 12

⌋⌊n2⌋

⌊k2⌋+

⌊n+ 12

⌋⌊k2⌋

⌊n2⌋

⌊k + 12

⌋.

If we are interested in the number r1 of parity successions contributed by odd integers, and not the total number r ofsuccessions, in each permutation counted by f(n, k, s, r), the enumerator, say h(n, k, s, r1), can be deduced from the proofof Theorem 2.1 by first using the relation v1 = s− r1 in (4), to geth(n, k, s, r1)T = p(D(n), s)p(E(n), k − s)(s− 1

r1)(

k − s− 1v0 − 1

),

where v0 depends on v1 = s − r1. The following expressions then follow upon eliminating v0 with the usual parityarguments:h(n, k, s, r1)odd = p(D(n), s)p(E(n), k − s)(s− 1

r1)((

k − s− 1s− r1 − 1

)+ (k − s− 1s− r1 − 2

)),

h(n, k, s, r1)even = p(D(n), s)p(E(n), k − s)(s− 1r1)((

k − s− 1s− r1 − 1

)+ (k − s− 1s− r1

)),

which, on addition, simplify toh(n, k, s, r1) = p(D(n), s)p(E(n), k − s)(s− 1

r1)(

k − s+ 1s− r1

).

Corollary 2.7.The number h(n, k, s, r1) of k-permutations of [n] containing s odd integers which contribute r1 parity successions isgiven by

h(n, k, s, r1) = s!(k − s)!⌊n+ 12⌋

s

⌊n2⌋

k − s

(s− 1r1)(

k − s+ 1s− r1

).

Example 2.8.As an illustration of Corollary 2.7, consider n = 6, k = 5, s = 2, r1 = 0. Then h(6, 5, 2, 0) = 216 which is made up ofthree parts, 216 = 36 + 144 + 36 corresponding, respectively, to permutations with 0, 1 or 2, parity successions in total:(2, 1, 4, 3, 6), (2, 1, 6, 3, 4), (2, 3, 6, 1, 4), . . . ,(6, 4, 3, 2, 1), (5, 4, 1, 2, 6), (3, 4, 6, 5, 2), . . . ,(3, 6, 4, 2, 5), (1, 6, 4, 2, 5), (5, 4, 6, 2, 1), . . .

1394

Page 6: Parity-alternating permutations and successions

A.O. Munagi

But when r1 = 1, we have h(6, 5, 2, 1) = 144 which is made up of two parts, 144 = 72 + 72 corresponding, respectively,to permutations with 2 or 3, parity successions in total:(4, 6, 3, 5, 2), (4, 2, 5, 3, 6), (6, 4, 5, 3, 2), . . . ,(2, 6, 4, 3, 1), (1, 3, 6, 2, 4), (5, 3, 4, 6, 2), . . .

Remark 2.9.(i) If the s odd integers form a single succession block in each permutation, the result becomes:h(n, k, s, s− 1) = s! (k − s)!⌊n+ 12

⌋s

⌊n2⌋

k − s

(k − s+ 1).(ii) From the sum ∑

r1 h(n, k, s, r1) = h(n, k, s) one deduces: The number of k-permutations of [n] containing s oddintegers is given byh(n, k, s) = s! (k − s)!⌊n+ 12

⌋s

⌊n2⌋

k − s

(ks

).

The case k = n implies the easily-verified identity,⌊n+ 12

⌋!⌊n2⌋! n⌊

n+ 12⌋ = n!

On setting r1 = 0 in Corollary 2.7, we deduceCorollary 2.10.There are

h(n, n,D(n), 0) = ⌊n2⌋!⌊n+ 12

⌋!⌊n+ 22

⌋⌊n+ 12

permutations of [n] avoiding adjacent pairs of odd integers.

2.1. A flexible enumerator

For more flexibility we suppress the number s of odd integers in favour of the number of parity successions contributedby odd integers. Let g(n, k, r, r1) denote the number of k-permutations of [n] containing r parity successions in whichr1 of the successions are contributed by odd integers. We have at once that g(n, 1, r, r1) = n > 0 iff r = 0 = r1, and ifr1 > 0, we have

g(n, r1 + 1, r, r1) = ⌊n+ 12⌋r1+1δr,r1 .Factorials will be defined only for nonnegative integers, and any product containing an undefined factor is assumed tobe equal to zero.

1395

Page 7: Parity-alternating permutations and successions

Parity-alternating permutations and successions

Theorem 2.11.Let n, k, r be positive integers, r ≥ r1, 2 ≤ k < n. Then the number g(n, k, r, r1) is given by

g(n, k, r, r1) = g(n, k, r, r1)odd + g(n, k, r, r1)even,where

g(n, k, r, r1)odd =⌊n2⌋!⌊n+ 12

⌋!(⌊n+ 12

⌋−⌊k − r + 2r1 + 12

⌋)!(⌊n2⌋−⌊k + r − 2r12

⌋)!×

⌊k − r + 2r1 − 12⌋

r1⌊k + r − 2r1 − 22

⌋r − r1

,g(n, k, r, r1)even =

⌊n2⌋!⌊n+ 12

⌋!(⌊n+ 12

⌋−⌊k − r + 2r12

⌋)!(⌊n2⌋−⌊k + r − 2r1 + 12

⌋)!×

⌊k − r + 2r1 − 22⌋

r1⌊k + r − 2r1 − 12

⌋r − r1

.Proof. Let B denote an enumerated permutation, and assume that B contains s odd integers. Thus, necessarilys > r1, and B may be constructed with the algorithm of the proof of Theorem 2.1. Using previous notations, togetherwith s = v1 + r1 and k − s = v0 + (r − r1), we obtain the required number of permutations B as

g(n, k, r, r1)T = p(D(n), v1 + r1)p(E(n), v0 + r − r1)c(v1 + r1, v1)c(v0 + r − r1, v0),that is,

g(n, k, r, r1)T = p(D(n), v1 + r1)p(E(n), v0 + r − r1)(v1 + r1 − 1r1

)(v0 + r − r1 − 1

r − r1), (8)

where T is either parity.Then for permutations of the form (o, . . . , e) and (o, . . . , o), we have v1 = v0 = q1 > 0, where k − r = 2q1, andv1 = v0 + 1 = q2 + 1 > 1, where k − r = 2q2 + 1. Hence (8) givesg(n, k, r, r1)odd = p(D(n), q1 + r1)p(E(n), q1 + r − r1)(q1 + r1 − 1

r1)(

q1 + r − r1 − 1r − r1

)+ p(D(n), q2 + r1 + 1)p(E(n), q2 + r − r1)(q2 + r1

r1)(

q2 + r − r1 − 1r − r1

)= p

(D(n),⌊k − r + 2r1 + 12

⌋)p(E(n),⌊k + r − 2r12

⌋)⌊k − r + 2r1 − 12⌋

r1⌊k + r − 2r1 − 22

⌋r − r1

.Similarly for permutations of the form (e, . . . , o) or (e, . . . , e), we have v1 = v0 = q1, or v1 + 1 = v0 = q2 + 1. Hence,g(n, k, r, r1)even = p

(D(n),⌊k − r + 2r12

⌋)p(E(n),⌊k + r − 2r1 + 12

⌋)⌊k − r + 2r1 − 22⌋

r1⌊k + r − 2r1 − 12

⌋r − r1

.Lastly, the result follows from the relation

g(n, k, r, r1) = g(n, k, r, r1)odd + g(n, k, r, r1)even.1396

Page 8: Parity-alternating permutations and successions

A.O. Munagi

When r = r1 in Theorem 2.11, we obtain the interesting case g(n, k, r, r) = w(n, k, r).Corollary 2.12.The number w(n, k, r) of k-permutations of [n] containing r parity successions which are all contributed by odd integers,is given by

w(n, k, r) = w(n, k, r)odd + w(n, k, r)even,where

w(n, k, r)odd =⌊n2⌋!⌊n+ 12

⌋!(⌊n+ 12

⌋−⌊k + r + 12

⌋)!(⌊n2⌋−⌊k − r2

⌋)!⌊k + r − 12

⌋r

,

w(n, k, r)even =⌊n2⌋!⌊n+ 12

⌋!(⌊n+ 12

⌋−⌊k + r2

⌋)!(⌊n2⌋−⌊k − r + 12

⌋)!⌊k + r − 22

⌋r

.

On the other hand, if r1 = 0 in Theorem 2.11, we obtain g(n, k, r, 0) = `(n, k, r).Corollary 2.13.The number `(n, k, r) of k-permutations of [n] containing r parity successions all of which are contributed by evenintegers, is given by

`(n, k, r) = `(n, k, r)odd + `(n, k, r)even,where

`(n, k, r)odd =⌊n2⌋!⌊n+ 12

⌋!(⌊n+ 12

⌋−⌊k − r + 12

⌋)!(⌊n2⌋−⌊k + r2

⌋)!⌊k + r − 22

⌋r

,

`(n, k, r)even =⌊n2⌋!⌊n+ 12

⌋!(⌊n+ 12

⌋−⌊k − r2

⌋)!(⌊n2⌋−⌊k + r + 12

⌋)!⌊k + r − 12

⌋r

.Remark 2.14.Corollary 2.13 gives a refinement of Corollary 2.10 by asserting that a permutation of [n] avoiding adjacent pairs of oddintegers admits at most one parity succession. Specifically,

`(n, n, 0) = 3 + (−1)n2⌊n2⌋!⌊n+ 12

⌋!, `(n, n, 1) = 1 + (−1)n2(n− 22

)(n2)!2.

So we should have `(n, n, 0) + `(n, n, 1) = h(n, n,D(n), 0).Remark 2.15.By analogous reasoning, permutations of [n] avoiding adjacent pairs of even integers admit at most two successions, andCorollary 2.12 gives the enumerator and its decomposition as follows:

1397

Page 9: Parity-alternating permutations and successions

Parity-alternating permutations and successions

⌊n2⌋!⌊n+ 12

⌋!⌊n+ 32

⌋⌊n2⌋ = w(n, n, 0) + w(n, n, 1) + w(n, n, 2)

= 3 + (−1)n2⌊n2⌋!⌊n+ 12

⌋! + 3 + (−1)n+12⌊n− 12

⌋⌊n2⌋!⌊n+ 12

⌋!+ 1 + (−1)n+12

(n− 12

)!(n+ 12)!n− 122

.

3. Circular permutations

A circular permutation is an arrangement of distinct positive integers clockwise around a circle, two arrangements beingconsidered identical if they differ only by a rotation. This definition implies a natural equivalence relation on any setof permutations in which an equivalence class C (p) of a member p consists of permutations obtained from p by a t-foldcyclic shift of the sequence of elements of p, where t = 0, 1, . . . , k − 1, and k is the length of p.We will count circular k-permutations of [n], or (what is the same thing) the distinct equivalence classes C (p), withrespect to parity successions. Each class will be identified with its unique member q = (q1, q2, . . . , qk ) satisfyingmin(q) = q1. Note that the definition of a parity succession now includes the possibility of the first and last entrieshaving the same parity. For example the class C ((1, 2, 3)) = {(1, 2, 3), (2, 3, 1), (3, 1, 2)} is counted as a single circularpermutation of [3] which contains one parity succession.Let f(n, k, s, r) be the number of circular k-permutations of [n] containing s odd integers and r parity successions. Thenwe see at once that f(n, 1, s, r) = 0 whenever r > 0, andf(n, 1, s, 0) = ⌊n+ 12

⌋δ1s + ⌊n2

⌋δ0s. (9)

Also, f(n, 2, s, r) = 0 if r = 1 or r > 2, andf(n, 2, s, 0) = ⌊n2

⌋⌊n+ 12

⌋δ1s, f(n, 2, s, 2) =

⌊n+ 12

⌋2

δ2s +⌊n2⌋

2δ0s. (10)

Generally, if the smallest entry is a, then a ∈ [n−k+1], since an enumerated object C has the form C = (a, p2, p3, . . . , pk ),where (p2, p3, . . . , pk ) is a (k − 1)-permutation of the set {a+ 1, a+ 2, . . . , n}.We first assume that a is odd, say a = 2j − 1. Then C may be found using a modified form of the previous algorithm.Obtain an (s−1)-permutation of D(n)− j odd integers, with a (k−s)-permutation of E(n)− j+1 even integers (excluding1, 2, 3, . . . , 2j − 1), noting that a is already fixed in the first position. Then combine the sequences of s odd integers andk − s even integers in the usual manner, to get

F (n, k, s, r)(2j−1,... ) def= p(D(n)− j, s− 1)p(E(n)− j + 1, k − s)( s− 1v1 − 1

)(k − s− 1v0 − 1

).

Similarly, by starting with an even integer a = 2j ∈ [n− k + 1], we obtainF (n, k, s, r)(2j,... ) def= p(D(n)− j, s)p(E(n)− j, k − s− 1)( s− 1

v1 − 1)(

k − s− 1v0 − 1

). (11)

1398

Page 10: Parity-alternating permutations and successions

A.O. Munagi

Lastly we apply the usual parity arguments to evaluate the quantities v1, v0, taking account of possible parity successionsintroduced on wrapping permutations around.For each j ∈ {1, 2, . . . , b(n − k + 2)/2c}, the number of permutations of the forms (2j − 1, . . . , e) and (2j − 1, . . . , o) isgiven byF (n, k, s, r)(2j−1,...,e) + F (n, k, s, r − 1)(2j−1,...,o).

Note that r drops by 1 in the second summand since a permutation of the form (o, . . . , o) introduces an additionalsuccession when wrapped around. Thus the sum becomesp(D(n)− j, s− 1)p(E(n)− j + 1, k − s)

s− 1k − r − 22

k − s− 1k − r − 22

+ s− 1k − r2

k − s− 1k − r − 22

= p(D(n)− j, s− 1)p(E(n)− j + 1, k − s) s

k − r2k − s− 1

k − r − 22.

Hence, writing f(n, k, s, r)T for the number of permutations enumerated by f(n, k, s, r) in which the smallest entry hasparity T , we obtainf(n, k, s, r)odd = ∑

j≥1 p(D(n)− j, s− 1)p(E(n)− j + 1, k − s) sk − r2

k − s− 1k − r − 22

.Similarly, for each j ∈ {1, 2, . . . , b(n− k + 1)/2c}, the number of permutations of the forms (2j, . . . , o) and (2j, . . . , e) isderived, from (11), to be

f(n, k, s, r)even = ∑j≥1 p(D(n)− j, s)p(E(n)− j, k − s− 1) s− 1

k − r − 22k − sk − r2

.The foregoing results are summarized in the following theorem.Theorem 3.1.The number f(n, k, s, r) of circular k-permutations of [n] containing s odd integers and r parity successions is 0 if k − ris odd. Otherwise, we have

f(n, k, s, r) = f(n, k, s, r)odd + f(n, k, s, r)even, 2 ≤ k ≤ n,where

f(n, k, s, r)odd = (s− 1)!(k − s)!( sk − r2

)(k − s− 1k − r − 22

) b(n−k+2)/2c∑j=1

⌊n+ 12⌋− j

s− 1⌊n+ 22

⌋− j

k − s

,f(n, k, s, r)even = s! (k − s− 1)!( s− 1

k − r − 22)(k − s

k − r2) b(n−k+1)/2c∑

j=1⌊n+ 12

⌋− j

s

⌊n2⌋− j

k − s− 1.

The number fr(n, k) of circular k-permutations of [n] containing r parity successions can be found by summing f(n, k, s, r)over s, a result that is too complicated to state here. However, we can set r = 0 in the latter to obtain a simpleexpression.1399

Page 11: Parity-alternating permutations and successions

Parity-alternating permutations and successions

Theorem 3.2.For an even positive integer k ≤ n, the number of parity-alternating circular k-permutations of [n] is

f0(n, k) = (k − 22

)!(k2)!b(n−k+1)/2c∑

j=1

⌊n2⌋− j

k − 22⌊n+ 12

⌋− j

k2 +b(n−k+2)/2c∑

j=1

⌊n+ 12

⌋− j

k − 22⌊n+ 22

⌋− j

k2.

Proof. The proof can be deduced straight from the proof of Theorem 3.1. Note that r = 0 implies that k is even,which implies s = k/2 = k − s. Of the four types of permutations, (o, . . . , e), (o, . . . , o), (e, . . . , o), (e, . . . , e), only thefirst and third can contribute to f0(n, k). Hencef0(n, k) = f0(n, k)odd + f0(n, k)even

= b(n−k+2)/2c∑j=1 p

(D(n)− j, k − 22

)p(E(n)− j + 1, k2

) +b(n−k+1)/2c∑j=1 p

(D(n)− j, k2

)p(E(n)− j, k − 22

).

The stated result now follows from the notations.The formula for fr(n) = fr(n, n) may be found via the relation fr(n) = f(n, n,D(n), r).Corollary 3.3.The number fr(n) of circular permutations of [n] containing r parity successions is 0 if n− r is odd. Otherwise, we have

fr(n) = ⌊n− 12⌋!⌊n2

⌋!⌊n− 22

⌋n− r − 22

⌊n+ 12

⌋n− r2

.In particular, the number f0(n) of parity-alternating circular permutations of [n] is

f0(n) = 1 + (−1)n2(n− 22

)!(n2)!

3.1. Other formulae

We follow through the agenda of Section 2, for circular permutations, by stating the other parallel formulae. The proofdetails are omitted since the procedures are similar to the linear cases.Theorem 3.4.The number h(n, k, s, r1) of circular k-permutations of [n] containing s odd integers which contribute r1 parity successionsis given by

h(n, k, s, r1) = h(n, k, s, r1)odd + h(n, k, s, r1)even,where

h(n, k, s, r1)odd = (s− 1)!(k − s)!( sr1)(

k − s− 1s− r1 − 1

) b(n−k+2)/2c∑j=1

⌊n+ 12⌋− j

s− 1⌊n+ 22

⌋− j

k − s

,h(n, k, s, r1)even = s! (k − s− 1)!(s− 1

r1)(

k − ss− r1

) b(n−k+1)/2c∑j=1

⌊n+ 12⌋− j

s

⌊n2⌋− j

k − s− 1.

1400

Page 12: Parity-alternating permutations and successions

A.O. Munagi

Hence, in particular,h(n, k, s, s− 1) = s! (k − s)!

b(n−k+2)/2c∑j=1

⌊n+ 12⌋− j

s− 1⌊n+ 22

⌋− j

k − s

+b(n−k+1)/2c∑

j=1⌊n+ 12

⌋− j

s

⌊n2⌋− j

k − s− 1.

(12)

Remark 3.5.The number of circular k-permutations of [n] containing s odd integers is given byh(n, k, s) = (k − 1)!

b(n−k+2)/2c∑j=1

⌊n+ 12⌋− j

s− 1⌊n+ 22

⌋− j

k − s

+b(n−k+1)/2c∑j=1

⌊n+ 12⌋− j

s

⌊n2⌋− j

k − s− 1.

Theorem 3.4 also specializes toh(n, k, s, 0) = (k − s− 1)!(k − s)!(k − 2s)!

b(n−k+2)/2c∑j=1

⌊n+ 12⌋− j

s− 1⌊n+ 22

⌋− j

k − s

+b(n−k+1)/2c∑

j=1⌊n+ 12

⌋− j

s

⌊n2⌋− j

k − s− 1.

Remark 3.6.In particular, a circular permutation of [n] avoids adjacent pairs of odd integers if and only if it is parity-alternating,that is, counted by f0(n). On the other hand, circular permutations of [n] avoiding adjacent pairs of even integers maycontain at most one parity succession:w(n, n, 0) = f0(n), w(n, n, 1) = (1 + (−1)n+1)(n− 12

)!(n+ 12)!

The total number of such permutations is3 + (−1)n+12

⌊n− 12

⌋!⌊n+ 12⌋!

3.2. Direct enumeration

In the spirit of equations (9)–(10), we apply direct combinatorial reasoning to find an alternative formula for f0(n, k).Since f0(n, k) > 0 requires k to be an even integer, each enumerated object P consists of an equal number of evenand odd elements, D(k) = E(k) = k/2. Thus to find P we select k/2 odd integers and even integers, in (D(n)k/2 )(E(n)

k/2 )ways. Then arrange these on a circle so that even and odd integers alternate, as follows: pick an integer x at randomand place it on the circle, followed with arrangement of the other (D(k) − 1) + E(k) = D(k) + (E(k) − 1) integers,accordingly. Clearly, there are (D(k) − 1)!E(k)! possible arrangements. Hence the total number of permutations P is(D(n)k/2 )(E(n)

k/2 )(D(k)− 1)!E(k)!.Theorem 3.7.The number of parity-alternating circular k-permutations of [n] is

f0(n, k) = (k − 22)!(k2

)!⌊n2⌋

k2⌊n+ 12

⌋k2

, k ≡ 0 (mod 2).

1401

Page 13: Parity-alternating permutations and successions

Parity-alternating permutations and successions

Lastly, we remark that it can be proved directly that h(n, k, s, s− 1) is given byh(n, k, s, s− 1) = s! (k − s)!

⌊n+ 12

⌋s

⌊n2⌋

k − s

,which is then equivalent to (12). By comparing the two formulas we obtain the following identity which is valid for allpositive integers k ≤ n:

⌊n+ 12⌋

k1⌊n2⌋

k2

= b(n−k+2)/2c∑j=1

⌊n+ 12⌋− j

k1 − 1⌊n+ 22

⌋− j

k2 +b(n−k+1)/2c∑

j=1

⌊n+ 12

⌋− j

k1

⌊n2

⌋− j

k2 − 1,

where k1 and k2 are positive integers summing to k .The special case of this identity, corresponding to k1 = k2 = k/2, may be obtained by equating the results of Theorems3.7 and 3.2.

References

[1] Andrews G.E., The Theory of Partitions, Encyclopedia of Mathematics and its Applications, 2, Addison-Wesley,Reading, 1976[2] Knopfmacher A., Munagi A., Wagner S., Successions in words and compositions, Ann. Comb., 2012, 16(2), 277–287[3] Moser W.O.J., Abramson M., Generalizations of Terquem’s problem, J. Combinatorial Theory, 1969, 7(2), 171–180[4] Munagi A.O., Alternating subsets and permutations, Rocky Mountain J. Math., 2010, 40(6), 1965–1977[5] Munagi A.O., Alternating subsets and successions, Ars Combin., 2013, 110, 77–86[6] Riordan J., Permutations without 3-sequences, Bull. Amer. Math. Soc., 1945, 51, 745–748[7] Tanimoto S., Parity alternating permutations and signed Eulerian numbers, Ann. Comb., 2010, 14(3), 355–366[8] Tanny S.M., Permutations and successions, J. Combinatorial Theory Ser. A, 1976, 21(2), 196–202

1402