Download Exponential Generating Functions COS 341 Discrete Mathematics 1

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
COS 341 Discrete Mathematics
Exponential Generating
Functions
1
Trouble keeping pace ?
• Read the textbook
• Optional reference text (Rosen) has many more solved exercises
and practice problems
• Start early on homework assignments
• Come to office hours, make separate appointments
• Learn from discussions with fellow students
•
•
•
•
Tutoring:
Seniors: See Dean Richard Williams (408 West College, 8-5520)
Juniors: See Dean Frank Ordiway (404 West College, 8-1998)
Sophomores: See Director of Studies in your home college
2
Ordinary Generating Functions
(a0 , a1 , a2 ,…) : sequence of real numbers
Ordinary
Generating Function of this sequence is
∧
∞
i
the power series a( x) = ∑ i=0 ai ⋅ x
3
Exponential Generating Functions
(a0 , a1 , a2 ,…) : sequence of real numbers
Exponential Generating function of this
sequence is the power series
ai i
a ( x ) = ∑ i =0 ⋅ x
i!
∞
4
Exponential generating function
examples
What is the generating function for the sequence (1,1,1,1,…) ?
∞
1 i
x x 2 x3
x = 1+ + + +
∑
1! 2! 3!
i =0 i !
= ex
What is the generating function for the sequence (1, 2, 4,8,…) ?
∞
2i i
2 x (2 x) 2 (2 x)3
+
+
x = 1+ +
∑
1!
2!
3!
i =0 i !
= e2 x
5
Operations on exponential generating
functions
• Addition
(a0 + b0 , a1 + b1 ,…) has generating function a ( x) + b( x)
• Multiplication by fixed real number
(αa0 , αa1 ,…) has generating function αa ( x)
• Shifting the sequence to the right
(0,… 0 , a0 , a1 ,…) has generating function x n a ( x)
n×
• Shifting to the left
k −1
(ak , ak +1 ,…) has generating function
a( x) − ∑ i=0 ai ⋅ xi
xn
6
• Substituting αx for x
(a0 , αa1 , α 2 a2 …) has generating function a (αx)
• Substitute xn for x
(a0 , 0,… 0, a1 , 0,… 0, a2 …) has generating function a ( x n )
n−1×
n−1×
7
• Differentiation
d
(a1 , 2a2 ,3a3 …) has generating function
a ( x) (or a '( x))
dx
• Integration
x
(0,a0 , 12 a1 , 13 a2 …) has generating function
∫
f (t )dt
0
• Multiplication of generating functions
(
∞
∑ n=0 an ⋅ x
n
)(
∞
) (
∑ n=0 bn ⋅ x =
n
∞
n
c
⋅
x
∑ n=0 n
)
cn = ∑ k =0 ak ⋅ bn−k
n
8
Differentiation
a ( x) is the exponential generating function for (a0 , a1 , a2 ,…)
∞
ai i
a( x) = ∑ ⋅ x
i =0 i !
∞
∞
ai
ai
d
i−1
⋅ xi−1
a ( x) = ∑ ⋅ i ⋅ x = ∑
dx
i =0 i !
i =1 (i −1)!
d
a ( x) is the exponential generating function for (a1 , a2 , a3 ,…)
dx
Differentiation is equivalent to shifting the sequence to the left
9
Integration
a ( x) is the exponential generating function for (a0 , a1 , a2 ,…)
∞
ai i
a( x) = ∑ ⋅ x
i =0 i !
x
∫
x
0
x
i +1
∞
∞
a
x
ai
ai
i
i
=∑
⋅ x i+1
a (t )dt = ∑ ⋅ ∫ t dt = ∑ ⋅
i =0 i ! (i + 1)
i =0 i ! 0
i =0 (i + 1)!
∞
∫ a(t )dt
is the exponential generating function for (0, a0 , a1 , a2 ,…)
0
Integration is equivalent to shifting the sequence to the right
10
Multiplication
Ordinary
(
∞
∑ n=0 an ⋅ x
n
)(
∞
) (
∑ n=0 bn ⋅ x =
n
∞
n
c
x
⋅
∑ n=0 n
)
cn = ∑ k =0 ak ⋅ bn−k
n
Exponential
 ∞ an n 
  ∞ cn n 
∞ bn
n

∑ n=0 ⋅ x ∑ n=0 ⋅ x  = ∑ n=0 ⋅ x 

n ! 
n!  
n! 
n
cn
ak bn−k
= ∑ k =0 ⋅
n!
k ! (n − k )!
n  
n
n!

cn = ∑
ak ⋅ bn−k = ∑   ak ⋅ bn−k
 
k =0 k !( n − k )!
k =0  k 
n
11
Implications of product rule
C ( x) = A( x) B( x)
Ordinary
cn = ∑ k =0 ak ⋅ bn−k
n
Useful for counting with
indistinguishable objects
Exponential
n
cn = ∑   ak ⋅ bn−k
 
k =0  k 
n
Useful for counting with
ordered objects
12
Interpretation of Multiplication: Product Rule
Given arrangements of type A and type B, define
arrangements of type C for n labeled objects as follows:
Divide the group of n labeled objects into two groups,
the First group and the Second group;
arrange the First group by an arrangement of type A
and the Second group by an arrangement of type B.
an : number of arrangements of type A for n objects
bn : number of arrangements of type B for n objects
cn : number of arrangements of type C for n objects
13
Interpretation of Multiplication: Product Rule
an : number of arrangements of type A for n people
bn : number of arrangements of type B for n people
cn : number of arrangements of type C for n people
n
cn = ∑   ak ⋅ bn−k
 
k =0  k 
n
an : exponential generating function A( x)
bn : exponential generating function B( x)
cn : exponential generating function C ( x)
C ( x) = A( x) B( x)
14
A( x) : exponential generating function for arrangements of type A
a0 = 0 : no empty group allowed
Define arrangements of type D for n labeled objects as follows:
Divide the group of n labeled objects into k groups,
the First group, Second group,… , kth group (k = 0,1, 2,… )
arrange each group by an arrangement of type A .
D( x) : exponential generating function for arrangements of type D
15
Dk ( x) : exponential generating function for arrangements of type D
with exactly k groups
Dk ( x) = A( x) k
∞
D( x) = ∑ Dk ( x)
k =0
∞
= ∑ A( x) k
k =0
1
=
1− A( x)
16
A( x) : exponential generating function for arrangements of type A
a0 = 0 : no empty group allowed
Define arrangements of type E for n labeled objects as follows:
Divide the group of n labeled objects into k groups,
and arrange each group by an arrangement of type A
(the groups are not numbered) .
E ( x) : exponential generating function for arrangements of type E
17
Ek ( x) : exponential generating function for arrangements of type E
with exactly k groups
A( x) k
Ek ( x) =
k!
∞
E ( x) = ∑ Ek ( x)
k =0
∞
=∑
k =0
A( x) k
k!
= e A( x )
18
Example
How many ways can n people be arranged into pairs,
(the pairs are not numbered) ?
A( x) : exponential generating function for a single pair
a2 = 1, ai = 0 for i ≠ 2
x2
A( x) =
2
E ( x) : exponential generating function for arranging
n people into pairs
E ( x) = e
n/2
2

e
x
x n term = n x n =  
 2 
n!
1
(n / 2)!
x2
2
n!
en = n / 2
2 (n / 2)!
19
Derangements (or Hatcheck lady revisited)
d n : number of permutations on n objects without a fixed point
D ( x) : exponential generating function for number of derangements
A permutation on [n] can be constructed by picking
a subset K of [n], constructing a derangement of K and
fixing the elements of [n] - K .
Every permutation of [n] arises exactly once this way.
∞
n! n
1
EGF for all permutations = ∑ x =
1− x
n=0 n !
∞
1 n
x
EGF for permutations with all elements fixed = ∑ x = e
n=0 n !
1
= D( x) ⋅ e x
1− x
20
Derangements
1
= D( x) ⋅ e x
1− x
−x 1
D( x) = e
1− x
n  ∞
∞

x
n
n

∑ x 
= ∑ (−1)
 n=0
n !  n=0 
k
n

dn
(
−
1
)

= coefficient of x n = ∑
 k =0 k ! 
n!
 n (−1) k 

d n = n ! ∑
 k =0 k ! 
Different proof in Matousek 10.2, problem 17
21
Example
How many sequences of n letters can be formed from
A, B, and C such that the number of A's is odd and the
number of B's is odd ?
x
xn
e
− e−x
EGF for A's = ∑
=
2
n odd n !
e x − e−x
EGF for B's =
2
∞
xn
EGF for C's = ∑ = e x
n=0 n !
− x 2
e −e

required EGF = 

2
x
 e x =

e3 x − 2e x + e−x
4
22
Example
How many sequences of n letters can be formed from
A, B, and C such that the number of A's is odd and the
number of B's is odd ?
required EGF =
e3 x − 2e x + e−x
4
n
n

1
3
(
1)
2
−
+
−

coefficient of x n = 
n !
4

3n − 2 + (−1) n
required number =
4
23
Related documents