Permutations which are the union of an increasing and a decreasing subsequence

M.D. Atkinson School of Mathematical and Computational Sciences North Haugh, St Andrews, Fife KY16 9SS, UK

                mda@@dcs.st-and.ac.uk

Abstract

It is shown that there are \binom{2n}{n} − ∑_{m=0}^{n−1} 2^{n−m−1}\binom{2m}{m} permutations which are the union of an increasing sequence and a decreasing sequence.

1991 Mathematics Subject Classification 05A15 Submitted: December 1, 1997; Accepted: January 10, 1998

1 Introduction

Merge permutations, permutations which are the union of two increasing subsequences, have been studied for many years [3]. It is known that they are characterised by the property of having no decreasing subsequence of length 3 and that there are \binom{2n}{n}/(n + 1) such permutations of length n.

Recently there has been some interest in permutations which are the union of an increasing subsequence with a decreasing subsequence. We call such permutations skew-merged. Stankova [4] proved that a permutation is skewmerged if and only if it has no subsequence abcd ordered in the same way as 2143 or 3412. In [1, 2] the more general problem of partitioning a permutation into given numbers of increasing and decreasing subsequences is considered.

Figure 1: The graph of a skew-merged permutation

This paper solves the enumeration problem for skew-merged permutations. The proof yields another proof of Stankova’s result. Finally, a corollary allows the skew-merged enumeration result to be compared with the enumeration of merge permutations.

2 Points and colours

We shall consider sets of ‘points’ (a, b) in the (x, y)-plane. Our point sets will always have the property that there is no duplicated first coordinate or second coordinate. In view of that condition there are two natural total orders on points. If P = (a, b) and Q = (c, d) are points then we define P..Q if a < c and P < Q if b < d.

Two sets of points S, T are said to be order isomorphic if there is a one-to one correspondence between them which respects both total orders. A set of n points is called normal if its sets of x-coordinates and y-coordinates are each {1, 2, …, n}. It is easy to see that every set of points is order isomorphic to a unique normal set. Note that a point set corresponds to a poset of dimension 2.

Every permutation σ = [s_{1}, …, s_{n}] defines and is defined by a normal set {(i, s_{i})}_{i=1}^{n} and we shall find it helpful to depict a permutation by its set of points plotted in the (x, y)-plane. If the permutation is skew-merged this graph looks like Figure 1 where the increasing and decreasing subsequences are clearly visible. In the terminology of dimension 2 posets, an increasing subsequence is a chain and a decreasing subsequence is an anti-chain.

There are three involutory symmetry operations r, s, t on point sets and permutations defined on the points P = (a, b) of a permutation σ of length n as follows

r(P) = (n + 1 − a, b)
s(P) = (a, n + 1 − b)
t(P) = (b, a)

We let r(σ), s(σ), t(σ) be the corresponding permutations and note the following elementary result:

Lemma 1 (i) If P, Q are points of the permutation σ, then P..Q if and only if r(Q)..r(P) in r(σ) if and only if s(P)..s(Q) in s(σ) if and only if t(P) < t(Q) in t(σ)

(ii) σ is skew-merged if and only if any or all of r(σ), s(σ), t(σ) are skewmerged.

If P is one of the points in the set P of points of the permutation σ then P \ P is a set of points with no duplicate first or second coordinates and therefore it corresponds to some permutation τ and we write

τ = σ − P

This corresponds to removing one of the components of σ = [s_{1}, …, s_{n}] and relabelling and renumbering the remaining components appropriately.

We divide the points of a permutation σ into 5 classes Red, Blue, Green, Yellow, and White by the following rules:

(r) if P..Q..R and Q < R < P then P is red

(b) if P..Q..R and Q < P < R then R is blue

(g) if P..Q..R and P < R < Q then P is green

(y) if P..Q..R and R < P < Q then R is yellow

(w) if P is not red, blue, green or yellow, then P is white

Figure 2: Disposition of colours

There is a more convenient way of expressing these conditions. If P, Q, R are any 3 points and [a, b, c] is any permutation of 1, 2, 3 then we write P QR ∼ abc if P..Q..R and, with respect to “<”, P, Q, R are ordered in the same way as a, b, c. The premises of (r), (b), (g), (y) above are then P QR ∼ 312, P QR ∼ 213, P QR ∼ 132, P QR ∼ 231 respectively. We also adopt this language for sets of 4 or more points. For example, if P, Q, R, S are 4 points such that P..Q..R..S and Q < P < S < R we would write P QRS ∼ 2143.

The aim of this section is to prove the following

Theorem 1 The graph of a skew-merged permutation has the form shown in Figure 2. In this figure the vertical and horizontal lines have the obvious separation meaning; for example, if R and W are red and white points we would have R..W and W < R. Furthermore, the green and blue points are increasing, the red and yellow points are decreasing, and the white points are either increasing or decreasing.

In proving this theorem we shall use only the property of skew-merged permutations that they avoid 3412 and 2143; in our ‘point’ terminology this means that there do not exist 4 points P, Q, R, S with P QRS ∼ 3412 or P QRS ∼ 2143. Since a permutation with a graph of the above form is evidently skew-merged we obtain another proof of Stankova’s result.

Lemma 2 Let P be a point of a permutation σ. Then

(i) P is red in σ if and only if r(P) is blue in r(σ)

(ii) P is green in σ if and only if r(P) is yellow in r(σ)

(iii) P is red in σ if and only if s(P) is green in s(σ)

(iv) P is blue in σ if and only if s(P) is yellow in s(σ)

(v) P is red in σ if and only if t(P) is yellow in t(σ)

(vi) P is green in σ if and only if t(P) is green in t(σ)

(vii) P is blue in σ if and only if t(P) is blue in t(σ)

(viii) P is white in σ if and only if any or all of r(P), s(P), t(P) are white in r(σ), s(σ), t(σ) respectively.

Proof All the statements follow easily from the definitions. For example, suppose that P is red in σ so that there are points Q, R with P QR ∼ 312. Then r(P), r(Q), r(R) are points of r(σ) with r(R)r(Q)r(P) ∼ 213; therefore r(P) is blue in r(σ) ■

Lemma 3 In a skew-merged permutation σ every point has exactly one colour.

Proof Suppose first that a point P is coloured both red and green in σ. Then there are points Q, R, S, T with P..Q..R, P..S..T, Q < R < P, and P < T < S. In particular, Q < R < P < T < S. If Q..S then P QST ∼ 2143, a contradiction, and if S..Q then P SQR ∼ 3412, also a contradiction.

It now follows from the symmetry operations and Lemma 2 that P cannot be coloured both blue and yellow (or r(P) would be both red and green in r(σ)); nor can P be both yellow and green (or t(P) would be red and green in t(σ)); nor can P be both red and blue (or t(s(P)) would be both red and green in t(s(σ))).

Suppose next that P is both red and yellow in σ. Then there are points Q, R, S, T with P..Q..R, S..T..P, Q < R < P, and P < S < T But then ST QR ∼ 3412. The remaining possibility, that P is both blue and green, can also be excluded by symmetry (r(P) would be red and yellow in r(σ)). ■

Lemma 4 If σ is skew-merged and P..S are points of σ then (i) if P, S are both red or both yellow then S < P

(ii) if P, S are both blue or both green then P < S

Proof Suppose that P, S are both red. Then there are points Q, R, T, U with P..Q..R, S..T..U, Q < R < P, and T < U < S. Suppose, for a contradiction, that P < S. Then, since P..S..T..U and P ST U ≁ 3412 we must have P < U. Also, S..Q is impossible, otherwise P SQR ∼ 3412. But now P QSU ∼ 2143 which is the required contradiction.

Suppose next that P, S are both yellow. Then, as P..S, t(P) < t(S) in t(σ) and t(P), t(S) are red in t(σ). But we have just seen that this means t(S)..t(P) in t(σ) and therefore S < P in σ.

For part (ii), if P, S are both blue (green) then s(P), s(S) are both red (yellow) and s(P)..s(S). So, by part (i), s(S) < s(P) and therefore P < S. ■

Lemma 5 Suppose that σ is skew-merged with points R, B, G, Y coloured red, blue, green, yellow respectively. Then

(i) R..Y (ii) G..B (iii) G < B (iv) Y < R
(v) R..B (vi) G..Y (vii) G < R (viii) Y < B

Proof Since R is red and Y is yellow there are points S, T, U, V with R..S..T, U..V..Y, S < T < R, Y < U < V. Suppose that Y..R. Then either

(a) T < U in which case UV ST ∼ 3412, or

(b) U < T in which case UY RT ∼ 2143

This contradiction proves that R..Y.

Symmetry arguments prove relations (ii), (iii), and (iv). Thus, since s(G) is red and s(B) is yellow in s(σ), we have s(G)..s(B) and therefore G..B. Next, since t(R), t(B), t(G), t(Y) are yellow, blue, green, red respectively, we have t(Y)..t(R) and t(G)..t(B) in t(σ) and so Y < R and G < B in σ.

To prove part (v) we consider two points X, Z such that XZB ∼ 213 which exist since B is blue. Suppose that B..R. Then either (a) T < X in which case XBST ∼ 3412, or

(b) X < T in which case XZRT ∼ 2143

This contradiction proves that R..B and, as before, symmetry arguments justify the other relations. ■

These lemmas have proved that the disposition of the red, blue, green, and yellow points in the graph of a skew-merged permutation σ is as given in Theorem 1. The next two lemmas show that the white points are disposed as claimed.

Lemma 6 If R, B, G, Y are points of colour red, blue, green, yellow in a permutation, and P is a white point, then

(i) R..P  (ii) G..P  (iii) P..B  (iv) P..Y
(v) G < P (vi) Y < P (vii) P < R (viii) P < B

Proof Since R is red there are two points S, T with RST ∼ 312. If P..R then either T < P in which case P ST ∼ 312 so P would be red, or P < T in which case P RT ∼ 132 and P would be green. All the other statements follow by symmetry. ■

To complete the proof of Theorem 1 we have

Lemma 7 The white points of a permutation are either increasing or decreasing.

Proof From the definitions of red, blue, green, yellow every triple A..B..C of white points must satisfy ABC ∼ 123 or ABC ∼ 321. Since every triple is either increasing or decreasing the lemma follows. ■

3 Enumeration

In this section we use Theorem 1 to derive the following theorem.

Theorem 2 The number of skew-merged permutations of length n is

\binom{2n}{n} − ∑_{m=0}^{n−1} 2^{n−m−1}\binom{2m}{m}

To prove this we enumerate the skew-merged permutations according to their number of white points. Let t_{i}(n) denote the number of skew-merged permutations of length n with exactly i white points.

Lemma 8 ∑_{i=0}^{n}(i + 1)t_{i}(n) = \binom{2n}{n}

Proof Suppose that σ is skew-merged and let α, β be a pair of increasing and decreasing subsequences whose union is σ. Let A, B be the sets of points of α, β. Consider a red point R and let S, T be the corresponding points satisfying R..S..T and S < T < R. Suppose that R ∈ A. Then, since R..S and S < R, S cannot also belong to A. Therefore S ∈ B and, similarly, T ∈ B. However, S..T and S < T and this is a contradiction. Therefore all red points belong to B. By a similar argument all yellow points belong to B also, and all blue and green points belong to A.

Suppose that σ has i white points which, without loss in generality, we shall suppose are increasing. Then at most one of the white points can belong to B. It follows that there are at most i + 1 possibilities for the pair (α, β) and, by Theorem 1, all of these possibilities do indeed yield a pair of increasing and decreasing subsequences whose union is σ.

The left-hand side of the equation in the lemma therefore counts the number of increasing, decreasing pairs (α, β) whose union is a skew-merged permutation. However, we can count these in another way. If |α| = r we may choose the first components of the points of A in \binom{n}{r} ways and, independently, the second components in \binom{n}{r} ways also. So the number of (α, β) pairs is therefore

∑_{r=0}^{n} \binom{n}{r}^{2} = \binom{2n}{n}

■

Lemma 9 ∑_{i=1}^{n} t_{i}(n) = \binom{2n−2}{n−1}

Proof The left-hand side of the equation in the lemma is the number of skew-merged permutations with at least one white point. These permutations are exactly those which are the union of an increasing subsequence α and a decreasing subsequence β that have a common point. In such a permutation

Figure 3: Young tableau

(σ, say) α is a maximal increasing subsequence and β is a maximal decreasing subsequence. It follows that the pair of Young tableaux which correspond, in the Robinson-Schensted correspondence, to σ are shaped like the one shown in Figure 3.

Conversely, every such pair of Young tableaux corresponds to a skew-merged permutation with at least one white point. By the hook formula [3] §5.1.4, the number of such tableaux with exactly r cells in the first row is

\frac{n!}{n(r − 1)!(n − r)!} = \binom{n − 1}{r − 1}

and hence the number of tableaux pairs is

∑_{r=1}^{n} \binom{n − 1}{r − 1}^{2} = \binom{2n − 2}{n − 1}

■

Note that skew-merged permutations with no white points correspond to Young tableau pairs with a shape similar to Figure 3 but with a cell in the (2, 2) position. Unfortunately, not every Young tableau pair of this form gives a skew-merged permutation.

Lemma 10 For all i > 2, t_{i}(n) = t_{i−1}(n − 1)

Proof Suppose that σ is a permutation of length n with i white points. Then, by Theorem 1, σ − W is independent of W provided only that W is a white point of σ. Since i > 2 the deletion of W cannot change the colour of any point of σ and so σ − W has i − 1 white points.

Conversely, suppose that τ is of length n − 1 with i − 1 white points which, since i > 2 are either increasing or decreasing but not both. Then there is a unique permutation σ with i white points such that σ − W = τ for some white point W of σ. This one to one correspondence proves the lemma. ■

Lemma 11 Suppose that σ is a skew-merged permutation with either one white point (or no white points). Then there exist points R, B, G, Y with colours red, blue, green, yellow such that either

(i) RGW BY ∼ 41352 (or RGBY ∼ 3142) and W is the only point (or there is no point) in G..W..B, or

(ii) GRW Y B ∼ 25314 (or GRY B ∼ 2413) and W is the only point (or there is no point) in R..W..Y

Proof Choose red, blue, green, yellow points R, B, G, Y so that R, G are largest of their colour with respect to “..” and B, Y are smallest of their colour (equivalently, G, Y are largest of their colour under “<” and R, B are smallest of their colour). According to Theorem 1, R, B, G, Y are ordered under “..” as R..G..B..Y, R..G..Y..B, G..R..B..Y, or G..R..Y..B. Similarly there are four possible ways in which they can be ordered under “<”.

Consider the ordering R..G..Y..B. Since G is green there are points P, Q with G..P..Q and G < Q < P. Not both P, Q can be blue since the blue points are increasing, and nor, by hypothesis, can both be white. Further, neither can be red or green since R..G and R and G are the maximal red and green points under “..”. Thus at least one of them, P say is yellow. Since the yellow points are decreasing and Y is the smallest yellow point under “..” we have Y..P or Y = P, and so G < P ≤ Y. By a similar argument based on the condition that Y is yellow we can deduce that Y < G, a contradiction. Thus R..G..Y..B is impossible.

The symmetry conditions now also exclude the possibilities G..R..B..Y and also G < Y < B < R, and Y < G < R < B.

Suppose next that R..G..B..Y and Y < G < B < R. Since G is green there are points G..P..Q with G < Q < P. Since Y < G, P and Q cannot be yellow and so they must be white or blue with not both white; it follows that P < Q, a contradiction. Finally, symmetry rules out the case G..R..Y..B, G < Y < R < B.

The remaining cases are

(i) R..G..B..Y and G < Y < R < B

(ii) G..R..Y..B and Y < G < B < R

In case (i) a single white point W must, by Theorem 1, satisfy G..W..B and Y < W < R so that RGW BY ∼ 41352 giving the first alternative of the lemma. Case (ii) gives the second alternative. ■

Lemma 12 t_{1}(n) = t_{0}(n − 1)

Proof Suppose σ is of length n and has exactly one white point. Let R, B, G, Y be the points guaranteed by the previous lemma. If we remove the single white point we are left with 4 points such that

(i) RGBY ∼ 3142 with no point between G..B or

(ii) GRY B ∼ 2413 with no point between R..Y

These points remain coloured as they were (GBY ∼ 132 ensures G is green, RGB ∼ 213 ensures B is blue etc) and so we have obtained a sequence with no white points. Conversely, the last lemma shows that a sequence without white points has this form for some R, B, G, Y. If we insert a point W satisfying G..W..B and Y < W < R in case (i) and R..W..B and G < W < B in case (ii) this point must be white (as it is part of both an increasing sequence and a decreasing sequence in a skew-merged decomposition, see the proof of Lemma 8). We therefore have a one-to-one correspondence proving that t_{1}(n) = t_{0}(n − 1). ■

Since t_{n−i}(n) is independent of n if i ≤ n − 2 (Lemma 10) we may set b_{i} = t_{n−i}(n) for all i ≤ n − 2. Also, we let a_{n} = t_{0}(n) from which, by Lemma 12, we find t_{1}(n) = t_{0}(n − 1) = a_{n−1}. Hence the number of skew-merged permutations is

s_{n} = t_{0}(n) + t_{1}(n) + … + t_{n}(n)
= a_{n} + a_{n−1} + b_{n−2} + … + b_{0}

Rewriting Lemmas 8 and 9 we obtain

a_{n} + 2a_{n−1} + 3b_{n−2} + 4b_{n−3} + … + (n + 1)b_{0} = \binom{2n}{n}

a_{n−1} + b_{n−2} + b_{n−3} + … + b_{0} = \binom{2n − 2}{n − 1}

These equations are easily solved. Differencing reduces them to a pair of low order inhomogeneous linear recurrence equations to which the method of generating functions may be applied. We obtain the generating function

∑_{n=0}^{∞} s_{n}x^{n} = \frac{(1 − 3x)}{(1 − 2x)\sqrt{1 − 4x}}

from which we find

s_{n} = \binom{2n}{n} − ∑_{m=0}^{n−1} 2^{n−m−1}\binom{2m}{m}

proving Theorem 2. Finally, we have an asymptotic result.

Corollary 1

\frac{s_{n}}{\binom{2n}{n}} → 1/2 as n → ∞

Proof From Theorem 2 it follows that

s_{n} = 2s_{n−1} + \frac{n − 2}{n}\binom{2n − 2}{n − 1}

In this equation we divide through by \binom{2n}{n}, and put r_{n} = s_{n}/\binom{2n}{n} to obtain

r_{n} = \frac{n}{2n − 1}r_{n−1} + \frac{n − 2}{4n − 2}

and take the limit as n → ∞. ■

Acknowledgement I thank Dominic Tulley for several useful observations during the course of this work.

References

[1] A. Brandstädt, D. Kratsch: On partitions of permutations into increasing and decreasing subsequences. Elektron. Informationsverarb. Kybernet. 22 (1986), 263–273

[2] A.E. Kézdy, H.S. Snevily, C. Wang: Partitioning permutations into increasing and decreasing subsequences, J. Combinatorial Theory A 74 (1996), 353–359.

[3] D.E. Knuth: Sorting and Searching (The Art of Computer Programming volume 3), Addison Wesley, Reading, MA, 1973.

[4] Z. E. Stankova: Forbidden subsequences, Discrete Math. 132 (1994), 291–316