Professional Documents
Culture Documents
Asymptotic Approximations: Analytic Combinatorics Part One
Asymptotic Approximations: Analytic Combinatorics Part One
PART ONE
4. Asymptotic
Approximations
http://aofa.cs.princeton.edu
A N A LY T I C C O M B I N AT O R I C S
PART ONE
4. Asymptotic Approximations
• Standard scale
• Manipulating expansions
• Asymptotics of finite sums
OF
• Bivariate asymptotics
http://aofa.cs.princeton.edu
4a.Asympt.scale
Asymptotic approximations
= ✗ not concise
ln + + ( ) ✓
3
Notation (revisited)
( )= ( ( )) | ( )/ ( )|
4
Notation for approximations
“Big-Oh” approximation
( )= ( )+ ( ( ))
Error will be at most within a constant factor of h(N ) as N increases.
“Little-oh” approximation
( ) = ( ) + ( ( ))
Error will decrease relative to h(N ) as N increases.
“Tilde” approximation
( ) ( )
Weakest nontrivial o-approximation.
5
Standard asymptotic scale
sequence
Definition. A decreasing series gk(N) with gk+1(N) = o(gk(N )) is called an asymptotic scale.
The series
( ) ( )+ ( )+ ( ) + ...
is called an asymptotic expansion of f. The expansion represents the collection of formulae
( )= ( ( ))
( )= ( )+ ( ( ))
( )= ( )+ ( )+ ( ( ))
( )= ( )+ ( )+ ( )+ ( ( ))
The standard scale is products of powers of N, log N, iterated logs and exponentials.
Typically, we:
• use only 2, 3, or 4 terms (continuing until unused terms are extremely small)
• use ~-notation to drop information on unused terms.
• use O-notation or o-notation to specify information on unused terms.
Methods extend in principle to any desired precision.
6
Example: Asymptotics of linear recurrences ≠
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 1/β of smallest modulus and that the multiplicity of β is ν. Then
( ) ( ) ( / )
[ ] = ( )( / )
( )
Notes:
Example 1.
• Pole of smallest modulus usually dominates.
3N + 2N ~ 3N
✓
• Easy to extend to cover multiple poles in neighborhood
of pole of smallest modulus. Example 2.
2N + 1.99999N ~ 2N
✗
7
Asymptotics of linear recurrences ≠
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 1/β of smallest modulus and that the multiplicity of β is ν. Then
( ) ( ) ( / )
[ ] = ( )( / )
( )
Solve. ( )=
+
Smallest root of denominator is 1/3. ( )( / )
= =
+ /
8
Fundamental asymptotic expansions
are immediate from Taylor’s theorem.
exponential = + + + + ( )
logarithmic ln( + ) = + + ( )
binomial ( + ) = + + + + ( )
geometric = + + + + ( )
as x ➛ 0.
9
Fundamental asymptotic expansions
are immediate from Taylor’s theorem.
exponential /
= + + + + ( )
logarithmic ln( + )= + + ( )
binomial ( + ) = + + + + ( )
geometric = + + + ( )
as N ➛ ∞.
10
Inclass exercise
ln( + ) + ln( ) ( / )
= + ( ) + ( )
= + ( )
ln( + ) ln( ) ( / )
= + ( )+ + + ( )
= + ( )
11
A N A LY T I C C O M B I N AT O R I C S
PART ONE
4. Asymptotic Approximations
• Standard scale
• Manipulating expansions
• Asymptotics of finite sums
OF
• Bivariate asymptotics
http://aofa.cs.princeton.edu
4a.Asympt.scale
A N A LY T I C C O M B I N AT O R I C S
PART ONE
4. Asymptotic Approximations
• Standard scale
• Manipulating expansions
• Asymptotics of finite sums
OF
• Bivariate asymptotics
http://aofa.cs.princeton.edu
4b.Asympt.manip
Manipulating asymptotic expansions
Goal.
Develop expansion on the standard scale for any given expression.
! "
− ( )
+ ln( + )
Techniques. Why?
14
Manipulating asymptotic expansions
ln + ( ) ✓
15
Manipulating asymptotic expansions
Factoring. Estimate the leading term, factor it out, expand the rest.
Distribute. = + ( )
16
Manipulating asymptotic expansions
log
Term-by-term = (ln ) + ln + ( )
multiplication.
+ ln + + ( )
log
+ ( )+ ( )+ ( )
slight improvement big improvement
in precision in precision
log
Collect terms. = (ln ) + ln + + ( )
( ) (ln ) + γ ln +γ
1000 56.032 47.717 55.692 56.025
Ex.
ln( + )
ln +γ+ ( )
Expand. =
ln + ( )
γ
Factor denominator. + + ( ) OK to simplify by replacing
= ln
O(1/N log N) by O(1/N)
+ ( )
! γ "! "
Expand 1/(1−x). = + + ( ) + ( )
ln
Multiply.
γ
= + + ( )
ln
18
Manipulating asymptotic expansions
Substitute HN expansion.
= ln +γ+ ( / )
Lemma.
γ ( / ) ( / )
= = + ( )
Expand ex. = ( + ( )+ ( )
γ
!
Simplify. = ( + ( )
γ
γ
Distribute. = + ( ) 1000 1782 1781
= / + ( ) ! "
− /
10000 0.367861 0.367879
big improvement
in precision 100000 0.367878 0.367879
ln( − ) ( / )
( ) ( / )
! "! "
( ) = ln +γ+ + ( ) ln +γ+ + ( )
ln
= (ln ) + ln + + + ( )
21
A N A LY T I C C O M B I N AT O R I C S
PART ONE
4. Asymptotic Approximations
• Standard scale
• Manipulating expansions
• Asymptotics of finite sums
OF
• Bivariate asymptotics
http://aofa.cs.princeton.edu
4b.Asympt.manip
A N A LY T I C C O M B I N AT O R I C S
PART ONE
4. Asymptotic Approximations
• Standard scale
• Manipulating expansions
• Asymptotics of finite sums
OF
• Bivariate asymptotics
http://aofa.cs.princeton.edu
4c.Asympt.sums
Asymptotics of finite sums
Using the tail. The last term of a rapidly increasing sum may dominate.
!
!= ! + + = ! + ( )
!
24
Euler-Maclaurin Summation
is a classic formula for estimating sums with integrals.
( )= ( ) + ( )+ + ( ) ( ) + ...
Asymptotic series diverges; need to check bound on last term (see text for many details).
BUT this form is useful for many applications.
Classic example 1. = ln + + + ( )
Classic example 2. ln ! = ln + ln + + ( )
25
Inclass exercise
= exp ln !) ln !
= exp ln( ) + ln + ( / )
( ln( ) + ln + ( / )) ln ln = ln ln ln
= exp ln ln + ( / ) = ln
Ex. ! "
= + ( )
∼ √
26
Asymptotics of the Catalan numbers: an application
! " N = 106 ??
A. At least ∼ lg √ ∼ − . lg ✓
preorder traversal
0000101100010101101011001101100000111001011011001011011010011011000001111000011
0 for internal nodes 0110000111001001001111011000101111010000110110110010110000110011001110101100111
1 for external nodes
27
A N A LY T I C C O M B I N AT O R I C S
PART ONE
4. Asymptotic Approximations
• Standard scale
• Manipulating expansions
• Asymptotics of finite sums
OF
• Bivariate asymptotics
http://aofa.cs.princeton.edu
4c.Asympt.sums
A N A LY T I C C O M B I N AT O R I C S
PART ONE
4. Asymptotic Approximations
• Standard scale
• Manipulating expansions
• Asymptotics of finite sums
OF
• Bivariate asymptotics
http://aofa.cs.princeton.edu
4d.Asympt.bivariate
Bivariate asymptotics
is often required to analyze functions of two variables.
Challenges:
• asymptotics depends on relative values of variables
• may need to approximate sums over whole range of relative values.
for k = 0
Example 1: Binomial distribution
exponentially small for k close to N
! 1 for k = 0
Example 2: Ramanujan Q-distribution
( )! exponentially small for k close to N
30
Binomial distribution
.5
.5
.75
.25
.25
.125
.125
.103
.103
00
00 N 2N
k (scaled by a factor of 2N )
31
Ramanujan Q-distribution
11
!
( )!
.75
.75
.5
.5
.25
.25
0
0
00 N/2 N
k (scaled by a factor of N )
32
Ramanujan Q-distribution
!
= exp ln ! ln( )! ln
( )!
ln ! = ( + ) ln + ln + ( )
Stirling's approximation. = exp ( + ) ln + ln
( + ) ln( )+ ln ln + ( )
ln( )= + ( )
k k/N k 3/N 2
33
Normal approximation to the binomial distribution
( + + ) ln( + ) ln + ( / )
uniform central
/ /
normal + ( /
) + ( )+ ( )
Poisson + ( ) + ( )+ ( )
! !
! /( ) /( )
Q + ( ) + ( )+ ( )
( )!
35
Next challenge: Approximating sums via bivariate asymptotics
.75
! .5
( )
( )!
.25
0
0
Observations:
• nearly 1 for small k
• negligable for large k
• bivariate asymptotics needed to give different estimates in different ranges.
negligible
36
Laplace method
To approximate a sum:
• Restrict the range to an area that contains the largest summands.
• Approximate the summand.
• Extend the range by bounding the tails to get a simpler sum.
• Approximate the new sum with an integral.
37
Laplace method for Ramanujan Q-function
!
( )
( )!
! /
Approximate the summand. Q-distribution
( )! approximation.
38
A N A LY T I C C O M B I N AT O R I C S
PART ONE
4. Asymptotic Approximations
• Standard scale
• Manipulating expansions
• Asymptotics of finite sums
OF
• Bivariate asymptotics
http://aofa.cs.princeton.edu
4d.Asympt.bivariate
Exercise 4.9
AN INTRODUCTION
ANALYSIS
TO THE
ALGORITHMS
OF
S E C O N D E D I T I O N
ROBERT SEDGEWICK
PHILIPPE FLAJOLET
40
Exercise 4.71
AN INTRODUCTION
ANALYSIS
TO THE
ALGORITHMS
OF
S E C O N D E D I T I O N
ROBERT SEDGEWICK
PHILIPPE FLAJOLET
41
Assignments for next lecture
42
A N A LY T I C C O M B I N AT O R I C S
PART ONE
4. Asymptotic
Approximations
http://aofa.cs.princeton.edu