Abstract
The discrete distribution of the length of longest increasing subsequences in random permutations of n integers is deeply related to random matrix theory. In a seminal work, Baik, Deift and Johansson provided an asymptotics in terms of the distribution of the scaled largest level of the large matrix limit of GUE. As a numerical approximation, however, this asymptotics is inaccurate for small n and has a slow convergence rate, conjectured to be just of order \(n^{1/3}\). Here, we suggest a different type of approximation, based on Hayman’s generalization of Stirling’s formula. Such a formula gives already a couple of correct digits of the length distribution for n as small as 20 but allows numerical evaluations, with a uniform error of apparent order \(n^{2/3}\), for n as large as \(10^{12}\), thus closing the gap between a table of exact values (compiled for up to \(n=1000\)) and the random matrix limit. Being much more efficient and accurate than Monte Carlo simulations, the Stirlingtype formula allows for a precise numerical understanding of the first few finite size correction terms to the random matrix limit. From this we derive expansions of the expected value and variance of the length, exhibiting several more terms than previously put forward.
Similar content being viewed by others
Avoid common mistakes on your manuscript.
1 Introduction
As witnessed by a number of outstanding surveys and monographs (see, e.g., [1, 5, 44, 48]), a surprisingly rich topic in combinatorics and probability theory, deeply related to representation theory and to random matrix theory, is the study of the lengths \(L_n(\sigma )\) of longest increasing subsequences of permutations \(\sigma \) on the set \([n] = \{1,2,\ldots ,n\}\) and of the behavior of their distribution in the limit \(n\rightarrow \infty \). Here, \(L_n(\sigma )\) is defined as the maximum of all k for which there are \(1\leqslant i_1< i_2< \cdots < i_k \leqslant n\) such that \(\sigma _{i_1}< \sigma _{i_2}< \cdots < \sigma _{i_k}\). Writing permutations in the form \(\sigma = (\sigma _1\, \sigma _2\,\cdots \, \sigma _n)\) we get, e.g., \(L_9(\sigma )= 5\) for \(\sigma = (4\,\textbf{1}\, \textbf{2}\, 7\, 6\, \textbf{5}\, \textbf{8}\,\textbf{9} \,3)\), where one of the longest increasing subsequences has been highlighted. Enumeration of the permutations with a given \(L_n\) can be encoded probabilistically: by equipping the symmetric group on [n] with the uniform distribution, \(L_n\) becomes a discrete random variable with cumulative probability distribution (CDF) \({\mathbb {P}}( L_n \leqslant l)\) and probability distribution (PDF) \({\mathbb {P}}( L_n = l)\).
Constructive Combinatorics Using the Robinson–Schensted correspondence [45], one gets the distribution of \(L_n\) in the following form (see, e.g., [49, §§3.3–3.7]):
Here \(\lambda \,\vdash n\) denotes an integer partition \(\lambda _1\geqslant \lambda _2 \geqslant \cdots \geqslant \lambda _{l_\lambda }> 0\) of \(n=\sum _{j=1}^{l_\lambda } \lambda _j\) and \(d_\lambda \) is the number of standard Young tableaux of shape \(\lambda \), as given by the hook length formula. By generating all partitions \(\lambda \,\vdash n\), in 1968 Baer and Brock [3] computed tables of \({\mathbb {P}}( L_n = l)\) up to \(n=36\); in 2000 Odlyzko and Rains [40] for \(n=15,30,60,90,120\) (the tables are online, see [38]), reporting a computing time for \(n=120\) of about 12 hours (here \(p_n\), the number of partitions, is of size \(1.8\times 10^9\)). This quickly becomes infeasible,^{Footnote 1} as \(p_n\) is already as large as \(2.3\times 10^{14}\) for \(n=250\). Another use of the combinatorial methods is the approximation of the distribution of \(L_n\) by Monte Carlo simulations [3, 40]: one samples random permutations \(\sigma \) and calculates \(L_n(\sigma )\) by the Robinson–Schensted correspondence.^{Footnote 2}
Analytic Combinatorics and the Random Matrix Limit For analytic methods of enumeration, the starting points is a more or less explicit representation of a suitable generating function; here, the suitable one turns out to be the exponential generating function of the CDF \({\mathbb {P}}( L_n \leqslant l)\), when considered as a sequence of n with the length l fixed:
(We note that \(f_l\) is an entire function of exponential type.) In fact, Gessel [30, p. 280] obtained in 1990 the explicit representation
in terms of a Toeplitz determinant of the modified Bessel functions \(I_m\), \(m\in {\mathbb {Z}}\), which are entire functions of exponential type themselves. By relating, first, the Toeplitz determinant to the machinery of Riemann–Hilbert problems to study a doublescaling limit of the generating function and by using, next, a Tauberian theorem^{Footnote 3} to induce from that limit an asymptotics of the coefficients, Baik, Deift and Johansson [4] succeeded 1999 in establishing^{Footnote 4}
uniformly in \(l\in {\mathbb {N}}\); it will be called the random matrix limit of the length distribution throughout this paper since \(F_2(t)\) denotes the Tracy–Widom distribution for \(\beta =2\) (that is, the probability that in the softedge scaling limit of the Gaussian unitary ensemble (GUE) the scaled largest eigenvalue is bounded from above by t). This distribution can be evaluated numerically based on its representation either in terms of the Airy kernel determinant [23] or in terms of the PainlevéII transcendent [51]; see Remark 3.1 and [9] for details.
As impressive as the use of the limit (3) might look as a numerical approximation to the distribution of \(L_n\) near its mode for larger n, cf. Fig. 1, there are two notable deficiencies: first, since the error term in (3) is additive (i.e., w.r.t. absolute scale), the approximation is rather poor for \(l \ll 2\sqrt{n}\); second, the convergence rate is rather slow, in fact conjectured to be just of the order \(O(n^{1/3})\); see [27] and the discussion below. Both deficiencies are well illustrated in Table 1 for \(n=20\) and in Fig. 2 for \(n=1000\).
A StirlingType Formula In this paper we suggest a different type of numerical approximation to the distribution of \(L_n\) that enjoys the following advantages: (a) it has a small multiplicative (i.e., relative) error, (b) it has faster convergence rates, apparently even faster than (3) with its first finite size correction term added, and (c) it is much faster to compute than Monte Carlo simulations. In fact, the distribution of \(L_n\) for \(n=10^5\), as shown in Fig. 1, exhibits an estimated maximum additive error of less than \(10^{5}\) and took just about five seconds to compute, whereas Forrester and Mays [27] have recently reported a computing time of about 14 hours to generate \(T = 5\times 10^6\) Monte Carlo trials for this n; the error of such a simulation is expected to be of the order \(1/\sqrt{T} \approx 4\cdot 10^{4}\).
Specifically, we use Hayman’s generalization [33] of Stirling’s formula for Hadmissible functions; for expositions see [22, 39, 55]. For simplicity, as is the case here for \(f(z)=f_l(z)\), assume that
is an entire function with positive coefficients \(a_n\) and consider the real auxiliary functions
If f is Hadmissible, then for each \(n\in {\mathbb {N}}\) the equation \(a(r_n) = n\) has a unique solution \(r_n > 0\) such that \(b(r_n)>0\) and the following generalization of Stirling’s formula^{Footnote 5} holds true:
We observe that the error is multiplicative here. In Theorem 2.2 we will prove, using some theory of entire functions, the Hadmissibility of the generating functions \(f_l\). Hence the Stirlingtype formula (4) applies without further ado to their coefficients \({\mathbb {P}}(L_n \leqslant l)/n!\). Since the error is multiplicative, nothing changes if we multiply the approximation by n! and we get
where we have labeled all quantities when applied to \(f=f_l\) by an additional index l. An approximation to \({\mathbb {P}}(L_n=l)\) is then obtained simply by taking differences. The power of these approximations, if used as a numerical tool even for n as small as \(n=20\), is illustrated in Table 1 and Figs. 1, 2 and 3, as well as in Table 2.
Numerical Evaluation of the Generating Function For the Stirlingtype formula (5) to be easily accessible in practice, we require an expression for \(f_l(r)\) that can be numerically evaluated, for \(r>0\), in a stable, accurate, and efficient fashion. Since the direct evaluation of the Toeplitz determinant (2) is numerically highly unstable, and has a rather unfavorable complexity of \(O(l^3)\) for larger l, we look for alternative representations. One option—used in [11] to numerically extract \({\mathbb {P}}(L_n\leqslant l)\) from \(f_l(z)\) by Cauchy integrals over circles in the complex plane that are centered at the origin with the same radius \(r_{l,n}\) as in (5)—is the machinery, cf., e.g., [15], to transform Toeplitz determinants into Fredholm determinants which are then amenable for the numerical method developed in [10]. However, since we need the values of the generating function \(f_l(r)\) for real \(r>0\) only, there is a much more efficient option, which comes from yet another connection to random matrix theory.
To establish this connection we first note that an exponentially generating function f(r) of a sequence of probability distributions has a probabilistic meaning if multiplied by \(e^{r}\): a process called Poissonization. Namely, if the draws from the different permutation groups are independent and if we take \(N_r \in {\mathbb {N}}_0 :=\{0,1,2,3,\ldots \}\) to be a further independent random variable with Poisson distribution of intensity \(r\geqslant 0\), we see that
is, for fixed \(r\geqslant 0\), the cumulative probability distribution of the composite discrete random variable \(L_{N_r}\). On the other hand, for fixed \(l\in {\mathbb {N}}\), also \(e^{r} f_l(r)\) turns out to be a probability distribution w.r.t. the continuous variable \(r\geqslant 0\): specifically, in terms of precisely the Toeplitz determinant (2), Forrester and Hughes [26, Eq. (3.33)] arrived in 1994 at the representation
Here, \(E^{\text {(hard)}}_2(0; [0,t],l)\) denotes the probability that, in the hardedge scaling limit of the Laguerre unitary ensemble (LUE) with parameter l, the smallest eigenvalue is bounded from below by \(t\geqslant 0\). Now, the point here is that this distribution can be evaluated numerically, stable and accurate with a complexity that is largely independent of l, based on two alternative representations: either in terms of the Bessel kernel determinant [23] or in terms of the Jimbo–Miwa–Okamoto \(\sigma \)form of the PainlevéIII transcendent [52]; see [9] for details. We will show in Sect. 3 that the auxiliary functions \(a_l(r)\) and \(b_l(r)\) fit into both frameworks, too.
Finite Size Corrections to the Random Matrix Limit In a double logarithmic scaling, a plot of the additive errors (taking the maximum w.r.t. \(l\in \{1,2,\ldots ,n\}\)) in approximating the distribution \({\mathbb {P}}(L_n\leqslant l)\) by either the random matrix limit (3) or by the Stirlingtype formula (5) exhibits nearly straight lines; see Fig. 3 for n between 10 and 1000. Fitting the data in display to a model of the form \(c_1 n^{\alpha _1} + c_2 n^{\alpha _2} + c_3 n^{\alpha _3}\) with simple triples \(\alpha =(\alpha _1, \alpha _2, \alpha _3)\) of rationals strongly suggests that, uniformly in \(l \in \{1,2,\ldots ,n\}\) as \(n\rightarrow \infty \),
The approximation order (and the size of the implied constant) in (8b) is much better than the one in (8a) so that the Stirlingtype formula can be used to reveal the structure of the \(O(n^{1/3})\) term in the random matrix limit. In fact, as the error plot in Fig. 3 suggests and we will more carefully argue in Sect. 4.1, this can even be iterated yet another step and we are led to the specific conjecture^{Footnote 6}
as \(n\rightarrow \infty \), uniformly in \(l\in {\mathbb {N}}\). Compelling evidence for the existence of the functions \(F_{2,1}\) and \(F_{2,2}\) is given in the left panels of Figs. 4 and 6.^{Footnote 7}
We note that a corresponding expansion^{Footnote 8} for the Poissonization (6) of the length distribution was studied by Baik and Jenkins [6, Eq. (25)] (using the machinery of Riemann–Hilbert problems up to an error of order \(O(r^{1/2})\)) and by Forrester and Mays [27, Eqs. (1.18), (2.29)] (using Fredholm determinants), who obtained the expansion, as \(r\rightarrow \infty \) for bounded \(t_l^*\):
with the explicit functional form (identified by means of Painlevé representations)
Though (10a) adds to the plausibility of the expansion (9), the dePoissonization lemma of Johansson [35, Lemma 2.5] and its commonly used variants (see [4, 5, 44]) would not even allow us to deduce from (10) the existence of the term \(F_{2,1}(t)\), let alone to obtain its functional form.
Remark
(added in proof) On the other hand, by inserting the Poissonized expansion (10) (and the induced expansions of the quantities b(r) and \(r_{l,n}\)) into the Stirlingtype formula (8b) with its conjectured error of order \(O(n^{2/3})\), we are led to the conjecture
This functional form is in perfect agreement with the data displayed in Fig. 4; see Footnote 29 and Remark 4.4 for further numerical evidence. Details will be given in a forthcoming paper of the author [13], where the expression (11) for \(F_{2,1}(t)\) (as well as one for \(F_{2,2}(t)\)) is also obtained by a complexanalytic modification (related to Hadmissibility) of the dePoissonization process.
We will argue in Sect. 4.3 that the expansion (9) of the length distribution allows us to derive an expansion of the expected value of \(L_n\), specifically
Similarly, we will derive in Sect. 4.4 an expansion of the variance of \(L_n\) of the form
The values of \(\mu _0\) and \(\nu _0\) are the known values of mean and variance of the Tracy–Widom distribution \(F_2\), cf. [9, Table 10]. (The leading parts of (12) up to \(\mu _0n^{1/6}\) and of (13) up to \(\nu _0n^{1/3}\) had been established previously by Baik, Deift and Johansson [4, Thm. 1.2].)
2 HAdmissibility of the Generating Function and Its Implications
2.1 HAdmissible Functions
For simplicity we restrict ourselves to entire functions. We refrain from displaying the rather lengthy technical definition of Hadmissibility,^{Footnote 9} which is difficult to be verified in practice and therefore seldom directly used. Instead, we start by collecting some useful facts and criteria from Hayman’s original paper [33]:^{Footnote 10}
Theorem 2.1
(Hayman 1956) Let \(f(z) = \sum _{n=0}^\infty a_nz^n\) and g(z) be entire functions and let p(z) denote a polynomial with real coefficients.
I. If f is Hadmissible, then:

a.
\(f(r) > 0\) for all sufficiently large \(r>0\), so that in particular the auxiliary functions^{Footnote 11}
$$\begin{aligned} a(r) = r \frac{\textrm{d}}{\textrm{d}r} \log f(r),\qquad b(r) = r \frac{\textrm{d}}{\textrm{d}r} a(r) \end{aligned}$$(14)are well defined there;

b.
for \(r>0\) as in I.a there is \(\log f(r)\) strictly convex in \(\log r\), a(r) strictly monotonically increasing, and \(b(r)>0\) such that \(a(r), b(r)\rightarrow \infty \) as \(r\rightarrow \infty \); in particular, for large integers n there is a unique \(r_n>0\) that solves \(a(r_n)=n\), it is \(r_n\rightarrow \infty \) as \(n\rightarrow \infty \);

c.
if the coefficients \(a_n\) of f are all positive, then I.b holds for all \(r>0\);

d.
as \(r\rightarrow \infty \), uniformly in \(n \in {\mathbb {N}}_0\),
$$\begin{aligned} \frac{a_n r^n}{f(r)} = \frac{1}{\sqrt{2\pi b(r)}}\left( \exp \left( \frac{(na(r))^2}{2b(r)}\right) + o(1)\right) . \end{aligned}$$(15)
II. If f and g are Hadmissible, then:

e.
f(z)g(z), \(e^{f(z)}\) and \(f(z) + p(z)\) are Hadmissible;

f.
if the leading coefficient of p is positive, f(z)p(z) and p(f(z)) are Hadmissible;

g.
if the Taylor coefficients of \(e^{p(z)}\) are eventually positive, \(e^{p(z)}\) is Hadmissible.
III. If f has genus zero^{Footnote 12} with, for some \(\delta >0\), at most finitely many zeros in the sector \(\arg z\leqslant \frac{\pi }{2}+\delta \) and satisfies I.a such that \(b(r)\rightarrow \infty \) as \(r\rightarrow \infty \), then f is Hadmissible.
Obviously, the Stirlingtype formula (4) is obtained from the approximation result (15) by just inserting the particular choice \(r=r_n\).
Remark 2.1
We observe that, if \(a_n\geqslant 0\), Eq. (15) has an interesting probabilistic content:^{Footnote 13} as a distribution in the discrete variable \(n\in {\mathbb {N}}_0\), the Boltzmann^{Footnote 14} probabilities \(a_n r^n/f(r)\) associated with an Hadmissible entire function f are, for large intensities \(r>0\), approximately normal with mean a(r) and variance b(r); see the right panel of Fig. 5 for an illustrative example using the generating function \(f_5(z)\). The additional freedom that is provided in the normal approximation (15) by the uniformity w.r.t. n will be put to good use in Sect. 2.3.
The classification of entire functions (by quantities such as genus, order, type, etc.) and their distribution of zeros is deeply related to the analysis of their essential singularity at \(z=\infty \). For the purposes of this paper, the following simple criterion is actually all we need. The proof uses some theory of entire functions, which can be found, e.g., in [37].
Lemma 2.1
Let f(z) be an entire function of exponential type with positive Maclaurin coefficients. If there are constants \(c, \tau , \nu > 0\) such that there holds, for the principal branch of the power function and for each \(0 < \delta \leqslant \frac{\pi }{2}\), the asymptotic expansion^{Footnote 15}
then f is Hadmissible. For \(r\rightarrow \infty \) the associated auxiliary functions a(r) and b(r) satisfy
and the solution \(r_n\) of \(a(r_n)=n\) satisfies
Proof
The expansion (16) is equivalent to
which readily implies:

since \(\delta >0\) is arbitrary, f has the Phragmén–Lindelöf indicator
$$\begin{aligned} {{\,\mathrm{\text {lim sup}}\,}}_{r\rightarrow \infty } \frac{\log f(r e^{i\theta })}{r^{1/2}} = \tau \cos (\theta /2) \qquad (\pi< \theta < \pi ), \end{aligned}$$so that f has order \(\tfrac{1}{2}\) and type \(\tau \), hence genus zero;

for sufficiently large \(R = R_{\delta }>0\), there are no zeros z of f with
$$\begin{aligned} z\geqslant R,\qquad \!\arg z \leqslant \pi 2\delta . \end{aligned}$$
Since the Maclaurin coefficients of f are positive, we have \(f(r)>0\) for \(r>0\) and the auxiliary functions a(r), b(r) in (14) are welldefined for \(r>0\). In fact, both functions can be analytically continued into the domain of uniformity of the expansion (19) and by differentiating this expansion (which is, because of analyticity, legitimate by a theorem of Ritt, cf. [41]) we obtain (17); this implies, in particular, \(b(r) \rightarrow \infty \) as \(r\rightarrow \infty \). Thus, all the assumptions of Theorem 2.1.III are satisfied and f is shown to be Hadmissible. \(\square \)
2.2 Singularity Analysis of the Generating Function at \(z=\infty \)
Establishing an expansion of the form (16) for \(D_l(z)=f_l(z^2)\) as given by (2), that is to say, for the Toeplitz determinant
suggests to start with the expansions (valid for all \(0<\delta \leqslant \frac{\pi }{2}\), see [41, p. 251])
This does not yield (16) at once, as there could be, however unlikely it would be, eventually a catastrophic cancellation of all of the expansion terms when being inserted into the determinant expression defining \(D_l(z)\). For the specific cases \(l=1,2,\ldots ,8\) a computer algebra system shows that exactly the first \(l1\) terms of the expansion (21) mutually cancel each other in forming the determinant, and we get by this approach^{Footnote 16} the expansions
All of them, inherited from (21), are valid as \(z\rightarrow \infty \) while \(\!\arg z\leqslant \tfrac{\pi }{2}\delta \) with the uniformity content implied by the symbol \(O(z^{1})\). From these instances, in view of (21) and the multilinearity of the determinant, we guess that
and observe
Consulting the OEIS^{Footnote 17} (OnLine Encyclopedia of Integer Sequences) suggests the coefficients to be generally of the form
Though this is very likely to hold for all \(l\in {\mathbb {N}}\)—a fact that would at once yield the Hadmissibility of all the generating function \(f_l\) by Lemma 2.1—a proof seems to be elusive along these lines, but see Remark 2.3 for a remedy.
Inspired by the fact that the onedimensional Laplace’s method easily gives the leading order term in (21) when applied to the Fourier representation
we represent the Toeplitz determinant \(D_l(z)\) in terms of a multidimensional integral and study the limit \(z\rightarrow \infty \) by the multidimensional Laplace method discussed in the Appendix. In fact, (22) shows that the symbol of the Toeplitz determinant \(D_l(z)\) is \(\exp (2z\cos \theta )\) and a classical formula of Szegő’s [50, p. 493] from 1915, thus gives, without further calculation, the integral representation^{Footnote 18}
where
denotes the Vandermonde determinant of the complex numbers \(w_1,\ldots ,w_l\).
Remark 2.2
By Weyl’s integration formula on the unitary group U(l), cf. [46, Eq. 1.5.89], the integral (23) can be written as
where the expectation \({\mathbb {E}}\) is taken with respect to the Haar measure. Without any reference to (2), this form was derived in 1998 by Rains [42, Cor. 4.1] directly from the identity
which he had obtained most elegantly from the representation theory of the symmetric group.
We are now able to prove our main theorem.
Theorem 2.2
For each \(0< \delta \leqslant \pi /2\) and \(l\in {\mathbb {N}}\), there holds the asymptotic expansion
Thus, by Lemma 2.1, the generating functions \(f_l(z)\) are Hadmissible and their auxiliary functions satisfy, as \(r\rightarrow \infty \),
Proof
We write (23) in the form
The phase function of this multidimensional integrand, that is to say
takes it minimum \(S(\theta _*)=0\) at \(\theta _* = 0\) with the expansion \(S(\theta _1,\ldots ,\theta _l) = \frac{1}{2}\theta ^T\theta + O(\theta ^4)\) as \(\theta \rightarrow 0\), where \(\cdot \) denotes Euclidean length. Likewise we get for the nonexponential factor^{Footnote 19}
where the degree of the homogeneous polynomial \(\Delta (\theta _1,\ldots ,\theta _l)^2\) is \(l(l1)\).
Therefore, by the multidimensional Laplace method as given in Corollary A.1 (see also formula (54) following it) we obtain immediately
with
where the evaluation of this multiple integral is wellknown in random matrix theory, e.g., as a consequence of Selberg’s integral formula, cf. [2, Eq. (2.5.11)]. \(\square \)
Remark 2.3
an asymptotics first rigorously proven, using Riemann–Hilbert problem machinery, by Deift, Krasovsky and Vasilevska [19] in 2010. Besides that our proof is much simpler, their result, which is for real \(s>0\) only, would by itself not suffice to establish the Hadmissibility of the generating function \(f_l(z)\); one would have to complement it with the arguments given above for expanding the Toeplitz determinant (20) based on the expansions (21) of the modified Bessel functions. However, their result is more general in another respect: it covers parameters \(\alpha \in {\mathbb {C}}\) of the LUE with \(\Re \alpha > 1\) instead of just \(l \in {\mathbb {N}}\); the superfactorial factor \(0!\cdot 1!\cdot 2! \, \cdots \, (l1)!\) is then to be replaced by \(G(1+\alpha )\), where G(z) is the Barnes Gfunction.^{Footnote 20}
We complement the large r expansion (24) of the auxiliary functions with their expansions as \(r\rightarrow 0^+\), which are simple consequences of elementary combinatorics.
Lemma 2.2
The auxiliary functions of the generating function \(f_l\) satisfy, as \(r\rightarrow 0^+\),
Proof
Because of \(L_n \leqslant n\) and since there is just one permutation \(\sigma \) with \(L_n=n\), we get
This implies, by truncating the power series of \(f_l\) at order \(l+1\),
Logarithmic differentiation of the power series thus yields, as \(z\rightarrow \infty \),
and the results follow from specializing to \(z = r>0\). \(\square \)
The left panel of Fig. 5 visualizes the expansions (24) and (26) for \(a_5(r)\). Apparently, as a function of \(\log r\), the auxiliary \(\log a_l(r)\) interpolates monotonically, concavely, and from below between the following two extremal regimes:

\(\log r\) as \(r\rightarrow 0^+\), which reflects, by the proof of Lemma 2.2, the regime \(l \geqslant n\), and

\(\frac{1}{2}\log r + \log l\) as \(r\rightarrow \infty \), which reflects the regime \(l \ll n^{1/4}\) (see Sect. 2.3).
It is this seamless interpolation between the two regimes \(l \geqslant n\) and \(l \ll n^{1/4}\) that helps to understand the observed uniformity of the Stirlingtype formula w.r.t. l, cf. (8b).
2.3 A New Proof of Regev’s Asymptotic Formula for Fixed l
A simple closed form expression in terms of n and l is obtained by studying the asymptotics, as \(n \rightarrow \infty \) for fixed l, of the Stirlingtype formula (5) itself—or even easier yet, because of its added flexibility, of Hayman’s normal approximation (15) for a suitable choice of r. As tempting as it might appear, however, this stacking of asymptotics leads, first, to a considerable loss of approximation power for small n, cf. Table 2, and, second, to a lack of uniformity w.r.t. l since the result is effectively conditioned to the constraint \(l\ll n^{1/4}\).
To avoid notational clutter, we suppress the index l from the generating function \(f_l\), its auxiliaries \(a_l\), \(b_l\) and from the radius \(r_{l,n}\). Solving \(a(r_n)=n\) yields, by (18), the expansion
which suggests to plug its leading order term \(r^*_n := n^2/l^2\) into (15). Theorem 2.2 gives, as \(n\rightarrow \infty \),
The Gaussian term in (15) has thus the expansion
which indicates that we can expect \(r_n^*\) to deliver a quality of approximation comparable to \(r_n\) (which corresponds to using the Stirlingtype formula) only if \(l\ll n^{1/4}\); see Table 2 for an illustrative example. Altogether Hayman’s normal approximation (15) gives, choosing \(r=r_n^*\),
as \(n\rightarrow \infty \). Wrapping up by using Stirling’s formula in the form
we have thus given a new proof of Regev’s formula [43, Eq. (4.5.2)]:
Remark 2.4
The fixed l asymptotics (29) was first proved by Regev [43] in 1981, cf. [48, Thm. 7]. His delicate and rather long^{Footnote 21} proof proceeds, first, by identifying the leading contributions to the finite sum (1) using Stirling’s formula, and then, after trading exponentially decaying tails (the basic idea of Laplace’s method), by approximating the sum by a multidimensional integral which, finally, leads to the evaluation of Selberg’s integral (25).
3 Numerical Evaluation of the Generating Function and Its Auxiliaries
The numerical evaluation of the Stirlingtype formula (5) requires the evaluation of the generating function \(f_l(r)\) and its auxiliaries \(a_l(r)\), \(b_l(r)\) for real \(r>0\). This will be based on the representation (7). That is to say, by writing
for the functions from random matrix theory, we obtain
As is common in the discussion of the LUE, we generalize this by replacing \(l\in {\mathbb {N}}\) with a real parameter \(\alpha >1\). Dropping the index altogether we write, briefly, just g(s), v(s), and u(s).
3.1 Evaluation in Terms of \(\sigma \)PainlevéIII
The work of Tracy and Widom [52] shows
where v(s) satisfies a Jimbo–Miwa–Okamoto \(\sigma \)form of the PainlevéIII equation (related to the Hamiltonian formulation PIII\('\) in the work of Okamoto; cf. [25, §8.2]), i.e., the nonlinear secondorder differential equation
subject to the following initial condition, which is consistent with (26) for \(\alpha =l\in {\mathbb {N}}\):
A numerical integration of the initial value problem gives approximations to v(s) and \(v'(s)\), thus also to \(u(s)= s v'(s)\). As explained in [9], a direct numerical integration has stability issues as the solution v is a separatrix solution of the \(\sigma \)PainlevéIII equation. It is therefore advisable to solve the differential equation numerically as an asymptotic boundary problem by supplementing the initial condition by its connection formula, that is the corresponding expansion for \(x\rightarrow \infty \):
Note the consistency with (24) for \(\alpha = l\in {\mathbb {N}}\); for general \(\alpha >1\) this connection formula was conjectured by Tracy and Widom [52, Eq. (3.1)], a rigorous proof is given in [19], cf. Remark 2.3.
3.2 Compiling a Table of Exact Rational Values
As observed recently by Forrester and Mays [27, Sec. 4.2], substituting a truncated power series expansion of v(x) into the \(\sigma \)PainlevéIII equation (31) is a comparatively costefficient way^{Footnote 22} to compile a table of the exact rational values of the distribution \({\mathbb {P}}(L_n \leqslant l)\); they report to have done so up to \(n=700\).
We note that instead of dealing directly with (31) in this fashion, it is of advantage to use an equivalent thirdorder differential equation belonging to the ChazyI class,^{Footnote 23} namely
which is obtained from differentiating (31) w.r.t. x and dividing the result by \(2x^2v_l''^2\). Note that the ChazyI equation (34) is linear in the highest order derivative of \(v_l\) and quadratic in the lower orders, whereas the \(\sigma \)PainlevéIII equation (31) is quadratic in the highest order derivative and cubic in the lower orders. Therefore, substituting the expansion
into the ChazyI equation (34) yields a much simpler recursive formula for the \(a_n\), \(n=l+1,\ldots \) :
uniquely determining the coefficients \(a_n\) from the initial value (32), that is, from
It is now a simple matter of truncated power series calculations in a modern computer algebra system to expand the generating function itself,
Avoiding the overhead of reducing fractions and computing common denominators in exact rational arithmetic, we have used significance arithmetic with \(\lceil 2.5\log _{10} (1000!) \rceil = 6420\) digits and subsequent rational reconstructions to compile a table^{Footnote 24} of \({\mathbb {P}}(L_n = l), 1\leqslant l \leqslant n\), up to \(n = 1000\) (in just about 1.5 hours CPU time using one core of a 3GHz Xeon server). This table is used in Figs. 3 and 6 as well as Sect. 4.3 (note that Table 1 could have been compiled with the values for up to \(n=36\) that were tabulated in the work of Baer and Brock [3]).
3.3 Evaluation in Terms of Bessel Kernel Determinants and Traces
In [10] the author has shown that Nyström’s method for integral equations can be generalized to the numerical evaluation of Fredholm determinants. Thus, as advocated in [9], there is a stable and efficient numerical method to directly address the representation
derived by Forrester [23] in 1993, in terms of the Bessel kernel
This numerical method was extended in [14, Appendix] to the evaluation of general terms involving determinants, traces, and resolvents of integral operators. The evaluation of the auxiliary functions v(s), u(s), as defined in (30), is thus facilitated by the following theorem.
Theorem 3.1
Let K(x, y) be a smooth kernel that induces an integral operator K on \(L^2(0,s)\) for all \(s>0\) and define the derived kernel as
Then, if we assume \(g(s) = \det (I K)_{L^2(0,s)}>0\) for all \(s>0\), there holds
Proof
Rescaling integrals w.r.t. the measure \(d\mu (y)=K(x,y)\,dy\) from being taken over the interval (0, s) to (0, 1) induces a transformation of the kernel K(x, y) according to
This way we can keep the space \(L^2(0,1)\) fixed while the kernels become dependent on the parameter \(s>0\); in particular, then, there is no need to distinguish in notation between kernels and their induced integral operators. Now, if we denote differentiation w.r.t. to the parameter s by a dot, we get
and thus, by [14, Lemma 1], the logarithmic derivative
which proves the asserted formula for \(v(s) = s g'(s)/g(s)\). Since, cf. [52, Eq. (2.4)],
we get by the linearity of the trace
which finishes the proof after a backtransformation to \(L^2(0,s)\). \(\square \)
For the Bessel kernel (36b) at hand, we get the derived kernels
We observe that both, \(K'\) and \(K''\), induce integral operators of finite rank, namely
where we have put
Hence, the results of Theorem 3.1 simplify considerably: first, we obtain^{Footnote 25}
next, by observing
we get, because of symmetry and linearity,
Both formulae for the auxiliary functions u and v can now be easily implemented in the author’s MATLAB toolbox for Fredholm determinants (which provides also commands to evaluate traces and inner products of general operator terms including resolvents; cf. [9, 10] and [14, Appendix]). Since all the numerical evaluations come with an estimate of the (absolute) error there, the implied approximation errors in computing the generating function \(f_l(r)\) and its auxiliaries \(a_l(r)\) and \(b_l(r)\) can straightforwardly be assessed.
Remark 3.1
A result similar to Theorem 3.1 holds for smooth integral kernels K(x, y), with sufficient decay at \(\infty \), which induce integral operators K on \(L^2(s,\infty )\) for all \(s \in {\mathbb {R}}\). Here we define the derived kernel as
and get, if \(g(s) =\det (IK)_{L^2(s,\infty )}>0\) for all \(s\in {\mathbb {R}}\), the logarithmic derivative
The proof goes by considering \(K_s(x,y)=K(s+x,s+y)\) and transforming \((s,\infty )\) to \((0,\infty )\) by a shift. As an example, the Tracy–Widom distribution \(F_2(s)\) used in (3) is known to be given in terms of the Airy kernel determinant [23],
Here we have \(K'(x,y) = {{\,\mathrm{\text {Ai}}\,}}(x){{\,\mathrm{\text {Ai}}\,}}(y)\), i.e., \(K'={{\,\mathrm{\text {Ai}}\,}}\otimes {{\,\mathrm{\text {Ai}}\,}}\), and thus
The last formula was used for the calculations shown in Table 3. In the same manner we get
as well as similar formulae for higher order derivatives of \(F_2\).^{Footnote 26}
3.4 Implementation Details
First, by uniqueness, solving \(a_l(r)=n\) for \(r=r_{l,n}\) can easily be accomplished by an iterative solver. In view of the left panel in Fig. 5 and the expansion (27) we take as initial guess
Second, the numerical evaluation of the Stirlingtype formula (5) for larger values of n requires to avoid severe overflow of intermediate terms. Based on the representations in (30), and by rearranging terms, we can write (5) equivalently as follows:^{Footnote 27}
where \(g_l\), \(v_l\) and \(u_l\) are evaluated at \(s=4r_{l,n}\) and there is
In IEEE hardware arithmetic we take the definition of \(\tau _n\) until \(n=100\) and only switch to the shown Stirling expansion for larger n—thus seamlessly providing full accuracy.^{Footnote 28} This allows us to approximate the PDF \({\mathbb {P}}(L_n = l)\) near its mode for up to \(n = 10^{12}\) and larger. For accurate tails, such as in Table 2, we have to resort to higher precision arithmetic, though.
4 First and Second Finite Size Corrections to the Random Matrix Limit
4.1 The CDF of the Distribution of \(L_n\)
Based on data from Monte Carlo simulations, Forrester and Mays [27] have recently initiated the study of finite size corrections to the random matrix limit (3), which is
as \(n\rightarrow \infty \), uniformly in \(l\in {\mathbb {N}}\). We will refine their study by using the much more accurate and efficient Stirlingtype formula (5) instead. Looking at the error
for n up to 1000 (see the red crosses in the left panel of Fig. 3 in a double logarithmic scaling) suggest that \(\delta _0(n) \approx c_1 n^{1/3} + c_2 n^{2/3}\) and yields the conjecture
for some function \(F_{2,1}(t)\). Numerically, the conjecture has been convincingly checked against the data obtained by the Stirlingtype formula (5) for \(n=10^6\), \(n=10^8\), and \(n=10^{10}\); see the left panel of Fig. 4. We have fitted a polynomial \({{\tilde{F}}}_{2,1}(t)\) of degree 64 to the 836 data points obtained for \(n=10^{10}\) in the interval \(8 \leqslant t \leqslant 10\), thus approximating the putative function \(F_{2,1}(t)\) there.
Remark 4.1
The error of approximating \(F_{2,1}(t)\) by this procedure can be estimated as follows. Extrapolating the errors displayed in the left panel of Fig. 3 shows that the Stirlingtype formula induces a perturbation of size \(\approx (0.031 n^{2/3} + 0.058 n^{1}) n^{1/3}_{n=10^{10}} = 1.4\times 10^{5}\). On the other hand, the finite size effect of the next order term \(n^{2/3} F_{2,2}(t)\), displayed in the left panel of Fig. 6, induces a perturbation of size \(\approx 0.25 n^{1/3}_{n=10^{10}} = 1.2\cdot 10^{4}\). Thus, altogether \({{\tilde{F}}}_{2,1}\) approximates \(F_{2,1}\) up to an error^{Footnote 29} of the order \(10^{4}\).
If we iterate this approach yet another step, by looking at the error
for n up to 1000, then a double logarithmic plot (the green circles in the left panel of Fig. 3) suggests that \(\delta _1(n) \approx c_1 n^{2/3} + c_2 n^{1}\). As stated in the introduction, this yields the refinement (9) of conjecture (40), namely that there is further a function \(F_{2,2}(t)\) such that
uniformly in \(l\in {\mathbb {N}}\).
Remark 4.2
To validate conjecture (41) against numerical data, obtained by replacing \(F_{2,1}(t)\) by the approximation \({{\tilde{F}}}_{2,1}(t)\), we have to be careful with an effective choice of n, though. On the one hand, as a perturbation of \(F_{2,2}(t)\) the error of about \(10^{4}\) in \({{\tilde{F}}}_{2,1}\), as estimated in Remark 4.1, would get amplified by \(n^{1/3}\). On the other hand, an extrapolation of the errors displayed in the left panel of Fig. 3 shows that the Stirlingtype formula would induce an additional perturbation of size \(\approx (0.031 n^{2/3} + 0.058 n^{1}) n^{2/3}\). The sweet spot of both perturbations combined is at \(n\approx 1.4\times 10^4\) with a minimum error of about \(3.6\times 10^{2}\). Thus, we better stay with the tabulated exact values of the distribution of \(L_n\) up to \(n=1000\), which restricts the size of the perturbation to just less than the order of \(n^{1/3} 10^{4}_{n=1000} = 10^{3}\).
Thus, staying with the tabulated values of the distribution of \(L_n\) for \(n=250\), \(n=500\), and \(n=1000\) we get a convincing picture; see the left panel of Fig. 6. We have fitted a polynomial \({{\tilde{F}}}_{2,2}(t)\) of degree 48 to all of the 152 data points in the interval \(7.5 \leqslant t \leqslant 9.5\), approximating the putative function \(F_{2,2}(t)\) there.
4.2 The PDF of the Distribution of \(L_n\)
If we apply the central differencing formula, for smooth functions F(x) and increments \(h\rightarrow 0\), that is to say
with the increment \(h=n^{1/6}\) to the conjectured expansion (41), now written in the form
we get, assuming some uniformity, an induced expansion of the PDF:
uniformly in \(l\in {\mathbb {N}}\), where we have briefly written
Note the shift by 1/2 in the numerator of \({{\hat{t}}}_l\) as compared to \(t_l\) (defined in (39)). There is compelling numerical evidence for the expansion (42a); see the right panels of Figs. 4 and 6.
4.3 The Expected Value of \(L_n\)
By a shift and rescale, the expected value of the discrete random variable \(L_n\) can be written in the form
If we write (42a), with obvious definitions of the functions \(G_j(t)\), in the form
we get the induced expansion
Now, if we assume (a) that the decay \(G_j(t) \rightarrow 0\) (and likewise for all the derivatives) is exponentially fast as \(t\rightarrow \pm \infty \) (see Figs. 4 and 6) and (b) that the \(G_j\) can be extended analytically to a strip containing the real axis, we obtain
where “\(\doteq \)” denotes equality up to terms that are exponentially small for large n. Here, in the first step the series was obtained by adding, under assumption (a), the exponentially small tail, and in the next step we have identified the series as the trapezoidal rule with stepsize \(h = n^{1/6}\)—a quadrature rule known to converge, under assumption (b), exponentially fast to the integral, cf. [53].
Remark 4.3
For the function \(G_0(t) = F_2'(t)\), i.e., the density of the Tracy–Widom distribution, the asserted exponentially fast convergence (44) can be checked against numerical data which were obtained by applying the highly accurate numerical methods described in [9] to the representation (37b) of \(F_2'(t)\); see Table 3.
We have thus derived from (41)—based on the assumptions of uniformity, exponential decay, and analytic continuation of the functions \(G_j\) and their derivatives—the following expansion which adds three more terms to the expansion given in [4, Thm. 1.2]:
where we have, with the numerical value of \(\mu _0\) taken from [9, Table 10], cf. also Table 3,
We note that the higher derivatives do not contribute to the integral values, as can be shown using integration by parts and the assumed exponential decay to zero. Based on the polynomial approximations displayed in Figs. 4 and 6 we get the numerical estimates—comparing, in addition to \(n=10^{10}\), with the analogous results for \(n=10^9\) and \(n=10^{11}\):
Further evidence for the validity of the expansion (45) comes from looking at a least squares fit of the form^{Footnote 30} (where the upper bound \(k=9\) has been chosen as to maximize the number of matching digits for the two data sets below)
with \({\mathbb {E}}(L_n)\) obtained from the tabulated values of \({\mathbb {P}}(L_n=l)\) up to \(n=1000\). If we do so in extended precision for two different data sets, first for n from 500 upwards and next for n from 600 upwards, we obtain as digits that are matching in both cases
Here the value of \(c_0\) is in perfect agreement with the known value of \(\mu _0\) and \(c_1\), \(c_2\) are consistent with the inaccuracies of the estimates in (46), cf. Remarks 4.1/4.2. Hence, the most accurate values that we can offer for \(\mu _1\) and \(\mu _2\) are those displayed in (12).
4.4 The Variance of \(L_n\)
By a shift and rescale, the variance of \(L_n\) can we written as
By inserting the expansions (43) and (45), and by arguing as in (44), we get the following expansion which adds two more terms to the leading order found in [4, Thm. 1.2]:
where we have, with the numerical value of \(\nu _0\) taken from [9, Table 10], cf. also Table 3,^{Footnote 31}
By using the polynomial approximations \({{\tilde{F}}}_{2,1}\) and \(\tilde{F}_{2,2}\) displayed in Figs. 4 and 6, as well as the numerical values of \(\mu _0\), \(\mu _1\), \(\mu _2\) from (12), we get the estimates \(\nu _1 \approx 1.2070\) and \(\nu _2 \approx 0.57\).
Once again, further evidence and increased numerical accuracy comes from a least squares fit of the form^{Footnote 32} (where the upper bound \(k=8\) has been chosen as to maximize the number of matching digits for the two data sets below)
with \(\textrm{Var}(L_n)\) obtained from the tabulated values of \({\mathbb {P}}(L_n=l)\) up to \(n=1000\). If we do so in extended precision for two different data sets, first for n from 500 upwards and then for n from 600 upwards, we obtain as digits that are matching in both cases
Here the value of \(c_0\) is in perfect agreement with the known value of \(\nu _0\) and the values for \(c_1\), \(c_2\) are consistent with the inaccuracies of the estimates for \(\nu _1\) and \(\nu _2\) shown above, cf. Remarks 4.1/4.2. Hence, the most accurate values that we can offer for the coefficients \(\nu _1\) and \(\nu _2\) are those displayed in (13).
Remark 4.4
(added in proof) The conjectured functional form (11) of \(F_{2,1}(t)\) gives numerical values of the coefficients \(\mu _1\) and \(\nu _1\) that agree with the values displayed in (12) and (13) to all digits shown.
Notes
See Sect. 3.2 below for a method to compute the exact rational values of the distribution of \(L_n\) based on random matrix theory, which has been used by the author to tabulate \({\mathbb {P}}(L_n=l)\), \(1\leqslant l\leqslant n\), up to \(n=1000\).
In Mathematica, a single trial is generated by the command
$$\begin{aligned} {\mathtt{Length@LongestOrderedSequence[PermutationList[RandomPermutation[n],n]]}}. \end{aligned}$$The Tauberian part (“dePoissonization”) makes it hard to get more than the leading order of the asymptotics.
In the first place, [4, Thm. 1.1] states the following limit to hold pointwise in \(t\in {\mathbb {R}}\):
$$\begin{aligned} \lim _{n\rightarrow \infty } {\mathbb {P}}\left( \frac{L_n2\sqrt{n}}{n^{1/6}}\leqslant t\right) = F_2(t). \end{aligned}$$However, since the limit distribution \(F_2\) is continuous, by a standard Tauberian followup [54, Lemma 2.1] of the Portmanteau theorem in probability theory, this convergence is known to hold, in fact, uniformly in t.
A generalization of Stirling’s classical formula, indeed: for the Hadmissible function \(f(z)=e^z\), cf. Theorem 2.1 Criterion II.g, we have \(a_n=1/n!\), \(b(r)=a(r)=r\), \(r_n=n\) and (4) specifies to
$$\begin{aligned} \frac{1}{n!} = \frac{e^n}{n^n \sqrt{2\pi n}}(1+ o(1)) \qquad (n\rightarrow \infty ). \end{aligned}$$As in Table 1, the error is already below \(1\%\) for n as small as \(n=20\).
Note that \(l\in {\mathbb {N}}\) is always a discrete variable in this paper, so there is no need for taking integer parts here.
Based on Monte Carlo simulations, Forrester and Mays [27, Eq. (1.10) and Fig. 7] were recently also led to conjecture an expansion of the form
$$\begin{aligned} {\mathbb {P}}(L_n\leqslant l) = F_2(t_l) + n^{1/3} F_{2,1}(t_l) + \cdots . \end{aligned}$$However, the substantially larger errors of Monte Carlo simulations as compared to the Stirlingtype formula (5) would inhibit them from getting, in reasonable time, much evidence about the next finite size correction term.
Expansions of probability distributions are sometimes called Edgeworth expansions in reference to the classical one for the central limit theorem. In random matrix theory a variety of such expansions have been studied: e.g., for the softedge scaling limits of GUE/LUE [16] and GOE/GSE [17], for the hardedge scaling limit of LUE [12] and L\(\beta \)E [28], for the bulk scaling limit of CUE/COE/CSE [14]. For the hardtosoft edge transition limit of LUE, see the expansion (10) and its discussion.
Since we consider entire functions only, Hadmissibility is here understood to hold in all of \({\mathbb {C}}\).
In terms of differential operators we have \(r \frac{\textrm{d}}{\textrm{d}r} = \frac{\textrm{d}}{\textrm{d}\log r}\).
By definition, an entire function f has genus zero if it is a polynomial or if it can be represented as a convergent infinite product of the form
$$\begin{aligned} f(z) = c z^m \prod _{n=1}^\infty \Big (1 \frac{z}{z_n}\Big )\qquad (z \in {\mathbb {C}}), \end{aligned}$$where \(c\in {\mathbb {C}}\) is a constant, \(m\in {\mathbb {N}}_0\) is the order of the zero at \(z=0\), and \(z_1,z_2,\ldots \) is the sequence of the nonzero zeros, where each one is listed as often as multiplicity requires.
Note that the particular case \(f(z)=e^z\) (which is Hadmissible by Theorem 2.1.II.g) specifies to the wellknown normal approximation of the Poisson distribution for large intensities—which is a simple consequence of the central limit theorem if we observe that the sum of k independent Poisson random variates of intensity \(\rho \) is one of intensity \(r = \rho k\).
We follow the terminology in the theory of Boltzmann samplers [20], a framework for the random generation of combinatorial structures. Note that mean and variance of the Boltzmann probabilities \(a_n r^n/f(r)\) are exactly the auxiliary functions a(r) and b(r) as defined in (14), cf. [20, Prop. 2.1].
See Remark A.1 for the uniformity implied by the notation \(O(z^{1})\) as \(z\rightarrow \infty \) while \(\!\arg z\leqslant \tfrac{\pi }{2}\delta \).
Odlyzko [39, Ex. 10.9] reports that he and Wilf had used this approach, before 1995, for small l in the framework of the method of “subtraction of singularities” in asymptotic enumeration. He states the expansions for \(D_4(z)\) and \(D_5(z)\), cf. [39, Eqs. (10.30)/(10.39)], with a misrepresented constant factor in \(D_5(z)\), though. No attempt, however, was made back then to guess the general form.
This factor is zero at \(\theta _*=0\), so that Hsu’s variant (48) of Laplace’s method, which is the one predominantly found in the literature, does not yield the leading term of \(D_l(z)\). That we have to expand the nonexponential factor up to degree \(l(l1)\) for the first nonzero contribution to show up, corresponds to the mutual cancellation of the leading terms of (21) when being inserted into the Toeplitz determinant that defines \(D_l(z)\).
For real \(\alpha >1\), Tracy and Widom [52] had conjectured this asymptotics in 1994 based on a guess of the connection formula (33) for the Painlevé transcendent (32) and a numerical exploration of the constant factor. In the same year Forrester [24] confirmed this to be true for \(\alpha \in {\mathbb {N}}\) by sketching an argument that, basically, uses the idea underlying the multidimensional Laplace method in the proof of Theorem 2.2. So, Corollary A.1 can be used to spell out the details there, and for the generalization to \(\beta \)ensembles sketched in [25, p. 608].
Though Regev studies, with a real parameter \(\beta >0\), the more general combinatorial sums
$$\begin{aligned} S_l^{(\beta )}(n):=\sum _{\lambda \,\vdash n\,:\, l_\lambda \leqslant l} d_\lambda ^\beta , \end{aligned}$$this generality adds only marginally to the complexity of his proof. In its final step he refers to the same instance of Selberg’s integral, cf. [2, Eq. (2.5.11)], that we have used to obtain (25) in the specific case \(\beta =2\).
There are holonomic recurrences satisfied by \(n!\cdot {\mathbb {P}}(L_n\leqslant l)\) w.r.t. n; cf. the explicit formulae for \(l=2,3\) in [30, p. 281], for \(l=4\) in [48, p. 556] (the cases \(l=3,5\) are misprinted there), for \(l=5\) in [7, p. 468]; we have used the one for \(l=5\) in Table 2. For \(l>5\) the polynomial coefficients quickly become unwieldy, though.
In fact, this equation is obtained as the particular choice \(c_1=c_2=c_4=c_5=c_8=c_9=0\), \(c_3=1\), \(c_6=1/4\), \(c_7=l^2/4\), \(f(x)=x\) in the full ChazyI equation of the form discussed in [18, Eq. (A3)].
The table is available for download at https://boxm3.ma.tum.de/f/7c4f8cb22f5d425f8cff/. The tabulated values were checked, for \(l=1,\ldots ,5\), against the recurrences cited in Footnote 22 and, for \(nl=0,\ldots ,20\), against an explicit formula by Goulden [31, Cor. 3.4(a)]—note the restriction on l for it to hold true:
$$\begin{aligned} {\mathbb {P}}(L_n=l) = \sum _{i,j,k \geqslant 0, i+j+k\leqslant nl} \frac{(1)^{i+j}n!}{i!j!k! (nik)!(njk)!} \qquad (l \geqslant (n1)/2). \end{aligned}$$We have to stabilize the numerical evaluation of the expression \(h \log (1+h)\) for small \(h:=v_l/n\approx 0\). This is done, first, by using hlog1p(h) and, second, by switching to a suitable Taylor expansion for very small h.
In fact, nothing of substance would change if we just replaced \(\tau _n\) by 1 since the thus committed error would be in the same ballpark as the one of the Stirlingtype formula (5) itself. We did not bother to do so, though.
(added in proof) In fact, the conjectured analytic form (11) of \(F_{2,1}(t)\) gives \(\Vert \tilde{F}_{2,1}  F_{2,1}\Vert _\infty \approx 1.1814 \cdot 10^{4}\).
Forrester and Mays [27, Sect. 4.4] discussed a least squares fit of the form
$$\begin{aligned} {\mathbb {E}}(L_n) \approx 2\sqrt{n} 1.77108\,68074 \cdot n^{1/6} + {\hat{c}}_1 + {\hat{c}}_2 n^{\alpha }, \end{aligned}$$where they let \(\alpha =1/6\) compete with \(\alpha = 1/3\). Using exact values of \({\mathbb {E}}(L_n)\) for n from 10 up to 700, they identified the exponent \(\alpha =1/3\) to provide the better fit, with values \({\hat{c}}_1 = 0.507\) and \({\hat{c}}_2 = 0.222\). They give reasons (different from ours) to expect \({\hat{c}}_1=0.507\) to correspond to an exact constant term 1/2 in the expansion of \({\mathbb {E}}(L_n)\). However, we can fully explain their result by just taking the least squares fit of their ansatz to the relevant terms of the expansion (45), that is by fitting the simplified model
$$\begin{aligned} 0.5 + 0.0658 n^{1/6} + 0.261 n^{1/2}0.119 n^{5/6} \approx {\tilde{c}}_1 + {\tilde{c}}_2 n^{\alpha } \end{aligned}$$for \(n=10,\ldots ,700\). Unsurprisingly, \(\alpha =1/3\) is the better choice over \(\alpha =1/6\) here; and we get \({{\tilde{c}}}_1 = 0.506\) and \({{\tilde{c}}}_2 = 0.222\), reproducing the values reported by them.
Note that \(\frac{1}{24}\int _{\infty }^{\infty } t^2 F'''_2(t)\,\textrm{d}t = \frac{2}{24} \int _{\infty }^{\infty } F'_2(t)\,\textrm{d}t= \frac{1}{12}\).
See [27, Eq. (4.19)] for a less accurate fit of the form \(\textrm{Var}(L_n) \approx 0.81319\,47928\cdot n^{1/3} + {{\tilde{c}}}_1 + {{\tilde{c}}}_2 n^{1/3}\).
Note that there is a typo in [29, p. 186]: the constant has to be \(\Gamma (\lambda /\nu )/\nu \) rather than \(\Gamma ((\lambda +1)/\nu )/\lambda \).
References
Aldous, D., Diaconis, P.: Longest increasing subsequences: from patience sorting to the BaikDeiftJohansson theorem. Bull. Amer. Math. Soc. (N.S.) 36(4), 413–432 (1999)
Anderson, G.W., Guionnet, A., Zeitouni, O.: An Introduction to Random Matrices. Cambridge University Press, Cambridge, UK (2010)
Baer, R.M., Brock, P.: Natural sorting over permutation spaces. Math. Comp. 22, 385–410 (1968)
Baik, J., Deift, P., Johansson, K.: On the distribution of the length of the longest increasing subsequence of random permutations. J. Amer. Math. Soc. 12(4), 1119–1178 (1999)
Baik, J., Deift, P., Suidan, T.: Combinatorics and Random Matrix Theory. American Mathematical Society, Providence, RI (2016)
Baik, J., Jenkins, R.: Limiting distribution of maximal crossing and nesting of Poissonized random matchings. Ann. Probab. 41(6), 4359–4406 (2013)
Bergeron, F., Favreau, L., Krob, D.: Conjectures on the enumeration of tableaux of bounded height. Discrete Math. 139(13), 463–468 (1995)
Bleistein, N., Handelsman, R.A.: Asymptotic Expansions of Integrals, 2nd edn. Dover Publications, Inc., New York (1986)
Bornemann, F.: On the numerical evaluation of distributions in random matrix theory: a review. Markov Process. Related Fields 16(4), 803–866 (2010)
Bornemann, F.: On the numerical evaluation of Fredholm determinants. Math. Comp. 79(270), 871–915 (2010)
Bornemann, F.: Accuracy and stability of computing highorder derivatives of analytic functions by Cauchy integrals. Found. Comput. Math. 11(1), 1–63 (2011)
Bornemann, F.: A note on the expansion of the smallest eigenvalue distribution of the LUE at the hard edge. Ann. Appl. Probab. 26(3), 1942–1946 (2016)
Bornemann, F.: Asymptotic expansions relating to the distribution of the length of longest increasing subsequences (2023). arXiv:2301.02022
Bornemann, F., Forrester, P.J., Mays, A.: Finite size effects for spacing distributions in random matrix theory: circular ensembles and Riemann zeros. Stud. Appl. Math. 138(4), 401–437 (2017)
Böttcher, A.: On the determinant formulas by Borodin, Okounkov, Baik, Deift and Rains. In: Toeplitz matrices and singular integral equations (Pobershau, 2001), Oper. Theory Adv. Appl., vol. 135, pp. 91–99. Birkhäuser, Basel (2002)
Choup, L.N.: Edgeworth expansion of the largest eigenvalue distribution function of GUE and LUE. Int. Math. Res. Not. Art. ID 61049, 1–32 (2006)
Choup, L.N.: Edgeworth expansion of the largest eigenvalue distribution function of Gaussian orthogonal ensemble. J. Math. Phys. 50(1), 013512, 22 (2009)
Cosgrove, C.M.: Chazy classes IX–XI of thirdorder differential equations. Stud. Appl. Math. 104(3), 171–228 (2000)
Deift, P., Krasovsky, I., Vasilevska, J.: Asymptotics for a determinant with a confluent hypergeometric kernel. Int. Math. Res. Not. 2011(9), 2117–2160 (2011)
Duchon, P., Flajolet, P., Louchard, G., Schaeffer, G.: Boltzmann samplers for the random generation of combinatorial structures. Combin. Probab. Comput. 13(45), 577–625 (2004)
Fedoryuk, M.V.: Asymptotic methods in analysis. In: R.V. Gamkrelidze (ed.) Analysis I, Encyclopaedia of Mathematical Sciences, vol. 13, pp. 83–191. SpringerVerlag (1989)
Flajolet, P., Sedgewick, R.: Analytic Combinatorics. Cambridge University Press, Cambridge (2009)
Forrester, P.J.: The spectrum edge of random matrix ensembles. Nuclear Phys. B 402(3), 709–728 (1993)
Forrester, P.J.: Exact results and universal asymptotics in the Laguerre random matrix ensemble. J. Math. Phys. 35(5), 2539–2551 (1994)
Forrester, P.J.: LogGases and Random Matrices. Princeton University Press, Princeton, NJ (2010)
Forrester, P.J., Hughes, T.D.: Complex Wishart matrices and conductance in mesoscopic systems: exact results. J. Math. Phys. 35(12), 6736–6747 (1994)
Forrester, P.J., Mays, A.: Finite size corrections relating to distributions of the length of longest increasing subsequences (2022). arXiv:2205.05257v5
Forrester, P.J., Trinh, A.K.: Finitesize corrections at the hard edge for the Laguerre \(\beta \) ensemble. Stud. Appl. Math. 143(3), 315–336 (2019)
Fulks, W., Sather, J.O.: Asymptotics. II. Laplace’s method for multiple integrals. Pacific J. Math. 11, 185–192 (1961)
Gessel, I.M.: Symmetric functions and Precursiveness. J. Combin. Theory Ser. A 53(2), 257–285 (1990)
Goulden, I.P.: Exact values for degree sums over strips of Young diagrams. Canad. J. Math. 42(5), 763–775 (1990)
Graham, R.L., Knuth, D.E., Patashnik, O.: Concrete mathematics, second edn. AddisonWesley Publishing Company, Reading, MA (1994)
Hayman, W.K.: A generalisation of Stirling’s formula. J. Reine Angew. Math. 196, 67–95 (1956)
Hsu, L.C.: A theorem on the asymptotic behavior of a multiple integral. Duke Math. J. 15, 623–632 (1948)
Johansson, K.: The longest increasing subsequence in a random permutation and a unitary random matrix model. Math. Res. Lett. 5(12), 63–82 (1998)
Kirwin, W.D.: Higher asymptotics of Laplace’s approximation. Asymptot. Anal. 70(34), 231–248 (2010)
Levin, B.J.: Distribution of zeros of entire functions, revised edn. American Mathematical Society, Providence, R.I. (1980)
Odlyzko, A.: Exact distribution of lengths of longest increasing subsequences in permutations (2000). https://www.dtc.umn.edu/~odlyzko/tables/index.html
Odlyzko, A.M.: Asymptotic enumeration methods. In: Handbook of combinatorics, Vol. 2, pp. 1063–1229. Elsevier Sci. B. V., Amsterdam (1995)
Odlyzko, A.M., Rains, E.M.: On longest increasing subsequences in random permutations. In: Analysis, geometry, number theory: the mathematics of Leon Ehrenpreis (Philadelphia, PA, 1998), pp. 439–451. Amer. Math. Soc., Providence, RI (2000)
Olver, F.W.J.: Asymptotics and Special Functions. Academic Press (1974)
Rains, E.M.: Increasing subsequences and the classical groups. Electron. J. Combin. 5, #R12 (1998)
Regev, A.: Asymptotic values for degrees associated with strips of Young diagrams. Adv. in Math. 41(2), 115–136 (1981)
Romik, D.: The Surprising Mathematics of Longest Increasing Subsequences. Cambridge University Press, New York, NY (2015)
Schensted, C.: Longest increasing and decreasing subsequences. Canadian J. Math. 13, 179–191 (1961)
Simon, B.: Orthogonal Polynomials on the Unit Circle. Part 1: Classical Theory. American Mathematical Society, Providence, RI (2005)
Simon, B.: Advanced Complex Analysis. American Mathematical Society, Providence, RI (2015)
Stanley, R.P.: Increasing and decreasing subsequences and their variants. In: International Congress of Mathematicians. Vol. I, pp. 545–579. Eur. Math. Soc., Zürich (2007)
Stanton, D., White, D.: Constructive Combinatorics. SpringerVerlag, New York (1986)
Szegő, G.: Ein Grenzwertsatz über die Töplitzschen Determinanten einer reellen positiven Funktion. Math. Ann. 76, 490–503 (1915)
Tracy, C.A., Widom, H.: Levelspacing distributions and the Airy kernel. Comm. Math. Phys. 159(1), 151–174 (1994)
Tracy, C.A., Widom, H.: Level spacing distributions and the Bessel kernel. Comm. Math. Phys. 161(2), 289–309 (1994)
Trefethen, L.N., Weideman, J.A.C.: The exponentially convergent trapezoidal rule. SIAM Rev. 56(3), 385–458 (2014)
van der Vaart, A.W.: Asymptotic Statistics. Cambridge University Press, Cambridge (1998)
Wong, R.: Asymptotic Approximations of Integrals. Academic Press, Inc., Boston, MA (1989)
Acknowledgements
The author would like to thank the Isaac Newton Institute for Mathematical Sciences, Cambridge (UK), for support and hospitality during the 2019 program “Complex analysis: techniques, applications and computations (CAT)” where work on Sect. 2 of this paper was undertaken. This work was supported by EPSRC Grant No EP/R014604/1.
Funding
Open Access funding enabled and organized by Projekt DEAL.
Author information
Authors and Affiliations
Corresponding author
Additional information
Communicated by Alan Edelman.
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
A. Appendix: The Multidimensional Laplace Method
A. Appendix: The Multidimensional Laplace Method
The classical onedimensional method of Laplace can be generalized to provide the asymptotics, as \(z\rightarrow \infty \), of multidimensional integrals of the form
Here, \(\Omega \subset {\mathbb {R}}^n\) is a measurable set and \(f, S : \Omega \rightarrow {\mathbb {R}}\) are subject to suitable assumptions. For instance, if we assume that f and S are sufficiently smooth and the phase function S(x) takes a unique minimum at an interior point \(x_*\) of \(\Omega \) with \(\det S''(x_*)\ne 0\) then the standard result—going back to Hsu [34, Lemma 1]—states that for each \(0<\delta \leqslant \frac{\pi }{2}\) as \(z\rightarrow \infty \)
Remark A.1
As is customary in asymptotic analysis in the complex plane, cf. [41, p. 7], we understand this asymptotic expansion (and similar expansions with o or Oterms) to hold uniformly in \(\{z\in {\mathbb {C}}: z\geqslant R_\delta , \arg z \leqslant \frac{\pi }{2}\delta \}\) if \(R_\delta >0\) has been chosen sufficiently large.
If \(f(x_*)=0\), however, formula (48) fails to yield the precise leading order term of the expansion. On the other hand, it is known that there holds, for sufficiently smooth f and S, cf. [21, Eq. (1.27)], a general asymptotic expansion of the form
Still, it would be extremely awkward to determine the first nonzero coefficient from the standard proof^{Footnote 33} of (49), in which the \(c_k\) depend on higher order derivatives of a nonlinear transform obtained from the Morse lemma, deforming S(x) to a quadratic form.
Building on a different technique introduced by Fulks and Sather [29], Kirwin [36] succeeded in establishing formulae for the higher order coefficients in terms of asymptotic expansions of f and S into homogeneous functions at \(x_*\). However, these authors consider only the case of real \(z\rightarrow \infty \), whereas we need uniformity, for arbitrary small \(\delta >0\), as \(z\rightarrow \infty \) with \(\arg z \leqslant \frac{\pi }{2}\delta \). Since the leading order term of their expansions suffices for the purposes of Sect. 2, we will give a much simplified version of their proof in this Appendix, explicitly tracing constants to establish the required uniformity.
1.1 Notation and Assumptions
By a simple transformation (see the proof of Theorem 2.2) we can restrict ourselves to
Writing \(z = \sigma + i\tau \) we have
Let \(\Omega \subset {\mathbb {R}}^n\) we a measurable set with 0 as an interior point, that is, there is \(\epsilon _0 >0\) such that \(B_\epsilon (0)\subset \Omega \) for all open balls of radius \(0< \epsilon \leqslant \epsilon _0\) centered at 0. By denoting \(\cdot \) the Euclidean norm on \({\mathbb {R}}^n\), we write \({\mathbb {R}}^n\setminus \{0\} \ni x = \rho \cdot \xi \) in spherical coordinates with \(\rho =x\) and \(\xi =x/\rho \in S^{n1}\). We assume that \(f, S: \Omega \rightarrow {\mathbb {R}}\) are measurable functions subject to the following conditions:

(1)
S(x) is positively bounded away from zero on \(\Omega \setminus B_\epsilon (0)\) for each \(\epsilon >0\);

(2)
there is a \(\nu >0\) and a positive continuous function \(S_0:S^{n1}\rightarrow {\mathbb {R}}\) with
$$\begin{aligned} S(x) = \rho ^\nu S_0(\xi ) + o(\rho ^\nu )\qquad (\rho \rightarrow 0), \end{aligned}$$uniformly in \(\xi \in S^{n1}\);

(3)
there is a \(\lambda > 0\) and a bounded measurable function \(f_0:S^{n1}\rightarrow {\mathbb {R}}\) with
$$\begin{aligned} f(x) = \rho ^{\lambda n} f_0(\xi ) + o(\rho ^{\lambda n})\qquad (\rho \rightarrow 0), \end{aligned}$$uniformly in \(\xi \in S^{n1}\);

(4)
integrability: there is \(\sigma _0>0\) with \(M = \int _\Omega e^{\sigma _0 S(x)}f(x) \,dx <\infty \).
We extend \(f_0\) and \(S_0\) to all of \({\mathbb {R}}^n\) by homogeneity, that is, by
and, for definiteness, \(f_0(0)=S_0(0)=0\). Finally, for purposes of reference we recall the following well known integral evaluation,
The leading order result of [29, p. 186]^{Footnote 34} and [36, Thm. 1.1] is now as follows:
Theorem A.1
Under conditions (1)–(4) there holds for each \(0< \delta \leqslant \frac{\pi }{2}\) as \(z\rightarrow \infty \)
Denoting the surface measure on \(S^{n1}\) by \(\omega \), the integral on the right evaluates to
We fix \(\delta >0\) and break the proof of this theorem, based on the idea of “trading tails” (a notion popularized for Laplace’s method in [32, p. 466]), into some preparatory steps.
Lemma A.1
For \(\sigma \geqslant \sigma _0\) and \(0<\epsilon \leqslant \epsilon _0\), there is a constant \(\alpha >0\) such that
where the implied constant does not depend on z and \(\epsilon \).
Proof
By Conditions (1) and (2) there is a constant \(\alpha >0\) such that
Hence, Condition (4) yields straightforwardly
the implied constant being just M. \(\square \)
Lemma A.2
There is \(\eta _\epsilon \rightarrow 0\) for \(\epsilon \rightarrow 0\) such that for \(\sigma \geqslant \sigma _0\) and \(0<\epsilon \leqslant \epsilon _0\)
where the implied constant does not depend on z and \(\epsilon \).
Proof
Conditions (1) and (2) give the existence of a constant \(\gamma >0\) such that
and Condition (3) gives \(\eta _\epsilon \rightarrow 0\) for \(\epsilon \rightarrow 0\) with
Hence we get
where the integral over \({\mathbb {R}}^n\) was evaluated by spherical symmetry and the resulting gamma integral by Eq. (51); \(\omega _{n1}\) denotes the surface area of the sphere \(S^{n1}\). \(\square \)
Lemma A.3
There is \(\eta '_\epsilon \rightarrow 0\) for \(\epsilon \rightarrow 0\) such that, for \(0<\epsilon \leqslant \epsilon _0\) with \(\epsilon _0\) sufficiently small and \(z\in {\mathbb {C}}\) with \(\!\arg z\leqslant \frac{\pi }{2}  \delta \), \(z\geqslant \sigma _0\cdot \csc \delta \),
where the implied constant does not depend on z and \(\epsilon \).
Proof
Condition (2) gives \(\eta ''_\epsilon \rightarrow 0\) for \(\epsilon \rightarrow 0\) and \(\alpha '>0\) with
whereas Condition (3) yields a constant \(\gamma '>0\) such that
Because of \(e^w1 \leqslant e^{w}1\) for \(w\in {\mathbb {C}}\) and by (50) we obtain for \(x\in B_\epsilon (0)\)
Thus, if \(\epsilon _0\) is small enough to guarantee \(\eta ''_\epsilon \csc \delta < \alpha '\), we obtain by the same calculations as previously in the proof of Lemma A.2
if we define the term given by the large bracket to be \(\eta _\epsilon '\). \(\square \)
Proof of Theorem A.1
By splitting the integral as follows and by applying Lemmas A.1–A.3, we get for \(0<\epsilon \leqslant \epsilon _0\) with \(\epsilon _0\) sufficiently small and for \(z\in {\mathbb {C}}\) with \(\!\arg z\leqslant \frac{\pi }{2}  \delta \), \(z\geqslant \sigma _0\cdot \csc \delta \)
where the implied constants do not depend on z and \(\epsilon \). By (53) and Lemma A.1, we get likewise
Coupling \(\epsilon \propto z^{1/2\nu }\), we thus get some expression \(\eta (z^{1})\rightarrow 0\) for \(z\rightarrow \infty \) with
where the implied constant does not depend on z. Finally, by transforming to spherical coordinates and using (51) for the inner integral once more, we calculate
which finishes the proof. \(\square \)
1.2 Quadratic Leading Order Term in the Phase Function
It is straightforward from (52) to specialize Theorem A.1 to the case of a quadratic leading order term \(S_0\) in the asymptotic expansion of the phase function S.
Corollary A.1
Under conditions (1)–(4) with a quadratic \(S_0(x) = x^T H x/2\) defined by a symmetric positive definite matrix \(H\in {\mathbb {R}}^{n\times n}\), there holds for each \(0<\delta \leqslant \frac{\pi }{2}\) as \(z\rightarrow \infty \)
where \({\mathbb {E}}\) denotes expectation with respect to the multivariate normal distribution with covariance matrix \(H^{1}\), namely
Remark A.2
Corollary A.1 is providing the precise leading order asymptotic of the integral only if the condition \({\mathbb {E}}(f_0) \ne 0\) is satisfied. In the case of a sufficiently smooth integrand the function \(f_0\) is the first nonzero homogeneous polynomial appearing in the Taylor expansion of f at zero. For symmetry reasons, \({\mathbb {E}}(f_0) \ne 0\) implies that \(\deg f_0\) must be even. Thus, if also S is sufficiently smooth, a comparison with (49) yields, if \({\mathbb {E}}(f_0)\ne 0\),
If \(f(0)\ne 0\), this reproduces Hsu’s formula (48) since then \(f_0\equiv f(0)\) and hence \({\mathbb {E}}(f_0)=f(0)\).
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Bornemann, F. A StirlingType Formula for the Distribution of the Length of Longest Increasing Subsequences. Found Comput Math 24, 915–953 (2024). https://doi.org/10.1007/s1020802309604z
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s1020802309604z