Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

AofA Analytic Combinatorics Q&A 0

Q. How many binary strings of length N have no occurrence of 01?

A. Trick question!

1
AofA Analytic Combinatorics Q&A 1

Q. How many binary strings of length N have no occurrence of 011?

A.

2
Probably need a 1-page cheatsheet.

) = , + A + (A + A × A ) × )

) (a) =  + a + (a + a )) (a)


+a
) (a) =
 − a − a
B011: class of binary strings with no 011

P011: class of binary strings whose only 011 is at the beginning

EQ 1 E + (Z0 + Z1 ) ⇥ B011 = B011 + P011 Note: true for any pattern p:


prepending a 0 or a 1 to a p-free binary string
gives a p-free binary string
or a binary string whose only occurrence
1 + 2zB011 (z) = B011 (z) + P011 (z) of p is at the beginning”

EQ 2 (Z0 ⇥ Z1 ⇥ Z1 ) ⇥ B011 = P011 Note: In general, RHS may be more complicated

z 3 B011 (z) = P011 (z)

1 1 1
B001 (z) = = =
1 2z + z 3 (1 z)(1 z z2) (1 z)(1 z)(1 ˆz)

n
n
Probably too intricate for an inclass midterm (borderline, at best) [z ]B001 (z) = p
5
B010: class of binary strings with no 010

P010: class of binary strings whose only 010 is at the beginning

EQ 1 E + (Z0 + Z1 ) ⇥ B010 = B010 + P010

EQ 2 (Z0 ⇥ Z1 ⇥ Z0 ) ⇥ B010 = P010 + (Z0 ⇥ Z1 ) ⇥ P010

if the string from B010 begins with 10


constructed string begins with 01010 (two occurrences of 010)
01 followed by a string whose only 010 is at the beginning
AofA Analytic Combinatorics Q&A 1 (improved version)

Q. Match each combinatorial class with a construction.

E + (Z0 + Z1 ) ⇥ B = B + (Z0 ⇥ Z1 ) ⇥ B
binary strings
B = E + Z1 + (Z0 + Z1 ⇥ Z0 ) ⇥ B
binary strings with no 01
E + B ⇥ (Z0 + Z1 ) = B + B ⇥ (Z0 ⇥ Z0 ⇥ Z1 )
binary strings with no 11
E + B ⇥ (Z0 ⇥ Z1 ) = B + (Z0 ⇥ (Z0 + Z1 )) ⇥ B
binary strings with no 001
B = E + Z0 + (Z1 + Z0 ⇥ Z1 ) ⇥ B
binary strings with no 00
B = E + (Z0 + Z1 ) ⇥ B
6
AofA Analytic Combinatorics Q&A 2 (2015 exam)

with correct version of formula!

f (z) f (⇢)
[z n ] ⇠ ⇢ n ↵ 1
n
(1 − z/⇢)↵ (↵)

1 p
Lesson: Need a 1-page cheatsheet. = ⇡
2
(1) = 1
(s + 1) = s (s)

7
AofA Analytic Combinatorics Q&A 2 (improved version)
2n 1
Q. Match each expression with an approximate value.
n
1
[z n ] p 3n+1
1 − 3z

1 1 3n+1
[z n ] p ln n
1 − 3z 1 − 2z

n 1 3n ln 3
f (z) f (⇢)
[z ]
n
[z ] ⇠ ⇢ n ↵ 1
n (1 2z)(1 3z)
(1 − z/⇢)↵ (↵) 3n
1 p
n
[z ] ln p ⇡n
1 p 1 − 2z
= ⇡
2 3n
(1) = 1 1 1
[z n ] ln
(s + 1) = s (s) 1 3z 1 2z 3n ln 3
p
⇡n
8
The hard way:

n 1 n
�X n n
�� X �
[z ] = [z ] 2 z 3n z n
(1 2z)(1 3z)
n 0 n 0
X
= 2k 3n−k
0kn

X
n
=3 (2/3)k
0kn
Still not convinced?

You might also like