Alternating Permutations Richard P. Stanley M.I.T. Alternating Permutations – p. 1 Definitions A sequence a1 , a2 , . . . , ak of distinct integers is alternating if a1 > a 2 < a 3 > a 4 < · · · , and reverse alternating if a1 < a 2 > a 3 < a 4 > · · · . Alternating Permutations – p. 2 Definitions A sequence a1 , a2 , . . . , ak of distinct integers is alternating if a1 > a 2 < a 3 > a 4 < · · · , and reverse alternating if a1 < a 2 > a 3 < a 4 > · · · . Sn : symmetric group of all permutations of 1, 2, . . . , n Alternating Permutations – p. 2 En En = #{w ∈ Sn : w is alternating} = #{w ∈ Sn : w is reverse alternating} via a1 a2 · · · an 7→ n + 1 − a1 , n + 1 − a2 , . . . , n + 1 − an Alternating Permutations – p. 3 En En = #{w ∈ Sn : w is alternating} = #{w ∈ Sn : w is reverse alternating} via a1 a2 · · · an 7→ n + 1 − a1 , n + 1 − a2 , . . . , n + 1 − an E.g., E4 = 5: 2143, 3142, 3241, 4132, 4231 Alternating Permutations – p. 3 André’s theorem Theorem (Désiré André, 1879) xn En = sec x + tan x y := n! n≥0 X Alternating Permutations – p. 4 André’s theorem Theorem (Désiré André, 1879) xn En = sec x + tan x y := n! n≥0 X En is an Euler number, E2n a secant number, E2n−1 a tangent number. Alternating Permutations – p. 4 Naive proof 52439 | {z } 1826 |{z} ←− −→ alternating alternating Alternating Permutations – p. 5 Naive proof 52439 | {z } 1826 |{z} ←− −→ alternating alternating Obtain w that is either alternating or reverse alternating. Alternating Permutations – p. 5 Naive proof 52439 | {z } 1826 |{z} ←− −→ alternating alternating Obtain w that is either alternating or reverse alternating. ⇒ 2En+1 = n X k=0 n Ek En−k , n ≥ 1 k Alternating Permutations – p. 5 Completion of proof 2En+1 = n X n k=0 k Ek En−k , n ≥ 1 Alternating Permutations – p. 6 Completion of proof 2En+1 = n X n k=0 k Ek En−k , n ≥ 1 xn 2 En+1 = 2y 0 n! n≥0 ! n X X n xn Ek En−k = 1 + y2 n! k n≥0 X k=0 Alternating Permutations – p. 6 Completion of proof 2En+1 = n X n k=0 k Ek En−k , n ≥ 1 xn 2 En+1 = 2y 0 n! n≥0 ! n X X n xn Ek En−k = 1 + y2 n! k n≥0 X k=0 ⇒ 2y 0 = 1 + y 2 , etc. Alternating Permutations – p. 6 A generalization ∃ more sophisticated approaches. E.g., let fk (n) = #{w ∈ Sn : w(r) < w(r + 1) ⇔ k|r} f2 (n) = En Alternating Permutations – p. 7 A generalization ∃ more sophisticated approaches. E.g., let fk (n) = #{w ∈ Sn : w(r) < w(r + 1) ⇔ k|r} f2 (n) = En Theorem. X k≥0 xkn fk (kn) = (kn)! kn x (−1)n (kn)! n≥0 X !−1 . Alternating Permutations – p. 7 Combinatorial trigonometry Define sec x and tan x by xn En . sec x + tan x = n! n≥0 X Alternating Permutations – p. 8 Combinatorial trigonometry Define sec x and tan x by xn En . sec x + tan x = n! n≥0 X Exercise. sec2 x = 1 + tan2 x Alternating Permutations – p. 8 Combinatorial trigonometry Define sec x and tan x by xn En . sec x + tan x = n! n≥0 X Exercise. sec2 x = 1 + tan2 x tan x + tan y Exercise. tan(x + y) = 1 − (tan x)(tan y) Alternating Permutations – p. 8 Some occurences of Euler numbers (1) E2n−1 is the number of complete increasing binary trees on the vertex set [2n + 1] = {1, 2, . . . , 2n + 1}. Alternating Permutations – p. 9 Five vertices 1 2 2 3 4 5 4 3 5 5 2 4 2 4 1 3 5 4 2 5 4 5 3 5 4 4 3 1 3 2 4 5 4 3 1 2 3 5 2 1 4 3 1 5 3 5 2 2 1 3 4 5 4 1 3 1 2 2 5 2 4 1 3 5 1 2 3 1 3 1 2 1 4 1 1 2 5 3 5 4 Alternating Permutations – p. 10 Five vertices 1 2 2 3 4 5 4 3 5 5 2 4 2 4 1 3 5 4 2 5 4 5 3 5 4 4 3 1 3 2 4 5 4 3 1 2 3 5 2 1 4 3 1 5 3 5 2 2 1 3 4 5 4 1 3 1 2 2 5 2 4 1 3 5 1 2 3 1 3 1 2 1 4 1 1 2 5 3 5 4 Slightly more complicated for E2n Alternating Permutations – p. 10 Simsun permutations Definition. A permutation w = a1 · · · an ∈ Sn is simsun if for all 1 ≤ k ≤ n, the restriction b1 · · · bk of w to 1, 2, . . . , k has no double descents bi−1 > bi > bi+1 . Alternating Permutations – p. 11 Simsun permutations Definition. A permutation w = a1 · · · an ∈ Sn is simsun if for all 1 ≤ k ≤ n, the restriction b1 · · · bk of w to 1, 2, . . . , k has no double descents bi−1 > bi > bi+1 . Example. 346251 is not simsun: restriction to 1, 2, 3, 4 is 3421. Alternating Permutations – p. 11 Simsun permutations Definition. A permutation w = a1 · · · an ∈ Sn is simsun if for all 1 ≤ k ≤ n, the restriction b1 · · · bk of w to 1, 2, . . . , k has no double descents bi−1 > bi > bi+1 . Example. 346251 is not simsun: restriction to 1, 2, 3, 4 is 3421. Theorem (R. Simion and S. Sundaram) The number of simsun permutations w ∈ Sn is En . Alternating Permutations – p. 11 Chains of partitions (2) Start with n one-element sets {1}, . . . , {n}. Alternating Permutations – p. 12 Chains of partitions (2) Start with n one-element sets {1}, . . . , {n}. Merge together two at a time until reaching {1, 2, . . . , n}. Alternating Permutations – p. 12 Chains of partitions (2) Start with n one-element sets {1}, . . . , {n}. Merge together two at a time until reaching {1, 2, . . . , n}. 1−2−3−4−5−6, 12−3−4−5−6, 12−34−5−6 125−34−6, 125−346, 123456 Alternating Permutations – p. 12 Chains of partitions (2) Start with n one-element sets {1}, . . . , {n}. Merge together two at a time until reaching {1, 2, . . . , n}. 1−2−3−4−5−6, 12−3−4−5−6, 12−34−5−6 125−34−6, 125−346, 123456 Sn acts on these chains. Alternating Permutations – p. 12 Chains of partitions (2) Start with n one-element sets {1}, . . . , {n}. Merge together two at a time until reaching {1, 2, . . . , n}. 1−2−3−4−5−6, 12−3−4−5−6, 12−34−5−6 125−34−6, 125−346, 123456 Sn acts on these chains. Theorem. The number of Sn -orbits is En−1 . Alternating Permutations – p. 12 Orbit representatives for n = 5 12−3−4−5 123−4−5 1234−5 12−3−4−5 123−4−5 123−45 12−3−4−5 12−34−5 125−34 12−3−4−5 12−34−5 12−345 12−3−4−5 12−34−5 1234−5 Alternating Permutations – p. 13 A polytope volume Let Pn be the convex polytope in Rn with equations xi ≥ 0, 1 ≤ i ≤ n xi + xi+1 ≤ 1, 1 ≤ i ≤ n − 1. Alternating Permutations – p. 14 A polytope volume Let Pn be the convex polytope in Rn with equations xi ≥ 0, 1 ≤ i ≤ n xi + xi+1 ≤ 1, 1 ≤ i ≤ n − 1. 1 Theorem. vol(Pn ) = En n! Alternating Permutations – p. 14 Ulam’s problem Let E(n) be the expected length is(w) of the longest increasing subsequence of w. Alternating Permutations – p. 15 Ulam’s problem Let E(n) be the expected length is(w) of the longest increasing subsequence of w. w = 5241736 ⇒ is(w) = 3 Alternating Permutations – p. 15 Two highlights Long story . . . Alternating Permutations – p. 16 Two highlights Long story . . . Logan-Shepp, Vershik-Kerov: √ E(n) ∼ 2 n Alternating Permutations – p. 16 Two highlights Long story . . . Logan-Shepp, Vershik-Kerov: √ E(n) ∼ 2 n Write isn (w) for is(w) when w ∈ Sn . Baik-Deift-Johansson: √ isn (w) − 2 n lim Prob ≤ t = F (t), 1/6 n→∞ n the Tracy-Widom distribution. Alternating Permutations – p. 16 Alternating subsequences? as(w) = length of longest alternating subseq. of w w = 56218347 ⇒ as(w) = 5 Alternating Permutations – p. 17 The main lemma MAIN LEMMA. ∀ w ∈ Sn ∃ alternating subsequence of maximal length that contains n. Alternating Permutations – p. 18 The main lemma MAIN LEMMA. ∀ w ∈ Sn ∃ alternating subsequence of maximal length that contains n. ak (n) = #{w ∈ Sn : as(w) = k} bk (n) = a1 (n) + a2 (n) + · · · + ak (n) = #{w ∈ Sn : as(w) ≤ k}. Alternating Permutations – p. 18 Recurrence for ak (n) ⇒ ak (n) = X 2r+s=k−1 n X n−1 j=1 j−1 (a2r (j − 1) + a2r+1 (j − 1)) as (n − j) Alternating Permutations – p. 19 The main generating function Define B(x, t) = X k,n≥0 n x bk (n)tk n! Theorem. 2/ρ 1 B(x, t) = 1−ρ ρx − ρ , 1− t e √ where ρ= 1 − t2 . Alternating Permutations – p. 20 Formulas for bk (n) Corollary. ⇒ b1 (n) = 1 b2 (n) = n b3 (n) = 14 (3n − 2n + 3) b4 (n) = .. . 1 n 8 (4 − (2n − 4)2n ) Alternating Permutations – p. 21 Formulas for bk (n) Corollary. ⇒ b1 (n) = 1 b2 (n) = n b3 (n) = 14 (3n − 2n + 3) b4 (n) = .. . 1 n 8 (4 − (2n − 4)2n ) no such formulas for longest increasing subsequences Alternating Permutations – p. 21 Mean (expectation) of as(w) 1 X D(n) = as(w), n! w∈Sn the expectation of as(n) for w ∈ Sn Alternating Permutations – p. 22 Mean (expectation) of as(w) 1 X D(n) = as(w), n! w∈Sn the expectation of as(n) for w ∈ Sn Let n x A(x, t) = ak (n)tk = (1 − t)B(x, t) n! k,n≥0 ! 1 2/ρ . = (1 − t) 1−ρ ρx − ρ 1− t e X Alternating Permutations – p. 22 Formula for D(n) X n≥0 D(n)x n ∂ = A(x, 1) ∂t 6x − 3x2 + x3 = 6(1 − x)2 X 4n + 1 = x+ xn . 6 n≥2 Alternating Permutations – p. 23 Formula for D(n) X n≥0 D(n)x n ∂ = A(x, 1) ∂t 6x − 3x2 + x3 = 6(1 − x)2 X 4n + 1 = x+ xn . 6 n≥2 4n + 1 , n≥2 ⇒ A(n) = 6 Alternating Permutations – p. 23 Formula for D(n) X n≥0 D(n)x n ∂ = A(x, 1) ∂t 6x − 3x2 + x3 = 6(1 − x)2 X 4n + 1 = x+ xn . 6 n≥2 4n + 1 , n≥2 ⇒ A(n) = 6 √ Recall E(n) ∼ 2 n. Alternating Permutations – p. 23 Variance of as(w) 2 X 4n + 1 1 as(w) − V (n) = , n≥2 n! 6 w∈Sn the variance of as(n) for w ∈ Sn Alternating Permutations – p. 24 Variance of as(w) 2 X 4n + 1 1 as(w) − V (n) = , n≥2 n! 6 w∈Sn the variance of as(n) for w ∈ Sn Corollary. 8 13 V (n) = n − , n≥4 45 180 Alternating Permutations – p. 24 Variance of as(w) 2 X 4n + 1 1 as(w) − V (n) = , n≥2 n! 6 w∈Sn the variance of as(n) for w ∈ Sn Corollary. 8 13 V (n) = n − , n≥4 45 180 similar results for higher moments Alternating Permutations – p. 24 A new distribution? P (t) = lim Probw∈Sn n→∞ as(w) − 2n/3 √ ≤t n Alternating Permutations – p. 25 A new distribution? P (t) = lim Probw∈Sn n→∞ as(w) − 2n/3 √ ≤t n Stanley distribution? Alternating Permutations – p. 25 Limiting distribution Theorem (Pemantle, Widom, (Wilf)). as(w) − 2n/3 √ ≤t lim Probw∈Sn n→∞ n 1 =√ π (Gaussian distribution) Z √ t 45/4 e −s2 ds −∞ Alternating Permutations – p. 26 Limiting distribution Theorem (Pemantle, Widom, (Wilf)). as(w) − 2n/3 √ ≤t lim Probw∈Sn n→∞ n 1 =√ π (Gaussian distribution) Z √ t 45/4 e −s2 ds −∞ Alternating Permutations – p. 26 Umbral enumeration Umbral formula: involves E k , where E is an indeterminate (the umbra). Replace E k with the Euler number Ek . (Technique from 19th century, modernized by Rota et al.) Alternating Permutations – p. 27 Umbral enumeration Umbral formula: involves E k , where E is an indeterminate (the umbra). Replace E k with the Euler number Ek . (Technique from 19th century, modernized by Rota et al.) Example. (1 + E 2 )3 = = = = 1 + 3E 2 + 3E 4 + E 6 1 + 3E2 + 3E4 + E6 1 + 3 · 1 + 3 · 5 + 61 80 Alternating Permutations – p. 27 Another example (1 + t)E = = = = = E 2 E 3 t + t + ··· 1 + Et + 2 3 1 1 + Et + E(E − 1)t2 + · · · 2 1 1 + E1 t + (E2 − E1 ))t2 + · · · 2 1 1 + t + (1 − 1)t2 + · · · 2 1 + t + O(t3 ). Alternating Permutations – p. 28 Alt. fixed-point free involutions fixed point free involution w ∈ S2n : all cycles of length two Alternating Permutations – p. 29 Alt. fixed-point free involutions fixed point free involution w ∈ S2n : all cycles of length two Let f (n) be the number of alternating fixed-point free involutions in S2n . Alternating Permutations – p. 29 Alt. fixed-point free involutions fixed point free involution w ∈ S2n : all cycles of length two Let f (n) be the number of alternating fixed-point free involutions in S2n . n = 3 : 214365 = (1, 2)(3, 4)(5, 6) 645231 = (1, 6)(2, 4)(3, 5) f (3) = 2 Alternating Permutations – p. 29 An umbral theorem Theorem. F (x) = X f (n)xn n≥0 Alternating Permutations – p. 30 An umbral theorem Theorem. F (x) = X f (n)xn n≥0 = 1+x 1−x (E 2 +1)/4 Alternating Permutations – p. 30 An umbral theorem Theorem. F (x) = X f (n)xn n≥0 = 1+x 1−x (E 2 +1)/4 Proof. Uses representation theory of the symmetric group Sn . In particular, there is a “nice” representation of dimension En . Alternating Permutations – p. 30 Ramanujan’s Lost Notebook Theorem (Ramanujan, Berndt, implicitly) As x → 0+, X 1 − x n(n+1) X ∼ f (k)xk = F (x), 2 1 + x n≥0 k≥0 an analytic (non-formal) identity. Alternating Permutations – p. 31 A formal identity Corollary (via Ramanujan, Andrews). Qn 2j−1 X (1 − q ) j=1 n F (x) = 2 , q Q2n+1 j) (1 + q j=1 n≥0 where q = 1−x 2/3 1+x , a formal identity. Alternating Permutations – p. 32 Simple result, hard proof Recall: number of n-cycles in Sn is (n − 1)!. Alternating Permutations – p. 33 Simple result, hard proof Recall: number of n-cycles in Sn is (n − 1)!. Theorem. Let b(n) be the number of alternating n-cycles in Sn . Then if n is odd, 1X b(n) = µ(d)(−1)(d−1)/2 En/d . n d|n Alternating Permutations – p. 33 Special case Corollary. Let p be an odd prime. Then 1 Ep − (−1)(p−1)/2 . b(p) = p Alternating Permutations – p. 34 Special case Corollary. Let p be an odd prime. Then 1 Ep − (−1)(p−1)/2 . b(p) = p Combinatorial proof? Alternating Permutations – p. 34 Another such result Recall: the expected number of fixed points of w ∈ Sn is 1. Alternating Permutations – p. 35 Another such result Recall: the expected number of fixed points of w ∈ Sn is 1. J (n) = expected number of fixed points of reverse alternating w ∈ Sn 1 Theorem. J(2n) = (E2n − (−1)n ). E2n Similar (but more complicated) for n odd or for alternating permutations. Alternating Permutations – p. 35 Another such result Recall: the expected number of fixed points of w ∈ Sn is 1. J (n) = expected number of fixed points of reverse alternating w ∈ Sn 1 Theorem. J(2n) = (E2n − (−1)n ). E2n Similar (but more complicated) for n odd or for alternating permutations. Combinatorial proof? Alternating Permutations – p. 35 Descent sets Let w = a1 a2 · · · an ∈ Sn . Descent set of w: D(w) = {i : ai > ai+1 } ⊆ {1, . . . , n − 1} Alternating Permutations – p. 36 Descent sets Let w = a1 a2 · · · an ∈ Sn . Descent set of w: D(w) = {i : ai > ai+1 } ⊆ {1, . . . , n − 1} D(4157623) = {1, 4, 5} D(4152736) = {1, 3, 5} (alternating) D(4736152) = {2, 4, 6} (reverse alternating) Alternating Permutations – p. 36 βn(S) βn (S) = #{w ∈ Sn : D(w) = S} Alternating Permutations – p. 37 βn(S) βn (S) = #{w ∈ Sn : D(w) = S} w D(w) 123 ∅ 213 {1} 312 {1} 132 {2} 231 {2} 321 {1, 2} β3 (∅) = 1, β3 (1) = 2 β3 (2) = 2, β3 (1, 2) = 1 Alternating Permutations – p. 37 uS Fix n. Let S ⊆ {1, · · · , n − 1}. Let uS = t1 · · · tn−1 , where ( a, i 6∈ S ti = b, i ∈ S. Alternating Permutations – p. 38 uS Fix n. Let S ⊆ {1, · · · , n − 1}. Let uS = t1 · · · tn−1 , where ( a, i 6∈ S ti = b, i ∈ S. Example. n = 8, S = {2, 5, 6} ⊆ {1, . . . , 7} uS = abaabba Alternating Permutations – p. 38 A noncommutative gen. function Ψn (a, b) = X βn (S)uS . S⊆{1,...,n−1} Alternating Permutations – p. 39 A noncommutative gen. function Ψn (a, b) = X βn (S)uS . S⊆{1,...,n−1} Example. Recall β3 (∅) = 1, β3 (1) = 2, β3 (2) = 2, β3 (1, 2) = 1 Thus Ψ3 (a, b) = aa + 2ab + 2ba + bb Alternating Permutations – p. 39 A noncommutative gen. function Ψn (a, b) = X βn (S)uS . S⊆{1,...,n−1} Example. Recall β3 (∅) = 1, β3 (1) = 2, β3 (2) = 2, β3 (1, 2) = 1 Thus Ψ3 (a, b) = aa + 2ab + 2ba + bb = (a + b)2 + (ab + ba) Alternating Permutations – p. 39 The cd-index Theorem. There exists a noncommutative polynomial Φn (c, d), called the cd-index of Sn , with nonnegative integer coefficients, such that Ψn (a, b) = Φn (a + b, ab + ba). Alternating Permutations – p. 40 The cd-index Theorem. There exists a noncommutative polynomial Φn (c, d), called the cd-index of Sn , with nonnegative integer coefficients, such that Ψn (a, b) = Φn (a + b, ab + ba). Example. Recall Ψ3 (a, b) = aa + 2ab + 2ba + b2 = (a + b)2 + (ab + ba). Therefore Φ3 (c, d) = c2 + d. Alternating Permutations – p. 40 Small values of Φn(c, d) Φ1 Φ2 Φ3 Φ4 Φ5 Φ6 = = = = = = 1 c c2 + d c3 + 2cd + 2dc c4 + 3c2 d + 5cdc + 3dc2 + 4d2 c5 + 4c3 d + 9c2 dc + 9cdc2 + 4dc3 +12cd2 + 10dcd + 12d2 c. Alternating Permutations – p. 41 The set Sµ Recall: w = a1 · · · an ∈ Sn is simsun if for all 1 ≤ k ≤ n, the restriction b1 · · · bk of w to 1, 2, . . . , k has no double descents bi−1 > bi > bi+1 . Alternating Permutations – p. 42 The set Sµ Recall: w = a1 · · · an ∈ Sn is simsun if for all 1 ≤ k ≤ n, the restriction b1 · · · bk of w to 1, 2, . . . , k has no double descents bi−1 > bi > bi+1 . Given a cd-monomial µ, let c → 0, d → 10, and remove final 0. Example. µ = cd2 c2 d → 01010001, the characteristic vector of Sµ = {2, 4, 8}. Alternating Permutations – p. 42 The coefficients of Φn(c, d) Theorem (Simion-Sundaram) Let µ be a cd-monomial of degree n − 1. The coefficient of µ in Φn (c, d) is the number of simsun permutations w ∈ Sn−1 with descent set Sµ . Alternating Permutations – p. 43 The case n = 4 w D(w) µ 123 ∅ c3 → 00 213 1 dc → 10 312 1 dc → 10 132 2 cd → 01 231 2 cd → 01 ⇒ Φ4 (c, d) = c3 + 2dc + 2cd Alternating Permutations – p. 44 Expansion of cd-monomials Let m = m(c, d) be a cd-monomial, e.g., c2 d2 cd. Expand m(a + b, ab + ba): (a + b)2 (ab + ba)2 (a + b)(ab + ba) = a9 + ba8 + · · · . Alternating Permutations – p. 45 Expansion of cd-monomials Let m = m(c, d) be a cd-monomial, e.g., c2 d2 cd. Expand m(a + b, ab + ba): (a + b)2 (ab + ba)2 (a + b)(ab + ba) = a9 + ba8 + · · · . Key observation: m(a + b, ab + ba) is a sum of distinct monomials, always including ababab · · · and bababa · · · . Alternating Permutations – p. 45 Alternating permutations The coefficient of ababab · · · and of bababa · · · in Ψn (a, b) is βn (2, 4, 6, . . . ) = βn (1, 3, 5, . . . ) = En . Alternating Permutations – p. 46 Alternating permutations The coefficient of ababab · · · and of bababa · · · in Ψn (a, b) is βn (2, 4, 6, . . . ) = βn (1, 3, 5, . . . ) = En . Hence: Theorem. (a) Φn (1, 1) = En (can interpret coefficients combinatorially). (b) For all S ⊆ {1, . . . , n − 1}, βn (S) ≤ βn (1, 3, 5, . . . ) = En . Alternating Permutations – p. 46 An example Φ5 = 1c4 + 3c2 d + 5cdc + 3dc2 + 4d2 1 + 3 + 5 + 3 + 4 = 16 = E5 Alternating Permutations – p. 47 Comments N OTE . (b) is due originally to Niven and later de Bruijn (different proofs). Alternating Permutations – p. 48 Comments N OTE . (b) is due originally to Niven and later de Bruijn (different proofs). N OTE . Not hard to show that βn (S) < En unless S = {1, 3, 5, . . . } or S = {2, 4, 6, . . . }. Alternating Permutations – p. 48 Alternating Permutations – p. 49