Michle Soria Worshop on Analysis of Algorithms A OF A13 Menorca, 31 - - PowerPoint PPT Presentation

mich le soria
SMART_READER_LITE
LIVE PREVIEW

Michle Soria Worshop on Analysis of Algorithms A OF A13 Menorca, 31 - - PowerPoint PPT Presentation

Introduction Combinatorics Computations C OMBINATORIAL S YSTEMS AND N EWTON I TERATION Michle Soria Worshop on Analysis of Algorithms A OF A13 Menorca, 31 May 2013 Joint work with Carine Pivoteau and Bruno Salvy 1 / 34 Michle Soria


slide-1
SLIDE 1

Introduction Combinatorics Computations

COMBINATORIAL SYSTEMS

AND NEWTON ITERATION

Michèle Soria

Worshop on Analysis of Algorithms AOFA’13

Menorca, 31 May 2013 Joint work with Carine Pivoteau and Bruno Salvy

1 / 34 Michèle Soria Combinatorial Systems and Newton Iteration

slide-2
SLIDE 2

Introduction Combinatorics Computations

I Introduction

2 / 34 Michèle Soria Combinatorial Systems and Newton Iteration

slide-3
SLIDE 3

Introduction Combinatorics Computations 3 / 34 Michèle Soria Combinatorial Systems and Newton Iteration

slide-4
SLIDE 4

Introduction Combinatorics Computations

Combinatorial Systems

Hi ≡ combination of classical constructible species 1, Z, ×, +, SEQ, SET, CYC (with card. constraints). Y = H(Z, Y) ≡            Y1 = H1(Z, Y1, Y2, . . . , Ym), Y2 = H2(Z, Y1, Y2, . . . , Ym), . . . Ym = Hm(Z, Y1, Y2, . . . , Ym), Well-founded recursive systems

Series-parallel graphs : Y = Z + S + P S = SEQ>0(P + Z) P = SET>0(S + Z)

4 / 34 Michèle Soria Combinatorial Systems and Newton Iteration

slide-5
SLIDE 5

Introduction Combinatorics Computations

Systems of Equations for Generating Functions

Construction EGF

n≥0 cnzn n!

OGF

n≥0 cnzn

A ∪ B C(z) = A(z) + B(z) C(z) = A(z) + B(z) A × B C(z) = A(z) × B(z) C(z) = A(z) × B(z) SEQ(A) C(z) = (1 − A(z))−1 C(z) = (1 − A(z))−1 SET(A) C(z) = exp(A(z)) C(z) = exp( A(zk )

k

) CYC(A) C(x) = Log

1 1−A(z)

C(x) = φ(k)

k Log 1 1−A(zk )

Not only polynomials but also exp, Log, and Pólya operators Rooted trees T = Z × SET(T ) − → − → Labelled : T(z) = z exp(T(z)) Unlabelled : T(z) = z exp(T(z)+ 1 2T(z2)+ 1 3T(z3)+· · · ) Efficient resolution of systems of such equations Enumeration of structures : coefficients of generating series Evaluation at given points : solve numerically Motivation : Uniform Random Sampling

5 / 34 Michèle Soria Combinatorial Systems and Newton Iteration

slide-6
SLIDE 6

Introduction Combinatorics Computations

Random Sampling Combinatorial structures

Combinatorial modeling : Sampling of random objects

Get information on the model by working on the random objects

visualize and compute order of growth for quantities ; distinguish significant properties (random vs observed) compare models, test software

6 / 34 Michèle Soria Combinatorial Systems and Newton Iteration

slide-7
SLIDE 7

Introduction Combinatorics Computations

Random Sampling Combinatorial structures

Combinatorial modeling : Sampling of random objects

Get information on the model by working on the random objects

visualize and compute order of growth for quantities ; distinguish significant properties (random vs observed) compare models, test software Analytic Combinatorics : Specification → Generation Uniform Random Generation, Generic Methods : Recursive Method : n → γn P (γn) = 1/cn compute enumeration sequences

[Nijenhuis, Wilf 1978 ; Flajolet, Zimmermann, Van Cutsem 1994]

Boltzmann Method : x → γ P (γ) ∝ x|γ| evaluate generating functions at x

[Duchon,Flajolet, Louchard, Schaeffer 2004 ; Flajolet, Fusy, Pivoteau 2007] 6 / 34 Michèle Soria Combinatorial Systems and Newton Iteration

slide-8
SLIDE 8

Introduction Combinatorics Computations

Binary trees Y = Z + Z × Y2 Random Generation

RECURSIVE SAMPLING

Algorithm : ΓY(n) input : positive integer n

  • utput :

random structure of size n if n = 1 then Return Z else U := Uniform([0,1]) ; k :=0 ; s :=0 ; While s < U do {k := k + 1; s := s + bkbn−k−1/bn} Return Z, ΓY(k) , ΓY(n − k − 1) end if Requires computation of b0, b1, . . . , bn, number of structures of size up to n.

BOLTZMANN SAMPLING

ρ rad. conv. Y(z) Algorithm : ΓY(x) input : real 0 < x < ρ

  • utput :

random structure if Bernoulli (x/Y(x)) then Return Z else Return Z, ΓY(x) , ΓY(x) end if Requires evaluation of the generating function Y at value x (oracle).

7 / 34 Michèle Soria Combinatorial Systems and Newton Iteration

slide-9
SLIDE 9

Introduction Combinatorics Computations

Combinatorial System

System of fixed-point equations

C0(z) = zC1(z)C2(z)C3(z)(C1(z) + C2(z)) C1(z) = z + z/(1 − C1(z)2C3(z)2) C2(z) = z + z2/((1 − zC2(z)2/(1 − z))(1 − C2(z))) C3(z) = z + z(3z + z2 + z2C1(z)C3(z))/(1 − C2

1(z))

C0(z) = 18z5 + 90z6 + 222z7 + 1032z8 + 4446z9 + 23184z10 + 126492z11 + 732264z12 + . . .

h z =

Large systems of equations Many solutions Use the combinatorial origin (positivity, structure) Goals

  • nly one solution

the right one solve numerically coefficients of GF

8 / 34 Michèle Soria Combinatorial Systems and Newton Iteration

slide-10
SLIDE 10

Introduction Combinatorics Computations

Well-founded combinatorial systems Y = H(Z, Y) ⇓ Simple combinatorial iteration Yk+1 = H(Z, Yk) converges to Y ⇓ Series Iteration Yk+1(z) = F(Z, Yk(z)) converges to Y(z)

→ coefficients y0, . . . , yn

⇓ Numerical iteration starting at 0 converges to Y(x)

9 / 34 Michèle Soria Combinatorial Systems and Newton Iteration

slide-11
SLIDE 11

Introduction Combinatorics Computations

Simple vs Newton Iteration

Solve x = f(x) Simple Iteration xn+1 = f(xn)

10 / 34 Michèle Soria Combinatorial Systems and Newton Iteration

slide-12
SLIDE 12

Introduction Combinatorics Computations

Simple vs Newton Iteration

Solve x = f(x) Simple Iteration xn+1 = f(xn) Newton Iteration xn+1 = xn − f(xn)

f ′(xn) 10 / 34 Michèle Soria Combinatorial Systems and Newton Iteration

slide-13
SLIDE 13

Introduction Combinatorics Computations

Well-founded combinatorial systems Y = H(Z, Y) ⇓ Newton combinatorial iteration converges to Y ⇓ Newton Iteration on series converges to Y(z) → fast enumeration ⇓ Numerical Newton iteration starting from 0 → fast oracle

11 / 34 Michèle Soria Combinatorial Systems and Newton Iteration

slide-14
SLIDE 14

Introduction Combinatorics Computations

Binary trees Y = Z + Z × Y2 Simple Iteration

Y0(z) = 0 Y1(z) = z Y2(z) = z + z3 Y3(z) = z + z3 + 2z5 + z7 Y4(z) = z + z3 + 2z5 + 5z7 + 6z9 + 6z11 + 4z13 + z15 Y5(z) = z + z3 + 2z5 + 5z7 + 14z9 + 26z11 + 44z13 + 69z15 Y(z) = z + z3 + 2z5 + 5z7 + 14z9 + 42z11 + 132z13 + 429z15 + . . . y0 = y1 = 0.2 y2 = 0.208 y3 = 0.2086528 y4 = 0.208707198189568 . . . y5 = 0.2087117389152279 . . . y=Y(0.2)=0.2087121525220799 . . . Combinatorial structures Y0 = ∅ Yk+1 = Z + Z × Y2

k

Generating series Y0(z) = 0 Yk+1(z) = z + zY 2

k (z)

Numerical evaluation y0 = 0 yk+1 = 0.2 + 0.2y2

k

12 / 34 Michèle Soria Combinatorial Systems and Newton Iteration

slide-15
SLIDE 15

Introduction Combinatorics Computations

Binary trees Y = Z + Z × Y2 Newton Iteration

Y0(z) = 0 Y1(z) = z Y2(z) = z + z3 + 2z5 + 4z7 + 8z9 + 16z11 + 32z13 + 64z15 + . . . Y3(z) = z + z3 + 2z5 + 5z7 + 14z9 + 42z11 + 132z13 + 428z15 + . . . Y4(z) = z + z3 + 2z5 + 5z7 + · · · + 2674440z29 + 9694844z31+ y0 = 0 y1 = 0.2 y2 = 0.208695652173 . . . y3 = 0.2087121524626680 . . . y4 = 0.2087121525220799670520 . . . Combinatorial structures Y0 = ∅ Yk+1 = Yk + SEQ(2ZYk )(Z + ZY2

k − Yk )

Generating series Y0(z) = 0 Yk+1(z) = Yk (z) +

1 1−2zYk (z + zY 2 k − Yk )

Numerical evaluation y0 = 0 yk+1 = yk +

1 1−0.4yk (0.2 + 0.2y2 k − yk )

13 / 34 Michèle Soria Combinatorial Systems and Newton Iteration

slide-16
SLIDE 16

Introduction Combinatorics Computations

Results – Newton Iteration

Theorem (Combinatorial Newton iteration) For all well-founded combinatorial systems Y = H(Z, Y), combinatorial Newton iteration starting from ∅ converges to the (unique) desired combinatorial solution Y. Theorem (Series and numerical Newton iterations) Newton combinatorial iteration transfers to the level of generating series and of numerical evaluation : numerical Newton iteration gives the values of power series that are the GFs of the combinatorial iterates.

[LABELLE ET ALII 80-90] : combinatorial part, without ε [PIVOTEAU, SALVY, S. 2008] : labelled case, without ε [PIVOTEAU, SALVY, S. 2012] : general case, allowing ε

14 / 34 Michèle Soria Combinatorial Systems and Newton Iteration

slide-17
SLIDE 17

Introduction Combinatorics Computations

Results – Enumeration and Oracle

Theorem (Enumeration in Quasi-Optimal Complexity) First N coefficients of GFs of constructible species can be obtained in

1

arithmetic complexity O(NlogN) (both OGF and EGF) ;

2

binary complexity O(N2log2NloglogN) for OGF ; and O(N2log3NloglogN) for EGF . Quasi-optimal wrt. size of the result Theorem (Oracle)

1

The EGFs and OGFs of constructible species are convergent in the neighborhood of 0 ;

2

For x inside the disk of convergence numerical iteration converging to Y(x) in the labelled case, numerical iteration converging to the sequence Y(x),Y(x2),Y(x3), . . . for ||.||∞ in the unlabelled case.

15 / 34 Michèle Soria Combinatorial Systems and Newton Iteration

slide-18
SLIDE 18

Introduction Combinatorics Computations

II Combinatorics

16 / 34 Michèle Soria Combinatorial Systems and Newton Iteration

slide-19
SLIDE 19

Introduction Combinatorics Computations

Short introduction to Species

Definition (Species F) finite set U → finite set F[U]

  • bij. σ : U → V → bij. F[σ] : F[U] → F[V]

with F[τ ◦ σ] = F[τ] ◦ F[σ] and F[IdU] = IdF[U] (transport of structures).

basic species 0, 1, Z SET, SEQ, CYC

17 / 34 Michèle Soria Combinatorial Systems and Newton Iteration

slide-20
SLIDE 20

Introduction Combinatorics Computations

Short introduction to Species

Species F : labelled ! basic species 0, 1, Z SET, SEQ, CYC

17 / 34 Michèle Soria Combinatorial Systems and Newton Iteration

slide-21
SLIDE 21

Introduction Combinatorics Computations

Short introduction to Species

Species F : labelled ! Composition F ◦ G : constructible species 0, 1, Z SET, SEQ, CYC Composition

17 / 34 Michèle Soria Combinatorial Systems and Newton Iteration

slide-22
SLIDE 22

Introduction Combinatorics Computations

Short introduction to Species

Species F : labelled ! Composition F ◦ G : constructible species 0, 1, Z SET, SEQ, CYC Composition Y = H(Z, Y)

17 / 34 Michèle Soria Combinatorial Systems and Newton Iteration

slide-23
SLIDE 23

Introduction Combinatorics Computations

Derivative

H′ :

18 / 34 Michèle Soria Combinatorial Systems and Newton Iteration

slide-24
SLIDE 24

Introduction Combinatorics Computations

Derivative

H′ : (F ◦ G)′ :

18 / 34 Michèle Soria Combinatorial Systems and Newton Iteration

slide-25
SLIDE 25

Introduction Combinatorics Computations

Derivative

H′ : (F ◦ G)′ : species derivative A + B A′ + B′ A · B A′ · B + A · B′ SEQ(B) SEQ(B) · B′ · SEQ(B) CYC(B) SEQ(B) · B′ SET(B) SET(B) · B′

18 / 34 Michèle Soria Combinatorial Systems and Newton Iteration

slide-26
SLIDE 26

Introduction Combinatorics Computations

Derivative

H′ : (F ◦ G)′ : species derivative A + B A′ + B′ A · B A′ · B + A · B′ SEQ(B) SEQ(B) · B′ · SEQ(B) CYC(B) SEQ(B) · B′ SET(B) SET(B) · B′ Example : H(G, S, P) := (Z + S + P, SEQ>0(Z + P), SET>0(Z + S)) . ∂H ∂Y =   1 1 SEQ(Z + P) · SEQ(Z + P) SET(Z + S)  

18 / 34 Michèle Soria Combinatorial Systems and Newton Iteration

slide-27
SLIDE 27

Introduction Combinatorics Computations

Joyal’s Implicit Species Theorem

Theorem If H(0, 0)= 0 and the Jacobian matrix ∂H/∂Y is nilpotent at (0, 0) , then Y = H(Z, Y) has a unique solution, limit of Y[0] = 0, Y[n+1] = H(Z, Y[n]) (n ≥ 0).

  • Def. A =k B if they coincide up to size k (contact k).

Key Lemma If Y[n+1] =k Y[n], then Y[n+p+1] =k+1 Y[n+p], (p = dimension).

19 / 34 Michèle Soria Combinatorial Systems and Newton Iteration

slide-28
SLIDE 28

Introduction Combinatorics Computations

Well-founded (WF) Systems

Bruno Salvy’s talk

Definition (Well-founded combinatorial system) Y = H(Z, Y) is said to be well-founded (WF) when the iteration Y[0] = 0 and Y[n+1] = H(Z, Y[n]), n ≥ 0 is well-defined and defines a convergent sequence the limit S has no zero coordinate. Theorem (Characterization of well-founded systems) System Y = H(Z, Y) with no 0-coordinate is well-founded if and only if Case H(0, 0) = 0 (WF0) : ∂H

∂Y (0, 0) nilpotent

Case H(0, 0) = 0 companion system Y(U, Z) = H(Z, Y) − H(0, 0) + UH(0, 0)

  • companion system WF0
  • solution S(U, Z) of companion system is polynomial in U

20 / 34 Michèle Soria Combinatorial Systems and Newton Iteration

slide-29
SLIDE 29

Introduction Combinatorics Computations

Combinatorial Newton Iteration

Theorem (essentially Labelle) For any WF system Y = H(Z, Y), if A has contact k with its solution S and A ⊂ H(Z, A), then N H(Z, A) = A +

  • i≥0

∂H ∂Y (Z, A) i · (H(Z, A) − A) has contact 2k + 1 with S. A +      A =k S, S − A+ =k 0, A + A+ =2k+1 S,

21 / 34 Michèle Soria Combinatorial Systems and Newton Iteration

slide-30
SLIDE 30

Introduction Combinatorics Computations

Quadratic Iteration

Theorem (essentially Labelle) For any WF, the sequence Y[0] = 0 and

Y[n+1] ≡ N H(Z, Y[n]) = Y[n] +  

i≥0

∂H ∂Y (Z, Y[n]) i   ·

  • H
  • Z, Y[n]

− Y[n]

is well defined and quadratically converges to the solution S.

22 / 34 Michèle Soria Combinatorial Systems and Newton Iteration

slide-31
SLIDE 31

Introduction Combinatorics Computations

Optimization : truncation and matrix inversion

Theorem (Truncated Newton iteration) For any WF system with solution S, the truncated sequence Y[0] = S(0), Y[n+1] = N H(Z, Y[n])≤2n+1−1 is such that ∀n, Y[n] has contact 2n − 1 with S.

23 / 34 Michèle Soria Combinatorial Systems and Newton Iteration

slide-32
SLIDE 32

Introduction Combinatorics Computations

Optimization : truncation and matrix inversion

Theorem (Truncated Newton iteration) For any WF system with solution S, the truncated sequence Y[0] = S(0), Y[n+1] = N H(Z, Y[n])≤2n+1−1 is such that ∀n, Y[n] has contact 2n − 1 with S.

N H(Z, Y[n]) = Y[n] +  

i≥0

∂H ∂Y (Z, Y[n]) i   ·

  • H
  • Z, Y[n]

− Y[n] Infinite sum ≡ matrix inversion :

i≥0

  • ∂H

∂Y (Z, Y[n])

i = (Id − ∂H

∂Y (Z, Y[n]))−1

Inverting matrix A , Newton iter. U[0] = I, U[i+1] = U[i] + U[i](I − A U[i]) Compute in parallel the inverse

  • f the Jacobian matrix and the

iteration of the solution

23 / 34 Michèle Soria Combinatorial Systems and Newton Iteration

slide-33
SLIDE 33

Introduction Combinatorics Computations

Optimization : truncation and matrix inversion

Theorem (Truncated Newton iteration) For any WF system with solution S, the truncated sequence Y[0] = S(0), Y[n+1] = N H(Z, Y[n])≤2n+1−1 is such that ∀n, Y[n] has contact 2n − 1 with S. Theorem (Optimized Newton iteration) For any WF system with solution S, the sequence

     U[0] = I, U[n+1] = U[n] + U[n]

∂H ∂Y (Z, Y[n]) U[n] + I − U[n] ≤2n

Y[0] = 0, Y[n+1] = Y[n] + U[n+1] H(Z, Y[n]) − Y[n]

≤2n+1−1

is such that ∀n, Y[n] has contact 2n − 1 with S.

23 / 34 Michèle Soria Combinatorial Systems and Newton Iteration

slide-34
SLIDE 34

Introduction Combinatorics Computations

Series-Parallel Graphs

H(Z, Y) ≡      G = Z + S + P, S = SEQ>0(Z + P), P = SET>0(Z + S). ∂H ∂Y =   1 1 SEQ2(Z + P) SET(Z + S)  

24 / 34 Michèle Soria Combinatorial Systems and Newton Iteration

slide-35
SLIDE 35

Introduction Combinatorics Computations

Series-Parallel Graphs

H(Z, Y) ≡      G = Z + S + P, S = SEQ>0(Z + P), P = SET>0(Z + S). ∂H ∂Y =   1 1 SEQ2(Z + P) SET(Z + S)   Combinatorial Newton Iteration

   G[n+1] S[n+1] P[n+1]    =    G[n] S[n] P[n]    +  

k≥0

  • I −

∂H ∂Y

  • Z, Y[n]k

  ×    Z + S[n] + P[n] − G[n] SEQ>0(Z + P[n]) − S[n] SET>0(Z + S[n])) − P[n]    24 / 34 Michèle Soria Combinatorial Systems and Newton Iteration

slide-36
SLIDE 36

Introduction Combinatorics Computations

III Computations

25 / 34 Michèle Soria Combinatorial Systems and Newton Iteration

slide-37
SLIDE 37

Introduction Combinatorics Computations

Series-Parallel Graphs

H(Z, Y) ≡      G = Z + S + P, S = SEQ>0(Z + P), P = SET>0(Z + S). ∂H ∂Y =   1 1 SEQ2(Z + P) SET(Z + S)  

26 / 34 Michèle Soria Combinatorial Systems and Newton Iteration

slide-38
SLIDE 38

Introduction Combinatorics Computations

Series-Parallel Graphs

H(Z, Y) ≡      G = Z + S + P, S = SEQ>0(Z + P), P = SET>0(Z + S). ∂H ∂Y =   1 1 SEQ2(Z + P) SET(Z + S)   Exponential Generating Series

H(z, Y) ≡      G(z) = z + S(z) + P(z), S(z) = (1 − z − P(z))−1 − 1 P(z) = exp(z + S(z)) − 1 ∂H ∂Y (z, Y) =   1 1 (1 − z − P)−2 exp(z + S)   Y [0](z) = 0, Y [n+1](z) = Y [n](z) +

  • I −

∂H ∂Y

  • z, Y [n](z)

−1 ×

  • H
  • z, Y [n](z)
  • − Y [n](z)
  • mod z2n+1

26 / 34 Michèle Soria Combinatorial Systems and Newton Iteration

slide-39
SLIDE 39

Introduction Combinatorics Computations

Series-Parallel Graphs

H(Z, Y) ≡      G = Z + S + P, S = SEQ>0(Z + P), P = SET>0(Z + S). ∂H ∂Y =   1 1 SEQ2(Z + P) SET(Z + S)   Exponential Generating Series

H(z, Y) ≡      G(z) = z + S(z) + P(z), S(z) = (1 − z − P(z))−1 − 1 P(z) = exp(z + S(z)) − 1 ∂H ∂Y (z, Y) =   1 1 (1 − z − P)−2 exp(z + S)  

b Y [0]

2 (z) = 0

b Y [0]

3 (z) = 0

b Y [1]

2 (z) = z2 + 3 z3 + 29

6 z4 + 139 12 z5 + 3337 120 z6 + 601 9 z7 + 808243 5040 z8 + · · · b Y [1]

3 (z) = 1

2 z2 + 7 6 z3 + 61 24 z4 + 721 120 z5 + 10351 720 z6 + 173867 5040 z7 + 667957 8064 z8 + · · · b Y [2]

2 (z) = z2 + 3 z3 + 61

12 z4 + 29 2 z5 + 15961 360 z6 + 2841 20 z7 + 9484021 20160 z8 + · · · b Y [2]

3 (z) = 1

2 z2 + 7 6 z3 + 73 24 z4 + 1051 120 z5 + 19381 720 z6 + 436087 5040 z7 + 11584693 40320 z8 + · · · b Y [3]

2 (z) = z2 + 3 z3 + 61

12 z4 + 29 2 z5 + 15961 360 z6 + · · · + 366558482492939101 108972864000 z15 + · · · b Y [3]

3 (z) = 1

2 z2 + 7 6 z3 + 73 24 z4 + 1051 120 z5 + 19381 720 z6 + 386081655546862081 186810624000 z15 + · · ·

Y [0](z) = 0, Y [n+1](z) = Y [n](z) +

  • I −

∂H ∂Y

  • z, Y [n](z)

−1 ×

  • H
  • z, Y [n](z)
  • − Y [n](z)
  • mod z2n+1

26 / 34 Michèle Soria Combinatorial Systems and Newton Iteration

slide-40
SLIDE 40

Introduction Combinatorics Computations

Series-Parallel Graphs

H(Z, Y) ≡      G = Z + S + P, S = SEQ>0(Z + P), P = SET>0(Z + S). ∂H ∂Y =   1 1 SEQ2(Z + P) SET(Z + S)   Evaluation at α = 0.2 < ρ

H(α, Y) ≡      g = α + s + p, s = (1 − α − p)−1 − 1 p = exp(α + s) − 1 ∂H ∂Y (α, y) =   1 1 (1 − α − p)−2 exp(α + s)   y[0] = 0, y[n+1] = y[n] +

  • I −

∂H ∂Y

  • α, y[n]−1

H

  • α, y[n]

− y[n] 26 / 34 Michèle Soria Combinatorial Systems and Newton Iteration

slide-41
SLIDE 41

Introduction Combinatorics Computations

Series-Parallel Graphs

H(Z, Y) ≡      G = Z + S + P, S = SEQ>0(Z + P), P = SET>0(Z + S). ∂H ∂Y =   1 1 SEQ2(Z + P) SET(Z + S)   Evaluation at α = 0.2 < ρ

H(α, Y) ≡      g = α + s + p, s = (1 − α − p)−1 − 1 p = exp(α + s) − 1 ∂H ∂Y (α, y) =   1 1 (1 − α − p)−2 exp(α + s)   y[0] = 0, y[n+1] = y[n] +

  • I −

∂H ∂Y

  • α, y[n]−1

H

  • α, y[n]

− y[n] 26 / 34 Michèle Soria Combinatorial Systems and Newton Iteration

slide-42
SLIDE 42

Introduction Combinatorics Computations

Exponential generating series

fn = # F-structures on {1, . . . , n} → labelled enumeration → EGF F(z) =

n≥0 fn/n!

contact of species → contact of series valuation → convergence Dictionary of constructible species A ∪ B A(z) + B(z) A × B A(z) × B(z) SEQ(A) (1 − A(z))−1 SET(A) exp(A(z)) CYC(A) Log

1 1−A(z)

A′ A′(z) Fo G F(G(z))

27 / 34 Michèle Soria Combinatorial Systems and Newton Iteration

slide-43
SLIDE 43

Introduction Combinatorics Computations

Exponential generating series

fn = # F-structures on {1, . . . , n} → labelled enumeration → EGF F(z) =

n≥0 fn/n!

contact of species → contact of series valuation → convergence Dictionary of constructible species A ∪ B A(z) + B(z) A × B A(z) × B(z) SEQ(A) (1 − A(z))−1 SET(A) exp(A(z)) CYC(A) Log

1 1−A(z)

A′ A′(z) Fo G F(G(z))

Theorem (Truncated Newton iteration for EGF) Y = H(Z, Y) WF system with solution S,

Y [n+1](z) = Y [n](z) +

  • I − ∂H

∂Y

  • z, Y [n]−1

H

  • z, Y [n]

− Y [n](z)

  • mod zN

with Y [0](z) = S(0) and N = 2n+1, quadratically converges to S(z).

27 / 34 Michèle Soria Combinatorial Systems and Newton Iteration

slide-44
SLIDE 44

Introduction Combinatorics Computations

Newton Iteration on Exponential generating series

notation : f(z)[N] ≡ f(z) mod zN = N

n=0 f nzn/n!

Algorithm : recExpSeries Y(z) = H(z, Y(z)) input : integer N

  • utput :

U=

  • I − ∂H

∂Y (z, S(z))

−1

[⌈N/2⌉]

  • utput :

Y= S(z)[N] if N = 1 then Return Y := Hm(0, 0) and U := I else U, Y := recExpSeries(⌈N/2⌉) U := U + U ·

  • ∂H

∂Y (Y)[⌈N/2⌉] · U + I − U

  • [⌈N/2⌉]

Y := Y + U ·

  • H(Y)[N] − Y
  • [N]

Return U, Y end if

28 / 34 Michèle Soria Combinatorial Systems and Newton Iteration

slide-45
SLIDE 45

Introduction Combinatorics Computations

Newton Iteration on Exponential generating series

notation : f(z)[N] ≡ f(z) mod zN = N

n=0 f nzn/n!

Algorithm : recExpSeries Y(z) = H(z, Y(z)) input : integer N

  • utput :

U=

  • I − ∂H

∂Y (z, S(z))

−1

[⌈N/2⌉]

  • utput :

Y= S(z)[N] if N = 1 then Return Y := Hm(0, 0) and U := I else U, Y := recExpSeries(⌈N/2⌉) U := U + U ·

  • ∂H

∂Y (Y)[⌈N/2⌉] · U + I − U

  • [⌈N/2⌉]

Y := Y + U ·

  • H(Y)[N] − Y
  • [N]

Return U, Y end if Arithmetic Complexity M(N) upper bound # op. PN × QN M(N) = O(N log N) (using FFT)

28 / 34 Michèle Soria Combinatorial Systems and Newton Iteration

slide-46
SLIDE 46

Introduction Combinatorics Computations

Newton Iteration on Exponential generating series

notation : f(z)[N] ≡ f(z) mod zN = N

n=0 f nzn/n!

Algorithm : recExpSeries Y(z) = H(z, Y(z)) input : integer N

  • utput :

U=

  • I − ∂H

∂Y (z, S(z))

−1

[⌈N/2⌉]

  • utput :

Y= S(z)[N] if N = 1 then Return Y := Hm(0, 0) and U := I else U, Y := recExpSeries(⌈N/2⌉) U := U + U ·

  • ∂H

∂Y (Y)[⌈N/2⌉] · U + I − U

  • [⌈N/2⌉]

Y := Y + U ·

  • H(Y)[N] − Y
  • [N]

Return U, Y end if Arithmetic Complexity M(N) upper bound # op. PN × QN M(N) = O(N log N) (using FFT) C(N) = C(N/2) + T(N) Evaluation of T(N)

  • H(z, Y)[N] → O(M(N))
  • ∂H

∂Y (z, Y) → O(M(N))

  • matrix product MM(m, N) → M(N)

= ⇒ C(N) = O(N log N)

28 / 34 Michèle Soria Combinatorial Systems and Newton Iteration

slide-47
SLIDE 47

Introduction Combinatorics Computations

Newton Iteration on Exponential generating series

notation : f(z)[N] ≡ f(z) mod zN = N

n=0 f nzn/n!

Algorithm : recExpSeries Y(z) = H(z, Y(z)) input : integer N

  • utput :

U=

  • I − ∂H

∂Y (z, S(z))

−1

[⌈N/2⌉]

  • utput :

Y= S(z)[N] if N = 1 then Return Y := Hm(0, 0) and U := I else U, Y := recExpSeries(⌈N/2⌉) U := U + U ·

  • ∂H

∂Y (Y)[⌈N/2⌉] · U + I − U

  • [⌈N/2⌉]

Y := Y + U ·

  • H(Y)[N] − Y
  • [N]

Return U, Y end if Arithmetic Complexity M(N) upper bound # op. PN × QN M(N) = O(N log N) (using FFT) C(N) = C(N/2) + T(N) Evaluation of T(N)

  • H(z, Y)[N] → O(M(N))
  • ∂H

∂Y (z, Y) → O(M(N))

  • matrix product MM(m, N) → M(N)

= ⇒ C(N) = O(N log N) Bit Complexity MZ(N) up. bound # bit op. IN × JN MZ(N) = O(N log N log log N) BitComplexity(N) = MZ(N) × M(N)

28 / 34 Michèle Soria Combinatorial Systems and Newton Iteration

slide-48
SLIDE 48

Introduction Combinatorics Computations

Numerical iteration - Labelled Case

Proposition Y = H(Z, Y) WF system, H constructible species. The EGF S(z) of species solution S is analytic at the origin. Theorem (Newton oracle for values of EGF) Y = H(Z, Y) WF system, H constructible and α < ρ(S(z)). The numerical iteration y[0] = 0, y[n+1] = y[n] +

  • I − ∂H

∂Y (α, y[n]) −1 · (H(α, y[n]) − y[n]) converges to the solution S(α) of the system.

29 / 34 Michèle Soria Combinatorial Systems and Newton Iteration

slide-49
SLIDE 49

Introduction Combinatorics Computations

Ordinary generating series – Pólya operators

fn = # isomorphism classes

  • f F-structures on {1, . . . , n}

→ unlabelled enumeration → OGF ˜ F(z) =

n≥0 fnzn

Dictionary of constructible species A ∪ B A(z) + B(z) A × B A(z) × B(z) SEQ(A) (1 − A(z))−1 SET(A) exp( A(zk )

k

) CYC(A) φ(k)

k Log 1 1−A(zk )

Pólya operators : Composition of species DO NOT translate to OGF ΦF : ˜ G(z) → ZF(˜ G(z), ˜ G(z2), ˜ G(z3), . . .) = F o G (z) cycle index series Derivation : F ′ → F ′ (z) = ZF′(z, z2, z3, . . .)

30 / 34 Michèle Soria Combinatorial Systems and Newton Iteration

slide-50
SLIDE 50

Introduction Combinatorics Computations

Ordinary generating series – Pólya operators

fn = # isomorphism classes

  • f F-structures on {1, . . . , n}

→ unlabelled enumeration → OGF ˜ F(z) =

n≥0 fnzn

Dictionary of constructible species A ∪ B A(z) + B(z) A × B A(z) × B(z) SEQ(A) (1 − A(z))−1 SET(A) exp( A(zk )

k

) CYC(A) φ(k)

k Log 1 1−A(zk )

Pólya operators : Composition of species DO NOT translate to OGF ΦF : ˜ G(z) → ZF(˜ G(z), ˜ G(z2), ˜ G(z3), . . .) = F o G (z) cycle index series Derivation : F ′ → F ′ (z) = ZF′(z, z2, z3, . . .)

Theorem (Truncated Newton iteration for OGF) Let Y = H(Z, Y) be a WF system with solution S,

Y [n+1](z) = Y [n](z) +

  • I − ∂ΦH

∂Y

  • z, Y [n]−1

H

  • z, Y [n]

− Y [n](z)

  • mod zN

with Y [0](z) = S(0) and N = 2n+1, quadratically converges to S(z).

30 / 34 Michèle Soria Combinatorial Systems and Newton Iteration

slide-51
SLIDE 51

Introduction Combinatorics Computations

Example : Unlabelled Rooted Trees

1

Well-founded system : Y = Z · SET(Y) =: H(Z, Y) ;

31 / 34 Michèle Soria Combinatorial Systems and Newton Iteration

slide-52
SLIDE 52

Introduction Combinatorics Computations

Example : Unlabelled Rooted Trees

4 1

Well-founded system : Y = Z · SET(Y) =: H(Z, Y) ;

2

Combinatorial Newton iteration : Y[n+1] = Y[n] + SEQ(H(Y[n])) · (H(Y[n]) − Y[n])

31 / 34 Michèle Soria Combinatorial Systems and Newton Iteration

slide-53
SLIDE 53

Introduction Combinatorics Computations

Example : Unlabelled Rooted Trees

4 1

Well-founded system : Y = Z · SET(Y) =: H(Z, Y) ;

2

Combinatorial Newton iteration : Y[n+1] = Y[n] + SEQ(H(Y[n])) · (H(Y[n]) − Y[n])

3

OGF equation : ˜ Y(z) = H(z, ˜ Y(z)), where H(z, ˜ Y(z)) = z exp( ˜ Y(z) + 1 2 ˜ Y(z2) + 1 3 ˜ Y(z3) + · · ·)

31 / 34 Michèle Soria Combinatorial Systems and Newton Iteration

slide-54
SLIDE 54

Introduction Combinatorics Computations

Example : Unlabelled Rooted Trees

4 1

Well-founded system : Y = Z · SET(Y) =: H(Z, Y) ;

2

Combinatorial Newton iteration : Y[n+1] = Y[n] + SEQ(H(Y[n])) · (H(Y[n]) − Y[n])

3

OGF equation : ˜ Y(z) = H(z, ˜ Y(z)), where H(z, ˜ Y(z)) = z exp( ˜ Y(z) + 1 2 ˜ Y(z2) + 1 3 ˜ Y(z3) + · · ·)

4

Newton for OGF ˜ Y [n+1] = ˜ Y [n] + H(z, ˜ Y [n]) − ˜ Y [n] 1 − H(z, ˜ Y [n]) 0, z + z2 + z3 + z4 + · · · , z + z2 + 2z3 + 4z4 + 9z5 + 20z6 + · · ·

31 / 34 Michèle Soria Combinatorial Systems and Newton Iteration

slide-55
SLIDE 55

Introduction Combinatorics Computations

Numerical iteration - Unlabelled Case

Proposition Y = H(Z, Y) WF system, H constructible species. The 0GF ˜ S(z) of species solution S is analytic at the origin.

Pólya operator ΦF : ˜ G(z) → F o G (z) Sequence transformer ΨF : (α, ( ˜ G

  • αk))k>0
  • → (

F o G

  • αk)k>0
  • Theorem (Newton oracle for values of OGF)

Y = H(Z, Y) WF system, H constructible and α < ρ(˜ S(z)). The numerical iteration (y[0])k>0 = (0, 0, . . .),

  • y[n+1]

k

  • k>0 = ΨN H
  • α,
  • y[n]

k

  • k>0
  • converges to the sequence (˜

S(αk))k>0.

32 / 34 Michèle Soria Combinatorial Systems and Newton Iteration

slide-56
SLIDE 56

Introduction Combinatorics Computations

Example : Unlabelled Rooted Trees

1

Well-founded system : Y = Z · SET(Y) =: H(Z, Y) ;

2

Combinatorial Newton iteration : Y[n+1] = Y[n] + SEQ(H(Y[n])) · (H(Y[n]) − Y[n])

3

Numerical iteration : n ˜ Y [n](0.3) ˜ Y [n](0.32) ˜ Y [n](0.33) 1 .43021322639 0.99370806338e-1 0.27759817516e-1 2 .54875612912 0.99887132154e-1 0.27770629187e-1 3 .55709557053 0.99887147197e-1 0.27770629189e-1 4 .55713907945 0.99887147198e-1 0.27770629189e-1 5 .55713908064 0.99887147198e-1 0.27770629189e-1

33 / 34 Michèle Soria Combinatorial Systems and Newton Iteration

slide-57
SLIDE 57

Introduction Combinatorics Computations

Conclusion

Summary

Algorithmic of implicit species : efficient computations of enumerating sequences and numerical values Oracle : numerical Newton iteration that gives the values of ... power series that are the gfs of . . . combinatorial iterates. also done for ordered structures and integral equations implementation in Combstruct

Work in progress

accelarate convergence near (or at) the sigularity compute the singularities

34 / 34 Michèle Soria Combinatorial Systems and Newton Iteration