{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

MIT6_042JF10_lec12

# MIT6_042JF10_lec12 - "mcs-ftl 2010/9/8 0:40 page 355#361 12...

This preview shows pages 1–3. Sign up to view the full content.

12 “mcs-ftl” — 2010/9/8 — 0:40 — page 355 — #361 Generating Functions Generating Functions are one of the most surprising and useful inventions in Dis- crete Math. Roughly speaking, generating functions transform problems about se- quences into problems about functions . This is great because we’ve got piles of mathematical machinery for manipulating functions. Thanks to generating func- tions, we can then apply all that machinery to problems about sequences. In this way, we can use generating functions to solve all sorts of counting problems. They can also be used to find closed-form expressions for sums and to solve recurrences. In fact, many of the problems we addressed in Chapters 9 11 can be formulated and solved using generating functions. 12.1 Definitions and Examples The ordinary generating function for the sequence 1 h g 0 ; g 1 ; g 2 ; g 3 : : : i is the power series: G.x/ D g 0 C g 1 x C g 2 x 2 C g 3 x 3 C��� : There are a few other kinds of generating functions in common use, but ordinary generating functions are enough to illustrate the power of the idea, so we’ll stick to them and from now on, generating function will mean the ordinary kind. A generating function is a “formal” power series in the sense that we usually regard x as a placeholder rather than a number. Only in rare cases will we actually evaluate a generating function by letting x take a real number value, so we generally ignore the issue of convergence. Throughout this chapter, we’ll indicate the correspondence between a sequence and its generating function with a double-sided arrow as follows: h g 0 ; g 1 ; g 2 ; g 3 ; : : : i ! g 0 C g 1 x C g 2 x 2 C g 3 x 3 C��� : For example, here are some sequences and their generating functions: h 0; 0; 0; 0; : : : i ! 0 C 0x C 0x 2 C 0x 3 C���D 0 h 1; 0; 0; 0; : : : i ! 1 C 0x C 0x 2 C 0x 3 C���D 1 h 3; 2; 1; 0; : : : i ! 3 C 2x C 1x 2 C 0x 3 C���D 3 C 2x C x 2 1 In this chapter, we’ll put sequences in angle brackets to more clearly distinguish them from the many other mathematical expressions ﬂoating around.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
356 “mcs-ftl” — 2010/9/8 — 0:40 — page 356 — #362 Chapter 12 Generating Functions The pattern here is simple: the i th term in the sequence (indexing from 0) is the coefficient of x i in the generating function. Recall that the sum of an infinite geometric series is: 1 z z : 1 C z C 2 C 3 C���D 1 z This equation does not hold when j z 1 , but as remarked, we won’t worry about convergence issues for now. This formula gives closed form generating functions for a whole range of sequences. For example: 1 h 1; 1; 1; 1; : : : i ! 1 C x C x 2 C x 3 C x 4 C��� D x 1 1 h 1; 1; 1; 1; : : : i ! 1 x C x 2 x 3 C x 4 ��� D 1 C x ˝ ˛ 1 1; a; a 2 ; a 3 ; : : : ! 1 C ax C a 2 x 2 C a 3 x 3 C���D ax 1 1 h 1; 0; 1; 0; 1; 0; : : : i ! 1 C x 2 C x 4 C x 6 C x 8 C���D 1 2 x 12.2 Operations on Generating Functions The magic of generating functions is that we can carry out all sorts of manipulations on sequences by performing mathematical operations on their associated generating functions. Let’s experiment with various operations and characterize their effects
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 25

MIT6_042JF10_lec12 - "mcs-ftl 2010/9/8 0:40 page 355#361 12...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online