Professional Documents
Culture Documents
Analytic
Combinatorics
http://ac.cs.princeton.edu
PART TWO
7. Applications of
Singularity Analysis
A. SYMBOLIC METHOD
1. OGFs
2. EGFs
3. MGFs
B. COMPLEX ASYMPTOTICS
SYMBOLIC METHOD
specification
5. Applications of R&M
6. Singularity Analysis
7. Applications of SA
8. Saddle point
Analytic
Combinatorics
GF
equation
ANALYTIC COMBINATORICS
Analytic
Combinatorics
http://ac.cs.princeton.edu
PART TWO
• Labelled sets
• Mappings
• Tree-like classes
II.7a.SAapps.Sets
4>'(X ) n N- 3/2
applications
general trees
binary trees
unary-binary dd
Cayley trees
Symbolic method
Combinatorial class
Construction
OCF equation
Quadratic equation
Classic next steps
Binomial theorem
Extract coefficients
Stirling's approximation
Simplify
G(z) — G(z) 2 = z
, 1 + v / Wi
C(z) =- - -
1 - G(z)
~ exp(2Nln(2N) - 2N + In v / 4irN - 2(Nln(N) - N + In v'lirN))
calculations
omitted
Gs= 14
G = Z x SEQ(G))
> f
C(z)
z
1 - C(Z)
simple variety
of trees
> r
C N ~ -i-4 n N 3 / 2
4v^
0'(A ) N N~ 3 / 2
sfi^rWW)
0(U)
0»
0 »
1 - u
O^F
O^F
1 _ A
1 - A “ (1 - A) 2
A = 1/2
0(A) = 2
0'(A)=4
0"(A) = 16
6
Ti = 2
/■
<1
x*x
Tb = 5
> f
B(z) = z( 1 + B(z)) 2
simple variety
of trees
> f
[z n ]B(z) ~ -^4 n N 3 / 2
A/ 71
V2tt0"(A)/0(A)
0'(A) N N- 3 / 2
0(U) = (1 +U) 2
0» = 2(1 +u)
0 » = 2
(1+A) 2
2A(1 + A)
A = 1
0(A) = 4
0'(A) = 4
0"(A)=2
8
Example 3: Unary-binary trees
M b=2
Ma= 4
HA A
M 5 =9
Example 3: Unary-binary trees
Asymptotics
M = Z x S£Qo,i, 2 (M)
> r
simple variety
of trees
> f
Mn
3 N n -3/2
r-sj
0'(A ) N N~ 3 / 2
sfi^rWW)
<t>{u) = 1 + u + u 2
0'(u) = 1+2u 1 + A + A 2 = A + 2A
0 » = 2
A = 1
0(A) = 3
0'(A) = 3
0"(A)=2
10
4 ways to label
T 4 = 64
Class
ECF
C, the class of labelled rooted unordered trees
c ( z ) = 5Z
cec
Cn
N> 0
Example
6 2 11
Extract coefficients i u ,,
n — i f i / u \ n
1 r /# N-ii p uN
N n ~ 1
“ N [U Je
N!
12
Example 4: Cayley trees
C = Z ★ SET ( C )
> f
C(z) = ze c
simple variety
of trees
[z N ]C(z) — ^_ e N N 3 / 2
V2ti
0'(A ) N N- 3 / 2
v /2ji0"(A)/0(A)
0(u) = e u
0» = e u
0"(u) = e"
Ae A
A = 1
0(A) = e
0'(A) = e
0"(A) = e
13
( W) ~
cj>(u) = e u
<P'(u) = e" e x = Ae A
<p"(u) = e u
A = 1
<t>( A) = e
^'(A) = e
0"(A)= e
Theorem.
N\ ~ a/2tiN( —) N *
Stirling's formula
14
ANALYTIC COMBINATORICS
Analytic
Combinatorics
http://ac.cs.princeton.edu
PART TWO
• Labelled sets
• Mappings
• Tree-like classes
II.7a.SAapps.Sets
ANALYTIC COMBINATORICS
PART TWO
Analytic
Combinatorics
Mappings
Tree-like classes
CAMBRIDGE
http://ac.cs.princeton.edu
II.7a.SAapps.Sets
[from Lecture 6]
1 1
v 7 1 -z/p v 7 V 1 -z/p ]
and
[z N ]F(z)
A A
77"
r(a ) K p
(-) N
1 —a
17
Pi= 1
avg. # cycles: 1
©©©
Ps = 6
Pa-24
avg. # cycles: 2.08333
18
> f
exp-log
> f
[z N ]P(z) ~ 1
# permutations: ~ N\
avg # cycles: ~lnN
cy\ r?)
1 1
+ ft . Then F(z) ~ e^(
1 -z/p
1 - z/p
)“
and
r(a) V
( 7 ) N
1 —a
In
a log --— + p
^ - z/p
for a = 1, p = 0, and p = 1
D i = 0
avg. # cycles: 0
Db= 2
avg. # cycles: 1
D 4 =9
20
> f
exp-log
> f
[z n ]D(z) ~ ^35
# derangements: ~ N\/e
avg # cycles: ~ In N
1 1
with G(z) ~ a log - - — I- /3 . Then F(z) ~ e d (
and
1 -z/p
1 -z/p
In
1 'j
y— ;(2)= a log i _ r / - + ^
z/p
21
D = SET(CYC * wi (Z))
D(z) = exp(ln
rWl
1 — z Wt
rW t
w t
[z n ]D(z) = exp(-
exp-log
Wt
W t
In
1 -z
for a = 1, f3
and p = 1
1 = a log
1 -z/p
Wi
1
w t
22
fe = 1 r 4 = 3
1 2 ways to label
Rs = 12
60 ways to label
Re = 70
avg. # components:
R? = 465
avg. # components:
23
R = SET(UCYC> 2 (Z))
z z
, x ,1, 1 - - X
K z) = exp — In-
v ; PV 2 1 -z 2 4’
exp-log
[z n ]R(z)
-3/4
V 71N
e -3/4
# 2-regular graphs: ~ N\ _
-InN
avg # components:
Analytic
Combinatorics
page 1 BB
page 449
1 - zip
+ /3 . Then F[z) ~ e ;3 (
1 - zip
Y
and
[z n ]F(z)
,1
—-(-) N'~ a
r(a)V
1 -z/p
ANALYTIC COMBINATORICS
PART TWO
Analytic
Combinatorics
Mappings
Tree-like classes
CAMBRIDGE
http://ac.cs.princeton.edu
II.7a.SAapps.Sets
ANALYTIC COMBINATORICS
PART TWO
Analytic
Combinatorics
Tree-like classes
CAMBRIDGE
http://ac.cs.princeton.edu
II.7a.SAapps.Sets
Example 7: Mappings
[from Lecture 2]
Def. A mapping is a function from the set of integers from 1 to N onto itself.
Example
1 2 3 4 5 6 7 8 9 10 11 12 IB 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
32 33 34 35 36 37
9 12 29 33 5 20 30 37 26 20 13 8 2 33 29 2 35 37 33 9 35 21 18 2 25 1 20 33 23 18
29 5 5 9 11 5 11
27
Mappings
[from Lecture 2]
M 2 = 4
(inn
12 3 to to to
113 ^
121 Q
122 y r
133 A ^
2 2 3 O
3 2 3
n; ©0
2 11
212 /rCX
2 3 2 tob
3 11 b
3 3 ! X
3 3 2 LJ
112 Q
1 3 1 Q
221 Y
2 3 3 O
3 13 f
322 n
Hi A
Mb = 27
28
oaO
Mapping EGFs
[from Lecture 2]
Combinatorial class
EGF equation
C(z) = ze c ^
Combinatorial class
Construction
EGF equation
V(Z) - ln 1 - C(z)
Combinatorial class
Construction
1 1
v 1 — C(z) 7 1 — C(z)
29
v /2ji0"(A)/0(A)
0(A) = e
0'(A) = e
0"(A) = e
0(u) = e 1
0'(u) = e 1
0» = e 1
e A = Ae A
30
Y = CYC(C)
Y(z) — In
1 - C(z)
lln—-—
2 1 — ez
— In \fl
standard scale
[z n ]Y(z)
2 N
# cycles of trees: N\
2 N
71
2N
1 10 21 10 291231
C(z) ~ 1 — — ez
Stirling
N\ ~ V2kN( k — ) N
31
Mappings
\ • f \
• i | , /
>
A i i L
y(z)
r N
n n /
32
Mappings overview
(VlfM-
4‘W N-
0 ( 0 ) = e"
0'(o) = e u
0"(o) = e u
f Asymptotics j
Y(z) = In
1 10 21 10 291231
from previous slide
Mappings
Mappings: exp-log
33
Mapping parameters
Mi = 1
1 2
1 1
2 2
2 1
00
/W 2 = 4
123 000
113 ^
121 O'
122 Y 0
1 3 3 T U
2 2 3 O
3 2 3
Hi ©
2 12 *0
2 3 2 v>
311 v
3 3 2 6
112 Q
131 Q
2 2 1 y
2 3 3 O
3 13 f
3 2 2 6
333
Mb = 27
34
CXX£)
Components in mappings
> f
M(z) = e Y ^
y(z) ~ 1 In 1 -In Vl
2 1 — ez
exp-log
,/V
y/2nN
n n /
avg # components:
In N
X'
• i
2 / ...
^ •
>- A
v<
/X
r-’^i \
f ‘
VTX
r * ^
• -•'V
«■
and
1 -z/p
1 - z/p
Y(z)
-T^(-) N '~°
r(a) V
-ln-
2 1
ez
ct log
+ 0
for
1 - z/p
35
Combinatorial class
Parameter
Construction
BGF
V 1 — uC(z )/ 1 — u
N! '.Nl 9 ..M N!
)| u=1
N N j du
[Z]
uC( z )
C(z)
N Nl (1 — C(z)) 2
N! N 1 1
~ —-[z j-
N N l J 2 1 - ez
1 N!e N
nN/2
page 462
C(z) ~ 1 — \/2Vl — ez
C(z) 1 1
(1 — C(z)) 2 2 1 — ez
Stirling
N! ~ V2n N(—) N
predicted: 1 2.5
actual: 9
36
ANALYTIC COMBINATORICS
PART TWO
Analytic
Combinatorics
Tree-like classes
CAMBRIDGE
http://ac.cs.princeton.edu
II.7a.SAapps.Sets
ANALYTIC COMBINATORICS
PART TWO
Analytic
Combinatorics
• Labelled sets
• Mappings
• Tree-like classes
CAMBRIDGE
http://ac.cs.princeton.edu
II.7a.SAapps.Sets
F = CONSTRUCTS, F)
Analytic
Combinatorics
page 467
\
immediate via
symbolic transfer
F(z) = z<j>(F{z))
39
• 0(z, w) is analytic at 0 and in a domain |z|< R and \w\< S for some R, S >0.
• [z N w k \<P(z, w) > 0 and >0 for some N and some k> 2, with <I>(0, 0) =*= 0.
There exist positive reals r < R and s < S such that (r, s) = s and <I> w (r, s) =
1
L = Z + SET> 2(L)
(z, w) = w
O W (Z, W) = 1
"characteristic system
Characteristic system
z + e w — 1 — w — w
e w - 1 =1
solution
r= 2ln 2 — 1
s = In 2
2r$Ar, s)
& ww (r , s)
Construction
B = • + • x SEQo, 2 ( B )
B(z) =z + zB{z) 2
s = 1/2
r= 1/4
OGF equation
Characteristic function
4>(z, w) — z + w
z + w 2 = w
$ z (z, w) = 1
4> w (z, w) = 2 w
$mv(z, w)=2
a — 2
Characteristic system
2w — 1
\/K
41
Example 8. Bracketings
Analytic
Combinatorics
page 69
Applications
•Parenthesizations.
•Series-parallel networks.
•Schroder’s 2nd problem
42
Example 8: Bracketings
Q. How many bracketings with N leaves?
= 1 5 2 = 1
A\
X^ \
5b = 3
x^ *X*
54 = 1 1
43
Example 8: Bracketings
Si= 1
(a b)
5z= 1
(a b c)
((a b) c) (a (b c))
5b = 3
((a
(((a b)
(abed)
b) c d) (a (b c) d) ((a b) c d)
((a (b c)) d)
c) d) (((a b) c) d)
(a C(b c) d))
((a b) (c d))
((a b c) d) (a (b c d))
5 4 = 1 1
Example 8: Bracketings
and-or conjunctive
propositions
series-parallel networks
<D—0>
—®—
45
Example 8: Bracketings
5(z) = z +
1 - 5(z)
- 1 - 5(z)
“ fiiv5\v
(where q =
2r$ z (r,s)
, s)
[z N ]S(z)
Y 8s/2n K r
with r — 3 — 2 V 2
46
Def. A labelled hierarchy of N items is a tree with N labelled leaves and no unary
nodes
Applications
•Classification.
Analytic
Combinatorics
page 1 28
47
U = 26
48
L = Z + SET> 2 (L)
> f
implicit
tree-like
f(z) ~ s „ V.
z + e w — 1 — w — w
e w - 1 = 1
f = 2 In 2 — 1
s = In 2
with r = 2 In 2 — 1
<£>(z, w) = z — 1 + e w — w
&z(z, W) = 1
$ w (z, w) = e w - 1
$ wvv (z, w) = e w
$ z (r,s) = 1
$mv(r,s) = 2
a — \/2 In 2 — 1
49
ANALYTIC COMBINATORICS
PART TWO
Analytic
Combinatorics
• Labelled sets
• Mappings
• Tree-like classes
CAMBRIDGE
http://ac.cs.princeton.edu
II.7a.SAapps.Sets
ANALYTIC COMBINATORICS
Analytic
Combinatorics
http://ac.cs.princeton.edu
PART TWO
^Set scherga^>
• Mappings
• Tree-like classes
• Summary
II.7e.SAapps.Summary
G = Z x SEQ(G )
C(Z) =1-C(Z)
'a n N 3 ' 2
40E
binary trees
B = • x (E + B) x (E + B)
B = • + • x SEQo, 2 ( B )
B(z) — z + zB(z) 2 )
1 4 N N } / 2
v n
unary-binary trees
M = • x SEQo,i, 2 ( M )
' _3 n N- } ' 2
V 471 / 3
Cayley trees
C = Z ★ SET(C )
N\ L e N N~V 2 = N n -’
y/2/K
mapping components
K = CYC(C )
K<Z) - hl 1 - C(z)
~N!— - J—N n
2N V 2N
mappings
M = SET(K )
e N
~ /V! _~ /V
V2^N
2-regular graphs
„-z/2-z 2 /4
e -3/4
~ /V! _
VnN
labelled hierarchies
L = Z + SET> 2 ( L )
L(z) = z + e L ^ — 1 — L(z)
yjl 111 2 - 1 N!
2\/tiN 3 (2 In2 — 1 ) N
52
"If you can specify it, you can analyze it"
schema
technical condition
construction
coefficient asymptotics
Labelled set
exp-log
F = SET(G)
^0 i N
( )
r(cOV
Simple variety
of trees
invertible
F = Z x SEQ( F)
F = Z ★ SEQ( F)
’(Vn - 3 / 2
y/an p
Context-free
irreducible
Family of (+, x)
constructs
L_ (Vn - 3 / 2
y/ait p
Implicit tree-like
smooth implicit
function
F = CONSTRUCT (F)
a ^C) N N~V 2
2 r '
53
ANALYTIC COMBINATORICS
Analytic
Combinatorics
http://ac.cs.princeton.edu
PART TWO
^Set scherga^>
• Mappings
• Tree-like classes
• Summary
II.7e.SAapps.Summary
ANALYTIC COMBINATORICS
Analytic
Combinatorics
http://ac.cs.princeton.edu
PART TWO
^Set scherga^>
• Mappings
• Tree-like classes
• Exercises
II.7f.SAapps.Exercises
Analytic
Combinatorics
56
Assignments
Usual caveat: Try to get a feeling for what's there, not understand every detail.
3. Programming exercise.
Analytic
Combinatorics
57
ANALYTIC COMBINATORICS
Analytic
Combinatorics
http://ac.cs.princeton.edu
PART TWO
^Set scherga^>
• Mappings
• Tree-like classes
• Exercises
II.7f.SAapps.Exercises
ANALYTIC COMBINATORICS
Analytic
Combinatorics
http://ac.cs.princeton.edu
PART TWO
7. Applications of
Singularity Analysis