Geeratig Fuctios The geeratig fuctio for a sequece a 0, a,..., a,... is defied to be the power series fx a x. 0 We say that a 0, a,... is the sequece geerated by fx ad a is the coefficiet of x. Example The geeratig fuctio for the sequece a 0, a,..., a +,... is fx +x+3x + ++x +. How do we determie what fx is as a fuctio of x? That is, as somethig other tha a power series? Operatios o geeratig fuctios Let F x a 0 +a x+a x + ad Gx b 0 +b x+b x + be geeratig fuctios. There are a umber of operatios that oe ca perform. Additio F x + Gx a 0 + b 0 + a + b x + a + b x + + a + b x +. Multiplicatio F x Gx a 0 b 0 + a 0 b + a b 0 x + a 0 b + a b + a b 0 x + + a 0 b + a b + a b 0 x +. Subtractio F x Gx a 0 b 0 + a b x + a b x + + a b x +. Multiplicatio by a scalar c F x ca 0 + ca x + ca x + + ca x +. Multiplicatio by x k x k F x a 0 x k + a x k+ + a x k+ + + a x +k +. Differetiatio d dx F x a +a x+3a x + ++a + x +. Itegratio F x dx C + a 0 x + a x + + a x +. Substitutig x k for x F x k a 0 +a x k +a x k + +a x k +. Substitutig cx for x F cx a 0 + a cx + a c x + a 3 c 3 x 3 + + a c x +.
Some basic geeratig fuctios There are some basic geeratig fuctios that we will use, may of which are derived from the geeratig fuctio x.. x + x + x + x 3 +.. x + x + x + x + + x. 3. +x x x + x x 3 + + x +. 4. x + x + x 4 + x 6 +. 5. x k + x k + x k + x 3k +. 6. +x k x k + x k x 3k + + x k +. 7. ax + ax + ax + ax 3 + + ax + a x + a 3 x 3 + + a x +. 8. x What is + x + 3x + 4x 3 + + + x + d dx x k? We kow k + x + x + k x x x. + x + x + + x + x + + x + x +. Whe we expad the above, every term x x x k i the expasio where + + 3 + + k, correspods to a partitio of ito k parts.. Theorem See ex. 9.6.5 text + k The umber of partitios of a positive iteger ito k parts equals. From the above theorem it follows that the coefficiet of x i + k equals. Thus we have that k + k x. x 0 k x
Example What is the coefficiet of x i k? x Solutio: Let y x. coefficiet of y i y The the coefficiet of x i k which is + k. x k equals the Aother useful formula is the followig: The biomial formula: x + y x y 0 + 0 x y + + x i y i + + i x 0 y. The covolutio property I may examples, oe is faced with the problem of fidig the geeratig fuctio for the umber of ways oe ca choose objects from differet sets. I geeral, the geeratig fuctio for choosig elemets from disjoit sets is the product of the geeratig fuctios for choosig from each set. Example Fid the geeratig fuctio for the umber of ways of distributig balls amog three distict cotaiers. Solutio: Let a be the umber of distributig balls ito the three cotaiers. We wat to fid F x for the geeratig fuctio F x a x. For ay cotaier, the geeratig fuctio for the umber of balls put ito the cotaier is Ax + x + x + x 3 +. Thus by the covolutio property, F x Ax 3 + x + x + x 3 + 3. To see this, he term x i i Ax represets puttig i balls ito a cotaier. If say 9 ad we put 3 balls i cotaier, ball i cotaier, ad 5 balls i cotaier 3, the we ca represet this combiatio by x 3 x x 5. The total umber of combiatios where we divide 9 balls ito three cotaiers is therefore the umber of terms x i x j x k where i + j + k 9. This is just the coefficiet of x 9 i the product Ax 3 + x + x + x 3 + + x + x + x 3 + + x + x + x 3 +. 3
3 Sice + x + x + x 3 + x, we see that F x x. x 3 Example How may ways ca we write the iteger as a sum of 5 positive odd itegers. Solutio: Let a be the umber of ways of doig this. Note that a 0 if is eve. Let F x be the geeratig fuctio for a. The geeratig fuctio for the odd itegers is Ax x + x 3 + x 5 +. Sice we are pickig 5 odd umbers, the covolutio property implies that F x Ax 5 x + x 3 + x 5 + x 7 + 5 x + x + x 4 + x 6 + 5 x 5 + x + x 4 + x 6 + 5 5 x 5 x. Thus we see that a is the coefficiet of x i x 5 5. x Therefore a equals the coefficiet of x 5 i 5 + 5 5 5 + 4 5. x 5. This coefficiet equals Example Fid the geeratig fuctio for the umber of ways a to write as a sum x + x + x 3 where x,, 3,..., x, 4, 6, 8,... ad x 3 3, 6, 9. Solutio: The geeratig fuctio for x is Ax x+x +x 3 + x. The geeratig fuctio for x is Bx x + x 4 + x 6 + x + x + x 4 + x. Ad the geeratig fuctio for x x 3 is Cx x 3 + x 6 + x 9. Thus the power series for a is F x AxBxCx x x x x3 + x 6 + x 9. Example Suppose we distribute balls amog four distict boxes so that each box has at least oe ball ad o more tha 8. Fid the geeratig 4
fuctio F x for the umber of ways a of doig this. Solutio: The geeratig fuctio Ax represetig the umber of balls oe ca put ito oe particular box is give by Ax x + x + + x 8 x + x + + x 7 x x8 x. Sice there are four boxes, the geeratig fuctio F x is therefore by the covolutio property x F x Ax 4 + x + + x 8 4 x 4 8 4. x I a umber of problems, fidig the coefficiets of a give geeratig fuctio ca be problematic. Oe importat method ivolves partial fractios. Example Fid the coefficiet of x i Gx x +x. Solutio: We shall use partial fractios. We eed to fid A, B, C, D such that x + x A x + B x + C + x + D + x. The above ca be rewritte as: A x + x + B + x + C x + x + D x. Whe x, we obtai 4B ad B 4. Whe x, we obtai 4D ad D 4. Whe x 0, we obtai A + C. Whe x, we obtai 3A C. Solvig the above two equatios for A ad C, we obtai that A B C D 4. Therefore, x + x 4 x + x + + x + + x. Now give that the coefficiet of x i each of x,, x +x, ad +x + + is,,, ad, respectively, we see that the coefficiet of x i equals x +x { + + + + + 0, if is odd; + 4, if is eve. 5
Example I how may ways ca we fill a bag with fruits if: the umber of applies is eve. the umber of baaas is a multiple of 5. there ca be at most 4 orages. there ca be at most pear. For example, there are 7 ways to fill a bag with 6 fruits as illustrated below. Applies 6 4 4 0 0 Baaas 0 0 0 0 0 5 5 Orages 0 4 3 0 Pears 0 0 0 0 0 Let a be the umber of ways of fillig the bag with fruits ad let F x be the geeratig fuctio for a. The geeratig fuctio Ax for the umber of apples is Ax +x +x 4 +x 6 +, the geeratig fuctio for the umber of baaas is Bx + x 5 + x 0 + x 5 +, the geeratig fuctio for the umber of orages is Cx + x + x + x 3 + x 4, ad the geeratig fuctio for the umber of pears is Dx + x. The the geeratig fuctio F x is give by F x AxBxCxDx + x + x 4 + x 6 + + x 5 + x 0 + + x + x + x 3 + x 4 + x x x 5 x5 + x x x. 6
Therefore, the coefficiet a i F x + is x +. So there are a + ways to fill a bag with fruits. + Note I the above calculatios, we used the fact that + x + x + x 3 + x 4 x 5 x. Example The Fiboacci sequece is the sequece a 0, a, a, a 3 3, a 4 5,... where for, a a + a. Fid the geeratig fuctio for this sequece. Solutio: The geeratig fuctio for this sequece is give by F x + x + x + 3x 3 + 5x 4 +. To fid what F x is explicitly, we use the relatio a a + a. Note that for the coefficiet of x i x F x is just a, ad for, the coefficiet of x i xf x is just a. Thus F x x x F x + xf x. Solvig for F x, we obtai that F x x x. 3 Exercises. Fid the geeratig fuctio for the umber of ways to divide cets ito peies, ickels, ad dimes.. Fid the geeratig fuctio for the umber of ways to select cady bars from 6 differet kids. How may ways ca oe select 0 bars? 3. Let m be a fixed positive itegers. Let a be the umber of ways to select, with repetitio allowed, from a collectio of m distict objects. Fid the geeratig fuctio for a. 4. Fid the coefficiet of x 7 i + x + x + x 3 + 5. 5. Fid the coefficiet of x 50 i x 7 + x 8 + x 9 + 6. 6. Fid the coefficiet of x 5 i each of the followig: a x 3 x 0. b x 3 5x x 3. 7
7. I how may ways ca a perso select marbles from a large supplly of blue, red, ad yellow marbles if the selectio must iclude a eve umber of blue marbles ad a odd umber of red oes? 8. $3,000 looies are divided ito piles of 5. Amog 4 eedy studet groups, the piles are divided so that each group gets at least 50 piles, but ot more tha, 000 piles. Use geeratig fuctios to fid out the umber of ways oe ca divide the piles. 9. Fid the geeratig fuctio for a 0, a,..., a,.... 0. Fid the coefficiet of x 005 i F x x +x.. Suppose that i a coutry there are cois of deomiatios, 3, 5, ad 7. Use geeratig fuctios to fid the umber of differet ways to pay exactly $0.. Suppose we have a sequece a, 0,,,... where a 0, ad a 3a for,, 3,.... Fid the geeratig fuctio for a. 3. Use geeratig fuctios to fid how may sequeces there are that satisfy the followig coditios: i The items of the sequece are the digits 0 9. ii The legth of the sequece is 6 eg 06030. iii Repetitios are allowed. iv The sum of the items is 0 eg. 3 8