The distribution of ascents of size d or more in compositions

A composition of a positive integer n is a ﬁnite sequence of positive integers a 1 , a 2 , . . . , a k such that a 1 + a 2 + · · · + a k = n . Let d be a ﬁxed nonnegative integer. We say that we have an ascent of size d or more if a i +1 ≥ a i + d . We determine the mean, variance and limiting distribution of the number of ascents of size d or more in the set of compositions of n . We also study the average size of the greatest ascent over all compositions of n


Introduction
A composition of a positive integer n is a finite sequence of positive integers a 1 , a 1 , . . ., a k such that a 1 + a 2 + • • • + a k = n.It is well known that there are 2 n−1 compositions of n.The compositions (denoted by a 1 a 2 a 3 . . .a k ) for n = 1, 2, . . ., 5 are: Let d ≥ 0 be a fixed integer.We say, that we have an ascent of size d or more, whenever a i+1 ≥ a i +d.For example, there are 3 ascents of size 2 or more that occur in the compositions of 5: 14, 113, and 131 .
In Sections 2, 3 and 4, respectively, we determine the mean, variance and asymptotic distribution of the number of ascents of size d or more in compositions of n.Ordinary ascents (the cases d = 0 and d = 1) have previously been studied by Carlitz (1) and more recently by Chinn, Heubach and Grimaldi in (2).
Finally in Section 5 we investigate the maximum value of d for which compositions of n can expect to have an ascent of size d.That is, we find the average value of the largest ascent that occurs in the compositions of n.For example, the compositions of 4 in the table have maximum ascents of sizes 0, 2, 0, 0, 1, 1, 0, 0, respectively, giving an average largest ascent size per composition of 1/2 when n = 4.
We note that the asymptotic expression for the maximum ascent size in Theorem 4 involves a fluctuating function of n of mean zero.A similar phenomenon has been observed when studying averages of certain other statistics for compositions, such as the largest part size (11) or the number of distinct part sizes ( 8), (7).
2 The average number of ascents of size d or more in compositions For fixed d ≥ 0 we wish to find the average number of ascents of size d or more per composition of n.
We use the "adding-the-slice" technique which was originally used by Flajolet and Prodinger in (4) and more recently, for example, by Knopfmacher and Prodinger in (9).Let j be the value of the last component of the composition with k parts, i.e. a k = j.We proceed from a composition with k parts to a composition with k + 1 parts.We denote by f k (z, u, v) the generating function where z marks the size n, u the value of j and v the number of ascents of size d or more in compositions with k parts.
In moving from a composition with k parts to a composition with k + 1 parts, where a k = j, we have an ascent whenever the new last integer has any value from j + d onwards.This gives the following rule for adding a new part or "slice" to the end of the composition: This implies that where we have used At this stage we iterate the recursion for F (z, u, v).
We keep iterating, noting that F (z, z m u, v) → 0 as m → ∞ for |z| < 1 2 and u, v in a suitable small neighbourhood of 1, and put u = 1 to obtain By adding the term 1 for the empty composition we obtain the bivariate generating function for compositions according to the number of ascents of size d or more as where The expected value of the number of ascents of size d or more is . For this we shall need and ∂τ (z, v) ∂v In particular, the generating function for all compositions is F (z, 1) = .
So that After dividing by 2 n−1 , the total number of compositions of n, we have Theorem 1 The expected number of ascents of size d or more in the compositions of n is Hence for fixed d, as n → ∞, Previously Chinn, Heubach and Grimaldi found the number of ascents for d = 0 and d = 1 in (2).The case d = 0 corresponds to the number of rises plus the number of levels, whereas d = 1 corresponds to the number of rises.

Variance of the number of ascents of size d or more in compositions
To find the variance we first need to compute v=1 .In addition to formulas (2.3) to (2.6) from Section 2 we require .
Computing the nth coefficient of the second derivative amounts to expanding and combining binomial series.Finally, after adding the expectation and subtracting the square of the expectation we find Theorem 2 The variance of the expected number of ascents of size d or more in the compositions of n is For fixed d we have

Limiting distribution
We are interested in finding the limiting distribution of our random variable.We make use of Theorem IX.9 from Flajolet and Sedgewick (5).A short version is as follows: Let F (z, u) be a bivariate function that is bivariate analytic at (z, u) = (0, 0) and has nonnegative coefficients there.Assume that F (z, 1) is meromorphic in z ≤ r with only a simple pole at z = ρ for some positive ρ < r.Then, under further conditions stated in (5), the random variable with probability generating function converges in distribution to a Gaussian variable with a speed of convergence that is O(n −1/2 ).
Let us introduce the notation From Theorem IX.9 we need to show that In addition, we must show that For our specific problem .
We have ρ(1) = ρ = 1 2 and using (4.1), We are now in a position to check the conditions listed in the theorem.Equation (4.2) is satisfied since Equation (4.3) is equivalent to Remark In Flajolet and Sedgewick (5) it is also shown that under the conditions of Theorem IX.9, the mean µ n and variance σ 2 n are of the form where These asymptotic expressions are easily checked to be in agreement with the exact results for the mean and variance found previously in Theorems 1 and 2.

Size of the maximum ascent
Given a composition a 1 a 2 . . .a k of n we shall study the size of the maximum ascent, that is, the parameter X where We assign a value of 0 if no pair of consecutive integers satisfies this condition.The mean value of X is given by the expression Therefore for each fixed d we need to compute the probability that a composition of n has maximum ascent X ≤ d.
We already know the generating function for compositions with no ascents of size d or more, which we will denote by F d (z).For this we use (2.3) with d + 1 instead of d and v = 0, giving .
We want the generating function of compositions with X ≤ d .This is equivalent to the generating function of the compositions with no ascent of size d + 1 or more, which is F d+1 (z).We now need to study the dominant poles, ρ d , of F d+1 (z), that is, the dominant zeros of We follow the approach used by Gourdon and Prodinger in (6), which is also analogous to the one found in (10).Now for |z| ≤ 3 5 , say, using the first two terms of the series above, the root ρ d above can be approximated by the smallest positive root of since the omitted terms in (5.1) are O z 3d .This error will be majorized by subsequent O terms below.That is we want the root of The bootstrapping method gives a suitable approximation to ρ d .Let ρ d := 1 2 + ε d , then , from which we find As F d+1 (z) has a simple pole at ρ d , and by means of Rouche's Theorem, see IX.It follows that , where from (2.4) as d → ∞ dτ (z, 0) Let us now restrict our attention to those d for which n −3 ≤ 2 −d ≤ log n n .The probability that X ≤ d is then approximated as n → ∞ by So after dividing by 2 n−1 we have for n → ∞ and n In view of the O estimates in (5.2) and (5.3) we may deduce that the mean value of X satisfies We now use the Mellin transform, (see (3)), to estimate the function Next we apply the Mellin inversion formula to recover f (t): We then shift the line of integration to the right and collect the (negative) residues at s = 2kπi L where k ∈ Z and L = log 2. To evaluate the residue at the double pole s = 0, we need the expansion of the terms in the integrand to two terms as s → 0, (here γ denotes Euler's constant), Hence the (negative) residue at s = 0 is For the residue at s = 2kπi L for k = 0, let ε = s − 2kπi L we have The remainder integral 1 2πi 1 2 +i∞ 1 2 −i∞ is of smaller order, so we have found Theorem 4 The mean value of the size of the greatest ascent in the compositions of n satisfies as n → ∞, where δ(x) is a continuous periodic function of mean zero, period one and small amplitude with Fourier series Computations show that δ(x) < 1.7 × 10 −6 , as a result of the fast decrease of the gamma function with imaginary argument.The diagram below shows the plot of δ(log 2 n 6 ) for 1 ≤ n ≤ 100.

Theorem 3 2 n
non-negative integer values of d.Thus we deduce The distribution of the number of ascents of size d or more in compositions of n converges to a Gaussian distribution with a speed of convergence of O(n −1/2 ) with the mean µ n and the variance σ are as given in Theorems 1 and 2.
.2) Turning now to smaller values of d ≥ 1, that is, d such that 2 −d > log n n , a similar computation shows that (5.2) remains valid in this range, although now the probabilities P(X ≤ d) are small, since for such d, exp − n 2 d 6 = O( 1 n ) as n → ∞.Finally we must consider larger values of d ≤ n that is, d for which n −3 > 2 −d , or equivalently, d ≥ 3 log 2 n.In this range we find that