<<

Diagonals: , Asymptotics and Computer

Bruno Salvy Inria & ENS de Lyon Families of Generating Functions

(a ) A(z):= a zn n 7! n n 0 X counts the of captures some objects of size n structure

If (an) then A(z) is . counts the number of words of length n in a rational regular language algebraic . in a nonambiguous (satisfies a context-free language equation P(z,A)=0) hundreds of examples . satisfies a linear differentially finite recurrence with (satisfies a LDE with polynomial coefficients polynomial coefficients) 1/25 Univariate Generating Functions

Aim: asymptotics of the coefficients, D-FINITE automatically.

DIAGONAL

ALGEBRAIC

RATIONAL

Def diagonal: later. 2/25 I. A Quick Review of Analytic Combinatorics in One

Principle: Dominant singularity ⟷ exponential behaviour local behaviour ⟷ subexponential terms Coefficients of Rational Functions 1 f(z) a = dz n 2⇡i zn+1 Z 1 1 dz F =1= 1 2⇡i 1 z z2 z2 I

= =

n 1 n 1 Fn = + As n increases, the smallest 1+2 1+2 singularities dominate.

3/25 Conway’s

1,11,21,1211,111221,…

Generating function for lengths: f(z)=P(z)/Q(z) with deg Q=72.

Smallest singularity: δ(f)≃0.7671198507

ρ=1/δ(f)≃1.30357727 Fast univariate resolution: Sagraloff-Mehlhorn16 n ℓn≃2.04216 ρ

ρ Res(f,δ(f)) remainder exponentially small 4/25 Singularity Analysis

Ex: Rational Functions

A 3-Step Method: 17z3 9z2 7z +8 1. Locate dominant singularities a. singularities; b. dominant ones 2. Compute local behaviour 1. Numerical resolution with sufficient precision 3. Translate into asymptotics + algebraic manipulations ↵ 1 ↵ k 1 n k ? 2. Local expansion (easy). (1 z) log log n, (↵ N ) 1 z 7! ( ↵) 62 3. Easy. Useful property [Pringsheim Borel] a 0 for all n ⟹ real positive dominant singularity. n 5/25 Algebraic Generating Functions

P (z,y(z)) = 0

1a. Location of possible singularities Numerical resolution with sufficient precision Implicit Function Theorem: + algebraic manipulations @P P (z,y(z)) = (z,y(z)) = 0 @y

1b. Analytic continuation finds the dominant ones: not so easy [FlSe NoteVII.36]. 2. Local behaviour (Puiseux): (1 z)↵, (↵ Q) 2 3. Translation: easy.

6/25 Differentially-Finite Generating Functions

(n) an(z)y (z)+ + a0(z)y(z)=0,ai ···

1a. Location of possible singularities. Numerical resolution Cauchy-Lipshitz Theorem: with sufficient precision an(z)=0 + algebraic manipulations 1b. Analytic continuation finds the dominant ones: only numerical in general. Sage code exists [Mezzarobba2016].

2. Local behaviour at regular singular points:

↵ k 1 (1 z) log , (↵ Q,k N) 1 z 2 2 3. Translation: easy.

7/25 Example: Apéry’s

n 2 2 n n k m n 2 n+k 2 n n + k 1 ( 1) k k an = ,bn = an + k k k3 2m3 n n+m k=0 k=1 k=1 m=1 m m X ✓ ◆ ✓ ◆ X X X and c = b ⇣(3)a have generating functions that satisfy n n n vanishes at 0, 2 2 ↵ = 17 12p2 0.03, z (z 34z + 1)y000 + +(z 5)y =0 ' = 17 + 12p2 34. ··· ' In the neighborhood of ↵, all solutions behave like analytic µp↵ z(1 + (↵ z)analytic). Mezzarobba’s code gives µ 4.55,µ 5.46,µ 0. a ' b ' c ' n Slightly more work gives µc =0, then c n ⇡ and eventually, a proof that ⇣(3) is irrational.

[Apéry1978] 8/25 II. Diagonals Definition in this talk G(z) If F (z)= is a multivariate with Taylor expansion H(z) i F (z)= ciz , i n X2N k its diagonal is F (t)= ck,k,...,kt . k X2N 2k 1 : =1+x + y +2xy + x2 + y2 + +6x2y2 + k 1 x y ··· ··· ✓ ◆ 1 2k 1 2x : =1+y+1xy x2 +y2 + +2x2y2 + k +1 k (1 x y)(1 x) ··· ··· ✓ ◆ 1 Apéry’s ak : =1+ +5xyzt + 1 t(1 + x)(1 + y)(1 + z)(1 + y + z + yz + xyz) ··· ··· 9/25 Multiple Binomial Sums

n n n + s n + r 2n r s S = ( 1)n+r+s Ex. (from A=B) r s s r n r 0 s 0 ✓ ◆✓ ◆✓ ◆✓ ◆✓ ◆ X X Def.: expressions obtained from:

n n n C , (n, k) ,n n (Kronecker) 7! 7! k 7! ✓ ◆ using +, x, multiplication by constants, affine changes of

indices and indefinite summation:n (m,n) u . 7! m,k kX=0 Thm. Diagonals ≡ univariate binomial sums.

> BinomSums[sumtores](S,u): (…) 1 1 t(1 + u )(1 + u )(1 u u )(1 u u ) 1 2 1 3 2 3 [Bostan-Lairez-S.17] 10/25 Diagonals are Differentially Finite [Christol84,Lipshitz88]

D-finite diag. alg. Thm. If F has degree d in n variables, rat. ΔF satisfies a LDE with order dn, coeffs of degree dO(n). ⇡ Compares well with ˜ 8n creative telescoping + algo in O(d ) ops. when both apply.

Christol’s conjecture: All differentially finite power series with coefficients and radius of convergence in (0,∞) are diagonals.

[Bostan-Lairez-S.13,Lairez16] 11/25 Asymptotics

Thm. [Katz70,André00,Garoufalidis09]

a0+a1z+… D-finite, ai in �, radius in (0,∞), then its singular points are regular with rational exponents

n ↵ k 1 a n log (n) f . n ⇠ ,↵,k n (,↵,k) finite set ✓ ◆ X2 in Q⇥Q⇥N

Ex. The number an of walks from the origin taking n steps {N,S,E,W,NW} and staying in the first quadrant behaves n ↵ like C n with ↵ Q → not D-finite. ⇡ 62 ↵ = 1+ , 8u3 8u2 +6u 1=0,u>0. arccos(u) [Bostan-Raschel-S.14] 12/25 Bivariate Diagonals are Algebraic [Pólya21,Furstenberg67] x satisfies 1 x2 y3 D-finite 3 2 diag. 3125 t6 108 y10 + 81 3125 t6 108 y8 2 alg. + 50t3 3125 t6 108 y7+ 6834375 t6 236196 y6 = diag 2 rat. t3 34375 t6 3888 3125 t6 108 y5 + 7812500 t12 + 270000 t6 + 19683 y4 54 t3 6250 t6 891 y3 + 50 t6 21875 t6 2106 y2 t3 50 t2 +9 2500 t4 450 t2 + 81 y t6 3125 t6 1458 =0 Thm. F=A(x,y)/B(x,y), deg≤d in x and y, then + quasi-optimal . ΔF cancels a polynomial of degree ≲ 4d in y and t. → the is often better.

[Bostan-Dumont-S.17] 13/25 III. Analytic Combinatorics in Several Variables

Here, we restrict to rational diagonals and simple cases Starting Point: Cauchy’s

If f = c z i 1 z i n is convergent in the i1,...,in 1 ··· n i1,...,in 0 X neighborhood of 0, then

n 1 dz1 dzn ci ,...,i = f(z1,...,zn) ··· 1 n i1+1 in+1 2⇡i T z zn ✓ ◆ Z 1 ···

i✓j for any small torus T ( z j = re ) around 0. | | Asymptotics: deform the torus to pass where the integral concentrates asymptotically.

14/25 Coefficients of Diagonals G(z) 1 n G(z) dz dz F (z)= c = 1 ··· n H(z) k,...,k 2⇡i H(z) (z z )k+1 ✓ ◆ ZT 1 ··· n

Critical points: minimize z1 zn on = z H(z)=0 ··· V { | } @H ... @H @z1 @zn @H @H rank @(z1 zn) @(z1 zn) 1 i.e. z1 = = zn ··· ... ···  @z1 ··· @zn @z1 @zn ! Minimal ones: on the boundary of the domain of convergence of F (z).

A 3-step method 1a. locate the critical points (algebraic condition); 1b. find the minimal ones (semi-algebraic condition); 2. translate (easy in simple cases). 15/25 Ex.: Central Binomial Coefficients

2k 1 : =1+x + y +2xy + x2 + y2 + +6x2y2 + k 1 x y ··· ··· ✓ ◆ (1). Critical points: 1 x y =0,x= y = x = y =1/2. ) (2). Minimal ones. Easy. In general, this is the difficult step.

(3). Analysis close to the minimal critical point: 1 1 dx dy 1 dx a = k (2⇡i)2 1 x y (xy)k+1 ⇡ 2⇡i (x(1 x))k+1 ZZ Z 4k+1 4k exp(4(k + 1)(x 1/2)2) dx . residue ⇡ 2⇡i ⇡ pk⇡ Z saddle-point approx 16/25 Kronecker Representation for the Critical Points

Algebraic part: ``compute’’ the solutions of the system @H @H H(z)=0 z1 = = zn @z1 ··· @zn

If

Under genericity assumptions, a probabilistic algorithm running in bit ops finds:

History and Background: see Castro, Pardo, Hägele, and Morais (2001) System reduced to a univariate polynomial. [Giusti-Lecerf-S.01;Schost02;SafeySchost16] 17/25 Example (Lattice Path Model) The number of walks from the origin taking steps {NW,NE,SE,SW} and staying in the first quadrant is (1 + x)(1 + y) F, F (x, y, t)= 1 t(1 + x2 + y2 + x2y2) P (u)=4u4 + 52u3 4339u2 + 9338u + 403920 Kronecker Q (u) = 336u2 + 344u 105898 representation x of the critical Q (u)= 160u2 + 2824u 48982 y points: Q (u)=4u3 + 39u2 4339u/2 + 4669/2 t ie, they are given by: Q (u) Q (u) Q (u) P (u)=0,x= x ,y= y ,t= t P 0(u) P 0(u) P 0(u) Which one of these 4 is minimal? 18/25 Testing Minimality

Def. F(z1,…,zn) is combinatorial if every coefficient is ≥ 0. Prop. [PemantleWilson] In the combinatorial case, one of the minimal critical points has positive real coordinates.

Thus, we add the equation for a new variable and select the positive real point(s) z with no from a new Kronecker representation: P˜(v)=0 This is done P˜0(v)z1 Q1(v)=0 numerically, . . with enough P˜0(v)z Q (v)=0 n n precision. P˜0(v)t Q (v)=0. t

19/25 Example

1 1 F = = H (1 x y)(20 x 40y) 1 @H @H Critical point equation x @x = y @y : x(2x + 41y 21) = y(41x + 80y 60) → 4 critical points, 2 of which are real:

(x1,y1)=(0.2528, 9.9971), (x2,y2)=(0.30998, 0.54823)

AddH(tx, ty)=0and compute a Kronecker representation: P (u)=0,x= Qx(u) ,y= Qy (u) ,t= Qt(u) P 0(u) P 0(u) P 0(u) Solve numerically and keep the real positive sols: (0.31, 0.55, 0.99), (0.31, 0.55, 1.71), (0.25, 9.99, 0.09), (0.25, 0.99, 0.99)

(x1,y1) (x2,y2) is not minimal, is. 20/25 Algorithm and Complexity

Thm. If F ( z ) is combinatorial, then under regularity conditions, the points contributing to dominant diagonal asymptotics can be determined in O ˜ ( hd 5 D 4 ) bit operations. Each contribution has the form k (1 n)/2 (1 n)/2 Ak = T k (2⇡) (C + O(1/k)) ⇣  ⌘ 3 T, C can be found to 2 precision in O ˜ ( h ( dD ) + D  ) bit ops.

This result covers the easiest cases. The complexity should be compared with the size of the result. All conditions hold generically and can be checked within the same complexity, except combinatoriality.

[Melczer-S.16] 21/25 Example: Apéry's sequence

1 =1+ +5xyzt + 1 t(1 + x)(1 + y)(1 + z)(1 + y + z + yz + xyz) ··· ··· Kronecker representation of the critical points:

P (u)=u2 366u 17711 2u 1006 320 164u + 7108 a = ,b= c = ,z= P 0(u) P 0(u) P 0(u) There are two real critical points, and one is positive. After testing minimality, one has proven asymptotics

22/25 Example: Restricted Words in Factors

1 x3y6 + x3y4 + x2y4 + x2y3 F (x, y)= 1 x y + x2y3 x3y3 x4y4 x3y6 + x4y6 words over {0,1} without 10101101 or 1110101

23/25 Minimal Critical Points in the Noncombinatorial Case

Then we use even more variables and equations: @H @H H(z)=0 z1 = = zn @z1 ··· @zn H(u)=0 u 2 = t z 2,..., u 2 = t z 2 | 1| | 1| | n| | n| + critical point equations for the projection on the t axis

And check that there is no solution with t in (0,1).

Prop. Under regularity assumptions, this can be done in O˜(hd423nD9) bit operations.

24/25 D-finite diag. Summary & Conclusion alg. rat.

• Diagonals are a nice and important class of generating functions for which we now have many good . • ACSV can be made effective (at least in simple cases). • Requires nice semi-numerical Computer Algebra algorithms. • Without computer algebra, these computations are difficult. Work in progress: extend beyond some of the assumptions (see Melczer’s thesis). The End