Binomial Generating Functions
-
Upload
osama-hassan -
Category
Documents
-
view
228 -
download
1
Transcript of Binomial Generating Functions
-
7/28/2019 Binomial Generating Functions
1/63
Binomial Coefficients and Generating FunctionsITT9130 Konkreetne Matemaatika
Chapter Five
Basic Identities
Basic Practice
Tricks of the Trade
Generating Functions
Hypergeometric Functions
Hypergeometric Transformations
Partial Hypergeometric Sums
-
7/28/2019 Binomial Generating Functions
2/63
Contents
1 Binomial coefficients
2 Generating FunctionsOperations on Generating FunctionsBuilding Generating Functions that Count
Identities in Pascals Triangle
-
7/28/2019 Binomial Generating Functions
3/63
Next section
1 Binomial coefficients
2 Generating FunctionsOperations on Generating FunctionsBuilding Generating Functions that Count
Identities in Pascals Triangle
-
7/28/2019 Binomial Generating Functions
4/63
Binomial theorem
Theorem 1
(a+b)n =n
k=0
n
k
akbnk,
for any integer n 0.Proof. Expanding (a + b)n = (a + b)(a + b) (a + b) yields the sum of the
2n products of the form e1e2 en, where each ei is a or b. Theseterms are composed by selecting from each factor (a + b) either a orb. For example, if we select a k times, then we must choose b n ktimes. So, we can rearrange the sum as
(a + b)n =n
k=0
Ckakbnk,
where the coefficient Ck is the number how many possibilities are toselect k elements (k factors (a + b)) from a set of n elements (fromthe production of n factors (a + b)(a + b) (a + b)).That is why the coefficient C
kis called "(from) n choose k" and
denoted byn
k
. Q.E.D.
-
7/28/2019 Binomial Generating Functions
5/63
Binomial coefficients and combinations
Theorem 2
The number of k-subsets of an n-set isn
k
=
n!
k!(n k)!
Proof. At first, determine the number of k-element sequences: there are nchoices for the first element of the sequence; for each, there are n 1choices for the second; and so on, until there are n k+ 1 choicesfor the k-th. This gives n(n 1)...(n k+ 1) = nk choices in all. Andsince each k-element subset has exactly k! different orderings, thisnumber of sequences counts each subset exactly k! times. To getour answer, divide by k!:
n
k
=
nk
k!=
n!
k!(n k)!
Q.E.D.
Some other notations used for the "n choose k" in literature:
Cnk, C(n, k), nCk,
n
Ck.
-
7/28/2019 Binomial Generating Functions
6/63
Binomial coefficients and combinations
Theorem 2
The number of k-subsets of an n-set isn
k
=
n!
k!(n k)!
Proof. At first, determine the number of k-element sequences: there are nchoices for the first element of the sequence; for each, there are n 1choices for the second; and so on, until there are n k+ 1 choicesfor the k-th. This gives n(n 1)...(n k+ 1) = nk choices in all. Andsince each k-element subset has exactly k! different orderings, thisnumber of sequences counts each subset exactly k! times. To getour answer, divide by k!:
n
k
=
nk
k!=
n!
k!(n k)!
Q.E.D.
Some other notations used for the "n choose k" in literature:
Cnk, C(n, k), nCk,
n
Ck.
-
7/28/2019 Binomial Generating Functions
7/63
Properties of Binomial Coefficients
1 nk=0
nk
= 2n (number of all subsets ofn-set);
2 nk=0(1)
k
nk
= 0 (number of subsets with odd cardinality is
equel to the number of sets with even cardinality).
Testus. Take a = b= 1 in the binomial theorem:
n
k=0
n
k
=
n
k=0
n
k
1k1nk = (1 + 1)n = 2n
Take a = 1 ja b= 1:
n
k=0
(1)kn
k
=
n
k=0
n
k
(1)k1nk = (1 + 1)n = 0
Q.E.D.
-
7/28/2019 Binomial Generating Functions
8/63
Another Property
3 nk = nnk ;Proof. Direct conclusion from the Theorem 2:
n
k =n!
k!(nk)!=
n
nkQ.E.D.
-
7/28/2019 Binomial Generating Functions
9/63
Yet Another Proerty
4 Ifn,k> 0, then
n1k1
+
n1k
=
nk
.
Proof.
Note that 1
n k+
1
k=
k+nk
k(nk)=
n
k(nk).
Multiplying this by (n 1)! and dividing by (k 1)!(n k 1)!, we get
(n 1)!
(k 1)!(n k)(n k 1)!+
(n 1)!
k(k 1)!(n k 1)!=
n(n 1)!
k(k 1)!(n k)(n k 1)!
This can be rewritten after some simplifying transformations as:
(n 1)!
(k 1)!(n k)!+
(n 1)!
k!(n k 1)!=
n!
k!(n k)!
Q.E.D.
-
7/28/2019 Binomial Generating Functions
10/63
Pascals Triangle
n
n0
n1
n2
n3
n4
n5
n6
0 1
1 1 12 1 2 13 1 3 3 14 1 4 6 4 15 1 5 10 10 5 1
6 1 6 15 20 15 6 1 Blaise Pascal(16231662)
-
7/28/2019 Binomial Generating Functions
11/63
Pascals Triangle
11
11
111 6
56 15
4
3
4 610 1020 15
21
2 13 1
4 15 16 1
Blaise Pascal
(16231662)
Pascal Triangle is symmetric with respect to the vertical linethrough its apex.
Every number is the sum of the two numbers immediately above it.
-
7/28/2019 Binomial Generating Functions
12/63
Pascals Triangle
11
11
111 6
56 15
4
3
4 610 1020 15
21
2 13 1
4 15 16 1
Blaise Pascal
(16231662)
Pascal Triangle is symmetric with respect to the vertical linethrough its apex.
Every number is the sum of the two numbers immediately above it.
-
7/28/2019 Binomial Generating Functions
13/63
Next section
1 Binomial coefficients
2 Generating FunctionsOperations on Generating FunctionsBuilding Generating Functions that Count
Identities in Pascals Triangle
-
7/28/2019 Binomial Generating Functions
14/63
Generating Functions
DefinitionThe generating function for the infinite sequence g0,g1,g2, . . . isthe power series
G(x) = g0 +g1x+g2x2 +g3x
3 + =
n=0gnx
n
Ssome simple examples
0, 0, 0, 0, . . . 0 + 0x+ 0x2 + 0x3 + = 0
1, 0, 0, 0, . . . 1 + 0x+ 0x2 + 0x3 + = 1
2, 3, 1, 0, . . . 2 + 3x+ 1x2 + 0x3 + = 2 + 3x+ 1x2
-
7/28/2019 Binomial Generating Functions
15/63
More examples (1)
1, 1, 1, 1, . . . 1 +x+x2 +x3 + = 11x
S = 1 + x+ x2 + x3 +
xS = x+x2 +x3 +
Subtract the equations:
(1 x)S= 1 ehk S=1
1 x
NB! This formula converges only for 1 < x< 1.
Actually, we dont worry about convergence issues.
-
7/28/2019 Binomial Generating Functions
16/63
More examples (1)
1, 1, 1, 1, . . . 1 +x+x2 +x3 + = 11x
S = 1 + x+ x2 + x3 +
xS = x+x2 +x3 +
Subtract the equations:
(1 x)S= 1 ehk S=1
1 x
NB! This formula converges only for 1 < x< 1.
Actually, we dont worry about convergence issues.
-
7/28/2019 Binomial Generating Functions
17/63
More examples (2)
a,ab,ab2,ab3, . . . a+abx+ab2x2 +ab3x3 + = a1bx
Like in the previous example:
S = a+abx+ab2x2 +ab3x3 +
bxS = abx+ab2x2 +ab3x3 +
Subtract and get:
(1 bx)S= a ehk S= a1 bx
-
7/28/2019 Binomial Generating Functions
18/63
More examples (3)
Taking in the last example a = 0, 5 and b= 1 yields
0, 5 + 0, 5x+ 0, 5x2 + 0, 5x3 + =0, 5
1 x(1)
Taking a = 0, 5 and b= 1, gives
0, 5 0, 5x+ 0, 5x2 0, 5x3 + =0, 5
1 + x(2)
Adding equations (1) and (2), we get the generating function of the
sequence 1, 0, 1, 0, 1, 0, . . .:
1 +x2 +x4 +x6 + =0, 5
1 x+
0, 5
1 +x=
1
(1 x)(1 +x)=
1
1 x2
-
7/28/2019 Binomial Generating Functions
19/63
More examples (3)
Taking in the last example a = 0, 5 and b= 1 yields
0, 5 + 0, 5x+ 0, 5x2 + 0, 5x3 + =0, 5
1 x(1)
Taking a = 0, 5 and b= 1, gives
0, 5 0, 5x+ 0, 5x2 0, 5x3 + =0, 5
1 + x(2)
Adding equations (1) and (2), we get the generating function of the
sequence 1, 0, 1, 0, 1, 0, . . .:
1 +x2 +x4 +x6 + =0, 5
1 x+
0, 5
1 +x=
1
(1 x)(1 +x)=
1
1 x2
-
7/28/2019 Binomial Generating Functions
20/63
More examples (3)
Taking in the last example a = 0, 5 and b= 1 yields
0, 5 + 0, 5x+ 0, 5x2 + 0, 5x3 + =0, 5
1 x(1)
Taking a = 0, 5 and b= 1, gives
0, 5 0, 5x+ 0, 5x2 0, 5x3 + =0, 5
1 + x(2)
Adding equations (1) and (2), we get the generating function of the
sequence 1, 0, 1, 0, 1, 0, . . .:
1 +x2 +x4 +x6 + =0, 5
1 x+
0, 5
1 +x=
1
(1 x)(1 +x)=
1
1 x2
-
7/28/2019 Binomial Generating Functions
21/63
Next subsection
1 Binomial coefficients
2 Generating FunctionsOperations on Generating FunctionsBuilding Generating Functions that Count
Identities in Pascals Triangle
-
7/28/2019 Binomial Generating Functions
22/63
Operations on Generating Functions
1. Scaling
Iff0, f1, f2, . . . F(x),
then
cf0,cf1,cf2, . . . cF(x),for any c R.
Proof.
cf0,cf1,cf2, . . . cf0 + cf1x+ cf2x2
+ == c(f0 + f1x+ f2x
2 + ) =
= cF(x)
Q.E.D.
-
7/28/2019 Binomial Generating Functions
23/63
Operations on Generating Functions (2)
2. AdditionIf f0, f1, f2, . . . F(x) and g0,g1,g2, . . . G(x), then
f0 +g0, f1 +g1, f2 +g2, . . . F(x) +G(x).
Proof.
f0 +g0, f1 +g1, f2 +g2, . . .
n=0
(fn +gn)xn =
= n=0
fnxn+
n=0
gnxn =
= F(x) +G(x)
Q.E.D.
-
7/28/2019 Binomial Generating Functions
24/63
O G F ( )
-
7/28/2019 Binomial Generating Functions
25/63
Operations on Generating Functions (4)
4. Differentiation
If f0, f1, f2, . . . F(x), then
f1, 2f2, 3f3, . . . F(x).
Proof.
f1, 2f2, 3f3, . . . f1 + 2f2x+ 3f3x2 + . . . =
=
d
dx(f0
+f1x
+f2x
2
+f3x
3
+ ) =
=d
dxF(x)
Q.E.D.
O i G i F i (4)
-
7/28/2019 Binomial Generating Functions
26/63
Operations on Generating Functions (4)
4. Differentiation
If f0, f1, f2, . . . F(x), then
f1, 2f2, 3f3, . . . F(x).
Example
1, 1, 1, . . . 11x
1, 2, 3, . . . ddx
1
1x =1
(1x)2
O i G i F i (5)
-
7/28/2019 Binomial Generating Functions
27/63
Operations on Generating Functions (5)
5. IntegrationIf f0, f1, f2, . . . F(x), then
0, f0,1
2f1,
1
3f2,
1
4f3, . . .
x0
F(z)dz.
Proof.
0, f0,1
2f1,
1
3f2,
1
4f3, . . . f0x+
1
2f1x
2 +1
3f2x
3 +1
4f3x
4 + . . . =
= x0
(f0 + f1z+ f2z2 + f3z3 + )dz=
=
x0
F(z)dz
Q.E.D.
O ti G ti F ti (5)
-
7/28/2019 Binomial Generating Functions
28/63
Operations on Generating Functions (5)
5. Integration
If f0, f1, f2, . . . F(x), then
0,f0
,
1
2f1
,
1
3f2
,
1
4f3
, . . . x
0
F(z
)dz
.
Example
1, 1, 1, 1 . . . 1
1x
0, 1, 12
, 13
, . . . x0
1
1zdz= ln(1 x) = ln1
(1x)
O ti G ti F ti (6)
-
7/28/2019 Binomial Generating Functions
29/63
Operations on Generating Functions (6)
6. Convolution (product)
If f0, f1, f2, . . . F(x) and g0, g1, g2, . . . G(x), then
h0, h1, h2, . . . F(x) G(x),
where hn = f0gn + f1gn1 + f2gn2 + + fng0.
O e ations on Gene atin F nctions (6)
-
7/28/2019 Binomial Generating Functions
30/63
Operations on Generating Functions (6)
6. Convolution (product)
If f0, f1, f2, . . . F(x) and g0, g1, g2, . . . G(x), then
h0, h1, h2, . . . F(x) G(x),
where hn = f0gn + f1gn1 + f2gn2 + + fng0.
Proof.
F(x) G(x) = (f0 + f1x+ f2x2 + . . .)(g0 + g1x+ g2x
2 + . . .)
= f0g0 + (f0g1 + f1g0)x+ (f0g2 + f1g1 + f2g0)x2 + . . .
Q.E.D.
Operations on Generating Functions (6)
-
7/28/2019 Binomial Generating Functions
31/63
Operations on Generating Functions (6)
6. Convolution (product)
If f0, f1, f2, . . . F(x) and g0, g1, g2, . . . G(x), then
h0, h1, h2, . . . F(x) G(x),
where hn = f0gn + f1gn1 + f2gn2 + + fng0.
Proof.
F(x) G(x) = (f0 + f1x+ f2x2 + . . .)(g0 + g1x+ g2x
2 + . . .)
= f0g0 + (f0g1 + f1g0)x+ (f0g2 + f1g1 + f2g0)x2 + . . .
Q.E.D.Notice that all terms involving the same power of xlie on a /sloped diagonal:
g0x0 g1x
1 g2x2 g3x
3 . . .a0x
0 f0g0x0 f0g1x
1 f0g2x2 f0g3x
3 . . .f1x
1 f1g0x1 f1g1x
2 f1g2x3 . . .
f2x2 f2g0x
2 f2x3 . . .
f3x3 f3g0x
3 . . .... . . .
Operations on Generating Functions (6)
-
7/28/2019 Binomial Generating Functions
32/63
Operations on Generating Functions (6)
6. Convolution (product)
If f0, f1, f2, . . . F(x) and g0, g1, g2, . . . G(x), then
h0, h1, h2, . . . F(x) G(x),
where hn = f0gn + f1gn1 + f2gn2 + + fng0.
Example
1, 1, 1, 1 . . . 0, 1,1
2,
1
3, . . . =
= 10, 10 + 11, 10 + 11 + 11
2
, 10 + 11 + 11
2
+ 11
3
,
= 0, 1, 1 +1
2, 1 +
1
2+
1
3,
= 0, H1, H2, H3,
Hence
k0 Hkxk
=
1
(1 x) ln
1
(1 x) .
Operations on Generating Functions (7)
-
7/28/2019 Binomial Generating Functions
33/63
Operations on Generating Functions (7)
Example
1, 1, 1, 1, . . . 1
1 x
1, 2, 3, 4, . . . ddx
11 x
= 1(1 x)2
0, 1, 2, 3, . . . x1
(1 x)2=
x
(1 x)2
1, 4, 9, 16, . . . ddx
x(1 x)2 = 1 +
x(1 x)3
0, 1, 4, 9, . . . x1 + x
(1 x)3=
x(1 +x)
(1 x)3
Counting with Generating Functions
-
7/28/2019 Binomial Generating Functions
34/63
Counting with Generating Functions
Choosing k-subset from n-set
Binomial theorem yields:n0
,
n
1
,
n
2
, . . . ,
n
n
, 0, 0, 0, . . .
n0+n1x+n2x2 . . . ,nnxn = (1 + x)n
Thus, the coefficient ofxk
in (1 + x)n
is the number of ways tochoose k distinct items from a set of size n.
For example, the coefficient of x2 is , the number of ways to choose2 items from a set with n elements.
Similarly, the coefficient of xn+1 is the number of ways to choosen+ 1 items from a n-set, which is zero.
Counting with Generating Functions
-
7/28/2019 Binomial Generating Functions
35/63
Counting with Generating Functions
Choosing k-subset from n-set
Binomial theorem yields:n0
,
n
1
,
n
2
, . . . ,
n
n
, 0, 0, 0, . . .
n0+n1x+n2x2 . . . ,nnxn = (1 + x)n
Thus, the coefficient ofxk
in (1 + x)n
is the number of ways tochoose k distinct items from a set of size n.
For example, the coefficient of x2 is , the number of ways to choose2 items from a set with n elements.
Similarly, the coefficient of xn+1 is the number of ways to choosen+ 1 items from a n-set, which is zero.
Next subsection
-
7/28/2019 Binomial Generating Functions
36/63
Next subsection
1 Binomial coefficients
2 Generating FunctionsOperations on Generating FunctionsBuilding Generating Functions that Count
Identities in Pascals Triangle
Building Generating Functions that Count
-
7/28/2019 Binomial Generating Functions
37/63
Building Generating Functions that Count
The generating function for the number of ways to choose n elements from thisset A is the function A(x) thats expansion into power series has coefficient
ai = 1 of xi iff i can be selected into the subset, otherwise ai = 0
.
Examples of GF selecting items from a set A:
If any natural number can be selected:
A(x) = 1 + x+ x2
+ x3
+ =
1
1 x
Building Generating Functions that Count
-
7/28/2019 Binomial Generating Functions
38/63
Building Generating Functions that Count
The generating function for the number of ways to choose n elements from thisset A is the function A(x) thats expansion into power series has coefficient
ai = 1 of xi iff i can be selected into the subset, otherwise ai = 0
.
Examples of GF selecting items from a set A:
If any natural number can be selected:
A(x) = 1 + x+ x2 + x3 + =1
1 x
If any even number can be selected:
A(x) = 1 + x2 + x4 + x6 + =1
1 x2
Building Generating Functions that Count
-
7/28/2019 Binomial Generating Functions
39/63
u g G g u C u
The generating function for the number of ways to choose n elements from thisset A is the function A(x) thats expansion into power series has coefficientai = 1 of x
i iff i can be selected into the subset, otherwise ai = 0
.
Examples of GF selecting items from a set A:
If any natural number can be selected:
A(x) = 1 + x+ x2 + x3 + =1
1 x
If any even number can be selected:
A(x) = 1 + x2 + x4 + x6 + =1
1 x2
If any positive even number can be selected:
A(x) = x2
+ x4
+ x6
+ =x
1 x2
Building Generating Functions that Count
-
7/28/2019 Binomial Generating Functions
40/63
g g
The generating function for the number of ways to choose n elements from thisset A is the function A(x) thats expansion into power series has coefficient
ai = 1 of xi iff i can be selected into the subset, otherwise ai = 0
.
Examples of GF selecting items from a set A:
If any natural number can be selected:
A(x) = 1 + x+ x2 + x3 + =1
1 x
If any number multiple of 5 can be selected:
A(x) = 1 + x5 + x10 + x15 + =1
1 x5
Building Generating Functions that Count
-
7/28/2019 Binomial Generating Functions
41/63
g g
The generating function for the number of ways to choose n elements from thisset A is the function A(x) thats expansion into power series has coefficientai = 1 of x
i iff i can be selected into the subset, otherwise ai = 0
.
Examples of GF selecting items from a set A:
If any natural number can be selected:
A(x) = 1 + x+ x2 + x3 + =1
1 x
If at most four can be selected:
A(x) = 1 + x+ x2 + x3 + x4 =1 x5
1 x
If zero or one number can be selected:
A(x) = 1 + x
Counting elements of two sets
-
7/28/2019 Binomial Generating Functions
42/63
g
Convolution Rule
Let A(x) be the generating function for selecting items from set A, andlet B(x), be the generating function for selecting items from set B.
IfA and B are disjoint, then the generating function for selecting items from
the union AB is the product A(x) B(x).
Proof. To count the number of ways to select n items from AB we have to select jitems from A and n j items from B, where j {0, 1, 2, . . . ,n}.Summing over all the possible values of j gives a total of
a0bn + a1bn1 + a2bn2 + + anb0
ways to select n items from AB. This is precisely the coefficient of xn in the seriesfor A(x) B(x) Q.E.D.
How many positive integer solutions does the equationx + x n have?
-
7/28/2019 Binomial Generating Functions
43/63
x1+ x2 = n have?
We accept any natural number can be solution for x1, i.e generating function for
selection a value for this variable is A(x) = 1 + x+ x2
+ x3
+ =
1
1x;same for variable x2;all pairs of numbers for (x1, x2) are selected by the function H(x) = A(x) A(x);numer of solutions is the coefficient of xn.
H(x) = (1 + x+ x2 + x3 + )(1 + x+ x2 + x3 + ) =
= 1 (1 + x+ x2 + x3 + ) + x(1 + x+ x2 + x3 + ) +
+x2(1 + x+ x2 + x3 + ) + x3(1 + x+ x2 + x3 + ) + =
= 1 + 2x+ 3x2 + 4x3 + + (n + 1)xn + =1
(1 x)2
Indeed, this equation has n + 1 solutions:
0 + n = n
1 + (n 1) = n
2 + (n 2) = n
n + 0 = n
How many positive integer solutions does the equationx + x n have?
-
7/28/2019 Binomial Generating Functions
44/63
x1+ x2 = n have?
We accept any natural number can be solution for x1, i.e generating function for
selection a value for this variable is A(x) = 1 + x+ x2
+ x3
+ =
1
1x;same for variable x2;all pairs of numbers for (x1, x2) are selected by the function H(x) = A(x) A(x);numer of solutions is the coefficient of xn.
H(x) = (1 + x+ x2 + x3 + )(1 + x+ x2 + x3 + ) =
= 1 (1 + x+ x2 + x3 + ) + x(1 + x+ x2 + x3 + ) +
+x2(1 + x+ x2 + x3 + ) + x3(1 + x+ x2 + x3 + ) + =
= 1 + 2x+ 3x2 + 4x3 + + (n + 1)xn + =1
(1 x)2
Indeed, this equation has n + 1 solutions:
0 + n = n
1 + (n 1) = n
2 + (n 2) = n
n + 0 = n
How many positive integer solutions does the equationx1+ x2 = n have?
-
7/28/2019 Binomial Generating Functions
45/63
x1+ x2 = n have?
We accept any natural number can be solution for x1, i.e generating function for
selection a value for this variable isA
(x
) = 1 +x
+x2
+x3
+ =
1
1x;same for variable x2;all pairs of numbers for (x1, x2) are selected by the function H(x) = A(x) A(x);numer of solutions is the coefficient of xn.
H(x) = (1 + x+ x2 + x3 + )(1 + x+ x2 + x3 + ) =
= 1 (1 + x+ x2 + x3 + ) + x(1 + x+ x2 + x3 + ) +
+x2(1 + x+ x2 + x3 + ) + x3(1 + x+ x2 + x3 + ) + =
= 1 + 2x+ 3x2 + 4x3 + + (n + 1)xn + =1
(1 x)2
Indeed, this equation has n + 1 solutions:
0 + n = n
1 + (n 1) = n
2 + (n 2) = n
n + 0 = n
Number of solutions of the equation x1+x2+ + xk= n
-
7/28/2019 Binomial Generating Functions
46/63
Theorem
The number of ways to distribute n identical objectsinto k bins is
n+k1
n
.
Proof.
The number of ways to distribute n objects equals to the number of solutions of
x1 + x2 + + xk = n that is coefficient of xn of the generating function
G(x) = 1/(1 x)k = (1 x)k.
For recollection: Maclaurin series (a Taylor seriesexpansion of a function about 0):
f(x) = f(0) + f(0)x+f(0)
2!x2 +
f(0)
3!x3 + +
f(n)(0)
n!xn +
.
Number of solutions of the equation x1+x2+ + xk= n
-
7/28/2019 Binomial Generating Functions
47/63
Theorem
The number of ways to distribute n identical objectsinto k bins is
n+k1
n
.
Proof.
The number of ways to distribute n objects equals to the number of solutions of
x1 + x2 + + xk = n that is coefficient of xn of the generating function
G(x) = 1/(1 x)k = (1 x)k.
For recollection: Maclaurin series (a Taylor seriesexpansion of a function about 0):
f(x) = f(0) + f(0)x+f(0)
2!x2 +
f(0)
3!x3 + +
f(n)(0)
n!xn +
.
Equation x1+x2+ +xk= n (2)
-
7/28/2019 Binomial Generating Functions
48/63
Continuation of the proof ...
lets differentiate G(x) = (1 x)k:
G(x) = k(1 x)(k+1)
G(x) = k(k+ 1)(1 x)(k+2)
G(x) = k(k+ 1)(k+ 2)(1 x)(k+3)
G(n)(x) = k(k+ 1) (k+ n 1)(1 x)(k+n)
Coefficient of xn can be evaluated as:
G(n)(0)
n!=
k(k+ 1) (k+ n 1)
n!=
= (k+ n 1)!(k 1)!n!
=
=
n + k 1
n
Q.E.D.
Distribute n objects into k bins so that there is at least oneobject in each bin
-
7/28/2019 Binomial Generating Functions
49/63
object in each bin
Theorem
The number of positive solutions of the equationx1 +x2 + + xk = n is
n1k1
.
Idea of the proof. Possible number of objects in a single bin (xi > 0)could be generated by the function
C(x) = x+ x2 +x3 + = x(1 + x+ x2 + ) =x
1 x
Similarly to the previous theorem, the number distributions is thecoefficient ofxn of the generating function
H(X) = Ck(x) =xk
(1 x)k
Q.E.D.
Example: 100 Euro
-
7/28/2019 Binomial Generating Functions
50/63
How many ways 100 Euro can be changed using smaller banknotes?
Generating functions for selecting banknotes of 5, 10, 20 or 50 Euros:
A(x) = x0 + x5 + x10 + x15 + =1
1 x5
B(x) = x0 + x10 + x20 + x30 + = 11 x10
C(x) = x0 + x20 + x40 + x60 + =1
1 x20
D(x) = x0 + x50 + x100 + x150 + =1
1 x50
Generating function for the task
P(x) = A(x)B(x)C(x)D(x) =1
(1 x5)(1 x10)(1 x20)(1 x50)
Example: 100 Euro
-
7/28/2019 Binomial Generating Functions
51/63
How many ways 100 Euro can be changed using smaller banknotes?
Generating functions for selecting banknotes of 5, 10, 20 or 50 Euros:
A(x) = x0 + x5 + x10 + x15 + =1
1 x5
B(x) = x0 + x10 + x20 + x30 + = 11 x10
C(x) = x0 + x20 + x40 + x60 + =1
1 x20
D(x) = x0 + x50 + x100 + x150 + =1
1 x50
Generating function for the task
P(x) = A(x)B(x)C(x)D(x) =1
(1 x5)(1 x10)(1 x20)(1 x50)
Example: 100 Euro
-
7/28/2019 Binomial Generating Functions
52/63
How many ways 100 Euro can be changed using smaller banknotes?
Generating functions for selecting banknotes of 5, 10, 20 or 50 Euros:
A(x) = x0 + x5 + x10 + x15 + =1
1 x5
B(x) = x0 + x10 + x20 + x30 + = 11 x10
C(x) = x0 + x20 + x40 + x60 + =1
1 x20
D(x) = x0 + x50 + x100 + x150 + =1
1 x50
Generating function for the task
P(x) = A(x)B(x)C(x)D(x) =1
(1 x5)(1 x10)(1 x20)(1 x50)
Example: 100 Euro (2)
-
7/28/2019 Binomial Generating Functions
53/63
1. Observation:
(1 x5)(1 + x5 + + x45 + 2x50 + 2x55 + + 2x95 + 3x100 + 3x105 + + 3x145 + 4x150 + ) =
1 + x5 + + x45 + 2x50 + 2x55 + + 2x95 + 3x100 + 3x105 + + 3x145 + 4x150
x5
x45
x50
2x55
2x95
2x100
3x105
3x145
3x150
4x155
=
= 1 + x50 + x100 + x150 + x200 + =1
1 x50
Thus:
F(x) = A(x)D(x) =1
(1 x5)(1 x50) = k0 k
10+ 1x5k = k0 fkx5k
Example: 100 Euro (2)
-
7/28/2019 Binomial Generating Functions
54/63
1. Observation:
(1 x5)(1 + x5 + + x45 + 2x50 + 2x55 + + 2x95 + 3x100 + 3x105 + + 3x145 + 4x150 + ) =
1 + x5 + + x45 + 2x50 + 2x55 + + 2x95 + 3x100 + 3x105 + + 3x145 + 4x150
x5 x45 x50 2x55 2x95 2x100 3x105 3x145 3x150 4x155 =
= 1 + x50 + x100 + x150 + x200 + =1
1 x50
Thus:
F(x) = A(x)D(x) =1
(1 x5)(1 x50)=
k0
k
10
+ 1
x5k =
k0
fkx5k
2. Similarly:
G(x) = B(x)C(x) =1
(1 x10)(1 x20)=
k0
k
2
+ 1
x10k =
k0
gkx10k
Example: 100 Euro (3)
-
7/28/2019 Binomial Generating Functions
55/63
Convolution:P(x) = F(x)G(x) =
k0
cnx5n
The coefficient of x100 equals to
c20 = f0g10 + f2g9 + f4g8 + + f20g0
=10
k=0
f2kg10k
=10
k=0
2k
10
+ 1
10 k
2
+ 1
=
10
k=0
k+ 55
12 k2
= 1(6 + 5 + 5 + 4 + 4) + 2(3 + 3 + 2 + 2 + 1) + 3 1 =
= 24 + 22 + 3 = 49
Next subsection
-
7/28/2019 Binomial Generating Functions
56/63
1 Binomial coefficients
2 Generating FunctionsOperations on Generating FunctionsBuilding Generating Functions that CountIdentities in Pascals Triangle
Vandermondes identity
-
7/28/2019 Binomial Generating Functions
57/63
Binomial theorem provides the generating function:
(1 + x)m = k0
m
k
xk and (1 + x)n =
k0
n
k
xk
Convolution yields
k0
m + n
k
xk = (1 + x)m+n
= (1 + x)m (1 + x)n
=
k0
mk
xk
k0
nk
xk
= k0
k
j=0
m
j
n
kj
xk
Vandermondes identity (2)
-
7/28/2019 Binomial Generating Functions
58/63
Equating coefficients of zk on both sides of this equation gives:
Vandermondes convolution:
k
j=0
m
j
n
kj
=
m + n
k
Convolution yields
1
1
1
1
1
1
1
1
1
1 9
8
7
6
5
4
3
2
1
1
3
6
10
15
21
28
36 84
56
35
20
10
4
1
1
5
15
35
70
126 126
56
21
6
1
1
7
28
84 36
8
1
1
9 1
9
2
=
3
0
6
2
+
3
1
6
1
+
3
2
6
0
Vandermondes identity (2)
-
7/28/2019 Binomial Generating Functions
59/63
Equating coefficients of zk on both sides of this equation gives:
Vandermondes convolution:
k
j=0
m
j
n
kj
=
m + n
k
Convolution yields
1
1
1
1
1
1
1
1
1
1 9
8
7
6
5
4
3
2
1
1
3
6
10
15
21
28
36 84
56
35
20
10
4
1
1
5
15
35
70
126 126
56
21
6
1
1
7
28
84 36
8
1
1
9 1
9
2
=
3
0
6
2
+
3
1
6
1
+
3
2
6
0
Vandermondes identity (3)
-
7/28/2019 Binomial Generating Functions
60/63
Special case m = n = k yields:
2n
n
=
n
j=0
n
j
n
n j
=
j0
n
j
2
Example: 402
+412
+ 422
+432
+ 442
= 841
1
1
1
11
1
1
1 8
7
6
54
3
2
1
1
3
610
15
21
28 56
35
20
104
1
15
15
35
70 56
21
6
1
1
7
28 8
1
1
1
1
1
1
1 16
9
4
1
1
9
36 16
1
1
1 + 16 + 36 + 16 + 1 = 70
Vandermondes identity (3)
-
7/28/2019 Binomial Generating Functions
61/63
Special case m = n = k yields:
2n
n
=
n
j=0
n
j
n
n j
=
j0
n
j
2
Example: 402
+412
+ 422
+432
+ 442
= 841
1
1
1
11
1
1
1 8
7
6
54
3
2
1
1
3
610
15
21
28 56
35
20
104
1
15
15
35
70 56
21
6
1
1
7
28 8
1
1
1
1
1
1
1 16
9
4
1
1
9
36 16
1
1
1 + 16 + 36 + 16 + 1 = 70
Sequence
m0
, 0,
m1
, 0,m2
, 0,
m3
, 0,m4
, 0, . . . ,
-
7/28/2019 Binomial Generating Functions
62/63
Lets take sequences
m
0
,
m
1
,
m
2
, . . . ,
m
n
, . . . F(X) = (1 + x)m
and
m0, m1,m2, m3, . . . , (1)nmn, . . . G(X) = (1 x)mThen the convolution corresponds to the function (1 x)m(1 + x)m = (1 x2)m thatgives the identity of binomial coefficients:
n
j=0
m
j
m
n j
(1)j = (1)n/2
m
n/2
[n is even] .
Some other useful sequences
-
7/28/2019 Binomial Generating Functions
63/63
For any n 0:
1(1 x)n+1
= k0
n 1k
(x)k =
k0
n + kn
xk
Here the identity negative coefficients
nk
= (1)k
nk1
k
is used.
For any n 0, using right-shift :
xn
(1 x)n+1 = k0knxk
Exponential series
ex = 1 + x+1
2!x2 +
1
3!x3 + =
k0
1
k!xk
Logarithmic series
ln (1 + x) = x1
2x2 +
1
3x3 =
k1
(1)k+1
kxk
1
ln(1 + x)= x+
1
2x2 +
1
3x3 + =
k1
1
kxk