Complex Analysis, Rational and Meromorphic Asymptotics
Complex Analysis, Rational and Meromorphic Asymptotics
PART TWO
4. Complex Analysis,
Rational and Meromorphic
Asymptotics
http://ac.cs.princeton.edu
A N A LY T I C C O M B I N AT O R I C S
PART TWO
4. Complex Analysis,
Rational and Meromorphic functions
Analytic
Combinatorics • Roadmap
Philippe Flajolet and
• Complex functions
• Rational functions
Robert Sedgewick
OF
http://ac.cs.princeton.edu
II.4a.CARM.Roadmap
Analytic combinatorics overview
specification
A. SYMBOLIC METHOD
1. OGFs
2. EGFs GF
equation
3. MGFs
SYMBOLIC METHOD
B. COMPLEX ASYMPTOTICS
asymptotic
4. Rational & Meromorphic estimate
5. Applications of R&M
COMPLEX ASYMPTOTICS
6. Singularity Analysis
desired
7. Applications of SA result !
8. Saddle point
3
Starting point
The symbolic method supplies generating functions that vary widely in nature.
√ −
+ − + + + ... +
( )= ( )= ( )= ( )=
− − − ... −
( )= ( )= ln ( )= + /
( )( )...( )
[ ] ( ) [ ] ( ) [ ] ( ) +
[ ] ( )=
(ln )
/ / /
[ ] ( ) [ ] ( ) = ln [ ]( )
!
ln
OGF equation ( )= EGF equation ( )=
( )
√
+ − =
Explicit form of OGF ( )= Explicit form of EGF
!" # ( )
Expansion ( )=− (− ) Expansion ( )=
!
≥
( )
Explicit form of coefficients = Explicit form of coefficients =
!
Approximation Approximation
/ /
Problem: Explicit forms can be unwieldy (or unavailable). ( + + / ! + ... + / !)
6
A shift in point of view
Specification
Symbolic transfer
formal analytic
object! object!
GF equation
GF
Analytic transfer
Asymptotics
7
GFs as analytic objects (real)
( )= (1, −1)
singularity continuation
A. We can use a series representation (in a certain interval) that allows us to extract coefficients.
= + + + + ... ≤ < / [ ]( )=
−
Useful concepts:
Differentiation: Compute derivative term-by-term where series is valid. ( )= + + + ...
Singularities: Points at which series ceases to be valid.
Continuation: Use functional representation even where series may diverge. ( )=−
8
GFs as analytic objects (complex)
A. We can use a series representation (in a certain domain) that allows us to extract coefficients.
A. A surprise!
Serendipity
is not
an accident
Singularities provide full information on growth of GF coefficients!
10
General form of coefficients of combinatorial GFs
strings with −
no 00 ( )= rational /φ, /φ̂ pole φ √
− −
( )= −
derangements meromorphic 1 pole 1N
√
+ − square
Catalan trees ( )= analytic / 4N
root
11
A N A LY T I C C O M B I N AT O R I C S
PART TWO
4. Complex Analysis,
Rational and Meromorphic functions
Analytic
Combinatorics • Roadmap
Philippe Flajolet and
• Complex functions
• Rational functions
Robert Sedgewick
OF
http://ac.cs.princeton.edu
II.4a.CARM.Roadmap
A N A LY T I C C O M B I N AT O R I C S
PART TWO
4. Complex Analysis,
Rational and Meromorphic functions
Analytic
Combinatorics • Roadmap
Philippe Flajolet and
• Complex functions
• Rational functions
Robert Sedgewick
OF
http://ac.cs.princeton.edu
II.4b.CARM.Complex
Theory of complex functions
are complex
numbers
Start by defining i to be the square root of −1 so that i 2 = −1 real ?
14
Standard conventions
= +
(x, y) represents
x z = x + iy
real part
|z| y
imaginary part
absolute value | | +
conjugate ¯=
15
Basic operations
Addition
( + )+( + )=( + )+( + )
Multiplication
( + ) ( + )= + + +
=( )+( + )
Division
¯
= =
+ + | |
Exponentiation?
16
Analytic functions
Examples:
17
Complex differentiation
Note: Notationally the same as for reals, but much stronger—the value is independent of the way that δ approaches 0.
Useful facts:
• If function is analytic (complex-differentiable) in Ω, it admits derivatives of any order in Ω.
• We can differentiate a function via term-by-term differentiation of its series representation.
• Taylor series expansions ala reals are effective.
18
Taylor's theorem
immediately gives power series expansions for analytic functions.
+ + + + + ...
! ! ! !
sin + + ...
! ! ! !
cos + + ...
! ! !
= + + + + + ...
19
Euler's formula
( ) ( ) ( ) ( )
= + + + + + ... + + ...
! ! ! ! !
= + + + + + + ...
! ! ! ! ! ! ! ! !
i 2 = −1 i 3 = −i i4 = 1
20
Polar coordinates
Euler's formula gives another correspondence between complex numbers and points in the plane.
r cosθ (x, y)
= cos + sin
r r sinθ
θ
21
A N A LY T I C C O M B I N AT O R I C S
PART TWO
4. Complex Analysis,
Rational and Meromorphic functions
Analytic
Combinatorics • Roadmap
Philippe Flajolet and
• Complex functions
• Rational functions
Robert Sedgewick
OF
http://ac.cs.princeton.edu
II.4b.CARM.Complex
A N A LY T I C C O M B I N AT O R I C S
PART TWO
4. Complex Analysis,
Rational and Meromorphic functions
Analytic
Combinatorics • Roadmap
Philippe Flajolet and
• Complex functions
• Rational functions
Robert Sedgewick
OF
http://ac.cs.princeton.edu
II.4c.CARM.Rational
Rational functions
are complex functions that are the ratio of two polynomials.
√ −
+ − + + + ... +
( )= ( )= ( )= ( )=
− − − ... −
( )= ( )= ln ( )= + /
( )( )...( )
Approach:
• Use partial fractions to expand into terms for which coefficient extraction is easy.
[Same approach as for reals, but takes complex roots into account.]
24
Extracting coefficients from rational GFs
Factor the denominator and use partial fractions to expand into sum of simple terms.
Example 1.
Rational GF ( )= ( )
(distinct roots) +
Factor denominator =
( )( )
Use partial fractions: ( )= +
Expansion must be of the form
Cross multiply + =
and solve for coefficients.
+ =
Extract coefficients. =[ ] ( )=
25
Extracting coefficients from rational GFs
Factor the denominator and use partial fractions to expand into sum of simple terms.
Example 2.
Rational GF ( )=
(multiple roots) +
Factor denominator =
( + )( )
Solution is
c0 = −2/9, c1 = −1/9, and c2= 3/9
( )= +
+ ( )
Extract coefficients. =[ ] ( )= ( ( ) + + )
26
Approximating coefficients from rational GFs
( )= +
+ ( )
= ( ( ) + + )
27
Extracting coefficients from rational GFs
Factor the denominator and use partial fractions to expand into sum of simple terms.
Example 3.
Rational GF ( )=
(complex roots) +
Factor denominator = =
( )( + ) ( + )
Use partial fractions: ( )= +
Expansion must be of the form +
Cross multiply + =
and solve for coefficients. =
Solution is ( )= +
c0 = c1 = 1/2 +
Extract coefficients. [ ] ( )= ( +( ) )= ( +( ) )
Theorem. Suppose that g(z) is a polynomial of degree t with roots β1, β2,..., βr and let mi
denote the multiplicity of βi for i from 1 to r. If f (z) is another polynomial with no roots in
common with g(z), and g(0)≠0 then
( ) ! ! !
[ ] = β + β + ... + β
( )
≤< ≤< ≤<
Notes:
+ + ... + =
29
AC transfer theorem for rational GFs (leading term)
Theorem. Assume that a rational GF f (z)/g(z) with f (z) and g(z) relatively prime and g(0)≠0
has a unique pole of smallest modulus 1/β and that the multiplicity of β is ν. Then
( ) ( ) ( / )
[ ] = ( )( / )
( )
typical case
( / )
φ 1 =
( / )
+ + +
1.9276... 1 1.09166...
30
Computer algebra solution
Transfer theorem amounts to an algorithm that is embodied in many computer algebra systems.
31
Classic example: Algorithm for solving linear recurrences
pp. 157–158
32
AC example with rational GFs: Patterns in strings
Symbolic transfer
( )=( + + + )( + ( ))
GF equation + + +
=
− − − −
Analytic transfer
. .
Asymptotics ∼ β = . β= .
PART TWO
4. Complex Analysis,
Rational and Meromorphic functions
Analytic
Combinatorics • Roadmap
Philippe Flajolet and
• Complex functions
• Rational functions
Robert Sedgewick
OF
http://ac.cs.princeton.edu
II.4c.CARM.Rational
A N A LY T I C C O M B I N AT O R I C S
PART TWO
4. Complex Analysis,
Rational and Meromorphic functions
Analytic
Combinatorics • Roadmap
Philippe Flajolet and
• Complex functions
• Rational functions
Robert Sedgewick
OF
http://ac.cs.princeton.edu
II.4d.CARM.Analytic
Analytic functions
Example: = analytic at 0
= =
( )
+
= ( ) analytic everywhere but z = 1
36
Analytic functions
+ + everywhere
everywhere but z = 0
( )= ln everywhere but z = 1
37
Aside: computing with complex functions
is an easy exercise in object-oriented programming.
+ +
+ /
our convention:
highlight the 2.5 by 2.5 square
centered at the origin
when plotting a bigger square
40
Plots of various rational functions
+ + +
− − − −
( )( )( )( )
41
Complex integration
(2, 3)
! ! −
Starting point: = ( + ) = + =
Change variables to
L !−
convert to real !
= − ! = +
integrals.
(2, −1)
Augustin-Louis Cauchy
1789-1857
Amazing facts:
Analytic combinatorics context: Immediately gives exponential growth for meromorphic GFs
42
Integration examples
! ! "
"
= + = " + =− +
Ex 1. Integrate f (z) = z on a rectangle − −
! ! − "−
(−4, 3)
L1 (2, 3) "
= ( + ) = − " = + = + =
R
! ! − "−
"
L4 L2 = − = " − = −
! ! "
"
(−4, −1) (2, −1)
= (− + ) =− − " =− −
− −
L3
! !
= =− + + + + − − − = (!)
+ + +
= =
! ! θ!
C θ !
Ex 2. Integrate f (z) = z on a circle centered at 0 = θ= ! = ( − )=
! !
Ex 3. Integrate f (z) = 1/z on a circle centered at 0 = θ=
43
Integration examples
!
!
θ=
=−
= !
"= − ( + )θ "
( + )θ "
θ= " = ( − )=
( + ) ( + )
s !
=−
=
"= −
44
Null integral property
! !
Ex. f (z) = z = =
α α
β β
( ) = ( ) = ( )
+
45
Deep theorems of complex analysis
Complex
Differentiability
Analyticity
Null Integral
Property
Appendix C
pp. 741-743
46
Cauchy’s coefficient formula
Theorem. If f (z) is analytic and λ is a closed +loop in a region Ω that contains 0, then
[ ] ( ) = ( ) +
Proof.
• Expand f : ( )= + + + + ...
0
• Deform λ to a circle centered at 0
• Integrate: ( ) +
= +
+ ... + + + + + + ...
AC context: provides transfer theorems for broader class of complex functions: meromorphic functions (next).
47
A N A LY T I C C O M B I N AT O R I C S
PART TWO
4. Complex Analysis,
Rational and Meromorphic functions
Analytic
Combinatorics • Roadmap
Philippe Flajolet and
• Complex functions
• Rational functions
Robert Sedgewick
OF
http://ac.cs.princeton.edu
II.4d.CARM.Analytic
A N A LY T I C C O M B I N AT O R I C S
PART TWO
4. Complex Analysis,
Rational and Meromorphic functions
Analytic
Combinatorics • Roadmap
Philippe Flajolet and
• Complex functions
• Rational functions
Robert Sedgewick
OF
http://ac.cs.princeton.edu
II.4e.CARM.Meromorphic
Meromorphic functions
are complex functions that can be expressed as the ratio of two analytic functions.
√ −
+ − + + + ... +
( )= ( )= ( )= ( )=
− − − ... −
( )= ( )= ln ( )= + /
( )( )...( )
Approach:
• Use contour integration to expand into terms for which coefficient extraction is easy.
50
Meromorphic functions
Useful facts:
( )= + ... + + + + ( )+ ( ) + ...
( ) ( ) ( )
and is said to have a pole of order M at z0. Proof sketch: If z0 is a zero of g(z) then g(z) = (z − z0)M G(z).
Expand the analytic function f (z)/G(z) at z0.
A function is meromorphic in Ω iff it is analytic in Ω except for a set of isolated singularities, its poles.
51
Meromorphic functions
+ + everywhere
everywhere but z = 0
Definition. A function h(z ) defined in
Ω is meromorphic at z0 in Ω iff for z
in a neighborhood of z0 with z ≠ z0 it ( )= everywhere but z = 1
can be represented as f (z)/g(z),
where f (z) and g(z) are analytic at z0.
everywhere but z = ±i
+
52
Plots of various meromorphic functions
+ + +
− − − −
( )( )( )( )
53
Integrating around a pole
!
C
Ex. f (z) = 1/z, pole at 0 with residue 1. =
Proof.
( ) = ( )
=
λ
where S is the set of poles of h(z) inside Ω
Proof (sketch).
55
Extracting coefficients from meromorphic GFs
where p1, ..., pm are polynomials with degree α1−1, ..., αm −1, respectively.
R
α3
α1
α2
Proof sketch: αm
( ) ( ) ( ) ( )
= ( )
• By the residue theorem = + = + ... +
( )
+
= +
= = ( )
=
< | ( )| < | |= +
• By direct bound
Constant. May depend on R, but not N. 56
Complex roots
A. YES: all poles closest to the origin contribute to the leading term.
[ ] = , , , , , , ,...
+
57
Complex roots
A. NO, for combinatorial GFs, if only one root is closest to the origin.
+ + +
Pringsheim’s Theorem. If h (z) can be represented as a series
− − − −
expansion in powers of z with non-negative coefficients and radius
of convergence R, then the point z = R is a singularity of h (z).
Implication: Only the smallest positive real root matters if no others have the same magnitude.
and at all points |z | = R. If α is a unique closest pole to the origin of h (z ) in R, then α is real
( ) ( )
and [ ] where M is the order of α, =( ) ( )( )
and β = 1/α.
( )
• Approximation at α: ( ) = =
/
See next slide for calculation of c and M > 1.
Notes:
• Error is exponentially small (and next term may involve periodicities due to complex roots).
• Result is the same as for rational functions.
59
Computing coefficients for a meromorphic function h(z) = f(z)/g(z) at a pole α
If α is of order 1 then [ ] ( ) +
= lim ( ) ( )
( )( ) ( ) ( ) ( ) ( )
To calculate h−1: lim ( ) ( ) = lim = lim =
( ) ( ) ( )
If α is of order 2 then [ ] ( ) +
= lim ( ) ( )
( ) ( ) ( ) ( ) ( )( )
To calculate h−2: lim ( ) ( ) = lim = lim
( ) ( )
( ) ( ) ( ) ( )+ ( ) ( )
= lim =
( ) ( )
( )
If α is of order M then [ ] ( ) ( ) ( )( )
60
Bottom line
Specification
Symbolic transfer
61
AC transfer for meromorphic GFs
/ /
1
62
AC example with meromorphic GFs: Generalized derangements
DM, the class of all permutations
see Lecture 2
Specification
with no cycles of length ≤ M
DM = SET(CYC>M(Z )
Symbolic transfer
− − − −...
GF equation ( )=
−
Analytic transfer
Asymptotics [ ] ( )
64
Parting thoughts
“Combinatorialists use recurrences, generating functions, and such transformations as the Vandermonde convolution;
Others, to my horror, use contour integrals, differential equations, and other resources of mathematical analysis”
???
?
( ) ( )
[ ] =[ ] =
! !
/ /
( ) ( ) ( )
[ ] =[ ] = ...
! ! !
65
A N A LY T I C C O M B I N AT O R I C S
PART TWO
4. Complex Analysis,
Rational and Meromorphic functions
Analytic
Combinatorics • Roadmap
Philippe Flajolet and
• Complex functions
• Rational functions
Robert Sedgewick
OF
http://ac.cs.princeton.edu
II.4e.CARM.Meromorphic
A N A LY T I C C O M B I N AT O R I C S
PART TWO
4. Complex Analysis,
Rational and Meromorphic functions
Analytic
Combinatorics • Roadmap
Philippe Flajolet and
• Complex functions
• Rational functions
Robert Sedgewick
OF
http://ac.cs.princeton.edu
• Exercises II.4f.CARM.Exercises
Note IV.28
Supernecklaces
68
Assignments
1. Read pages 223-288 (Complex Analysis, Rational, and Meromorphic Functions) in text.
Usual caveat: Try to get a feeling for what's there, not understand every detail.
3. Programming exercises.
Program IV.2. Plot the derivative of the supernecklace GF (see Note IV.28)
in the style of the plots in this lecture (see booksite for Java code).
69
A N A LY T I C C O M B I N AT O R I C S
PART TWO
4. Complex Analysis,
Rational and Meromorphic
Asymptotics
http://ac.cs.princeton.edu