Chapter 9 Generating functions - PowerPoint PPT Presentation

About This Presentation
Title:

Chapter 9 Generating functions

Description:

x/(1-x)= x1 x2 x3 x4 ... For n, the number of 2's can be kept tracked by the power series 1 x2 x4 x6 x8 ... x(1 x)/(1-x)4 = x (12 22)x2 (12 22 32)x3 (12 22 32 42)x4 ... – PowerPoint PPT presentation

Number of Views:424
Avg rating:3.0/5.0
Slides: 39
Provided by: ncu3
Category:

less

Transcript and Presenter's Notes

Title: Chapter 9 Generating functions


1
Chapter 9 Generating functions
  • Yen-Liang Chen
  • Dept of Information Management
  • National Central University

2
9.1. Introductory examples
  • Ex 9.1.
  • 12 oranges for three children, Grace, Mary, and
    Frank.
  • Grace gets at least four, and Mary and Frank gets
    at least two, but Frank gets no more than five.
  • (x4 x5 x6 x7 x8) (x2 x3x4 x5 x6)(x2
    x3x4 x5)
  • The coefficient of x12 is the solution.

3
Ex 9.2
  • Four kinds of jelly beans, Red, Green, White,
    Black
  • In how many ways can we select 24 jelly beans so
    that we have an even number of white beans and at
    least six black ones?
  • Red (green) 1 x1 x2. x23 x24
  • White 1 x2 x4. x22 x24
  • Black x6 x7. x23 x24
  • f(x)(1 x1 x2. x23 x24)(1 x2 x4. x22
    x24)(x6 x7. x23 x24)
  • The coefficient of x24 is the solution.

4
Ex 9.3.
  • How many nonnegative integer solutions are there
    for c1c2c3c425?
  • f(x)(1 x1 x2. x24 x25)4
  • The coefficient of x25 is the solution.

5
9.2. Definition and examples calculational
techniques
  • Ex 9.4. (1x)n is the generating function for the
    sequence C(n, 0), C(n, 1),, C(n, n), 0,0,0

6
Ex 9.5
  • (1-xn1)/(1-x) is the generating function for the
    sequence 1,1,1,,1, 0, 0,0, where the first n1
    terms are 1.
  • 1/(1-x) is the generating function for the
    sequence 1,1,1,,1,.
  • 1/(1-x)2 is the generating function for the
    sequence 1,2,3,4,.
  • x/(1-x)2 is the generating function for the
    sequence 0,1,2,3,.
  • (x1)/(1-x)3 is the generating function for the
    sequence 12,22,32,42,.
  • x(x1)/(1-x)3 is the generating function for the
    sequence 02,12,22,32,42,.

7
(No Transcript)
8
Ex 9.6
  • 1/(1-ax) is the generating function for the
    sequence a0,a1,a2,a3,.
  • Let f(x)1/(1-x). Then g(x)f(x)-x2 is the
    generating function for the sequence 1,1,0, 1,
    1,,.
  • Let aii2i for i?0. Then its generating function
    is x(x1)/(1-x)3x/(1-x)22x/(1-x)3

9
Define C(n, r) for n?R
  • Since when n?Z, we have
  • So for n ?R we define
  • For example, if n is positive, we have

10
Tayors and Maclaurins Series
  • f(x)f(c) (x-c) f?(c) (x-c)2f(c)/2!
    (x-c)3f(3)(c)/3! (x-c)4f(4)(c)/4! ..
    (x-c)nf(n)(c)/n!
  • Let c0. Then we have
  • f(x)f(0) (x) f?(0) (x)2f(0)/2!
    (x)3f(3)(0)/3! (x)4f(4)(0)/4! ..
    (x)nf(n)(0)/n!

11
Ex 9.7
12
Ex 9.9
13
Ex 9.10.
  • Determine the coefficient of x15 in
    f(x)(x2x3x4)4.
  • (x2x3x4)x2(1xx2)x2/(1-x)
  • f(x)(x2/(1-x))4x8/(1-x)4
  • Hence the solution is the coefficient of x7 in
    (1-x)-4, which is C(-4, 7)(-1)7C(10, 7).

14
(No Transcript)
15
(No Transcript)
16
Ex 9.11
  • In how many ways can we select, with repetition
    allowed, r objects from n distinct objects?
  • Consider f(x)(1xx2)n
  • (1/(1-x))n1/(1-x)n
  • The coefficient of xr is C(nr-1, r)
  • The answer is the coefficient of xr in f(x).

17
Ex 9.12
  • x/(1-x) x1 x2x3x4.
  • The coefficient of xj in (x1x2x3x4.)i is the
    number of ways that we form the integer j by i
    summands.
  • The number of ways to form an integer n is the
    coefficient of xn in the following generating
    function.

18
Ex 9.14.
  • In how many ways can a police captain distribute
    24 rifle shells to four police officers, so that
    each officer gets at least three shells but not
    more than eight.
  • f(x) (x3x4 x5 x6x7x8)4
  • x12(1xx2x3x4x5)4
  • x12(1-x6)/(1-x)4
  • the answer is the coefficient of x12 in
    (1-x6)4(1-x)-4

19
Ex 9.17.
  • How many four element subsets of S1, 2,, 15
    contains no consecutive integers?
  • 1, 3, 7, 10 ? 0, 2, 4, 3, 5
  • there exists a one-to-one correspondence between
    the four-element subsets to be counted and the
    integer solutions to c1c2c3c4c514 where
    0?c1, c5 and 2?c2, c3, c4.
  • The answer is the coefficient of x14 in the
    following formula
  • f(x)(1xx2x3)(x2x3x4)3(1xx2x3)x6(1
    -x)-5

20
Ex 9.17.
  • 1, 3, 7, 10 ? 0, 1, 3, 2, 5
  • there exists a one-to-one correspondence between
    the four-element subsets to be counted and the
    integer solutions to c1c2c3c4c511 where
    0?c1, c5 and 1?c2, c3, c4.
  • The answer is the coefficient of x14 in the
    following formula
  • f(x)(1xx2x3)(xx2x3x4)3(1xx2x3)x3(
    1-x)-5

21
Ex 9.18.
  • Brianna takes an examination until she passes it.
    Suppose in each test the probability of failure
    is 0.8, and of success is 0.2.
  • Let Y denote the number of times Brianna expects
    to take the exam before she passes it.
  • Please compute E(Y) and E(Y2).

22
compute E(Y)
23
compute E(Y2).
24
the convolution of sequences
  • Ex 9.19. Let f(x)x/(1-x)201x2x23x3, where
    aii
  • g(x)x(x1)/(1-x)3012x22x232x3, where bii2
  • h(x)f(x)g(x)c0c1xc2x2c3x3
  • cka0bka1bk-1a2bk-2ak-2b2ak-1b1akb0
  • ckthe sequence c is the convolution of sequences
    a and b

25
9.3. Partition of integers
  • p(x) is the number of partitions for x.
  • For n, the number of 1s is 0 or 1 or 2 or 3.
    The power series is 1xx2x3x4.
  • For n, the number of 2s can be kept tracked by
    the power series 1x2x4x6x8.
  • For n, the number of 3s can be kept tracked by
    the power series 1x3x6x9x12.
  • f(x)(1xx2x3x4)(1x2x4x6x8x10)
    (1x3x6x9) (1x10)
  • 1/(1-x)?1/(1-x2)? 1/(1-x3) ??
    1/(1-x10)
  • At last, we have the following series for p(n) by
    the coefficient of xn

26
Ex 9.21
  • Find the number of ways an advertising agent can
    purchase n minutes if the time slots come in
    blocks of 30, 60, 120 seconds.
  • Let 30 seconds represent one time unit.
  • a2b4c2n
  • f(x) (1xx2x3x4) (1x2x4x6x8)(
    1x4x8x12)
  • 1/(1-x) ? 1/(1-x2) ? 1/(1-x4).
  • The coefficient of x2n is the answer to the
    problem.

27
Examples
  • Ex 9.22. pd(n) is the number of partitions of a
    positive integer n into distinct summands.
  • Pd(x)(1x)(1x2)(1x3)..
  • Ex 9.23. po(n) is the number of partitions of a
    positive integer n into odd summands.
  • Po(x) (1xx2x3x4) (1x3x6x9x12)(
    1x5x10x15)
  • Po(x)1/(1-x) ? 1/(1-x3) ? 1/(1-x5) ? 1/(1-x7) ?
    ...
  • Pd(x) Po(x)

28
Ex 9.24.
  • poo(n) is the number of partitions of a positive
    integer n into odd summands and such summands
    must occur an odd number of times.
  • Poo(x) (1xx3x5x7) (1x3x9x15)(
    1x5x15x25)

29
9.4. The exponential generating function
30
Ex 9.26
  • In how many ways can four of the letters in
    ENGINE be arranged?
  • f(x)1x(x2/2!)21x2, and the answer is the
    coefficient of x4/4!.

31
important series
32
Ex 9.28.
  • We have 48 flags, 12 each of the colors red,
    white, blue and black. Twelve flags are placed on
    a vertical pole to show signal.
  • How many of these use an even number of blue
    flags and an odd number of black flags?
  • l

33
Ex 9.28
  • how many of these use at least three white flags
    or no white flag at all?

34
(No Transcript)
35
Ex 9.29.
  • A company hires 11 new employees, and they will
    be assigned to four different departments, A, B,
    C, D. Each department has at least one new
    employee. In how many ways can these assignments
    be done?

36
9.5. The summation operator
  • Let f(x)a0a1xa2x2a3x3. Then f(x)/(1-x)
    generate the sequence of a0, a0a1, a0a1a2,
    a0a1a2a3, So we refer to 1/(1-x) as the
    summation operator.

37
Ex 9.30.
  • 1/(1-x) is the generating function for the
    sequence 1, 1, 1, 1, 1,
  • 1/(1-x)? 1/(1-x) is the generating function
    for the sequence 1,2,3,4,5,
  • xx2 is the generating function for the sequence
    0, 1, 1, 0, 0, 0,
  • (xx2) /(1-x) is the generating function for the
    sequence 0, 1, 2, 2, 2, 2,
  • (xx2) /(1-x)2 is the generating function for the
    sequence 0, 1, 3, 5, 7, 9, 11,
  • (xx2) /(1-x)3 is the generating function for the
    sequence 0, 1, 4, 9, 16, 25, 36,

38
Ex 9.31.
  • g(x) 1/(1-x)1xx2x3x4
  • q(x)dg(x)/dx1/(1-x)212x3x24x3.
  • r(x)xq(x)x/(1-x)2 x2x23x34x4.
  • xdr(x)/dx(1x)/(1-x)3 x22x232x342x4.
  • x(1x)/(1-x)4 x(1222)x2(122232)x3(122232
    42)x4.
Write a Comment
User Comments (0)
About PowerShow.com