Descents after maxima in compositions

We consider compositions of n , i


Introduction
Compositions of n are finite sequences of positive integers (σ i ) k i=1 with k parts such that We define the first maximum σ m to be that part satisfying σ m > σ i for all i with 0 < i < m and σ m ≥ σ i for all i such that m ≤ i ≤ k.Informally, the first maximum is the part which is larger than any parts to its left and not less than any parts to its right.The variable of interest here is the size of the descent after the first maximum.We define the descent to be where k is the number of parts.
Analogously we define the last maximum and the descent following it.Two examples for the compositions of 17 illustrating these descents are: Firstly, 1 3 5 1 4 3.There is only one maximum, σ 3 = 5, so clearly the descent after the first or the last maximum is the same; it is 4.
Secondly, 1 3 3 5 5.There are two consecutive maxima where σ 4 = σ 5 = 5.The descent after the first maximum is 0 whereas the descent after the last maximum is 5.
Much recent work has been done on compositions.For example, see the book [9] and [1,2,7,10].In particular, ascents and descents in compositions were studied in [3] and maxima have been studied in [12].
We obtain generating functions for the descents occurring immediately after the first and the last maxima, by splitting these compositions into blocks that occur before and after these maxima.From this, we obtain generating functions for the average descents after the first or last maximum in compositions of n.
Using the Mellin transform, we find asymptotic expressions for these averages.In Section 5, we specify a simple bijection between the compositions of n in order to show that, on average, the descent after the last maximum is greater than the descent after the first maximum for compositions where n > 1.
2 Descent after the first maximum

Symbolic decomposition
We split the compositions of n into 2 cases, depending on where the first maximum occurs.It can either be before or at the end.Fixing h as the height of the maximum, we represent these cases symbolically in the diagram below: The first maximum decomposition where the maximum height is h In both cases, the three sub-compositions is empty, the first maximum is at the start and the part σ i+1 ensures that the maximum is before the end.The second case indicates that the only maximum occurs at the end.

Generating function for the descent after the first maximum
Our aim is to find the generating function F (x, y, u) where x counts the size of the composition, y the number of parts and u the size of the descent after the first maximum.(This, by symmetry, is equivalent to the generating function for the size of the ascent before the last maximum).We need the following well-known lemma, see [8,9].

Lemma 1
The generating function for compositions with largest part less than or equal to h where h ≥ 0, is For a non-empty composition, let the size of the first maximum be h ≥ 1.Firstly, consider the left case in Figure 1, the generating function for the single part σ i+1 that is situated just after the first maximum is Incorporating this term, the generating function F h (x, y, u) that covers both cases shown in Figure 1 is Since this is for a fixed h, we need to sum over all possible values of h.Thus where the first term is for the empty composition.Thus by Lemma 1, we have our first result: Theorem 1 The generating function for compositions of n where x counts the size of the composition, y the number of parts and u the size of the descent after the first maximum is Putting y = 1, i.e., ignoring the number of parts, the generating function becomes (2.2) 3 Sum of the descents after the first maximum We are now in a position to find the sum of the descents after the first maximum in all the compositions of n.This is given by We simplify this series by considering the finite sum to N and thereafter choosing N sufficiently large.
To find the coefficient of x n in A(x), we may choose any N with N ≥ n.Since we are only interested in the terms up to x n , the last term . Thus, we wish to find the coefficient of where For example, for N = 10, both series expansions for f N (x) and A(x) begin with x + 2x 2 + 6x

Asymptotics
We rewrite the generating function (3.3) in the form The coefficients of x n in the first two terms of f N (x) are 1 and −2 n−1 , respectively for n > 1.
We next consider For h > 2, let ρ h be the smallest positive root of 1 − 2x + x h that lies between 1 2 and 1.An application of the principle of the argument shows such a root ρ h exists, with all other roots being of larger modulus.By dominant pole analysis, see [5,6], The denominator 1 − 2x + x h behaves like a perturbation of 1 − 2x near x = 1 2 , so one expects ρ h to be approximated by 1  2 as h → ∞.By "bootstrapping" we find that and hence c h = 1 2 (1 + O(h2 −h )).As in Knuth [11] or Chapter 5 of [6], the dominant terms of n h=2 q n,h occurs for a restricted range of h such as n −3 ≤ 2 −h ≤ log n n , for which Again, as in Knuth [11], we may incorporate the asymptotically small tails of the sums to show For x ∈ R, the Mellin transform of the function g(x) is Here, we have used the fact that the Mellin transform of 1 − e −x is Γ(s) = ∞ 0 e −x x s−1 dx, for −1 < Re(s) < 0. To estimate the sum g(n) and hence f n we use the Mellin inversion formula, We move the contour of integration to the right and must compute some residues as compensation.
Let χ k = 2kπi/ log 2. There are simple poles of the integrand at s = χ k for each k ∈ Z \ {0}, with negative residue For s = 0, we have a double pole with negative residue where γ is Euler's constant.
Combining the contributions for all k ∈ Z, we find that There remains to compute As before, we can show that for the dominant range of terms in 2 ≤ h ≤ n, Estimating the latter sum using Mellin transforms yields For the mean value, we must divide by the number (2 n−1 ) of compositions of n.In particular rn 2 n−1 → 0 and we find The average descent after the first occurrence of the maximum in a composition of n is asymptotic to where δ(x) is a continuous periodic function of period 1, mean zero, small amplitude and Fourier expan-

Descent after the last maximum
Up to now, we have considered the descents after the first maximum in compositions of n.In this section, we consider the descents after the last maximum.A comparison of the series expansion (3.4), for the sum of descents after the first maximum, and (4.3) below, for the sum of descents after the last maximum shows that the two problems are not equivalent.
In symbolic notation, we have two cases depending on whether the last maximum occurs at the end or not.For the left case in Figure 2, we need the generating function for the single part of size less than h that immediately follows the maximum.This is given by where x marks the size of the part, y the number of parts and u the size of the descent after the last maximum.Thus, combining the two cases and summing over h we obtain the generating function G(x, y, u) analogous to F (x, y, u) in Section 2.
where C(h) is from Lemma 1.After substituting y = 1 and the expressions for C h (x, 1) and C h−1 (x, 1), we have Then the generating function for the sum of the descents after the last maximum is ) .

Thus we have shown
Theorem 3 The generating function for the sum of the descents after the last maximum in compositions of n is where x marks the size of the composition.
To proceed with our calculations, we let the upper limit of the sum be N and later choose N sufficiently large.Thus, we consider for N ≥ n.This has the same coefficient of for N ≥ n.For example, for N = 10, the series expansion for the expressions for B(x) and b 10 (x) both begin with x + 3x 2 + 7x

Asymptotics
Here, we use Mellin transforms to study the average size of the descent after the last maximum in a composition of n.

Theorem 4
The average descent after the last occurrence of the maximum in a composition of n is asymptotic to where δ(x) is a continuous periodic function of period 1, mean zero, small amplitude and Fourier expansion Proof: We rewrite the generating function in (4.2) in the form where the coefficients of x n in the first two terms are 1 and −2 n−1 respectively for n ≥ 1.Given n we choose N such that N ≥ n.
As before, let )) be the smallest positive root of 1 − 2x + x h .Then Thus, once again qn,h ∼ 2 n−1 e −n/2 h for the dominant range of h with h ≤ n .Then, for any n and N chosen such that N ≥ n, we have This is precisely the same as the sum estimated by Mellin transforms in the proof of Theorem 2. Also as in the proof of Theorem 2, we find Dividing by 2 n−1 to obtain the mean value yields the same asymptotic result as in Theorem 2. 2 Remark: Even though we have the same asymptotic results in Theorems 2 and 4, the series expansions (3.4) and (4.3) illustrate the fact that the sum of descents are in fact greater in the case of the last maximum, than they are for the first maximum, for n > 1.
5 Bijection to show that on average the descent after the last maximum is greater than the descent after the first In this section, we show with the use of a simple bijection f between the compositions of n > 1, that the average descent after the last maximum is greater than the average descent after the first maximum.The bijection is defined as follows: The composition is mapped to itself if it is one of the following 3 types: Type 1: the composition has only one maximum.Type 2: the composition has 2 or more maxima, where one of them occurs at the end.Type 3: the composition has 2 or more maxima, none of which occur at the end and the first maximum is immediately followed by a maximum.
However, if we have Type 4: the composition has 2 or more maxima, none of which occur at the end and the first one is not followed immediately by a maximum, then the bijection swaps the positions of the two elements which occur after the first and last maxima and preserves the rest.
We illustrate the bijection for a composition of type 4 below.
Consider the composition 26136651.It has 3 maxima, none occur at the end and the first maximum σ 2 = 6 is not followed directly by another maximum.We swap σ 3 = 1 with σ 7 = 5 and therefore the composition is mapped to 26536611 as illustrated using bargraphs below:  We define F i (resp.L i ) to be the sum of the descents after the first (resp.last) maximum of compositions of type i = 1, 2, 3, 4. Thus, for i = 1 and 4 we have F i = L i and for i = 2 and 3 we have F i < L i .So, collectively, we have

Fig. 2 :
Fig. 2: Decomposition of descents after the last maximum

Fig. 3 :
Fig. 3: Bijection for Type 4. Parts A and B are interchanged descents and last descents respectively.It is clear that f is a bijection on each of the disjoint types.Thus∂G ∂u u=1 − ∂F ∂u u=1 = (L 2 − F 2 ) + (L 3 − F 3 ) > 0which is our required result.