ebook img

Generatingfunctionology (mostly combinatorics) PDF

231 Pages·1.539 MB·English
by  Wilf.
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Generatingfunctionology (mostly combinatorics)

generatingfunctionology Herbert S. Wilf Department of Mathematics University of Pennsylvania Philadelphia, Pennsylvania Copyright 1990 and 1994 by Academic Press, Inc. All rights re- served. This Internet Edition may be reproduced for any valid educational purpose of an institution of higher learning, in which case only the reason- able costs of reproduction may be charged. Reproduction for proflt or for any commercial purposes is strictly prohibited. vi Preface This book is about generating functions and some of their uses in discrete mathematics. The subject is so vast that I have not attempted to give a comprehensive discussion. Instead I have tried only to communicate some of the main ideas. Generating functions are a bridge between discrete mathematics, on the one hand, and continuous analysis (particularly complex variable the- ory) on the other. It is possible to study them solely as tools for solving discrete problems. As such there is much that is powerful and magical in the way generating functions give unifled methods for handling such prob- lems. The reader who wished to omit the analytical parts of the subject would skip chapter 5 and portions of the earlier material. To omit those parts of the subject, however, is like listening to a stereo broadcast of, say, Beethoven’s Ninth Symphony, using only the left audio channel. The full beauty of the subject of generating functions emerges only from tuning in on both channels: the discrete and the continuous. See how they make the solution of difierence equations into child’s play. Then see how the theory of functions of a complex variable gives, virtually by inspection, the approximate size of the solution. The interplay between the two channels is vitally important for the appreciation of the music. In recent years there has been a vigorous trend in the direction of flnding bijective proofs of combinatorial theorems. That is, if we want to prove that two sets have the same cardinality then we should be able to do it by exhibiting an explicit bijection between the sets. In many cases the fact that the two sets have the same cardinality was discovered in the flrst place by generating function arguments. Also, even though bijective arguments may be known, the generating function proofs may be shorter or more elegant. The bijective proofs give one a certain satisfying feeling that one ‘re- ally’ understands why the theorem is true. The generating function argu- ments often give satisfying feelings of naturalness, and ‘oh, I could have thought of that,’ as well as usually ofiering the best route to flnding exact or approximate formulas for the numbers in question. This book was tested in a senior course in discrete mathematics at the University of Pennsylvania. My thanks go to the students in that course for helping me at least partially to debug the manuscript, and to a number of my colleagues who have made many helpful suggestions. Any reader who is kind enough to send me a correction will receive a then-current complete errata sheet and many thanks. Herbert S. Wilf Philadelphia, PA September 1, 1989 vii Preface to the Second Edition This edition contains several new areas of application, in chapter 4, many new problems and solutions, a number of improvements in the pre- sentation, and corrections. It also contains an Appendix that describes some of the features of computer algebra programs that are of particular importance in the study of generating functions. I am indebted to many people for helping to make this a better book. Bruce Sagan, in particular, made many helpful suggestions as a result of a test run in his classroom. Many readers took up my ofier (which is now repeated) to supply a current errata sheet and my thanks in return for any errors discovered. Herbert S. Wilf Philadelphia, PA May 21, 1992 viii CONTENTS Chapter 1: Introductory Ideas and Examples 1.1 An easy two term recurrence . . . . . . . . . . . . . . . . . 3 1.2 A slightly harder two term recurrence . . . . . . . . . . . . . 5 1.3 A three term recurrence . . . . . . . . . . . . . . . . . . . 8 1.4 A three term boundary value problem . . . . . . . . . . . . 10 1.5 Two independent variables . . . . . . . . . . . . . . . . . 11 1.6 Another 2-variable case . . . . . . . . . . . . . . . . . . 16 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . 24 Chapter 2: Series 2.1 Formal power series . . . . . . . . . . . . . . . . . . . . 30 2.2 The calculus of formal ordinary power series generating functions 33 2.3 The calculus of formal exponential generating functions . . . . 39 2.4 Power series, analytic theory . . . . . . . . . . . . . . . . 46 2.5 Some useful power series . . . . . . . . . . . . . . . . . . 52 2.6 Dirichlet series, formal theory . . . . . . . . . . . . . . . 56 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . 65 Chapter 3: Cards, Decks, and Hands: The Exponential Formula 3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . 73 3.2 Deflnitions and a question . . . . . . . . . . . . . . . . . 74 3.3 Examples of exponential families . . . . . . . . . . . . . . 76 3.4 The main counting theorems . . . . . . . . . . . . . . . . 78 3.5 Permutations and their cycles . . . . . . . . . . . . . . . 81 3.6 Set partitions . . . . . . . . . . . . . . . . . . . . . . . 83 3.7 A subclass of permutations . . . . . . . . . . . . . . . . . 84 3.8 Involutions, etc. . . . . . . . . . . . . . . . . . . . . . 84 3.9 2-regular graphs . . . . . . . . . . . . . . . . . . . . . 85 3.10 Counting connected graphs . . . . . . . . . . . . . . . . . 86 3.11 Counting labeled bipartite graphs . . . . . . . . . . . . . . 87 3.12 Counting labeled trees . . . . . . . . . . . . . . . . . . . 89 3.13 Exponential families and polynomials of ‘binomial type.’ . . . . 91 3.14 Unlabeled cards and hands . . . . . . . . . . . . . . . . . 92 3.15 The money changing problem . . . . . . . . . . . . . . . 96 3.16 Partitions of integers . . . . . . . . . . . . . . . . . . . 100 3.17 Rooted trees and forests . . . . . . . . . . . . . . . . . . 102 3.18 Historical notes . . . . . . . . . . . . . . . . . . . . . . 103 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . 104 vii Chapter 4: Applications of generating functions 4.1 Generating functions flnd averages, etc. . . . . . . . . . . . 108 4.2 A generatingfunctionological view of the sieve method . . . . . 110 4.3 The ‘Snake Oil’ method for easier combinatorial identities . . . 118 4.4 WZ pairs prove harder identities . . . . . . . . . . . . . . 130 4.5 Generating functions and unimodality, convexity, etc. . . . . . 136 4.6 Generating functions prove congruences . . . . . . . . . . . 140 4.7 The cycle index of the symmetric group . . . . . . . . . . . 141 4.8 How many permutations have square roots? . . . . . . . . . 146 4.9 Counting polyominoes . . . . . . . . . . . . . . . . . . . 150 4.10 Exact covering sequences . . . . . . . . . . . . . . . . . . 154 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . 157 Chapter 5: Analytic and asymptotic methods 5.1 The Lagrange Inversion Formula . . . . . . . . . . . . . . 167 5.2 Analyticity and asymptotics (I): Poles . . . . . . . . . . . . 171 5.3 Analyticity and asymptotics (II): Algebraic singularities . . . . 177 5.4 Analyticity and asymptotics (III): Hayman’s method . . . . . 181 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . 188 Appendix: Using MapleTM and MathematicaTM . . . . . . . . 192 Solutions . . . . . . . . . . . . . . . . . . . . . . . . 197 References . . . . . . . . . . . . . . . . . . . . . . . 224 viii Chapter 1 Introductory ideas and examples A generating function is a clothesline on which we hang up a sequence of numbers for display. What that means is this: suppose we have a problem whose answer is a sequence of numbers, a ;a ;a ;:::. We want to ‘know’ what the sequence 0 1 2 is. What kind of an answer might we expect? A simple formula for a would be the best that could be hoped for. If n we flnd that a = n2+3 for each n = 0;1;2;:::, then there’s no doubt that n we have ‘answered’ the question. But what if there isn’t any simple formula for the members of the unknown sequence? After all, some sequences are complicated. To take just one hair-raising example, suppose the unknown sequence is 2, 3, 5, 7, 11, 13, 17, 19, :::, where a is the nth prime number. Well then, it would n be just plain unreasonable to expect any kind of a simple formula. Generating functions add another string to your bow. Although giv- ing a simple formula for the members of the sequence may be out of the question, we might be able to give a simple formula for the sum of a power series, whose coe–cients are the sequence that we’re looking for. For instance, suppose we want the Fibonacci numbers F ;F ;F ;:::, 0 1 2 and what we know about them is that they satisfy the recurrence relation Fn+1 = Fn +Fn¡1 (n ‚ 1;F0 = 0; F1 = 1): The sequence begins with 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, ::: There are exact, not-very-complicatedformulasforF , aswewillseelater, inexample n 2 of this chapter. But, just to get across the idea of a generating function, here is how a generatingfunctionologist might answer the question: the nth Fibonacci number, F , is the coe–cient of xn in the expansion of the n function x=(1¡x¡x2) as a power series about the origin. You may concede that this is a kind of answer, but it leaves a certain unsatisfled feeling. It isn’t really an answer, you might say, because we don’t have that explicit formula. Is it a good answer? In this book we hope to convince you that answers like this one are often spectacularly good, in that they are themselves elegant, they allow you to do almost anything you’d like to do with your sequence, and gener- ating functions can be simple and easy to handle even in cases where exact formulas might be stupendously complicated. Here are some of the things that you’ll often be able to do with gener- ating function answers: (a) Find an exact formula for the members of your sequence. Not always. Not always in a pleasant way, if your sequence is 1 2 1 Introductory ideas and examples complicated. But at least you’ll have a good shot at flnding such a formula. (b) Find a recurrence formula. Most often generating functions arise from recurrence formulas. Sometimes, however, from the generating function you will flnd a new recurrence formula, not the one you started with, that gives new insights into the nature of your sequence. (c) Find averages and other statistical properties of your se- quence. Generating functions can give stunningly quick deriva- tions of various probabilistic aspects of the problem that is repre- sented by your unknown sequence. (d) Find asymptotic formulas for your sequence. Some of the deepest and most powerful applications of the theory lie here. Typically, oneisdealingwithaverydi–cult sequence, andinstead oflookingforanexactformula, whichmightbeoutofthequestion, we look for an approximate formula. While we would not expect, for example, to flnd an exact formula for the nth prime number, it is a beautiful fact (the ‘Prime Number Theorem’) that the nth prime is approximately nlogn when n is large, in a certain precise sense. In chapter 5 we will discuss asymptotic problems. (e) Prove unimodality, convexity, etc. A sequence is called uni- modal if it increases steadily at flrst, and then decreases steadily. Many combinatorial sequences are unimodal, and a variety of methodsareavailableforprovingsuchtheorems. Generatingfunc- tions can help. There are methods by which the analytic proper- ties of the generating function can be translated into conclusions about the rises and falls of the sequence of coe–cients. When the method of generating functions works, it is often the simplest method known. (f) Prove identities. Many, many identities are known, in combina- torics and elsewhere in mathematics. The identities that we refer to are those in which a certain formula is asserted to be equal to another formula for stated values of the free variable(s). For example, it is well known that (cid:181) ¶ (cid:181) ¶ Xn 2 n 2n = (n = 0;1;2;:::): j n j=0 One way to prove such identities is to consider the generating function whose coe–cients are the sequence shown on the left side of the claimed identity, and to consider the generating function formed from the sequence on the right side of the claimed identity, and to show that these are the same function. This may sound 1.1 An easy two term recurrence 3 obvious, but it is quite remarkable how much simpler and more transparent many of the derivations become when seen from the point of view of the black belt generatingfunctionologist. The ‘Snake Oil’ method that we present in section 4.3, below, explores some of these vistas. The method of rational functions, in section 4.4, is new, and does more and harder problems of this kind. (g) Other. Is there something else you would like to know about your sequence? A generating function may ofier hope. One ex- ample might be the discovery of congruence relations. Another possibility is that your generating function may bear a striking resemblance to some other known generating function, and that may lead you to the discovery that your problem is closely related toanotherone, whichyouneversuspectedbefore. Itisnoteworthy that in this way you may flnd out that the answer to your prob- lem is simply related to the answer to another problem, without knowing formulas for the answers to either one of the problems! In the rest of this chapter we are going to give a number of examples of problems that can be profltably thought about from the point of view of generating functions. We hope that after studying these examples the reader will be at least partly convinced of the power of the method, as well as of the beauty of the unifled approach. 1.1 An easy two term recurrence A certain sequence of numbers a ;a ;::: satisfles the conditions 0 1 a = 2a +1 (n ‚ 0;a = 0): (1:1:1) n+1 n 0 Find the sequence. First try computing a few members of the sequence to see what they look like. It begins with 0, 1, 3, 7, 15, 31, ::: These numbers look sus- piciously like 1 less than the powers of 2. So we could conjecture that a = 2n ¡ 1 (n ‚ 0), and prove it quickly, by induction based on the n recurrence (1.1.1). But this is a book about generating functions, so let’s forget all of that, pretend we didn’t spot the formula, and use the generating function method. Hence, insteadPof flnding the sequence fang, let’s flnd the gener- ating function A(x) = a xn. Once we know what that function is, n‚0 n we will be able to read ofi the explicit formula for the a ’s by expanding n A(x) in a series. To flnd A(x), multiply both sides of the recurrence relation (1.1.1) by xn and sum over the values of n for which the recurrence is valid, namely, over n ‚ 0. Then try to relate these sums to the unknown generating function A(x). 4 1 Introductory ideas and examples P If we do this flrst to the left side of (1.1.1), there results a xn. n‚0 n+1 How can we relate this to A(x)? It is almost the same as A(x). But the subscript of the ‘a’ in each term is 1 unit larger than the power of x. But, clearly, X a xn = a +a x+a x2 +a x3 +¢¢¢ n+1 1 2 3 4 n‚0 = f(a +a x+a x2 +a x3 +¢¢¢)¡a g=x 0 1 2 3 0 = A(x)=x since a = 0 in this problem. Hence the result of so operating on the left 0 side of (1.1.1) is A(x)=x. Next do the right side of (1.1.1). Multiply it by xn and sum over all n ‚ 0. The result is X X (2a +1)xn = 2A(x)+ xn n n‚0 n‚0 1 = 2A(x)+ ; 1¡x P wherein we have used the familiar geometric series evaluation xn = n‚0 1=(1¡x), which is valid for jxj < 1. If we equate the results of operating on the two sides of (1.1.1), we flnd that A(x) 1 = 2A(x)+ ; x 1¡x which is trivial to solve for the unknown generating function A(x), in the form x A(x) = : (1¡x)(1¡2x) Thisisthegeneratingfunctionfortheproblem. Theunknownnumbers a are arranged neatly on this clothesline: a is the coe–cient of xn in the n n series expansion of the above A(x). Suppose we want to flnd an explicit formula for the a ’s. Then we n would have to expand A(x) in a series. That isn’t hard in this example, since the partial fraction expansion is ‰ (cid:190) x 2 1 = x ¡ (1¡x)(1¡2x) 1¡2x 1¡x = f2x+22x2 +23x3 +24x4 +¢¢¢g ¡fx+x2 +x3 +x4 +¢¢¢g = (2¡1)x+(22 ¡1)x2 +(23 ¡1)x3 +(24 ¡1)x4 +¢¢¢ It is now clear that the coe–cient of xn, i.e. a , is equal to 2n¡1, for each n n ‚ 0. 1.2 A slightly harder two term recurrence 5 In this example, the heavy machinery wasn’t needed because we knew the answer almost immediately, by inspection. The impressive thing about generatingfunctionology is that even though the problems can get a lot harder than this one, the method stays very much the same as it was here, so the same heavy machinery may produce answers in cases where answers are not a bit obvious. 1.2 A slightly harder two term recurrence A certain sequence of numbers a ;a ;::: satisfles the conditions 0 1 a = 2a +n (n ‚ 0;a = 1): (1:2:1) n+1 n 0 Find the sequence. Asbefore, wemightcalculatetheflrstseveralmembersofthesequence, to get 1, 2, 5, 12, 27, 58, 121, ::: A general formula does not seem to be immediately in evidence in this case, so we use the method of generating functions. That means that instead oPf looking for the sequence a0;a1;:::, we will look for the function A(x) = a xj. Once we have found the j‚0 j function, the sequence will be identiflable as the sequence of power series coe–cients of the function.* As in example 1, the flrst step is to make sure that the recurrence relation that we are trying to solve comes equipped with a clear indication of the range of values of the subscript for which it is valid. In this case, the recurrence (1.2.1) is clearly labeled in the parenthetical comment as being valid for n = 0;1;2;::: Don’t settle for a recurrence that has an unqualifled free variable. Thenextstepistodeflnethegeneratingfunctionthatyouwilllookfor. In this case, since we are looking forPa sequence a0;a1;a2;::: one natural choice would be the function A(x) = a xj that we mentioned above. j‚0 j Next, take the recurrence relation (1.2.1), multiply both sides of it by xn, and sum over all the values of n for which the relation is valid, which, in this case, means sum from n = 0 to 1. Try to express the result of doing that in terms of the function A(x) that you have just deflned. If we do that to the left side of (1.2.1), the result is a +a x+a x2 +a x3 +¢¢¢ = (A(x)¡a )=x 1 2 3 4 0 = (A(x)¡1)=x: So much for the left side. What happens if we multiply the right side of (1.2.1) byPxn and sum over nonnegative integers n? Evidently the result is 2A(x)+ nxn. We need to identify the series n‚0 X nxn = x+2x2 +3x3 +4x4 +¢¢¢ n‚0 * If you are feeling rusty in the power series department, see chapter 2, which contains a review of that subject.

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.