A335990
The moment generating function of the limiting distribution of the number of comparisons in quicksort can be written in the form M(t) = m(-2*t)/(exp(2*gamma*t)*Gamma(1 + 2*t)) for |t| < 1/2, where m(z) = Sum_{n >= 0} B(n)*z^n/n! for |z| < 1. This sequence gives the numerators of the rational numbers B(n) for n >= 0.
Original entry on oeis.org
1, 0, 7, 19, 565, 229621, 74250517, 30532750703, 90558126238639, 37973078754146051, 21284764359226368337, 1770024989560214080011109, 539780360793818428471498394131, 194520883210026428577888559667954807, 911287963487139630688627952818633149408727, 328394760901508739430228985010652235796369497219
Offset: 0
The first few fractions are 1/1, 0/1, 7/4, 19/8, 565/36, 229621/3456, 74250517/172800, 30532750703/10368000, 90558126238639/3810240000, ... = A335990/A335991.
- Pascal Hennequin, Analyse en moyenne d'algorithmes, tri rapide et arbres de recherche, Ph.D. Thesis, L'École Polytechnique Palaiseau (1991), p. 83.
- S. B. Ekhad and D. Zeilberger, A detailed analysis of quicksort running time, arXiv:1903.03708 [math.PR], 2019. [They have the first eight moments for the number of comparisons in quicksort from which Hennequin's first eight asymptotic cumulants can be derived.]
- James A. Fill and Svante Janson, Smoothness and decay properties of the limiting Quicksort density function, In: D. Gardy and A. Mokkadem (eds), Mathematics and Computer Science, Trends in Mathematics, Birkhäuser, Basel, 2000, pp. 53-64.
- James A. Fill and Svante Janson, Quicksort asymptotics, Journal of Algorithms, 44(1) (2002), 4-28.
- Steven Finch, Recursive PGFs for BSTs and DSTs, arXiv:2002.02809 [cs.DS], 2020; see Section 1.4. [He gives the constants a_s = (-2)^s*A(s) for s >= 2. He also evaluates c(2) - c(8), where c(n) = B(n)*(-2)^n.]
- P. Hennequin, Combinatorial analysis of the quicksort algorithm, Informatique théoretique et applications, 23(3) (1989), 317-333.
- M. E. Hoffman and M. Kuba, Logarithmic integrals, zeta values, and tiered binomial coefficients, arXiv:1906.08347 [math.CO], 2019-2020; see Section 5.2. [They study the constants a_s = (-2)^s*A(s) = (-2)^s*L_n(B(1),...,B(s)) = (-2)^s*A330852(s)/A330860(s) for s >= 2. They also study the constants c(n) = B(n)*(-2)^n = A329001(n)/A330876(n).]
- Mireille Régnier, A limiting distribution for quicksort, Informatique théorique et applications, 23(3) (1989), 335-343.
- Uwe Rösler, A limit theorem for quicksort, Informatique théorique et applications, 25(1) (1991), 85-100. [He proved that M(t) has a Taylor expansion around t = 0 with an infinite radius of convergence.]
- Kok Hooi Tan and Petros Hadjicostas, Density and generating functions of a limiting distribution in quicksort, Technical Report #568, Department of Statistics, Carnegie Mellon University, Pittsburgh, PA, USA, 1993; see pp. 8-11.
- Kok Hooi Tan and Petros Hadjicostas, Some properties of a limiting distribution in Quicksort, Statistics and Probability Letters, 25(1) (1995), 87-94.
- Vytas Zacharovas, On the exponential decay of the characteristic function of the quicksort distribution, arXiv:1605.04018 [math.CO], 2016. [The author studies the tail of phi(t) = M(i*t), where i = sqrt(-1).]
Cf.
A001620,
A063090,
A067699,
A093418,
A096620,
A115107,
A288964,
A288965,
A288970,
A288971,
A329001 (numerators of B(n)*(-2)^n),
A330852 (numerators of A(n)),
A330860 (denominators of A(n)),
A330876 (denominators of B(n)*(-2)^n),
A335991 (denominators of B(n)).
-
For a fast Maple program for the calculation of the numbers (B(n): n >= 0), see A330852.
-
/* Very slow program due to recursion */
g(k) = sum(a=0, k, (-1)^a*B(k - a)/(a!*(k - a)!*2^a));
f(r) = sum(i=0, r, stirling(r + 1, i + 1, 1)*g(r - i));
b(p) = (-1)^p*(sum(r=1, p, stirling(p + 2, r + 1, 1)*B(p - r)/(p - r)!) + sum(rr=1, p-1, f(rr)*f(p - rr)) + 2*(-1)^p*p!*sum(a=1, p, (-1)^a*B(p - a)/(a!*(p - a)!*2^a)) + 2*sum(i=1, p, stirling(p + 1, i + 1, 1)*g(p - i)))/(p - 1);
B(m) = if(m==0, 1, if(m==1, 0, b(m)));
a(n) = numerator(B(n));
A335991
The moment generating function of the limiting distribution of the number of comparisons in quicksort can be written in the form M(t) = m(-2*t)/(exp(2*gamma*t)*Gamma(1 + 2*t)) for |t| < 1/2, where m(z) = Sum_{n >= 0} B(n)*z^n/n! for |z| < 1. This sequence gives the denominators of the rational numbers B(n) for n >= 0.
Original entry on oeis.org
1, 1, 4, 8, 36, 3456, 172800, 10368000, 3810240000, 177811200000, 9957427200000, 75278149632000000, 1912817782149120000000, 53023308921173606400000000, 17742659631203112173568000000000, 426249654980023566857797632000000000
Offset: 0
The first few fractions are 1/1, 0/1, 7/4, 19/8, 565/36, 229621/3456, 74250517/172800, 30532750703/10368000, 90558126238639/3810240000, ... = A335990/A335991.
- Pascal Hennequin, Analyse en moyenne d'algorithmes, tri rapide et arbres de recherche, Ph.D. Thesis, L'École Polytechnique Palaiseau (1991), p. 83.
- James A. Fill and Svante Janson, Smoothness and decay properties of the limiting Quicksort density function, In: D. Gardy and A. Mokkadem (eds), Mathematics and Computer Science, Trends in Mathematics, Birkhäuser, Basel, 2000, pp. 53-64.
- James A. Fill and Svante Janson, Quicksort asymptotics, Journal of Algorithms, 44(1) (2002), 4-28.
- Steven Finch, Recursive PGFs for BSTs and DSTs, arXiv:2002.02809 [cs.DS], 2020; see Section 1.4. [He gives the constants a_s = (-2)^s*A(s) for s >= 2. He also calculates c(2) - c(8), where c(n) = B(n)*(-2)^n.]
- P. Hennequin, Combinatorial analysis of the quicksort algorithm, Informatique théoretique et applications, 23(3) (1989), 317-333.
- M. E. Hoffman and M. Kuba, Logarithmic integrals, zeta values, and tiered binomial coefficients, arXiv:1906.08347 [math.CO], 2019-2020; see Section 5.2. [They study the constants a_s = (-2)^s*A(s) = (-2)^s*L_n(B(1),...,B(s)) = (-2)^s*A330852(s)/A330860(s) for s >= 2. They also study the constants c(n) = B(n)*(-2)^n = A329001(n)/A330876(n).]
- Mireille Régnier, A limiting distribution for quicksort, Informatique théorique et applications, 23(3) (1989), 335-343.
- Uwe Rösler, A limit theorem for quicksort, Informatique théorique et applications, 25(1) (1991), 85-100. [He proved that M(t) has a Taylor expansion around zero with an infinite radius of convergence.]
- Kok Hooi Tan and Petros Hadjicostas, Density and generating functions of a limiting distribution in quicksort, Technical Report #568, Department of Statistics, Carnegie Mellon University, Pittsburgh, PA, USA, 1993; see pp. 8-11.
- Kok Hooi Tan and Petros Hadjicostas, Some properties of a limiting distribution in Quicksort, Statistics and Probability Letters, 25(1) (1995), 87-94.
- Vytas Zacharovas, On the exponential decay of the characteristic function of the quicksort distribution, arXiv:1605.04018 [math.CO], 2016. [The author studies the tail of phi(t) = M(i*t), where i = sqrt(-1).]
Cf.
A001620,
A063090,
A067699,
A093418,
A096620,
A115107,
A288964,
A288965,
A288970,
A288971,
A329001 (numerators of B(n)*(-2)^n),
A330852 (numerators of A(n)),
A330860 (denominators of A(n)),
A330876 (denominators of B(n)*(-2)^n),
A335990 (numerators of B(n)).
A334750
Total number of swaps needed to sort all n! permutations of n elements by the optimal dual-pivot quicksort "Count".
Original entry on oeis.org
0, 0, 4, 16, 103, 711, 5526, 48066, 463248, 4908816, 56749536, 711299232, 9609618816, 139252708224, 2154724104960, 35464952597760, 618712803717120, 11405648080834560, 221541001069731840, 4522678391979417600, 96811891510299033600, 2168416142767145779200
Offset: 0
- M. Aumüller, M. Dietzfelbinger, C. Heuberger, D. Krenn, and H. Prodinger, Dual-Pivot Quicksort: Optimality, Analysis and Zeros of Associated Lattice Paths, arXiv:1611.00258 [math.CO], 2016.
- M. Aumüller, M. Dietzfelbinger, C. Heuberger, D. Krenn, and H. Prodinger, Dual-Pivot Quicksort: Optimality, Analysis and Zeros of Associated Lattice Paths, Combin. Probab. Comput. 28(4) (2019), 485-518.
- R. Neininger and J. Straub, Probabilistic analysis of the dual-pivot quicksort "count", arXiv:1710.07505 [cs.DS], 2017.
- R. Neininger and J. Straub, Probabilistic analysis of the dual-pivot quicksort "count", 2018 Proceedings of the Meeting of Analytic Algorithmics and Combinatorics, New Orleans, Louisiana, USA, 7pp.
-
lista(nn) = { nn = max(nn, 3); my(va = vector(nn)); va[1] = 0; va[2] = 4; for(n=3, nn, va[n] = n!*(6*sum(k=1, n-2, (n-k-1)*va[k]/k!)/(n*(n-1)) + 5*n/8 + 13/16 - 1/(16*(n - (1 + (-1)^n)/2)))); concat(0, va); };
-
H1(n) = sum(k=1, n, 1/k);
H2(n) = sum(k=1, n, (-1)^k/k);
H3(n) = if(0 == (n % 2), - (1/320)*(1/(n - 3) + 3/(n - 1)), (1/320)*(3/(n - 2) + 1/n));
lista(nn) = { nn = max(nn, 3); my(va = vector(nn)); va[1] = 0; va[2] = 4; va[3] = 16; for(n=4, nn, va[n] = n!*((3/4)*n*H1(n) + (1/20)*n*H2(n) - (4/5)*n + (3/4)*H1(n) + (1/20)*H2(n) - 23/160 - (-1)^n/40 + H3(n))); concat(0,va); };
Comments