DISCRETE MATHEMATICS AND ITS APPLICATIONS Series Editor
Kenneth H. Rosen, Ph.D. AT&T Bell Laboratories Abstract Algebra Applications with Maple, Richard E. Klima, Ernest Stitzinger, and Neil P. Sigmon Algebraic Number Theory, Richard A. Mol/in An Atlas of The Smaller Maps in Orientable and Nonorientable Surfaces, David M. Jackson and Terry I. Visentin An Introduction to Crytography, Richard A. Mol/in Combinatorial Algorithms: Generation Enumeration and Search, Donald L. Kreher and Doug/as R. Stinson Cryptography: Theory and Practice, Second Edition, Douglas R. Stinson Design Theory, Charles C. Lindner and Christopher A. Rodgers Frames and Resolvable Designs: Uses, Constructions, and Existence, Steven Furino, Ying Miao, and Jianxing Yin Fundamental Number Theory with Applications, Richard A. Mol/in Graph Theory and Its Applications, Jonathan Gross and Jay Yellen Handbook of Applied Cryptography, Alfred J. Menezes, Paul C. van Oorschot, and Scott A. Vanstone Handbook of Discrete and Computational Geometry, Jacob E. Goodman and Joseph O'Rourke Handbook of Discrete and Combinatorial Mathematics, Kenneth H. Rosen Introduction to Information Theory and Data Compression, Darrel R. Hankerson, Greg A. Harris, and Peter D. Johnson Network Reliability: Experiments with a Symbolic Algebra Environment, Daryl D. Harms, Mirostav Kraetzl, Charles J. Co/bourn, and John S. Devitt Quadratics, Richard A. Mol/in The CRC Handbook of Combinatorial Designs, Charles J. Co/bourn and Jeffrey H. Dinitz Handbook of Constrained Optimization, Herbert B. Shulman and Venkat Venkateswaran
ENUMERATIVE COMBINATORICS CHARALAMBOS A. CHARALAMBIDES
CHAPMAN & HALLICRC A CRC Press Company Boca Raton London New York Washington, D.C.
Library of Congress Cataloging-in-Publication Data Charalambides, Ch. A. Enumerative combinatorics I Charalambos A. Charalambides. p. em. - (The CRC Press series on discrete mathematics and its applications) Includes bibliographical references and index. ISBN 1-58488-290-5 I. Combinatorial enumeration problems. I. Title. II. Series. QAI64.8 .C48 2002 5ll'.62--dc21
2002019775
This book contains information obtained from authentic and highly regarded sources. Reprinted material is quoted with permission, and sources are indicated. A wide variety of references are listed. Reasonable efforts have been made to publish reliable data and information, but the author and the publisher cannot assume responsibility for the validity of all materials or for the consequences of their use. Neither this book nor any part may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, microfilming, and recording, or by any information storage or retrieval system, without prior permission in writing from the publisher. The consent of CRC Press LLC does not extend to copying for general distribution, for promotion, for creating new works, or for resale. Specific permission must be obtained in writing from CRC Press LLC for such copying. Direct all inquiries to CRC Press LLC, 2000 N.W. Corporate Blvd., Boca Raton, Florida 33431.
Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and are used only for identification and explanation, without intent to infringe.
VJSit the CRC Press Web site at www.crcpress.com © 2002 by Chapman & Haii/CRC
No claim to original U.S. Government works International Standard Book Number 1-58488-290-5 Library of Congress Card Number 2002019775 Printed in the United States of America I 2 3 4 5 6 7 8 9 0 Printed on acid-free paper
Preface
Combinatorics, at the early stages of its emergence, treated the enumeration and properties of permutations, combinations and partitions of a finite set under various conditions. Its advent coincides with that of discrete probabilities in the 17th century. The advance of probability theory and statistics, with an ever-increasing demand for more general configurations, as well as the appearance and growth of computer science, have undoubtedly contributed to the rapid development of combinatorics during the last decades. This subject was then expanded to cover enumeration and examination of properties as well as investigation of existence and construction of configurations with specified properties. This book provides a systematic coverage of the subject of enumeration of configurations with specified properties. It is designed to serve as a textbook for introductory or intermediate level enumerative combinatorics courses usually given to undergraduate or first year graduate students in mathematics, computer science, combinatorics, or mathematical statistics. The broad field of applications of combinatorial methods renders this book useful to anyone interested in operational research, physical and social sciences. In Chapter 1, the two basic counting principles of addition and multiplication are introduced after a brief presentation of the necessary elements of set theory. Along with these principles, the notion of a recurrence (recursive) relation is introduced and its connection with a difference equation is pointed out. Also, discrete probability is briefly introduced for use in the subsequent chapters. In the last section, the symbols of summation and product are also presented and some of their properties are discussed. Chapter 2 is devoted to the enumeration and properties of permutations, combinations, divisions and partitions of a finite set and also the enumeration of integer solutions of a linear equation. Further, some basic elements of enumeration of lattice paths are presented. This chapter concludes with several classical applications in discrete probability theory and statistics. Vandermonde's factorial formula, Newton's binomial formula and the
vi
PREFACE
multinomial formula are presented in Chapter 3, after a suitable extension of factorials and binomials. Stirling's approximation formula is also given. In Chapter 4, in continuation to the counting principles of addition and multiplication, the principle of inclusion and exclusion is extensively treated. In addition, the Bonferroni inequalities are derived. The famous problem of coincidences (probleme des recontres), which perhaps constitute the first application of the inclusion and exclusion principle, is examined in Chapter 5 in the general framework of enumeration of permutations with fixed points. The related problem of enumeration of permutations with successions is examined in the same chapter. Chapter 6 is devoted to a thorough presentation of generating functions, which constitute an important means of unifying the treatment of enumerative combinatorial problems. In several enumeration problems, the number of configurations satisfying specified conditions can only be expressed recursively. In Chapter 7 we present the basic methods of solving linear recurrence relations. Chapter 8 is devoted to an extensive treatment of the Stirling numbers of the first and second kind, which are the coefficients of the expansion of factorials into powers and of powers into factorials, respectively. In addition, the coefficients of the expansion of generalized factorials into usual factorials are examined. The enumeration of distributions (of balls into urns) and occupancy (of urns by balls) is closely related to the enumeration of permutations and combinations. A formulation of this problem in a general framework and its treatment from a different point of view warrants a separate chapter. This treatment is the subject of Chapter 9. A few elementary aspects of the combinatorial theory of partitions of integers are discussed in Chapter 10. Specifically, after the introduction of the basic concepts, recurrence relations and generating functions of the numbers of partitions with summands of specified values are obtained. Also, relations between the numbers of various partitions are concluded. The last section of this chapter includes some interesting classical q-identities. Chapter 11 deals with the partition polynomials in n variables. The coefficient of the general term of these polynomials is the number of partitions of a finite set of n elements in specified numbers of subsets of the same cardinality and the summation is extended over all partitions of the number n. As particular cases, the partition polynomials include the exponential, logarithmic and potential polynomials, which owe their particular names to the form of their generating functions. The inversion of a power series by using the potential polynomials is presented in the last section of this chapter. Enumeration problems emerging from the representation of a permutation as a product of cycles are treated in Chapter 12.
PREFACE
vii
The problem of counting the number of equivalence classes of a finite set under a group of its permutations is the subject of Chapter 13. Finally, Chapter 14 considers the Eulerian and the Carlitz numbers. In the last two sections of this chapter, these numbers are used to express the number of permutations with a given number of ascending runs (or rises) and the number of permutations with repetitions with a given number of non-descending runs (or rises). A distinctive feature of the presentation of the material covered in this book is the comments (remarks) following most of the definitions and theorems. In these remarks the particular concept or result presented is discussed and extensions or generalizations of it are pointed out. In concluding each chapter, brief bibliographic notes, mainly of historical interest, are included. At the end of each chapter, a rich collection of exercises is provided. Most of these exercises, which are of varying difficulty, aim to the consolidation of the concepts and results presented, while others complement, extend or generalize some of the results. So, working these exercises must be considered an integral part of this text. A few of the exercises are marked with an asterisk, indicating that they are more challenging. Hints and answers to the exercises are included at the end of the book. Before trying to solve an exercise, the less experienced reader may first look up the hint to its solution. The material of this book has been presented several times to cla.'lses at the department of mathematics of the University of Athens, Greece, since 1972. Its first Greek edition, containing only Chapters 1 to 7, was published in 1984. Since then, the comments and suggestions communicated to me by students and colleagues who used it as a textbook for an introductory course in combinatorics contributed to improvements of certain points. The need for a textbook for a second, more advanced course in combinatorics led to its substantial expansion. The revised second Greek edition, expanded by the addition of Chapters 8 to 14 was published in 1990. Thanks are due to my colleagues Dr. M. Koutras and Dr. A. Kyriakoussis for their comments and suggestions while I prepared this revision. The preparation of this English edition was an opportunity for me to clarify and improve several points. The comments of the reviewers and the series editor were of great help and are gratefully acknowledged. Special thanks are also due to Mrs. Rosa Garderi for the excellent typesetting of the book. Charalambos A. Charalambides Athens, September 2001
The Author
Charalambos A. Charalambides, is professor of mathematics at the University of Athens, Greece. Dr. Charalambides received a diploma in mathematics (1969) and a Ph.D. in mathematical statistics (1972) from the University of Athens. He was a visiting assistant professor at McGill University, Canada (1972-73), a visiting associate professor at Temple University, Philadelphia (1985-86) and a visiting professor at the University of Cyprus (1995-96). Since 1979 he has been an elected member of the International Statistical Institute (lSI). Professor Charalambides' research interests include enumerative combinatorics, discrete probability and parametric statistical estimation. He is an associate editor of Communications in Statistics and co-edited Probability and Statistical Models with Applications, Chapman Hall/CRC Press.
To Angelos and Cassandra
Contents
Preface 1
2
BASIC COUNTING PRINCIPLES 1.1 Introduction 0 1.2 Sets, relations and maps 1.201 Basic notions 1.202 Cartesian product 1.203 Relations 1.2.4 Maps 1.205 Countable and uncountable sets 1.206 Set operations 1.207 Divisions and partitions of a set 1.3 The principles of addition and multiplication 1.4 Discrete probability 1.5 Sums and products 1.6 Bibliographic notes 1.7 Exercises PERMUTATIONS AND COMBINATIONS 201 Introduction 0 202 Permutations 203 Combinations 0 2.4 Divisions and partitions of a finite set 205 Integer solutions of a linear equation 206 Lattice paths 207 Probabilistic applications 20701 Classical problems in discrete probability 20702 Ordered and unordered samples 0 20703 Probability models in statistical mechanics 208 Bibliographic notes 209 Exercises
v 1
1 3 3 5 7 7 9 9 13 14 24 27 35 36 39
39 40 51 62 68 75 82 82 86 89 90 91 xnz
xiv
CONTENTS
3 FACTORIALS, BINOMIAL AND MULTINOMIAL COEFFICIENTS 103 3.1 Introduction . . . . . 103 3.2 Factorials . . . . . . 104 3.3 Binomial coefficients 110 3.4 Multinomial coefficients 123 3.5 Bibliographic notes . 124 3.6 Exercises . . . . . . . . 124 4 THE PRINCIPLE OF INCLUSION AND EXCLUSION 131 4.1 Introduction . . . . . . . . . . . . . . . . . . . 131 4.2 Number of elements in a union of sets . . . . 132 4.3 Number of elements in a given number of sets 144 4.4 Bonferroni inequalities . . . . . . . . 152 4.5 Number of elements of a given rank 155 4.6 Bibliographic notes 158 4. 7 Exercises . . . . . . . . . . . . . . . 159 5 PERMUTATIONS WITH FIXED POINTS AND SUCCESSIONS 169 5.1 Introduction . . . . . . . . . . . 169 5.2 Permutations with fixed points 169 5.3 Ranks of permutations . . . . . 174 5.4 Permutations with successions . 176 5.5 Circular permutations with successions . 180 5.6 Bibliographic notes . 184 5. 7 Exercises . . . . . . . . . . . . . . . . . 184 6 GENERATING FUNCTIONS 6.1 Introduction . . . . . . . . . . 6.2 Univariate generating functions . . . . . 6.2.1 Definitions and basic properties . 6.2.2 Power, factorial and Lagrange series 6.3 Combinations and permutations 6.4 Moment generating functions .. 6.5 Multivariate generating functions 6.6 Bibliographic notes 6. 7 Exercises . . . . . . . . . . .
191 191 192 192 202 208 215 219 223 223
7 RECURRENCE RELATIONS 7.1 Introduction . . . . . . . . . . . . . . . 7.2 Basic notions . . . . . . . . . . . . . . 7.3 Recurrence relations of the first order 7.4 The method of characteristic roots ..
233 233 233 235 239
CONTENTS
7.5 7.6 7. 7 8
The method of generating functions Bibliographic notes . Exercises . . . . . . .
STIRLING NUMBERS 8.1 Introduction . . . . . . . . . . . . . . . . . . . 8.2 Stirling numbers of the first and second kind 8.3 Explicit expressions and recurrence relations . 8.4 Generalized factorial coefficients . . . . . 8.5 Non-central Stirling and related numbers 8.6 Bibliographic notes . 8. 7 Exercises . . . . . . . . . . . . . . . . . .
XV
250 264 264 277 277 278 289 301 314 319 321
9 DISTRIBUTIONS AND OCCUPANCY 9.1 Introduction . . . . . . . . . . . . . . . 9.2 Classical occupancy and modifications . . 9.3 Ordered distributions and occupancy . . . 9.4 Balls of general specification and distinguishable urns 9.5 Generating functions 9.6 Bibliographic notes . 9. 7 Exercises . . . . . .
339 339 340 348 350 353 358 359
10 PARTITIONS OF INTEGERS 10.1 Introduction . . . . . . . . . . . 10.2 Recurrence relations and generating functions 10.3 A universal generating function . . . . . 10.4 Interrelations among partition numbers 10.5 Combinatorial identities 10.6 Bibliographic notes . 10.7 Exercises . . . . . . . .
369 369 370 376 383 391 396 396
11 PARTITION POLYNOMIALS 11.1 Introduction . . . . . . . . . . . . . . . . 11.2 Exponential Bell partition polynomials . 11.3 General partition polynomials . . . 11.4 Logarithmic partition polynomials 11.5 Potential partition polynomials 11.6 Inversion of power series 11.7 Touchard polynomials 11.8 Bibliographic notes . 11.9 Exercises . . . . . . .
411 411 412 419 424 428 433 442 447 448
xvi
CONTENTS
12 CYCLES OF PERMUTATIONS 12.1 Introduction . . . . . . . . . . . . 12.2 Permutations with a given number of cycles 12.3 Even and odd permutations . . . . . . . . . 12.4 Permutations with partially ordered cycles . 12.5 Bibliographic notes . 12.6 Exercises . . . . . . . . . . . . . . . . . . .
461 461 462 468 471 478 478
13 EQUIVALENCE CLASSES 13.1 Introduction . . . . . . . . . 13.2 Cycle indicator of a permutation group . 13.3 Orbits of elements of a finite set 13.4 Models of colorings of a finite set 13.5 Bibliographic notes . 13.6 Exercises . . . . . . . . . . . . .
487 487 488 493 499 507 507
14 RUNS OF PERMUTATIONS AND EULERIAN NUMBERS 513 14.1 Introduction . . . . 513 14.2 Eulerian numbers . 513 14.3 Carlitz numbers . . 522 14.4 Permutations with a given number of runs . 530 14.5 Permutations with repetition and a given number of runs 533 14.6 Bibliographic notes . 537 14.7 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . 538 HINTS AND ANSWERS TO EXERCISES
545
BIBLIOGRAPHY
591
INDEX
601
Chapter 1 BASIC COUNTING PRINCIPLES
1.1
INTRODUCTION
Combinatorics, at the early stages of its emergence, was basically concerned with the enumeration of permutations, combinations and partitions of a finite set under various conditions. The demand for construction and study of more general configurations expanded its subject. Combinatorics, nowadays established as a branch of discrete mathematics, deals with the existence, construction, enumeration and examination of properties of configurations satisfying specified conditions. The appearance of combinatorial problems may be traced back far into time. In a letter considered to have been addressed by Archimedes to Eratosthenes, it is proposed, subject to certain conditions, to "compute the number of cattle of the Sun." This problem is one of the rare allusions in antiquity to combinatorics and its confrontation depends on consideration of the polygonal numbers of Pythagoras, Nicomachos and Diophantos. Investigation of the existence or nonexistence of a configuration with certain specified properties constitutes the famous problem of "magic squares." This is the problem of placing positive integers in a square of n rows and n columns in such a way that the sum of the numbers in any row, column or diagonal is the same. Two simple examples of magic squares for n = 3 and n = 5 are given in Figure 1.1. The magic squares were known to Chinese in antiquity. The "Grant Plan," which is described in one of the oldest divinatory books in China, constitutes one such configuration, and legend claims it was decorated upon the back of a divine tortoise that emerged from the river Lo. Substituting the various sets of marks by positive integers, we obtain the left magic square of Figure 1.1. The magic squares were also known to ancient Greeks, according to a reference to them by Theona Smyrneou. The Indians and later the Arabs worked on these squares. The Greek monk Emmanuel Moschopoulos gave the first method of constructing magic squares in the 14th century. Euler and other great mathematicians
2
BASIC COUNTING PRINCIPLES
FIGURE 1.1 Magic squares
4
3 8
g 5 1
2 7 6
11 4 17 10 23
24 12 5 18 6
7 25 13 1 19
20 8 21 14 2
3 16 g 22 15
also showed interest in the same problem, in a more abstract setting, in the construction of finite geometries. For certain configurations that can be easily obtained, such as the combinations of n objects taken k at a time, it is natural to ask for their multitude. In this way a new development in the evolution of combinatorics began with deriving formulas for the number of configurations satisfying specified properties. Of course, combinatorics has been greatly developed in this direction as a result of the powerful influence of probability (with the classical definition of Laplace) and statistics. For a long time combinatorics was considered as the art of counting. From this point of view, elements of combinatorics may be traced almost everywhere. The majority of the classical formulas has been discovered and rediscovered several times. Perhaps the oldest example is the binomial coefficients which, in the 12th century, were known to the students of the Indian mathematician Bhakra; according to a recent discovery, the recursive computation of these coefficients was taught in 1265 by the Persian philosopher Nasir-Ad-Din. Pascal and Fermat rediscovered the binomial coefficients as a by-product of their study of games of chance. It is also known that Cardan, in 1560, proved that the number of subsets of a set of n elements is 2n. In 1666, Leibniz published the first treatise in combinatorics "Dissertatio de Arte Combinatoria." As the configurations became more complex, great effort was put in counting techniques. In this direction, the most celebrated discovery was Laplace's generating function technique. In the 20th century several new applications of combinatorics appeared in statistics (design of experiments), in coding theory (the problem of capacity of a set of signals), in operational research (the traveling salesman problem), etc. Polya proved his famous theorem on counting. When the configurations under consideration become too complex and the derivation of their exact number very difficult, the effort is focused on asymptotic values, bounds, inequalities, etc. A particularly curious case in this direction are the Ramsey numbers, which are very close to the binomial coefficients; it is not even known how to calculate them when their parameter values are greater than 7.
1.2. SETS, RELATIONS AND MAPS
3
In certain quite difficult problems the only method of dealing with them remains that of listing all possible configurations. This method of reasoning by exhaustion has been used in proving important results and in other branches of mathematics. This book concentrates on counting configurations satisfying specified conditions. In this chapter, some necessary basic elements of set theory are presented, in the next section, to pave the way for the presentation of the basic counting principles of addition and multiplication. Combinatorics is tightly connected with discrete probability theory; this connection greatly influenced its rapid development. It is thus reasonable that a brief introduction of the notion of probability and its connection to counting configurations follows the presentation of the basic counting principles. In order to make the book self-contained, the symbols of summation and product are presented and their basic properties are discussed.
1.2 SETS, RELATIONS AND MAPS 1.2.1
Basic notions
The concept of a set is a primitive notion in set theory like the concepts of a point and a straight line in Euclidean geometry. For the presentation of the basic concepts of combinatorics, only a few elements of set theory are needed and not its axiomatic foundation. In this respect, it is sufficient to consider a set as a (well-defined) collection of distinct objects. Sets are usually designated by capital letters of the alphabet with or without subscripts and their elements by lower case letters. The fact that the element a belongs to (or is a member of> the set A is expressed by writing a E A. The negation of this statement is expressed by writing a ~ A. In describing which objects are contained in a set A we use the notation
which requires that the list of elements of the set A is known, or the notation
A= {a: a has property P}, where P is a characteristic property of the elements of the set A. Two special sets are often of interest: the universal set, designated by fl, which is the set of all objects under consideration, and the empty or null set, designated by 0, which does not contain any of the objects under consideration. It must be noted that these two sets may vary from case to case. For example, in studying the real roots of polynomials, 'the set of real
BASIC COUNTING PRINCIPLES
4
numbers R is taken as the universal set. In this framework the set {x E R : x
2
-
2x + 2
= 0}
is an empty set as it is known that the quadratic equation x 2 - 2x + 2 = 0 has only complex roots and, more specifically, the roots x 1 = 1 - i and x 2 = 1 + i, where i = A is the imaginary unit. Further, if the study is extended to the complex roots of polynomials, the set of complex numbers Cis taken as the universal set. In this case the set of roots of the polynomial x 2 - 2x + 2,
{x E C: x 2
-
2x + 2 = 0} = {1- i, 1 + i},
is not empty. A set B is called a subset of a set A if and only if for every b E B, we have bE A (every element of B is also an element of A). This is indicated by writing B ~ A (and is read as B is a subset of A or B is included in A) or equivalently by writing A 2 B (and is read as A is a superset of A or A includes B). If B ~ A and there exists a E A such that a fJ. B, then B is said to be a proper subset of A and this is indicated by B C A or equivalently by A ::::> B. The fact that B ~ A does not exclude A ~ B; when both relations hold, the sets A and B, consisting of the same elements, are called equal and this is indicated by A= B. The set of all subsets of a set A is called the power set of A, and is denoted by P(A). In the sequel, all sets under consideration are considered as subsets of a universal set fl, that is, all are elements of P(fl). Schematic figures are frequently used for illustrating pictorially various sets. The Venn diagrams are such figures in which the universal set fl is defined by a closed area of the plane containing its elements; the elements of fl are defined by geometrical points of this plane. The subsets of fl are defined by subareas. Figure 1.2 represents the fact that B C A. FIGURE 1.2 Subset of a set
.(J)
1.2. SETS, RELATIONS AND MAPS
5
Note that these schematic figures are useful in verifying the validity of theorems of the theory of sets and also in indicating their proofs. Naturally, the proofs must exclusively be based only on the definitions of the notions.
1.2.2
Cartesian product
The concept of an ordered pair and, generally, of an ordered n-tuple is needed for the definition of the Cartesian product of two and generally of n sets. According to the definition of the equality of sets, the pair (twoelement set) {a, b} is equal to the pair {b, a}. Further, there are cases where it matters which element is first and which is second; for example in analytic geometry the pair of coordinates (a, b) of a point on the plane designates its abscissa and ordinate, respectively. The necessity of this distinction of the elements of a pair leads to the introduction of the concept of an ordered pair. A pair of elements a and b (not necessarily different) in which a is considered as the first and b as the second element is called an ordered pair and is denoted by (a, b). According to this definition, two pairs (a, b) and (c, d) are equal if and only if a= c and b = d. The concept of an ordered n-tuple (a 1 , a 2 , ... , an) can be inductively defined as follows. Thus, for n = 3, an ordered triple (a 1 , a 2 , a 3 ) is defined as (a1,az,a3) = ((a1,az),a3), an ordered pair with first element the ordered pair (a1, a 2) and second the element a 3 . Generally, an ordered n-tuple (a 1 , az, ... , an) is defined as
an ordered pair with first element the ordered (n-1)-tuple (a 1 , az, ... , an-d and second the element an. In several cases it is convenient to adopt the vector terminology where the first element a 1 is called first coordinate, the second element az is called second coordinate, etc. After the introduction of the concept of an ordered pair and, generally, of an ordered n-tuple, the Cartesian product can by defined as follows: The Cartesian product of the sets A and B, denoted by A x B, is defined as the set of ordered pairs in which the first coordinate is an element of the set A and the second coordinate is an element of the set B, that is
Ax B ={(a, b): a E A, bE B}. This definition can be extended to n sets A1 , A2 , •.. , An as follows: A1
X
Az X···
X
An= {(al,az, ... ,an): a1 E A1,a2 E Az, ... ,an E An}·
Particularly, if A 1 = Az = · · · = An = A, the Cartesian product is denoted by An.
6
BASIC COUNTING PRINCIPLES
The Cartesian product A x B is geometrically represented by the points (a, b) of the plane, with abscissa x = a taking values from the set A (xaxis) and ordinate y = b taking values from the set B (y- axis). Generally, the Cartesian product A 1 x A2 x · · · x An is represented by the points (a 1 , a2, ... , an) of the n-dimensional space with the k-coordinate taking values from the set Ak (xk -axis), k = 1, 2, ... , n. Example 1.1 Routes
Suppose that there are three different roads a 1 , a 2 and a 3 from town 0 to town A, and four different roads b1 , b2, b3 and b4 from town A to town B. Find the different routes from town 0 to town B. A route from town 0 to town B may be represented by an ordered pair (a, b), where a is a road from the set A = {a1 , a2, a3} of roads from town 0 to town A, and b is a road from the set B = {b1 , ~, b3 , b4 } of roads from town A to town B. l'_hus, the set of routes from town 0 to town B is the Cartesian product:
Ax B =
{(ai,bi),(ai,~),(ai,~),(ai,b4),(a2,bi),(a2,b2),
(a2, b3), (a2, b4), (a3, bi), (a3, b2), (a3, b3), (a3, b4) }.
0
This is geometrically represented in Figure 1.3.
FIGURE 1.3 Set of routes
b b4
•
•
•
b3
•
•
•
b2
•
•
•
bl
•
•
•
a
1.2. SETS, RELATIONS AND MAPS
1.2.3
7
Relations
A binary relation from the set A to the set B is a subset R of the Cartesian product A X B. The ordered pair (a, b) satisfies the relation if and only if (a, b) E R. This is usually denoted by aRb. If B = A, then R is called a relation on A. Such relations are for example the equality relation and the inclusion relation, which have already been introduced in Section 1.2.1. These relations are defined on the set P(D) of the subsets of n. Note that the equality relation on a set A is the diagonal D A of the Cartesian product
n
A2. The above definition is very general. The most interesting relations are those satisfying certain desirable properties. Such properties are the following: A binary relation R on a set A is called: (a) Reflexive, if and only if for every a E A, it holds aRa (b) Symmetric, if and only if aRb implies bRa (c) Antisymmetric, if and only if aRb and bRa imply a= b (d) Transitive, if and only if aRb and bRc imply aRc The inverse (or reciprocal) of a binary relation Ron A denoted by n- 1 is defined as follows: an - 1 b, if and only if bRa. An equivalence relation is a binary relation that is reflexive, symmetric and transitive. Such relation is, for example, the equality relation. An order relation is a binary relation that is reflexive, antisymmetric and transitive. Such relation is, for example, the inclusion relation ~. The inverse of this relation is the relation 2.
1.2.4 Maps A subset F of the Cartesian product A x B is called a map (or function or correspondence) of the set A into the set B if and only if, for every a E A, there exists only one b such that (a, b) E F. Thus, if (a, b1 ) E F and (a, b2) E F, then b1 = ~- In the ordered pair (a, b) E F, the element a E A is called archetype and the element b E B is called the image of a by F and is usually denoted by b = F(a). Consequently, a map F of the set A into the set B associates to each element a E A only one element b E B, the image of a by F. If, in addition, for every element bE B, there exists at least one element a E A such that (a, b) E F, then F is called surjective (onto) . A map F of the set A into the set B is called injective (one-to-one) if and only if there exist at most one element a E A such that (a, b) E F. Thus, if (all b) E F and (a2, b) E F, then a 1 = a 2. Finally, a map F is called bijective (one-to-one and onto) ifF is both surjective and injective.
8
BASIC COUNTING PRINCIPLES
The diagonal T A of the Cartesian product A 2 , TA = { (a, b) E A 2 : a = b}, is called identity map of the set A. Thus, T A associated to each element a E A the same element TA(a) =a. If F ~ A x B is a bijective map of the set A into the set B, then its inverse map, denoted by F- 1 ~ B x A, is defined as follows: (b, a) E F- 1 if and only if (a, b) E For, equivalently, a= p-l (b) if and only if b = F(a) for every a E A and b E B. Consider the set N = {1, 2, ... , n, ... } of natural numbers. A map of the set N into a set A, {(n,an): n E N,an E A}, which corresponds an element an E A to each natural number n E N, is particularly called a sequence of elements of A. This sequence is usually denoted as an E A, n = 1, 2, .... The element an is called the n-th term of the sequence. Consider, in general, an index set I. A map of the set I into a set A,
{(i,ai): i E I,ai E A}, which corresponds an element ai E A to each i E I, is called a family of elements of A. This family is usually denoted as ai E A, i E I. The term family is used instead of the term map when the interest is focused on the elements ai E A and not on the map itself. Note that a sequence is a particular case, I N, of a family.
=
Example 1.2 Maps Consider the sets A= {0, 1, ... , 9}, B = {0, 1, 2} and their Cartesian product Ax B = {(a,b): a E {0, 1, ... ,9}, bE {0,1,2}}.
(a) The subset
{(0,0),(2,0),(4,0), (6,0),(8,0),(1, 1),(3i1), (5,1),(7,1),(9,1)}, of A x B, is a map F from the set A into the set B such that
F(O)
= 0,
F(2)
= 0,
F(4)
= 0,
F(6)
= 0,
F(8)
=0
F(1)
= 1,
F(3)
= 1,
F(5)
= 1,
F(7)
= 1,
F(9)
= 1.
and
Note that the image b = F(a) of an element a E A is the remainder of the division of a by 2. Further, this map F is not surjective since there is no element a E A such that F(a) = 2.
1.2. SETS, RELATIONS AND MAPS
9
(b) The subset
{(0,0), (3,0),(6,0), (9,0), (1, 1),(4, 1), (7,1), (2,2),(5,2), (8,2)},
of A x B, is a surjective map G from the set A into the set B such that G(O) = 0, G(3) = 0, G(6) = 0, G(9) = 0, G(1) = 1, G(4) = 1, G(7) = 1, G(2) = 2, G(5) = 2, G(8) = 2.
This map corresponds to each element a E A the remainder b division of a by 3. 0
1.2.5
= G(a)
of the
Countable and uncountable sets
Two sets A and B are called equivalent, and this is denoted by A ,...., B, if and only if there exists a bijective map of the set A into the set B. For example, the set A = {2, 4, ... , 2n} is equivalent to the set B = {1, 2, ... , n} since the map F(a) = a/2 for every a E A is bijective. More generally, the set A= {a 1,a2, ... ,an} is equivalent to the set B = {1,2, ... ,n}, with F(ak) = k for every k = 1, 2, ... , n, is a bijective map from A into B. A set A is called finite, with n elements, if and only if it is equivalent to the subset { 1, 2, ... , n} of natural numbers. The empty set 0 is considered finite with 0 elements. A set that is not finite is called infinite. A set A is called infinitely countable if and only if it is equivalent to the set N = {1, 2, ... , n, ... } of natural numbers. Denoting by ak the element of A that corresponds to the natural number k, fork= 1, 2, ... , the set A can be represented as if it is finite with n elements, or as
if it is infinitely countable. A set A is called countable if it is finite or infinitely countable. A set that is not countable is called uncountable.
1.2.6
Set operations
The union of two sets A and B is defined as the set that includes the elements of{} belonging to A orB (the conjunction or being not exclusive) and is denoted by A U B, that is
A U B = {w E {} : w E A or w E B}. This definition is extended to n sets A 1 , A2 , •.. , An: A 1 U A2 U · · · U An
= {w
E {} : w E Ak for at least one k E { 1, 2, ... , n}}
BASIC COUNTING PRINCIPLES
10
and more generally to a family of sets {Ai, i E J}:
U Ai = {wE fl: wE Ai for at least one subscript i E J}. iE/
The intersection of two sets A and B is defined as the set that includes the common elements of the two sets and is denoted by A n B, that is
An B ={wE
fl: wE
A and wEB}.
For reasons of economy the notation AB instead of A n B is frequently used. This definition is extended ton sets A1 , A2 , •.. , An: Ar n A2 n ···nAn= {wE fl: wEAk for all subscripts k E {1, 2, ... , n}}
and more generally to a family of sets {Ai, i E J}:
n
Ai = {wE fl: w E Ai for all subscripts i E 1}.
iE/
The union and intersection are pictorially illustrated by Venn diagrams in Figure 1.4; the shaded area represents the set under consideration. FIGURE 1.4 Union and intersection
The complement (with respect to the universal set fl) of a set A is defined as the set that includes the elements of fl not belonging in A and is denoted by A' or Ac orCA, that is A'= {wE fl: w
t/. A}.
The (set theoretic) difference of a set B from a set A is defined as the set that includes the elements of A not belonging in B and is denoted by A- B, that is A- B ={wE fl: wE A, w t/. B}. Note that
A'
=n-
A, A - B
= An B'.
1.2. SETS, RELATIONS AND MAPS
11
FIGURE 1.5 Complement and difference
The Venn diagrams of the difference of two sets and the complement of a set are given in Figure 1.5. The operations of union and intersection of sets share many similarities and differences, with the operations of summation and multiplication of real numbers, as follows from the next theorem.
THEOREM 1.1 For any sets A. B and C the following properties of the union, intersection and complementation hold: (a) Associativity of the union and intersection: (Au B) u C =Au (B u C), (An B) n C =An (B n C). (b) Distributivity of the intersection with respect to the union and of the union with respect to the intersection:
An (B U C)= (An B) u (An C), Au (B n C)= (Au B) n (Au C). (c) Commutativity of the union and intersection:
AU B = B u A, An B = B n A. (d) The null set 0 is the neutral element for the union:
Au0 = 0UA= A, while the universal set
n is the neutral element for the intersection Ann= nnA= A.
(e) The complementation assigns to each set A, the set A' such that AnA'= 0, AUA' = n.
BASIC COUNTING PRINCIPLES
12
(f) !2' = 0, 0' = !2, (A')' = A (g)
AUA=A, Auf2=f2, AnA=A, An0=0.
PROOF
It can be easily verified that these properties are almost direct consequences of the definitions of the union, intersection and complementation. The proof of (b), which requires a somewhat longer series of steps than the others, may be carried out as follows. Consider an element w E An (B U C). Then w belongs to both A and B U C and thus it belongs to A and to at least one of B and C. This implies that w belongs to both A and B or to both A and C and hence it belongs to An B or to An C. Therefore w E (An B) u (An C) and A n (B u C) ~ (A n B) u (A n C). Similarly, it can be shown that (AnB)U(AnC) ~ An(BUC),whenceAn(BUC) = (AnB)U(AnC). The proof of Au (B n C) = (Au B) n (Au C) is quite similar. I
REMARK 1.1 The set P( !2) of all subsets of !2, furnished with the operations of union U, intersection nand the map C: P(f2) --+ P(f2), which to every element A E P(f2) assigns its complement CA =A' E P(f2), is made a Boolean algebra since, according to Theorem 1.1, properties (a) to (e), constituting the definition of such an algebra, are satisfied. I Two important interrelations between the operations of union, intersection and complementation are given in the next theorem. THEOREM 1.2 De Morgan's formulae Let A and B be subsets of a universal set f2. Then
(AUB)'=A'nB', (AnB)'=A'uB'.
PROOF Consider an element w E (Au B)'. Then w ~ AU Band hence A and w ~ B. This implies w E A' and w E B'. Thus w E A' n B' and (AU B)' ~ A' n B'. Similarly it can be shown that A' n B' ~ (Au B)', whence (A U B)' = A' n B'. The proof of the second formula can be similarly carried
w ~
out.
I
REMARK 1.2 ... ,An of !2:
De Morgan's formulae can be extended to n subsets AI, A2 , (AI U A2 U .. · U An)' = A; n A; n .. · n A~, (AI n A2 n ···nAn)' = A; U A~ U · · · U A~,
13
1.2. SETS, RELATIONS AND MAPS
and to a family of subsets { Ai, i E I} of [):
The derivation of these formulae follows verbatim the lines of the proof of Theorem 1.2. I The distinction of two sets according to whether they have elements in common or not will be useful in the sequel. In this respect, the next definition is introduced. Two sets A and B are said to be disjoint if they do not have elements in common, that is, if An B = 0. More generally, the sets A 1 , A2, ... , An are said to be pairwise or mutually disjoint if Ai n AJ = 0 for all pairs of subscripts { i, j} with i -1- j, from the set of indices { 1, 2, ... , n}. In such a case, the operation of the union is designated by + or L instead of U. Some useful properties of the Cartesian product are shown in the next theorem.
THEOREM 1.3 For any sets A. B, C and D the following relations hold:
(Au B)
X
c =(A
X
C) u (B
X
C),
(An B) x (C n D)= (Ax C) n (B x D). PROOF Consider an element u E (A U B) x C. Then u = (a, c) with a E AU B, c E C and hence a E A or a E B and c E C, which implies (a, c) E AxCor(a,c) E BxC. Thereforeu =(a, c) E (AxC)u(BxC)and (AUB) xC ~ (A xC)u(Bx C). It can be shown, following the inverse procedure, that (Ax C)u(B x C) ~ (AUB) x C and thus (Au B) x C = (Ax C)u(B x C). The proof of the second formula is quite similar. I
1.2.7 Divisions and partitions of a set An n-division of a set W (or a division of a set W in n subsets) is an ordered n-tuple of sets (A 1 , A 2, ... , An) that are pairwise disjoint subsets of W and their union is W, that is: Ai ~ W, i = 1, 2, ... , n, Ai n AJ = Ar
0,
i, j = 1, 2, ... , n, i -1- j,
+ A2 + · · · + An = W.
14
BASIC COUNTING PRINCIPLES
Note that, in a division of a set, the inclusion of one or more empty sets is not excluded. For example, the ordered sequence (AI, A 2 , A3, A 4 ), with AI = {w!}, A2 = {w2,w3,w4}, A3 = {w5} and A 4 = 0, is a 4-division of the set W = {wi,w2,w3,w4,w5}· An n-partition of a set W (or a partition of a set W in n subsets) is a set of n sets {AI, A2, ... , An} that are pairwise disjoint and not null subsets of W and their union is W, that is:
Ai ~ W, Ai
= 0, i = 1, 2, ... , n,
Ai n Ai
= 0,
i,j
= 1, 2, ...
, n, i-::/= j,
Note that, in a partition, as opposed to a division of a set, no empty sets are included and the sets constituting it are not ordered.
1.3
THE PRINCIPLES OF ADDITION AND MULTIPLICATION
As has been noted in the introduction, counting configurations constitutes a major part of combinatorics. The set of configurations is in any case finite and so the problem of counting them is a problem of counting the elements of a finite set. The number of elements of a finite set A is denoted by N(A) or IAI and is called the cardinal of it. In the case of a finite universal set n, its cardinality is taken as N(n) N. At this point, though clear from the relevant definitions of the preceding section, it is worth noting explicitly the following lemma.
=
LEMMAI.J If A and B are finite and equivalent sets, then
N(A) = N(B). Thus, the cardinal of a finite set A may be deduced by determining a finite set B, equivalent to A, with known cardinality. Some basic properties of cardinality are proved in the next theorem. THEOREM 1.4 (a) If A and B are finite and disjoint sets, then
N(A +B) = N(A) + N(B).
1.3.
THE PRINCIPLES OF ADDITION AND MULTIPLICATION
15
(b) If A is a subset of a finite universal set fl and A' its complement, then N(A')
= N- N(A).
(c) If A and Bare finite sets, then
N(A- B)= N(A)- N(A n B) and particularly for B
~
A,
N(A- B)= N(A)- N(B). PROOF (a) Since An B = or to B only and thus
0, any element of A+ B
belongs either to A only
N(A +B)= N(A) + N(B). (b) Note that the sets A and A' are disjoint and according to part (a), N(A +A')= N(A) + N(A'). Further, A+ A' = fl, whence N := N(D) = N(A)
+ N(A')
and N(A') = N- N(A). (c) Since (An B') n (An B) = (An A) n (B' n B) = An 0 = 0, the sets A n B' = A - B and A n B are disjoint and further (An B') +(An B)= An (B' +B)= An fl =A. Hence N(A) = N((A n B') +(An B))= N(A n B') + N(A n B) and N(A- B)= N(A n B') = N(A)- N(A n B). In particular, forB~ A, whence An B = B, it follows that N(A- B)= N(A)- N(B) and the proof of the theorem is completed.
I
16
BASIC COUNTING PRINCIPLES
REMARK 1.3 The set function N (·),which corresponds to every set A E P( D) its cardinal N(A), is (a) nonnegative: N(A) ~ 0 for every set A E P(D) and (b) finitely additive: N(A + B) = N(A) + N(B) for any disjoint sets A, BE P(D), according to part (a) of Theorem 1.4. These properties made N(·) a finitely additive measure (or simply measure) on P( D). The most known measures are also the length, area and volume in geometry, the mass in physics and the probability (measure) in the theory of probability. This last measure is introduced in the next section for the needs of the probabilistic applications of combinatorics. I As regards the cardinal of the union of more than two finite and pairwise disjoint sets, the next corollary of the first part of Theorem 1.4 is shown. COROLLARY 1.1 If A 1 , A2, . .. , An are finite and pairwise disjoint sets, then N(A1 + A2 +···+An)= N(AI) + N(A2) + · · · + N(An)·
(1.1)
PROOF Note first that, according to part (a) of Theorem 1.4, relation (1.1) holds for n = 2. Suppose that ( 1.1) holds for n - 1, that is N(A1 + A2 +···+An-d
= N(AI) + N(A2) + · · · + N(An-d·
It will be shown that (l.l) holds also for n. For this reason, set A= A 1
+ A2 +
···+An-I and B =An, whence
= (A1+A2+· · ·+An_i)nAn = A1nAn+A2nAn+· · ·+An-lnAn = 0, A+ B = (A1 + A2 +···+An-d+ An= A1 + A2 +···+An-I+ An·
AnB
Thus, the sets A and Bare finite and disjoint and according to part (a) of Theorem 1.4, N(A +B) = N (A) + N(B), and the hypothesis that (1.1) holds for n- 1, it follows that N(A1
+ A2 +···+An) = N(A1 + A2 +···+An-d+ N(An)
= N(A1) + N(A2)
+ · · · + N(An-d + N(An)·
Hence, according to the principle of mathematical induction, ( 1.1) holds for every integer n ~ 2. I REMARK 1.4 Relation ( 1.1) is often referred to as the addition principle and can also be stated as follows: if an element (object) wi can be selected in ki different ways, for i = 1, 2, ... , n, and the selection of wi excludes the simultaneous selection of w1 , i, j = 1, 2, ... , n, i I j, then any of the elements (objects) w 1 or w2 or · · · or Wn can be selected in k1 + k 2 + · · · + kn ways. I
THE PRINCIPLES OF ADDITION AND MULTIPLICATION 17
1.3.
REMARK 1.5 For each division (A 1 , A 2 , ... , An), as well as for each partition {A 1 , A2 , ... , An}. of a finite set W, the sets A 1 , A2 , ... , An are finite and pairwise disjoint. Thus, by Corollary 1.1, the following relation holds:
N(W)
= N(A1 + A2 +···+An)= N(A1) + N(A2) + · · · + N(An),
I
for both a division and a partition of a finite set.
The next theorem is concerned with the cardinality of the Cartesian product of finite sets.
THEOREM 1.5 If A and B are finite sets, then
N(A x B)= N(A)N(B). PROOF Let A= {a 1, a 2 , ... , ak} and B may be written in the form
A= A1
(1.2)
= {b1, b2 , •..
+ A2 + · · · + Ak, A;= {a;},
i
,
br }. Then the set A
= 1, 2, ... , k
and the Cartesian product A x B, according to Theorem 1.3, in the form
where the sets (Cartesian products) A 1 x B, A2 x B, ... , Ak x Bare pairwise disjoint. Hence
N(A
X
B)= N(Al
X
B)+ N(A2
X
B)+ ... + N(Ak
X
B).
Noting that, for any i E { 1, 2, ... , k}, the Cartesian product A; x B is the set of the ordered pairs (a;, bj) with first element the only element ai of the set A; = {a;} and second element any of the elements bj. j = 1, 2, ... , r, of the set B, it follows that N(A; X B)= N(B), i = 1,2, ... ,k. Thus
N(A x B)= kN(B) = N(A)N(B) and the proof of the theorem is completed.
I
Example 1.3 Routes revisited Suppose that there are three different roads a 1 , a 2 and a 3 from town 0 to town A, four different roads b1, b2 , b3 and b4 from town A to town B, and two different roads c 1 and c 2 from town 0 directly to town B. Calculate the number of different routes from town 0 to town B.
BASIC COUNTING PRINCIPLES
18
A route from town 0 to town B through town A may be represented by an ordered pair (a, b), where a is a road from the set A = {a 1 , a 2 , a 3 } and b is a road from the set B = {b1 , b2 , b3 , b4 }. Thus the set of routes from town 0 to town B through town A is the Cartesian product Ax B = {(a, b) :a E A, bE B}. Also, the set of routes from town 0 to town B directly is C = { c 1 , c2 }. Therefore, by the addition principle and expression (1.2), the number of different routes from town 0 to town B equals N(A)N(B)
+ N(C)
= 14.
D
A subset S 2 of the Cartesian product !! 2 , of a finite universal set fl with itself, cannot always be written as a Cartesian product A x B, with A ~ fl and B ~ fl. Nevertheless, an expression similar to (1.2) may be obtained for the number of elements of s2 when the number of selections for the first coordinate and, for each of these selections, the number of selections for the second coordinate, are known. Specifically, the next corollary, which is readily deduced from Corollary 1.1 and Theorem 1.5, is concerned with the number of elements of s2. COROLLARY 1.2 lfS2 = (A 1 x B 1 ) + (A 2 x B2) + · · · + (Ak x Bk), where A 1 ,A2 , . .. ,Ak are finite and pairwise disjoint sets and B 1 , B 2 , ... , Bk are finite sets, then
In particular; if Ai = {ai} and Bi = {bi,l, bi,2, ... , bi,r }, i = 1, 2, ... , k, whence s2 = {(ai,bi,j). i = 1,2, ... ,k, j = 1,2, ... ,r}, and introducing A= {a 1,a2, ... ,ak}, then N(S2)
= N(A)N(Bi) = kr.
( 1.4)
The cardinality of the Cartesian product of more than two finite sets is inductively deduced from Theorem 1.5. COROLLARY 1.3 If A,, A2, ... , An are finite sets, then
N(A 1 PROOF
X
A2
X · ·· X
An)= N(AI)N(A2) · · · N(An)·
(1.5)
Note first that, according to Theorem 1.5, relation (1.5) holds for
n = 2. Suppose that (1.5) holds for n - 1, that is,
THE PRINCIPLES OF ADDITION AND MULTIPLICATION 19
1.3.
It will be shown that (1.5) holds also for n. For this reason put A= At x A 2 x · · · x An-t and B =An, whence
A
X
B =(At
X
A2
X··· X
An-t)
X
An= At
Thus, according to Theorem 1.5, N(A x B) that ( 1.5) holds for n - 1, it follows that
N(A1
X
A2
X··· X
An)= N(At
X
X
A2
X··· X
An-t
X
An.
= N(A)N(B), and the hypothesis A2
X··· X
An-t)N(An)
= N(At)N(A2) · · · N(An_t)N(An)
and according to the principle of mathematical induction, (1.5) holds for every integer n 2: 2. I
Example 1.4 Binary number system In the binary number system each number is represented by a binary sequence of Os and Is. For example, the numbers 5 and II, which are expressed in terms of powers of 2 as 5 = 1· 22 + 0 · 21 + 1· 2° and 11 = 1· 23 + 0 · 22 + 1· 21 + 1· 2°, are represented by the binary sequences (1,0, 1) and (1,0, 1, 1), respectively. Note that, with the exception of the number 0, which is represented by the one digit sequence (0), all the other binary sequences start with digit 1. Calculate the number of four-digit binary sequences. The first digit of a four-digit binary sequence is necessarily l. Further, a fourdigit binary sequence (1, at, a 2 , a 3 ) uniquely corresponds to an ordered triple (a 1 ,a2,a3), with ai E Ai = {0, 1}, i = 1, 2,3. Thus, the set B 4 of four-digit sequences is equivalent to the set At x A2 x A3, of ordered triples (at, a 2, a3), with ai E Ai = {0, 1}, i = 1, 2, 3 and by Lemma 1.1 and Corollary 1.3, N(B4) = N(At
X
A2
X
A3) = N(At)N(A2)N(A3) = 23.
Clearly, the 8 four-digit binary sequences are the following
(1, 0, 0, 0), (1, 0, 0, 1), (1, 0, 1, 0), (1, 0, 1, 1), (1, 1, 0, 0), (1, 1, 0, 1), (1, 1, 1, 0), (1, 1, 1, 1) and represent the integers 8, 9, 10, 12, 13, 14 and 15.
0
Example 1.5 Factors of a positive integer Evaluate the number of positive integers that are factors of the number 300. Note first that the number 300 is expressed as a product of prime numbers as
Each factor of this number is of the form
BASIC COUNTING PRINCIPLES
20
wherei 1 E A 1 = {0, 1, 2}, i 2 E A 2 = {0, 1} and i 3 E A3 = {0, 1, 2}. Therefore, by ( 1.5), the number of different factors of the number 300 equals
The set of these 18 factors is
{1,2,3,4,5,6,1o,12,15,2o,25,3o,5o,6o,75,1oo,15o,3oo}.
D
An extension of expression (1.4) to a subset Sn of the n-fold Cartesian product is given in the following corollary.
nn
COROLLARY 1.4 Let Sn be a subset of elements (w1,w2, ... ,wn) of then-fold Cartesian product fl'l, of a finite universal set Sl with itself Specifically, assume that the first coordinate w1 can be selected from a set A = {a 1, a2, ... , ak,} of k 1 elements and, for each selection w 1 = ai 1, the second coordinate w 2 can be selected from a set Ai 1 = {ai,,1, ai,,2, ... ,ai 1,k2 } of k2 elements, i1 = 1, 2, ... , k1, and so on. Finally, assume that for each selection w1 = ai 1 , w2 = ai 1,i2 , ... , Wn-1 = a; 1 ,i2 , ... ,in-1' the last coordinate Wn can be selected from a set Ai,,i2 , ... ,in-I = { ai, ,i2,··· ,in-1 ,1' a;, ,i2,··· ,in-! ,2, ... , ai, ,i2, .. ,in-1 ,kn} of kn elements, ir = 1, 2, ... , kr. r = 1, 2, ... , n - 1. Then
REMARK 1.6
Relation ( 1.6) is often referred to as the multiplication principle and can be restated as follows: if an element (object) w1 can be selected in k 1 ways and for each of these ways an element w2 can be selected in k 2 ways and so on and for each of these ways an element Wn can be selected in kn ways, then all the elements (objects) w1 and w2 and··· and Wn can be selected (sequentially) in k1 k2 · · · kn ways. In many applications the set of different selections of wi cannot be identified in advance, but only after the selections of w1, w2, ... , wi_ 1. This does not cause any difficulty in the application of the multiplication principle since the only requirement is the cardinality of the set of selections of wi. This point is further clarified I in the next example.
Example 1.6 Booking tickets Suppose that there are n stations on a railway line. How many different kinds of tickets have to be provided so that booking is possible from any station to any other station? Let us represent the route from station si to station si by the pair (si, si), i =/= j. The set of different kinds of tickets to be provided is equal to the set 5 2 of ordered
1.3.
THE PRINCIPLES OF ADDITION AND MULTIPLICATION
21
=
pairs (a, b) of different stations. Note that the set of different selections of a is A { s 1 , s 2 , ... , sn}, while the set of different selections of b is not known in advance, since b has to be different from a. After the selection a si from the set A, the set of different selections of b is Bi = A - {si} = { s 1, s 2 , ... , si-I, si+ 1, ... , sn }. Irrespective of the possibility of identifying the set Bi, its cardinality is in any case equal to N(Bi) n- 1 and hence formula (1.4) can be applied. Therefore
=
=
N(Sz) = N(A)N(Bi) = n(n- 1),
0
which is the required number of different kinds of tickets.
Example 1.7 The number of subsets of a finite set
=
=
Consider a finite set Wn {WI, W2, ... , Wn} and let An P(Wn) be the set of subsets of Wn. The number sn = N(An) may be determined as follows. Note first that, to any subset U of Wn there corresponds an ordered n-tuple (ai,a 2 , •.. ,an) such that aj 0 if WJ ¢ U, and aj 1 if Wj E U for j = 1, 2, ... , n. In this way, the null set 0 ~ Wn corresponds to the ordered n-tuple (0, 0, ... , 0), with all components zero; the one-element set {WI} ~ Wn corresponds to the ordered n-tuple (1, 0, ... , 0), with the first component equal to one and the rest components zero; and the set Wn ~ Wn corresponds to the ordered n-tuple (1, 1, ... , 1), with all components equal to one. This correspondence is one to one and, according to Lemma 1.1, the number sn of subsets ofWn is equal to the number of ordered n-tuples (a I, a 2 , ... , an), with aj E Aj 0, 1}, which, in tum, is equal to the number of elements of the Cartesian product AI x A2 x · · · x An, with A.J {0, 1 }, j 1, 2, ... , n. Then, according to formula (1.5), this number is equal to Sn = 2n. 0
=
=
={
=
=
Example 1.8 Sum of terms of a geometric progression The sum of the first n terms of a geometric progression with the first term equal to 1 and proportion equal to 2 may be derived combinatorially as follows: Let En be the set of nonempty subsets of a finite set Wn w1 , w2 , •.. , Wn} and Ck the Set of SUbsets of the finite set Wk = {WJ, W2, ... , Wk }, each of which contains Wk, k = 1,2, ... ,n. Then cl,C2,··· ,Cn are pairwise disjoint and C1 + C2 + · · · + Cn = En. Note that, to each subset of Wk containing the element wk, corresponds a subset of Wk-I (without any restriction), from which it is obtained by adding wk, k = 2, 3, ... , n. This correspondence is one to one and hence the number N(Ck) is equal to the number of subsets of Wk-l, which, in tum, according to Example 1.7, is equal to N(Ck) = 2k-l, k = 2, 3, ... , n. Especially, the number of subsets of W 1 = {WI} containing the element w 1 is equal to N(CI) = 1. Further, the number of nonempty subsets of Wn is equal to N(En) 2n - 1. Therefore, on using (1.1 ), it follows that
={
=
1 + 2 + 22
+ · · · + 2n-I
= 2n - 1,
BASIC COUNTING PRINCIPLES
22
0
which is the required expression.
Before concluding this section on the basic counting principles, it is worth noting that, in several enumeration problems, the number of configurations satisfying specified conditions can only be expressed recursively. In addition, even when the direct expression of this number in a closed form is possible, a recurrence relation is useful at least for tabulation purposes. The notion of a recurrence relation, which is extensively used in the sequel, is briefly introduced here. (The basic methods of solving recurrence relations are presented in Chapter 7.) Consider a sequence of numbers an, n = 0, 1, .... In combinatorics an may represent the number of subsets of a finite set Wn = {WI, w2, ... , wn} that satisfy a set of specified conditions. In general, we may assume that an+r = F(n, an, an+l, ... , an+r-1), n = 0, 1, ....
This equation, in which the term an+r is expressed as a function of the preceding r terms, an, an+ I, ... , an+r-l, of the sequence, is called recurrence relation of order r. The notion of a recurrence relation is also introduced in the case of a double-index sequence an,k, n = 0, 1, ... , k = 0, 1, .... So, the equation
is called recurrence relation of order (r, s). Notice that r is the order of this recurrence relation with respect to the first index (variable) and s is its order with respect to the second index (variable). In this case the term an+r,k+s is expressed as a function of the (n + 1)(k + 1)- 1 = nk + n + k terms an,k, an,k+l, an+l,k, ... , an+r-l ,k+s> an+r,k+s-l of the double-index sequence. From the computation point of view, the tabulation of the number an, for n = 0, 1, ... , or the number an,k, for n = 0, 1, ... , k = 0, 1, ... , can be done more easily step-by-step by using the corresponding recurrence relation. For this purpose, the knowledge of the r initial conditions (values) a0 , a 1 , ..• , ar-l, in the first case, and of the r + s initial conditions (sequences) aok,alk,··· ,ar-lk and ano,anl,··· ,ans-I, in the second case, are required. The initial conditions guarantee the uniqueness of the solution of the recurrence relation. In this section only a very simple example of a recurrence relation is discussed. Closely connected with a recurrence relation is the (finite) difference equation, which is defined as follows. The first order finite difference, with increment h, of a function y = f(x) denoted by .tJ.hf(x), is defined by .tJ.hf(x) = f(x +h)- f(x). Recursively, the r-th order finite difference of f(x) is defined by .:1/J(x) = .tJ.h[.tJ.~-I f(x)], r = 2, 3, .... Introducing the displacement (shift) of f(x), which is defined by Ehf(x) = f(x +h) and recursively by Ehf(x) = Eh[E~-l /(x)] = f(x + rh), r = 2, 3, ... , it follows 1
I
I
1
I
I
1.3.
THE PRINCIPLES OF ADDITION AND MULTIPLICATION 23
that !lhf(x) form
= Ehf(x)- If(x),
Ef.f(x)
where If(x)
= F(x, f(x), Ehf(x), ...
=
f(x). An equation of the
, E~-I f(x)),
xER
or equivalently of the form
ll'f.f(x) = G(x, f(x), !lhf(x), ... , .:1~-I f(x)) = 0, x E R is called difference equation of order r. In the particular case where the function y = f(x) is defined only on a countable set of points {x 0 , XI, •.. , Xn, ... } which, in the applications of the calculus of finite differences, are usually equidistant, Xn = x 0 + nh, n = 0, 1, ... , the transformation Zn = (xn- x 0 )/h, n = 0, 1, ... is used. So, the function f is transformed to the function g, with g(n) = f(x 0 + nh), which is defined on the set {0, 1, ... } of nonnegative integers. In this particular case, using the sequence
Yn=g(n)=f(xo+nh), n=0,1, ... , and since E~(xn) = f(xn difference equation, with x
Yn+r
+ jh)
= Xn,
= g(n + j) = Yn+j, j = 1, 2, ... , the may be written as
= F(n,yn,Yn+I•···
,Yn+r-I), n
= 0,1, ...
,
which is a recurrence relation of order r. Note that the method of solving a finite difference equation is the same as that of solving the recurrence relation even when the function y = f(x) is defined for every x E R. In the last case an investigation of the solution is required.
Example 1.9 A recurrence relation for the number of subsets of a finite set As in Example 1. 7, consider a finite set W n = { w 1 , w 2 , . . . , Wn} and let An = P(Wn) be the set of subsets of Wn. The number sn = N(An) may be deduced recursively as follows. The set An+ I = P(Wn+I) of subsets of Wn+l = {w1, w2, ... , Wn, Wn+l} can be divided into the following two disjoint subsets: the set A of subsets of Wn+ 1, each of which does not include the element Wn+ I and the set B of subsets of Wn+I, each of which includes the element Wn+l· Hence An+ I =A+ Band, by the addition principle, N(An+d = N(A) + N(B). Clearly, A = An and so N(A) = N(An). Further, to each subset B that belongs to B there uniquely corresponds the subset A = B - {Wn+l} that belongs to An and so, by Lemma l.I, N(B) = N(An)· Consequently N(An+I) = 2N(An) and Bn+I = 2sn, n = 0, 1, ... ,
with so = 1, which is the number of subsets of the null set. This is a homogenous recurrence relation of the first order with constant coefficients. Iterating (applying
BASIC COUNTING PRINCIPLES
24
repeatedly) it, we find
and, since so
1.4
= 1, we conclude that Sn = 2n.
0
DISCRETE PROBABILITY
The theory of probability is concerned with the study of mathematical models, known as stochastic models, which are used in explaining random or stochastic phenomena or experiments. The basic characteristic of these experiments is that the conditions under which they are performed and the values of various quantities appearing in them do not predetermine the outcome, but do predetermine the set of possible outcomes. The element of randomness lies in the inability of predetermining the outcome of random phenomena or experiments. The set n of the possible outcomes of a random phenomenon or experiment is called sample space and the elements w of n are called sample points. It should be noted that it is possible to define more than one set of possible outcomes for each random phenomenon or experiment and, according to the requirements of the specific problem, the more appropriate of these is chosen as the sample space. The inappropriate choice of the sample space leads to many paradoxes. The sample space may be finite or countably infinite or uncountable. For the cases of finite or more generally countable sample spaces, on which this presentation concentrates, every subset A of n is called an event. An event A = { w} containing only one element of n is called an elementary or simple event. The classical definition of probability was first expressed by De Moivre ( 1711) as follows: the probability of the occurrence of an event is the fraction whose numerator is the number of possibilities favorable for the occurrence of the event and the denominator is the number of all possibilities, provided that all possibilities are equally probable. This condition is essential because, otherwise, by considering the two possibilities of the occurrence and the non-occurrence of an event, it can be concluded that its probability is one half. This is not true in general since these two cases are not always equally probable. The concept of equally probable cases should be defined independently of the notion of (the measure) of probability; otherwise, in the classical definition of probability, there would be a vicious circle. This is achieved by the adoption of the principle of the want of sufficient reason. So if, according to all available data, no reason is known for regarding any of
1.4. DISCRETE PROBABILITY
25
the possibilities more or less probable than any other, then all possibilities are regarded as equally probable. It should be noted that the classical definition of probability applies only on finite sample spaces. The foundation of the theory of probability based on the classical definition of probability is attributed to Laplace (1812). Consider a finite sample space fl = {w1 ,w2 .•. ,wN }, whose elements (sample points, possibilities) are, according to the principle of the want of sufficient reason, equally probable and an event A E P(fl). The probability of A, denoted by P(A), is given by the expression P(A) =
N~A)'
=
where N(A) is the number of elements of A and N N(fl) is the number of elements of the sample space fl. Note that the condition of equally probable sample points (possibilities) is then expressed by
P({wi})
= P({w2 }) =
···
1
= P({wN}) = N"
According to the definition of the classical (uniform) probability, the calculation of the probability P(A) of an event A in a finite sample space fl whose elements are equally probable is a purely combinatorial problem of counting the numbers N(A) and N of certain configurations. REMARK 1.7 It is worth presenting the most important properties of the classical probability that subsequently inspired the suitable choice of axioms in the axiomatic foundation of the theory of probability. The set function P(·), which, in the case of a finite sample space fl whose elements are equally probable, assigns the number P(A) = N(A)/N to each event A E P(fl) is (a) nonnegative: P(A) 2: 0 for every event A E P(fl), (b) normalized: P(fl) = 1 and (c) finitely additive: P(A +B) = P(A) + P(B) for any disjoint (mutually exclusive) events A, BE P(fl). Properties (a) and (c), which follow directly from the definition of classical probability and the corresponding properties of the set function N ( ·), made P( ·) a finitely additive measure on P( fl) (see Remark 1.3). Property (b), which is a direct consequence of the definition of classical probability, distinguishes the probability from other measures. Note that, from (c) and the principle of mathematical induction, the next expression is deduced: P(A1
+ A2 + · · · +An)
= P(AI)
+ P(A2) +. ·. + P(An),
for any pairwise disjoint events A 1 ,A 2 , ... ,An E P(fl). Also, if Wi, i 1, 2, ... , n are finite sample spaces, each with equally probable elements, and Ai E P(Wi). i = 1, 2, ... , n, then from (1.5) it follows that P(A 1 X A2
X ·· · X
An)
= P(AI)P(A 2 ) · · · P(An),
26
BASIC COUNTING PRINCIPLES
provided the elements of the sample space fl = WI equally probable. I
X
w2
X ••• X
Wn are also
An extension of the classical definition of probability, in the case of a finite sample space fl whose elements are not necessarily equally probable, constitutes the next definition of probability: A set function P(·) defined on the set of events P(fl), assuming real values and satisfying properties (a), (b) and (c) is called probability (or measure of probability). These properties are quite general and, for the calculation of the probability of any event A E P(fl), the knowledge of the probabilities Pi = P( { wi}) of the elementary events {wi}, i = 1, 2, ... , N is required. Indeed, if A= {willWi 2 , • •• ,w;k}, then, with Air = {w;r}, r = 1, 2, ... , k, it follows that A= A;,
+ Ai2 + · · · + Aik,
Air n Ai, =
0, r
-::f. s,
and so k
P(A) = LP({wir}). r=O
In the special case in which P({w!}) it reduces to
= P({w2 }) = ··· = P({wN}) = 1/N,
k P(A) = N'
with k = N(A), which is the classical definition of probability. Three useful properties of the probability that follow directly from the classical definition of probability and Theorem 1.4 are quoted here for easy reference in the following chapters. The probability of the complementary event A' of A may be expressed as P(A') = 1 - P(A).
For any events A and B, the next relation holds P(A- B)
and particularly for B
~
= P(A) -
P(A n B)
A,
P(A- B)= P(A)- P(B).
Examples with applications of the classical definition of probability are given in the following chapters after the introduction of the combinatorial concepts necessary for their presentation.
1.5. SUMS AND PRODUCTS
1.5
27
SUMS AND PRODUCTS
A finite sum of n terms, a 1 , a 2 , ... , an, is denoted by
or briefly by
n
Sn = Laj. j=l The number 1 is called the lower limit and the number n the upper limit of the sum. Note that the lower limit can be any integer r < n. Clearly, the value of the sum n
Sr,n = Lai j=r is completely determined by the general term aj (j = r, r + 1, ... , n) and the limits r and n and does not depend on the (bound) variable j even though it occurs in its expression. Thus, the variable j can be replaced by another variable i without any effect on the value of the sum: n
n
Sr,n = Laj =La;= ar +ar+l +···+an· j=r i=r More generally, the transformation i = j + m, with inverse j i - m, where m is a given integer, may be used. In this case, the general term aj (j = r, r + 1, ... , n) becomes b; =ai-m (i = r + m, r + m + 1, ... , n + m) and the sum sr,n is transformed to
n Sr,n
n+m
= z=aj = j=r
and particularly for m
L
n+m a;-m
=
i=r+m
2::
b;
i=r+m
= -r n
n-r
n-r
Sr,n = Laj = Lai+r j=r i=O
= Lb;. i=O
This brief notation of simple (with respect to one variable) sums is also used to represent double (with respect to two variables) sums and generally multiplesums. So,thesumofthetermsa;,j,j = 1,2, ... ,k,j = 1,2, ... ,n, is denoted by n
Sk,n =
k
L L a;,j
j=l i=l
28
BASIC COUNTING PRINCIPLES
and, more generally, the sum of the terms k = 1, 2, ... , r, is denoted by nr
Jr=l
, ...
,J,,
jk
1, 2, ... ,nk,
nt
:2: ···:2: :2:
=
Sn,,n2 ... ,n,
n2
aJd 2
aJ,,j2,···,Jr·
}2=1 }J=l
REMARK 1.8 If the set J of the values of the variable j and, more generally, if the sets J 1 , Jz, ... , Jr of the values of the variables j 1 , jz, ... , ir, respectively, are not sets of consecutive integers, the following notation of the sums is adopted:
s
= :2: aj' s = jEJ
:2: ... :2: :2: irEJr
ajloi2o··· ,j,.
}2Eh j, EJ1
When the sets J and J 1 , J2 , ... , Jr are defined by the conditions C and C 1 , C 2 , ... , Cr. respectively, the following notation of the sums may be used:
According to the last notation, the sums n
= :2: aj'
Sn
n
Sk,n
k
= :2: :2: ai,j
j=l
j=l i=l
may, equivalently, be written as: Sn
:2:
=
l~j~n
aj,
Sk,n
=
:2: :2:
aj·
l~j~n l~i~k
If the expression of the conditions C and C 1 , C 2 , ... , Cr is not very simple, then it is preferable to avoid writing it underneath the summation sign. In this case the conditions are written after the sum in the form of phrases like "where the summation is extended over all j or j 1 , jz, . .. , ir such that the conditions C or cl' c2, ... 'Cr are satisfied." I REMARK 1.9
If in the sum
the general term is constant (independent of the subscript j): ai 1,2, ... ,n,then n
sn =
:2: a = a + a + · · · + a = na. j=l
a, j
29
1.5. SUMS AND PRODUCTS
The special case a
= 1 is particularly noted: n
L1=n. j=l
In general,
L1 = N(J) jEJ
and
L ... L L irEJr
1 = N(J1 )N(J2 )
.•.
N(Jr),
j,EJ, j,EJt
I
for any finite sets J, J1, )z, ... , Jr.
Some basic properties of finite sums, which constitute simple extensions of the corresponding properties of the sum and product of two real numbers, are presented in the next theorem.
THEOREM 1.6 n
n
LbaJ = bLaJ, j=l
j=l
n
n
n
j=l
i=l
j=l
n
k
n
j=l
i=l
Lai + Lb; = L(aJ + bJ), k
k
n
l:aJ Lb; = LLaJbi = LLaJb;, n
j=l i=l
k
i=l j=l
k
n
LLai,J = LLai,J· j=l i=l
i=l j=l
REMARK 1.10 As regards the possibility of changing the order of summation in double (or multiple) sums, special care should be given when the set of values of one variable depends on the set of values of the other variable. A characteristic example of this nature constitutes the sum n
j
LLai,J, j=l i=l
where, for a given value of the variable j E J 1 = {j : 1 ~ j ~ n }, the set /1 = { i : 1 ~ i ~ j} of values of the variable i depends on the value j E J 1 . This
BASIC COUNTING PRINCIPLES
30
dependence can be reversed without altering the set K = { (i, j) : 1 ~ i ~ j ~ n}, of values of the pair (i, j) of variables in the double sum. Indeed, for a given value of the variable i E I 2 = {i : 1 ~ i ~ n}, the set of values of the variable j is h = {j : i ~ j ~ n}. Hence n
n
j
LLai,j
n
= LLai,j = LLai,j·
j=l i=l
i=l j=i
(i,j)EK
As a second example, the relation n
n-j+l
n
n-i+l
j=l
i=l
i=l
j=l
'L 'L a;,j='L 'L
a·. t,J
I
can be similarly established.
A finite product of n terms, a 1 , a 2 , ... , an, is denoted by
or briefly by n
Pn
=II aj. j=l
Clearly, all notational and other remarks previously made on finite sums are applied, with the necessary changes, to finite products as well. The brief notation of simple products is also used for the presentation of double and more generally multiple products. So, the product of the terms i = 1,2, ... ,k, j = 1,2, ... ,n, is denoted by
ai,j,
n
Pk,n
=
k
II II a;,j j=l i=l
and more generally, the product of the terms aj,J 2 , ... ,J,, k = 1, 2, ... , r, is denoted by n1'
Pn, ,n2,··· ,n,
n2
n1
II ... II II
=
j,=l
a)! ,j,, ... ,j,.
)2=1)1=1
It can be easily shown that n
k
k
n
II II ai.j =II II ai,j, J=l i=l
ik = 1,2, ... ,nk,
i=l j=l
1.5. SUMS AND PRODUCTS
n
31
j
n n
II II ai,j = II II ai,j, i=l j=i
j=l i=l
n n-j+l
II II j=l
n n-i+l
ai,j
= II
II
i=l
j=l
i=l
ai,j.
The union of n sets, A 1 , A 2 , ... , An, is briefly denoted by n
UAi := A1 U A2 U · · · U An i=l
and the intersection of these sets by
n n
Ai := A1
n A2 n · · · n An
i=l
and both share properties analogous to those of finite sums and products. Example 1.10 Sum of terms of an arithmetic progression The general term of an arithmetic progression is a1 = a+ jb, j = 1, 2, ... , n. The sum n
sn(a,b)
= L:aj,
aj =a+jb, j
= 1,2, ... ,n,
j=l
may be evaluated as follows. Using the transformation i = n- j + 1, with inverse j = n- i + 1, the general term aj = a+ jb (j = 1, 2, ... , n) takes the form bi an-i+l ={a+ (n + 1)b}- ib (i = 1, 2, ... , n). Therefore
=
n
sn(a,b) = Lbi, bi ={a+ (n + 1)b}- ib, i
= 1,2, ...
i=l
and
n 2sn(a, b)= L aj j=l
n
+L i=l
n bi
= L(aj + bJ)· j=l
Since a1 + b1 = 2a + (n + 1)b, j = 1, 2, ... , n, it follows that
2sn(a,b) =n{2a+(n+1)b} and Sn
'b)_ n{2a + (n (a, b) _~( - L a +J j=l
2
+ 1)b} .
,n
BASIC COUNTING PRINCIPLES
32
In particular, for a = 0 and b = 1, the last expression reduces to Sn
D
+ 1).
= t j = n(n
2
j=l
Example 1.11 Evaluate the sum
n
Cn,2
= "'"' L....,]·2 · j=l
Using the identity
we get
3cn,z
n
n
j=l
j=l
= 3 Li 2 = Z:U + 1) 3 -
n
n
n
j=l
j=l
j=l
Z:i- 3 Li- L 1.
Putting in the first sum of the right-hand side i 1.10 and Remark 1.9)
= j + 1 and, since (see Example
t j = n(n2+1), t1=n, j=l
j=l
we find n
n+l
3cn,2
=L
i3-
i=2
Li3- 3n(n2+ 1) -
n
= (n +
1)3- 1- 3n(n2 + 1) - n
j=l
n(2n 2 + 3n 2 + 1)
n(n + 1)(2n + 1)
2
2
Hence
Cn,z
= t j 2 = n(n + 1~(2n + j=l
Example 1.12 Evaluate the sum
n
Cn=
n
2:2)j. j=l i=l
i+j=n
1).
D
1.5. SUMS AND PRODUCTS
33
Introducing in the inner sum the transformation k = n- i, with inverse i = n- k, and taking into account the restriction i + j = n, it follows that, for a given j E {1, 2, ... , n }, k = j. Then the sum Cn reduces to n
n
n
j=l
j=l
j=l
Since (see Examples l.l 0 and l.ll)
~ . _ n(n + 1) ~ .2 _ n(n L... 1 2 ' L... 1 j=l
+ 1)(2n + 1) 6
'
j=l
it follows that
C _ n 2 (n
+ 1) _
n (n
+ 1) (2n + 1)
2
n-
6
n(n 2 - 1) 6
D
Example 1.13 Sum of terms of a geometric progression The general term of a geometric progression is aj = abi- 1 , j = 1, 2, ... , n. The sum n
n
gn(a,b) = Laj =a Lbi- 1 j=l
j=l
may be evaluated as follows: multiplying both sides of this expression by (1- b), we get
(1- b)gn(a, b)
n = a(1- b)~ bi- 1 =a
( n
~ bi- 1
and so ~
·_ 1
= L... ali'
=
a(1 - bn) _ b .
j=l
1
Note that the sum 00
g(a, b)=
L abij=l
1
,
n
~ bi
+ 1, whence j
Putting in the second sum of the last equality i = j
gn (a, b)
-
)
.
= i - 1, we find
34
BASIC COUNTING PRINCIPLES
of an infinite numberoftermsof a geometric progression aj = af>J-I ,j = 1, 2, ... , with lbl < 1, may be calculated by using the last result. Indeed, from co
~ ahl- 1 L... j=1 and since limn-; co bn
(1 _ bn)
n
= n-->co lim ~ abl- 1 = lim _a-'-----'L... n-->co 1 - b j=1
= 0 for lbl
< 1, it follows that co
~
·-I
g(a,b) = L...afY j=1
a
=
1
0
_ b.
Example 1.14 Evaluate the double sum Sn(a,b) = LLai-lb1-1. t:::;i:::;j:::;n The set of values of the pair (i, j) of (bound) variables of this sum, K = { (i, j) : 1 ::; i ::; j ::; n},
may be expressed as follows: for a given value of the variable j E J = {j 1 ::; j ::; n }, the set of values of the variable i is I = { i : 1 ::; i ::; j} and hence n
Sn(a,b)
j
=LLai-1b1-1 =LLai-1b1-I =LLai-Ib1-I. jEJ iEl
(i,j)EK
j=l i=l
Upon using the formula for the sum of a finite number of terms of a geometric progression (see Example 1.13), we get
and so 1- bn Sn(a, b)= (1- a)(1- b)
a(1 - anbn) (1- a)(1- ab).
Example 1.15 Evaluate the products n
Pn
=IT a1, j=O
n
Pn
j
=IT IT aib1-i. j=O i=O
0
35
1.6. BIBLIOGRAPHIC NOTES
The first product, on using the formula for the sum of a finite number of terms of an arithmetic progression
t)=n(n +l), 2 j=l
is evaluated as n
Pn
=II
= a1+2+···+n = an(n+l)/2.
aj
j=O
In a similar way the second product is expressed as n
Pn
n
j
=II II ai!J-i = II j=Oi=O
n
ai(Hl)/2/}(j+l)/2
=
II (ab)J(j+l)/2 j=O
j=O
and, since
~ j(j + 1) - ~ ~ L...t
2
~ ~.
·2
+ 2 L...tJ
- 2 L...t 1
j=l
j=l
=
j=l
n(n + 1)(2n + 1) 12
+
n(n + 1) 4
=
n(n + l)(n + 2) 6
'
is deduced as n
Pn
j
=II II ai!J-1 = (abt(n+l)(n+2)/6.
D
j=Oi=O
1.6
BffiLIOGRAPHIC NOTES
The basic counting principles of addition and multiplication have been presented, along with the necessary elements of set theory. Also, discrete probability was introduced and properties of sums and products have been discussed. Much of this classical material may be found in calculus and probability books. The first two chapters of the book by T. Apostol (1962) are devoted to this subject. The classical book of W. Feller (1968) may also be used for further reading. The book by F. N. David (1962) contains a lot of information on counting and its connection with the probability of games of chance.
BASIC COUNTING PRINCIPLES
36
1.7
EXERCISES
1. Suppose that three distinguishable (different) coins are tossed. Write down the elements s = (a, b, c) of the set S 3 of possible outcomes and verify that N(S3 ) = 8. A map F from the set S 3 to the set N3 = {0, 1, 2, 3}, which, to each element (outcome) of S 3 corresponds the number of heads registered in it, is useful in probability theory. For each elements = (a, b, c) from the set S 3 , write down its image F(s) = n from the set N 3 .
2. Suppose that two distinguishable dice (one white and one black) are rolled and let s2 = {(w,b): w = 1,2, ... ,6, b = 1,2, ... ,6} be the set of possible results. (a) Find the number N(S2 ) of possible results. Let Ak be the subset of possible results ( w, b) with sum w + b = k, for k = 2, 3, ... , 12. (b) Write down the elements of each of the sets A 2 , A 3 , ... , A 12 . 3. Suppose that three distinguishable dice (one white, one black and one red) are rolled and let s3 = {(w,b,r): w = 1,2, ... ,6, b = 1,2, ... ,6, r = 1, 2, ... , 6} be the set of possible results. (a) Find the number N(S3 ) of possible results. Further, let A be the subset of possible results (w, b, r) with sum w + b + r > 10 and A' its complement (with respect to S 3 ). Show that the sets A and A' are equivalent, and conclude that N(A) = 108. 4. Suppose that the 5 left-hand gloves £ 5 = {h, h, ... , l5} of 5 pairs of gloves G5 = {(l 1,rt),(h,r2), ... ,(l5,r5)} are kept in drawer D1, while the corresponding 5 right-hand gloves R 5 = {r 1, r2, ... , r 5} are kept in a second drawer D 2 . Calculate the total number of ways of choosing one left-hand glove and one right-hand glove. Also, find the number of ways of choosing one left-hand glove and one right-hand glove that do not form a pair. 5. Find the number N(Bn) of n-digit binary sequences and the (total) number N(Tn) of binary sequences of at most n digits. 6. The Morse code. A letter of the alphabet is represented by a sequence of telegraphic "dot" and "dash" signals with repetitions allowed. Find the number ofletters that can be represented by sequences of at most n symbols. 7. Calculate the number of positive integers with exactly one digit equal to 3 that are (a) greater than or equal to 10 and less than 100 and (b) greater than or equal to 100 and less than 1000. Combining these results, conclude (c) the total number of positive integers with exactly one digit equal to 3 that are less than 1000. 8. Calculate the number of odd positive integers that are (a) greater than 10 and less than or equal to 100, (b) greater than 100 and less than
1. 7. EXERCISES
37
or equal to 1000 and conclude (c) the total number of odd positive integers that are less than or equal to 1000. 9. An alphabet is, in general, a set L = {h, h, ... , ln}, of n different letters. An ordered k-tuple of letters from the alphabet L (repetitions allowed) is a k-letter word. Calculate (a) the total number of three-letter words from the alphabet L, (b) the number of three- letter words that do not have repeated letters and (c) the number of three-letter words that contain the letter ln. 10. Evaluate the number of positive integers that are factors of the following numbers: (a) 23 · 32 ·5 1 , (b) 900 and (c) 9800. 11. (Continuation) Let N = p~ 1 p~ 2 • • • p~", where Pi, i = 1, 2, ... , n, are prime numbers and ki, i = 1, 2, ... , n, are positive integers. Show that the number of positive integers that are factors of N is equal to A(k1, k2, ... , kn) = (kl + 1)(k2 + 1) · · · (kn + 1). 12. An examination sheet contains n multiple-choice questions. A list of four alternative answers, among which only one is correct, is provided to each question. A student taking such an exam answers each question by marking one of the given answers. Find the number of different ways of answering the examination. 13. Soccer's results foresight. Each card of soccer's results foresight contains 13 matches. The ordered pairs of teams are written on the card in horizontal rows with one pair in each row. The foresights are marked with the symbols 1, X and 2 for win, tie and defeat of the home (first) team. A complete series of foresights consists of 13 symbols put in a column, one for each match. (a) Find the number of different columns that can be written. (b) If one specific symbol is used to mark each of 6 suitably chosen matches, two specific symbols are used to mark each of 5 given matches and all three symbols are used to mark each of the remaining 2 matches, how many different columns can be written? 14. In Greece, for the registration of automobiles, three letters and a four-digit number are used. The 14 letters A, B, E, Z, H, I, K, M, N, 0, P, T, Y, X, common in the Greek and Latin alphabets, are used. Find the number of automobiles that can be registered with this system. 15. In a telegraphic station n different telegraphs are to be distributed to k operators for expedition. Find the number of different distributions. 16. Find the number of divisions of a finite set of n elements in (a) two subsets, (b) k subsets.
17. Show that the number of maps f of the set X into the set Y = {y 1 , y 2 , .•. , Yk} is equal to kn.
= {x 1 , x2, ... , Xn}
38
BASIC COUNTING PRINCIPLES
18*. The pigeonhole principle. Show that if n + 1 objects are distributed into n cells, then at least one cell contains at least two objects. Using this principle, prove that, if K = {k1 , k2, ... , kn+d ~ {1, 2, ... , 2n}, then two integers ki and ki, belonging to K, exist, such that each of these divides the other. 19*. (Continuation). Let k1 ,k2 , ... ,kn be positive integers. Prove that two subscripts i and j, with 1 ~ i < j ~ n, exist, such that the sum ki+I + ki+2 + · · · + kj is divisible by n. 20*. (Continuation). Show that among any six numbers chosen from the set {1, 2, ... , 10} there are at least two such that one of them is divisible by the other.
Chapter 2 PERMUTATIONS AND COMBINATIONS
2.1
INTRODUCTION
The notions of permutations, combinations and partitions of finite sets are very basic in the development of enumerative combinatorics; in fact, for a long time the aim of combinatorial analysis was to enumerate such permutations, combinations and partitions. Thus, an introduction to combinatorics naturally begins with a thorough study of these notions. After introducing the notions of permutations and combinations of a finite set in the first two sections of this chapter, a host of emerging enumerative problems is explored. The permutations and combinations of a finite set without and with repetition are enumerated. Also, the number of permutations with a specified number of repetitions, for each element of the finite set, is derived. In addition, recurrence relations for these numbers are deduced. The divisions of a finite set into subsets, which constitute an extension of combinations, are then enumerated. Further, the enumeration of partitions of a finite set, which is related to that of divisions, is treated in the same section. In a separate section, the problem of counting the number of integer solutions of a linear equation with unit coefficients is reduced to a problem of enumerating combinations. Some basic elements of enumeration of lattice paths, related to the enumeration of certain combinations, are presented. The reflection principle, which facilitates the enumeration of lattice paths, is demonstrated. Moreover, the famous ballot problem that led to the development of lattice paths is treated. The last section of this chapter is devoted to discussion of several applications in discrete probability and statistics. Specifically, the classical probabilistic problems of the most beneficial bet and the distribution of shares, with which a systematic study of enumeration of permutations and combinations began, are discussed. In addition, the Maxwell-Boltzman, Bose-Einstein and Fermi-Dirac stochastic models in statistical mechanics are briefly examined.
PERMUTATIONS AND COMBINATIONS
40
2.2
PERMUTATIONS
The concept of an ordered pair and generally of an ordered n-tuple, necessary for the definition of the Cartesian product of sets, has already been introduced in Section 1.2.2. The next definition of a permutation is based on this concept.
DEFINITION 2.1 Let Wn = {w 1 ,w2, ... ,wn}, a finite set ofn elements. An ordered k-tuple (a 1, a2, ... , ak), with ar E Wn. r = 1, 2, ... , k, is called k-pennutation of the set Wn or simply k-pennutation of n. Note that the elements (components) of a k-permutation of n may or may not be different elements of Wn. For the first case, the term k-permutation of n is preserved, while for the second and when unrestricted repetitions are allowed, the term k-permutation of n with repetition is used. When any restrictions on the number of repetitions exist they are explicitly specified. The unqualified term, permutation, is used for the particular case of an n-permutation of n. It is clear from the definition of a k-permutation of n, without or with repetition, that two k-permutations of n are different if at least one element in one of these permutations does not belong to the other. Further, two k-permutations of n containing the same k elements are different if at least one element occupies different positions in these permutations. Also, a kpermutation of n (without repetition) is meaningful when 1 ::; k ::; n, while a k-permutation of n with (unrestricted) repetition is always meaningful for k ~ 1 and n ~ 1. The following examples serve as to illustrate the different kinds of permutations and indicate the method of counting them. The latter will be helpful in understanding the general methods of enumeration of the different kinds of permutations.
Example2.1 (a) The 2-permutations of the set w4 = { Wl, w2, W3, W4 }, of 4 elements, are the following:
(w3,wl), (w3,w2), (w3,w4), (w4,w1), (w4,w2), (w4,w3). Note that, in any 2-permutation (al, a2) of the set w4 = {Wl, W2, W3, .W4 }, the first element a 1 can be selected from the set A 1 = W4, of 4 elements, while, after the selection of the first element, the second element a 2 , which must be
2.2. PERMUTATIONS
41
different from a I, can be selected from the set Az = W 4 - {a I}, of 3 elements. Thus, according to the multiplication principle, the number of 2-permutations of 4 equals 4 · 3 = 12. A simple counting of these permutations verifies this result. (b) The permutations of the set w3 = {Wt' Wz' W3}, of 3 elements, are the following: (w1,
wz, w3),
(w1, w3,
wz),
(w2, WI, w3),
(Wz, W3, WI), (W3, WI, Wz), (W3, Wz, WI), the number of which, according to the multiplication principle, is equal to 3 · 2 ·1 =
6.
0
Example 2.2 The 2-permutations of the set following:
(w 3,wi),
w4 = {WI, W2, WJ' W4}' with repetition, are the
(w3,w2), (w3,w3), (w3,w 4 ),
(w 4,wi), (w4,wz),
(w4,w3),
(w4,w4).
Note that, in any 2-permutation (a I' az) of the set w4 = {WI, Wz' W3, w4} with repetition, the first element a I as well as the second element az can be chosen from the set W 4 of 4 elements. Hence, according to the multiplication principle, the number of 2-permutations of 4, with repetition, equals 4 · 4 = 16. 0
Example 2.3 The permutations ofthe set w3 = {WI' Wz}' of two kinds of elements with ki = 2 elements wi and kz = 1 element w2 are the following:
Let us pretend that we do not know the total number of these permutations. The problem of enumerating them may be transformed to an equivalent counting problem, which can be solved by applying basic counting principles. In this particular case, a suitable transformation is carried out in two consecutive actions. Firstly, the two like elements WI are transformed to distinct, by assigning to each a second index, Wt,I, WI,2· Secondly, in each permutation the distinct elements WI,I and w 1 , 2 are permuted in all possible ways. Since 2 elements are permuted in only 2 ways, from each permutation 2 new permutations are constructed. The permutations thus constructed are all the permutations of the set Wz, 3 = { WI,I, WI,2, wz }, of 3 (distinct) elements, which according to part (b) of Example 2.1 are the following 6: ( Wt,I, WI,2, Wz),
(WI,2, WI,I, W2),
(WI,2, Wz, WI,i),
(wz, WI,I, W1,2), (wz,
( WI,l, W2, WI,2), WI,2, W1,t).
PERMUTATIONS AND COMBINATIONS
42
Thus, if x is the required number of permutations, then 2x
= 6 and so x = 3. 0
Example2.4 The 3-permutations of the set W3 = {w1, w2, W3}, with restricted repetition and, specifically, with the element w 1 allowed to appear at most k 1 = 2 times, the element w 2 at most k 2 = 1 time and the element W3 at most k3 = 3 times, are the following 19:
(w1, w2, w3), (w1, w3, w2), (w2, w1, w3), (w2, w3, w!), (w3, w1, w2), (w3, W2, w!), (wl 1 W1, W2), (WJ, W2, WJ ), (w2, W! 1 W! ), (w1, WI, W3), (w1, w3, w1 ), (w3, w1, WI), (wi, w3, w3), (w3, w1, w3), (w3, w3, w!), (w2, w3, w3), (w3, w2, w3), (w3, w3, w2), (w3, W3, w3).
0
The following two theorems are concerned with the number of permutations (without repetition). THEOREM2.1 The number of k-permutations ofn, denoted by P(n, k) or (n)k, is given by
P(n, k)
= (n)k = n(n- 1) · · · (n- k + 1).
(2.1)
PROOF Let Pk(Wn) be the set of k-permutations of the set Wn = {w1, w2, ... , wn}· In any k-permutation (a 1 , a 2 , ... , ak) of the set Wn, the first element a 1 can be selected from the set A 1 = Wn of n elements, while after the selection of the first element, the second element a 2 , which must be different from a 1 , can be selected from the set A 2 = Wn - { a 1 } of n - 1 elements. Finally, after the selection of the elements a 1 , a 2 , ... , ak_ 1 , the last element ak> which must be different from the k- 1 preceding elements, can be chosen from the set Ak = Wn - { a1, a2, ... , ak-1} of n - ( k - 1) elements. Thus, according to the multiplication principle,
= N(Pk(Wn)) = N(A!)N(A2) · · · N(Ak) = n(n -1) · · · (n- k + 1) and the required expression is established. I P(n, k)
For the particular case, k = n, of the permutations of n the next corollary follows. COROLLARY 2.1 The number of permutations ofn, denoted by P(n), is given by
P(n)
= P(n, n) = 1 · 2 · 3 · · · (n- 1) · n.
(2.2)
2.2. PERMUTATIONS
43
=
REMARK 2.1 The number P(n, k) (n)k, k = 1, 2, ... , n, n = 1, 2, ... , is a special case of the factorial of a real number x of order k (see Chapter 3 for details) and is called falling factorial of n of order· k. In particular, the falling factorial of n of order k = n, which is the product of all integers from 1 to n, is called n factorial and is denoted by n!. Thus, the number P( n) of permutations of n, according to (2.2), is P(n)
= n!,
n
= 1,2, ....
Further, multiplying expression (2.1) by (n- k) · (n- k- 1) · · ·3 · 2 · 1 and then dividing it by (n - k)! = 1 · 2 · 3 · · · (n - k - 1) · (n - k), the number P(n, k) (n)k may be rewritten as
=
=(n)k = (n n!_ k)!' k = 1,2, ... ,n, n = 1,2, .... The numbers P(n, 0) =(n) n = 0, 1, ... and P(O) = 0!, which have no P(n,k)
0,
combinatorial meaning, are taken by convention as unity: P(n,O)
If k > n, then P (n, k)
= (n)o = 1, n = 0, 1, ... , P(O) = 0! = 1.
=(n)
k
= 0 and (2.1) is still valid. It is worth noting that
P(n, n- 1)
= P(n, n) = P(n) = n!,
which is a consequence of the fact that, specifying the positions of the n - 1 elements, the position of the n-th element is uniquely determined. The n! increases rapidly, with increasing n: 2! = 2, 3! = 6, 4! = 24, 5! = 120, 6! = 720, 7! = 5040,.. . . A useful approximation of it is presented in Chapter 3. I Example2.5 Consider a man who has five different keys, only one of which fits the door of his house. He does not recognize the proper key and tries the keys one after the other, until he opens the door. Let us find the number of ways he may try to open the door so that he succeeds (a) at the third trial, (b) until the third trial and (c) at the last trial. (a) Let us number the five different keys from 0 to 4 assigning the number 0 to the key that fits the door. Note that, to a sequence of three trials, where in the third trial the door opens, there corresponds an ordered triple ( a 1 , a 2 , 0), where ai E {1, 2, 3, 4}, j = 1, 2, a 1 f. a 2 . Thus the required number of sequences of three trials equals the number of 2-permutations, (a 1 , a 2 ), of the set { 1, 2, 3, 4}, of four keys, that is P(4, 2) = 4 · 3 = 12.
44
PERMUTATIONS AND COMBINATIONS
These 12 sequences are the following:
(1,2,0), (1,3,0), (1,4,0), (2,1,0), (2,3,0), (2,4,0), (3,1,0), (3,2,0), (3,4,0), (4,1,0), (4,2,0), (4,3,0). (b) The number of ways he may try to open the door so that he succeeds until the third trial, according to the addition principle, equals the sum of the numbers of ways he may try to open the door so that he succeeds at the first or second or third trial. Since the number of ways he may try to open the door so that he succeeds at the k-th trial equals the number P(4, k -1) = (4)k-l of the (k -I)-permutations of the set of { 1, 2, 3, 4}, of four keys, for k = 1, 2, 3, the required number is given by the sum 3
s4,3
= L:c4)k-1 = 1 + 4 + 12 = 11. k=l
(c) The number of ways he may try to open the door so that he succeeds at the fifth (last) trial, according to the analysis of (a), equals the number of permutations (a 1 , a 2 , a 3 , a 4 ), of the set {1, 2, 3, 4}, of four keys, that is
4!
= 4. 3. 2. 1 = 24.
D
Example 2.6 Let us consider an urn containing n balls numbered from 1 to n. Assume that k balls are successively drawn from the urn without replacement (without returning the ball drawn to the urn after each drawing). The first number drawn wins a great value gift, while the subsequent numbers win gifts of smaller value. Find the number of possible outcomes of the drawings. Note that each possible outcome consists of knumbers from the set {1, 2, ... , n }. The order in which the numbers are drawn counts, since it determines the distribution of the gifts. Therefore, to each possible outcome there corresponds one and only one k-permutation of nand, according to Theorem 2.1, the required number is given by
(n)k=n(n-l)···(n-k+l).
0
Example2.7 Suppose that three workers are to be selected among the ten workers, { w 1 , w 2 , . . . , w 10}, of a small factory. A different job is to be assigned to the first, second and third workers. Find the number of different selections, which (a) do not include w 10 (who has not finished a delicate job) and (b) include w 10 (the most skilled worker). Note first that the order of selection of the three workers counts, since it determines the assignment of the three different jobs. Thus, to each possible selection there corresponds one and only one 3-permutation (a 1 , a 2 , a 3 ) of the set
2.2. PERMUTATIONS
45
ww }. Further, (a) since w 10 is not to be included in the selection, is a 3-pennutation of the set { w 1 , wz, ... , w 9 } of the other nine workers and so the required number of selections equals { w 1 , w2 ,
... ,
( a 1 , a 2 , a3)
P(9, 3) = 9 · 8 · 7 = 504.
(b) Since w 10 is to be included in the selection, he may be selected first or second or third. To each of the selections (w 10, a1 , az), (a 1 , Ww, az), (a1 , az, ww) there corresponds one and only one 2-pennutation (a 1 , a 2 ) of the set {w 1 , w 2 , ... , w 9 } of nine workers. Hence the required number of selections equals
3P(9, 2)
= 3 · 9 · 8 = 216.
It is worth noting that the sum of the number of selections that do not include w 10 and the number of selections that include w 10 equals
P(9, 3)
+ 3P(9, 2)
= 504
+ 216 =
720,
which is the total number of selections (without any condition), P(lO, 3) = 10 · 9 · 8 = 720.
0
This relation is generalized in the following theorem. THEOREM2.2
The number P(n, k) relations
(n)k. of k-permutations of n, satisfies the recurrence
P(n, k) = P(n- 1, k)
+ kP(n- 1, k- 1),
(2.3)
fork= 1, 2, ... , n, n = 1, 2, ... , and P(n, k)
= nP(n- 1, k- 1) = (n- k + l)P(n, k- 1),
(2.4)
fork= 1, 2, ... , n, n = 1, 2, ... , with initial conditions: P(n,O) = 1, n
= 0, 1,2, ... , P(n,k)
= 0, k
> n.
Let Pk(Wn) be the set of k-pennutations of the set Wn = {w 1 , w2 , · .. , Wn}. If Q is the set of the k-pennutations of Wn that do not include the element Wn and S the set of the k-permutations of Wn that include the element Wn, then Q n S = 0 and Pk (Wn) = Q + S. Hence, according to the addition
PROOF
principle,
N(Pk(Wn)) = N(Q)
+ N(S).
Apparently Q = Pk(Wn-d andN(Q) = N(Pk(Wn-d) = P(n-1, k). Further, from each (k- !)-permutation ofWn-l• by attaching the element Wn in any of the
46
PERMUTATIONS AND COMBINATIONS
k possible positions (one before the first element, k - 2 between the k - 1 elements and one after the last element), k different k-permutations of Wn that include Wn are constructed. Therefore, N(S) = kN(Pk-1 (Wn-1)) = kP(n- 1, k- 1) and P(n,k) = P(n -1,k)
+ kP(n -1,k -1),
k = 1,2, ... ,n, n = 1,2, ....
For the proof of (2.4) note that the first r (ordered) elements, (a 1 , a 2 , ... , ar ), of a k-permutation, (a 1 , a 2 , . . . , ar, ar+ 1, ... , ak), of W n, can be chosen from the set A1 = Wn in P(n, r) ways. After every such selection, the last k- r (ordered) elements, (ar+l, ... , ak), can be chosen from the set A2 = Wn- {a1, a 2 , ... , ar} in P(n- r, k- r) ways. Hence, according to the multiplication principle, P(n, k) = P(n, r)P(n- r, k- r), r
= 1, 2, ...
, k, k = 1, 2, ... , n.
In particular, for r = 1 and r = k- 1, since P(n, 1) =nand P(n- k + 1, 1) = n- k + 1, the first and second recurrence relations of (2.4) are deduced. The initial conditions, which often have no combinatorial meaning, are chosen in such a way that their introduction into the recurrence relation gives the correct values to the subsequent terms that have a combinatorial meaning and known values. Thus, from the known valuesP(n, 1) = n, n = 1, 2, ... and the recurrence relation (2.3), it follows that P(n, 0) = P(n
+ 1, 1)- P(n, 1)
= n
+ 1- n
= 1, n = 0, 1, ....
The initial condition P(n, k) = 0 fork > n is obvious. These are also the initial I conditions for the recurrence relation (2.4). REMARK 2.2 As regards the initial conditions of the recurrence relations (2.3) and (2.4), note that, instead of the relations P(n, 0) = 1, n = 0, 1, ... , which are indirectly deduced, the relations P(n, 1) = n, n = 1, 2, ... , following directly from the definition of a permutation, may be used. The preference to the first relations is due to some technical advantages that they provide in the study of recurrence relations, especially through generating functions. I COROLLARY 2.2 The number P(n)
=n!,
ofpennutations ofn, satisfies the recurrence relation
P(n) = nP(n -1), n = 1,2, ... , with initial condition P(O) = 1. In the next theorem the number of permutations with (unrestricted) repetition is derived.
47
2.2. PERMUTATIONS
THEOREM2.3 The number of k-permutations of n with (unrestricted) repetition, denoted by U(n, k), is given by
U(n,k)=nk. Note that, in any k-pennutation (a 1 , a 2 , ... , ak) of the set Wn Wn} with repetition, the element ai can be chosen from the set Ai = Wn. of n elements, i = 1, 2, ... , k. Hence, Uk(Wn) A1 x A2 x · · · x Ak is the set of k-permutations of the set Wn with repetition and according to the multiplication principle, PROOF
{ w 1 , w2 ,
... ,
=
U(n, k)
= N(Uk(Wn)) = N(Al
X
A2
X · ·· X
Ak)
= N(A1)N(A2) · · · N(Ak) = nk. The proof of the theorem is thus completed.
I
Example 2.8 Ternary number system In the ternary number system each number is represented by a ternary sequence of Os, l s and 2s. For example, the numbers 5 and II, which are expressed in tenns of powers of 3 as 5 = 1 · 3 1 + 2 · 3° and 11 = 1 · 3 2 + 0 · 3 1 + 2 · 3°, are represented by the ternary sequences (1, 2) and (1, 0, 2), respectively. Note that, with the exception of the number 0, which is represented by the one-digit sequence (0), in all the other ternary sequences the first digit is different from 0. Calculate the number of four-digit ternary sequences. The first digit of a four-digit ternary sequence is either I or 2. A four-digit ternary sequence (1, a 1, a 2 , a 3) corresponds to a 3-pennutation (a 1, a 2, a 3) of the set {0, 1, 2} with repetition. Thus, the number of four-digit ternary sequences (1, a1, a2, a3), according to Theorem 2.3, equals U(3, 3)
= 33 = 27.
Similarly, the numberoffour-digitternary sequences (2, a 1, a 2, a 3) equals U (3, 3) = 27 and so the total number of four-digit ternary sequences is given by 2U(3, 3) = 54.
D
Example2.9 (a) Find the number of different outcomes in a series of k tosses of a coin. An outcome of a series of k tosses of a coin may be represented by an ordered ktuple (a1, a2, ... , ak) of letters from the set {h, t}, where ai denotes the outcome of the i-th toss, i = 1, 2, ... , k, and hand t stand for heads and tails, respectively. Hence, the number of different outcomes in a series of k tosses of a coin equals
48
PERMUTATIONS AND COMBINATIONS
the number of k-permutations of the set { h, t}. For k = 3, the different outcomes are the following: (h, h, h), (h, h, t), (h, t, h), (t, h, h), (h, t, t), (t, h, t), (t, t, h), (t, t, t),
in agreement with U(2, 3) = 23 = 8. (b) Consider a series of k throws of a die or equivalently a throw of k distinguishable dice. Find the number of different outcomes. An outcome of a series of k throws of a die may by represented by an ordered ktuple (a 1 , a 2 , ... , ak) of numbers from the set {1, 2, 3,4, 5, 6}, where ai denotes the outcome of the i-th throw, i = 1, 2, ... , k. Therefore, the number of different outcomes in a series of k throws of a die equals
the number of k-permutations of the set {1, 2, 3, 4, 5, 6}, of 6 numbers (faces of a die), with repetition. Fork = 2, the different outcomes are the following: (1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (1, 6), (2, 1), (2, 2), (2, 3), (2, 4), (2, 5), (2, 6), (3, 1), (3, 2), (3, 3), (3, 4), (3, 5), (3, 6), (4, 1), (4, 2), (4, 3), (4, 4), (4, 5), (4, 6), (5, 1), (5, 2), (5, 3), (5, 4), (5, 5), (5, 6), (6, 1),(6,2),(6,3), (6,4), (6,5),(6,6), in agreement with U(6, 2) = 6 2 = 36.
0
Example 2.10 Distributions of distinguishable balls into distinguishable urns Let k distinguishable balls { b1 , b2, ... , bk} be successively distributed into n distinguishable urns (cells) { w1 , w 2 , ... , Wn} of unlimited capacity. Find the number of different distributions . Clearly, ball br can be placed in any of the n urns, r = 1, 2, ... , k and so, according to the multiplication principle, the k balls can be distributed into the n urns in nk different ways. It is worth noting the one-to-one correspondence between the set of distributions of k distinguishable balls into n distinguishable urns of unlimited capacity and the set of k-permutations of n with (unrestricted) repetition. Indeed, the distribution of the k balls {b1, b2, . .. , bk} into then urns Wn = { w1 , w 2, ... , wn}. according to which the ball br is placed into the urn Wi~· r = 1, 2, ... , k, corresponds to the k-permutation (wi1 , Wi2 , ••• , Wik) of the set Wn, of n urns, with (unrestricted)
49
2.2. PERMUTATIONS
repetitiOn. Thus, the number of distributions of k distinguishable balls into n distinguishable urns of unlimited capacity equals
U(n, k) = nk, the number of k-permutations of n with repetition. The general problem of distributions of balls of different kinds into urns of different kinds and capacity is examined at length in Chapter 9. 0 In concluding, let us turn the discussion to the enumeration of k-permutations of Wn = {wi,Wz, ... ,wn} with repetition, in which the element Wi may appear ki times, i = 1, 2, ... , n, where k1 + kz + · · · + kn = r 2 k. The calculation of their multitude, using the two basic counting principles, is quite difficult. This problem is treated more effectively by the use of generating functions. Constituting a powerful tool for the treatment of many combinatorial problems, these functions are examined in Chapter 6, in which we return to this problem. The next theorem is concerned with the particular case of k = r.
THEOREM2.4 The number of pennutations of n kinds of elements with k 1 , k 2 , . •. , kn elements, respectively, denoted by M(k 1 , kz, ... , kn). is given by
PROOF Consider a permutation (a 1, a2, ... , ar), of the n kinds of elements Wn = {w 1 , w 2 , •.. , wn}. where ki of the a's are Wi, i = 1, 2, ... , n, with k1 + kz + · · · + kn = r. If the k 1 like elements w 1 are transformed to distinct, by
assigningtoeachasecondindex from I tok 1 , w 1 , 1 , w 1 , 2 , ••• , w 2 ,k 1 , and permuted in all possible ways, preserving the positions the element w 1 occupies in this permutation, k 1 ! permutations are constructed. If, in any of these permutations, the k 2 like elements w 2 are transformed to distinct, w 2 , 1 , w 2 , 2 , •.. , w 2 ,k 2 , and permuted in all possible ways preserving the positions the element w 2 occupies in this permutation, k2 ! permutations are constructed. Repeating this procedure until all the n kinds of elements are exhausted and then applying the multiplication principle, it follows that, from the permutation (a 1 , a 2 , ••• , ar ), k 1!k2 ! · · · kn! permutations, (bi,bz, ... ,br),ofthesetWn,r = {wi,j :j = 1,2, ... ,ki,i = 1,2, ... ,n},ofr (distinct) elements, are constructed. Moreover, each permutation (b 1 , b2 , . •• , br) of the set Wn,r. of r elements, by deleting the second index from its elements wi,J, j = 1, 2, ... , ki, i = 1, 2, ... , n, is reduced to a unique permutation ( a1, az, ... , ar) of the n kinds of elements W n = { w 1, w 2 , •. • , Wn }, where ki of the a's are Wi, i = 1, 2, ... , n, with k 1 + k 2 + · · · + kn = r. Therefore, k 1!k2 ! · · · kn!M(k 1 , k 2 , •• • , kn) equals the number of permutations of the
PERMUTATIONS AND COMBINATIONS
50
set Wn,r. of r elements. Further, the number of these permutations, according to Corollary 2.1, is equal to r! and hence we find the relation
from which (2.5) follows.
I
Example 2.11 Consider r recruits, among which k; come from the i-th district of the country, i = 1, 2, ... , n, so that k 1 + k2 + · · · + kn = r. Distinguishing them according to district of their origin, the number of ways they can be arranged on a line equals
the number of permutations of n kinds of elements (districts), with k 1 ,k2 , ... , kn elements (recruits), respectively. Distinguishing them according to the number of the recruitment invitation, the number of ways they can be arranged on a line equals P(r) = r!, the number of permutations of r elements (numbers). In particular, for n = 2 and k 1 = 2, k2 = 2, the M(2, 2) = 6 arrangements of the recruits, according to the district of their origin, are the following:
(dt, dt, d2, d2), (dt, d2, d2, dl), (dt, d2, dt, d2), (d2,dt,d2,dl), (d2,dt,dt,d2), (d2,d2,dt,dl), and the corresponding arrangements of the recruits, according to their recruitment invitation (double-index) number are the following:
(du, d12, d21, d22), (d12, du, d21, d22), (du, d12, d22, d21), (d12, dn, d22, d2t),
(du, d21, d22, d12), (dt2,d2l,d22,dll), (du, d22, d21, d12), (d12, d22, d21, du), (du, d21, d12, d22), (d12, d21, du, d22), (du, d22, d12, d21), (d12, d22, du, d2t), (d21, du, d22, d12), (d21, d12, d22, du), (d22, du, d21, d12), (d22, d12, d21, du), (d21, du, d12, d22), (d21, d12, du, d22), (d22, du, d12, d2t), (d22, d12, du, d2t), (d21, d22, du, d12), (d21, d22, d12, du ), (d22, d21, du, d12), (d22, d21, d12, du). The total number of these arrangements is P( 4)
= 24.
0
51
2.3. COMBINATIONS
2.3
COMBINATIONS
DEFINITION 2.2 Let Wn = { Wt, w2, ... , Wn}. a finite set of n elements. A (non-ordered) collection ofk elements {a1,a2, ... ,ak}, with arE Wn, r = 1, 2, ... , k, is called k-combination of the set Wn or simply k-combination ofn. Note that the elements of a k-combination of n may or may not be different elements of Wn. For the first case, the term k-combination of n is preserved, while for the second and when unrestricted repetitions are allowed, the term k-combination of n with repetition is used. When any restrictions on the number of repetitions exist, they are explicitly specified. Note also that, according to the definitions of a set and a subset, a kcombination of the set Wn, without repetition, is a subset of Wn. Further, a k-combination of n is meaningful when 1 ::::; k ::::; n, while a k-combination of n with (unrestricted) repetition is always meaningful for k ~ 1, n ~ 1. The examples that follow illustrate the different kinds of combinations and provide an indication of their enumeration.
Example 2.12 The 2-combinations of the set W 4 following:
Note that, from each 2-combination {a 1, a 2 } of the set W4, by permuting its elements, the 2-permutations (a 1 , a 2 ) and (a 2 , at) of the set W 4 are deduced. Thus, the number of 2-combinations of 4 equals the number of 2-permutations of 4 divided by the number of permutations of 2, that is 12/2 = 6 (see Example 2.1). D
Example 2.13 The 2-combinations of the Set W4 following:
= {Wt
1
W2, W3, W4}
with repetition are the
{w2,w3}, {w2,w4}, {w3,w3}, {w3,w4}, {w4,w4}. Consider also the 2-combinations of the set W5 = { w 1 , w2, w3, W4, w5} (without repetition):
52
PERMUTATIONS AND COMBINATIONS
{w2,w4}, {w2,ws}, {wa,w4}, {wa,ws}, {w4,w5}. Note that a one-to-one correspondence exists between these two sets of2-combinations. Specifically, the 2-combination {W; 1 , wh }, 1 ::; ii ::; i 2 ::; 4, of the set W 4 = {WI, w 2, w 3 , w4} with repetition, uniquely corresponds to the 2perrnutation {W)J, w32}, 1 ::; JI < J2 ::; 4, of the set W5 = {WI, w2, wa, W4, Ws} (without repetition), where )I = ii and j 2 = i 2 + 1. Since the number of 2combinations of the set W5 = {WI, w2, w3, W4, Ws} equals ( 5 · 4) /2 = 10, it follows, by Lemma 1.1, that the number of 2-combinations of the set W 4 = {WI, w2, W3, w4} with repetition is also equal to I 0. 0
Example 2.14 The )-combinations of the set w4 = {WI' W2' W3' W4} with repetition and the restriction that each element is allowed to appear at most two times are the following 16:
{WI, WI, W2}, {WI, WI, W3}, {WI, WI, W4}, {WI, W2, W2}, {WI , W2, W3}, {W1, W2, W4}, {WI , W3, W3}, {WI , W3, W4}, {wi, W4, w4}, {w2, w2, wa}, {w2, w2, w4}, {w2, wa, wa}, {W2, W3, W4}, {W2, W4, W4}, {Wa, W3, W4}, {W3, W4, W4}.
0
The following two theorems are concerned with the number of combinations (without repetition).
THEOREM2.5 The numberofk-combinations ofn, denoted by C(n, k) or(~), is given by
(n) = n(n-
n = C( 'k) - k
1) · · · (n- k + 1)
k!
=
n!
k!(n- k)! ·
(2.6)
PROOF Let Ck(Wn) be the set of k-combinations and Pk(Wn) the set of k-perrnutations of Wn = {WI, w2 , •.• , Wn}. Note that, to each k-combination {a I, a2, ... , ak} of Wn, there correspond k! k-permutations (a; 1, a; 2, . .. , a;k) of Wn, which are formed by permuting its k elements in all k! possible ways. Further, to each k-permutation, (a I, a 2 , ... , ak), of Wn, there corresponds one and only one k-combination, {a 1 , a 2 , ... , ak}, of Wn. Therefore,
P(n, k) := N(Pk(Wn)) = k! N(Ck(Wn)) := k!C(n, k) and, using (2.1 ), expression (2.6) is deduced.
I
REMARK 2.3 Note that every time a k-combination of the set W n = {WI, w 2, ... , wn} is formed by selecting k elements, n- k elements are left, forming an
2.3. COMBINATIONS
53
(n- k)-combination of Wn. Hence to each k-combination, {a I, a2 , ... , ak}. of Wn. there uniquely corresponds an (n- k)-combination, {bi, b2, ... , bn-k} = {w 1 , w2 , ... , wn} - {ai, a 2 , ... , ak}, of Wn. and conversely. Consequently, N(Ck(Wn)) = N(Cn-dWn)) and
This relation can also be shown algebraically, by using expression (2.6), as follows:
n) n! n! ( n ) ( k - k!(n- k)! - (n- k)!(n- (n- k))! - n- k · Note that the pair of sets A = {ai, a 2, ... , ak} and B = {bi, b2, ... , bn-d is a division of the set Wn = {WI, w2 , ... , Wn} (see Section 1.2.7). This point is examined in a more general set up in the next section. It is worth noting that there exists a one-to-one correspondence (bijective mapping) of the set Mk,n-dU2 ), of permutations of two kinds of elements U2 = {ui,u 2 }, with k and n- k elements, respectively, onto the set Ck(Wn), of kcombinations of the set Wn = {WI, w2 , ... , Wn }, of n elements. Specifically, to the permutation (vi, v2 , ... , vn) in which the element ·u 1 occupies the k positions { i 1 , i 2 , ... , ik} ~ { 1, 2, ... , n}. the k-combination {Wi 1 , Wi, ... , Wik} of the set Wn. of n elements, is associated and conversely. Hence M(k, n- k) = C(n, k),
I
in agreement with expressions (2.5) and (2.6).
Example 2.15 Consider an organization with seven vacant positions, among which two require mathematics degrees, three require computer science degrees and the remaining two positions are open to candidates with either a mathematics or a computer science degree. After a screening, the selection committee prepares a shortlist of candidates of whom seven hold mathematics degrees and six computer science degrees. In how many ways can the vacant positions be filled? From the seven candidates with mathematics degrees two can be selected (without regard to any order) in
G)=
~
7 6
=
21
ways and from the six candidates with computer science degrees three can be selected in 6·5·4 = --=20 2·3
(~)
54
PERMUTATIONS AND COMBINATIONS
ways. Finally, from the remaining eight candidates, two can be selected in
C)=
~ = 28
8 7
ways. Thus, according to the multiplication principle, the vacant positions can be filled in 21 ° 20 ° 28 = 11,760 ways.
D
Example 2.16 Binary number system revisited In the binary number system, calculate the number of five-digit binary sequences that contain exactly two zeros (see Example 1.4 ). The first digit of a five-digit binary sequence is necessarily I. A five-digit binary sequence ( 1, a 1 , a 2 , a 3 , a 4 ) that contains exactly two zeros uniquely corresponds to the set {i 1 , i 2 } of the two positions, out of the four positions { 1, 2, 3, 4} that the two zeros occupy in the binary sequence. Thus the number of five-digit binary sequences ( 1, a 1 , a 2 , a 3 , a4 ) that contain exactly two zeros equals
the number of 2-combinations of 4.
D
Example 2.17 Distributions of indistinguishable balls into distinguishable urns of limited capacity Suppose that k indistinguishable balls are successively distributed into n distinguishable urns {w 1 ,w2 , ..• ,wm}. each with capacity limited to one ball. Find the number of different distributions. Any distribution of k indistinguishable balls into n distinguishable urns may be represented by the subset {Wi 1 , Wi 2 , ••• , Wik} of urns in each of which a ball is placed. Thus, each distribution of k indistinguishable balls into n distinguishable urns corresponds to a selection of k urns from the set of then urns without regard to order and conversely. Therefore, the number of ways of placing k indistinguishable balls into n distinguishable urns, each with capacity limited to one ball, equals
the number of k-combinations of the set {w 1 , w2, ... , Wn} of n urns.
D
2.3. COMBINATIONS
55
THEOREM 2.6 Pascal's triangle The number C(n, k) (~). of k-combinations of n, satisfies the "triangular" recurrence relation 1 (2.7) ( = (n k = 1, 2, ... , n, n = 1, 2, ... , ) + (
=
~)
~
~ =~),
with initial conditions
(~)
= 1, n = 0, 1, ... ,
(~)
= 0, k
> n.
Let Ck(Wn) be the set of k-combinations of the set Wn = {w1, w2, ... , wn}. If A is the set of the k-combinations of Wn that do not include the element Wn, and B the set of the k-combinations of Wn that include the element Wn, then An B = 0 and Ck(Wn) = A+ B. Hence, according to the addition PROOF
principle,
N(Ck(Wn)) = N(A)
+ N(B).
Apparently A = Ck(Wn-d and N(A) = N(Ck(Wn-d). Further, one of the k elements of a k-combination {a 1 ,a2 , ... ,ak-1,ak}, belonging to B, is the element Wn and, since the order in which the elements are written does matter, it may be assumed that ak = Wn and ar E Wn-1· r = 1, 2, ... , k- 1. Thus, each k-combination {a 1 , a 2 , ... , ak- 1 , Wn} belonging to B corresponds to one and only one k-combination {a 1 , a 2 , ... , ak- 1 } belonging to Ck-1 (Wn-1 ), and conversely. Therefore N(B) = N(Ck-dWn-d) and
N(Ck(Wn)) = N(Ck(Wn-d)
+ N(Ck-dWn_l)).
The last relation implies (2.7). The initial conditions(~) = 1, n = 0, 1, ... , which are preferred to the conditions (7) = n, n = 1, 2, ... , are compatible with (2.7) since
The recurrence relation (2.7) may also be shown algebraically, by using expression (2.6). I The numbers C(n, k) = G), known as binomial coefficients, can be tabulated by using Pascal's triangle and its initial conditions. Table 2.1 gives the binomial coefficients fork= 0, 1, ... , n, n = 0, 1, ... , 12.
COROLLARY 2.3 The number C (n, k) rence relation
= G), of k-combinations of n, satisfies the "vertical" recur-
(~) = ~
G=D,
k = 1, 2, ... , n, n = 1, 2,...
(2.8)
PERMUTATIONS AND COMBINATIONS
56
Binomial Coefficients C(n, k)
Table 2.1
k
n 0 1 2 3 4 5 6 7 8 9 10
0
2
4
5
1 1 3 6 4 I 10 10 5 15 20 15 21 35 35 28 56 70 36 84 126 45 120 210 55 165 330 66 220 495
6 21 56 126 252 462 792
I
3
6
7
=
(~)
10
11
1 1 8 36 9 1 120 45 10 I 55 11 330 165 792 495 220 66
12
8
9
12
I
1 1 I
1 1 1 1 1 1 I
11
1
12
I
I
2 3 4 5 6 7 8 9 10 11 12
I I
7 28 84 210 462 924
I 1
and the "horizontal" recurrence relation
(~) = ~( _ 1l-r (n; 1) ~ k-j -_ L..)-1) j=k
(n + 1) _ .
J+1
_
, k -1,2, ... ,n, n -1,2, ....
PROOF
Summing both sides of the "triangular" recurrence relation
for r = k, k
+ 1, ...
, n,
and since (k~l) = 0, it follows that
(2.9)
2.3. COMBINATIONS
57
Multiplying the "triangular" recurrence relation
by ( -l)k-r and summing both sides for r = 1, 2, ... , k, we get
and since
(n;il)
= (~) = 1, it follows that
The second part of (2.9) can be shown in a similar way.
I
REMARK 2.4 The "vertical" recurrence relation (2.8) may also be derived independently of the "triangular" recurrence relation (2.7). The following combinatorial derivation is of interest. Let Ck(Wn) be the set of k-combinations of the set Wn = {w1, w2, ... , Wn} and Ar the subset of Ck (Wn) containing the combinations that include Wr as the element with the largest subscript, r = k, k + 1, ... , n. Then Ai n Aj = 0, i, j = k, k + 1, ... , n, i-::/:- j, Ck(Wn) = Ak + Ak+I +···+An and, according to the addition principle,
Note that, to each k-combination {a 1 ,a2 , ... ,ak-I,wr}, with aj E Wr-1 = {w1, w2, ... , Wr-I }, j = 1, 2, ... , k- 1, that belongs to An there corresponds one and only one (k- I)-combination {a 1 ,a2 , ... ,ak-d that belongs to Ck-I (Wr-J), r = k, k + 1, ... , n. Therefore, N(Ar) = N(Ck-1 (Wr_I)), r = k, k + 1, ... , n, and
The last relation implies (2.8).
I
Example 2.18 Consider a series of five tosses of a coin. Calculate the number of different outcomes of the first r tosses that include exactly two heads, for r = 2, 3, 4. Compare the sum of these numbers to the number of different outcomes of the five tosses that include exactly three heads.
PERMUTATIONS AND COMBINATIONS
58
An outcome of a series of r tosses of a coin (a 1 , a 2 , ... , ar) that includes two heads corresponds to the set {i 1 , i 2 } of the two positions, out of the r positions {1, 2, ... , r} that the two letters h occupy. Thus the number different outcomes of the first r tosses that include exactly two heads equals
(;), r
= 2,3,4,
the number of 2-combinations of the set {1, 2, ... , r }. Summing these numbers we get 4
?; (;) =
1+3 +6
= 10.
These ten outcomes are the following (h, h), (h, h, t), (h, t, h), (t, h, h), (h, h, t, t), (h, t, h, t), (h, t, t, h), (t, h, h, t), (t, h, t, h), (t, t, h, h).
The number of different outcomes of the five tosses that include exactly three heads is given by
G) = G) =
~ = 10
5 4
2..:::=
and equals the sum 2 (;), in agreement with the vertical recurrence relation (2.8). These ten outcomes are the following (h, h, h, t, t), (h, h, t, h, t), (h, t, h, h, t), (t, h, h, h, t), (h, h, t, t, h), (h, t, h, t, h)' (h, t, t, h, h)' (t, h, h, t, h)' (t, h, t, h, h)' (t, t, h, h, h).
Note that, a one-to-one correspondence exists between the two different sets of outcomes. Remark 2.4 will be helpful in establishing it. 0 In the next theorem the number of combinations with repetition is derived. THEOREM2.7 The number of k-combinations of n with repetition, denoted by E( n, k ), is given by (2.10)
PROOF Let [k (Wn) be the set of k-combinations with repetition of the set Wn = {w1,w2, ... ,wn} of n elements and Ck(Wn+k-d be the set of kcombinations without repetition of the set Wn+k-l = { w1, w 2 , ... , Wn+k-d of
2.3. COMBINATIONS
59
+ k - 1 elements. Consider a k-combination {Wi 1 , Wi 2 , ••• , Wik } that belongs to t'k (Wn) and suppose that the k subscripts, it, i2, ... , ik, are numbered in rising order. Then 1 ::; it ::; i2 ::; · · · ::; ik ::; n and, putting ir ir + (r - 1), r 1, 2, ... , k, it follows that 1 ::; ii < h < · · · < jk ::; n + k -1 and the corresponding k-combination {wj,, wh, ... , Wjk} belongs to Ck(Wn+k- 1 ). Further, the relation ir = ir + (r -1), r = 1, 2, ... , k, corresponds to each k-combination from t'k(Wn) one and only one k-combination from Ck(Wn+k-d and vice versa. Thus, N(t'k(Wn)) = N(Ck(Wn+k-d) and, by virtue of Theorem 2.5, (2.10) is deduced. I n
=
=
REMARK2.5 ThedoublesequenceofthenumbersE(n,k) = (n+;-t), k = 1, 2, ... , n = 1, 2, ... , of k-combinations of n with repetition, satisfies recurrence relations analogous to that of the double sequence of the numbers C (n, k) = (~), k = 1, 2, ... , n, n = 1, 2, ... , of k-combinations of n. Specifically, there hold: (a) The "triangular" recurrence relation
E(n, k) = E(n- 1, k)
+ E(n, k-
1), k
= 1, 2, ...
,n
= 1, 2, ....
(b) The "vertical" recurrence relation n
E(n,k)
= LE(r,k -1), k = 1,2, ... , n = 1,2, .... r=t
(c) The "horizontal'' recurrence relation k
E(n, k) = L E(n - 1, r), k = 1, 2, ... , n = 1, 2, .... r=O
These recurrence relations may be shown by employing the corresponding technique of deriving (2.7), (2.8) and (2.9). The following brief hints of a combinatorial derivation of the first two recurrences are quoted here. (a) The set t'k(Wn) of the k-combinations of n with repetition, by considering the element Wn E Wn, can be divided into the disjoint subsets A, of the kcombinations of n with repetition that include Wn, and /3, of the k-combinations of n with repetition that do not include Wn. Then N(A) = N(t'k(Wn-d), N(/3) = N(t'k-t(Wn)) and
N(t'k(Wn)) = N(t'k(Wn-d)
+ N(t'k-1 (Wn)),
yielding the triangular recurrence relation. (b) The set t'k(Wn) can be divided into n pairwise disjoint subsets A 1 , A 2 , ... , An, where Ar is the subset of t'k(Wn) containing the combinations that include wr as the element with the largest subscript, r = 1, 2, ... , n. Then N(Ar) = N(t'k-t(Wr)),r= 1,2, ... ,nand
N(t'k(Wn)) = N(t'k-I (Wt)) + N(t'k-I (W2)) + · · · + N(t'k-I (Wn)),
60
PERMUTATIONS AND COMBINATIONS
which implies the vertical recurrence relation.
I
Example 2.19 The number of distinguishable outcomes of a throw of k like (indistinguishable) dice equals E(6, k) = (k! 5), the number of k-combinations of the set {1, 2, 3, 4, 5, 6}, of the six faces of a die, with repetition (see Example 2.9b). For k 2 the possible outcomes are the following 21:
=
{1,1},{1,2},{1,3},{1,4},{1,5},{1,6},{2,2},{2,3},{2,4}, {2,5},{2,6}, {3,3},{3,4},{3,5},{3,6},{4,4},{4,5},{4,6},{5,5},{5,6},{6,6}. To these 2-combinations with repetition of the set { 1, 2, 3, 4, 5, 6} of six numbers, there correspond the following, in order, 2-combinations (without repetition) of the set { 1, 2, 3, 4, 5, 6, 7} of seven numbers:
{1,2},{1,3},{1,4},{1,5},{1,6},{1,7},{2,3},{2,4},{2,5},{2,6},{2,7}, {3,4},{3,5},{3,6},{3, 7},{4,5},{4,6},{4, 7}, {5,6},{5, 7},{6, 7}.
0
Example 2.20 Distributions of indistinguishable balls into distinguishable urns of unlimited capacity Suppose that k indistinguishable balls are successively distributed (allocated) into n distinguishable urns {w 1 , w 2 , ... , Wn} of unlimited capacity. Find the number of different distributions. Any distribution of k indistinguishable balls into n distinguishable urns of unlimited capacity corresponds to a collection of k urns {w; 1 , W; 2 , ... , w;k} from the set of then urns, with repetition, where the selection of an urn r times corresponds to the placement of r balls into it, r = 0, 1, ... , k. Thus, the number of ways of placing k indistinguishable balls into n distinguishable urns equals
the number of k-combinations of the set { w 1 , w 2 , ... , wn}, of then urns, with repetition.
0
Example 2.21 Display of flags on poles Consider the following "primitive" way of signaling. A display of flags of the same or different colors on poles in a row forms a signal. The absolute position of flags on a pole does not count and each pole has space for all the available flags. Assume that k flags and n poles are available. The number of different signals that can be transmitted is of interest.
2.3. COMBINATIONS
61
Consider first the case of flags of the same color and let sn,k be the number of different signals. If an,r is the number of different signals when r flags are used, then, by the addition principle, k
Sn,k
=L
an,r·
r=O
Note that, to each signal with r flags of the same color displayed on n distinguishable poles, there corresponds a collection of r poles {Pi 1 , Pi 2 , ••• , Pir} with repetition from the set {p 1 , P2, ... , Pn}, of the n poles, where the selection of a pole j times corresponds to the display of j flags on it, j = 0, 1, ... , r. Thus the number an,r equals
_(n +rr -1)
an,r-
'
the number of r-combinations of n with repetition. Therefore,
_~ (n+rr -1)
Sn,k- ~ r=O
and, by the vertical recurrence of r-combinations of n with repetition, this sum is given by (see Remark 2.5):
Further note that, to each signal with r flags of the same color displayed on n poles, there correspond r! signals with r flags of different colors displayed on n poles, which are obtained by permuting the r distinguishable flags in all positive ways (without altering the number of flags on each pole). Thus the number bn,r of signals with r flags of different colors displayed on n distinguishable poles equals
, =
bn r
, = r!
r!an r
(n + rr-
1 ) .
Note also that r flags can be chosen from the k flags of different colors in
k) = (k)r (r r! ways. Thus, according to the addition principle, the number Cn,k of signals with at most k flags of different colors displayed on n distinguishable poles is given by the sum
0
62
2.4
PERMUTATIONS AND COMBINATIONS
DIVISIONS AND PARTITIONS OF A FINITE SET
As has been noted in Remark 2.3, to each k-combination { a 1, a 2, ... , ak} of the set W n = { w 1, w 2, ... , Wn} of n elements, there corresponds a division ofWn in two subsets A= { a 1, a 2, ... , ak} and B = {b1, b2, ... , bn-k} = W n - { a 1, a 2, ... , ak}, with k and n - k elements, respectively. Thus, the number of divisions (A, B) of a finite set Wn, with N(Wn) = n, in two (ordered) subsets with N(A) = k 2: 0 and N(B) = n- k 2: 0 equals
C(n, k)
_ (n) (n)k
n!
= k = k! = k!(n-
k)!'
the number of k-combinations of n. An extension of this result is presented in the following theorem.
THEOREM2.8 The number of divisions ( A1, A2, ... , Ar) of a finite set W n• with N (Wn) = n, in r (ordered) subsets, with N(Aj) = kj 2: 0, j = 1,2, ... ,r, denoted by C(n, k1, k2, ... , kr-d or (k 1 ,k2 ,.n. ,kr_J, is given by
where kr
= n- k1
- k2 - · · · - kr-1·
PROOF In a division (A1, A2, ... , Ar) of a finite set Wn, with N(Wn) = n, the k1 elements of the first set A 1 can be chosen from the set W n, of n elements, in
ways. After the selection of the k1 elements of the first set A 1, the k2 elements of the second set A 2 can be chosen from the set W n - A 1, of n - k 1 elements, in
ways. Continuing in this manner, after the selection of the k1, k2, ... , kr- 2 elements of the sets A 1,A 2, ... ,Ar_ 2, respectively, the kr-1 elements of the set Ar- 1 can be chosen from the set Wn - A1 - A2 - · · · - Ar-2• of n - k1 - k2 - · · · - kr- 2 elements, in
63
2.4. DIVISIONS AND PARTITIONS OF A FINITE SET
ways. Finally, the selection of the ki, k 2 , ... , kr-I elements of the sets AI, A2 , ... , Ar-I. respectively, determines the kr elements of the last set Ar, since Wn - AI - A2 Ar-I is a set of n - ki - k2 kr-I = kr elements. Thus, by the multiplication principle, the number C(n, ki, k2 , ..• , kr-I) is given by 0
0
0
0
0
-
0
-
_ (n) (nki) ... (n- ki - k2- · · ·- kr_ 2) k k k
C(n,ki,k2, ... ,kr-I)-
I
n! (n- ki)! k1!(n- ki)! k2!(n- k1- k2)! n!
and so (2.11) is established. REMARK 2.6
2
r-I (n- ki - k2- · · ·- kr-2)! kr-I!(n- ki- k2- · · ·- kr_I)!
I
A comparison of (2.11) with (2.5) reveals that
where kr = n- ki - k2 - · · · - kr-I· This relation is not a simple coincidence. There exists a one-to-one correspondence of the set of divisions (AI, A 2 , ... , Ar) of a finite set Wn = {WI, w 2 , ... , wn}, of n elements, in r (ordered) subsets, with N(Aj) = kj 2: O,j = 1,2, ... ,r, k1 + k2 + ··· + kr =nand the set of permutations (a 1 , a 2 , ... , an) of r kinds of elements Ur = {ui, u 2 , •.• , Ur }, with kj elements equal to Uj, j = 1, 2, ... , r, ki + k2 + · · · + kr = n. Specifically, to the division (AI,A 2 , ... ,Ar). in which Wi belongs to the subset Ai, there corresponds the permutation (ai, a 2 , ... , an), in which the element a; = Uj, where i = 1, 2, ... , nand j = 1, 2, ... , rand vice versa. For example, for n = 7 and r = 3, to the division (AI' A2, A3) of the set w7 = {WI' W2, 'W7 }, with A1 = {wi,w4,w6,w7}, A 2 = {w3} and A3 = {w 2,w5}, there corresponds the permutation (UI, U3, U2, U!, U3, UI, UI) of the three kinds of elements U3 = {ui, u2, u3 }, while to the division (AI, A2, A3), with AI = W7, A2 = 0, A3 = 0, there corresponds the permutation (ui, ui, ui, ui, UI, UI, ui). I 0
0
0
REMARK 2. 7 The notation adopted for the expression of the number (2.11) constitutes an extension of the notation for the expression of the number (2.6), to which it reduces for r = 2. On the contrary, the notation of the number (2.11) by C(n,ki,k2, ... ,kr)
= (k1, k 2,n· · · , k r ),
also used by several authors, includes in addition to the numbers n, k1 , k 2, ... , kr-! and the number kr, which, when the previous numbers are known, is completely
64
PERMUTATIONS AND COMBINATIONS
determined by the relation kr = n- (k 1 + k2 + · · · + kr- 1 ). This notation for r = 2 leads to the notation
for the number (2.6) that is not coherent with the classical notation
C(n, k)
=(~)-
Further, note that from the relation k 1 + k2 + · · · + kr =nit follows that any ki, i = 1,2, ... ,r,canbeexpressedaski = n-(k 1 +···+ki-l +ki+t +···+kr), a difference of the sum of the rest kj, j = 1, 2, ... , i - 1, i + 1, ... , r from n. Thus, the numbers in (2.11) possess the following symmetric property:
(k1, k2,. •.
~kr-2, kr_J = (k1, k2, .. ~' kr-2, kJ = ... (k2, k3, ..
~' kr-1, kr)'
which extends the property
presented in the first part of Remark 2.3.
I
A recurrence relation for the number of divisions of a finite set is derived in the next theorem.
THEOREM2.9 The number C(n, k1, k2, ... , kr-d = (k,.k 2 ,.~. ,kr_,). of divisions (A 1, A2, ... , Ar) of a finite set Wn. with N(Wn) = n, in r (ordered) subsets, with N(Aj) = kj 2: 0, j = 1, 2, ... , r, satisfies the recurrence relation
for kj = 1, 2, ... , n, j with initial conditions
= 1, 2, ... , r -1, k1 + k2 + · · · + kr-l :S n, n = 1, 2, ... , ) (0 0 n ' ' ... ,0
= 1,
n
= 0, 1, ...
,
2.4. DIVISIONS AND PARTITIONS OF A FINITE SET
65
and
PROOF Let Ck 1 ,k 2 , ... ,k._, (Wn) be the set of divisions (A1, A2, ... , Ar) ofWn = {w 1 ,w2,···,wn}inr(ordered)subsetswithN(Aj) = kj 2:1, j = 1,2, ... ,r (whence kr = n- kt- k2- ···- kr)· If Aj is the set of divisions (A 1 , A 2, ... , Ar) of W n in r (ordered) subsets, with N (Aj) = kj 2: 1, j = 1, 2, ... , r, in which Wn E Aj, j = 1, 2, ... , r, then,
A; n Ai = 0, i, j = 1, 2, ... , r, i Ck,,k 2,... ,k._ 1 (Wn) = A1
-I- j,
+ A2 + · · · + Ar-l + Ar
and, by the addition principle,
Since
(Wn-d), N(A2)
N(At) =
N(Ck 1 -t,k 2 , ... ,k._,
N(Ar-d
= N(Ck 1,k2, ... ,k._ 1 -1 (Wn-d),
= N(Ck1,k2-1, ... ,k,_, (Wn-d),
N(Ar) = N(Ck1,k2, ... ,kr-1 (Wn-d),
it follows that
N(Ck1,k2, .. ,k.-1 (Wn)) = N(Ck1-t,k2,··· ,kr-1 (Wn-d) +N(Ck1 ,k2-1, ... ,kr-1 (Wn-t )) + · · · + N(Ck,,k 2,... ,k._ 1 -1 (Wn-t)) +N(Ck 1,k 2,... ,k._, (Wn-1)). This relation, by virtue of Theorem 2.8, implies (2.12). Note that recurrence relation (2.12) can also be shown algebraically by using expression (2.11 ). I REMARK 2.8 Consider a finite set Wn = {w 1 , w2, ... , wn}. with n = kr, and the particular case of the divisions (A 1 , A 2, ... , Ar) of W n in r (ordered) subsets, with N(Aj) = k, j = 1, 2, ... , r. The number Cn,k,r of these divisions of Wn, according to Theorem 2.8, equals I cn,k,r --~ ( k!Y ·
PERMUTATIONS AND COMBINATIONS
66
Further, consider the particular case of the partitions {AI, A2, ... , Ar} of Wn in r(unordered)subsets,withN(Aj) = k,j = 1,2, ... ,r. To each such partition there correspond r! from the preceding divisions and specifically those that are formed by permuting the r subsets in all possible ways. Thus, if Bn,k,r denotes the number of these partitions of Wn, then Cn,k,r = r!Bn,k,r• and so
B
I - _n_._
n,k,r - r!(kW.
In order to exemplify this connection, consider the divisions (A, B) and the partitions {A,B} of the set W4 = {w 1 ,w2 ,w3 ,w4 } in two subsets, with N(A) = N(B) = 2. The partitions are
and the corresponding divisions are ( {WI , W2}, { W3, W4}), ( {WI , W3}, { W2, W4}), ({WI, W4}, {W2, W3}), ({w3,w4}, {wi,w2}), ({w2,w4}, {wi,w3}), ({w2,w3}, {wi,w4}), in agreement with B4,2,2 = 3 and C 4,2,2 = 6.
I
The next theorem is concerned with the number of partitions of a finite set and constitutes a generalization of the conclusion of the preceding remark.
THEOREM 2.10
The number of partitions {AI, A2, ... , Ar} of a finite set W n• with N (Wn) = n, in r (unordered) subsets, among which rj 2: 0 include j elements, j = 1, 2, ... , n, denoted by B(n, r; ri, r 2, ... , rn). equals (2.13)
where ri
+ r2 + · · · + rn = rand ri + 2r2 + · · · + nrn = n.
PROOF Consider a partition {AI,A 2, ... ,Ar} of Wn, in rj 2: 0 subsets including j elements each, j = 1, 2, ... , n, with ri + r 2 + · · · + rn = r and r1 + 2r2 + · · · + nrn = n. To it there correspond n !r2! · · · rn! divisions of Wn in r subsets, with r 1 2: 0 subsets including j elements each, j = 1, 2, ... , n, and, specifically, those that are formed by internal permutation of then ;::: 0 subsets with one element, the r 2 2: 0 subsets with two elements, and, finally, the rn 2: 0 subsets with n elements in all possible ways. Thus,
2.4. DIVISIONS AND PARTITIONS OF A FINITE SET
67
and also by (2.11 ), n!
C(n, 1, ... , 1, 2, ... , 2, ... ) = ( 1.') Tl ( !)T2 2 From these two relations, (2.13) is deduced.
• • •
(n! )Tn
I
Example 2.22 Elevator passengers' discharge Consider an elevator of a building of five floors that starts from the basement with eight passengers. Find the number of ways of discharging k 1 = 0, k2 = 3, k3 = 1, k 4 = 2 and k5 = 2 passengers at the first, second, third, fourth and fifth floors, respectively. Note that to each way of discharging k 1 = 0, k2 = 3, k3 = 1, k 4 = 2 and k5 = 2 passengers at the first, second, third, fourth and fifth floors, respectively, there corresponds a division of the set W8 = { w 1 , w 2 , ... , ws}, of eight passengers, in five (ordered) subsets (A 1 , A2, ... , A5), with N(A!) = 0, N(A2) = 3, N(A3) = 1, N(A 4 ) = 2 and N(A5) = 2, where the discharge of the passenger wi at the j-th floor corresponds to wi E Aj, i = 1, 2, ... , 8, j = 1, 2, ... , 5. Thus, the required number, according to Theorem 2.8, equals 8 - 1680 ' 0!3!1!2!(8- 3- 1 - 2)! .
D
Example 2.23 Consider a series of 21 throws of a die. Find the number of different outcomes in which number i appears i times, i = 1, 2, ... , 6, so that 1 + 2 + · · · + 6 = 21. An outcome of a series of21 tosses of a die (a1, a 2 , ... , a 21 ) that includesi times the numberi, i = 1, 2, ... , 6, corresponds uniquely to a division (A 1 , A2 , ... , A 6 ) of the set {1, 2, ... , 21 }, of the 21 throws of the die, in six ordered subsets, where Ai is the set of throws in which numberi appears, with N(Ai) = i, i = 1, 2, ... , 6. Thus, by Theorem 2.8, the required number equals 21 ) 21! ( 1, 2, 3, 4, 5 - 1!2!3!4!5!6!"
D
Example 2.24 Distributions of students in sections Suppose that n = kr students of the School of Sciences have chosen to attend a specific course from the department of mathematics. In order to provide better attendance conditions, these students are distributed in r sections, each with k students. Determine the number of such distributions. (a) If the r sections are considered distinguishable (since the lectures take place either in different days of the week or in different hours of a day), then the required
68
PERMUTATIONS AND COMBINATIONS
number, according to Theorem 2.8, equals
n! = (k!}r,
Cn,k,r
the number of divisions (AI, A2 , ... , Ar) of the set Wn = {wi,w 2, ... , wn}. of then students, in r subsets (sections) with N(Aj) = k, j = 1, 2, ... , r. (b) If the r sections are considered as indistinguishable (since they cover the same amount of knowledge), then the required number, according to Theorem 2.10, equals
B
I - _n_._ r!(k!)r,
n,k,r -
the number of partitions {AI, A2, ... , Ar} of the set Wn = {WI, w2, ... , wn}. of then students, in r subsets (sections) with N(Aj) = k, j = 1, 2, ... , r. 0
Example 2.25 Distributions of distinguishable balls into indistinguishable urns Consider the distributions of n distinguishable balls into r indistinguishable urns, in which Tj 2: 0 urns include j balls, j = 0, 1, 2, ... , n, with r0 + ri +r 2 + · · · + rn = rand ri + 2r2 + · · · + nrn = n. Find the number of such distributions. Such a distribution corresponds to a partition of the set Bn = { bi, b2, ... , bn}, of then balls, in r-r0 (unordered) subsets, among which r1 2: 0 include j elements (balls), j = 1, 2, ... , n, with ri + r2 + · · · + rn = r- ro and ri + 2r2 + · · · + nrn = n. Thus, according to Theorem 2.10, the required number equals n! B(n,r-ro;ri,r2,····rn)= TI·'(I) '( 2.') rz 1. Tir2 . In particular, for n = 10, r of distributions equals
·rn.'( n.') Tn
= 5 and r 0 = 0, TI = 2, r 2 = 1, r3 = 2, the number
10! 12 600 2!(1!)21!(2!)12!(3!)2 = • '
2.5
..
0
INTEGER SOLUTIONS OF A LINEAR EQUATION
Consider the linear equation XI + X2 + · · · +
Xn
= k,
(2.14)
where k is an integer. The calculation of the number of integer solutions (ri, r 2 , .•• , rn) of (2.14) satisfying a given set of restrictions is reduced to
2.5. INTEGER SOLUTIONS OF A LINEAR EQUATION
69
the calculation of the number of combinations (with or without repetition) of the n indices { 1, 2, ... , n} satisfying analogous restrictions. In the following theorems and corollaries, the number of integer solutions of the linear equation (2.14) under several sets of restrictions is derived.
THEOREM 2.11 The number of solutions (r1, r 2, ... , rn) of the linear equation (2.14), with = 0 or 1, i = 1, 2, ... , n, and k a nonnegative integer; equals
:r:;
the number of k-combinations of n. PROOF Note that, to each solution (r 1 ,r2 , ... ,rn) of (2.14), with r; = 0 or 1, i = 1, 2, ... , n, there corresponds an assignment of the k units of the righthand side to the n distinguishable summands of the left-hand side of (2.14), assigning r; units to the i-th summand, i = 1, 2, ... , n. Since the possible values of ri are 0 and 1, such an assignment may be expressed as {a1, a 2 , ... , ak}, where aj E { 1, 2, ... , n} and a; =I aj, by listing only the indices of the summands to which a unit is assigned (where the order oflisting does not matter). This correspondence is obviously one to one and thus the number of solutions (r1 , r 2 , ... , rn) of (2.14), with r; = 0 or 1, i = 1, 2, ... , n, equals (~),the number of k-combinations ofn.
I
THEOREM 2.12 The number of nonnegative integer solutions (r 1 , r 2 , ... , rn) of the linear equation (2.14 ), with k a nonnegative integer; equals
the number of k-combinations of n with repetition. PROOF Note that, to each nonnegative integer solution (r 1 , r 2 , ..• , rn) of (2.14 ), there corresponds an assignment of the k units of the right-hand side to the n distinguishable summands of the left-hand side of (2.14), which assigns r; ~ 0 units to the i-th summand, i = 1, 2, ... , n. Such an assignment may be expressed as {a 1 , a 2 , ... , ak}, where r 1 elements are equal to 1, r 2 elements are equal to 2, ... , rn elements are equal ton, by listing r; ~ 0 times the index i, for i = 1, 2, ... , n (with the order of listing not counting). Thus, to each nonnegative int~ger solution (r 1 , r 2 , •.. , rn) of (2.14) there corresponds a k-combination
PERMUTATIONS AND COMBINATIONS
70
{a1 , a 2 , ... , ak} of the n indices { 1, 2, ... , n} with repetition, in which the element (index) i is included r; 2: 0 times, fori = 1, 2, ... , n. This correspondence is obviously one to one and so the number of nonnegative integer solutions of (2.14) equals (n+~-l), the number of k-combinations of n with repetition. I COROLLARY 2.4 (a) The number of integer solutions (r 1,r2, ... ,rn) of the linear equation (2.14), with the restrictions X;
for given integers
8;,
2:
8;,
i
= 1,2, ...
i = 1, 2, ... , n, with
8
=
81
,n
(2.15)
+ 82 + · · · + 8n
~
k, equals
(n+ k-8 1) (n + n-1 1) . k -
k -
8 -
8 -
(b) The number of integer solutions (r 1 , r 2 , ••. , rn) of the linear equation (2.14), with the restrictions (2.16) = 1, 2, ... , n = 1, 2, ... , n, with m = m 1 + m 2 + · · · + mn > k, x; ~ mi, i
for given integers mi, i equals
m 1) = (n + mn-1- 1). (n+ m-k k -
k -
PROOF (a) On using the transformation y; = x; - 8;, i = 1, 2, ... , n, the linear equation (2.14) and the restrictions (2.15) reduce to the linear equation
Y1
+ Y2 + · · · + Yn = k
-
8,
(2.17)
withy; 2: O,i = 1,2, ... ,nandk-8anonnegativeinteger. Since this transformation is one-to-one, to each integer solution (r 1 , r 2 , ... , rn) of the linear equation (2.14 ), with the restrictions (2.15), there corresponds one and only one nonnegative integer solution (r 1 - 8 1 , r 2 - 8 2 , .. . , r n - 8n) of the linear equation (2.17) and vice versa. Thus, the required number equals the number of nonnegative integer solutions of (2.17), which, by Theorem 2.12, is given by
(n+ k-8 1) (n + n-1 1) . k -
8 -
=
k -
8 -
(b) Similarly, upon using the tran·sformation z; = m; - x;, i = 1, 2, ... , n, the linear equation (2.14) and the restrictions (2.16) reduce to the linear equation ZI
+ Zl + ... + Zn
= m- k,
(2.18)
2.5. INTEGER SOLUTIONS OF A LINEAR EQUATION
71
with Zi 2 0, i = 1, 2, ... , nand m- k a nonnegative integer. Since this transformation (4.8) is also one-to-one, arguing as before, it follows that the required number equals the number of nonnegative integer solutions of (2.18), which, by Theorem 2.12, is given by
m - k - 1) = (n + m - k - 1) . (n+ m-k n-1
I
The proof of the corollary is thus completed.
The particular case with si = 1, i = 1, 2, ... , n in the restrictions (2 .15), which corresponds to the calculation of the number of positive integer (integral) solutions of the linear equation (2.14), is worth a separate presentation. COROLLARY 2.5 The number of positive integer solutions (r 1 , r 2 , ... , rn) of the linear equation (2.14), with k 2 n, equals
k- 1) = (k- 1). (k-n n-1
REMARK 2.9 The number of integer solutions (r 1 , r 2 , ... , rn) of the linear equation (2.14), with the restrictions
for given integers si, mi. i = 1, 2, ... , n, with s ~ k ~ m, s
= St + s2 + · · · + Bn,
m
= m1 + m2 + · · · + mn,
is calculated in Chapter 4 (Theorem 4.3) by applying the inclusion and exclusion I principle. REMARK 2.10 Integer solutions of a linear equation and distributions of indistinguishable balls into distinguishable urns. The existence of a one-toone correspondence between the integer solutions of the linear equation (2.14) and the distributions of k indistinguishable balls into n distinguishable urns {w 1 , w 2 , · .. , wn} is already indicated in the proofs of Theorems 2.11 and 2.12. Specifically, to an integer solution (r 1 , r 2 , ... , rn) of the linear equation (2.14) that satisfies a given set of restrictions, there uniquely corresponds the distribution of k indistinguishable balls into n distinguishable urns, {w 1 , w 2 , ... , wn}, that assigns I (allocates) ri balls into urn Wi for all i = 1, 2, ... , n, and vice versa.
72
PERMUTATIONS AND COMBINATIONS
Example 2.26 Consider a collection of 32 cards of four different colors (blue, green, red and yellow), with eight cards from each color. Find the number of different subcollections of (a) five cards and (b) at most five cards. (a) Let xi be the number of cards of the i-th color, i = 1, 2, 3, 4. Then a sub-collection of five cards is a nonnegative integer solution of the linear equation
Consequently, by Theorem 2.12, the number of different sub-collections of five cards equals
(8)5 (8)3 82.. 3 =
=
7 . 6 = 56.
(b) A sub-collection of k cards is a nonnegative integer solution of the linear equation X1 + X2 + X3 + X4 = k and, according to Theorem 2.12, the number of different sub-collections of k cards equals
( 4 +~- 1 ),
k=0,1, ... ,5.
Clearly, the number of sub-collections with at most five cards equals the sum of these numbers, 5
{;
(4 + k 1) k-
= 1 + 4 + 10 + 20 + 35 +56 = 126.
Note that, by the vertical recurrence relation of the number of k-combinations of 4 with repetition, this sum is given by (see Remark 2.5) (
4 + 5) =
5
(9) (9) 9. =
5
8. 7. 6 = 126.
4
2-3·4
The number of sub-collections with at most five cards may also be derived by noting that a sub-collection of at most five cards is a nonnegative integer solution of the linear inequality Xt + X2 + X3 + X4 :::; 5. The number of nonnegative integer solutions (r 1 , r 2 , r 3 , r 4 ) of this linear inequality, upon introducing the surplus variable x 5 = 5 - (x 1 + x 2 + x3 + x4), equals the number of nonnegative integer solutions (r 1 , r 2 , r3, r 4 , r 5 ) of the linear equation X1
+
X2
+
X3
+
X4
+
X5
= 5,
which, according to Theorem 2.12, is given by G)= 126.
D
2.5. INTEGER SOLUTIONS OF A LINEAR EQUATION
73
Example 2.27 Transportation of products of different kinds Let us consider a storehouse that has n kinds of a merchandized product, packed in boxes of equal size, with a proper identity label on each, in stocks of at least s boxes from each kind at any moment. Calculate the number of loads of different composition that a truck with capacity of k boxes may carry for the execution of orders requiring at least s boxes from each kind of the product . Let Xi 2: s be the number of boxes of the i-th kind that the truck may carry, i = 1, 2, ... , n. Then x 1 + x 2 + · · · + Xn is the total load of the truck, which, of course, does not exceed its capacity. Therefore, the required number equals the number of integer solutions (r 1 , r 2 , ... , rn) of the linear inequality
with the restrictions
xi 2: s, i
= 1, 2, ... , n,
ns :::; k,
which, upon introducing the surplus variable Xn+l = k- (x 1 + x 2 + · · · + xn). equals the number of integer solutions (r1, r 2 , ... , rn, rn+d• with rn+l = k- (r 1 + r 2 + · · · + rn), of the linear equation XI
+ Xz + · · · + Xn + Xn+l = k,
with the restrictions Xi
2: s, i = 1,2, ... ,n, :rn+l 2:0, ns :S k.
Consequently, according to Corollary 2.4, this number is
Example 2.28 Fibonacci numbers Find the number C 1 ( n, k) of k-combinations of the set { 1, 2, ... , n} that include no pair of consecutive integers and conclude the (total) number Cn of combinations of { 1, 2, ... , n} that include no pair of consecutive integers. Let {i 1 , i 2 , ... , ik} be any k-combination of the set {1, 2, ... , n}. Since the order of the elements included in any combination does not count, it may be assumed that 1 :S it < iz < · · · < ik :S n. Consider the distance between the successive elements of this k-combination:
and also
74
PERMUTATIONS AND COMBINATIONS
Adding these equations by parts, the following linear equation
J1 + iz + · · · + Jk + Jk+1
=n
is deduced. Thus, each k-combination { i 1 , i 2 , .•. , ik} of the set {1, 2, ... , n} that includes no pair of consecutive integers corresponds to an integer solution of this linear equation that satisfies the restrictions
Jl
~ 1,
Jz
h
~ 2,
~ 2, ... ' ik ~ 2, ik+1 ~ 0,
with s = s 1 + s 2 + · · · + Sk + Sk+ 1 = 1 + 2(k- 1) = 2k- 1 ::; n, and vice versa. Consequently, according to Corollary 2.4, the numberC1 (n, k) of k-combinations of the set {1, 2, ... , n} that include no pair of consecutive integers is given by
Ct(n, k) = (
n- k
k
+
1)
, k = 0, 1, ... , [(n
+ 1)/2],
where [x] denotes the integer part of x. Then, the (total) number C n of combinations of { 1, 2, ... , n} that include no pair of consecutive integers is given by the sum [(n+1)/2]
Cn
=
L
k
(n- k + ) , n = 1
0, 1, ....
k=O
The numbers / 0 = 1, f n = Cn- 1 , n = 1, 2, ... , are called Fibonacci numbers. The number f n first appeared as the number of pairs of rabbits born from one pair at the end of the (n - 1) -st month. This problem was posed in 1202 by Leonardo Fibonacci in his book on abacus (Liber Abacz). 0
Example 2.29 Lucas numbers Assume that then numbers of the set {1, 2, ... , n} are displayed on a circle, whence (n, 1) is a pair of consecutive points. Find the number B 1 (n, k) of kcombinations of the set {1, 2, ... , n} displayed on a circle that include no pair of consecutive points and conclude the (total) number K n of combinations of the set {1, 2, ... , n} displayed on a circle that include no pair of consecutive points. The set of k-combinations of the set {1, 2, ... , n} displayed on a circle that include no pair of consecutive points can be divided into two disjoint subsets: the subset of these combinations that include n and the subset of these combinations that do not include n. Further, (a) the number of these combinations that do not include n equals
c1 (n-
1, k)
= ( n-k k) '
the number of k combinations of then- 1 consecutive integers { 1, 2, ... , n- 1} displayed on a straight line, including no pair of consecutive integers. (b) The
75
2.6. LATTICE PATHS
number of these combinations that include n, and thus do not include neither 1 nor n- 1, equals n- k C 1 (n-3,k-1)= ( k-l ,
-l)
the number of (k- I)-combinations of then - 3 consecutive positive integers {2, 3, ... , n- 2} displayed on a straight line, including no pair of consecutive integers. Hence, by the addition principle, the required number is given by the sum BI(n, k) =
(n-k k) + (n -k-k- 1) 1
and since
it follows that
B1 (n, k) = n n_ k (n -k
k) = kn (n -k _k- 1) , k = 0, 1, ... , [n/2]. 1
The (total) number Kn of combinations of the set {1, 2, ... , n} displayed on a circle that include no pair of consecutive points is given by the sum [n/ 2 ]
Kn =
L
n n- k n _ k ( k ) , n = 1, 2, ....
k=O
The numbers g0 = 2, Yn = Kn, n = 1, 2, ... , which are connected with the Fibonacci numbers (see Example 2.28) by
= fn + fn-2, numbers. 0 Yn
are called Lucas
2.6
n
= 2, 3, ...
,
LATTICE PATHS
Consider an orthogonal system of axes on the plane xy and the lattice defined by the straight lines x = i, i = 0, ±1, ±2, ... , and y = j, j = 0, ±1, ±2, ... , that are orthogonal to the (horizontal) axis x and the (vertical) axis y, respectively. A directed polygonal line on the lattice that leads from the point (r, s) to the point (n, k), r ~ n, s ~ k, through horizontal and vertical straight sections, positively directed, is called lattice path (or, more precisely, minimal lattice path) from the point (r, s) to the point (n, k).
PERMUTATIONS AND COMBINATIONS
76
A horizontal section of a lattice path between two successive points (i, j) and (i + 1,j) (of the horizontal line y = j) is called horizontal (unit) step, while a vertical section of a lattice path between two successive points (i, j) and (i,j + 1) (of the vertical line x = i) is called vertical (unit) step. According to these definitions, a lattice path from the point (r, s) to the point (n, k), r ~ n, s ~ k, is completely determined in any of the following ways: (a) by the set {(xo,Yo), (x1,yt), ... , (xn+k-r-s,Yn+k-r-s)} of the n + k- r- s + 1 points through which it passes, with (x 0 ,y0 ) = (r,s) and (xn+k-r-s, Yn+k-r-s) = (n, k), (b) by the permutation (s 1 , s2, ... , Sn+k-r-s) of then- r symbols h and k- s symbols v, where Si = h if the i-th step is a horizontal one and si = v if the i-th step is a vertical one, i = 1, 2, ... , n + k- r- s, (c) either by the set {i 1, i2, ... , in-r} of the positions of the horizontal steps, a subset of the set {1, 2, ... , n + k - r - s }, or by the set {j1,h, ... ,ik-s} = {1,2, ... ,n + k- r- s}- {il,i2,··· ,in-r} of the positions of the vertical steps. The calculation of the lattice paths from the point (r, s) to the point (n, k) may be reduced, by a parallel transfer of the orthogonal system of axes, z = x- r, w = y- s, to the calculation of the lattice paths from the origin (0, 0) to the point (n- r, k- s). The following theorem and corollary are concerned with the enumeration of such paths. THEOREM 2.13
The number of lattice paths from the origin (0, 0) to the point (n, k), with n 2: 0, k 2: 0, is given by L(
n,
k)=(n+k)!=(n+k) k · n 'k' ..
(2.19)
PROOI<' To each lattice path from the origin (0, 0) to the point (n, k), which requires n horizontal (h) and k vertical (v) successive (unit) steps (positively directed), there corresponds a permutation ( s 1 , s 2, ... , sn+k) of the n symbols h and the k symbols v and vice versa. Thus, the number of lattice paths from the origin (0, 0) to the point (n, k) equals the number of permutations of n + k symbols, among which n are hand k are v, and according to Theorem 2.4, is given by (2.19). I COROLLARY 2.6 The number of lattice paths from the point (r, s) to the point (n, k), with n 2: r,
77
2.6. LATTICE PATHS
k
~
s, is given by
= ( n+k-r-s) . k-s
L(r,s;n,k)
(2.20)
In Figure 2.1, the number of lattice paths from the origin (0, 0) to the lattice point (n, k), for n = 1, 2, ... , 5 and k = 1, 2, ... , 5, is quoted.
FIGURE2.1 Lattice paths
·. ·.
56
21
6
5
252
126
··········....
···········.... 5
·.
4
3
·. ········...
················... ··········... 3
2
·. ·.
6 ·············.... 1·.0·····... ·.
15
·····...
·. ·.
·. ·.. ··...
0 k
n
········... 21
·····.•. •···•···•• ... ························...
··...................
·········· ...
··.. 2
3
4
5
REMARK 2.11 (a) Each lattice path from the point (r, s) to the point (n, k) corresponds to an (n - r )-combination {it, i 2 , ••. , in-r}, which determines the positions of the horizontal steps among the n + k - r - s possible positions {1, 2, ... , n + k - r - s} and vice versa. Thus, the number of lattice paths from the point (r, s) to the point (n, k) equals the number of (n- r)-combinations of n + k - r - s, which, according to Theorem 2.5, is given by
(n+ n-rr- s), k-
PERMUTATIONS AND COMBINATIONS
78
which is equal to (2.20). (b) Let Wi be the section of the vertical line x = i between the points (i, s) and (i, k), i = r, r + 1, ... , n and Wn-r+I = {wr, Wr+I. ... , Wn}· Each of k - s - 1 horizontal lines y = j, j = s + 1, s + 2, ... , k - 1, divides every vertical section Wi into k - s unit sections that are possible vertical steps of the path. So, the lattice path from the point (r, s) to the point (n, k) that has mi vertical steps on the section Wi, with 0 ~ mi ~ k - s, fori = r, r + 1, ... , n and mr + mr+I + · · · + mn = k- s, corresponds to the (k - s)-combination {wi 1 ,Wh,··· ,wik_,}ofthesetWn-r+I = {wr,Wr+I•··· ,wn},ofn-r+1 sections, with repetition, in which the section w; is included mi times and vice versa. Thus, the number of lattice paths from the point (r, s) to the point (n, k) equals the number of (k- s)-combinations of n- r + 1 with repetition, which, I according to Theorem 2.7, is given by (2.20). Let us consider the straight line x = y + m, with m an integer and two lattice points (r, s) and (n, k), with r ~ n, s ~ k, that lie to the same side of the line that is either (a) r > s + m and n > k + m or (b) r < s + m and n < k + m. In the case r > s + m and n > k + m, if r ~ k + m, as well as in the case r < s + m and n < k + m, if s + m ~ n, there exist lattice paths from the point (r, s) to the point (n, k) that do not touch or intersect the line x = y + m. The calculation of these lattice paths may be reduced to the calculation of the lattice paths from the point that lies symmetric to the point (r, s), with respect to the line x = y+m, to the point (n, k), without any restriction. This reduction is achieved by applying the reflection principle. This principle, attributed to the French mathematician Desire Andre (1840-1918) who essentially used it to solve the famous ballot problem, is formulated and proved in the next lemma. LEMMA2.1 Let R(r, s; n, k; m) be the set of lattice paths from the point (r, s) to the point (n, k ), with s + m < r ~ k + m < n orr < s + m ::;; n < k + m, that do not touch or intersect the straight line x = y + m. Further, let £(s + m, r- m; n, k) be the set of lattice paths from the point (s + m, r - m) to the point (n, k), without any restriction. Then a one-to-one correspondence exists between the sets R(r, s; n, k; m) and £(s + m, r- m; n, k) and hence,
N(R(r,s;n,k;m))
= (n+k-r-s) = (n+k-r-s)· k-r+m
n-s-m
PROOF
(2.21)
Note that each lattice path from the set R(r, s; n, k; m) meets the straight line x = y + m, for the first time, at one of the points (i, i- m), i = r, r
+ 1, ...
,k
+m
if s
+ m < r::;; k + m < n
2.6. LATTICE PATHS
79
FIGURE2.2 Reflection principle
I
YJ[
v (s+m,r-Jy/
[7
7
I/ :/
v
1/
/*=
y+m
I
(n,k)
(i,i-m)
1.....-
-...
(r,s)
r7
X
or at one of the points
(j + m, j), j
= s, s + 1, ...
, n- m if r
< s + m < n _-::;
k
+ m.
Assume that s + m < r _-::; k + m _-::; n and consider a lattice path from the set R(r, s; n, k; m) that meets the straight line x = y + m, for the first time, at a specific point (i, i - m). This point separates the lattice path in two sections: (a) from the point (r, s) to the point (i, i- m) and (b) from the point (i, i - m) to the point (n, k) (see Figure 2.2). To this lattice path there corresponds a lattice path from the set C(s + m, r - m; n, k) that passes from the point (i, i - m); its section from (s + m, r- m) to (i, i - m) is the reflection of (a) with respect to the straight line x = y + m, that is, the point (u, v) is reflected to the point (v + m,u- m), u = r,r + 1, ... ,i, v = s,s + 1, ... ,i- m, while its section from (i, i - m) to (n, k) coincides with (b). This correspondence is one-to-one and thus N(R(r, s; n, k; m)) = N(C(s + m, r- m; n, k)), whence on using (2.20), the ex pression (2.21) is deduced. The other case r < s + m _-::; n < k + m is I similarly treated.
PERMUTATIONS AND COMBINATIONS
80
Example 2.30 The ballot problem Consider a ballot between two candidates Nand K, in which N receives n votes and K receives k votes. (a) Ifn > k, calculate the numberPn,k of ways of counting the votes such that, at any step, the votes for N are more than the votes forK. (b) If n 2: k, calculate the number 1/Jn,k of ways of counting the votes such that, at any step, the votes forK are not more than the votes for N. Let Xm and Ym be the numbers of votes for N and K, respectively, after counting m votes, m = 1, 2, ... , n + k. Then, the ordered pairs (xm, Ym), m = 1, 2, ... , n + k, are points of the lattice x = i, y = j, i,j = 0, ±1, ±2, ... and (a) Pn,k is the number of lattice paths from the origin (0, 0) to the point (n, k) such that Xm > Ym. m = 1, 2, ... , n + k. In order to calculate this number, consider the division of the lattice paths from the origin (0, 0) to the point (n, k) according to whether the first step is horizontal or vertical. The lattice paths from (0, 0) to (n, k) with the first step vertical and thus passing from the point (0, 1) (with the first vote forK) are not of interest because x 1 = 0 < 1 = y 1 . Further, the set of lattice paths with the first step horizontal, and thus passing from the point (1, 0) (with the first vote for N), and satisfying the conditions Xm > Ym. m = 2, 3, ... , n + k, may be expressed as a difference of two sets. Specifically, consider the set A of lattice paths from the point (1, 0) to the point (n, k) and the set B oflattice paths from the point (1, 0) to the point (n, k) that touch or intersect the straight line x = y. Then Pn,k
= N(A- B),
B ~ A
and, using part (c) of Theorem 1.4,
= N(A- B) = N(A)
Pn,k
- N(B).
According to Corollary 2.6 and Lemma 2.1,
N(A) = L(n- 1, k) =
(n+ kk - 1) ,
N(B) = L(n, k- 1) =
(n +k _k - 1) 1
and hence 1]1
•
= (n
+k -
n,k
k
1) _(n +k -k - 1) 1
= _ n (n
n
+k
+ k) _ _ k (n + k) k n+k k
= n-k(n+k)· n+ k
k
(b) Also, 1/Jn,k is the number of lattice paths from the origin (0, 0) to the point (n, k) such that Xm 2: Ym. m = 1, 2, ... , n + k or, equivalently, Xm > Ym- 1, m = 1, 2, ... , n + k. In order to calculate this number, let us consider the set C of lattice paths from the origin (0, 0) to the point (n, k) and the set D of the lattice
2.6. LATTICE PATHS
81
paths from (0, 0) to (n, k) that touch or intersect the straight line x D ~ C and 1/Jn,k = N(C- D)= N(C)- N(D).
= y- 1. Then
Therefore 1/Jn,k
= (n + k) _ (n + k) = n - k + 1 (n + k + 1) = n - k + 1 (n + k) . k k- 1 n+k+1 k n+1 k
In the particular case of n = k, it follows that Cn+l
=
1/Jn n
'
1
= -n +-1 (
n) ·
2 n
The numbers 1/Jn,k. k = 0, 1, ... , n, n = 0, 1, 2, ... , are called ballot numbe'T'S, while the numbers Cn, n = 0, 1, 2, ... , are called Catalan numbe'T'S. D Example 2.31 The cashier problem Consider a cashier of a theater with an entrance fee of $10, in front of which n persons, each with a $10 bill, and k persons, each with a $20 bill, are waiting. If each person buys only one ticket and the cashier has initially m $10 bills, calculate the number Cn,k,m of ways then + k persons can form a queue in front of the cashier so that no one will have to wait for change. Let Xr be the number of persons each with a $10 bill and Yr the number of persons each with a $20 bill, among the first 'T' persons of the queue, 'T' = 1, 2, ... , n + k. Then, the ordered pairs (Xr, Yr) are points of the lattice x = i, y = j, i, j = 0, ±1, ±2, ... and Cn,k,m is the number of lattice paths from the origin (0, 0) to the point (n, k), with Xr + m ~ Yr. 'T' = 1, 2, ... , n + k or, equivalently, with Xr - Yr > - (m + 1 ), r = 1, 2, ... , n + k. In order to calculate this number, let us consider the set A of lattice paths from the origin (0, 0) to the point (n, k) and the set B of lattice paths from the origin (0, 0) to the point (n, k) that touch or intersect the straight line x = y - ( m + 1). Then cn,k,m
= N(A- B),
B ~A
and using part (c) of Theorem 1.4, it follows that cn,k,m
= N(A- B)= N(A)- N(B),
where, according to Theorem 2.13, N(A) = L(n, k)
= ( n +n k)·
As regards the calculation of the number N(B), note that (a) If k < m + 1, the points (0, 0) and (n, k) lie below the straight line x = y- (m + 1) and there is no
PERMUTATIONS AND COMBINATIONS
82
lattice path from (0, 0) to (n, k) touching or intersecting this line, whence B = and so N(B) = 0. (b) If m + 1 :::; k :::; n + m, then according to Lemma 2.1,
NB ( )
=(
n+k k-m+1
)=(
0
n+k) n+m-1 ·
Further, (c) if k > n + m, the point (n,k) lies either on the straight line x = y- (m + 1) or above it, while the origin (0, 0) lies below it; thus all the lattice paths from the origin (0, 0) to the point (n, k) touch or intersect this line, whence B =A, and so N(A) = N(B). Therefore,
and
Cn,k,m
2.7
= 0, fork > n + m.
D
PROBABILISTIC APPLICATIONS
Some interesting probabilistic applications of permutations and combinations are presented in this section. Specifically, four classical problems in discrete probability, problems of ordered and unordered samples in statistics and three classical probabilistic models of statistical mechanics are examined.
2.7.1
Classical problems in discrete probability
(a) The most beneficial bet. Chevalier de Mere, a professional player of games of chance, in 1654 proposed the following problem to the famous French mathematician Blaise Pascal (1623 -1662) for solution: which is more beneficial for a player, to bet on the appearance of at least one 6 in four throws of a die or of at least one double 6 in 24 throws of a pair of distinguishable dice? Note that in a throw of a die there are six equiprobable possible results, { 1, 2, 3, 4, 5, 6}, and thus the probability of the appearance of 6, according to classical definition of probability (see Section 1.4), is 1/6. Also, in a throw of a pair of distinguishable dice, according to Example 2.8, there are 62 = 36 equiprobable possible results, {(i,j): i = 1,2, ... ,6, j = 1,2, ... ,6}, and thus the probability of the appearance of (6, 6) is 1/36. Since the probability of the appearance of 6 in a throw of a die is six times the probability of
2. 7. PROBABILISTIC APPLICATIONS
83
the appearance of (6, 6) in a throw of a pair of distinguishable dice and the total number of throws of the pair of distinguishable dice is six times the total number of throws of a die, Chevalier de Mere concluded that the two required probabilities are equal. But, in practice, he noted a difference between the two probabilities and complained to Pascal that mathematics Jed to wrong conclusions. Pascal corresponded this problem to the famous French mathematician Pierre Fermat (1608-1665). Both suggested different solutions to this problem. Pascal's solution, is the following. Let A be the event of the appearance of at least one 6 in four throws of a die and B the event of the appearance of at least one (6, 6) in 24 throws of a pair of distinguishable dice. Then P(A)
= 1- P(A'),
P(B)
= 1- P(B'),
where I 54 P(B') = 3524 P( A ) = 64 ' 3624 '
since N(A') = 54, which is the number of the 4-permutations with repetition of the five numbers (excluding the number 6), N(flt) = 64 and N(B') = 35 24 , which is the number of the 24-permutations with repetition of the 35 pairs (excluding the pair (6,6)), N(fl2) = 36 24 . Thus 24 4 5) ~ 0,518, P(B) = 1 - (35) ~ 0,491. P(A) = 1 - ( "6 36 (b) Distribution of shares. Consider two players K and R contending in a series of games in which the winner is the one who first wins n games. Assume that the probability for each player to win a game is 1/2. Further, suppose that for some reason the series of games is interrupted when K has won n - k games and R, n - r games, k < n, r < n. In this case, in what shares might the total stake of s dollars be divided? Note that this is the oldest known probabilistic problem. It was initially published in 1494 by Lucas de Burgo Pacioli; however, the solution given by Pacioli was wrong. Later, Nicolo Tartaglia in 1556 and Francesco Peverone in 1581 engaged in this problem, but the solutions they proposed were also wrong. This is not surprising since then the notion of probability was not yet known. Fermat and Pascal, each independent of the other, provided the first correct solution of this problem. One of the solutions proposed by Fermat is the following. Assume that the series of games is continued and let A be the event in which player K is finally the winner and Aj the event in which player K completes the series of the rest of k wins at the j-th game (after the resumption of the series of games), j = k, k + 1, ... , k + r - 1. Then Ai
n A3
= 0, i f:. j,
A
= Ak + Ak+I + · · · + Ak+r-I
84
PERMUTATIONS AND COMBINATIONS
and so
k+r-1
=
P(A)
L
P(Aj)-
j=k
Further, N ( [}j) = 2i, which is the number of ]-permutations with ( unrestricted) repetition of then= 2 symbols w (win forK) and d (defeat for K) and
N(Ai) =
(j-
1 ), k-1
which is the number of different selections of the k - 1 positions for the symbol w from a total of j - 1 positions (the j-th position being occupied by the k-th w). Thus, by the classical definition of probability, P(Ai)
j-
= ( k-
and so
1 2i
(j _1)
k+r-1
~
P(A)=
1) 1
k-1
1 2i.
This expression can be reduced as follows: the probability P(A') that player K does not finally win and thus player R is finally the winner, which can be similarly evaluated, equals P(A') =
r~1 ~ j=r
(j1) ~ r -1
2J
and also, according to P(A') = 1- P(A), is given by k+r-1
P(A')
= 1-
" ~
j=k
.
(J-
~
1 ) k-1 2J
Equating the two expressions of P(A') and setting r = k, we conclude that
}~ G=D ~1
Therefore
1 2i =
1 L (j - 1) 2i'k
2+ P(A) =
k-1
j=2k
1
k=r
2'
1
2k-1
2-.L
J=r+k
(j - 1) 2i'k>r 1 k-1
2. 7. PROBABILISTIC APPLICATIONS
85
and, from the total stake of s dollars, player K might get a share of sP(A) dollars and player R a share of s[1 - P(A)J dollars. (c) The ballot problem {continuation). In a ballot between two candidates
N and K, N receives n votes and K receives k votes, with n > k. Calculate the probability that the votes for N are more than the votes for K at any step of a random counting of the votes. This problem was formulated by Bertrand in 1887. An elegant solution given in the same year by the French mathematician Desire Andre (18401917) is based on the reflection principle (see Section 2.6). Let E be the event in which the votes for candidate N are constantly more than the votes for candidate K during the counting of the votes. Since the votes are randomly taken out of the urn, the elementary events (sample points) are equiprobable and Laplace's formula of classical probability, P(E) = N(E)/N, can be applied. Note that N(E) is the number of ways of counting the votes so that, at any step, the votes for N are more than the votes for K and N is the number of ways of counting the votes without any restriction. According to Example 2.30, N(E)
n- (n
= 1[/n,k = n + kk +k k) .
Further,
and so
n-k
P(E) = - k .
n+
(d) The Banach matchbox problem. This problem, which was inspired by the smoking habits of the great Polish mathematician Banach, was presented by H. Steinhaus during a ceremony in honor of Banach. A mathematician always carries one matchbox in his right pocket and another in his left pocket. Whenever he needs a match to light his cigarette, he randomly chooses one of the two matchboxes. Suppose that each box initially contains n matches and consider the moment when, for the first time, the mathematician discovers that a box is empty. Calculate the probability Pn,k that, at this moment, the other box contains k matches. Let us denote by A the event in which the box in the right pocket contains k matches at the moment the box in the left pocket is discovered to be empty. Also let us denote by WI the selection of the box in the left pocket and by w 2 the selection of the box in the right pocket. Then A= {(a1, a 2, ... , a2n-k> wi): n of a's are WI and n- k are w2}.
PERMUTATIONS AND COMBINATIONS
86
Note that the number of sample points that belong to A equals N(A) = (2n- k)! = (2nn!(n- k)! n
k),
the number of permutations of the total of 2n- k symbols among which n symbols are w 1 and n - k symbols are w 2 • Further, each elementary event (sample point) B
= {(a1, a2, ...
, a2n-k, wi) : n specific a 1 s are w 1 and the other n - k are w2}
can be written as
where B2n-k+I = {wi} and n specific Bj are equal to {wi} and the other n- k Bj are equal to {w2}. Thus Bj <;;; {w 1 ,w2}, P(Bj) = 1/2 and so (see Section 1.4),
Therefore, P(A)
k) = N(A)P(B) = ( 2nn
1
22
n-k+l.
The same probability is derived for the event in which the box in the left pocket contains k matches at the moment that the box in the right pocket is discovered to be empty; so the required probability Pn,k is given by Pn,k
2.7.2
= 2P(A) =
(
2nn
k)
1 22n-k.
Ordered and unordered samples
In statistical inference the set of elements under consideration, in the study of a problem, is called population. Thus, a population constitutes the inhabitants of a city as well as the revenues of the public servants. Since the examination of all the elements (units) of a population may be expensive and time consuming, in statistics, we restrict ourselves to the study of a subset (part of) the population called sample. The number k of the elements of a sample is called the size of it. Among the various ways of selecting a sample, only a few are mentioned in this section. Sampling without replacement. Once selected, an element is not returned to the population. According to whether the order of selection of the elements of a sample counts or does not count, we refer to ordered and
2. 7. PROBABILISTIC APPLICATIONS
87
unordered samples. Then, in a population of n elements, the number of ordered samples of size k is (n)k, while the number of unordered samples (sub-populations} of size k is (~). Sampling with replacement. An element selected is returned to the population before the selection of the next element and so it can be chosen again. In this case, the number of ordered samples of size k is nk, while the number of unordered samples of size k is (n+z- 1 ). Usually equal probabilities are assigned to all the different samples that may be obtained from a population; such a sample is called random. So, a random ordered sample of size k from a population of n elements has probability to be selected 1/nk in the case of sampling with replacement, and 1/(n)k in the case of sampling without replacement. For a mndom unordered sample, the respective probabilities are 1/(n+z- 1 ) and 1/(~). The next probabilistic model, which leads to the classical hypergeometric and binomial distributions, constitutes a simple application of these notions and results. (a) Hypergeometric distributions. A random ordered or unordered sample of k balls is selected, without or with replacement, from an urn containing s white and n- s black balls. Let Ar be the event in which the sample contains exactly r white balls, r = 0, 1, ... , k. Calculate the probability P(Ar), r = 0,1, ... ,k. Let us first consider the case of sampling without replacement and assume that the order of selection of the balls is not of interest. The number of unordered samples of size k is N (!?I) = G), while the number of such samples that belong to Ar is N(Ar) = (;) (~.::::;), since the r white balls can be selected in (;) different ways and the k- r black balls in (~.::::;) different ways. Thus, by Laplace's definition of probability,
P(Ar)
= (;) (~=;)I(~),
r
= 0, 1, ... , k.
The probability distribution defined by this sequence of probabilities is called hypergeometric distribution. In the case of sampling with replacement, the number of unordered samples of size k is N(f?2 ) = (n+Z- 1 ), while the number of such samples that 1 belong to A r is N(A r ) = (s+rand thus ' r ) (n-s+k-r-l) k-r
The probability distribution defined by this sequence of probabilities is called negative hypergeometric distribution. Let us now suppose that the s white balls are numbered from 1 to s and the n - s black balls are numbered from s + 1 to n and assume that the
PERMUTATIONS AND COMBINATIONS
88
order of selection of the balls is of interest. In the case of sampling without replacement, the number of ordered samples of size k is N~Jl3 ) = (n)k· The number of such samples that belong to Ar is N(Ar) = (;)(s)r(n- s)k-r· Indeed, there are (~) ways of selecting the r positions for the white balls (the k - r positions for the black balls being thus specified) and, further, the r positions for the white balls can be occupied in ( s )r ways, while the remaining k- r positions for the black balls can be occupied in (n- s)k-r ways. Hence P ( Ar)
=
(k)r
(s)r(n- s)k_r
(n) k
,
r
= 0, 1 , . . . , k.
Since k)(s)r(n-s)k_r = (s)r(n-s)k-r/(n)k = (r (n)k r! (k- r)! k!
(s)(n-s)/(n) r
k- r
k '
it follows that the probability P(Ar) is the same for ordered as well as for unordered samples. (b) Binomial distribution. For the last model and in the case of sampling with replacement, the number of ordered samples of size k is N(Jl4 ) = nk. The number of such samples that belong to Ar is N(Ar) = (~) sr(n- s)k-r, since there are (~) ways of selecting the r positions for the white balls and these positions can be occupied in sr ways, while the remaining k - r positions for the black balls can be occupied in (n- s)k-r ways. Hence P(Ar)
=
(k) r
(s)r ( 1-:;;: s)k-r , r :;:
= 0, 1, ...
, k.
This sequence of probabilities constitutes a particular case of the probability function of the binomial distribution. (c) The birthday problem. A random ordered sample of size k is chosen with replacement from a population of n elements. Calculate the probability that the elements of the sample are all different. Consider the set Jl of ordered samples of size k that can be selected, with replacement, from a population of n elements. Let A be the event in which the elements of such a sample are all different. Then N(Jl) = nk, N(A) = (n)k and so P(A)
= (n~k.
n An interesting application of this probability is given in the following birthday problem. The birthdays of k people form an ordered sample of size k from the population of all days in the year. With n = 365, the probability that all k birthdays are different is P(A) = (365)k 365k '
2. 7. PROBABILISTIC APPLICATIONS
89
while the probability that at least two persons have a common birthday is P(A')
For k
=1-
P(A)
= 1 - (~~~~k.
= 23, it follows that P(A') > 1/2.
2.7.3 Probability models in statistical mechanics Consider a mechanical system consisting of k particles. To each particle of mass m there correspond its position (x, y, z) and its momentum (mu, mv, mw), where u, v and w are the coordinates of its velocity. In statistical mechanics the 6-dimensional space, in which the vectors (x, y, z, mu, mv, mw) belong, is subdivided into a large number of n small regions or cells so that each particle, in accordance with its coordinates, is assigned to one cell. According to the hypotheses imposed on the particles (distinguishable or indistinguishable) and on the cells (distinguishable or indistinguishable, of limited or unlimited capacity), several models may be introduced. (a) Maxwell-Boltzman model. Assume that the k particles as well as the n cells are distinguishable. Thus, there are nk distributions (allocations) of the particles into the cells. Further, assume that these distributions are equiprobable and so each has probability 1/nk. Note that this assumption may be achieved by an appropriate definition of the cells. The number of distributions resulting in Tj particles in j-th cell, j = 1, 2, ... , n, equals
k)(k-rl)···(k-rl-···-rn-2)= k! , ( TI r2 Tn-1 r1!r2!···rn! with r 1 + r 2 + · · · + rn = k. Therefore the probability that Tj particles are in the j-th cell, j = 1, 2, ... , n, with r 1 + r 2 + · · · + rn = k, is
It should be noted that in modern theory it was shown beyond doubt that this model does not describe the behavior of any known particles. (b) Bose-Einstein model. Assume that the k particles are indistinguishable and the n cells are distinguishable. Thus, there are (n+~- 1 ) distributions of the particles into the cells. Further, suppose that these distributions are equiprobable, each with probability 1/ (n+~ - 1 ). This assumption holds true for photons, nuclei and atoms containing an even number of elementary particles. Thus, the probability that a given cell contains r particles is . k) = + kk+ kk - ' p (r, n, r
(n
r- 2) I (n
1)
PERMUTATIONS AND COMBINATIONS
90
since the remaining k - r particles can be distributed into the remaining 2 n- 1 cells in ) ways. The probability that s cells remain empty is
(n+z=;-
q(s; n, k)
=
(n) ( 1 )I (n + 1) s
k -
n- s- 1
k -
k
'
since there are (~) ways of selecting the empty cells and, for each of these selections, (n~~~J ways of distributing the k indistinguish~ble particles into the remaining n - s cells so that no one of these remains empty. (c) Fermi-Dirac model. It is assumed that the k particles are indistinguishable and the n cells distinguishable, with capacity limited to one particle. The second assumption requires k :::;: n. Thus, there are (~) distributions of the particles into the cells. Further, it is assumed that these distributions are equiprobable, each with probability 1/ (~). Therefore, the probability that a group of s given cells contains r particles equals q(r, s; n, k)
= (;)
(~=;)I(~).
Note that in statistical mechanics it was shown that electrons, neutrons and protons satisfy the assumptions of this model.
2.8
BIBLIOGRAPHIC NOTES
The French mathematicians Blaise Pascal (1623- 1662) and Pierre Fermat (1608-1665), motivated by the probabilistic problems of the most beneficial bet and the distribution of shares, discussed in Section 2. 7, initiated in 1654 the unification of the long existing methods and results on the enumeration of permutations and combinations of a finite set. Pascal's Triangle Arithmetique, which is now referred to as Pascal's triangle, was published after his death in 1665. The first textbook, Ars Conjectandi, dealing with problems of combinatorial and probabilistic nature was written by James Bernoulli (1654-1705). It was published posthumously in 1713 by Nicolas and John Bernoulli. The first comprehensive textbook on counting permutations and combinations was written by W. A. Whitworth (1867) and is available in reprint form. Illustrating the theory on enumeration of integer solutions of a linear equation, presented in Section 2.5, we examined the enumeration of linear and circular combinations that include no pair of consecutive integers; the Fibonacci and Lucas numbers emerged. Generating functions and other properties of these numbers will be discussed in subsequent chapters. Even more can be learned from the book by V. E. Hoggatt (1969).
2.9. EXERCISES
91
As we have noted in Section 2. 7, the famous ballot problem was formulated by J. Bertrand (1887). An elegant solution by using the reflection principle was given by D. Andre (1887). In recent years a lot of papers dealing with extensions and generalizations of this problem were published and led to the development of lattice path combinatorics. We have only touched upon this subject. The interested reader is referred to the books by W. Feller (1968, Chapter 3), F. Spitzer (1964), L. Takacs (1967a), S. G. Mohanty (1979) and T. V. Narayana (1979).
2.9
EXERCISES
1. Calculate the number of different seatings in a row of four boys and three girls (a) so that no two girls are seated next to each other and (b) without any restriction. 2. Suppose that 16 teams take part in a soccer premier league. For the championship of a season, each team contests with every other team in two matches, one home and the other away. Calculate the total number of matches. 3. In how many ways can five mathematics books, three physics books and two books of two other different subjects be placed on a shelf so that the books of the same subject are not interrupted? 4. An elevator of a four-floor building starts from the basement with three passengers. Find the number of ways of discharging these passengers. In how many of these ways does one passenger get off at the fourth floor? 5. Find the number of different ways the president, vice-president, secretary and treasurer of a seven-member committee can be chosen. 6. Consider a series of three throws of a die. Find the number of possible outcomes that include three consecutive numbers.
7. Calculate the number of four-digit integers that (a) have no digits other than 0, 1 or 2, (b) are even (numbers) and (c) are odd (numbers). 8. Suppose that ten letters {h, h, ... , l 10 } from an alphabet are given. Find the number of four-letter words that can be formed (a) without repeated letters and (b) without any restriction. 9. Find the number of permutations of five kinds of elements {w 1 , w 2 , with two like elements of each kind, in which the two like elements of each of the two kinds {w 1 , w 2 } are consecutive.
W3,W4,w 5 },
92
PERMUTATIONS AND COMBINATIONS
10. Find the number of permutations of the ten digits {0, 1, ... , 9} in which 0 precedes 1 and 2 precedes 3. 11. A problem of Galilei. Suppose that three distinguishable dice (one white, one black and one red) are rolled and let S 3 = {(w,b,r) : w = 1, 2, ... , 6, b = 1, 2, ... , 6, r = 1, 2, ... , 6} be the set of possible results. Also, let A be the subset of possible results (w, b, r) with sum w + b + r = 9 and B the subset of possible results (w, b, r) with sum w + b + r = 10. Calculate the numbers N(A) and N(B), and conclude that P(A) < P(B). 12. Circular permutations. An arrangement (i 1 ,i 2 , ... ,in) of the elements of a set { 1, 2, ... , n} on a circle, so that i 1 succeeds in, is called circular permutation. Show that the number of circular permutations of the set { 1, 2, ... , n} equals (n - 1)! 13. Suppose that seven persons {w 1 ,w2 , ... ,w7 } are arranged (a) in a row and (b) on a circle. In each case, find the number of different arrangements in which three persons stand between w 1 and w 2 .
14. Calculate the number of different seating of seven married couples (a) around a straight table, and (b) around a circular table, so that the husband and wife of three specified couples are seated next to each other. 15. Suppose that two distinguishable dice are rolled. Find the number of outcomes (pairs) in which both numbers are less than or equal (a) to 4 and (b) to 3. Combine the two results to find (c) the number of outcomes (pairs) in which 4 is the maximum of the two numbers. 16. (Continuation). Find the number of outcomes (pairs) in which 4 is the minimum of the two numbers. 17. A domino piece is marked by an unordered pair of two sets of dots. Each set contains 0 to 6 dots. Find the number of different domino pieces. 18. In how many ways can a group of six boys and six girls be divided into two equals groups so that each group contains odd numbers of boys and girls? 19. Consider five points on the circumference of a circle. Find (a) the number of cords that can be constructed by connecting these points in all possible ways, (b) the number of triangles that can be constructed with these points as vertices. Note that there is a one-to-one correspondence between the set of cords and the set of triangles that can be constructed using these five points. 20. In how many ways can a five-member council of a club of n couples be formed (a) if two women should be included, (b) if both husband and wife can not be included and (c) if no restriction exists.
2.9. EXERCISES
93
21. Consider a batch of ten new books that are to be placed on five available shelves of a library and assume that each shelf has room for up to ten books. Calculate the number of different arrangements of the books on the shelves in the cases where the books are (a) distinguishable and (b) indistinguishable in their external appearance. 22. Find the number of eight-digit ternary sequences (of Os, 1s or 2s) which include two Os and three 1s. 23. Find the number of permutations (i 1 , i 2 , ... , i 10 ) of the ten digits {0, 1, ... , 9} in which (a) it < i2, (b) it < i 2 < i3 and (c) it < i 2 and h < i4· 24. Find the number of ways of distributing ten different cards into four distinguishable boxes so that j cards are placed into the j-th box, j = 1,2,3,4. 25. Find the number of ways of equally distributing six different cards (a) to three children and (b) into three indistinguishable boxes.
26. Suppose that ten cards numbered from 0 to 9 are equally distributed (a) to five children and (b) into five indistinguishable boxes. In each case, find the number of different distributions and the number of these distributions in which each child (box) receives one card with an even number and the other card with an odd number. 27. Assume that three qualified candidates contest for a position of assistant professor in the department of mathematics. The 11-member selection committee is about to decide by voting whom to hire for the position. Calculate the number of different election outcomes (a) without any restriction and (b) with the restriction that a candidate receives a majority.
28. Every morning a man walks eight blocks to his office, which is located five blocks east and three blocks north of his house. For simplicity, assume that all the blocks are rectangular and there are no blind streets. Find the number of different paths he may follow if he walks only to the east and to the north. 29*. Consider the following procedure of partitioning a finite set of n elements into n one-element subsets. Initially this set is partitioned into two subsets. If one of the two subsets is an one-element set and the other contains at least two elements, then the subset with at least two elements is partitioned into two subsets; if both the subsets contain at least two elements, then any of these is partitioned into two subsets. Generally, at the k-th stage any of the subsets obtained at the preceding stages and containing at least two elements is partitioned into two subsets, k = 1, 2, ... , n -1. So, after n- 1 stages the set of n elements is partitioned into n one-element
94
PERMUTATIONS AND COMBINATIONS
subsets. Show that the number of ways this procedure can be executed is given by
30*. Suppose that n generals place secret documents in a safe that can be opened only when the majority of them is present. For this reason, the safe is locked with a number of lockers and each general has keys for some of them. Calculate (a) the least number an of lockers needed and (b) the number bn of keys a general should have. 31. Let r, s and n be positive integers. Prove combinatorially the relations
and
32. Show, (a) algebraically and (b) combinatorially, that
and
33. Show that
and ( n)(n) S k
=f(~)(k+s-j)( n j=O J S k +S -
34. Show that
and
.), m=min{k,s}.
J
2.9. EXERCISES
95
35. Prove that
and
36. Using Pascal's triangle, show that
37. Show that the number of injective maps = {yt,Y2,··. ,yn} is (n)k.
f
of the set X= {x 1 , x 2 , ...
,
xk} into the set Y
38. Show that the number of maps f of the set {1, 2, ... , k} into the set { 1, 2, ... , n} that are (a) strictly increasing is (~) and (b) increasing is ( n+k-1) k •
39. Let B(n, k, s) be the number of k-combinations of the set Wn+J = {w0 , w 1 , ... , wn}, of n + 1 elements, with repetition and the restriction that the element w 0 is allowed to appear at most s times and each of the other n elements at most once. Show that B(n, k, s) =
f
j=O
(k
~
.) , m = min{k, s}. J
40. Let E 2 (n, k) be the number of k-combinations of n with repetition and the restriction that each element is allowed to appear at most twice. Show that
E2(n,k) =
~ (;) (n ~ j),
m = min{n, [k/2]}.
41. (Continuation). Let A(n, r, k) be the number of k-combinations of n + r with repetition and the restriction that each of n specified elements may appear at most twice, while each of the other r elements may appear at most once. Show that m A(n,r,k)=L
J=O
(n). (n + j) J
k-r - . 2J
.
, m=mm{n,[k/2]}.
96
PERMUTATIONS AND COMBINATIONS
Also derive the expression A(n,r,k)
G)E
=~
2 (n,k-
i), s
= min{r,k}.
42. Consider n elements belonging in r different kinds, with k 1, k2, ... , kr elements, respectively. Let C(k 1, k2, ... , kr; k) be the number of k-combinations of the k 1 + k2 + · · · + kr = n elements and C(k2, k3, ... , kr; k- j) be the number of (k- i)-combinations of the k2 + k3 + · · · + kr = n- k 1 elements. Show that k,
C(k1, k2, ... , kr; k)
= L C(k2, k3, ...
, kr; k- j).
j=O
43*. Let S(n, k) be the number of partitions of a set of n elements ink subsets. (a) Prove that S(n, k)
= "L.,; r1 !(1!}r
1
n! r2!(2!Y2
• • •
rn!( n!)rn
,
where the summation is extended over all rj ~ 0, j = 1, 2, ... , n, with r1 + r2 + · · · + rn = k and r1 + 2r2 + · · · + nrn = n. Further, derive (b) the triangular recurrence relation S(n, k) = S(n- 1, k- 1)
+ kS(n-
with initial conditions S(O, 0) recurrence relation S(n, k)
1, k), k = 1, 2, ... , n = 1, 2, ... ,
= 1, S(n, k) = 0, k > n, and
= n-1 ~
(
n
~
1)
(c) the vertical
S(r, k- 1).
44*. (Continuation). If T(n, r, k) is the number of maps f of X = X2, ... , xn} into Y = {Yl, Y2, ... , Yr}, with range space f( X) containing k elements, (a) show that { X1,
T(n, r, k) = S(n, k)(r)k
and (b) conclude that n
L S(n, k)(r)k = rn. k=l
(c) Multiplying both sides of the last relation by (-1)i-r{t), r::; j::; n and summing for r = 1, 2, ... ,j, deduce the expression S(n,j)
= ~ t(-l)j-r(j)rn, j = 1,2, ... J. r=l
r
,n, n
= 1,2, ....
97
2.9. EXERCISES
The numbers S(n,j), j = 1, 2, ... , n, n = 1, 2, ... , are called Stirling numbers of the second kind. 45*. (Continuation). Let W(n, k) be the number of divisions of a set of n elements in k nonempty subsets. Show that k
W(n,k)
= k!S(n,k) = ?;(-1)k-rG)rn.
46*. (Continuation). Let Bn be the (total) number of partitions of a set of n elements. (a) Prove that
where the summation is extended over all ri 2: 0, i = 1, 2, ... , n, with r 1 + 2r2 + · · · + nrn = n. Further, (b) derive the recurrence relation n-1 (
Bn = L
n
~ 1)
Bk, k = 1, 2, ... , Bo = 1.
k=O
The numbers Bn, n = 0, 1, 2, ... , are called Bell numbers. 4 7*. (Continuation). Prove that n
Bn = LS(n,k) k=l
and
oo
n
r Bn = e -1 """ L..,; 1· r=O
r.
48. Let k indistinguishable balls be distributed into n distinguishable urns of unlimited capacity. Find the number of distributions of the balls into the urns in which no urn remains empty. 49*. Runs of like elements in permutations. Let (a 1 , a2, ... , an) be a permutation of k zeros and n - k ones. If
ai
= 1, aj = 0, j = i + 1, i + 2, ...
,i
+ r,
ai+r+l
= 1,
then (ai+1, ai+2, ... , ai+r) is called run of zeros of length r of the permutation (a 1 , a 2 , ... , an). Show that the number of permutations of k zeros and n- k ones that include (a) s runs of zeros is
98
PERMUTATIONS AND COMBINATIONS
and (b) s runs of zeros, among which so that s1 + s2 + · · · + Sk = s, is
Sr
2: 0 are of length r, r = 1, 2, ... , k,
50*. (Continuation). Runs of consecutive elements in combinations. Let = { il' i2, ... 'ik} beak-combination of the set { 1, 2, ... 'n }. If,
ck
then the r-combination Sr of the set { 1, 2, ... , n} is called run of consecutive elements of length r of the k-combination Ck. Show that, to each k-combination ck of { 1' 2, ... ' n} there uniquely corresponds a permutation Uk,n-k of k zeros and n - k ones and, to each run of consecutive elements of length r of Ck there uniquely Gorresponds a run of zeros of length r of Uk,n-k· Thus, conclude that the number of k-combinations of {1, 2, ... , n} that include (a) s runs of consecutive elements is
and (b) s runs of consecutive elements, among which sr 2: 0 are of length r, r = 1, 2, ... , k, so that s 1 + s 2 + · · · + Sk = s, is
51*. (Continuation). Runs of consecutive elements in combinations of circularly ordered elements. Consider the first n integral numbers {1, 2, ... , n} displayed on a circle so that n and 1 are consecutive. Show that the number of (circular) k-combinations of these n elements that include (a) s runs of consecutive elements is
_n n-k
(n - k) (k - 1) s
s-1
and (b) s runs of consecutive elements, among which r, r = 1, 2, ... , k, so that s 1 + s 2 + · · · + Sk = s, is
Sr
2: 0 are of length
52. Find the number of integer solutions of the linear equation X1
+ x2 + · · · + Xn
= k,
k integer
99
2.9. EXERCISES
with the restrictions (a) Xi 2: s, i = 1, 2, ... , n, s integer such that sn and (b) x; ~ m, i = 1, 2, ... , n, m integer such that mn;::: k.
~
k
53. Partial derivatives of a function. Find the number of partial derivatives of order k of an analytic function of n variables f (XI , x 2 , ... , Xn). 54. Let an,k be the number of monomials in the most general polynomial inn variables XI, x 2 , ... , Xn of degree k. Show that an,k
= ( n+k
k) .
55. Let Cs(n, k) be the number of k-combinations of the n numbers { 1, 2, ... , n} possessing the property: between any two points belonging to such a combination there are at least s points that do not belong to it. Prove that
56. Let B 8 (n, k) be the number of k-combinations of the n numbers {1,2, ... ,n}, displayed on a circle, with the property: between any two points belonging to such a combination there are at least s points that do not belong to it. Prove that B ( k) s n,
= (n -k ks) + s (n -k ks - 1
1) =
_ n (n - ks) n - ks k ·
57*. Let C(n, k;
Sk-I) be the number of k-combinations {ii, i2, ... , ik }, of {1,2, ... ,n}, with differences dm = im+I- im >am, m = 1, 2, ... , k - 1, where am, m = 1, 2, ... , k - 1, are given positive integers and Sk-I = ai + a 2 + · · · + ak-I· Further, let B(n, k; Sk-I, r) be the number of the preceding k-combinations which, in addition, have span d = ik - ii < n- r, where r is a given positive integer. Prove that ii
< i2 < · · · < ik,
C(n, k;
Sk-d
=
n - Sk-I)
k
(
and B(
k· ) _ n, ,sk-I,r=
(n-
Sk-I -
n-n-
k
Sk-I
r) (n+r
Sk-·I -
k-
+ (k- 1)r (n- Sk-I
sk-I -
r
k
1 -
r- 1) r).
58. Fibonacci numbers. Let Qn be the number of n-permutations of the two elements 0 and 1, with repetition and the restriction that no two zeros
PERMUTATIONS AND COMBINATIONS
100
are consecutive. Showing that the number Qn,k, of n-permutations of the two elements 0 and 1, with repetition, which include k zeros, no two of which are consecutive, is Qn,k = ( n- kk
+
1),
k
= 0, 1, ... , [(n + 1)/2],
conclude that [(n+1)/2]
Qn
=
L
(n- kk + 1) '
n = 0,1, ...
k=O
and
= Qn-1 + Qn-2, n = 2, 3, ... ' Qo = 1, Q1 = 2. / 0 = 1, fn = Qn- 1, n = 1, 2, ... , are the Fibonacci numbers.
Qn
The numbers
59*. Prove that the number of permutations (a 1 , a 2 , ••. , a2n) of n zeros and n ones, among the first k elements of which there are at least as many zeros as ones, for every k = 1, 2, ... , 2n, equals
Cn+1
= n +1 1 (2n) n '
the Catalan number. 60*. Lattice paths with diagonal steps. Consider paths from one point of a lattice to another in which, besides a horizontal step from (i,j) to (i + 1,j) and a vertical step from (i,j) to (i,j + 1), a diagonal step from (i,j) to (i + 1,j + 1) is allowed. Prove that (a) the number of lattice paths from the origin (0,0) to the point (n,k), with r diagonal steps, equals
L(n k r) _ (n + k- r)! _ (n + k- r) ' ' - r!(n- r)!(k- r)! r, k- r and (b) the number of lattice paths from the origin (0, 0) to the point (n, k), with r diagonal steps, that do not touch (with the exception of the origin) or intersect the straight line x = y equals
!P(n, k, r) = n
n- k + k- r
(n +
k- r).
r, k- r
61 *. (Continuation). Consider a ballot district, where each voter is allowed to vote for up to two candidates of the same party. Assume that two candidates N and K, of the same party, receive n and k votes, with n > k, respectively. Calculate the probability that, at any stage of the
2.9. EXERCISES
101
counting procedure, the votes for N are more than the votes for K, given that r voters vote for both N and K. 62. From an urn containing n tickets numbered 1, 2, ... , n, tickets are successively drawn one after the other without replacement. Show that the probability Pn,k that the number r is drawn at the k-th drawing is independent of k and equals Pn,k = 1/n. 63. From an urn containing n distinguishable balls among which r are black and n - r are white, balls are successively drawn one after the other without replacement, until for the first time a white ball is drawn. Show that the probability Pn,r,k that k drawings are required is given by Pn,r,k =
and conclude that
(n- r)(r)k-1 (n)k
~ (r)j ~ (n - 1) · J
j=l
r
=
n - r·
64. Spread of rumors. In a town of n + 1 inhabitants, a person tells a rumor to a second person, who in turn repeats it to a third person, etc. At each step, the recipient of the rumor is chosen at random from the n people available. Calculate the probability that the rumor will be told k times without (a) returning to the originator and (b) being repeated to any person. 65. Consider a sequence of tosses of a fair coin and let Pn be the probability that n tosses are required before the appearance of a run of heads of length 2. Show that
Pn = fn/2n+ 2 , n = 0, 1, ... ,
where [n/2]
fn
=L
k=O
are the Fibonacci numbers.
(n- k) k
' n = 0, 1, ... ,
Chapter3 FACTORIALS, BINOMIALAND MULTINOMIAL COEFFICIENTS
3.1
INTRODUCTION
The number (n)k, of k-permutations of n, and the number (~), of kcombinations of n, constitute particular cases of the factorial and the binomial of a real number x of order k, respectively. The concept of a factorial is as important as the concept of a power. In the calculus of finite differences, a major subject of discrete mathematics, factorials occupy the same central position as the powers in the infinitesimal calculus. The finite differences of factorials possess many of the nice properties of the derivatives of powers. The binomial (coefficient), closely related to factorial, is of equal importance. In discrete probability theory and in theoretical computer science, which concern finite differences and sums of functions, the expansion into factorial series is more advantageous than the expansion into power series. The multinomial (coefficient) is a multivariate extension of the binomial (coefficient). In this chapter we only touch upon the broad subject of factorials, binomial and multinomial coefficients. Specifically, after introducing the notion of a factorial of a real number, Vandermonde's factorial convolution formula is presented. Also, an invaluable formula in the approximation of probability distributions, known as Stirling's approximation formula of n!, is obtained. Further, Newton's binomial and the negative binomial formulae are combinatorially derived. Then, the monotonicity of the binomial coefficients is examined. Cauchy's binomial convolution formula is presented as a corollary of Vandermonde's factorial convolution formula. Finally, applications of these formulae in the evaluation of sums involving binomial coefficients and in the derivation of combinatorial identities are exemplified. In the last section of this chapter, the multinomial formula is combinatorially deduced.
104
3.2
FACTORIALS, BINOMIALS AND MULTINOMIALS
FACTORIALS
The factorial of order k, as well as the power of order k, is initially defined for k a positive integer and successively extended to k = 0 and to k a negative integer. Thus, let x be a real number and k a positive integer. The factorial of x of order k, denoted by (x)k> is defined by
(x)k = x(x- 1) .. · (x- k
+ 1).
If r is also a positive integer, then
(X) k+r = X(X - 1) .. · (X - k - r + 1) = [x(x- 1) · · · (x- k + 1)][(x- k)(x- k- 1) · · · (x- k- r
+ 1)]
and since
(x- k)(x- k- 1) .. · (x- k- r- 1) = (x- k)r, we deduce the following fundamental property of the factorials: (3.1)
(x)k+r = (x)k(x- k)r·
Requiring the validity of this fundamental property to be preserved, the definition of the factorial may be extended to zero or negative order. Specifically, it is required that formula (3.1) is valid for any integer values of k and 7'. Then, putting into it k = 0, it follows that
(x)r
= (x)o(x)r,
for any integer r. This equation, if x -:j:. 0, 1, ... , r- 1, whence (x)r -:j:. 0, implies (x)o = 1, while, if x = 0, 1, ... , 1 ' - 1, reduces to an identity for any value (x) 0 is required to represent. Further, from (3.1) with r a positive integer and k = -r, it follows that (x)-r(X + r)r = 1 and for x -:j:. -1, -2, ... , -r,
(x)-r = (
1
x
+ r)r
1
..,-----------,-------,----, r (x + r)(x + r - 1) .. · (x + 1)
= 1, 2, ....
Summarizing, the next general definition of the factorial is adopted.
3.2. FACTORIALS
105
DEFINITION 3.1 The factorial ofx of orderk, denoted by (x)k, is defined for every real number x and every integer number k by
. (x)k
= x(x- 1) · · · (x- k + 1),
k
= 1, 2, ...
, (x) 0
=1
(3.2)
and 1
(x)-k for x
=/
1
= (x + k)k = (x + k)(x + k- 1) · · · (k + 1)'
k
= 1• 2 • · · · '
(3 -3)
-1, -2, ... , -k.
REMARK 3.1 In addition to the notation (x )k of the factorial of x of order k, which is almost established in combinatorics, the notation x(k), which indicates the relation of the factorials to the powers, is also used. The factorial of x of order k, which is defined by (3.2) and (3.3), is called falling in distinction to the rising factorial of x of order k, which, for k = 1, 2, ... is defined by the product
x(x+1)···(x+k-1). This distinction is needless since both factorials can be expressed by the same notation, only the argument being different. Specifically, this product, with the notation we have adopted, equals ( x + k - 1) k. Also,
(x
+ k -1)k = (-1)k(-x)(-x -1) · · · (-x- k + 1) = (-1)k(-x)k.
Finally, it is worth noting that (3.3), for x
= 0, yields
(0)-r = 1/r!, r = 1, 2, ... , an interesting particular case.
I
A factorial convolution formula, due to Vandermonde, is derived in the following theorem. THEOREM 3.1 Vandermonde's formula Let x andy be real numbers and n a positive integer. Then
(x
+ Y)n =
t (~)
(x)k(Y)n-k·
(3.4)
k=O
PROOF
Note first that (3.4) holds true for n = 1. Assume that (3.4) holds for
n- 1, that is,
(x
+ Y)n-! =
E(n ~ k=O
1 ) (x)k (Y)n-k-!·
FACTORIALS, BINOMIALS AND MULTINOMIALS
106
It will be shown that (3.4) holds also for n. From (3.2), with x
+ y instead of x
and the induction hypothesis, we have
(x + Y)n = (x + y- n + 1)(x + Y)n-1 = (x
+ y- + 1) ~
(n ~ k=O
n
1 ) (x)k(y)n-k-1·
Since
(x + y- n + 1)(x)k(y)n-k-1 = (x)k(y)n-k + (x)k+1 (Y)n-k-1, we successively get
(x
+ Y)n = ~
(n ~ = ~ (n ~ k=O
1 ) (x)k(y)n-k
+~
1 ) (x)k(y)n-k
+
= (y)n + ~ { k=1
(n ~
1 ) (x)k+1 (Y)n-k-1
t (~ =~)
(x)k(Y)n-k
k=1
(n ~
1 )
+
(~ =~)} (x)k(y)n-k + (x)n·
Therefore, on using Pascal's triangle (2.7), we deduce
(x
+ Y)n =
t (~)
(x)k(y)n-k·
k=O
Thus, (3.4) holds true for nand, according to the principle of mathematical induction, it holds true for every positive integer n. I
Example 3.1 Mean of hypergeometric probabilities Suppose that n balls are randomly drawn one after the other, without replacement, from an urn containing r white and s black balls. Clearly, the probability of drawings k white balls in then drawings is given by (see Section 2.7.2)
Pn,k Note that Pn,k
~
0, k
n
=
(r + s)n , k = (n)k (r)k(s)n-k
= 0, 1, ...
{;Pn,k = (r
0, 1, ... , n.
, nand, according to Vanderrnonde's formula, 1
n(n)k (r)k(s)n-k = 1,
+ s)n {;
3.2. FACTORIALS
107
implying that this is a legitimate probability mass function. The expected value (or the mean) of the number of white balls drawn in n drawings is given by the sum n 1 n J.l
=L
kPn,k
=(
r
k=l
+
) 8
L k (n) k (r)k(s)n-k·
n k=l
This sum, upon using the expressions
reduces to J.l = (r ;rs)n
~ (~ =~) (r- 1)k_l (s)n-k·
Thus, by virtue of Vandermonde's formula and since (r (r + s- 1)n-l. we get nr
J.L=--.
r+s
+ s)n
(r
+
s) ·
D
As has already been noted in Remark 2.1, n! = 1 · 2 · 3 · · · n increases rapidly with increasing n. A very useful approximation is given by Stirling's formula, the proof of which requires the Wallis formula, stated in the following lemma. LEMMA3.1 The sequence Wn
22n(n!)2 = (2 n)!y'n' n = 1, 2, ...
is convergent and (3.5)
Let us consider the sequence of integrals
PROOF
Ir Clearly, I 0 d
r/2
= Jo
sinr tdt, r
= 0, 1, ....
= 1r /2, I 1 = 1 and, integrating the identity
dt (sinr-l t cost)
= (r- 1) sinr- 2 t- r sinr t,
r
= 2, 3, ...
,
FACTORIALS, BINOMIALS AND MULTINOMIALS
108
in the interval [0, 1r /2], we deduce the recurrence relation
Ir
r-1
= --Ir-2, r
r
= 2, 3, ....
Putting r = 2n and applying successively the resulting recurrence relation, we conclude that
(2n)!
hn
1r
= 22n(n!)2
2
Similarly, from the recurrence relation with r = 2n + 1, it follows that
22n(n!)2 hn+l
1
= (2n + 1)! = (2n + 1)I2n
Note that, for 0 :::; t :::; 1r /2, we have 0 sin 2n t :::; sin 2n-l t. Therefore
7r
2
< sin t < 1 and so sin 2n+l t <
and (3.6) Further, 7r
I2ni2n+l
= 2 (2 n + 1 )
and since hn+l = 2nhn-I/(2n + 1),
hnhn-1 =
7r
4
n.
Introducing the above expressions of hn, hni2n-l and hni2n+l in (3.6), we deduce for the sequence Wn
22n( n!)2 > 0, n = 1,2, ... , 2
= ( n)!y'n
the double inequality 1r :::;
w;, : :;
1r (
1+
2~) .
Taking the limit for n -+ oo, we conclude the relation lim
n-too
w;, =
1r,
which implies formula (3.5) of Wallis, since Wn
> 0.
I
3.2. FACTORIALS
109
We are now in position to derive Stirling's approximation formula of n factorial. THEOREM 3.2 Stirling's formula If n is a positive integer; then
n!
e-nnn+lf2y'2;,
<:::!
(3.7)
where the symbol <:::! is used in the sense that
.
lliD n--too PROOF
n! '2 e-nnn +1/2 = v ~7r.
Note that
(3.8)
n
=L
log n!
log k
k=l
and, since log x is a monotone function of x, it follows that
k logxdx < logk < 1k+l logxdx, 1 k-1
k = 1,2, ... ,n,
k
whence, summing fork
r
Jo
= 1, 2, ... , n, we get the double inequality < log n! <
log xdx
!n+l
log xdx.
1
Therefore nlogn- n
< logn! < (n + 1) log(n + 1)- n.
This double inequality suggests comparing log n! with some quantity close to the mean of the extreme members. The simplest such quantity is (n + 1/2) log n- n. Thus, consider the sequence
an= logn!- (n
+ 1/2) logn + n, n
and note that
an - an+l
( 1)
= n+2
and n+1
n
n
+
= 1, 2, ...
1
log -n- - 1
1 + 1/(2n + 1) 1- 1/(2n + 1)"
Then, using the expansion 1
1+t
2log 1- t =
oo
t2r+l
L 2r + 1' r=O
- 1
< t < 1,
(3.9)
FACTORIALS, BINOMIALS AND MULTINOMIALS
110
with t = 1/(2n + 1), the difference an- an+ I may be expressed as 00
an - an+l
=~
1
(
(2r + 1)
1
)
2r
2n + 1
> 0.
Therefore, the sequence an, n = 1, 2, ... is decreasing. Further, since the righthand side of the last expression is less than the geometric series
1
00
3~
(
1 ) 2n+ 1
whence
(an-
2r
1
1
1
3[(2n + 1)2- 1]
12n
12(n+1)'
1~n)- (an+l- 12(n1+ 1)) < 0,
it follows that the sequence dn = an - l~n, n = 1, 2, ... , is increasing. Consequently, the limit of the sequence an, n = 1, 2, ... exists and, according to (3.9), so does the limit of the sequence
Thus, on using Wallis formula (3.5), the limit b of the last sequence is obtained as . b~ b = n~oo hm -b 2n
establishing (3.8).
.
22n(n!)2
= v'2 n~oo hm ( 2n ) !Vn n = ,;2;,
I
REMARK 3.2 The error of the approximation (3.7) increases indefinitely with increasing n, but the relative error (n! _ e-nnn+lf2,J2;)jn! decreases steadily and vanishes at the limit. The approximation (3.7) is accurate even for small n. For example, for n = 1, 2 and 5, the exact values are 1! = 1, 2! = 2 and 5! = 120, while the corresponding approximate values of the right-hand sideof(3.7)are0,922, 1,199and 118,019. I
3.3
BINOMIAL COEFFICIENTS
The number (~) of k-combinations of n is called binomial coefficient since it is the coefficient of the general term of Newton's binomial formula. This formula is combinatorially derived in the next theorem.
111
3.3. BINOMIAL COEFFICIENTS
THEOREM 3.3 Newton's binomial formula Let x andy be real numbers and n a positive integer. Then (3.10)
PROOF
Note that
=
=
x+y, i 1, 2, ... , n. Executingtheoperations(multiplications and additions) by selecting each time k out of then factors {p 1 (x, y), p 2 (x, y), ... , Pn (x, y)} and multiplying the terms x of these together with the terms y of the remaining n - k factors, a summand of the form wherep;(x, y)
an,kX k y n-k , k
= 0, 1, ... ,n
is produced, where the coefficient an,k is the number of ways of selecting k out of the n factors. Since the order of selection does not count, because it does not affect the result of the multiplications, the number an,k equals (~), the number of k-combinations of n. Consequently, according to the summation principle, Newton's binomial formula (3.1 0) is established. I
Example 3.2 Mean of binomial probabilities Suppose that n balls are randomly drawn one after the other, with replacement, from an urn containing r white and s black balls. The probability of drawing k white balls in then drawings is given by (see Section 2.7.2) Pn,k
=
(n)
k p k q n-k , k
= 0, 1, ...
,n
where p = r/(r + s) and q = sf(r + s). Notice that Pn,k and, according to Newton's binomial formula,
> 0,
k
= 0, 1, ... , n
_~ (n)
~
~Pn,k - ~
k n-k _ ( n _ k P q - P + q) - 1,
implying that this is a legitimate probability mass function. The mean of the number of white balls drawn in n drawings is given by the sum /J =
~kPn,k = ~k(~)pkqn-k.
This sum, upon using the expression
(n) =n (n -1)
k k
k-1 '
112
FACTORIALS, BINOMIALS AND MULTINOMIALS
reduces to Jl
= np
t (~ =~)pk-lqn-k. k=l
Thus, by virtue of Newton's binomial formula, we get Jl
= np.
D
Definition 3.1 of the factorial of x of degree k allows the following useful extension of the notion of the binomial coefficient.
DEFINITION 3.2 The binomial coefficient of order k is defined for every real number x and a nonnegative integer k by
G) = (~~k,
k
= o, 1, ....
(3.11)
Note that, in addition to the case x = n is a positive integer, for which the binomial coefficient (~) is a positive integer and gives the number of k-combinations of n, in the case x = -n, with n a positive integer, the binomial coefficient Ct) is also an integer and has the sign of ( -1) k. The positive integer ( -1 )k (-t) gives the number of k-combinations of n, with repetition, as it follows from the relation (see Remark 3.1) (3.12) An extension of Newton's binomial formula (3.10) to the case where the exponent of the left-hand side is a negative integer is given in the next theorem.
THEOREM 3.4 Newton's negative binomial formula Let x andy be real numbers, with y =j:. 0, -1 < x / y < 1, and n a positive integer. Then (3.13)
PROOF
Note first that (3.13) is equivalent to (3.14)
3.3. BINOMIAL COEFFICIENTS
as it follows directly by putting t
113
= -xjy, y =f. 0 and using (3.12). Further,
(1- t)-n
=/I (t)f2(t) · · · fn(t),
where fi(t) = (1- t)- 1 , i = 1, 2, ... , n, and, using the expression of the sum of an infinite number of terms of a geometric progression with ratio t, 00
fi(t)
= 1 + t + t 2 + ··· = L
tT;, i
= 1, 2, ...
, n.
Ti=O
If the operations (multiplications and additions) are executed by selecting the term tT;, ri ~ 0, from the factor fi(t), i = 1, 2, ... ,nand forming the product tT 1 tT 2 • • • tTn = tT 1 +T2 +··+Tn, with r1 + r2 + · · · + rn = k, a summand of the form bn,ktk, k = 0, 1, ... is produced, where the coefficient bn,k is the number of ways of selecting the terms from the n factors. Since, to each such selection there corresponds a nonnegative integer solution (ri ~ 0, i = 1, 2, ... , n) of the linear equation r1
+ r2 + · · · + rn
= k,
and vice versa, the number bn,k, according to Theorem 2.12, equals (n+z-I). Consequently, by the summation principle, expression (3.14) is deduced and the I proof of the theorem is completed. The next theorem is concerned with the monotonicity of the sequence of the terms of the binomial expansion. THEOREM3.5
Let an,k(X, y)
= (~) xkyn-k,
k
= 0, 1, ... , n,
with n a fixed positive integer and x andy given positive real numbers. Also let m = (n + 1)/(1 + yjx). (a) lfm is an integer, then
an,o(x, y) < an,l (x, y) < · · · < an,m-1 (x, y), an,m-1 (x, Y) an,m(x,y)
= an,m(X, y),
> an,m+I(x,y) > ... > an,n(x,y).
(b) If m is not an integer and r
= (m ], the integer part of m, then
an,o(x,y) < an,I(x,y) < · · · < an,T(x,y),
FACTORIALS, BINOMIALS AND MULTINOMIALS
114
an,r(x,y) PROOF
> an,r+1(x,y) > ... > an,n(x,y).
On using the relation
n) = n(n- 1) · · · (n- k + 2) . n- k + 1 = n- k + 1 ( n ) (k (k- 1)! k k k- 1 '
= 0, 1, ... , n, is
the following recurrence relation for the sequence an,k(x, y), k obtained:
( )_(n-
an,k x, y -
= Setting m = (n
k
k
+1.
=:) (k-n1)x y
n-k+1 (yfx)k an,k-1 (x, y), k
+ 1)/(1 + yfx)
k-1
y
n-(k-1)
= 1, 2, ...
, n.
and since
n-k+1 (n+1)-(1+y/x)k 1+yfx --...,.--- = 1 + = 1+ (yfx)k (yfx)k yfx
m-k k
.--,
it follows that
an,k(x,y) = (1 + x; y · m; k) an,k-dx,y), k = 1,2, ... ,n. Note that 1 < m < n + 1 and, by the last recurrence relation, we conclude that: (a) If m is an integer, then
an,k-1 (x, y)
< an,k(x, y), k
an,m-1(x,y)
= 1, 2, ... , m- 1,
= an,m(x,y),
an,k-1(x,y) >an,k(x,y), k=m+1,m+2, ... ,n. (b) If m is not an integer, then m
~
k
-:f.
0, k = 1, 2, ... , nand
an,k-1 (x, y)
< an,k(x, y), k
= 1, 2, ...
an,k-1 (x, y)
> an,k(x, y), k
= r
The proof of the theorem is thus completed.
, r, r
= [m]
+ 1, r + 2, ...
, n.
I
The next corollary is concerned with a particular case, x = y = 1, of special interest.
COROLLARY 3.1 The sequence of binomial coefficients C(n,k) =
(~),
k=0,1, ... ,n,
3.3. BINOMIAL COEFFICIENTS
115
(a) for a given odd positive integer n, strictly increases for k = 0, 1, ... , + 1)/2, assumes its maximum value at the points m- 1 and m and strictly decreases fork= m, m + 1, ... , n, while (b) for a given even positive integer n, strictly increases fork = 0, 1, ... , r, r = n/2, assumes its maximum value at the point rand strictly decreases for k = r, r + 1, ... , n.
m- 1, m = (n
Isaac Newton obtained in 1676 an extension of the binomial formula (3.10), as well as the negative binomial formula (3.13), to the case where the exponent of the left-hand side is a real number. This general binomial formula is stated in the following theorem, without proof. It is worth noting that there does not exist a combinatorial derivation of this general formula, since the binomial coefficient G) emerging in it has not, for every real number x, a combinatorial meaning. An analytic proof can be found in most advanced books on infinitesimal calculus. Newton's general binomial formula will be revisited in Chapter 6 on generating functions. THEOREM 3.6 Newton's general binomial formula Let t and x be real numbers, with -1 < t < 1. Then (3.15)
Cauchy's binomial convolution formula, which by virtue of (3.11) may be considered a reformulation of Vandermonde's factorial convolution formula, is stated in the following corollary of Theorem 3.1. This corollary may also be deduced from Newton's general binomial formula. Two particular cases of such a derivation are worked out in Examples 3.6 and 3.7 that follow. COROLLARY 3.2 Let x andy be real numbers and n a positive integer. Then (3.16)
Some interesting applications of these theorems in the evaluation of sums involving binomial coefficients and in the derivation of combinatorial identities are worked out in the following examples.
Example 3.3 The number of subsets of a finite set Let us consider a finite set W n = { w 1 , w 2 , ... , Wn}, of n elements, and let Ak be the set of all subsets Ak ofWn, with N(Ak) = k. Then, according to the definition
FACTORIALS, BINOMIALS AND MULTINOMIALS
116
of a k-combination of n (without repetition), Ak = Ck (Wn) and N(Ak) = (~) Evaluate the sums:
Newton's binomial formula (3010), with x
= y = 1, yields
= n, equals 2n (in
Therefore, the (total) number of subsets of Wn, with N(Wn) agreement with the result of Example 1.7)0 For the evaluation of the other two sums, note that [n/2]
S2
+ S3
=
L (;J 0
[(n-1)(2] )
j=O
+
0
n
L (2J n+ 1) = L (~) = 2n °
k=O
j=O
and _
L:
(n) _ L:
j=O
j=O
_ [nf2]
s2 s3-
[(n-1)(2] (
0
2 J
n ) _L:( k(n)
0+
2J
Further, Newton's binomial formula (3010), with x
n
1
_
1)
-
k 0
k=O
= -1 andy = 1, yields
Thus, the number S2 of subsets with an even number of elements equals the number S 3 of subsets with an odd number of elements for any number n of elements of Wno Consequently,
Example3.4 Evaluate the sums
The first sum, on using the relation
3.3. BINOMIAL COEFFICIENTS
117
may be written as
S = 4
~
(n -1)
nL.....- k- 1 k=l
=
~
nL.....-
(n -1)
j=O
. J
·
The last sum, by Newton's binomial formula with n- 1 instead of n, equals
~ (n ~ 1) = 2n-l J
j=O
and so
84 = n2n-l. The second sum may be split up into two sums as
and so
85 = r2n + sn2n-l = (2r + sn)2n-l. Note that the sum 8 4 can be evaluated by taking the derivative of (3.1 0) with respect to x at a suitable point as follows: putting y = 1 in (3.1 0) and then taking the derivative of the resulting expression with respect to x,
at x = 1, we get
Example3.5 Evaluate the sums 86
n
= {;
1 (n) 87 k+1 k '
n
= {;
(-1)k+l (n) 88 k+1 k '
The first sum, on using the relation
(n
1 (n) 1 + 1) k+1 k =n+1 k+l'
[n/
2
= ?;
]
2r
1 (n) + 1 2r .
FACTORIALS, BINOMIALS AND MULTINOMIALS
118
may be written as
S = _1_ n ( n + 1) = _1_ n+l 6 n+1{:; k+1
n+1~
(
n + 1) j
and since, by Newton's binomial formula,
it follows that
2n+1- 1
n+ 1
Sa=
.
In the same way
s7 = _1_ ~( -1)k+l n+1L..,.
(n
+ 1) k+1
k=O
= _1_ ~( -1)i n+1L..,.
(n ~
1)
J
j=l
and since
it follows that
1
s1 = ---.
n+l
In order to evaluate the third sum, note first that
S _S = ~ _ 1 (n) _~ (-1)k+I (n) = ~ 1- (-1)k+I (n) 6
~k+1 k
7
~ k+1
~
k
k+1
Since
1- (-1)k+l = { 2, 0,
k = 2r, k
= 2r + 1,
it follows that
Therefore
2n Ss = - - . n+l
r = 0, 1, .. . r
= 0, 1, .. .
k.
3.3. BINOMIAL COEFFICIENTS
119
Note that these sums can be evaluated by an integration of (3.10) with respect to X in a SUitable interval as' follows: putting y = 1 in (3.10) and integrating the resulting expression with respect toxin the interval [xi, x2].
and since
the following expression is deduced:
t
x~+:: ~~+I (~)
=
(x
2
+ 1)n+~: iXI + 1)n+l
k=O
By suitably choosing the limits particular that: (a) For XI = 0 and x 2 = 1,
86
XI
and x 2 of the integration interval, it follows in
1
n
=~ k +1
(b) For XI = -1 and x2
(n) k
=
2n+I - 1 n +1
= 0,
-S7 =
~
(-1)k L.,..k+1
k=O
(n) k
1 n+1
(c) For XI= -1 andx2 = 1,
S 8
= [n/2] _1_
L 2r + 1 r=O
(n) = ~ ~ n
2r
2
k=O
1- (-1)k+I k +1
(n) k
D
Example3.6 For r, s and n positive integers, (a) derive analytically the combinatorial identity
and (b) conclude the identities
FACTORIALS, BINOMIALS AND MULTINOMIALS
120
The expansion of the identity
using Newton's binomial formula, yields
Executing the multiplication in the left-hand side, the general term anxn, n = 0, 1, ... , r + s, is formed by multiplying the term G) xk of the first factor by the term (n~k)xn-k of the second factor for all values k = 0, 1, ... , n. Thus, by the addition principle, an = and
~ G) (n ~ k)
~{~G) (n ~ k)} xn = ~ (r:
8
)xn
and, equating the coefficients of xn of both sides the combinatorial identity,
is deduced. Note that this relation constitutes a particular case, with x = r and = s positive integers, of Cauchy's binomial convolution formula (3.16). Putting in (a} s = r, n = r - j and since
y
we conclude that
Also, setting in (a} r
we find
= s = n, and since
3.3. BINOMIAL COEFFICIENTS
121
Finally, executing the multiplication in the right-hand side of the expression
we get
where the inner sum, by virtue of (a) with s = r, equals
Therefore
D Example3.7 For r, s and n positive integers, derive analytically the combinatorial identity
The expansion of the identity
(1 _ t)-r(l- t)-s = ( 1 _ t)-(r+s), using Newton's negative binomial formula (3.14), yields
and
for every real number t E ( -1, 1). Therefore
122
FACTORIALS, BINOMIALS AND MULTINOMIALS
Note that this relation also constitutes a particular case, with x = -randy = -s, of Cauchy's binomial convolution formula (3.16). 0
Example3.8 For s, k and n positive integers, with s, k :S n, derive analytically the combinatorial identity
Multiplying by t 5 both members of the equivalent to Newton's negative binomial formula,
and putting n = s
+ j, we get the expansion
In the same way we deduce that:
Expanding the identity
by using the preceding three formulas, we get
[f (r- 1)tr]· [ f ( )tjl = f: (n)tn r=k
k - 1
j=s-k
8
j
-
and
for every real number t E ( -1, 1). Therefore
k
n=s
8
3.4. MULTINOMIAL COEFFICIENTS
3.4
123
MULTINOMIAL COEFFICIENTS
The number
n! where kr = n- (k1 + kz + ··· + kr-d, ki = 0,1, ... ,n, i = 1,2, ... ,r, n = 1, 2, ... , is called multinomial coefficient, since it is the coefficient of the general term of the multinomial expansion. This expansion is combinatorially derived in the next theorem.
THEOREM 3.7 Multinomial formula Let Xi, i = 1, 2, ... , r be real numbers and n a positive integer. Then
(X1 + Xz + · · · + Xr )n
= """ L...... (
n ) x k1 x k2 k1 , kz, . . . , kr -1 1 2
where the summation is extended over all ki = 0, 1, ... , n, i that k1 + kz + · · · + kr-1 + kr = n.
· · ·
xrkr , (3.17)
= 1, 2, ...
, r, such
PROOF Note that each term in theexpansionof(x 1 +x 2 +· · +xr)n is of degree n with respect to the variables x 1 , x 2 , ... , Xr and can be formed by executing the multiplication of then factors Pi = Pj(Xl, xz, ... , Xr) = X1 + xz + · · · + Xr, j = 1, 2, ... , n. Thegeneraltermofthisexpansion, x~ 1 X~ 2 • • • x~r, is produced by selecting Xi from ki different factors, i = 1, 2, ... , r. To each such selection, there corresponds a division of the set {p1 , pz, ... , Pn}, of then factors, into r subsets that include k 1 , k 2 , ... , kr factors, respectively, with ki ?: 0, i = 1, 2, ... , r and k1 + kz + · · · + kr = n. Consequently, according to Theorem 2.8, the general term x~ 1 x~ 2 • • • x~r appears
times in the expansion. Thus,by the addition principle, (3.17) is deduced.
I
REMARK 3.3 The number of terms in expansion (3.17) equals the number of nonnegative integer solutions of the linear equation k1 + k 2 + · · · + kr = n and, I according to Theorem 2.12. is equal to c+~- 1 ). Putting Xi = 1, i = 1, 2, ... , n in (3.17) and taking into account Theorem 2.8, the next corollary is deduced.
FACTORIALS, BINOMIALS AND MULTINOMIALS
124
COROLLARY 3.3 The number of divisions (AI, A2, ... , Ar) of a finite set Wn. with N(Wn) = n, in r (ordered) subsets, equals
where the summation is extended over all ki that k1 + k2 + · · · + kr = n.
3.5
= 0, 1, ...
, n, i
= 1, 2, ...
, r, such
BIBLIOGRAPHIC NOTES
Although James Stirling (1676-1770) was first to recognize the importance of the factorial in his work Methodus Differentiallis (1730), he did not use any special notation for it. The approximate formula for n factorial to which his name was attached was actually developed by Abraham De Moivre (1667 -1754). The first notation of the factorial was introduced by N. Vandermonde (1772), who also derived the factorial convolution formula. Further, he extended the definition of the factorial to negative order. The binomial formula appeared in various forms in early manuscripts, but it was James Bernoulli in his Ars Conjectandi (1713) who stated and proved it. The negative and general binomial formulae were worked out by Isaac Newton in 1676. It seems that the first notation of the binomial coefficient was introduced by Leonhard Euler (1707- 1783) in 1781. The notation, most in use now, is attributed to J. L. Raabe (1851). The combinatorial identities in Exercise 29 are due to E. S. Andersen (1953).
3.6
EXERCISES 1. Let a and b be real numbers and n a positive integer. Evaluate the
sum
Sn,r =
~(k)r (~) (a)k(b)n-k,
2*. Let x and y be real numbers and n a positive integer. Using Vandermonde's formula, show that
~(n) L
k=O
k
(
(x)k X
+y
) = k
(x+y+n)n ( ) , y y +n n
-I-
-1, -2, ... , -n
3.6. EXERCISES
125
and conclude that
t(k=O
and
t(- (n) 1)k
1
n
,
(y +n n) -
1
_Y = k y+ k
k=O
(x-1)-
=
1 )n-k(n)_x k x- k
3*. Let x and y be real numbers and n a positive integer. Vandermonde's formula, show that
(Y)n ,x ) (x+yn
+y
Using
-J.
;- 0, 1, 2 , ... , n - 1
and conclude that
~
4. For r, s and n positive integers, with n
t (n + 1) +(
s )k
k -
k=O
and conclude that
k
t k=O
(r
s)n+k
r, show that
1
= (r)n
(s)k =r+s+1. (r+s)k r+1
5. (Continuation) Evaluate the sum
_~ (n + 1) (
Sn-
~k
k=1
k -
k
s )k (r+s)n+k
and, more generally, the sum Sn,m= t(k)m(n+k-1) (s)k . k=m k (r + s)n+k
6. Let 0 < p < 1, q = 1 - p and n a positive integer. Evaluate the sum Sn,r
= t(k)r(~)pkqn-k, k=r
r
= 1,2, ...
,n.
FACTORIALS, BINOMIALS AND MULTINOMIALS
126
7. For 0 < p < 1, q = 1- p and n a positive integer, evaluate the sum Sn,r
(n+ -1)
~ = t:'r(k)r
kk
k p n q, r
= 1,2,000
o
8. Evaluate the sums
s1
= f(-1)k-1k2 (~),
s2
= t(-1)k-1k4 (~),
k=1
k=1
9. Evaluate the sums 31
~
k- 1
= k~-o k + 1
(n)
k '
32
~ k(k + 4) = L....- (k + 1)(k k=O
+2 + 2)
(n)
0
k
10. For n and k positive integers, show that
and
~( -1)s-k (:) (:) = ok,n, where on,n
= 1 and ok,n = 0,
k
=/:-
n 2 k,
no
11. Consider the sum - n k-1 1 ( n ) Sn - {; ( -1) k k , n = 1,2,0 00 0
Show that Sn
and since
1
= Bn-1 + -, n
n
= 2,3,0° 0
sl = 1, conclude that
12. Expanding the function fn(t) = [1- (1- t)n]/t, where t is a real number different from 0 and n a positive integer, derive the expression
3.6. EXERCISES
integrating it in the interval (0, 1], show that
13. (Continuation). Show that
1()
n
2:)- 1)k-\2 ~
nk1 2:::2::: kr· k=1r=1
=
k=1
14. Let
Sn(z)
= ~(-1)k z:k(~), z-::j.
-1,-2, ... ,-n, n=0,1, ....
Using Pascal's triangle, show that
n Sn(z) = --Sn-1 (z), n = 1, 2, ... , So(z) = 1 z+n and thus conclude that
15. (Continuation). Show that
s1 -
and
n
1_ k_
-1
{;(
)
(n)
1 + 2k k
22n--
(2n) - 2n + 1 n
Sz = ~( -1)k_1_ (n) = 22n (2n) ~ 1- 2k k n
1
-1
k=O
16. Leibnitz numbers. Let
L( r, n) =
i)
-1) n-k r _
k=O
~ + 1 (~) , n = 0, 1, ... , r, r = 0, 1, ....
Show that
n L(r,n) = --L(r-1,n-1), n= 1,2, ... ,r, r= 1,2, ... , r+1 with L(r, 0) = 1/(r + 1) and conclude that
L(r, n) = (r
+~!)n+1
= [ (r
+ 1) (:) r1
FACTORIALS, BINOMIALS AND MVLTINOMIALS
128
The numbers L(r, n), n
= 0, 1, ...
, r,
r
= 0, 1, ...
are called Leibnitz num-
bers. 17*. Let n and r be positive integers and x a real number. Show that
and conclude that
18*. For r a positive integer, show that
and
(2r + 1) = ~2(4r2r ++ 2) . ~ ~
k=O
2
k
1
19. Let n and k be positive integers with n 2 k. Show that
20. Show that
and conclude that
21. Show that
i)- )n-k( 1
k=O
and conclude that
r )(s+k) n- k k
= (s-r+n), n
s2 r
3.6. EXERCISES
129
22. (Continuation). Show that
and conclude that
23. Let r, s and n be positive integers with s
2: n. Show that
24 *. For r, s and n positive integers with s
r
~
~
n, show that
25*. Let r, s, j and n be nonnegative integers with j that
~
r
~
j
+ n.
Show
and conclude that
26. Recurrence relations for the binomial coefficients. Prove that the binomial coefficient (~), where x is a real number and k a nonnegative integer, satisfies: (a) The "triangular" recurrence relation
(b) The "vertical" recurrence relation
130
FACTORIALS, BINOMIALS AND MULTINOMIALS
(c) The "horizontal" recurrence relation k
G)= ~(-1)k-re;1). 27. Expanding the identity
(1 + t + U + tu)x
= (1 + t)x(1 + u)x
into powers oft and u, show that
for every real number x and positive integers n and k and conclude that
(x)n(x)k =
~ (~) G)j!(x)n+k-j·
28. Show that
and
29*. Let n and r be positive integers with r Prove that
and
t
k=O
1-
(x) ( x ) k n-k+1
30. For xi, i
= 1, 2, ...
~ n
= n(1- x)- r (xn(n+1)
r
and x a real number.
1) (
-x ) . n-r
, r, real numbers and n a positive integer, show
that
where the summation is extended over all ki k1 + k2 + · · · + kr = n; conclude that
L k lk n!
1 ••• 1· 2·
k 1 (x1)k, (x2)k 2 r·
• • •
(xr)k,
~
0, i
=
1, 2, ... , r, with
= (x1 + X2 + · · · + Xr)n,
where the summation is taken as in the preceding sum.
Chapter4 THE PRINCIPLE OF INCLUSION AND EXCLUSION
4.1
INTRODUCTION
The basic principles of counting the elements of a union of n finite and pairwise disjoint sets (principle of addition) and of a subset of the Cartesian product of n finite sets (multiplication principle) were presented in Chapter 1. The principle of inclusion and exclusion, or the sieve formula of Eratosthenes, is also a powerful counting tool and this chapter is devoted to its presentation. The number of elements in a union (and in the intersection of the complements) of any n subsets of a finite set is computed. More generally, the numbers of elements that are contained in k and in at least k among n subsets of a finite set are evaluated. Further, a series of alternating inequalities for these numbers, due to Bonferroni, is derived. In the case of ordered subsets of a set, the notion of the rank of an element is introduced. Then, the elements of this set of a given rank are enumerated. The important case of exchangeable sets, in which the number of elements that are contained in the intersection of any r of them depends only on r, is separately examined in all the preceding enumeration problems. The Mobius inversion formula, which is also a useful counting tool, is presented a'3 a complement in the Exercises. Note that the principle of inclusion and exclusion and, more generally, the problem of counting the elements of a finite set are presented by several authors, equivalently, according to the definition of a set: A = {a : a has property P}, by using the corresponding characteristic properties of the sets. So, in this presentation, the number of elements that have at least one among n given properties expresses the cardinal of the union of the corresponding n sets, while the number of elements with none of n properties expresses the cardinal of the intersection of the complements of then sets.
132
4.2
THE PRINCIPLE OF INCLUSION AND EXCLUSION
NUMBER OF ELEMENTS IN A UNION OF SETS
The number of elements (cardinal) in a union of two sets is derived in the next theorem. THEOREM4.1 If A and B are any finite sets, then
N(A U B)= N(A)
+ N(B)- N(AB).
(4.1)
PROOF In order to calculate the number of elements of the union A U B, the elements that belong either to A or B should be counted, but each element should be included only once. Since in the sum N(A) + N(B) the elements that belong to both sets A and Bare counted twice, the number N(AB) should be subtracted from it and so expression (4.1) is established. I REMARK 4.1 Expression (4.1) constitutes a generalization of the addition principle, N (A+ B) = N (A) + N (B), to which it reduces if the finite sets A and Bare supposed to be disjoint, whence N(AB) = 0. Note also that (4.1) may be derived by using the addition principle as follows: if A and Bare any finite sets, then the sets A and B- A= A' nB are disjoint, An (A' nB) =(AnA') n B = 0 n B = 0 and AU (A' n B)= (AU A') n (AU B) = il n (AU B)= AU B. Consequently, by the addition principle,
N(A U B)= N(A + (B- A))= N(A) and, since N(B- A) deduced. I
+ N(B- A)
= N(B)- N(AB), (see Theorem 1.4), expression (4.1) is
COROLLARY 4.1 If A and Bare any subsets of a finite set il, with N(il) = N, then
N(A' B') = N- N(A)- N(B)
+ N(AB).
(4.2)
PROOF Since by De Morgan's formula A' B' = (AU B)', expressing the number of elements of (A U B)' in terms of the number of elements of A U B,
N(A'B') = N((A U B)')= N- N(A U B) and then, using (4.1 ), expression (4.2) is established.
I
4.2. NUMBER OF ELEMENTS IN A UNION OF SETS
133
Example4.1 Calculate the number of positive integers less than or equal to 100 that are divisible by 3 or by 5. Let A and B be the sets of positive integers less than or equal to 100 that are divisible by 3 and 5, respectively. Then N ( AUB) is the number of positive integers less than or equal to I 00 that are not divisible by 3 or 5 and, by (4.1 ), N(A u B)= N(A)
+ N(B)- N(AB).
Denoting by [x] the integer part of x, we have
N(A)
= [100/3] = 33,
N(B)
= [100/5] = 20,
N(AB)
= [100/15] = 6.
Therefore
N(A u B)= 33 + 20- 6
= 47.
D
Example4.2 Suppose that the elevator of a four-floor building starts from the basement with three passengers. Calculate the number of different ways of discharging at least one passenger at each of the first two floors. Each way that the three passengers may get off the elevator may be represented by an ordered selection of three floors (h , fi 2 , fi 3 ), with repetition, from the set {h, h, h, f 4 } of the four floors, where fir is the floor at which the r-th passenger gets off the elevator, r = 1, 2, 3. One may argue that there are (~) = 3 two-element subsets of the set {p1 , P2, P3} of the three passengers and, for each of these subsets, the two passengers get off the elevator, one passenger at the first and the other at the second floor, in 2! = 2 different ways. Since it is required that at least one passenger get off the elevator at each of the first two floors, there are four different choices for the third passenger to get off the elevator. Thus, by this argument and according to the multiplication principle, the number of different ways of discharging at least one passenger at each of the first two floors equals 3. 2. 4 = 24. Although all the steps of this derivation seem to be justified, a well-disguised error allows certain ways of discharging the passengers to be counted twice. A closer inspection reveals that the following 3-permutations of the set { h, h, h, J4 } are counted twice:
For example the first of these permutations is counted as one of the four permutations
134
THE PRINCIPLE OF INCLUSION AND EXCLUSION
and also as one of the four permutations
Consequently, the correct number of different ways of discharging at least one passenger at each of the first two floors equals
24-6 = 18. This number can be effectively evaluated by the aid of Corollary 4.1 as follows. Let f! be the set of different ways of discharging the three passengers. Also, let A and B be the sets of different ways of discharging the three passengers without stopping at the first and second floor, respectively. Then N(A' B') is the number of different ways of discharging at least one passenger at each of the first two floors, and so, by (4.2),
N(A'B')
= N- N(A)- N(B) + N(AB).
Clearly, N = N ( f!) = 43 = 64, which is the number of the 3-permutations, with repetition, of the set {!I, /2, /3, j 4 }, of the four floors. Also, N(A) = 3 3 = 27, which is the number of the 3-permutations, with repetition, of the set {/2, /3, J4 }, of three floors, and similarly, N(B) = 33 = 27. Further, N(AB) = 23 = 8, which is the number of the 3-permutations, with repetition, of the set {h, f 4 }, of two floors. Hence, the required number equals
N(A' B')
= 64- 2. 27 + 8 = 18.
D
The next theorem constitutes a generalization of Theorem 4.1 to n sets.
THEOREM 4.2 Inclusion and exclusion principle The number Ln,l = N (A1 U A2 U · · · U An), of elements that are contained in at least one among n finite sets A 1, A2, ... , An. is given by (4.3)
with
n
Sn,l =
L N(Ai), i=l
n-1
Sn,2 =
n
L L
N(AiAj)
i=l j=i+l
and, in general, (4.4)
where the summation is extended over all r-combinations {i 1, i2, ... , ir} of then indices{1,2, ... ,n}.
4.2. NUMBER OF ELEMENTS IN A UNION OF SETS
135
PROOF The number Ln, 1 = N(A 1 U A2 U · · · U An) is deduced by counting the elements included either in A1 or in A2, ... , or in An, but each element should be counted only once. This deduction may be achieved initially by taking the sum n
Sn,1 =
L N(A;). i=1
Note that, in this sum, the elements included in any one set A; only are counted once, in the term N(A;), i = 1, 2, ... , n, while the elements common to any two sets A; and Aj, with {i,j} ~ {1, 2, ... , n }, are counted twice, in each of the terms N(A;) and N(AJ)· Thus the sum n-1
Sn,2
=L
n
L
N(A;Aj)
i=1 j=i+1
should be subtracted from Sn, 1 • Further, the elements common to any three sets A;, A 1 and A 8 , with {i, j, s} ~ {1, 2, ... , n }, are counted in the sum Sn, 1 three times. in each of the terms N(A;), N(A 1 ) and N(As), and in the sum Sn,2 again three times, in each of the terms N(A;Ai ), N(A;A 8 ) and N(AjA 8 ). Thus, these elements are not counted, in total, in the difference Sn,2 - Sn,1 and, consequently, the sum Sn,3 = N(A;AjA 8 ),
L
should be added to it. Continuing this process, having considered the elements common to anyn-1 setsA;u A; 2 , ••• , A;n_,. {i 1, i2, ... , in-d ~ {1, 2, ... , n }, and after algebraically adding the sum
we end up with the algebraic sum Sn, 1 - Sn,2 + · · · + (-1)n- 2 Sn,n-1• in which these elements are counted, in total, only once. Finally, the elements common to then sets A1, A2, ... , An are counted (~) times in the sum Sn,k. in each of the termsN(A; 1 A; 2 • • • A;k), {i 1, i 2 , ••. , ik} ~ {1, 2, ... , n},ofit, k = 1, 2, ... , n. According to Newton's binomial formula (3.1 0),
and so these elements are counted, in total, zero times if n is odd and two times if n is even. Consequently, the term
should be added to the algebraic sum Sn,1 - Sn,2 (4.3) is established. I
+ · · · + (-l)n- 2 Sn,n-1. and so
THE PRINCIPLE OF INCLUSION AND EXCLUSION
136
REMARK 4.2 The term inclusion and exclusion refers to the process in which, initially, all the elements under consideration are indiscriminately included; and those elements that should not be included are excluded, then those elements that should not be excluded are included, and so on, alternately including and excluding. I REMARK 4.3 The following proof of (4.3) by mathematical induction is of interest. Note first that, according to (4.1), (4.3) holds for n = 2. Then, supposing that (4.3) holds for n - 1, it should be shown that it also holds for n. From (4.1), with A = A 1 U A2 U · · · U An_ 1 , B = An and since AB = (AI An) U (A2An) U · · · U (An-I An), it follows that
N(AI U A2 U · · · U An)= N(A1 U A2 U · · · U An-d+ N(An) -N(B1 U B2 U · · · U Bn_I), whereB1 = A1An,B2 hypothesis,
= A2An, ... ,Bn-I
=An-IAn. Thus, by the induction
n-1 N(A1 U A2 U · · · U An)= L( -1r- 1Sn-I,r
n-1 + N(An)- 2::(-l)r-IQn-I,n
r=1
with Sn-1,r =
Qn-l,r
r=1
L N(Ai Ai 1
2 • • •
Ai,),
= LN(BitBi2 ···Bir) = LN(Ai1Ai2 ···AirAn),
where, in both sums, the summation is extended over all r-combinations {i 1, i 2 , ... , ir} of then- 1 indices {1, 2, ... , n- 1}. Note that n-1 Sn-1,1 + N(An) = L N(Ai) i=l
n
+ N(An) = L
N(Ai)
= Sn,1·
i=l
Further, for r = 2, 3, ... , n- 1,
Sn-I,r
+ Qn-l,r-1
= L
N(Ai 1Ai 2 ···Air)+ L
is the sum of the terms N (Ai 1 Ai 2
• •
N(Ai 1Ai 2 ···Air- I An)
·Air), with the summation extended over the
r-combinations {i 1, i 2, ... , ir} of the n indices { 1, 2, ... , n - 1, n} that do not include the index n and over the
-1)
n ( r-1
4.2. NUMBER OF ELEMENTS IN A UNION OF SETS
137
r-combinations {i 1,i 2, ... ,ir_ 1 ,n} of then indices {1,2, ... ,n- 1,n} that include the index n. Thus, Sn-l,r
+ Qn-l,r-1 = L
N(Ai, Ai2 ... AiJ
= Sn,r,
r
= 2, 3, ... , n- 1,
where the summation is extended over the
r-combinations {i 1 , i2, ... , ir} of then indices {1, 2, ... , n }. Also
Consequently, N(Al U A2 U · · · U An)= Sn,l- Sn,2
+ · · · + (-1)n-lSn,n
and so it is shown that (4.3) also holds for n. Therefore, according to the principle of mathematical induction, (4.3) holds true for every integer n ~ 2. I COROLLARY 4.2 If A 1 , A 2 , ... , An are subsets of a finite set fl, then the number Nn,o = N (A~ A~ · · ·A~) of elements of n that are not contained in any of these n sets is given by
Nn,O = Sn,O- Sn,l
where Sn,o
+ ·· · + (-1)nSn,n,
= N(fl) and Sn,r• r = 1, 2, ...
(4.5)
, n, is given by (4.4).
PROOF Since by De Morgan's formula (A 1 U A2 U · · · UAn)' = A~ A~··· A~. upon using the expression N(A') = N(fl)- N(A), with A= A 1 UA2 U· · · UAn, it follows that N(A~A~ ···A~)= N(fl)- N(A1 U A2
Introducing expression (4.3) into it, we conclude (4.5).
u · · · U An)·
I
The inclusion and exclusion principle enables completion of the discussion, started in Section 2.5, on the number of integer solutions of the linear equation XI
+ X2 + · · · + Xn = k,
(4.6)
which satisfy a given set of restrictions, with k an integer. The next theorem is concerned with the enumeration of the integer solutions of (4.6) that are bounded both from above and below.
THE PRINCIPLE OF INCLUSION AND EXCLUSION
138
THEOREM4.3 The number of integer solutions (rt, r2, ... , rn) of the linear equation (4.6), with the restrictions (4.7)
=
for given integers Si, mi. i 1, 2, ... , n, with s :S k :S m, s = St + s2 + · · · + Sn, m = m 1 + m2 + · · · + mn, and for Ui = mi - Si 2 0, i = 1, 2, ... , n, is given
by An,k(Ut,U2, ... ,un) =
+
(n + ~ =: -
1 )
f)- YL (n+k-s-Ui -::~···-ui~ 1
1
-r-1),
(4.8)
r=l
where, in the inner sum, the summation is extended over all r-combinations {i 1, i2, ... , ir} of then indices {1, 2, ... , n }.
PROOF On using the transformation Yi =Xi - si, i equation (4.6) and the restrictions (4.7) reduce to
= 1, 2, ... , n, the linear (4.9)
Yt + Y2 + · · · + Yn = k - s, with k - s a nonnegative integer, and 0
:S Yi :SUi, i = 1, 2, ... , n, U = Ut + U2 + · · · + Un 2 k- s.
(4.10)
Since the transformation is one-to-one, the number An,k (u 1 , u 2 , ... , un) of the integer solutions of (4.6), with the restrictions (4.7), equals the number of integer solutions of (4.9), with the restrictions (4.10). In order to evaluate this number, consider the set D of nonnegative integer solutions of (4.9), without any restriction, and let Ai be the subset of nonnegative integer solutions of (4.9), with the restriction Yi 2 Ui + 1, i = 1, 2, ... , n. Then
An,k(Ut, U2, ... , Un)
= N(A~A~ ···A~)
and, for its evaluation, Corollary 4.2 can be applied. Note first that Sn,o = N (D) is the number of nonnegative integer solutions of (4.9) which, according to Theorem 2.12, equals
_(n + s- 1) _(n + s- 1)
Sno'
kk-s
-
kn-1
·
Further, N(Ai 1 Ai, · · · Ai.) is the number of nonnegative integer solutions of (4.9) with the restrictions
Yi; 2 ui;
+ 1,
j
= 1,2, ... ,r,
4.2. NUMBER OF ELEMENTS IN A UNION OF SETS
139
which, according to Corollary 2.4, is given by
N(A- A- ... A- ) = (n ·~
•2
+ k- s- Ui
1
-
Ui 2
-
• • ·-
ui. - r-
n- 1
'·
1)
if ui 1 + Ui 2 + · · · + ui. + r > k- s. Introducing these expressions into (4.5), the I required expression (4.8) is deduced. REMARK 4.4 Combinations with restricted repetition. As has been noted in Section 2.5, to each nonnegative integer solution (r 1 , r 2 , ... , rn) of (4.6), there uniquely corresponds a k-combination {a 1 , az, ... , ak} of the set W n = { w 1 , w 2 , ... , wn}, with repetition, in which the element Wi is included Ti 2: 0 times, fori = 1, 2, ... , n. Thus, the number of k-combinations of n in which the element wi is included no less than si and no more than mi times, for i 1, 2, ... , n, is given by (4.8). I Example4.3 Consider a collection of seven nickels, four dimes and two quarters. Assume that coins of any denomination are identical. Find the number of different subcollections often coins. Consider a sub-collection of ten coins and let x 1 be the number of nickels, x 2 the number of dimes and x 3 the number of quarters contained in it. Then the number of different sub-collections of ten coins equals the number of integer solutions of the linear equation XI
+ Xz + X3 = 10,
with the restrictions 0 ~ x 1 ~ 7, 0 ~ x 2 with n = 3, k = 10 and u 1 = m 1 = 7, u 2 that the required number equals
2 C2 ) -
~
5 and 0
~
x3
~
2. Applying (4.8),
= m 2 = 5, u 3 = m 3 = 2, we conclude
{G) + G) + G)} + G)
= 66- (6
+ 15 + 36) + 3 = 12.
Clearly, these 12 solutions are the following:
(7, 3, 0), (7, 2, 1), (7, 1, 2), (6, 4, 0), (6, 3, 1), (6, 2, 2), (5,5,0), (5,4,1), (5,3,2), (4,5,1), (4,4,2), (3,5,2).
0
Example 4.4 Euler's function Let n be a positive integer and let us denote by ¢(n) the number of positive integers less than or equal ton that are relatively prime ton. The function ¢(n)
140
THE PRINCIPLE OF INCLUSION AND EXCLUSION
is called the Euler's function of n. In order to compute this function, consider the decomposition of n into prime factors:
n
= 8 k,1 8 2k2 ... 8 rkr '
where si are prime numbers and k; positive integers, i = 1, 2, ... , r and let [} be the set of positive integers that are less than or equal to n. If Ai is the set of positive integers less than or equal ton that are divided by si, i = 1, 2, ... , r, then ¢( n) = N (Ai A; · · ·A~) is the number of positive integers less than or equal n that are relatively prime to n. Thus, according to Corollary 4.2, r
¢(n)
= N(A~A~ .. ·A~)=:~::) -1)kSr,k, k=O
with
where the summation is extended over all k-combinations {i 1 , i 2 , ... , ik} of the r indices {1, 2, ... , r }. Clearly,
and so the Euler's function of n is given by the expression
This expression may be written in the form
Table 4.1 gives Euler's function ¢(n) for n
Table 4.1
= 1, 2, ...
D
, 15.
Euler's Function 2
3 4
5 6
9
10
2242646
7
8
4
II 10
12 4
13 12
14 6
15 8
Example 4.5 The menages problem A classical enumeration problem formulated and solved by E. Lucas in 1891, known as the menages problem, asks the following. What is the number of different
4.2. NUMBER OF ELEMENTS IN A UNION OF SETS
141
seatings of n married couples (menages) around a circular table so that men and women alternate and no man is next to his wife? Assume that n of the 2n seats are green and the rest n seats are red and that the green and red seats are arranged around the table in alternate positions. Suppose (without any loss of generality) that the wives are seated first. Since men and women ought to be in alternate positions, then women may sit either on the green seats, which may be done in n! ways, or on the red seats, which also may be done inn! ways. Consequently, according to the addition principle, then women can be placed around the table in 2n! ways. Let us now number (a) then women from 1 to n in the ordinary direction (counterclockwise) starting from any one of them, (b) the n empty seats from 1 to n in the ordinary direction starting from the seat that is to the left of the woman with the number 1 and (c) then men by assigning to every man the number of his wife. In this way the enumeration of the different ways of placing then men on then empty seats so that no man is seated next to his wife is reduced to the enumeration of the number Mn of permutations (i1, i2, ... , in) of {1, 2, ... , n} that satisfy the restrictions:
ir -:f:- r, ir -:f:- r
+ 1, r =
1, 2, ... , n- 1, in -:f:- n, in -:f:- 1.
n
In order to enumerate the number M n. let us consider the set of then! permutations (i 1 , }2, ... , in) of { 1, 2, ... , n} and its subsets A 1 , A2, ... , An, which are defined as follows: A 2 r-l is the set of permutations with ir = r, r = 1, 2, ... , n, A 2r the set of permutations with ir = r + 1, r = 1, 2, ... , n - 1 and A2n the set of permutations with in = 1. Then Mn = N(A~ A2 · · · A2n) and, according Corollary 4.2,
2n Mn = l:)-1)kS2n,k, k=O
with
S2n,o
= N(D) = n!,
S2n,k
=L
N(Ai 1 Ai2
• • •
Aik), k
= 1, 2, ...
, 2n,
where the summation is extended over all k-combinations {i 1, i 2, ... , ik} of the 2n indices {1, 2, ... , 2n}. Note that
N(Ai 1 Ai 2
• •
·A;.k)
=0
in the case where, between the indicated sets, there are at least two with consecutive indices: Ai. and A;,+J, since if is = 2r- 1, an odd number, then ir = rand Jr = r + 1, while if is = 2r, an even number, then ir = r + 1 and ir+l = r + 1, which cannot happen in the same permutation (i 1 , }2, ... , in) of { 1, 2, ... , n}. Therefore S2n,k = 0 for k = n + 1, n + 2, ... , 2n, since all the terms of this sum include at least two sets with consecutive indices. Further, the number of nonzero terms of S2 n,k. k = 0, 1, ... , n, equals
~(2n-k) 2n- k
k
'
THE PRINCIPLE OF INCLUSION AND EXCLUSION
142
the number of k-combinations { ii, i 2 , ... , ik} of the 2n indices {1, 2, ... , 2n} displayed on a circle that include no pair of consecutive integers (see Example 2.29). In addition, in the case where, between the indicated sets, there is no pair with consecutive indices, the general term of S2 n,k, k = 0, 1, ... , n, equals
N(A-~1 A-~2 .. ·A-)= (n- k)'•' Zk the number of permutations of the remaining n- k elements, the positions of which are not determined by the indicated sets. Hence
Mn =
'f)-1)k~ ( 2n- k) (n- k)!. 2n- k k
k=O
The number Mn is called the reduced menages number. The total number of different seatings of n manied couples around a circular table so that men and women alternate and no man is next to his wife equals 2n!Mn. Table 2.2 gives reduced menages numbers Mn for n = 2, 3, ... , 12. 0
Table 4.2 Reduced Menages Numbers 2 0
3
4 2
5 13
6 80
7 579
8 4738
9 43387
10 439792
II 4890741
12 59216642
Some interesting corollaries may be deduced from Theorem 4.2 and Corollary 4.2 in the case of the existence of some kind of symmetry with respect to the sets. Such symmetry, appearing in several applications, constitutes the case where the sets are exchangeable in the following sense.
DEFINITION 4.1 The sets AI, A2, ... , An are called exchangeable if, for every collection of r indices {ii, i 2 , ... , ir} from then indices { 1, 2, ... , n }. the number (4.11)
depends only on rand not on the specific collection of indices. COROLLARY 4.3 'An be exchangeable subsets of a finite set Let AI' A2, 0
0
0
n.
Then (4.12)
4.2. NUMBER OF ELEMENTS IN A UNION OF SETS
143
and
(4.13) where
llo
= N(fl) and llr = N(Ai 1 A; 2
• • •
A;r), r = 1, 2, ... , n.
PROOF The assumption of the exchangeability of the n sets A 1 , A 2 , ... , An entails that each of the (~) terms of the sum in the right-hand side of (4.4) equals N(A; 1 A;2 ···A;.)= llr and so Sn,r
=
(;)vr,
r
= 1,2, ...
,n.
Expressions (4.12) and (4.13) are then immediately deduced from (4.3) and (4.5), respectively. I
Example4.6 A secretary with mathematical interests is about to place four letters, numbered {1,2,3, 4}, into four envelopes, also numbered {1, 2, 3,4}. She is wondering in how many ways this can be done so that no letter is placed in the correct envelope. Note first that each placement of the four letters into the four envelopes may be represented by a permutation of the four letters in which the positions represent the four envelopes. Consider the set fl of permutations of the four letters and let A; ~ fl be the subset of permutations of the four letters in which the i-th letter is placed in the i-th position, i = 1, 2, 3, 4. Then N(A~A~A~A~) is the number of different placements in which no letter is placed in the correct envelope. Further, for any collection of r indices {i 1 , i 2 , •.. , ir} from the set {1, 2, 3, 4 },
which is the number of permutations of the other 4 - r numbers. Thus, the sets A1,A2,A 3 ,A4 are exchangeable and, according (4.13), the required number is given by
N (A I1 A2I A13 A41 ) = 4!
(
1 1 1- 1 +--2! 3!
1) +4!
= 9.
Clearly, these nine placements are the following: (2, 1, 4, 3), (2, 4, 1, 3), (2, 3,4, 1), (3, 1, 4, 2), (3, 4, 1, 2), (3,4,2,1), (4,1,2,3), (4,3,1,2), (4,3,2,1). This problem constitutes a particular case of the more general problem of evaluation of permutations with a given number of fixed (unchanged) points, which is presented at length in Chapter 5. 0
144
THE PRINCIPLE OF INCLUSION AND EXCLUSION
Example 4.7 Combinations with restricted repetition Find the number of k-combinations of the set Wn = { w1, w2, ... , wn} with repetition and the restriction that each element is allowed to appear at most s times. Consider the set of k-combinations of W n with (unrestricted) repetition and let Ai be its subset that includes the k-combinations, in which the element wi appears at least s + 1 times, i = 1, 2, ... , n. Then E 8 (n, k) = N(A~A2 ···A~) is the number of k-combinations of Wn with repetition and the restriction that each element is allowed to appear at most s times. Further, for any collection of r indices {i 1 , h, ... , ir} from then indices {1, 2, ... , n }, we have n (
k-r(s+1) n
(
+ k - r(s + 1) - 1) + k- r(s + 1)- 1), r = 1,2, ... ,n, n-1
since the r(s + 1) elements of each k-combination are determined, while the remaining k- r( s + 1) elements are chosen with (unrestricted) repetition from the n. Therefore the sets A 1 , A2 , ... , An are exchangeable and, according to (4.13 ),
Note that, for s 2: k all the terms of this sum, except the first (r this number reduces to
= 0), vanish and
which is the number of k-combinations of W n with unrestricted repetition.
4.3
0
NUMBER OF ELEMENTS IN A GIVEN NUMBER OF SETS
The number Nn,k of elements that are contained in k among n subsets AI' A2' ... ' An of a finite set n' in the particular case k = 0 has been expressed in the form of an algebraic sum of the number Sn,r = 2:: N(Ai, Ai2 • • • AiJ (see Corollary 4.2). An analogous expression in the general case with 0 ~ k ~ n is given in the next theorem.
4.3. NUMBER OF ELEMENTS IN A GIVEN NUMBER OF SETS 145
THEOREM 4.4 General inclusion and exclusion principle The number Nn,k of elements that are contained ink among n subsets A 1 , A 2 , ... , An, of a .finite set is given by
a,
(4.14) where Sn,o
= N(a) and Sn,r• r = 1, 2, ...
PROOF
Clearly,
Nn,k
=
L
N(Ai 1 Ai 2
• •
, n, is given by (4.4).
·Ai.Aj 1 Aj2
• •
·Aj,_.),
(4.15)
it, ... ,ik
where the summation is extended over all k-combinations {i 1, i 2, ... , ik} of then indices {1, 2, ... , n} and {jl, iz, ... , Jn-d = {1, 2, ... , n} - {i1, iz, ... , ik }. Let us first calculate the number N ( Ai 1 Ai 2 • • · Ai. Aj 1 Aj 2 • • • Aj, _•), of elements of a that are contained ink specified subsets among then subsets. Applying the expression N(AB') = N(A- B) = N(A)- N(AB) (see Theorem 1.4) to the sets A = Ai 1 Ai 2 • • • Ai> and B = Aj 1 U A12 U · · · U Ai .. -•• whence B' = Aj 1 Aj 2 • • • Aj,_., and putting Cj. = Ai 1 Ai 2 • • • Ai• Aj., s = 1, 2, ... , n - k, we deduce the relation
N(At1 A t2 ... A tk A'.)I A')2.... A'·)n-k ) =N(At1 A t2 ... A tk )-N(C·)l UC·)2 u .. ·UC·)n-k ) > from which, using (4.3), we conclude the expression n
N(Ai 1 Ai 2
••
·Ai.Aj 1 Aj2 ···Aj,_.)
= L(-1y-kQn,k,r(ii,iz, ...
,ik),
r=k with
for r = k, k + 1, ... , n, where the summation is extended over all (r - k)combinations { h 1 , h 2 , ... , hr- k} of the n - k indices {il , iz, ... , in_ k}. Introducing this expression into expression (4.15) of the number Nn,k. we get n
Nn,k =
L
L(-Iy-kQn,k,r(ii,iz, ... ,ik) (4.16)
r=k
THE PRINCIPLE OF INCLUSION AND EXCLUSION
146
where
Sn,k,r =
L L
Qn,k,r(ii, iz, · · · , ik)
it, ... ,ik
L
N(A;lA;2···A;kAhtAh2···Ahr-k).
it, ... ,ik ht, .. ,h,._k
Note that this sum includes
termsoftheform: N(Am 1 Am 2 ···AmJ, {m 1 ,mz, ... ,mr} C {1,2, ... ,n}. Further, among these terms, the distinct ones are equal to
the number of r-combinations {m 1 , m 2 . . . , mr} of the n indices { 1, 2, ... , n} and each such term is included in the sum as many times as the number
of ways of selecting k indices {i 1 , i 2 , •.• , ik} from the set {m 1 , m 2 , .•. , mr }, so that
which is a simple combinatorial identity. Consequently,
where the summation is extended over all r-combinations {m 1 , m 2 , .•. , mr} of the n indices { 1, 2, ... , n}. Introducing it into expression (4.16), we deduce I (4.14).
REMARK 4.5 The following proof of (4.14) is of broader interest. Its technique can be used in the proof of (4.3) and other analogous expressions. Note that, in general, an arbitrary element w in D is contained in s subsets A; 1 , A; 2 , ••• , A;. among the n subsets A 1 , Az, ... , An, with 0 :::; s :::; n. If 0 :::; s < k, then this element is not counted in expression (4.14), while if s = k, it is counted only once in the sum
4.3. NUMBER OF ELEMENTS IN A GIVEN NUMBER OF SETS 147
specifically in the term N (Ai, Ai2
• • •
Aik), and is not counted in the sum
< s ~ n, then the element w is counted in the sum Sn,r• r = k, k + 1, ... , s, as many times as is the number (:) of terms N (Am, Am 2 · • • Am,), with
If k
{m1,m2,··· ,mr} ~ {i1,i2,··· ,i 8 },andisnotcountedinthesumSn,r•r
=
s + 1, s + 2, ... , n. Consequently, this element is counted in (4.14) as many times as is the number
~( -1r-k G)(;) = G)~( -1r-k G=~) = o. Therefore, in (4.14) only the elements of D that are contained ink among then subsetsA 1,A 2, ... ,An are counted. I COROLLARY 4.4 Let A 1 , A2 , .•• , An be exchangeable subsets of a finite set D. Then the number N n,k of elements of D that are contained in k among these n subsets is given by (4.17)
where Vo = N(D) and Vr = N(Ai, Ai 2 PROOF
• • •
AiJ, r = 1, 2, ... , n.
The sum
where the summation is extended over all r-combinations {i 1, i 2, ... , ir} of the = Vr, of the
n indices {1,2, ... ,n}, under the assumption N(Ai,Ai 2 ···AiJ exchangeability of then sets A 1 , A 2, ... , An, is given by
Introducing it into expression (4.14) of the number Nn,k> we get
Nn,k = =
~(-1y-kG) (~)vr = (~) ~(-l)r-k(~=~)vr (~) ~(-1)i(n7k)vk+i•
k=0,1, ... ,n,
THE PRINCIPLE OF INCLUSION AND EXCLUSION
148
which is the required expression.
I
As regards the number Ln,k of elements that are contained in at least k among n subsets of a finite set n, which is connected with the number Nn,s, we deduce the next corollary of Theorem 4.4 .
COROLLARY 4.5
The number Ln,k of elements that are contained in at least k among n subsets n, is given by
A1 , A2, ... , An, of a finite set Ln,k =
~( -1y-k
G=~)
(4.18)
Sn,r, k = 1, 2, ... , n,
where the sum Sn,r is given by (4.4 ). If, in addition, the sets A 1 , A 2 , ... , An are exchangeable, then
Ln,k
= n(~
=~) ~(-1)j (n ~ k) ~~j·, k= j=O
J
J
1, 2, ...
,n,
(4.19)
PROOF Since an arbitrary element w is contained in at least k among the n subsets of n if and only if it is contained either ink or ink+ 1, ... , or in all the n subsets, applying the addition principle and using (4.14), it follows that
where, according to (2.8),
If the sets A 1 , A 2 ,
... ,
An are exchangeable, then
4.3. NUMBER OF ELEMENTS IN A GIVEN NUMBER OF SETS 149
and Ln,k
= ~( -1)r-k
G=~) (;)
Vr
nG =~) f)-1r-k(; =:) ~ = n(n -1) ~(- 1 ) 1 (n-_ k) k-1 . =
r=k
]=0
which completes the proof.
J
vk+i., k+J
I
Example4.8 Consider an ordered series of eight lottery-urns, each containing ten balls numbered from 0 to 9. In a drawing, one ball is drawn from each of the eight urns and an eight-digit number is formed. Calculate the different six-digit numbers in which only half of the ten digits appear. Let Ai be the set of eight-digit numbers, in which the digiti- 1 does not appear, i = 1, 2, ... , 10. Then the different eight-digit numbers in which (exactly) five of the ten digits appear equals the number of elements that are contained in (exactly) five of the ten sets AI, A 2 , . .. , A 10 . These sets are exchangeable. Indeed, for any collection of r indices {i 1 , i 2 , ... , ir} from the ten indices { 1, 2, ... , 10}, we have
which is the number of the 8-permutations with repetition of the 10 - r nonexcluded numbers. Thus, by Corollary 4.4, the required number equals
Note that the total number of 8-digit numbers is 100,000,000.
0
Example 4.9 Divisions with a given number of empty sets A division of a finite set W in r subsets is an ordered r-tuple of sets (AI, A 2 , ... , Ar) that are pairwise disjoint subsets of W and their union is W. In a division of a set, the inclusion of one or more empty sets is not excluded (see Section 1.2.7). Let D be the set of divisions of W, with N (W) = n, in r subsets. The number of elements of this set equals N (D) = rn, the number of n-permutations of r with repetition (see Corollary 3.3 ). Calculate the number of divisions of the set W, of n elements, in r subsets with (a) k empty subsets and (b) at least k empty subsets.
THE PRINCIPLE OF INCLUSION AND EXCLUSION
150
Let D i ~ n be the set of divisions ( A 1 , A2 , •.• , Ar) of the set W of n elements in r subsets, in which Ai = 0, i = 1, 2, ... , r. Note that, for any collection of s indices {i 1 , i 2 , ... , is} from the r indices { 1, 2, ... , r }, we have
since the number of divisions of the set W of n elements in r subsets, in which s specified sets are empty, equals the number of divisions of the set W of n elements in r- s subsets. Consequently the sets D 1 , D 2 , ... , Dr are exchangeable. (a) The number of divisions of the set W of n elements in r subsets among which k are empty, according to Corollary 4.4, equals
Nr,k
=
G) ~(-1)i (r ~ k) (r- k-
= (~) ~(- 1 )r-k-i
j)n
(r ~ k>n·
(b) The number of divisions of the set W of n elements in r subsets among which at least k are empty, according to Corollary 4.5, equals
_ (r- 1) ~ _ (r - k) (r- k-+ .
Lr,k - r k- 1
~( 1)
j
j=O
= r
(r1) ~( _1 k-1 ~
r-k-i
i=O
k
. J
j)n
J
(r--_z k) ~r-z
Note that Nr,k
= (r)r-kS(n, r- k),
where S(n,r)
= r.~ :i)-1)r-i (~)in, z
r = 0, 1, ... ,n, n
= 0, 1, ...
i=O
are the Stirling numbers of the second kind . These numbers appear in several interesting problems in combinatorics and for this reason are thoroughly examined in Chapter 8. 0 Example 4.10 Sum of multinomial coefficients Evaluate combinatorially the sum
4.3. NUMBER OF ELEMENTS IN A GIVEN NUMBER OF SETS 151
where the summation is extended over all kj 2: 1, j = 1, 2, ... , r, with k 1 + k2 + ... + kr-1 + kr = n. The combinatorial evaluation of a sum requires, at first, a suitable combinatorial interpretation. The multinomial coefficients and the sum Cn,r admit of several combinatorial interpretations. Let us consider the following combinatorial interpretation relative to the divisions of a finite set with a given number of empty sets, which thus allows the use of the conclusion of the previous example. The multinomial coefficient
n! k,!k2!···kr-l!kr!' according to Theorem 2.8, equals the number of divisions (A 1 , A2 , ... , Ar) of a finite set W, of n elements, in r subsets with N(Ai) = ki, j = 1, 2, ... , r. Consequently, the sum Cn,r expresses the number of divisions of the set W of n elements in r non-empty subsets, since N(Aj) 2: 1, j = 1, 2, ... , r, and so, according to conclusion (a) of the previous example with k = 0, equals Cn,r = t(-l)r-i
•=0
(:)in= r!S(n,r),
where S(n, r) is the Stirling number of the second kind.
0
Example 4.11 Coupon collector's problem For the promotion of sales of an industrial product, the producing company has printed s series of coupons numbered from I to s. A coupon is placed in each package box of the product. A customer who collects k different coupons gets k units of the product free, while in the exceptional case of collecting a complete series of coupons, the prize is a special gift from the company. Calculate the number of collections of n coupons that include (a) k different coupons and (b) a complete series of coupons. Consider the set fl of collections of n coupons and let Ai ~ fl be the set of collections of n coupons that do not include any coupon bearing the number i, i = 1, 2, ... , r. Then for any collection of m indices {i 1 , i 2 , ... , im} from the set of r indices {1, 2, ... , r }, we have
which is the number of n-combinations of the remaining s(r - m) coupons, after excluding the sm coupons bearing them specified number. Consequently, the sets A,, A2, ... , Ar are exchangeable. (a) The number of collections of n coupons that include k different coupons equals the number of elements of fl that are contained in r - k among the r
THE PRINCIPLE OF INCLUSION AND EXCLUSION
152
subsets A 1 , A2 , ... , Ar and according to Corollary 4.4, k
(r ~ k) ~(-1)1
Nr,r-k = is given by
Nr,r-k
C)vr-k+j,
G) t,( G) c(k: j)) G) t,(-1)k-iG) (~).
=
-1) 1
(b) The number of collections of n coupons that include a complete series of coupons equals
Note that
(r)k
Nr,r-k = ~C(n, k; s), where the numbers
1 L..)-1) ~ C(n,k;s) = k!
k-i(k)i (sz)n, . r =0,1, ... ,n, n =0,1, ... ,
•=0 which are called generalized factorial coefficients, are thoroughly examined, together with the Stirling numbers with which they are connected, in Chapter 8. D
4.4
BONFERRONI INEQUALITIES
A series of alternating inequalities for the number Nn,k of elements that are contained in k and the number Ln k of elements that are contained in at least k among n subsets of a finite set 'may be deduced from relations (4.14) and (4.18) and their inverses, respectively. The next lemma is concerned with the inversion of (4.14) and (4.18). LEMMA4.1 The inverse relations of(4.14) and (4.18) are
Sn,r =
t
k=r
G)Nn,k
(4.20)
4.4. BONFERRONI INEQUALITIES
153
and =
Sn,r
(k- 1)
L n
r- 1
(4.21)
Ln,k,
k=r
respectively. PROOF get
Multiplying (4.14) by (~) and summing for k
t
, n, we
t f) (~) (~) t, {t,(-1)"-· m(~)} s.,,
(~) Nn,k =
-1)r-k
J
k=J
= j, j + 1, ...
Sn,r
k=J r=k
= where the inner sum
_ Sr,j-
(k) (r)k ,
~ r-k f=;(-1) j
is evaluated by the aid of the relation
C)(~) = C)(~=~) and is equal to -
Sr,j-
r
(
j
)
the Kronecker delta:
T t;(-1)
6 1 ,1
= 1,
r-k
6r,i
(
r- J
-
k -")j -
= 0, r -::j:. j.
(
r
j
)
(1-1)
Consequently,
Multiplying (4.18) by (~:=:) and summing fork= j,j the same way (4.21).
r-j -6r,j,
+ 1, ...
, n, we deduce in
I
THEOREM 4.5 Bonferroni inequalities Let Nn,k be the number of elements that are contained ink and Ln,k the number of elements that are contained in at least k among n subsets A1 , A2 , •.. , An of a
154
THE PRINCIPLE OF INCLUSION AND EXCLUSION
finite set fl. Then, for s = k, k + 1, ... , n, the following alternating inequalities hold true:
k = 0, 1, ... ,n,and ( -1)s-k+l
{L - ~(-1)r-k (rS }> 0 k _ 1) 1 n,k
~
n,r
_
'
(4.23)
r=k
k = 1, 2, ... , n, where the sum Sn,r• r = 0, 1, ... , n, is given by (4.4).
PROOF
Consider, for fixed nand s = k, k
+ 1, ... , n, k
= 0, 1, ... , n, the
sequence
which, by virtue of (4.20), vanishes for s =nand any k = 0, 1, ... , n, while, for s = k, k + 1, ... , n - 1 is given by Mn,k,s=
t
(-1r-•-lG)sn,,., k=0,1, ... ,n-1.
r=s+l Upon using (4.20), this sequence can be written as a linear combination of Nn,j. j = s + 1, s + 2, ... , n:
Note that the coefficient of the general term of this expression,
according to (2.8), is equal to
155
4.5. NUMBER OF ELEMENTS OF A GIVEN RANK
that is, is positive, which implies (4.22). The inequalities (4.23) are deduced in the same way from (4.18) and (4.21). I The inequalities (4.22) in the particular case k = 0 reduce to
REMARK 4.6
while the inequalities (4.23) in the particular case k
= 1 reduce to
which, for s = 1, yields the Boole inequality n
N(Al U A2 U · · · U An):::;
L N(Ai). i=l
Further, from (4.22) and (4.23), with s = k and s = k + 1, we deduce the double inequalities, Sn,k - (k + l)Sn,k+l :::; Nn,k :::; Sn,k and
respectively.
4.5
I
NUMBER OF ELEMENTS OF A GIVEN RANK
In the enumeration of the elements that are contained in a given number of subsets among n subsets of a finite set, there does not enter any ordering of these subsets. When the considered subsets are ordered, some interesting problems of enumeration of elements, according to the rank (order) of the first set in which they are contained, emerges. This is clarified in the next combinatorial model. Let WI' w2, ... 'H'n be finite sets and let n be their Cartesian product,
n =WI
X w2 X ... X H'n
= {(wl,w2,··.
,wn):
Wj
E
wj,
j
= 1,2, ...
,n}.
Let us consider, for a given element Wj E wj, the subset Aj of n that includes the elements w = (wl 'W2, ... 'Wn) E n for which the j-th coordinate
156 is
Wj,
THE PRINCIPLE OF INCLUSION AND EXCLUSION
j = 1,2, ... ,n. The ordering (wt,W2,··· ,wn) of the elements
= 1, 2, ... , n induced the ordering (At, A2, ... , An)
Wj,
of the corresponding subsets Aj, j = 1, 2, ... , n. The enumeration of the elements of D that, for a given index k, are not contained in any of the sets At, A2, ... , Ak-t and are contained in Ak (the first in-order set in which they are contained) is one of the interesting problems that emerged. Note that, in the corresponding probabilistic model, D is the sample space of a sequence of Bernoulli experiments and A j is the event of a success at the j-th experiment, j = 1, 2, .... The calculation of the probability that the first success is realized at the j-th experiment requires the enumeration of the sample points (elements of D) that are not contained in the events (subsets of D) At, A2, ... , Ak-t and are contained in Ak· As regards the general problem, the notion of the rank of an element is formally introduced in the next definition. j
DEFINITION 4.2 Let (At, A2, ... , An, ... ) be ordered subsets of a set fl. An element w E D that is contained in the set A~ A; · · · A~_ 1 Ak is said to be of rank k. In the case of a .finite number ofn ordered subsets (At, A2, ... , An), an element w E D that is not contained in any of then subsets is said, by convention, to be of rank n + 1 .
The next theorem is concerned with the number of elements of a given rank. THEOREM4.6 Let (At,A2,··· ,An,···) be ordered and .finite subsets of a set fl. Then the number Rk = N(A;A2 · · · A~_ 1 Ak), of elements ofD of rank k, is given by, Rk = Qk-t,o- Qk--1,t
+ · · · + (-1)k- 1Qk-t,k-1,
k = 1, 2, ... , (4.24)
with
and (4.25)
where the summation is extended over all r-combinations {it, i2, ... , ir} of the k- 1 indices {1, 2, ... , k- 1}. PROOF Applying the expression N(AB') = N(A) - N(AB) (see Theorem 1.4) to the sets A = Ak and B = At U A2 U · · · U Ak-t. whence B' =
157
4.5. NUMBER OF ELEMENTS OF A GIVEN RANK
A]. A~··· sion
A~-1'
and setting Cj = AjAk. j = 1, 2, ... , k- 1, we get the expres-
Further, using (4.3) and since
we deduce (4.24).
I
REMARK 4.7
An alternative expression of the munber of elements of a given rank may be derived by an application of the expression N ( AB') = N (A) N(AB) to the sets A = AJ. A~··· A~-t and B = A~. whence B' = Ak. Then N(A~A~ · · · A~_tAk) = N(A~A~ · · · A~_ 1 )- N(A~A~ ···A~ A~)
and so Rk = Nk-t,o- Nk,o,
I
where Nn,o is given by (4.5).
COROLLARY 4.6 Let (At, A 2, ... , An, ... ) be ordered and finite subsets of a set If, in addition, for a given k the sets A 1 , A2, ... , Ak are exchangeable, then the number of elements of of rank k is given by
n.
n
Rk = ( k -0 1) Vt - (k1 1) V2
+ ... + (-1) k-t (kk - 1) 1 Vk'
(4.26)
PROOF
The assumption of exchangeability of the sets At, A2, ... , Ak implies that each of the (k~t) terms of the sum Qk-t,r in (4.25) is given by N(Ai, Ai2 ... AirAk) = N(AtA2 ... Ar+l) = Vr+t' r = 0, 1, ... 'k- 1.
Therefore Qk-t,r=
(k-1) r
Vr+t, r=0,1, ... ,k-1
and, by (4.24), expression (4.26) is deduced.
I
Example 4.12 Consider a lottery-urn containing ten balls numbered from 0 to 9 and assume that balls are drawn one after the other without replacement. This procedure is
158
THE PRINCIPLE OF INCLUSION AND EXCLUSION
terminated at the k-th trial if number k is drawn, k = 1, 2, ... , 9; otherwise it is terminated at the tenth trial whether or not number 0 is drawn. Calculate the number Tk of different series of drawings that are terminated at the k-th trial, k = 1, 2, ... ' 10. Let n be the set of the 10! different series of drawings and consider the ordered subsets (A 1 , A2, ... , A10 ) of n that are defined as follows: the set Ai contains those series of drawings in which number j is drawn at the j-th trial, j = 1, 2, ... , 9. Especially the set A 10 contains those series of drawings in which number 0 is drawn at the tenth trial. These sets are exchangeable. Indeed,
which is the number of different series of drawings of the other 10- r numbers. The number Rk of different series of drawings of rank k, using Corollary 4.6, is obtained as k-1
Rk=~(-1r
(k- 1) r
(9-r)!, k=1,2, ... ,10.
Especially, the number Ru = N (A~ A~ · · · A~ 0 ) of different series of drawings of rank ll, using Corollary 4.3, is obtained as 10 (10) Ru = ~( -1r r (10- r)!.
Clearly, the number Tk of different series of drawings that are terminated at the k-th trial is given by Tk = Rk, k = 1, 2, ... , 9 and T10 = R 10 + R 11 . Note that, from a probabilistic point of view, the quotient Pk = Tk/10!, k = 1, 2, ... , 10,
gives the probability that the drawing is terminated at the k-th trial.
4.6
0
BIBLIOGRAPHIC NOTES
This chapter was devoted to a thorough presentation of the counting principle of inclusion and exclusion. In probability theory books, Theorem 4.2, expressed in terms of probabilities, is attributed to H. Poincare (1896) and is referred to as Poincare formula. However, it seems that this formula was also known to J. Sylvester (1883) and to Euler (1760) when he evaluated
4. 7. EXERCISES
159
able to generalize results previously discussed by P. R. Montmort (1708). Also, De Moivre (1730) derived Theorem 4.3 for si = 1, and mi = m, i = 1, 2, ... , n. After De Moivre, C. Jordan (1867) derived expressions analogous to those of Theorem 4.4 and its Corollary 4.4. Ch. Jordan (1926, 1927a,b, 1934, 1939a,b) obtained Theorems 4.4 and 4.6 and their Corollaries 4.4 and 4.6 and presented several applications. More general formulations of the inclusion and exclusion principle were given by M. Frechet (1940, 1943), K. L. Chung (1941, 1943a,b,c) and L. Takacs (1967b), who furnished a very extensive reference list. Further, L. Takacs (1991) derived a limiting form of Theorem 4.4 as the number n of sets (events) increases to infinity. The work of C. E. Bonferroni (1936) is considered as the foundation of the inequalities in Theorem 4.5. The menages problem was presented and solved by E. Lucas (1891); before that under a different formulation this problem had been examined by A. Cayley (1878a,b) and T. Muir (1878). The expression for the reduced menages number given in Example 4.5 is due to J. Touchard (1934, 1953). A general method of enumeration of permutations with restricted positions was developed by I. Kaplansky and J. Riordan in a series of papers. For details, see Chapters 7 and 8 of the book on combinatorial analysis by J. Riordan (1958).
4.7
EXERCISES
1. Calculate the number offour-digit university campus telephone numbers in which each of the digits 1, 2 and 3 appear at least once.
2. Calculate the number of positive integers less than or equal to 1000 that are neither perfect squares nor perfect cubes. 3. Suppose five pairs of gloves are to be distributed to five people by a child. Calculate the number of different distributions of two gloves to each of the five people with no one getting a matching pair. 4. Suppose that four gloves are randomly chosen from a drawer containing five different pairs of gloves. Calculate the number of selections that include at least one pair of gloves. 5. Calculate the number of 6-combinations of the set W4 = {w1 , w2 , w3 , w4} with repetition and the restriction that the element Wi is allowed to appear, at most, i times, i = 1, 2, 3, 4. 6. In the base 5 number system each number is represented by an ordered sequence of the digits from the set {0, 1, 2, 3, 4} with repetition. For example, the numbers 625, 859 and 3125, which are expressed in terms of
THE PRINCIPLE OF INCLUSION AND EXCLUSION
160
powers of 5 as 625 = 1·5 4 +0·5 3 +0·5 2+0·5 1+0·5°, 859 = 1·5 4 +1·5 3 +4·5 2+ 1·5 1+4·5° and 3125 = 1·55 +0·5 4 +0·5 3 +0·5 2 +0·5 1+0·5°, are represented by the ordered sequences (1, 0, 0, 0, 0), (1, 1, 4, 1, 4) and (1, 0, 0, 0, 0, 0). Note that each of 2500 integers that are greater than or equal to 54 = 625 and less that 55 = 3125 may be represented by a 5-permutation of the set {0, 1, 2, 3, 4} with repetition, in which the first position is occupied by digit 1. Calculate the number of integers greater than or equal to 625 and less than 3125 for which only three of the five digits {0, 1, 2, 3, 4} appear in the last four positions of their 5-nary sequence representation. 7. Show that the number of positive integers, less than or equal to 70n, that are not divisible by any of the prime numbers 2, 5 and 7 equals 24n. 8. Show that the number of positive integers, less than or equal to 100, that have not repeated prime factors equals 61.
9. Let s 1, s2, ... , sr, be positive integers, relatively prime, and n a positive integer. Show that the number N(n;s 1,s 2, ... ,sr) of positive integers, less than or equal to n, that are not divisible by any of the numbers s1, s2, ... , Sr is given by
where, in the inner sum, the summation is extended over all k-combinations {i 1, i2, ... , ik} of the r indices { 1, 2, ... , r} and [x] denotes the integral part of x. 10. The sieve of Eratosthenes. Let a 1 = 2, a 2 = 3, a 3 = 5, ... , be the sequence of primes (in increasing order) and let E(s), s > 0, be the number of prime numbers that are less than or equal to s. Show that
E(r)- E(Vr) = Sn,owith n
= E( vr)
Sn,1
+ Sn,2- · · · + (-1)nSn,n,
and
Sn,o = r- 1, Sn,k =
L[
r
ail ai2 ... aik
] , k = 1, 2, ... , n,
where the summation is extended over all k-combinations {i 1, i2, ... , ik} of then indices {1,2, ... ,n}. 11. (Continuation). Show that the number E(100) of prime numbers less than or equal to 100 equals 25.
12. Show that
4. 7. EXERCISES
161
by a suitable combinatorial interpretation of the binomial coefficients and application of the inclusion and exclusion principle. 13. Prove the identity
by a suitable combinatorial interpretation of the binomial coefficients and application of the inclusion and exclusion principle. 14. The Galilei problem. Let G(n, k) be the number of different outcomes of a throw of n distinguishable dice, in each of which the sum of the numbers on the upmost faces of the dice equals k. Show that
G(n,k) =
~(-1Y(~) e~:; 1), s = [(k-n)/6].
15. Let U(n, k, r) be the number of k-permutations (j 1 , h, ... , jk) of the set {1, 2, ... , n }, with repetition, in which]!+ h + · · · + jk ~ r. Show that
U(n, k, r)
= ~( -1)
8
G)
(r -k ns), m
= [(r- k)jn]
and conclude that
16*. Runs of consecutive elements in combinations. Let C(n, k, s) be the number of k-combinations of the set { 1, 2, ... , n} which include no run of s consecutive integers. Show that
17*. Runs of consecutive elements in combinations of circularly ordered elements. Let B(n, k, s) be the number of (circular) k-combinations of the set { 1, 2, ... , n} of n integers, displayed on a circle (whence n and 1 are consecutive), which include no run of s consecutive points. Show that [k/s]
B(n, k, s) = ""' ( -1Y (n- k) _n_ (n- rs). ~ r n- rs n- k r=O
162
THE PRINCIPLE OF INCLUSION AND EXCLUSION
18*. Let C(n, k; a 1 , b1 , ... , ak-l, bk-l) be the number of k-combinations {i 1,i 2, ... ,ik}, it< i2 < ··· < ik, of {1,2, ... ,n}, with differences dm = im+l - im, m = 1, 2, ... , k- 1, satisfying the inequalities am < dm :S bm, m = 1, 2, ... , k- 1, where am < bm, m = 1, 2, ... , k- 1, are given positive integers. Show that C(n,k;at,bl,··· ,ak-t,bk-d k-l = 1)j
L(- L (n- Tk-l- (em,: Cm
2
+ · · · + CmJ),
J=O
where Tk-l = a1 + a2 + · · · + ak-t, Cm = bm- am, m = 1, 2, ... , k- 1, and in the inner sum the summation is extended over all ]-combinations {m 1,m2,··· ,mj} of the k-1 indices {1,2, ... ,k-1}. In the particular case am= r, bm = s, m = 1,2, ... ,k -1, setting C(n,k;r,s, ... ,r,s) C(n, k; r, s), conclude that
=
C(n,k;r,s)
= ~(-1)i
e;
1)
(n-
(k
-1)~- j(s- r)).
19*. Let B(n, k; a1, b1, ... , ak, bk) be the number of k-combinations {i1,i2,··· ,ik}, it< i2 < ··· < ik, of {1,2, ... ,n}, with differences dm = im+l - im, m = 1, 2, ... , k - 1, satisfying the inequalities am < dm :S bm, m = 1, 2, ... , k - 1, and span d = ik - it satisfying the inequality ak < n- d :S bk, where am < bm, m = 1, 2, ... , k, are given positive integers. Show that
where Tk-l =at+ a2 + ··· + ak-t, Cm = bm- am, m = 1,2, ... ,k- 1, and in the inner sums the summation is extended over all j-combinations {m 1,m2, ... ,m1 } of the k- 1 indices {1,2, ... ,k- 1}. In the particular case am = r, bm = s, m = 1, 2, ... , k- 1, and ak = u, bk = w setting
4. 7. EXERCISES
163
B(n, k;; r, s, ... , r, s, u, w)
=B(n, k; r, s, u, w), conclude that
. _ ~ _ J(k-1)n-(k-1)(r-u)-j(s-r) B(n,k,r,s,u,w)- ~( 1) . (k 1) "( ) J
J=O
x(n_
(k- 1)r ~
~( _ 1)i
f;:o
x(n-
n -
(k-j
-
r - u - J s- r
u- j(s- r))
1) n- (k- 1)(r- w)- j(s- r) n-(k-1)r-w-j(s-r)
(k- 1)r ~ w- j(s- r)).
20. The menages problem at a straight table. Let 2n!Ln be the number of ways of seating n married couples at a straight table so that men and women alternate and no man is next to his wife. Show that
21. (Continuation). Let Mn and Ln be the reduced menages number for a circular and a straight table, respectively. Show that
(n- 2)Mn = n(n- 2)Mn-l (n- 1)Ln = (n 2
-
+ nMn-2 + 4( -1)n+l,
n- 1)Ln-l
+ nLn-2 + 2( -1t+l.
22. A modified menages problem. Let Hn be the number of ways of seating n married couples around a circular table so that no man is next to his wife. Show that
23. (Continuation). Let Wn be the number of ways of seating n married couples at a straight table so that no woman is next to her husband. Show that
164
THE PRINCIPLE OF INCLUSION AND EXCLUSION
24. Show that the number Dn,k of the terms in the development of a determinant of order n that contain k diagonal elements is given by
n! Dn,k
= k!
(-1)J L -.-,-, J
n-k
k = 0,1, ... ,n.
j=O
25. Consider a series of k throws of a die and let Q(k, r) be the number of different outcomes, in each of which r :::; 6 specified faces appear. Show that
26. Let f"h = {(wl,w2,···,wk): wi = (ui,vi), ui,vi = 1,2, ... ,6, i = 1, 2, ... , k} be the set of different outcomes of a series of k throws of a pair of distinguishable dice and let Ak be the subset of f"h containing the outcomes, in each of which all six pairs (u, u), u = 1, 2, ... , 6 appear. Show that
27. Permutations with restricted repetition. Let U1 (n, k) be the number of k-permutations of n with repetition and the restriction that each element appears at least once. Show that U,(n, k)
= n!S(k,n) = i)-1)n-j (~)/, j=O
J
where S(k, n) is the Stirling number of the second kind.
28. Combinations with restricted repetition. Let Er,s(n, k) be the number of k-combinations of n with repetition and the restriction that each element appears at least r and at most s times. Show that
29. Consider 2n elements that belong to n different kinds, with two like elements of each kind, and let Qn be the number of permutations of these elements in which no two like elements are consecutive. Show that
4. 7. EXERCISES
165
30. Consider an urn containing n balls numbered from 1 ton. Assume that, in a drawing, r numbers are simultaneously drawn from the urn and returned to it before the next drawing. An s-tuple drawing consists of s consecutive drawings. If L(n, r, s) denotes the number of s-tuple drawings, in each of which all then numbers are drawn (each of them at least once), show that
L(n, r, s) =
~( -1)n-k (~)G)
5
31. Let D(n, r, s) be the number of divisions (A 1 , A2, ... , Ar) of a finite set W, with N(W) = n, in r subsets with N(Aj) 2: s, i = 1, 2, ... , r. Show that D(n, r, s
for s
+ 1) =
~( -1)j G)~:?;: D(n- sj, r- j, s),
= 0, 1, ... , [n/r]- 1 and conclude that D(n, r, 1) = r!S(n, r) = t ( -1)j
(~) (r- j)n, J
j=O
where S(n, r) is the Stirling number of the second kind. 32. (Continuation). Consider the sum of multinomial coefficients
S2(n,r) = 11 ~ ~ (
r.
n
k1, k2, ... , kr-1
where the summation is extended over all ki k1 + k2 + · · · + kr-1 + kr = n. Show that
> 2,
) , i
1,2, ...
,r,
with
t(-1)j(~)s(n-j,r-j).
S2(n,r) =
J
j=O
The number S2(n, r) is called associated Stirling number of the second kind. 33. Let C(n, r; s)
= ~~ L
(;J (:J ···(;J,
where the summation is extended over all ki 2: 1, i = 1, 2, ... , r, with k1 + k2 + · · · + kr = n. Show that C(n,r;s)
= ~ t(-1t-i(~)(sj)n· j=O
J
The number C(n, r; s) is called generalized factorial coefficient.
166
THE PRINCIPLE OF INCLUSION AND EXCLUSION
34. (Continuation). Let
where the summation is extended over all ki 2: 2, i = 1, 2, ... , r, with kt + k2 + · · · + kr = n. Show that
C2(n, r; s) =
i)
-1)j (~) sJC(n- j, r- j; s). J
j=O
The number C 2 (n,r; s) is called associated generalized factorial coefficient. 35*. Frechet inequality . Let At, A2 , ... , An be subsets of a finite set il and Sn,O = N(il), Sn,r = LN(Ai,Ai2 ···Air)! r = 1,2, ... ,n, where the summation is extended over all r-combinations {it, i 2 , .•• , ir} of then indices {1,2, ... ,n}. Show that Sn,r
I(;)~ Sn,r-t
I (r:
). r = 1,2, ... ,n. 1
36*. (Continuation). Gumbel inequality. Show that
for r = 2,3, ... ,n. 37*. Mobius function on partially ordered and locally finite sets. A set P = {. . . , x, y, z, ... } supplied with an order relation, x ~ y (x is less than or is included in or is ahead of y), which is valid for some pairs of elements (x, y) and with an equality relation, x = y, so that (1) x ~ x for every element x in P (2) if x ~ y and y ~ z, then x ~ z (3) if x ~ y andy ~ x, then x = y is called partially ordered. Note that the notation y 2: x may be used as an alternative form of x ~ y. Also x < y (or y > x) if x ~ y (or y 2: x) and x f:. y. A partially ordered set P is called locally finite if the number of elements in every interval [x, y] = { z: x ~ z ~ y} is finite. Let F be the set of real functions f(x, y) for x, y elements in P such that f(x, y) = 0 if x 1:. y (that is x > y or x and y are not comparable). The Kronecker delta function defined by J(x, y) = 1 if x
=y
and J(x, y)
=0
if x
f:.
y
4. 7. EXERCISES
167
and the zeta function defined by
=1
((x,y)
if x::; y and ((x,y)
=0
otherwise,
belong to the set F. (a) Let f be a function in F. Prove that there exist functions g and h in F such that
t5(x,y)
=
L
f(x,z)g(z,y), t5(x,y)
=
L
h(x,z)f(z,y),
if and only if f(x, x) -:j:. 0 for every element x in P. (b) Let g(x, y) and h(x, y) be solutions of the equations in (a). Prove that h(x, y) = g(x, y) for all elements x, y in P. This common solution g is called the inverse of f. (c) The inverse of the zeta function, denoted by J.L(x, y) for x, y elements in P is called the Mobius function of P. Therefore
J.L(x,x)
=1
for every element x in P and
J.L(X, y) =for x
L
J.L(x, z), J.L(x, y) =-
L
J.L(z, y)
< y fixed points in P.
38*. (Continuation). Mobius inversion formula. Let P be a partially ordered and locally finite set with a zero element 0. If f(x) and g(x) are functions defined for every element x in P and J.L(X, y) is the Mobius function of P, prove that the relation
g(x)
=L
f(y)
y'5,x
implies the relation
f(x) =
L g(y)J.L(Y, x) y<x
and vice versa. 39*. (Continuation). Let P be the set of the subsets of a finite set S with respect to the order relation~ (is included, is a subset of). Prove that the Mobius function of P is given by
J.L(X, Y)
= (-1)N(Y)-N(X)'
X~ Y,
where N(X) and N(Y) are the numbers of elements of S that belong to X and Y, respectively.
168
THE PRINCIPLE OF INCLUSION AND EXCLUSION
40*. (Continuation). Consider n subsets A1, A2, ... , An of a finite set D and let S = { 1, 2, ... , n}. To each element w E D, there corresponds a set of indices J <; S such that w E A1 for every j E J. Let f(K) be the number of elements of n that belong only to the intersection of the sets A 1 , j ¢ K forK a subset of S. Then g(I) = LKci f(K) is the number of elements of n that belong (not necessarily exclusively) to the intersection of the sets Aj, j ¢ I. Prove that
f(K) =
L (-1)N(K)-N(I)g(I), JCK
where N(K) and N(I) are the numbers of elements of S that belong to K and I, respectively. Deduce the number Nn,o of elements of D that do not belong to any of the n sets.
ChapterS PERMUTATIONS WITH FIXED POINTS AND SUCCESSIONS
5.1
INTRODUCTION
One of the classical combinatorial problems in the theory of probability is the famous problem of coincidences {probleme des recontres), which constitutes in the computation of the ways of putting n cards, numbered from 1 ton, in a series so that, in a given number of cards their position coincides with their number. This problem was initially formulated in the particular case n = 13 by Montmort (1678-1719) and then in the general case by De Moivre (1667 -1754), whose solution essentially constitutes an application of the inclusion and exclusion principle. Later, several reformulations and generalizations of this problem were followed. In this chapter targeting to the problem of coincidences, the number of permutations of the first n positive integers { 1, 2, ... , n} (a) with a given number of fixed points (with respect to their natural order ( 1, 2, ... , n)) and (b) of a given rank are computed by applying the inclusion and exclusion principle. In the same way, the computation of the permutations of the first n positive integers with a given number of pairs of successive points is carried out.
5.2
PERMUTATIONS WITH FIXED POINTS
DEFINITIONS.l Let (j 1 , h, ... , in) beapermutationoftheset {1, 2, ... , n}. The point ir is called fixed point of this permutation if ir = r, r = 1, 2, ... , n.
170
PERMUTATIONS WITH FIXED POINTS AND SUCCESSIONS
Note that, according to this definition, the problem of coincidences constitutes in the computation of the permutations of the set {1, 2, ... , n}, with a given number of fixed points. The permutations without a fixed point are particularly interesting and deserve special attention. A particular name is given to such a permutation. DEFINITION S.2 A permutation (j1, h, ... , ]n) of the set { 1, 2, ... , n} is called a derangement if it does not have a fixed point, that is, if Jr =j:. r for all r=1,2, ... ,n.
These notions are illustrated in the following simple example. ExampleS./ Consider the permutations (j 1 , )2, }3, j 4 ) of the set { 1, 2, 3, 4}. Clearly, these 24 permutations can be classified according to the fixed points they have as follows. (a) The derangements are the following 9: (2, 1, 4, 3), (2, 4, 1, 3), (2, 3, 4, 1), (3, 1, 4, 2), (3, 4, 1, 2), (3,4,2,1), (4,1,2,3), (4,3,1,2), (4,3,2,1).
(b) The permutations with one fixed point are the following 8: (1,3,4,2), (1,4,2,3), (3,2,4,1), (4,2,1,3), (2,4,3,1), (4,1,3,2), (3,1,2,4), (2,3,1,4).
(c) The permutations with two fixed points are the following 6: (1,2,4,3), (1,4,3,2), (1,3,2,4), (4,2,3,1), (3,2,1,4), (2,1,3,4).
(d) There are no permutations with three fixed points, while
(1, 2, 3, 4) is the only permutation with four fixed points.
0
The following two theorems are concerned with the number of derangements. THEOREMS./ The number Dn of derangements of the set {1, 2, ... , n} equals n
(-1)k
Dn=n!L~
(5.1)
k=O
and satisfies the recurrence relation
Dn=nDn-I+(-l)n, n=1,2, ... , Do=l.
(5.2)
5.2. PERMUTATIONS WITH FIXED POINTS
171
PROOF Consider the set {} of the permutations (j 1, )2, ... , Jn) of the set { 1, 2, ... , n} and let Ar be the subset of permutations (j 1, )2, ... , Jn) for which the point Jr is a fixed point, r = 1, 2, ... , n. Then, the number Dn of derangements of the set { 1, 2, ... , n} is given by
Clearly, for any selection of k indices {i 1, i 2, ... , ik} out of the n indices { 1, 2,
... ,n}, vk
= N(Ai,Ai, · · · Aik) = (n- k)!,
k
= 1, 2, ...
,n,
which is the number of permutations of the n - k non-fixed points. This expression implies the exchangeability of the sets A 1, A2, ... , An and so, according to Corollary 4.3,
Using this expression, recurrence relation (5.2) is readily deduced: n-1 Dn = n(n -1)!
L
(-k~)
k
+ (-1t = nDn-1 + (-1)n.
k=O
As regards the initial value of this recurrence relation, it is clear that D 1 which is equivalent to D 0 = 1. I
0,
THEOREM 5.2 Euler's recurrence relation The number Dn of derangements of the set { 1, 2, ... , n} satisfies the recurrence relation Dn
= (n-
1){Dn-1 + Dn-2}, n
= 2, 3, ...
, Do
= 1,
D1
= 0.
(5.3)
PROOF Note that the last position of a derangement (j 1, )2, ... , Jn) of the set {1, 2, ... , n} can be occupied by any of the n - 1 numbers {1, 2, ... , n - 1}. Assume that Jn = k, k =/:- n. Then, the derangements (j 1 , )2, ... , Jn-l) of the set { 1, 2, ... , k - 1, k + 1, ... , n }, can be distinguished according to whether n does or does not occupy the k-th position. If ik = n, then the number of these derangements is equal to the number Dn_ 2 of the derangements (j1,)2, ... ,Jk-1,ik+1, ... ,in-1) of then- 2 numbers {1, 2, ... , k- 1, k + 1, ... , n - 1}. If ik =1- n, then the number of these derangements equals the number of permutations (ii, h, . .. , in- I) of the n - 1 numbers { 1, 2, ... , k-1,k+1, ... ,n},withjr =f:.r,r= 1,2, ... ,k-1,k+1, ... ,n-1,jk =f:.n.
172
PERMUTATIONS WITH FIXED POINTS AND SUCCESSIONS
The latter number equals the number Dn-1 of the derangements Ut, j2, ... , in-1) of then- 1 numbers { 1, 2, ... , n- 1}. Consequently
Dn = (n- 1){Dn-1
+ Dn-2},
n = 2,3, ... , Do= 1, Dt = 0,
I
which is the required recurrence relation.
REMARK 5.1 The similarity of recurrence relations (5.2) and (5.3) to the corresponding recurrence relations for the factorials,
n! = n(n- 1)!, n = 1, 2, ... , 0! = 1, n! = (n- 1){(n- 1)! + (n- 2)!}, n = 2, 3, ... , 0! = 1, 1! = 1, led Whitworth to call the number Dn n-subfactorial. Using recurrence relation (5.2) or (5.3), a table of subfactorials can be constructed. Table 5.1 gives the I numbers Dn for n = 0, 1, ... , 10.
Table 5.1 0
Subfactorials Dn 1 0
2
3 2
4 0
5 44
6 265
7
8
9
10
1854
148331
133496
1334961
The next theorem is concerned with the number of permutations with a given number of fixed points.
THEOREM5.3 The number Dn,k of pennutations of the set {1, 2, ... , n} with k fixed points equals Dn,k
=
n! k!
n-k
L
· (-1)3
-.-!J
j=O
=
(n) k
(5.4)
Dn-k·
PROOF Consider the set D of the permutations (it, i2, ... , in) of the set { 1, 2, ... , n} and let Ar be the subset of permutations Ut ,i2, . . . , j n) for which the point ir is a fixed point, r = 1, 2, ... , n. Then, the number Dn,k equals the number of elements of the set D that are contained in k among the n exchangeable sets A 1 , A 2 , ... , An. This number, according to Corollary 4.4 and since Vr = N(A; 1 A; 2 • • • Ai,) = (n- r)!, is given by
n n-k . ( nDn,k= ( k ) ~(-1)1 . J=O
J
k) (n-k-j)!=k!L::-.,-. n! n-k ( -1 ) · 1
J=O
J
5.2. PERMUTATIONS WITH FIXED POINTS
Further Dn,k =
(~) (n- k)!
173
I: (-.? J
j=O
and so, using (5.1), the second part of (5.4) is deduced.
I
Example 5.2 The classical problem of coincidences Consider an urn containing n balls numbered from 1 to n and assume that all the balls are successively drawn one after the other without replacement. The draw of the j-th ball at the j-th trial, j = 1, 2, ... , n, is called a coincidence. Calculate the number of series of drawings of the n balls that result in k coincidences. Clearly, to each series of drawings of then balls, there corresponds a permutation (j 1 , }2, ... , in) of the set {1, 2, ... , n} and to each coincidence there corresponds a fixed point of the permutation. Therefore the number of series of drawings of the n balls that result in k coincidences equals
n! n-k (-1)i
Dn,k =
kr L
. j=O
-.J· 1
-,
D
the number of permutations of the set { 1, 2, ... , n} with k fixed points.
REMARK 5.2 The number Dn,k is known in the bibliography as the coincidence number , a name due to the preceding example. Using the relation Dn,k = (~)Dn-k. Table 5.1 of subfactorials and Table 2.1 of binomial coefficients, a table of the numbers Dn k can be constructed. Table 5.2 gives the I coincidence numbers Dn,k fork= 1', 2, ... , n, n = 1, 2, ... , 9.
Table 5.2 Coincidence Numbers Dn,k
k
1
2
I 0 3 8 45 264 I855 14832 133497
0 6 20 I35 924 7420 66744
3
4
5
6
I 0 I5 70 630 5544
I 0 21 112 1134
0 28 168
8
9
1 0 1 36 0
1
7
n I 2 3 4 5 6 7 8 9
I
1 0 lO
40 315 2464 22260
I
174
5.3
PERMUTATIONS WITH FIXED POINTS AND SUCCESSIONS
RANKS OF PERMUTATIONS
DEFINITION 5.3
If
ir f:. r,
Let (ii, h, ... , in) be a permutation ofthe set { 1, 2, ... , n }.
r
= 1, 2, ...
, k- 1,
ik = k,
2~ k
~
n,
the permutation is said to be of rank k. In panicular, if j 1 = 1. the permutation is said to be of rank 1, while if ir f:. r, r = 1, 2, ... , n, it is said, by convention, to be of rank n + 1.
Note that several problems in combinatorics and in probability theory, known as problems of duration of trials (drawings), reduce to the enumeration of the permutations of the set { 1, 2, ... , n} of a given rank. Example5.3 The 24permutations (ii, h, iJ, j 4 ) of the set {1, 2, 3, 4} can be classified according to their rank as follows. (a) The permutations of rank 1 are the following 6: (1,2,3,4), (1,2,4,3), (1,3,2,4), (1,3,4,2), (1,4,2,3), (1,4,3,2). (b) The permutations of rank 2 are the following 4: (3,2,1,4), (3,2,4,1), (4,2,1,3), (4,2,3,1). (c) The permutations of rank 3 are the following 3: (2,1,3,4), (2,4,3,1), (4,1,3,2). (d) The permutations of rank 4 are the following 2:
(2, 3, 1, 4), (3, 1, 2, 4). (e) The permutations of rank 5 are the following 9: (2, 1, 4, 3), (2, 4, 1, 3), (2, 3, 4, 1), (3, 1, 4, 2), (3, 4, 1, 2), (3,4,2,1), (4,1,2,3), (4,3,1,2), (4,3,2,1). Note that the permutations of rank 5 are, by convention, the derangements of the set{1,2,3,4}. D The next theorem is concerned with the number of permutations of a given rank.
5.3. RANKS OF PERMUTATIONS
175
THEOREM5.4 The number Rn,k of permutations of the set { 1, 2, ... , n} of rank k equals k-1
Rn,k = ~( -1)
8
(k ~ 1) (n- s- 1)!,
(5.5)
fork = 1, 2, ... , nand Rn,n+l = Dn. Further, it satisfies the recurrence relation
Rn,k = Rn,k-1 - Rn-l,k-1, k = 2, 3, ... , n, n = 2, 3, ... , with Rn,l = (n- 1)!, Rn,k = 0, k
(5.6)
> n + 1.
PROOF Consider the set D of the permutations (j1,h, ... ,Jn) of the set { 1, 2, ... , n} and let A,. be the subset of permutations (j 1, )2, ... , Jn) for which the pointj,. is a fixed point, r = 1, 2, ... , n. The number Rn,k equals the number of elements of D of rank k with respect to the n ordered and exchangeable sets A 1, A2, ... , An. Since V 8 = N(Ai,Ai 2 • • • Ai.) = (n- s)!, s = 1, 2, ... , n, this number, according to Corollary 4.6, is k-1
Rn,k = ~(-1)
8
(k ~ 1) (n- s -1)!,
fork= 1, 2, ... , n. Clearly Rn,n+l = N(A~ A~··· A~) = Dn. Further, expression (5.5), on using Pascal's triangle, can be written as 1
Rn,k = (n- 1)! + ~(-1) k-
8 {
(k ~ 2) + (k =12)} (n- s- 1)! 8
and so
(k ~ 2) (n-s-1)!+~(-1) k-l (k =2) (n-s-1)! 1 (k -s 2) (n-s-1)!-~(-1)' (k -i 2) (n-i-2)!, =~(-1Y k-2
Rn,k=~(-1) 8 k-2
8
8
k-2
.
which, by virtue of (5.5), implies recurrence relation (5.6).
I
Example 5.4 Duration of a series of drawings Consider a lottery-urn containing n balls numbered from 1 to n and assume that balls are drawn one after the other without replacement. This series of drawings is terminated with occurrence of the first coincidence. Calculate the number of the series of drawings with a given duration of k drawings.
176
PERMUTATIONS WITH FIXED POINTS AND SUCCESSIONS
The required number, according to the Definition 3.1 of the rank of a permutation, is equal to the number of permutations of { 1, 2, ... , n} of rank k which, according to Theorem 3.1, is k-l
Rn,k = 2)-1)
5
(k 1) (n- s -1)!,
k
:
= 1,2, ...
,n.
0
s=O
REMARK 5.3 The number Rn,k has been studied by M. Frechet ( 1943); J. Riordan (1958) called it rank number. Using recurrence relation (5.6), Table 5.3 of the numbers Rn,k. fork = 1, 2, ... , n + 1, n = 1, 2, ... , 8, is constructed. I
Table 5.3 Rank Numbers Rn,k
k
I
2
3
4
5
6
7
8
9
265 265 2119
1854 1854
14833
n I
2 3 4 5 6 7 8
I 0 1 0 2 I 6 4 24 18 120 96 720 600 5040 4320
1 I
3 14 78 504 3720
2 2 11 64
426 3216
9 9 53 362 2790
44 44
309 2428
5.4 PERMUTATIONS WITH SUCCESSIONS DEFINITION5.4 If
Let (j 1 , h, ... , iJ) beapermutationoftheset{1, 2, ... , n}.
ir+l
=
ir + 1,
1~ r
~
n - 1,
then the pair Ur, ir+ 1 ) is called a succession of the permutation. Example5.5 Consider the permutations (]I, h, h, j 4 ) of the set { 1, 2, 3, 4}. These 24 permutations can be classified according to their successions as follows.
5.4. PERMUTATIONS WITH SUCCESSIONS
177
(a) The permutations with the no succession are the following 11: (1, 3, 2, 4), (1, 4, 3, 2), (2, 1, 4, 3), (2, 4, 1, 3), (2, 4, 3, 1), (3, 1, 4, 2), (3,2,1,4), (3,2,4,1), (4,1,3,2), (4,2,1,3), (4,3,2,1).
(b) The permutations with one succession are the following 9: (1,2,4,3), (3,1,2,4), (4,3,1,2), (2,3,4,1), (4,2,3,1), (1, 4, 2, 3), (3, 4, 2, 1), (1, 3, 4, 2), (2, 1, 3, 4).
(c) The permutations with two successions are the following 3: (2,3,4,1), (3,4,1,2), (4,1,2,3).
(d) The permutation (1,2,3,4)
is the only permutation with three successions.
0
The next theorem is concerned with the number of permutations without a succession. THEOREM5.5 The number Sn of permutations of the set { 1, 2, ... , n} without a succession is equal to
n-t Sn = (n - 1)! _L) -1) k n
~k
(5.7)
k=O
and satisfies the recurrence relation
nSn
= (n 2 -1)Sn-t- (-1)n, n = 2,3, ...
, S1
= 1.
(5.8)
PROOF Consider the set fl of the permutations (j 1 , }2, . .. , Jn) of the set { 1, 2, ... , n} and let Ar be the set of these permutations for which the pair Ur, Jr+d is a succession, r = 1, 2, ... , n-1. Then the number Sn of permutations of the set {1, 2, ... , n} without a succession is given by Sn = N(A~ A~··· A~_ 1 ). Further, the sets A1 , A 2 , ••• , An- 1 are exchangeable and vo
= N(fl) = n!,
vk
= N(Ai,Ai
2 •
··AiJ
= (n-
k)!, k
= 1,2, ...
,n -1.
Indeed, in the case where the set of indices {it, i 2 , ••• , ik}, with 1 ~ it < i 2 < · · · < ik ~ n, consists of consecutive integers, ir = i + r - 1, r = 1, 2, ... , k, 1 :S i ~ n- k, the k successions constitute a run p = (ji, ji+ 1 , ... , Ji+d· Thus,
178
PERMUTATIONS WITH FIXED POINTS AND SUCCESSIONS
the remaining n - k + 1 integers {h, h, ... , ii-1, ii+k+1, ... , in}. along with the run p, constitute a set of n - k elements and the number N (Ai, Ai 2 • • • Aik) equals (n - k) !, the number of permutations of this set. If the set of indices I= {i 1,i 2, ... ,ik}, with 1 :::; i 1 < i 2 < · · · < ik :::; n, does not consist of consecutive integers, then it is partitioned in 8 subsets 11 , 12 , ... , Is. where I c. with N (Ic) = me. c = 1, 2, ... , 8, is either a one-point set or a set of consecutive integers and m 1 + m 2 + · · · + m 8 = k. In this case, the k successions constitute 8 runs, P1, p2, ... , p 8 , of consecutive integers, which are formed by ( m1 + 1) + (m 2 + 1) + · · · + (ms + 1) = k + 8 integers. Thus the remaining n- k- 8 integers along with the 8 runs constitute a set of n - k elements and the number N (Ai, Ai 2 • • • Aik) is equal to (n - k) !, the number of permutations of this set. Therefore, according to Corollary 4.3, the number Sn of permutations of the set { 1, 2, ... , n} without a succession is
Further, multiplying both members of the identity
n(n-k)
k!
=
(n+1)(n-k-1) 1 1 k! + k! + (k- 1)!
by ( -1)k(n- 1)! and summing fork = 0, 1, ... , n- 1, we get the expression 1 2 nn- k nn- k- 1 n(n-1)!L(-1)k~=(n 2 -1)(n-2)!L(-1)k k! +(-1)n- 1 ,
k=O
k=O
which, by virtue of(5.7), implies (5.8).
I
REMARK 5.4 The number Sn can be expressed in terms of the number Dr. of r-subfactorial. Indeed, rewriting expression (5.7) as n-1
Sn = n(n- 1)!
L
(-l)k
~- (n- 1)!
k=O n
=
( -1) k
n-1
L
k=1
( - 1)k (k _ )!
1
n- 1 ( - 1)J
n!L ~ +(n-1)!L -,.,J k=O
j=O
and, using (5.1), we get the relation Sn = Dn + Dn-1• n = 1, 2, ... , which, combined with the recurrence relation (5.3), yields for Sn the recurrence relation
Sn = (n- 1)Sn-I + (n- 2)Sn-2, n = 3, 4, ... , S1 = S2 = 1.
(5.9)
Using either of the recurrence relations (5.8) or (5.9), a table of the numbers Sn can be constructed. Table 5.4 gives the numbers Sn for n = 1, 2, ... , 10. I
5.4. PERMUTATIONS WITH SUCCESSIONS
Table 5.4
179
The Numbers Sn 2
3 3
4 11
5 53
6 509
8 16687
7 2119
9 148329
10 1468457
The next theorem is concerned with the number of permutations with a given number of successions.
THEOREM5.6 The number Sn,k of permutations of the set { 1, 2, ... , n} with k successions is equal to
_ (n-1)!n~l(- )in-k-j _ (n-1)s S n,kk! ~ 1 '! k n-k· j=O
(5.10)
J
PROOF Consider the set fl of the permutations (jt, j 2 , ••• , in) of the set { 1, 2, ... , n} and let Ar be the set of these permutations for which the pair Ur, ir+I) is a succession, r = 1, 2, ... , n - 1. Then the number Sn,k equals the number of elements of the set fl, which are contained ink among the n- 1 sets A 1 , A2 , ... , An-I· As it was shown in the proof of Theorem 5.5, the sets At, A2, ... , An-I are exchangeable and
Vo
= N(fl) = n!,
Vr
= N(Ai, Ai2 · · · Ai.) = (n- r)!,
r
= 1, 2, ...
, n- 1.
Thus, according to Corollary 4.4, the number Sn,k is given by
Sn,k =
(n ~
1)
n~l (-1)j (n-; -1)(n- k- j)!
(n-1)!n~l(- 1 )in-k-j k!
~
j=O
'!
= (n-1)s
k
J
with the last equality implied by virtue of (5.7).
.
n-k,
I
Using (5.10), Table 5.4 of the numbers Sn and Table 2.1 of binomial coefficients, a table of succession numbers Sn,k can be constructed. Table 5.5 gives the numbers Sn,k for k = 1, 2, ... , n- 1, n = 2, 3, ... , 10.
PERMUTATIONS WITH FIXED POINTS AND SUCCESSIONS
180
Table 5.5
k n 2 3 4 5 6 7 8 9 10
Succession Numbers Sn,k
1
2
3
1 2 I 9 3 18 44 265 110 1854 795 14833 6489 59332 133496 1334961 600732
4
1 4 I 30 5 220 45 1855 385 17304 3710 177996 38934
5
6
7
8 9
1 6 1 63 1 7 616 84 8 1 6678 924 108 9
1
Example 5.6 Caravan in the desert A caravan of n camels travels across a desert in a journey that lasts for several days. The camel-drivers find it boring to see the same camel in front of them every day. The calculation of the number of permutations of the camels so that the next day each camel follows a different camel is then of interest. For this purpose, let us consider the initial order of the camels and number them from I to n. Then the required number is equal to the number of permutations of the set { 1, 2, ... , n} that do not include any ofthe n- 1 pairs: ( 1, 2), (2, 3), ... , (n- 1, n). According to Theorem 5.5, this number equals
Sn
= (n-
n-1
(
1)! L:)-1)k n ~!
k)l ·.
k=O
If, more generally, the interest is in the number of permutations of the n camels so that the next day each of k camels follows the same camel, then, according to Theorem 5.6, this number equals _
S . = (n n,k
1
n-k-1
1). "" (- )in kl ~ 1 .
j=O
_
_
k .1
.
J.
D
J.
5.5
CIRCULAR PERMUTATIONS WITH SUCCESSIONS Consider the positive integers 1, 2, ... , n displayed on a circle (h, h, ... ,
in), where i1
follows in· Thus a circularly ordered permutation, called a cir-
5.5.
CIRCULAR PERMUTATIONS WITH SUCCESSIONS
181
cular permutation of the set {1, 2, ... , n }, is formed. Note that, to each circular permutation (it, i 2 , . . . , in), there correspond n linear permutations (il, i2, .. · ,in), (h, iJ, ... , in, i!), ... , (in,il, ... , in-d and so the number of circular permutations of the set {1, 2, ... , n} is equal to n!/n = (n- 1)!. In the case of the circular permutations of the set { 1, 2, ... , n}, in addition to the pairs (1, 2), (2, 3), ... , (n- 1, n), the pair (n, 1) is also a succession. The next theorem is concerned with the number of circular permutations without a succession. THEOREM5.7 The numberCn of circularpennutations of the set {1, 2, ... , n} without a succession equals n-1
(_
1)k Cn = n! ( ; (n- k)k!
+ (-1t.
(5.11)
PROOF Consider the set D of the circular permutations (i 1 , h, ... ,in) of the set { 1, 2, ... , n} and let Ar be the subset, of fl, of circular permutations in which the pair Ur, ir+I) constitutes a succession, r = 1, 2, ... , n- 1. In addition let An be the subset, of D, of circular permutations in which the pair (in, it) constitutes a succession. Then the number Cn of circular permutations of the set {1, 2, ... , n} without a succession is given by Cn = N(A~ A~··· A~). Further, the sets At, A 2 , •.• , An are exchangeable and
vo Vk
= N(fl) = (n-
1)!,
= N(A; 1 A; 2 ···A;k) = (n- k -1)!, k = 1,2, ... ,n -1.
Indeed, as in the proof of Theorem 5.5, the cases in which the indices it, i 2 , •.• , ik are or are not consecutive integers are separately examined. In both cases, the number N(A; 1 A; 2 • • • A;k) is reduced to the number (n- k- 1)!, of circular permutation of n - k distinct elements. Also
which is the only circular permutation, ( 1, 2, ... , n), belonging in all n sets. Thus, by virtue of Corollary 4.3, the number Cn is given by Cn
= ~(-1)k (~) (n- k -1)! + (-1)n n-1
= n!
(_
1)k
2: (n- k)k! + (-1t,
k=O
which is the required formula.
I
182
PERMUTATIONS WITH FIXED POINTS AND SUCCESSIONS
REMARK 5.5
The number Cn can be expressed in terms of the number Dr, of r-subfactorial. Indeed, rewriting expression (5 .11) as
n-1 _ )'"(- )dn-k)+k Cn -( n 1. 1 (n _ k)k!
6
+ (- 1)n
_ n-1 (- 1)k n-1 (- 1)k n - (n- 1)! {; ~ + (n- 1)! {; (n- k)(k- 1)! + (-1)
=(n-1)!~(-1)k -{(n-1)!~ (-1)i .. +(-1)n-1} ~ k! ~(n-1-J)J! k=O
J=O
and, using (5.1), we get
Cn+Cn-I=Dn-1, n=3,4, ....
(5.12)
Writing this relation in the form
and summing for k = 3, 4, ... , n, it follows that
n L(-1)n-kck k=3
n
n
+ L(-1)n-kck-1 = L(-1)n-kDk-1· k=3
The left-hand side of this relation is equal to Cn
k=3
+ (-1 )n- 3 C 2 and, since C2
= 0,
n
Cn=L(-1)n-kDk-1, n=3,4, .... k=3 Furthermore, note that (5.12), by using recurrence relations (5.2) and (5.3), yields the recurrence relations:
Cn = (n- 2)Cn-1 + (n- 1)Cn-2 + (-1)n- 1, n = 4, 5, ... , with
(5.13)
c2 = 0, c3 = 1, and Cn = (n- 3)Cn-1 + 2(n- 2)Cn-2 + (n- 2)Cn-3• n = 5, 6, ... , (5.14)
with C2 = 0, C3 = 1, C4 = 1. Using either of these recurrence relations, a table of the numbers Cn can be constructed. Table 5.6 gives the numbers Cn for n = 2, 3, ... , 12. I
5.5.
183
CIRCULAR PERMUTATIONS WITH SUCCESSIONS
Table 5.6 2 0
3
4 1
The Numbers Cn 5 8
6 36
7 229
8 1625
9 13208
10 120288
11 1214673
12 13469897
THEOREM5.8 The number Cn,k of circular pennutations of the set { 1, 2, ... , n} with k successions equals
Cn,k
n! {n-k-1 j;
= k!
(-1)i (n _ k _ j)j!
+
(-l)n-k} (n _ k)!
=
(n)
k Cn-k·
(5.15)
PROOF Consider the set fl of the circular permutations of the set { 1, 2, ... , n} and the n exchangeable sets A 1 , A 2 , ... , An, subsets of fl, defined in the proof of Theorem 5.7. Then, the number Cn,k equals the number of elements of n that are contained in k among the n subsets. Since v0 Vr
= N(Ai 1 A; 2
· ·
= N(fl) = (n-
1)!,
·A;J = (n- r -1)!, k = 1,2, ... ,n -1,
Vn = N(AI A2 ···An)= 1, it follows from Corollary 4.4 that
c•.• ~
mr~\-1)1
("
~ k) (n- k- j -1)! + (-!)·-·}
n! {n-k-1 (-1)i (-1)n-k} (n) {; (nj)j! + (n- k)! =
= k!
k-
with the last equality implied by virtue of (5.11 ).
k Cn-k,
I
Example 5. 7 A round-table conference Consider n representatives participating in a round-table conference scheduled to continue for several days. It is decided that every day they sit around the table so that each has to his right a different person. At their first seating, let us number the n representatives from I ton in the ordinary direction (counterclockwise), starting from any one of them. The problem of their second seating is reduced to the
184
PERMUTATIONS WITH FIXED POINTS AND SUCCESSIONS
calculation of the circular permutations of the set { 1, 2, ... , n} that do not include any of then pairs: (1, 2), (2, 3), ... , (n- 1, n), (n, 1). According to Theorem 5.7, this number is n-1
Cn = n!
L
( - 1)k
(n- k)k! + (-1)n.
k=O
More generally, if the interest is on the number of ways of creating a second seating of the n representatives so that k of them have to their right the same person, then this number, according to Theorem 5.8, equals
n!{n-k-1 (- 1)i Cn,k = k!
~
(-l)n-k}
(n- k- j)j! + (n- k)!
D ·
5.6 BIBLIOGRAPHIC NOTES The famous problem of coincidences (matches, recontres) was initially treated in the particular case of 13 cards by P. R. Montmort (1708) and J. Bernoulli (1714). Abraham De Moivre (1718) examined the general case of n cards by using the inclusion and exclusion principle. L. Euler (1751) derived a recurrence relation for the number of derangements. W. A. Whitworth (1867), in his book on the combinatorics of the games of chance, studied the matching problem and contributed to its popularization. P. MacMahon (1902, 1915, 1916) provided a generating function of the number of arrangements of the n cards with k matches. The number of permutations of a given rank has been examined by M. Frechet (1945) and J. Riordan (1958). Generalizations and applications of the matching problem have been discussed by several authors; the interested reader is referred to the bibliography furnished in the review article of D. E. Barton (1958). The two sections on the enumeration of the linear and circular permutations by successions were inspired by the problem of the caravan in the desert posed and solved by N.Y. Vilenkin (1971).
5. 7
EXERCISES 1. Let Dn be the n-subfactorial. Show that
IDn-n!e- 1 1<1/(n+1), n=1,2, ...
5. 7. EXERCISES
185
and thus conclude, for large n, the asymptotic expression
2. Let Dn,k be the number of permutations ofthe set {1, 2, ... , n} with k fixed points. Show that (a)
Dn,k = nDn-1,k
+ (-l)n-k(~)
and (b)
Dn k = Dn-1 k-1 1
)
+ (n-
1){Dn-1 k + Dn-2 k- Dn-2 k-1}· )
I
I
3. Let Rn,k be the rank number and Dr r-subfactorial. Show that
n-k
Rn,k
=L
(n
~ k)vk+r-1,
= 1,2, ... , n.
k
r=O 4. Let Rn,k be the rank number and
Rn
n+1
n+1
k=1
k=1
= L Rn,k, En=
L
kRn,k·
Using the recurrence relation
Rn,k
= Rn,k-1- Rn-1,k-1,
k
= 1, 2, ... , n,
with Rn, 1 = (n- 1)!, Rn,n = Dn-1, Rn,n+1 = Dn, show that
Rn-1 = (n- 1)!, En-! = n!- Dn, n = 1, 2, .... 5. Show that the rank number Rn,k satisfies the recurrence relation
Rn,k = (n- k)Rn-1,k
+ (k-
1)Rn-1,k-1,
fork= 2, 3, ... , n- 1, n = 3, 4, .... 6. Let En,r be the number of permutations of the set {1, 2, ... , n} without a fixed point in r predetermined positions. Show that
En,r
=
t( j=O
-1) 1
(~) (n- j)!. J
PERMUTATIONS WITH FIXED POINTS AND SUCCESSIONS
186
Derive the recurrence relations
= En,r-l - En-l,r-1, r = 1, 2, ... , n, En,o = n!, = (n- r)En-l,r + rEn-l,r-1, r = 1, 2, ... ,n -1,
En,r En,T
En,n n
= Dn,
= 2, 3, ....
and, if Rn,k is the rank number, conclude that
7. (Continuation). Let En,r,k be the number of permutations of the set { 1, 2, ... , n} with k fixed points in r predetermined positions. Show that
and conclude that En,r,l
= rRn,r·
8. (Continuation). Show that En,r,k
= (n- k)En-1,r,k + (k + 1)En-l,k+l·
9. (Continuation). Show that
where Dn is the n-subfactorial and, using the recurrence relation
conclude that En,r,k = (n- r)En-1,r,k
+ rEn-1,r-1,k·
10. Double coincidences. Let Qn be the number of ways of placing n letters and n invoices in n envelopes, one letter and one invoice in each, so that no envelope contains its corresponding letter and invoice. Show that
Qn
=
1
~(- 1 )n (n- k)!
n.~ k=O
k!
.
11. (Continuation). Show that Qn
= n 2 Qn-l + n(n- 1)Qn-2 + (-l)n, n = 2, 3, ... , Qo = 1,
Q1
= 0.
5. 7. EXERCISES
187
12. (Continuation). Let Qn,k be the number of ways of placing n letters and n invoices in n envelopes, one letter and one invoice in each, so that each of k envelopes contains its corresponding letter and invoice. Show that
)J(n-k-j)! Q n,k = n!~(k! L.....i 1 ., . J
j=O
13. Multiple coincidences. Consider r urns, each containing n balls numbered from 1 to n. Assume that a ball is drawn from each urn and, without replacement, this multiple drawing is repeated until all the balls are drawn. The drawing of the j-th ball from each of the urns at the j-th r-tuple trial constitutes an r-tuple coincidence. (a) Let Bn,r be the number of r-tuple drawings without an r-tuple coincidence. Show that
Bn,r =
i)
-l)n-j
(~) (jW. J
j=O
(b) If Bn,r,k is the number of r-tuple drawings with k r-tuple coincidences, show that
Bn,r,k =
(~)Bn-k,r·
14. (Continuation). Show that the number Bn,r satisfies the relations
Bn,r
( = n n-1 ~(-1)n-s- 1 n~
_ ~ Bn,r~( -1) n-s-1 (n -S
1) (sJt(s+ l)r1) (s.) (s + 1) 1
r
r
1
+ (-1)n,
- Bn-1,r
and proving that
n-s-1
L
j=O
. ( n-s-1 ) (-1)1 . j!S(k,j;n-j)=(s+1)k, J
where
S(k,j;u) =
~ t(-1)i- 1 (~)(i+u)k,
J. i=O
~
conclude the recurrence relations T
Bn,r = L(n)jS(r- 1,j- 1; n- j j=1
+ 1)Bn-j,r + (-1)n,
188
PERMUTATIONS WITH FIXED POINTS AND SUCCESSIONS n+1
Bn,r = (nr- 1)Bn-l,r + L(n- 1)j-tS(r,j- 1; n- j
+ 1)Bn-j,r·
j=2
The number S(k,j; u) is called non-central Stirling number of the second kind. 15. A generalization of the problem of coincidences. Consider an urn containing s like series of balls with n balls, numbered from 1 to n, in each series. Assume that all the sn balls are drawn one after the other without replacement. (a) Let Gn,s be the number of drawings without a coincidence. Show that Gn,s
=
f)
-1)j
(~) sj (sn- j)!. J
j=O
(b) If Gn,k,s is the number of drawings with k coincidences, show that
16. (Continuation). Assume that the successive drawing of balls is terminated with the appearance of the first coincidence. If H n,k,s is the number of drawings with a given duration of k trials, show that Hn,k,s =
k-1 . (k- 1) . L( -1)1 . s1+
1
(sn- j - 1)!.
J
j=O
17. Let Sn,k be the number of permutations of the set {1, 2, ... , n} with k successions. Show that Sn+l,k = (k
for k = 1, 2, ... , n, n k ?:n.
+ 1)Sn,k+l + (n-
= 2, 3, ... ,
with St,o
k)Sn,k
=
+ Sn,k-1,
1, Sn,n-1
=
1, Sn,k
= 0,
18. Let Cn,k be the number of circular permutations of the set {1, 2, ... , n} with k successions. Show that Cn,k
+ Cn-l,k
- Cn-l,k-1
= Dn-l,k,
where Dn,k is the coincidence number, and conclude that Cn,k = (n- 2)Cn-1,k
+ Cn-l,k-1 + (n-
+(n - 1)Cn-2,k-l
+
1)Cn-2,k 1 (-1)n-k- 1 ( n ~ ).
5. 7. EXERCISES
189
19. Permutations with a given number of transpositions. A permutation can always be represented as a product of circular permutations. A circular permutation of length 2 is called a transposition. Let Tn,k be the number of permutations of the set {1, 2, ... , n} which can be written as a product of k transpositions. Show that
Tn,k
=
n!(-1)k
m-k
k! 2 k
L
j=O
(-1)i
----uJ•
m
J
= [n/2].
20. (Continuation). Show that Tzr,k = 2rTzr-l,k
+ (-1 )
r
(2r)! k!(r _ k)! 2 k,
and Tzr+I,k
= (2r + 1)Tzr,k·
Chapter6 GENERATING FUNCTIONS
6.1
INTRODUCTION
The generating functions constitute an important means for a unified treatment of combinatorial and probabilistic problems. P. S. Laplace, their inventor, has first introduced them in the form of power series. Later, generating functions of a more general than the power series form have been used. Moreover, for their combinatorial uses, they are to be regarded, following E. T. Bell, as tools in the study of an algebra of sequences; thus, despite all appearances they belong to algebra and not to analysis. A generating function expanded generates a sequence of numbers ak,
k
= 0, 1, ... , the coefficients of the expansion, which in combinatorics ex-
press the number of elements of a certain finite set. In this respect its study is a natural complement to the study of these numbers. In the next section, a justification of the use of generating functions in the derivation of the number of elements of certain finite sets is provided by a brief presentation of two simple combinatorial problems preceding the formal definitions. After introducing the basic forms of generating functions, several examples illustrating their use are discussed. Also, the general form of a generating function is introduced and exemplified. In order to facilitate the derivation and expansion of generating functions, the Maclaurin, Newton and Lagrange series are briefly discussed. A general method for constructing generating functions for combinations and permutations is presented and illustrated in a separate section. The factorial moments of a sequence ak, k = 0, 1, ... , of combinatorial numbers (or probabilities or masses) are closely connected with the general term of the inclusion and exclusion formula, which is one of the basic counting expressions. The inclusion of a section on the moment generating functions is thus justified. In ending this chapter, bivariate and multivariate generating functions are examined.
GENERATING FUNCTIONS
192
6.2 6.2.1
UNIVARIATE GENERATING FUNCTIONS Definitions and basic properties
Before proceeding to the formal definition and study of generating functions, let us examine two simple combinatorial problems that suggest the use of a certain form of generating functions. The first problem is concerned with the derivation of the number of k-combinations of n. Let us consider first three elements labelled x 1 , x 2 and x 3 and form the algebraic product
which, after executing the multiplication and arranging the terms in ascending powers oft, is equal to
Introducing the elementary symmetric functions with respect to the three variables x 1 , x 2 and x3,
it follows that
3
3
i=!
k=O
IT (1 + x;t) = L ak(x
1,
x 2 , x 3 )tk.
Note that the function ak = ak(x 1 , x 2 , x 3 ), k = 1, 2, 3, which is the coefficient of tk, contains one term for each k-combination of the three elements. Hence, the number C(3, k) of the k-combinations of 3 is given by the value of ak = ak(x 1 , x2, x 3 ) at the point (1, 1, 1), that is, C(3, k) =
= 1, i
and so, setting x;
ak(1,
1, 1),
0, 1, 2, 3,
= 1, 2, 3, we conclude that 3
(1
k =
+ t) 3 = L
3
ak(1,
k=O
1, 1)tk
=L
C(3, k)tk.
k=O
Similarly, in the case of n distinct elements labelled x 1 , x 2 , ... tain n
IT (1 + i=l
, Xn,
we ob-
n
x;t) =
L k=O
ak(X!, x2, ... , Xn)tk,
(6.1)
6.2. UNIVARIATE GENERATING FUNCTIONS
193
with ak = ak(x 1, x 2 , •.. , xn), k = 0, 1, ... , n, the elementary symmetric functions, with respect to then variables x 1,x 2 , ... ,xn, which are defined by the sum ak=ak(XI,X2, ... ,xn)=LXi 1 Xi 2 ···Xik, k=O,l, ... ,n,
(6.2)
where the summation is extended over all k-element subsets {i 1,i 2 , ... ,ik} of the set of n indices {1, 2, ... , n }. It is clear that the symmetric function ak ( x 1, x 2 , ••• , xn) contains one term for each k-combination of n. Hence the number C(n, k) of the k-combinations of n is given by the value of ak(x1,x 2 , ... ,xn) at the point (1,1, ... ,1), C(n,k)=ak(1,1, ... ,1), k=0,1, ... ,n. Consequently, setting in (6.1) Xi= 1, i = 1, 2, ... , n, we conclude that n
n
k=O
k=O
(6.3)
The function A(t) = (1 + t)n, which generates, in the sense of (6.3), the sequence of the numbers C(n, k) = ak(1, 1, ... , 1), k = 0, 1, ... , n, may be called enumerating generating function of combinations of n distinct elements. Let us now examine, from the same viewpoint, the problem of the derivation of the number of the k-permutations of n. Since the products x 1x 2 and x 2 x 1 are not distinguished in the usual algebraic product, it is not possible to define a function analogous to (6.2) containing one term for each k-permutation of n and, consequently, it is impossible to define a function similar to (6.1). Nevertheless, an enumerating generating function of the number P(n, k) of the k-permutations of n is easy to find. Indeed, from (6.3), on using the relation C(n, k) = P(n, k)/k!, it follows that (1
+ t)n
n tk = LP(n, k) k!. k=O
(6.4)
The function E(t) = (1 + t)n, which generates, in the sense of (6.4), the sequence of the number P(n, k), k = 0, 1, ... , n, may be called enumerating generating function of permutations of n distinct elements. The preceding discussion of the enumerating generating functions for combinations and permutations suggests the study of the following generating functions.
DEFINITION 6.1 sum
Let ak, k
=
0, 1, ... , be a sequence of real numbers. The 00
A(t)
=
Laktk k=O
(6.5)
GENERATING FUNCTIONS
194
is called (ordinary) generating function, while the sum CXl tk E(t) = Lak k!
(6.6)
k=O
is called exponential generating function of the sequence ako k = 0, 1, ....
The existence of the generating functions A(t) and E(t) requires the absolute convergence of the corresponding series for t 0 < t < t 1 , with t 0 and t 1 real numbers. The algebra of the corresponding sequences of the (ordinary) generating functions is known as Cauchy algebra and of the exponential generating functions is known as Blissard or symbolic calculus. It is not necessary to burden this presentation of the generating functions with formal definitions and study of the relative algebras. Note only that the equality of two generating functions entails the equality of the coefficients of the powers oft of the same degree. The operations of summation and multiplication, as well as differentiation and integration with respect to t, of the generating functions can be used to derive relations between the corresponding coefficients. In order to clarify this, let us consider the generating functions CXl
CXl
CXl
A(t)=Laktk, B(t)=Lbktk, C(t)=Lcktk. k=O
k=O
k=O
A direct consequence of the equality of generating functions in the following pairs of relations is that the one relation entails the other: (a) Sum C(t)
= A(t) + B(t)
iff Ck
= ak + bk,
k
= 0, 1,....
(6.7)
k
= 0, 1,....
(6.8)
(b) Product k
C(t)
= A(t)B(t)
iff Ck
= Laibk-j, j=O
Note that relations (6. 7) and (6.8) define the sum and the product of sequences in Cauchy algebra. The sequence ck, k = 0, 1, ... , defined by (6.8) is called convolution of the sequences ak, k = 0, 1, ... , and bkl k = 0, 1,.. . . Several applications of the product of generating functions (6.8) may be obtained by specifying one or two of the generating functions. Such an application is given in the following example. Example 6.1 Sum of terms of an arithmetic progression The sum Sk = 1 + 2 + · · · + k, k = 1, 2, ...
6.2. UNIVARIATE GENERATING FUNCTIONS
195
may be evaluated by using (6.8) as follows. Note first that this sum is of the form
where Co
= 0,
= 1 + 2 + · · · + k, k = 1, 2, ... , = k, bk = 1, k = 0, 1, ....
Ck := Sk ak
Thus, according to (6.8),
= A(t)~(t)
C(t)
=
and the evaluation of the sum Sk Ck of an arithmetic progression reduces to the derivation of the generating functions A(t) and ~(t). By the geometric series, it follows that
~(t)
00
00
k=O
k=O
= 2:)ktk = 2:: tk = (1- t)- 1, It I < 1.
In order to evaluate the generating function 00
00
k=O
k=1
L aktk = L ktk,
A(t) = we differentiate the relation 00
L:tk k=O
= (1- t)-1
and get 00
2:: ktk-1 = (1- t)-2. k=1
Therefore, 00
A(t) = t
L ktk- 1 = t(1- t)-
2
k=1
and
C(t)
= A(t)~(t) = t(1- t)- 3.
The generating function C(t), on using Newton's negative binomial formula (see Theorem 3.4), with n = 3, is expanded into powers oft as
GENERATING FUNCTIONS
196
Thus
k(k+ I) 2
k = 1,2, ....
0
Example 6.2 The Catalan numbers Consider a product of n numbers in a specified order, y = x 1 x 2 · · · Xn, and let Cn be the number of ways of evaluating this product by successive multiplication of exactly two numbers at each step and without altering the initial order. Note that c2 = 1 : X}X2, c3 = 2 : X} (x2x3), (xlx2)XJ, c4 = 5 : x1 (x2(x3x4)), x1 ((x2x3)x4), (x1x2)(x3x4), (x1 (x2x3))x4, ((x1x2)x3)X4. In order to determine a recurrence relation for the numbers Cn, n = 2, 3, ... , note that the last multiplication, with which the evaluation of the product is completed, is y = YkYn-ko where Yk is the result of the product X1X2 · · · Xk and Yn-k is the result of the product Xk+l xk+ 2 · · · Xn, with k = 1, 2, ... , n - 1. The number of ways of evaluating the product Yk = x1 x 2 · · · xk is C k. while the number of ways of evaluating the product Yn-k = xk+1Xk+2 · · · Xn is Cn-ko k = 1, 2, ... , n- 1. According to the multiplication principle, the number of ways of evaluating the products Yk and Yn-k is CkCn-k. k = 1, 2, ... , n - 1. Thus, by the addition principle, the total number Cn of ways of evaluating the product y is equal to Cn
= C1Cn-1
+ C2Cn-2 + · · · + Cn-lCl,
n = 2, 3, ....
C£, which, by virtue of C2 = 1,
In the particular case of n = 2, it holds C2 = entails cl = 1 and so the initial conditions are
Using the recurrence relation and the initial conditions, we construct Table 6.1 of Catalan numbers Cn for n = 1, 2, ... , 12.
Table 6.1 2
Catalan Numbers 3
4
2 5
5 14
6 42
7 132
8 429
9 1430
10 4862
II 16796
12 58786
In order to determine the generating function 00
C(t) =
L
Cntn,
n=l note that the right-hand side of the recurrence relation is the convolution of the sequence an = Cn+l• n = 0, 1, ... with itself bn = Cn+h n = 0, 1, .... Thus,
6.2.
UNIVARIATE GENERATING FUNCTIONS
197
multiplying the recurrence relation by tn and summing for n = 2, 3, ... , by virtue of (6.8), we get
and so
C(t)- t = [C(t)) 2 . Therefore [C(t)) 2 and CI(t) = Since C(O)
1
-
C(t)
2 (1- v'l=4t)'
+t =
C2(t) =
0 1
2 (1 + v'l=4t).
= 0, the solution C 2(t) is rejected because C 2(0) = 1 and so C(t)
= 21 (1- v'J=4t).
This generating function, on using Newton's general binomial formula (see Theorem 3.6), is expanded into powers oft as
Therefore
Cn
= (-1)n-122n-l (1/2) n
= 1 · 3 · · · (2n- 3) n!
= (- 1)n-1 22n-1 (1/2)n
n!
. n-l . 2 · 4 · · · (2n- 2) 2 2·4·(2n-2)
=
(2n- 2)! n!(n-1)!
and
1 (2nCn = ;;: n _ l2) , n = 1, 2, ....
D
Let us now consider the exponential generating functions 00 tk 00 tk E(t) = Lak k!' F(t) = Lbk k!' G(t) k=O k=O
00
tk
= Lck k!" k=O
In this case we have (a) Sum
G(t) = E(t)
+ F(t)
iff Ck = ak
+ bk.
k = 0, 1,... .
(6.9)
GENERATING FUNCTIONS
198
(b) Product k
G(t)
= E(t)F(t)
iff Ck
= L (~)aibk-j, j=O
k
= 0, 1, ....
(6.10)
J
Note that (6.9) is the same as its corresponding relation (6. 7) for the ordinary generating functions, while (6.10) differs from its corresponding relation (6.8) through the presence of the binomial coefficients. This difference suggests a basic device of the symbolic calculus, which may informally be presented as follows. The subscripts of a sequence ak, k = 0, 1, ... , are replaced by exponents transforming it into the sequence ak, k = 0, 1, .... Then ak is treated as an ordinary power (with a0 not necessarily equal to 1 and a1 not necessarily equal to a) until symbolic formulae are transformed back into ordinary formulae by transforming ak, k = 0, 1, ... , into ak, k = 0, 1, .... A reminder of such a transformation, of the form ak ak, should accompany a symbolic formula. Thus, with this device, the second relation of (6.10) is written as
=
ck=(a+b)k, ai:aj, br:br
(6.11)
and the exponential generating functions take the form
E(t) =eat, ak
=ak,
F(t)
= ebt,
bk
=bk, G(t) = ect, ck =Ck
and the first relation of (6.10) becomes
Expanding its first and last members and equating the coefficients of tk, (6.11) is deduced. Note that the derivative of E(t) =eat, ak ak, with respect tot, gives
=
d ( ) dt E t
= ae at ,
ak
= ak.
-
This expression, expanded into powers oft, takes the ordinary form
d oo tk oo tk oo tk oo r-1 - " ' kI - " ' k+1 -k1 -- " ' - " ' -dt E(t) -a ~a ~a ~ak+1-kl~ar( k. . . r _ 1) 1. • k=O k=O k=O r=1 Applications of the symbolic calculus are given in the following examples.
Example 6.3 Exponential Bell numbers Let
6.2. UNIVARIATE GENERATING FUNCTIONS
199
and
F(t)
= exp{E(t)- E(O)}.
(6.12)
The numbers bk. k = 0, 1, ... , the exponential generating function of which is connected with the generating function of the numbers, ak. k = 0, 1, ... , by the exponential relation (6.12) are called exponential Bell numbers. The derivation of a recurrence relation for the numbers bk, k = 0, 1, ... , can be efficiently carried out by using the symbolic calculus as follows. The defining relation (6.12) is written symbolically as ebt -- exp(eat - a o, ) bk = - bk.
Differentiating it with respect to t, we get bebt = aeatexp(eat- ao) = aeatebt = ae
= bk,
ar
= ar.
Expanding the first and last member of this relation into powers oft, k
00
k
00
L....- bk+l tk! -_ " L....-' a (a+ b) k tk!, bk
"' k=O
_ = bk,
a
= ar,
r -
k=O
and equating the coefficients of tk / k! in both sides, we conclude that k
bk+l =a( a+ b)k =
L j=O
and bk+I =
t
(~) aj+! bk-j,
bk
=
bk, ar
=
ar
J
(~)aj+lbk-j, k = 0, 1, ... , J
j=O
which is the required recurrence relation. In the particular case of ak = 1, k 0, 1, ... , b0 = 1, we have bk+!
=
t (~)bk-j, j=O
k
= 0, 1, ...
, b0
=
= 1.
J
The Bell numbers bk. k = 0, 1, ... , in this particular case, express the number of partitions of a finite set of k elements (see Exercise 2.42). 0
Example 6.4 Exponential generating function of subfactorials Let Dn be the number of permutations (j 1 , h, ... , in) of the set { 1, 2, ... , n} without a fixed point, that is, Jr =/; r, r = 1, 2, ... , n. Dn is n-subfactorial (see Section 5.2). Let us determine the exponential generating function
GENERATING FUNCTIONS
200
Note that the n-subfactorial Dn is connected with the coincidence number Dn,k by the relation (see Theorem 5.3)
Dn,k=
(~)Dn-k,
k=0,1, ...
,n,
n=0,1, ....
Consequently,
and if
then
Therefore But
n
Pn
= L Dn,k = n!,
oo
P(t)
k=O
tn
oo
= L Pn n! = L tn = (1- t)- 1 n=O
n=O
and so
The ordinary and the exponential generating functions are particular classes of the following general form of a generating function. DEFINITION 6.2 Let ak, k = 0, 1, ... , be a sequence of real numbers and 9k(t), k = 0, 1, ... , be a sequence of linearly independent real .functions. The sum 00
G(t)
=L
ak9k(t)
(6.13)
k=O is called generating function of the sequence ak, k = 0, 1, ... , with respect to the sequence 9k(t), k = 0, 1, ....
The existence of the generating function G(t) requires the absolute convergence of the series for to < t < t 1 , with t 0 and t 1 real numbers. The
6.2. UNIVARIATE GENERATING FUNCTIONS
201
assumption of the linear independence of the sequence gk(t), k = 0, 1, ... assures the uniqueness of the definition of a generating function. The general form (6.13) of a generating function directly refers to algebra where it belongs. The most frequently used sequences of linearly independent functions in combinatorics and probability theory are gk (t) = tk, k = 0, 1, ... and gk(t) = tk jk!, k = 0, 1, ... , which correspond to the ordinary and the exponential generating functions, respectively. The sequences Yk(t) = (t)k, k = 0, 1, ... and gk(t) = (!), k = 0, 1, ... are also widely used. Their use requires particular names for the corresponding generating functions. Specifically, the following definitions, which are particular cases of Definition 6.2, are introduced. DEFINITION 6.3 sum
Let ak, k = 0, 1, ... , be a sequence of real numbers. The
00
F(t) =
L ak(t)k
(6.14)
k=O
is called factorial generating function, while the sum
B(t)=~akG)
(6.15)
is called binomial generating function of the sequence ako k
= 0, 1, ....
Example 6.5 Stirling numbers of the second kind Let S(n, k), k = 0, 1, ... , n, be the number of partitions of a finite set of n elements into k subsets. Determine the factorial generating function n
Yn(t) =
L S(n, k)(t)k. k=O
Note first that, to each partition { A 1 , A 2 , ... , Ak} of a finite set W n of n elements into k subsets, there correspond k! divisions (A}!, Ah, ... , AJk) of Wn into k nonempty subsets, which are obtained from it by permuting the k sets in all possible ways. Hence W(n, k) = k!S(n, k) is the number of divisions of a finite set of n elements into k nonempty subsets. Further, the number of divisions of a finite set of n elements into r subsets among which k are nonempty is given by (see Example 4.9)
(~)W(n,k) = (r)kS(n,k),
k
= 0,1, ...
,r, r
= 0, 1, ...
,n,
GENERATING FUNCTIONS
202
while, by Corollary 3.3, the total number of divisions of a finite set of n elements into r subsets equals rn. Consequently, by the addition principle, n
L S(n, k)(r)k = rn. k=O Since this formula is an identity for all r = 0, 1, ... , n, it follows that n
9n(t) =
L S(n, k)(t)k = tn k=O
holds for all real numbers t. The numbers S(n, k) are called Stirling numbers of the second kind. D
6.2.2 Power, factorial and Lagrange series The derivation of certain generating functions is facilitated by the use of some well-known expansions of functions. Every function expanded into a power or a factorial series can be considered as a generating function. The Maclaurin, Newton and Lagrange series are presented (without proof) in this section. Maclaurin power series (6.16)
Note that, with
ak =
[:,~kkf(t)L=o'
k=0,1, ... ,
(6.16) is of the form (6.5), 00
f(t) =
L aktk,
(6.17)
k=O while for
bk
= [:tkk f(t)L=O,
k
= o, 1, ... ,
(6.16) is of the form (6.6), (6.18)
6.2. UNIVARIATE GENERATING FUNCTIONS
203
Example6.6 Let us consider the function f(t) = et. Its derivatives are
dk t t dtk e = e , k = 0, 1, .... Thus bk
dk ] = [ dket
t
= 1,
k
= 0, 1, ...
t=O
and, by (6.18), we find the expansion of the exponential function:
The derivatives of the function f(t)
dk dtk { -log(1- t)}
= -log(1- t) are
= (k- 1)!(1- t)-k,
k
= 1, 2, ....
Thus
ao ak =
= f(O) = -log1 = 0,
[~!:tkk{-log(1-t)}L=o = ~'
k= 1,2, ...
and, by (6.17), we get the expansion of the logarithm: 00
-log(1- t) =
L
tk
k"
k=I
Setting u = -t, this expansion can also be written as k
00
log(1
+ u) =
L( -1)k-I uk . k=I
The derivatives of the function
dk dtk (1
f (t)
= ( 1 + t )X are
+ ty~: = (x)k(1 + t)k-x,
Thus
ak
=
x] 1 dk ( [ k! dtk 1 + t) t=O
(x)k = kl =
k
= 0, 1, ....
(X)
k ' k
and, by (6.17), we deduce the general binomial formula:
= 0, 1, ...
GENERATING FUNCTIONS
204
Example 6.7 Stirling numbers of the first kind Expanding the factorial oft of degree n, (t)n. into a Maclaurin's series and putting s(n, k) =
[~! !kk (t)n L=o,
k = 0, 1, ... , n,
we get n
(t)n = L
s(n, k)tk.
k=O
The coefficients s(n, k) are called Stirling numbers of the first kind. Note that the sequence s(n, k), k = 0, 1, ... , n, for fixed n, has generating function gn(t) = (t)n· D
Newton factorial series
where Llk f(t) denotes the difference of order k of the function f(t). Note that, with
ak =
[~!Llkf(t)L=o'
k=0,1, ... ,
(6.19) is of the form (6.14), ()()
(6.20)
f(t) = Lak(t)k. k=O
Setting
bk = [Llk j(t)]t=O, k = 0, 1, · ·. , (6.19) is of the form (6.15), (6.21)
Example 6.8 Let us consider the function f(t) = ( u is a fixed real number. Then
Ll(u
+ t)n
= (u
+ t)n, where n
+ t + 1)n- (u + t)n
is a positive integer and u
= n(u
+ t)n-1
6.2. UNIVARIATE GENERATING FUNCTIONS
205
and, in general,
.1k(u + t)n Thus
ak =
= (n)k(u + t)n-k,
k
= 0, 1, ....
[~! Llk(u + t)n L=O = (~) (u)n-k,
k = 0, 1, ...
and so, from (6.20), we deduce Vandermonde's formula:
+ t)n
(u
=
~ (~) (u)n-k(t)k.
D
Lagrange series The Lagrange series appears in two basic forms: 00
t(t) = t(o)
dk-1 (
d
+ :L: dtk-1 gk(t) d/(t) [
)]
uk t=O
k=1
/J' u =
t -(t) g
(6.22)
and
d ) f(t) ( 1- u-d g(t) t
00
-l
=L
k=O
[
dk ] k -dk (l(t)f(t)) uk', u t t=O .
t = -(). (6.23) gt
Note that these two series constitute a basic means for the solution of equations of implicit form and for the inversion of series. They are also used as generating functions with variables defined implicitly. More specifically, with
G(t) = f(t) ( 1- g!t)
!g(t))
-I
I
bk = [!kk (l(t)f(t))] t=O,
(6.22) and (6.23) take the forms 00
00
k=O
k=O
which are of the general form, (6.13), of a generating function. Some interesting applications of such generating functions are given in the following examples. Example 6.9 Abel's formula Let g(t) = ezt and f(t) =ext. Then from (6.22) and since
GENERATING FUNCTIONS
206
dk- (kg (t) d/(t) d )] [dtk-1 1
dk-1
t=O
= [ --xe<x+kz)t dtk-1
we deduce the expansion
=L
:! , k
00
ext
x(x
+ kz)k-l
k=O
u
]
= x(x
+ kz)k-l
t=O
= te-zt.
'
(6.24)
Similarly, from (6.23), we get (6.25) The coefficients in (6.24),
_ x(x + kz)k- 1 k A k (x, z ) k! ' = 0, 1, ... ' are called Abel polynomials. Expanding both members of the identity
into powers of u = te-zt, using (6.24), we get
~ A.(x + y,z)u" ~ (t. A,(x,z)u') (~ A;(y,z)u') =
~ {~ Ak(x, z)An-k(Y, z)} un
and, consequently, n
An(x
+ y, z) = L Ak(x, z)An_k(y, z). k=O
Further, consider the identity
e<x+w)t
ewt
1 - zt
1 - zt
....,...--- = ext--
and expand both its members into powers of u = te-zt, using (6.24) and (6.25). We get the relation
6.2. UNIVARIATE GENERATING FUNCTIONS
207
which, according to (6.10), implies Abel's formula:
Putting y = w
+ nz, we find the expression (x +y)n =
t
(~)x(x + kz)k-l(y- kz)n-k.
k=O
Note that Newton's binomial formula is a particular case of Abel's formula, corresponding to z = 0. 0
Example 6.10 Gould's formula Let f(t) = (1 + t)x and g(t) = (1 + t)Z. Then from (6.22) and since
= _ x (x+kz), x+kz
k
we deduce the expansion
Similarly, from (6.23), we get
(1 + w+l = Loo (X+ kz)uk, 1 + t- zt k
U
= t(1 + t)-z.
(6.27)
k=O
The coefficients in (6.26),
G (
k x, z
) = _x_ (x
x + kz
+ kz) k
= x(x
+ kzk!
1)k-I
'
k
= 0, 1, ... '
are called Gould polynomials. Expanding both members of the identity
into powers of u = t( 1 + t)- z, using (6.26), we get the relation
GENERATING FUNCTIONS
208
which, according to (6.8), implies n
Gn(x
+ y, z) = L Gk(x, z)Gn_k(y, z). k=O
Expanding both members of the identity
+ t)'~:+w+l
+ t)w+I
-'-----------'--- = (1 + w-'---------'-(1
1 + t - zt
into powers of u = t(1
(1
1 + t - zt
+ t) -z, using (6.26) and (6.27), we get the relation
which, according to (6.1 0), implies Gould's formula:
(x
+ w + nz)n
=
t (~)x(x
+ kz- 1)k-dw + nz- kz)n-k·
k=O
Putting y = w
+ nz, it yields
(x+y)n
=
t
G)x(x+kz-1)k-I(y-kz)n-k·
k=O
Note that Vandermonde's formula is a particular case of Gould's formula, correD sponding to z = 0.
6.3
COMBINATIONS AND PERMUTATIONS
Let us consider a finite set Wn = {w1,w2,··· ,wn} and the set Ck(Wn) of the k-combinations of n and attach the indicator Xj to the element Wj, j = 1, 2, ... , n. Then the homogeneous product of order k, x~ 1 2 • • • x~", with ri 2: 0, j = 1, 2, ... , n, and r 1 + r 2 + · · · + rn = k, uniquely determines the k-combination of n, {a 1 , a 2 , ... , ak}, ai E Wn, j = 1, 2, ... , k, in which ri 2: 0 elements are Wj, j = 1, 2, ... , n, with r 1 + r 2 + · · ·+ rn = k. Further, the homogeneous product sum
x;
(6.28) where the summation is extended over all ri 2: 0, j = 1, 2, ... , n, such that r 1 + r 2 + · · · + rn = k, exhibits all k-combinations of n. The advantage
6.3. COMBINATIONS AND PERMUTATIONS
209
of this correspondence is that the homogeneous product sum (6.28) can be obtained algebraically. Specifically, oo
n
II (1 +
Xjt
+ x]t2 + · · ·) = :~:::>k(Xl, X2, ... , Xn)tk.
(6.29)
k=O
j=l
Indeed, if the operations are executed by selecting the term tr; from the j-th factor of the product and forming the product tr 1F 2 · .. tr" = tr1 +r2+··+rn, with r 1+r2 + · ·+r n = k, the k-th power oft, tk, is turned up with coefficient equal to the sum of the homogeneous products of order k, x~ 1 x; 2 • • • x~", extended over all rj 2: 0, j = 1, 2, ... , n, such that r 1 + r 2 + · · · + rn = k. Note that, in the j-th factor of the product in (6.29), (6.30)
x?
the term tr; indicates that the element Wj may appear in any combination rj times, rj = 0, 1, .... Moreover, any restrictions on the appearance of any elements of Wn modify the factors (6.30) accordingly. Thus, if the element Wj is allowed to appear in any combination at least mj and at most nj times, then (6.30) becomes (6.31)
for j = 1, 2, ... , n and expression (6.29) is modified accordingly. Putting Xj = 1, j = 1, 2, ... , n in the resulting expression, the generating function of the number of k-combinations of n is deduced. Note that, in the particular case of k-combinations of n (without repetitions), the homogeneous product sum of order k, (6.28), coincides with the elementary symmetric function of order k, (6.2), since rj = 1 for k indices, {i 1, i 2, ... , ik}, out of the n indices {1, 2, ... , n }, and rj = 0 for the remaining n- k indices, {1,2, ... ,n}- {i 1,i 2, ... ,ik}· Also, the factor (6.31) reduces to (1 + Xjt) and expression (6.29), modified accordingly, coincides with (6.1). Since the ordinary multiplication is commutative, whence x 1 x 2 and x 2 x 1 are not distinguishable, it is not possible to construct a function exhibiting all permutations of the set Pk(Wn), of the k-permutations of n. For this reason, to the homogeneous product of order k, x~ 1 x; 2 • • • x~", with rj 2: 0, i = 1, 2, ... , n, and r 1 + r 2 + · · · + rn = k, in addition to the k-permutation ofn, (a1,a2, ... ,ak), aj E Wn, j = 1,2, ... ,k, in which the first n 2:0 elements are w1 , the next r 2 2: 0 elements are w2 and finally the last rn 2: 0 elements are Wn, there correspond all its permutations, which (including the initial), according to Theorem 2.4, are equal to k!
I I I, k = r1 + r2 + · · · + r1.r2. · · · rn·
Tn·
GENERATING FUNCTIONS
210
In consequence, to the set Pk(Wn) of the k-permutations of n, we correspond the sum
9k(XI,X2,···,xn)=L
1 x~ 1 X~2 ···x~n,k=0,1, ... ,(6.32)
~!
1 T).T2· · · ·Tn.
where the summation is extended over all r 1 2 0, j = 1, 2, ... , n, such that
r 1 + r 2 + · · · + rn = k. This sum, according to the multinomial Theorem 3.7, equals
9k(XI,X2,··· ,xn) =(xi +x2 + ··· +xn)k and may be obtained algebraically as follows: (6.33)
since
~ xktk- xt ~ k! -e . k=O
Moreover, any restrictions on the appearance of any elements in permutations of Wn modify accordingly the corresponding factors,
x2t2
E(t,xj)=1+x1t+ ~! +···, j=1,2, ... ,n,
(6.34)
of the product in (6.33). Thus, if the element Wj is allowed to appear in any permutation at least m 1 and at most n 1 times, then (6.34) becomes
Em;,n; (t, Xj)
=
x'J'itmi m1!
xm;+ltm;+l
+
J
(mi
+ 1)!
xnitni
+ ... +
_J_ _
ni!
'
(6.35)
for j = 1, 2, ... , n and expression (6.33) is modified accordingly. Putting Xj = 1, j = 1, 2, ... , n in the resulting expression, the exponential generating function of the number of k-permutations of n is deduced.
Example 6.11 Combinations with repetition The generating function of the number of k-combinations of n with (unrestricted) repetition may be obtained as follows. The enumerator of the appearance of the j-th element in any combination, since it is allowed to appear Tj times, with r1 = 0, 1, ... , is A0 (t,x 1 ) = 1 + x 1t + x]t2 + · · · = (1- x 1t)- 1 , j = 1, 2, ... ,n.
Therefore, the enumerator of k-combinations of n is given by
IT Ao(t,xj) = n(l- Xjt)n
j=l
n
j=l
oo
1
= Lhk(XJ,X2,· .. k=O
,xn)tk,
6.3. COMBINATIONS AND PERMUTATIONS
211
which, with x 1 = 1, j = 1, 2, ... , n, yields the generating function of the number of k-combinations of n with repetition:
The coefficient of tk, E(n,k)
= (n+~- 1 ),
gives the number of k-combinations of n with repetition (see Theorem 2.7).
D
Example 6.12 In the case of k-combinations of n with repetition, in which every element appears at least once, the enumerator of the appearance of the j-th element, since it is allowed to appear Tj times, with r1 = 1, 2, ... , is A 1 (t, Xj)
= Xjt + x]t2 + · · · = Xjt(1- Xjt)- 1 ,
j
= 1, 2, ... , n.
The generating function of the number of k-combinations of n with repetition, in which every element appears at least once, is deduced from n
n
II A1 (t, Xj) = II Xjt(1j=1
Xjt)-
1,
j=1
by setting x 1 = 1, j = 1, 2, ... , n. Expanding the resulting generating function into powers oft, we get
A1(t)
= tn(l- t)-n = ~(-1r (-rn)tr+n = ~ (n + ~ -1)tr+n =
f: (~ =~) f: (~ =~) tk =
k=n
tk.
k=n
Therefore, the number of k-combinations of n with repetitions, in which every element appears at least once, is zero for k < n and
-1)
k ( n-1 fork 2: n.
D
Example 6.13 Combinations with limited repetition The generating function of the number of k-combinations of n with repetition and the restriction that each element appears, at most, s times is deduced from the
GENERATING FUNCTIONS
212
enumerator: n
n
II (1 + Xjt + x]t 2 + · · · + xjt") = II (1- xj+ t•+l )(1- x 1t)- 1, 1
j=l
by putting xi = 1, j
j=l
= 1, 2, ... , n. Thus, An,s(t) = (1- t"+I)n(1- t)-n.
The determination of the number E.(n, k), of k-combinations of n with repetition and the restriction that each element appears, at most, s times requires the expansion of the generating function into powers oft,
Note that, in the case k ::; s, the first factor of this product in addition to the first term, which is equal to 1, contains powers of t of order greater than k. Consequently, the coefficient of tk is equal to the coefficient of this power in the second factor of the product, that is, E.(n,k)
= ( n + kk-
1)
, k::; s.
In the case of k 2: s + 1, the term tk is formed by multiplying the term tr(•+t) of the first factor with the term tk-r(s+I) of the second factor. Consequently, the coefficient of tk is equal to the sum of the product of the coefficients of tr(•+I) from the first factor and the coefficients of tk-r(s+l) from the second factor, for r = 0, 1, ... , n, whence
The next two particular cases are worth noticing. For s
An,l (t)
= (1 + tt =
t (~) k=O
and so
while, for s -+ oo, we have
tk,
= 1 we have
213
6.3. COMBINATIONS AND PERMUTATIONS
and so
D Example 6.14 Permutations with repetition The generating function of the number of k-permutations of n with (unrestricted) repetition is deduced from the function n
(
II
x2t2 1 +x·t+ - 1-2! ]
+ ... )
,
j=l
by putting xi = 1, j = 1, 2, ... , n. Hence, we get
Expanding it into powers oft, k
00
" k t Eo ( t ) = e nt = " L...n k! ,
k=O
we conclude the number of k-permutations of n with repetition equals U(n,k)=nk.
D
Example 6.15 The generating function of the number of k-permutations of n, with repetition, in which every element appears at least once, is deduced from the function n
II
( X
]·t +
) 3 -x2t2 2! + " ·
,
j=l
by setting Xj = 1, j = 1, 2, ... , n. Expanding the resulting generating function into powers of t, we find
E(t) 1
= (t
+ ~~ + ... )
= ~(-l)n-r(~)
= (et
-1)n
=
~(-1)n-r(~)ert
~rk~~ = ~ {~(-lt-r(~)rk} ~-
Therefore, the number of k-permutations of n, with repetition, in which every element appears at least once, is given by
GENERATING FUNCTIONS
214
D
where S(k, n) is the Stirling number of the second kind.
Example 6.16 Permutations with limited repetition The generating function of the number of k-permutations of the set Wn = {w 1 ,w2 , ... ,wn}. with repetition, in which the element Wj is allowed to appear at most ki times, j = 1, 2, ... , n, where k1 + k2 + · · · + kn = r ;:::: k, is deduced from the function n
II
j=1
by setting xi
(
xk; tk;)
x2t2
1 1+x·t+-+ .. ·+-11 2! k ! J
= 1, j = 1, 2, ... , n. Then we get the expression F(t)
=II n
(
1+t
j=1
t2 tk;) ++ ... +2! k·! J
'
which, after executing the multiplication and arranging the terms in ascending order of powers oft, takes the form
r
F(t)
=L
tk U(k1, k2, ... , kn; k) k! ·
k=O
The coefficient of tk / k! is the number of k-permutations of n with repetition, in which the j-th element is allowed to appear at most kj times, j = 1, 2, ... , n. In the particular case of k = r, the number U(k 1, k2, ... , kn; r) M(k1, k2, ... , kn) of r-permutations of n with repetitions, in which the j-th element is allowed to appear at most kj times, j = 1, 2, ... , n, where k1 + k 2 + · · ·+ kn = r, equals
=
M(k1, k2, ... , kn)
r!
= k 1·'k 2·1 ••• k n·1, r = k1 + k2 + · · · + kn,
since the coefficient oftr = tk 1 +k 2 + ·+kn is equal to the product
1 1 1 k1! k2! ... kn!
1
where 1/ k1 ! is the coefficient of the last term tk; of the j-th factor of the generating function F(t), j = 1, 2, ... , n. In the general case, it similarly follows that
where the summation is extended overall 8J = 0, 1, ... , k 1 , j = 1, 2, ... , n, such that 81 + 82 + · · · + 8n = k. 0
6.4. MOMENT GENERATING FUNCTIONS
6.4
215
MOMENT GENERATING FUNCTIONS
Let us consider a sequence of real numbers ak> k = 0, 1,.... In combinatorics, the general term ak of such a sequence, usually, expresses a combinatorial number. Also, in probability theory and, in particular, when the total probability is concentrated at discrete points, such a sequence of probabilities defines a probability (density) function. In mechanics and particularly when the total mass is concentrated at discrete points, such a sequence of masses defines a density mass function. Among the characteristics of the sequence ak, k = 0,1, ... of special interest are its moments defined as follows. The (power) moment of order r of the sequence ak, k = 0, 1, ... , denoted by J.L~, is defined by ()()
J.L~=Lkrak, r=0,1, ... ,
(6.36)
k=O
while the factorial moment of order r of the same sequence, denoted by f.L( r), is defined by ()()
f.L(r)
= L(k)rak, r
= 0, 1, ....
(6.37)
k=O
It should be noted that the absolute convergence of the series (6.36) and (6.37) is an essential requirement for the existence of the moments J.L~ and J.L(r)· Note, also, that the factorial moment of order r, J.L(r)• is closely connected with the binomial moment of order r, b(r)• which is defined by (6.38)
whence b(r) = f.L(r)/r!, r = 0, 1, .... REMARK 6.1 The moments J.L~, J.L(r) and b(r) are particular cases of the weighted moment of order r, mr. defined by ()()
mr = L
Cr(k)ak, r = 0, 1, ... ,
k=O
where, for fixed r, cr(k), k = 0, 1, ... , is a sequence of weights. When ak, J.L~ = J.L( 1) is the mean and k = 0, 1, . . . is a sequence of probabilities, J.L
=
GENERATING FUNCTIONS
216
a2
= p,~ - p,'? = I-L( 2 )
-
/-L(I) -
1-Lfl) is the variance; when it is a sequence of
masses, p, is the center of gravity and a 2 is the moment of inertia.
I
The calculation of the moments p,~, 1-L(r) and b(r)• r = 0, 1, ... , when the sequence ak, k = 0, 1, ... , is known and vice versa, is facilitated by using suitable generating functions. Such generating functions are the moment generating function, defined by (6.39)
and the binomial or factorial moment generating function, defined by (6.40)
These generating functions are connected with the ordinary generating functions of the sequence ak. k = 0, 1, ... , 00
A(t) = I>ktk.
(6.41)
k=O
Indeed, from (6.36) and (6.37), we have
and, using (6.41) with e1 instead oft, we get M(t) = A(e 1 ), A(u) = M(log u),
(6.42)
while, from (6.39) and (6.40), we find
and so B(t)
= A(1 + t),
A(u)
= B(u- 1).
(6.43)
From (6.42) and (6.43) it follows that M(t)
= B(et- 1),
B(t)
= M(log(1 + t)).
(6.44)
6.4. MOMENT GENERATING FUNCTIONS
217
Expanding the second of (6.43) into powers of u, using (6.40) and (6.41), we get
and thus 1 oo (-1y-k
= k! L
(r- k)! f..L(r)· r=k Introducing the binomial moments b(r) = f..L(r)/r!, r = 0, 1, 2, ... , this expression takes the form ak
Note that the last expression is similar to (4.14), which expresses the number Nn,k, k = 0, 1, ... , n, of elements that are contained in k among n subsets, A1 , A2 , •.• , An, of a finite set D, in terms of the numbers Sn,r = L: N(Ai, Ai2 • • • AiJ, r = 0, 1, ... , n, where the summation is extended over all r-combinations, {h,i 2 , ... ,ir}, of then indices {1,2, ... ,n}. Example 6.17 Let us determine the factorial moments f..L(r)• r = 0, 1, ... , of the sequence of geometric probabilities Pk = pqk, k = 0, 1, ... , where 0 < p < 1 and q = 1 - p. The probability generating function, on using the geometric series, is obtained as 00
00
A(t) = LPktk = p L(qt)k = _P_, 1 - qt k=O k=O
ltl < 1/q.
Therefore, by the first of (6.43), the factorial moment generating function is given by 1
B(t) = 1 _ (qfp)t'
ltl < pfq
which, expanded into powers oft, B(t)
=
1
00
= "'(qjp)rtr, 1- (qfp)t ~
by virtue of (6.40), yields f..L(r)
= r!(qfpY,
r
= 0, 1,... .
0
218
GENERATING FUNCTIONS
Example 6.18 Let us determine the sequence of probabilities Pk, k moments
=
b(r)
(;)pr,
r
= 0, 1, ... , with binomial
= 0, 1, ... ,
where 0 < p < 1 and n is a positive integer. The binomial moment generating function, on using Newton's binomial formula, is obtained as
Consequently, by virtue of the second of (6.43), the generating function of the sequence Pk· k = 0, 1, ... , is given by
and so
Example 6.19 Let us consider the number Nn,k. k = 0, 1, ... , n, of elements that are contained ink among n subsets A1 , A2 , •.. , An. of a finite set fl, and
where the summation is extended over all r-combinations {i 1 , i 2 , ... , ir} of the n indices {1, 2, ... , n}. Then, according to (4.14) and (4.20),
Consequently, Sn,r• r = 0, 1, ... , n, is the sequence of binomial moments of the sequence Nn,k, k = 0, 1, ... , n. Thus, if n
Nn(t)
=L
n
Nn,ktk, Sn(t)
k=O
= L Sn,rtr,
(6.45)
r=O
then, according to (6.43), Sn(t) = Nn(t
+ 1),
Nn(t) = Sn(t- 1).
(6.46)
219
6.5. MULTIVARIATE GENERATING FUNCTIONS
In the particular case with D the set of permutations (il, h, ... , in) of { 1, 2, ... , n} and As the subsets of these permutations for which the point j s is a fixed point, s = 1, 2, ... , n, we have
.
Nnk = Dnk, Snr ' '
= n!fr!,
where Dn,k is the coincidence number (see Section 5.2). The generating function n
L Dn,ktk,
Dn(t) =
k=O according to (6.45) and (6.46), is written as n
Dn(t) =
L
I
n; (t-It. r. r=O
Differentiating it we get the relation
Also, we find
Dn(t) = nDn-dt)
+ (t- l)n.
These relations imply the recurrence relations:
kDn,k = nDn-I,k-1 and
respectively.
6.5
0
MULTIVARIATE GENERATING FUNCTIONS
The notion of a generating function can be extended to cover the case of a double-index and, more generally, a multi-index sequence. Specifically, the following definitions are introduced.
DEFINITION 6.4
Let an,k> k
= 0, 1, ... , n = 0, 1, ...
be a sequence of real
numbers. The sum 00
A(t, u) =
L
00
L:::an,ktkun n=Ok=O
(6.47)
GENERATING FUNCTIONS
220
is called (ordinary) generating function, while the sum oo tk un L::an,k k! n! n=Ok=O oo
L
E(t, u) =
is called exponential generating function of the sequence an,k· k n = 0,1, ....
(6.48)
= 0, 1, ... ,
It should be noted that the absolute convergence of the series (6.47) and (6.48) is required for the existence of the corresponding generating functions. REMARK 6.2 cases of
Both generating functions A(t, u) and E(t, u) are particular 00
G(t, u) =
00
L L an,dk(t)gn(u),
(6.49)
n=Ok=O where the functions fk(t), k = 0, 1, ... , as well as the functions 9n(u), n = 0, 1, ... , are linearly independent and so (6.49) is uniquely defined. It is worth noting that, with 00
Fn(t)
= L an,kfk(t),
00
Gk(u)
= L an,k9n(u), n=O
k=O (6.49) may be written in the form 00
G(t, u)
= L Gk(u)fk(t), k=O
or in the form 00
G(t, u)
=L
Fn(t)gn(u).
n=O Note that the last two expressions are of the general form (6.13) of a generating function. With this remark, the study of generating functions of double-index sequences is reduced to the previous study of generating functions of single-index sequences. In the particular case of triangular double-index sequences an,k· k = 0, 1, ... , n = 0, 1, ... , for which an,k = 0 for k > n, it is more convenient to use the generating function (6.50)
6.5. MULTIVARIATE GENERATING FUNCTIONS
221
In an analogous way, a multivariate generating function G (t 1 , t 2 , ... , tr) of a multi-index sequence ak,,k 2 , ... ,kr• k; = 0, 1, ... , i = 1, 2, ... , r, may be introduced and studied. I Example 6.20 Let us consider the double-index sequence: an,k=
(~),
k=0,1, ...
,n,
n=0,1, ....
For fixed n, using Newton's binomial formula, the ordinary generating function of this sequence is readily deduced as
Consequently, the bivariate generating function of the double-index sequence an,k. k = 0, 1, ... , n, n = 0, 1, ... , is obtained as n
oo
00
n=O
n=Ok=O 00
= L)(l + t)u]n = [1- (1 + t)ut 1 • n=O
Since the considered double-index sequence is triangular, its generating function of the form (6.50) is derived as
The exponential generating function of the same sequence is quite involved and thus not of any interest. D Example 6.21 Consider the coincidence number (see Theorem 5.3),
D
- n! n-k (-1)i
n,k - k!
L J..
. j=O
1
,
k
= 0, 1, ... , n,
n
= 0, 1, ...
.
222
GENERATING FUNCTIONS
For fixed n, the generating function of this sequence is (see Example 6.19), n
Dn(t)
=L
k
Dn,kt
k=O
n
= n! L
(t-It r!
r=O
Then, the bivariate generating function oo
D(t, u) =
n
n
L L Dn,ktk ~! ,
n=Dk=O is obtained as
D(t,u) =
f r=O
[u(t~ lW r.
0
fun-r = (1- u)-1eu(t-1). n=r
Example 6.22 Let us consider the multi-index sequence , C(n,k1,k2, ... ,kr-1)=(k k n k ) - k 1 n! 1, 2, · · ·, r-1 1·k2! .. · kr-1!kr.1
ki = 0, 1, ... ,n,i = 1,2, ... ,r-l,kr = n-(k1+k2+·· ·+kr_!),n = 0, 1, .... For fixed n, the multivariate generating function of this sequence, on using the multinomial formula (see Theorem 3.7), is obtained as An(t1,t2, ... ,tr-d=L(k k n k )t~ 1 t~ 2 1' 2, · · • , r-1 = (1 + t1 + t2 + · · · + tr_I)n.
···t~:_J. 1
Consequently,
A(h,t2, ... ,tr-1,u)=E'L:(k k n k n=O 1 , 2, · · · , r-1
)t~ 1 t~2 ···t~:_-11 un
00
= L[(l n=O
+ t1 + t2 + · · · + tr-dut
= ~ [(1
+ t1 + t2 + · · · + tr_I)u]n
and
~
n! n=O = e(l+fl+h+··+tr-du. Other bivariate generating functions are discussed in the exercises.
0
6.6. BIBLIOGRAPHIC NOTES
6.6
223
BIBLIOGRAPHIC NOTES
The roots of generating functions may be traced in the work of Abraham De Moivre (1718). Also, generating functions were used by L. Euler (1746) in his study on the partitions of integers. The development of the theory of generating functions arose in conjunction with the calculus of probability. P. S. Laplace (1812) devoted half of his book to a systematic and complete treatment of generating functions and especially the moment generating functions; he is considered the inventor of the method of generating functions. P. MacMahon (1915, 1916) extensively used enumerating generating functions in his treatise on combinatorial analysis. The basic elements of the symbolic calculus included in this chapter are based on the paper of E. T. Bell (1940) and the book of J. Riordan (1958). The exponential Bell numbers were examined in E. T. Bell (1934a,b). Abel's generalization of Newton's binomial formula first appeared in N. H. Abel (1826) and Gould's generalization of Vandermonde's formula was derived in H. W. Gould (1956). An illuminating historical coverage of the use of generating functions in probability theory is given by H. L. Seal (1949). A wealth of information can be found in the survey article on generating function by R. P. Stanley (1978).
6.7
EXERCISES
1. Construct a generating function for the number ak of k-combinations of the set W5 = {W1, W2, ... , W5}, with repetition, in which the element W1 appears at least once, each of the elements w 2 , W3 and w4 appears at least twice and the element w 5 may appear without any restriction. Expanding the generating function, deduce the number ak, k = 7, 8, .... 2. Suppose that three distinguishable dice are rolled. Construct a generating function of the number ak of possible results in which the sum of the three numbers equals k. Derive the numbers a 9 and a 10 (see Exercise 2.11). 3. Consider ten urns, each containing five numbered balls. The balls of each of the first five urns bear the even integers {0, 2, 4, 6, 8}, while the balls of each of the other five urns bear the odd integers { 1, 3, 5, 7, 9}. Assume that one ball is drawn from each of the urns. Construct a generating function for the number ak of drawings in which the sum of the two numbers equals k. Derive the numbers a 7 , a 9 and a 11 •
GENERATING FUNCTIONS
224
4. Consider a collection of 52 cards of four different kinds with 13 cards like from each kind. Construct a generating function for the number ak of different sub-collections of k cards. Expanding it, deduce the numbers a 13 and a26·
5. Suppose that five letters {h, l2, ... , l 5 } from an alphabet are given. Construct a generating function for the number of k-letter words that can be formed (a) without repeated letters and (b) without any restriction. 6. Calculate the number of k-permutations of the set {0, 1, ... , 9} in which (a) each of the digits 0 and 5 appears an odd number of times and (b) each of the digits 0 and 5 appears zero or an even number of times, using suitable generating functions. 7. Calculate the number of k-permutations of the set {0, 1, ... , 9} (a) with zero or an even number of Os and odd number of 5s and (b) in which the total number of Os and 5s is zero or even. 8. In the quaternary number system each number is represented by an ordered sequence of the digits from the set {0, 1, 2, 3}. Using suitable generating functions, calculate the number of k-digit quaternary sequences in which (a) each of the digits 1 and 3 appears an even number of times and (b) the total number of appearance of the digits 1 and 3 is an even number. 9. Let T(n, k) be the number of k-combinations of n with repetition and the restriction that each element may appear at most two times. For fixed n, construct a generating function for the sequence T(n, k), k = 0, 1, ... , and derive the expressions
and
10. (Continuation). Show that
T(n, k) = T(n- 1, k)
+ T(n-
1, k- 1)
+ T(n-
1, k- 2),
for k = 2, 3, ... , 2n and n = 1, 2, ... , with initial conditions
T(n, 0)
= 1,
T(n, 1)
= n,
= 0,
k > 2n.
+ 2nT(n-
1, k- 2),
T(n, k)
11. (Continuation). Show that
kT(n, k) = nT(n- 1, k- 1)
6. 7. EXERCISES
for k
= 2, 3, ...
225
, 2n, n
= 1, 2, ... , and
k(k- 1)T(n, k) = 2n(2n- 1)T(n- 1, k- 2) for k
= 2, 3, ...
, 2n and n
T(n, 0)
= 1,
+ 3n(n- 1)T(n- 2, k-
2),
= 2, 3, ... , with initial conditions T(n, 1)
= n,
= 0,
T(n, k)
k > 2n.
=
12. (Continuation). Let Tn T(n, n) be the number of n-combinations of n with repetition and the restriction that each element may appear, at most, twice. Show that
nTn- (2n- 1)Tn-1- 3(n -1)Tn-2 and
= 0,
n
= 2,3, ...
, To= T1
=1
00
T(t) = LTntn = (1 - 2t- 3t 2 )- 1 f 2 . n=O
13*. (Continuation). From the generating function
2n Tn(t) = LT(n, k)tk k=O
and using Lagrange formula, 1
00
~
[dn n ] un dtn f(t)g (t) t=O · n!
deduce that
= f(t)
(
dg(t))1- u---;[t ,u
t
= g(t),
00
T(u)
= LTnun = (1- 2u- 3u 2 )- 112 . n=O
14. (Continuation). Let A(n, r, k) be the number of k-combinations of with repetition and the restriction that each of n specified elements may appear at most twice, while each of the other r elements may appear at most once. For fixed n and r, construct a generating function for the sequence A(n, r, k), k = 0, 1, ... , and derive the expressions
n
+r
""' (n) (n + J)
[k/2]
A(n, r, k) = ~ ]=0
.
. J
k _r - . 2J
and k
A(n,r,k) =
~ (:)r(n,k-i).
,
GENERATING FUNCTIONS
226
15. Let G(n, k) be the number of k-combinations of n with repetition and the restriction that each element appears zero or an even number of times. For fixed n, construct a generating function for the sequence G(n, k), k = 0, 1, ... and, expanding it, show that
1 G(n,2j)=(n+;- ), j=0,1, ... , G(n,2j+1)=0, j=0,1, .... 16. Let H (n, k) be the number of k-combinations of n with repetition and the restriction that each element appears an odd number of times. For fixed n, construct a generating function for the sequence H(n, k), k = 0, 1, .... If n = 2r, conclude that
= (r ~ j -
H(2r, 2j)
J-r
1 ), j
= r, r + 1, ... ,
H(2r, 2j) = 0, j = 0, 1, ... , r- 1, H(2r, 2j + 1) = 0, j = 0, 1, ... ,
while if n = 2r + 1, conclude that H(2r + 1, 2j + 1) =
(~ + j),
j = r, r + 1, ... ,
J-T
H(2r+1,2j+1)=0, j=0,1, ... ,r-1, H(2r+1,2j)=O, j=0,1, .... 17. Let B(n, k; s) be the number of k-combinations of the set Wn+I = {wo, w1 , ... , Wn} with repetition and the restriction that the element wo may appear at most s times and each of the other elements at most once. Using a suitable generating function, show that
B(n,k;s)
=
f::
j=O
(k: .), m = min{k,s} J
and
B(n,k;s)-B(n,k-1;s)=(n)-(
k
with B(n, 0; s) = B(n, n
n
k-s-1
),
+ s; s) = 1.
18. Let E 8 (n, k) be the number of k-combinations of n with repetition and the restriction that each element may appear at most s times. Using a suitable generating function, show that
E 8 (n, k) = E 8 (n- 1, k) + E 8 (n- 1, k- 1) + · · · + E 8 (n- 1, k- s), k 2::: s, Es(n, k) = (n + ~- ), k 5: s. 1
6. 7. EXERCISES
227
19. (Continuation). Showthat k
L Es(r,j)E.(n- r, k- j) = E (n, k), 8
j=O
and k
L
(~)Es-I(n-j,k-n+j) =E (n,k),
m=max{O,n-k}.
8
J
J=m
20. Let Pn be the (total) number of permutations of n: n
Pn = L(n)k, n = 0, 1, ... . k=O
Show that
and Pn = nPn-1
+ 1,
n = 1, 2, ... , Po= 1.
21. Let A(n, k) be the number of k-permutations of n with repetition and the restriction that each element appears zero or an even number of times. Using a suitable generating function, show that
A(n, 2s)
=Tnt(~) (n- 2j) 28 , j=O
and, for A1 (r,s) = A(2r
A(n, 2s
+ 1)
= 0, s = 0, 1, ...
J
+ 1,2s),
A2(r,s) = A(2r,2s), that
A 1 (r, s) = (2r + 1){(2r + 1)A 1 (r, s- 1)- 2r AI(r- 1, s- 1)}, A2(r,s) = 2r{2rA 2(r,s -1)- (2r -1)A2(r -1,s -1)}. 22. Let B(n, k) be the number of k-permutations of n with repetition and the restriction that each element appears an odd number of times. Using a suitable generating function, show that
B(2r, 2s) = 2- 2(r-s)+l
i)
2 -1)j ( :) (r- j) 28 , J
j=O
B(2r, 2s + 1)
= 0,
228
GENERATING FUNCTIONS
and
B(2r
+ 1, 2s + 1) =
T
2 (r-s)+l
i)
2 -1)j ( r
+ 1, 2s) =
23. (Continuation). For B 1 (r,s) B(2r, 2s), show that
B 1 (r, s) = (2r
(r- 2j
+ 1/2) 28 + 1 ,
J
j=O
B(2r
~ 1)
0.
= B(2r + 1,2s + 1)
and B 2 (r,s)
+ 1){(2r + 1)B1 (r, s- 1) + 2rBt(r- 1, s- 1)},
and
B 2 (r, s) = 2r{2r B 2 (r, s- 1)
+ (2r-
1)Bz(r- 1, s- 1) }.
24. Let R(n, k) be the number of k-permutations of n with repetition and the restriction that each element appears at most twice. Using a suitable generating function, deduce the recurrence relations
R(n + 1, k) = R(n, k) R(n,k + 1)
and R(n, k with R(n,O)
+ kR(n, k-
1)
+ (~) R(n, k- 2),
= nR(n,k)- nG)R(n -1,k- 2)
+ 2) = n(2n- 1)R(n- 1, k)- n(n- 1)R(n- 2, k)
= 1, R(n, 1) = 1, R(n,2) = n 2 .
25. (Continuation). Let R(n) be the (total) number of permutations of n with repetition and the restriction that each element appears at most twice: 2n
R(n)
=L
R(n, k), n
= 0, 1, ....
k=O
Show that
R(n)- n(2n- 1)R(n- 1) + n(n- 1)R(n- 2) with R(O)
= n + 1,
= 1, R(1) = 3.
26. Parcelling out procedures. Let Kn be the number of ways of parcelling out a stick of n units length into n unitary parts when, at each step, all the parts of length greater than one unit are parceled out into two parts. Show that n-1
Kn
=L
j=l
KjKn-j, n
= 2, 3, ... '
Kt
=1
229
6. 7. EXERCISES
and conclude that 1 Kn = Cn = n
where Cn, n
= 1, 2, ... , are the
(2n2) n-1
, n = 1,2, ... ,
Catalan numbers.
27*. Triangulation of convex polygons. Let Tn be the number of triangulations of a convex n-gon (ways to cut up a convex polygon of n vertices into n- 2 triangles by means of n- 3 non-intersecting diagonals). Show that n-1 Tn = LTkTn-k+l, n = 3,4, ... ' T2 = 1. k=2
Deduce the generating function t
00
T(t) = LTntn =
2 (1- v'f=4t)
n=2
and conclude that
Tn = Cn-1 = n _1 1
(2nn _ 24) ,
n = 2,3, ... ,
where Cn, n = 1, 2, ... , are the Catalan numbers. 28. Convolution of Catalan numbers. Let Cn, n = 1, 2, ... , be the sequence of Catalan numbers. For fixed k = 2, 3, ... , the sequence
c~k)
n-1
= L CjC~~jl)'
n
= 1, 2, ...
'
j=l
with C~ l = Cn, n = 1, 2, ... , is called k-fold convolution of the sequence Cn, n = 1, 2, ... (a) Derive the generating function
1
00
Ck(t)
=L
c~k)tn
= Tk(1- v'f=4t)k
n=l
and (b) deduce the recurrence
c~k)
= c~k+l) + c~~--;l)'
k
= 2,3, ... '
n
= 1,2, ...
'
1
with C~ l = C~2 l = Cn. (c) Show that
C(k) _ ·'· _ 'n:._ n - 'f'n-l,n-k -
(2nn-_k - 1) 1
, n
= 1, 2, ...
, k
= 2, 3, ...
,
GENERATING FUNCTIONS
230
where '1/Jn,k, k
= 0, 1, ...
, n, n
= 0, 1, ... , are the
ballot numbers.
29*. Let Sn be the number of permutations of {1, 2, ... , n} without a succession. If Sn,k is the number of permutations of { 1, 2, ... , n} with k successions, then (see Theorem 5.6)
-1) Sn-k,
Sn,k= ( n k
k=0,1, ... ,n-1, n=1,2, ....
Using this relation and the symbolic calculus, show that
30*. (Continuation). Show that oo
S(t, u)
n
=LL
n=Ok=O
:! n
Sn+l,ktk
= (1- u)- 2 eu(t-l).
31. Determine the sequence of probabilities Pk, k = 0, 1, ... , with factorial moments J.l(r) = _xr, r = 0, 1, ... , where .X > 0.
32. Let k
Sn,k(x,z)=L(x+rz)n, n=0,1, ... , k=0,1, ... r=O Show that
and
33. Let k
Cn,k(x,z) = L(x+rz)n, n=0,1, ... , k=0,1, .... r=O Show that 00 un (1 Ck(u, x, z) = '"""'Cn L... ' k(x, z)n.1 = n=O
+ u)"'[(1 + u)(k+l)z- 1] (1 + u ) z -1
231
6. 7. EXERCISES
and
oo oo
C(t,u,x,z)
tk un
= "'"'cnk(x,z)-k = 1 ~ ~ ' . n.1
n=Ok=O
34. Let an,k
(1
+ u)x((1 + uyet(I+u)• (1 + u )z - 1
= min{n, k}, k = 1, 2, ... , n = 1, 2, ....
- et]
·
Show that
35*. Generating function of the cycles of binomial coefficients. The product ak,r
=
(r+ k) (k + r) k
r
, k
= 0, 1, ...
, r
= 0, 1, ...
,
is called cycle of binomial coefficients of length 2. Show that A(t,u) =
~~ c:k) e;r)tkur = ~~ (r:k)
= ((1- t
+ u) 2 -
4ut 112 .
2
tkur
Chapter 7 RECURRENCE RELATIONS
7.1
INTRODUCTION
Recurrence relations were introduced in Chapter 1, on the basic counting principles, and encountered in several places in subsequent chapters. As has been already noted, in certain enumeration problems, the number of configurations satisfying specified conditions can only be expressed recursively. Also, even when the direct expression of this number in a closed form is possible, a recurrence relation is useful at least for tabulation purposes. This chapter presents the basic methods of solving linear recurrence relations. Specifically, after the introduction of the basic notions of linear recurrence relations, the iteration method is employed to derive the solutions of linear recurrence relations of the first order. This recursive, step-by-step, derivation of the solutions contributes to the understanding of the term recurrence relation. Then, the method of characteristic roots for the solution of linear recurrence relations with constant coefficients is presented. The last section is devoted to the use of generating functions in solving linear recurrence relations with constant or variable coefficients.
7.2
BASIC NOTIONS
Consider a sequence of numbers an, n = 0, 1, ... , and let bo(n)an+r
+ bl(n)an+r-1 + · · · + br(n)an =
u(n), n = 0, 1, ... , (7.1)
where u(n) and the coefficients bj(n), j = 0, 1, ... , r, with b0 (n) -:j:. 0 and br(n) -:j:. 0, are given functions of n. Recurrence relation (7.1) is called linear recurrence relation of order r. If u(n) = 0, n = 0, 1, ... , (7.1) is called homogeneous; otherwise is called complete. If the coefficients are
RECURRENCE RELATIONS
234
constant (independent of n), bj(n) = bj, j = 0, 1, ... , r, n = 0, 1, ... , (7.1) is called linear recurrence relation of order r with constant coefficients. In the case of a double-index sequence an,k, n = 0, 1, ... , k = 0, 1, ... , the recurrence relation bo,o(n, k)an+r,k+s
+ bo,1 (n, k)an+r,k+s-1 + · · · + br,s(n, k)an,k = u(n, k), (7.2)
=
=
n 0, 1, ... , k 0, 1, ... , where u(n, k) and the coefficients b;,j(n, k), i = 0, 1, ... , r, j = 0, 1, ... , s, with bo,o(n, k) =f. 0 and br,s(n, k) =f. 0, are given functions ofn and k, is called linear recurrence relation of order (r, s). Solution of recurrence relation (7.1) or (7.2) in a set S is called a se-
quence that makes this equation an identity in S. A general solution of recurrence relation (7.1) includes r arbitrary constants. The knowledge of the r initial conditions (values) ao, a 1 , •.. , ar- 1 specifies the constants and makes the solution unique. In the case of recurrence relation (7.2), the knowledge of the r + s initial conditions (sequences) ao,k, a 1,k, ... , ar-I,k and an,o, an, 1 , ... , an,s- 1 guarantees the uniqueness of its solution. Let us now consider the homogeneous linear recurrence relation of order r corresponding to (7.1): bo(n)an+r
+ b1(n)an+r-I + · · · + br(n)an =
0, n = 0, 1, ... ,
(7.3)
where the coefficients bi(n), j = 0, 1, ... ,r, with b0 (n) =f. 0 and br(n) =f. 0, are given functions of n. Note that, if a 1 (n) and a 2 (n) are any solutions of (7.3), then c 1 a 1 (n)+cza 2 (n), where c1 and cz are arbitrary constants, is also a solution of (7.3). In general, it can be shown that the set of solutions of (7.3) constitutes a linear r dimensional vector space. Note that r solutions a 1 (n ), az (n ), ... , ar( n) of (7.3) are linearly independent if and only if their Wronski determinant az(n) az(n + 1)
Wr(n) = a1
(n
+ r- 1)
a 2 (n
+ r-
1) .. · ar(n
+ r-
1)
is different from zero for some index n = m. Consequently, if the r solutions a 1 (n), a 2 (n), ... , ar(n) of the homogeneous linear recurrence relation of order r (7.3) are linearly independent, then they constitute a base for the r dimensional linear vector space of its solutions. Further, every solution of (7.3) is of the form (7.4)
where c1 , c2 , ...
, Cr
are arbitrary constants. The solution (7.4) is called
general solution of (7.3). In the case where r values am, am+1, •.. , am+r-I
7.3. RECURRENCE RELATIONS OF THE FIRST ORDER
235
are given, the system
c1a1(m) + c2a2(m) + · · · + Crar(m) =am, c1a1(m + 1) + c2a2(m + 1) + · · · + Crar(m
+ 1) = am+l,
since Wr(m) -1- 0, has a unique solution with respect to c 1 ,c2 , ... ,cr. Introducing this solution into (7.4), the unique solution of (7.3) is deduced. Further, if w(n) is a particular solution of the complete linear recurrence relation of order r (7.1), then, according to the preceding analysis, it follows directly that
is the general solution of (7.1).
7.3
RECURRENCE RELATIONS OF THE FIRST ORDER
Let us first consider the complete linear recurrence relation of the first order with variable coefficient, an+l- b(n)an = u(n), n
= m,m + 1, ...
,
(7.5)
where b(n) f::- 0, n = m,m + 1, ... and m is a given nonnegative integer. The solution of this recurrence relation is deduced in the following theorem by employing the iteration method. This recursive, step-by-step, derivation of the solution serves to the better understanding of the term recurrence relation.
THEOREM7.1 The solution of the linear recurrence relation (7.5 ), with am a given initial condition, is n-2
an= ambn-l,m
L
+
u(r)bn-l,r+l
+ u(n- 1),
(7.6)
r=m
for n
= m + 1, m + 2, ... , where n
bn,r =
II b(k). k=r
(7.7)
RECURRENCE RELATIONS
236
PROOF
Introducing the transformation
hn
= an/bn-l,m,
n
= m + 1, m + 2, ...
, hm =am
and setting w(n) = u(n)/bn-l,m• n = m,m + 1, ... , recurrence relation (7.5) is transformed to the recurrence relation
hn+l=hn+w(n), n=m,m+1, ... , where hm = am is a given initial condition. Iterating (applying repeatedly) this recurrence, we get hm+l = hm + w(m), hm+2 = hm+l + w(m + 1) = hm + w(m) + w(m + 1)
and
hn+l = hn + w(n) = {hm + w(m) + w(m + 1) + · · · + w(n- 1)} + w(n). Consequently, n
hn+l=hm+Lw(r), n=m,m+1, .... r=m
Returning to the sequence an, n = m, m the inverse transformation
+ 1, ... , the last expression, upon using
and since u(n) = w(n)bn-l,m• n = m, m
+ 1, ... , implies
n-l an+l = ambn,m + L u(r)bn,r+l + u(n), n = m, m + 1, ... , r=m
which is the required expression with n
I
+ 1 instead of n.
The solution of the complete linear recurrence relation of the first order with constant coefficient,
an+l -ban= u(n), n = m, m
+ 1, ...
,
(7.8)
where b -::/:- 0, n = m, m + 1, ... and m is a given nonnegative integer, is readily deduced from Theorem 7.1 by setting b(n) = b, n = m, m + 1, ... . Also, its particular case with u(n) = u constant for all n = m, m + 1, ... , upon using the geometric progression summation formula, is concluded. These solutions of (7.8) are given in the following corollary.
7.3. RECURRENCE RELATIONS OF THE FIRST ORDER
237
COROLLARY 7.1 The solution of the linear recurrence relation (7.8), with am a given initial condition, is
n-1
an
L u(r)bn-r-!,
= ambn-m +
= m + 1, m + 2,...
n
.
(7.9)
r=m
In particular; with u(n)
an
= u constant for all n = m, m + 1, ... ,
= { ambn-m + U · (1- bn-m)/(1- b),
b-::/:- 1,
am+ u · (n- m), b = 1, for n = m
(7.10)
+ 1, m + 2, ....
REMARK 7.1 If the term am is not given, (7.6) with am = c, an arbitrary constant, constitutes a family of solutions, which is the general solution of recurrence relation (7.5). Similarly, (7.9) and (7.10) with am = care the respective general I solutionsof(7.8).
Example 7.1 Tennis tournament Let 2n players participate in a singles tennis tournament. Determine, by the aid of a recurrence relation, the number an of different pairs that can be formed for the n matches of the first round. Consider the player with the number 2n in the list. This player can be paired with any of the other 2n- 1 players. Since an-! different pairs can be formed by the remaining 2(n - 1) players for the other n - 1 matches of the first round, it follows that an = (2n- 1)an-1, n = 2, 3, ... , a1 = 1.
This is a homogeneous linear recurrence relation of the first order with variable coefficient. Thus from (7.6), with m = 1, u(n) = 0, b(n) = 2n + 1, n = 1, 2, ... , and a 1 = 1, we deduce the expression
an
= 1 · 3 · · · (2n- 1),
n
= 1, 2, ....
Mulliplying it by 2 · 4 · · · 2n = 2nn! and dividing the resulting expression by the same number, we find the following equivalent expression for an: 1· 2. 3 ... (2n- 1)(2n)
2nn!
(2n)!
= 2nn! ,
n == 1, 2, .. ..
D
Example 7.2 Regions of a plane Determine, using a recurrence relation, the number an of regions into which a plane is separated by n circles, with each pair of circles intersecting in exactly two points and with no triple of circles having a common intersecting point.
RECURRENCE RELATIONS
238
Consider n circles on a plane, with each pair of circles intersecting in exactly two points and no triple of circles having a common intersecting point. Then these circles separate the plane into an regions. Now add another circle, which intersects each of the n circles at exactly two points and does not intersect any pair of circles at any of their intersecting points. Thus, this circle intersects the n circles at a total of 2n points, passing through 2n regions. Each of these regions is separated into two regions. Consequently, the addition of the (n + 1)st circle increases the number of regions by 2n and so
an+1
= an +
2n, n
= 1, 2, ... ,
a1
= 2.
This is a complete linear recurrence relation of the first order with constant coefficient. Hence, from (7.9), with m = 1, b = 1, a 1 = 2 and u(r) = 2r, we deduce the expression
n-1 an= 2+2Lr, r=1
which, upon using the arithmetic progression summation formula, reduces to
an= n(n- 1)
+ 2,
n
= 1, 2,...
.
0
Example 7.3 The transfer of the Hanoi tower Consider three pegs A, B and C and n cyclic discs of different diameters {d 1, d 2 , ... , dn}. with d 1 < d2 < · · · < dn. Initially, the discs are placed on peg A in decreasing order of size from the bottom to the top. Let an be the minimum number of movements of discs required for the transfer of the tower from peg A to peg B, using peg C as an auxiliary, under the restriction that, in each movement, only one disc is transferred and no disc is placed over a disc of smaller size. In order to find a recurrence relation for an, note that then- 1 discs { d 1 , d2, ... , dn- 1} of the tower can be transferred to peg C after an- 1 movements. Then, in one movement, the last disc dn is transferred from peg C to peg B. Finally, the tower of then- 1 discs is transferred from peg C to peg B, over the disc dn, after an-1 movements. Consequently,
an
= 2an-1 + 1,
n
= 2, 3, ...
, a1
= 1.
This is a complete recurrence relation of the first order with constant coefficient. Hence, from (7.10), with m = 1, a 1 = 1 and u = 1, we get
an
= 2n-1
- (1 - 2n-1)
= 2n- 1.
According to legend, at the creation God established the tower of Hanoi at the temple of Benares with n = 64 gold discs. Since then, the tower is being transferred by priests, with the prediction that when the transfer of the tower is completed the world will vanish. Note that a2 = 3, a3 = 7, a 4 = 15, a 1s = 65,535, a32 = 4,294,967,295 and as 4 = 18,446,744,073,709,551,615. 0
7.4. THE METHOD OF CHARACTERISTIC ROOTS
7.4
239
THE METHOD OF CHARACTERISTIC ROOTS
Let us first consider the homogeneous linear recurrence relation of the second order with constant coefficients: (7.11) where b2 =f. 0 and m is a given nonnegative integer. Clearly, a sequence of the form a(n) = pn, n = m, m + 1, ... , is a solution of (7.11) if and only if p is a root of the equation
tn+ 2
+ b1tn+1 + b2tn = 0.
Dividing both sides of this equation by tn, for t equation of the second order,
=f. 0,
we obtain the following (7.12)
which is called the characteristic equation of the recurrence relation (7.11). Further, the discriminant bt- 4~ of the characteristic equation determines the kind of its roots. Specifically, if bt- 4b2 > 0, (7.12) has two distinct real roots, PI=
-b~ -
..Jbr - 4b2 2
, P2 =
-bi +
..Jbr - 4b2 2
,
while, if bi -4b2 = 0, it has one double root p = -bi/2. Also, ifbt-4b2 (7.12) has two conjugate complex roots Pl =
< 0,
-bi- i..J4b2- bi -bl + i..J4b2- bi , P2 = , 2 2
where i = A is the imaginary unit. These complex numbers, on using the length p = b2 and argument 0, with tanO = -..J4b1 - bi/b1, may be written in trigonometric form as PI =p(cosB+isinO), p 2 =p(cosO-isinO). The general solution of recurrence relation (7.11) depends on the kind of roots of the characteristic equation (7.12). More precisely, we prove the following theorem. THEOREM7.2 The general solution of the homogeneous linear recurrence relation of the second order with constant coefficients, (7. 11 ), is given by (7.13)
RECURRENCE RELATIONS
240
where c 1 and c2 are arbitrary constants. Further, (7.12) has: (a) two distinct real roots Pl and p2 , then
if the characteristic equation
(7.14)
(b) one double root p, then (7.15)
(c) two conjugate complex roots Pl and P2 = and -0, respectively, then
p1 ,
with length p and argument() (7.16)
PROOF (a) Since p 1 and p2 are roots of the characteristic equation (7.12), a 1 ( n) = pf and a 2 ( n) = p~ are solutions of (7 .11 ). The Wronski determinant of these solutions is
with p 1 P2 "/:- 0, since b2 "/:- 0, and Pl "/:- P2. Hence, W2 (n) "/:- 0 and so the solutions in (7.14) constitute a base of the two-dimensional linear vector space of the solutions of (7 .11 ). (b) Since pis a solution of the characteristic equation (7.12), a(n) = pn is a solution of (7 .11 ). A base of the two-dimensional vector space of the solutions of (7 .11) is composed of two linearly independent solutions. In order to determine them, we set (7.17) where hn, n = m, m (7.11), we get
+ 1, ... , is a sequence to be determined. 2 p hn+2
Introducing it into
+ b1phn+l + b2hn = 0,
and, since b1 -2p, b2 = p 2 , with p "/:- 0, we deduce for hn, n m + 1, ... , the recurrence relation hn+2 - 2hn+l
+ hn = 0, n = m, m + 1, ....
Putting hn+l - hn
= 9n,
n
= m, m + 1, ...
)
we get the homogeneous linear recurrence relation of the first order 9n+l- 9n
= 0,
n
= m, m + 1, ...
,
m,
7.4. THE METHOD OF CHARACTERISTIC ROOTS
241
the general solution of which, according to Remark 7 .l, is given by Yn = c1, n = m, m
+ 1, ....
Consequently,
hn+l-hn=CI, n=m,m+1, .... The general solution of this recurrence relation, again according to Remark 7.1, is given by hn = c1 + c2n, n = m, m + 1, .... Introducing this general solution into (7.17), we deduce the required expression of the general solution of (7.11). Note that the Wronski detenninant of the solutions a 1 (n) = pn and a2(n) = npn is given by
and since p ;f. 0, W 2 (n) ;f. 0. (c) Since p and p 2 = ih are conjugate complex roots of the characteristic equation (7.12), an = pf and iin = pf are conjugate complex solutions of (7.11), which may be written in trigonometric fonn as
an = pn cos( nO) + ipn sin( nO), lin = pn cos( nO) - ipn sin( nO). Interested only in the real solutions of recurrence relation (7.11), it is necessary to isolate them. In this respect, note that, if an = a 1(n) + ia2 (n) is a complex solution of the characteristic equation (7 .12), then each of a 1(n) and a2 (n) is also a solution of the same equation since [a 1(n + 2) + b1a 1(n + 1) + b2a 1(n)] +i[a 2(n + 2) + b1a 2 (n + 1) + b2a2(n)]
= 0,
n = m, m + 1, ... ,
implies
and
a2(n + 2) + b1a2(n + 1) + b2a2(n)
= 0,
Consequently, a1 (n) = pn cos( nO), a2(n)
n = m, m + 1, ....
= pn sin(nO)
are two real solutions of (7 .11 ). The Wronski determinant of these solutions is given by
I
pn sin( nO) pn+I sin(nO
+ 0)
RECURRENCE RELATIONS
242
Thus, W 2 (n) = ln+ 1 [cos(n0) sin( nO+ 0)- sin( nO) cos( nO+ 0)]
and since sin(nO + 0) = sin(nO) cos 0 +cos( nO) sin 0, cos( nO+ 0) =cos( nO) cos 0- sin(nO) sin 0, the Wronski determinant reduces to W2(n) = ln+I sinO[cos 2 (nO) + sin 2 (n0)] = /n+l sinO,
which, by virtue of p f:- 0 and sin 0 f:- 0, implies W 2 ( n) ¥- 0. Hence, the solutions in (7 .16) constitute a base of the two-dimensional linear vector space of I the solutions of (7 .11) and the proof of the theorem is completed.
Example 7.4 Gambler's ruin A gambler plays a series of games of chance against a casino (or against an adversary). In any game the probability of the gambler to win $1 is p and to loose $1 is q = 1 - p. Assume that initially the gambler possesses n dollars and the casino (or his adversary) possesses k- n dollars. Find the probability Pn of the gambler's ruin. In the first game, the gambler may either win or loose $1, with probabilities p and q, respectively. If he wins the first game, then his fortune is increased ton+ 1 and so his ruin probability becomes Pn+l· If he looses the first game, his fortune is decreased to n - 1 and so his ruin probability becomes Pn-l· Hence Pn = PPn+l
+ QPn-1,
n = 1, 2, ... , k- 1
or PPn+2 - Pn+l
+ QPn = 0,
n
= 0, 1, ...
, k- 2,
with Po= 1, Pk
= 0.
This is a linear recurrence relation with constant coefficients. The roots of its characteristic equation, 2 pt - t + q = 0, are PI = 1 and P2 = qfp. If p ¥- 1/2, whence q ¥- 1/2, these two roots are distinct, while if p = 1/2, whence q = 1/2, p2 = p 1 = 1. Thus, according to Theorem 7 .2, the general solution of the recurrence relation: (a) for p ¥- 1/2 is
= C1 + C2 ( q / P) n,
Pn
n
= 0, 1, ...
, k,
while (b) for p = 1/2 is Pn = c1 +c2n, n = 0,1, ... ,k.
7.4. THE METHOD OF CHARACTERISTIC ROOTS
Using the initial conditions we get: (a) for p
243
-:f. 1/2,
C1 + C2 = 1, C1 + C2(qfpl = 0, whence
Ct =
(qjp)k 1 1- (qjp)k' C2 = 1- (qjp)k'
while (b) for p = 1/2,
c1 = 1, c1 + c2 k = 0, whence
c1 = 1, c2 = -
1
k.
Consequently, the solution of the recurrence relation that satisfies the initial conditions: (a) for p -:f. 1/2 is
Pn
=
(qjp)n _ (qjp)k , n _ (qjp)k 1
= 0, 1, ... , k
and (b) for p = 1/2 is
k-n
Pn = -k-' n = 0, 1, ... , k.
D
Example 7.5 Determine the sequence an, n = 0, 1, ... , for which the general term is the arithmetic mean of its two preceding terms and the first two terms are 0 and 1. The sequence an, n = 0, 1, ... , according to its definition, satisfies the linear recurrence relation 1
an= 2(an-t + an-2), n = 2, 3, ... , or
2an+2 - an+t -an = 0, n = 0, 1, ... , with initial conditions a 0
= 0 and a 1 = 1. The roots of the characteristic equation, 2t 2
-
t- 1 = 0,
are Pt = 1 and P2 = -1/2. Thus, according to Theorem 7.2, the general solution of the recurrence relation is
( -l)n an=c1+c2--, n=0,1, .... 2n The initial conditions require that 1
c1 + C2 = 0, C1 - 2C2 = 1.
RECURRENCE RELATIONS
244
Hence
and
Let us now consider the complete linear recurrence relation of the second order with constant coefficients:
(7 .18) where b2 i 0 and m is a given nonnegative integer. According to what was stated in Section 7.2, if c 1 a 1 (n) + c2a 2(n), n = m, m + 1, ... , is the general solution of the corresponding homogeneous linear recurrence relation (7.11) and w(n), n = m, m + 1, ... , is a particular solution of (7.18), then the general solution of (7.18) is given by
Consequently, the derivation of a particular solution of (7.18) is what remains to be done. Consider the case
u(n)=bntuj(~),
n=m,m+1, ... ,
(7.19)
J
j=O
where b and ui, j = 0, 1, ... , s, are constants. The method of arbitrary constants for the derivation of a particular solution of (7.18) is stated in the following theorem. THEOREM7.3 A particular solution of the complete linear recurrence relation of the second order with constant coefficients (7.18) in the case the function u(n) is given by (7.19), with b a root of the characteristic polynomial ¢(t) = t 2 + b1 t + b2 of multiplicity k ~ 0, is given by
w(n) = bn-k
I: j=k
Wj
(~),
n = m, m
+ 1, ...
, k = 0, 1, 2,
(7.20)
J
where the coefficients Wj. j = k, k of the s + 1 equations: (a) fork= 0,
+ 1, ...
,k
+ s, are determined by the system
7.4. THE METHOD OF CHARACTERISTIC ROOTS
1/J(b)ws-1 ¢(b)wj
+ b¢' (b)ws
=
+ b¢'(b)wj+ 1 + b2wj+2 = Uj,
245
(7.21)
U 8 -I,
j
= 0, 1, ...
, s- 2,
(b)for k = 1.
¢'(b)wj+I
+ bwj+2 = Uj,
j
= 0, 1, ...
, s- 1,
(7.22)
(c)fork=2, Wj+2=Uj, j=0,1, ... ,s,
(7.23)
with ¢'(b) the derivative of the characteristic polynomial ¢(t) at the point t =b. PROOF Introducing (7.19) into (7.18) and requiring (7.20) to satisfy theresulting recurrence relation, we get
Using the recurrence relations
and
we deduce the relation
+b1b
~ Wj (~) + b1b ~ Wj ( . : ) 1 j=k J j=k J
+ b2 ~ Wj (~) j=k
J
= bk
t
Uj
j=O
(~). J
Introducing the characteristic polynomial ¢(b) = b2 + b1b + b2 and its derivative 1/J'(b) = 2b + b1 , we get
~ ¢(b)wj (~) +I:j=k b¢'(b)wj (J. : 1) J=k J
+I:
t
(~).
2 b wi ( . : ) = bk Uj j=k J 2 j=O J
Equating the coefficients of the binomials {]) of both sides of this expression and since (a) fork = 0, ¢(b) f. 0, (b) fork = 1, ¢(b) = 0, ¢'(b) f. 0 and
RECURRENCE RELATIONS
246
=
0, ¢>'(b)
2, ¢>(b) (c) fork respectively. I
= 0,
we conclude (7.21), (7.22) and (7.23),
Example 7.6 Expected time to gambler's ruin Consider the gambler's ruin problem of Example 7.4 and let dn be the expected value of the number of games until the gambler is ruined. Derive a recurrence relation for dn and from that deduce an explicit expression for the expected time to gambler's ruin. In the first game, the gambler may either win or loose $ 1, with probabilities p and q, respectively. If he wins the first game, then his fortune is increased ton+ 1 and, after that game, the expected time to his ruin becomes dn+i· If he looses the first game, his fortune is decreased to n - 1 and, after that game, the expected time to his ruin becomes dn-i· In both cases, adding the first game we deduce the following recurrence relation
dn = p(dn+l
+ 1) + q(dn-i + 1),
n = 1, 2, ... , k- 1,
or
dn+2- (1/p)dn-1
+ (qfp)dn
= -1/p, n = 0, 1, ... , k- 2,
with initial conditions
do= 0, dk = 0. This is a complete linear recurrence relation with constant coefficients. The general solution of the corresponding homogeneous recurrence relation,
dn+2 - (1/p)dn+l
+ (qfp)dn
= 0, n = 0, 1, ... , k- 2,
according to Example 7.4: (a) for p -:j: 1/2 is
while (b) for p = 1/2 is
dn = c1
+ c2n,
n
= 0, 1, ...
, k.
The function u( n) of the complete linear recurrence relation is of the form (7 .19), with b = 1, s = 0 and u 0 = -1/p. Note that (a) if p "1- 1/2, b = 1 is a simple root (k = 1), while (b) if p = 1/2, b = 1 is a double root (k = 2) of the characteristic polynomial ¢>(t) = t 2 - (1/p)t + (qfp). Thus, according to Theorem 7.3, a particular solution of the complete linear recurrence relation with constant coefficients: (a) for p "1- 1/2 is given by w(n) = w 1 n, where, by (7.22) and since ¢>'(1) = (2p- 1)/p. we get w 1 = 1/(1- 2p) and so
n w(n) = 1- 2p'
7.4. THE METHOD OF CHARACTERISTIC ROOTS
247
Also, a particular solution (b) for p = 1/2 is given by w(n) = w 2 n(n- 1)/2, where, by (7.23), w 2 = -2 and so
w(n)
= -n(n- 1).
Consequently, the general solution of the complete linear recurrence relation with constant coefficients: (a) for p ::/- 1/2 is given by
dn = c1
+ c2
(~) n + 1 .:: 2P,
n = 0, 1, ... , k,
while (b) for p = 1/2 is given by
+ c2n- n(n- 1),
dn = c1
n = 0, 1, ... , k.
Using the initial conditions, we get (a) for p ::/- 1/2, Ci
k + C2 = 0, Ci + C2 ( -q)k + - - = 0,
p
1- 2p
whence
k c~----·
-
1- 2p
k 1 1 --· ' 1 - (qfp)k, c 2 = 1 - 2p 1 - (qjp)k
while (b) for p = 1/2. c1=0, c2k-k(k-1)=0, whence C1 = 0, C2 = (k- 1). Therefore, the unique solution of the complete linear recurrence relation: (a) for p ::/- 1/2 is given by
dn
= _n_ 1- 2p
_ _ k_ . 1- (qfp)n -----'---'-:----'---,-k n 1- 2p 1- (qjp) ,
= 0, 1, ... , k
= n(k- n),
, k.
and (b) for p = 1/2 is
dn
n
= 0, 1, ...
0
Let us finally consider the general case of the linear recurrence relation of the r-th order with constant coefficients:
an+r
+ blan+r-1
+···+bran= u(n), n
= m, m + 1, ...
,
(7.24)
RECURRENCE RELATIONS
248
where br -1- 0 and m is a given nonnegative integer. Let
u(n)=bntuj(~),
n=m,m+1, ....
(7.25)
J
j=O
The corresponding homogeneous linear recurrence relation of the r-th order with constant coefficients is given by (7.26)
where br -1- 0 and m is a given nonnegative integer. The characteristic polynomial of this recurrence relation is (7.27)
The general solution of (7.26) and a particular solution of (7.24) in the case where u(n) is given by (7.25) are stated in the following two theorems. The proofs, similar to the proofs of Theorems 7.2 and 7.3, respectively, are omitted. THEOREM7.4 The general solution of the homogeneous linear recurrence relation of orderr with constant coefficients, (7.26), is given by Vt
an =
""'( L....., Cj,l
+ Cj,2n + ... + Cj,k;n k·-1) ] Pjn
j=l V2
+
L
(cj,l + Cj,2n + · · · + Cj,k;nk;- 1 )p'J cos(nOi)
j=v+l V2
1 + ""' )pnJ sin(nO·) L....., (d·1 ], + d·], 2n + .. · + d·J, k·nk;] J ' j=v+l
where Pi is a real root of the characteristic polynomial (7.27) of multiplicity ki ~ 0, j = 1,2, ... ,v 1 , withk 1 +k2 + ... +kv1 = vandpj(cosOi +isinBj) is a complex root of multiplicity ki ~ 0, j = v + 1, v + 2, ... , v 2, with 2(kv+l + kv+2 + ... + kv2) = r - v.
THEOREM7.5 A particular solution of the complete linear recurrence relation of order r with constant coefficients, (7.24 ), in the case the function u( n) is given by (7.25 ), with b a root of the characteristic polynomial (7.27) of multiplicity k ~ 0, is given by w(n) = bn-k
k+s L j=k
Wj
(
~) J
,
n = m, m
+ 1, ...
, k = 0, 1, ... , r,
7.4. THE METHOD OF CHARACTERISTIC ROOTS
where the coefficients Wj, j = k, k of the s + 1 equations s
L
+ 1, ...
,k
+ s are determined by the system
bv-j (v
+k
249
_ j)!>(v+k-j)(b)wv = Uj, j
= 0, 1, ... , s,
II=J
with >(v+k-j) (b) denoting the derivative of order v polynomial¢(t) at the point t = b.
+k
- j of the characteristic
Example 7.7 Determine the general solution of the recurrence relation
This relation is written as
which is a complete linear recurrence relation of the fourth order with constant coefficients. The corresponding homogeneous recurrence relation is
Its characteristic polynomial is given by ¢( t) = t 4
-
2t3 + 2t 2
-
2t + 1.
Note that ¢(1) = 0 and ¢'(t) = 2(2t3 - 3t2 + 2t- 1), whence ¢'(1) = 0. Thus p = 1 is a double real root of the characteristic polynomial. Dividing it by (t- 1 ) 2 we deduce the expression
which implies that the characteristic polynomial also has the conjugate complex roots Pl = i and P2 = -i, with i = A. The complex root Pl = i has length I and argument 0 = 1r /2. The general solution of the homogeneous recurrence relation, according to Theorem 7 .4, is given by
an= c1 + c2n
+ c3 cos(nn/2) + c4 sin(nn/2),
n
= 0, 1, ....
Further, the function u(n) = (5n- 2)2n of the complete recurrence relation is of the form (7.25), with b = 2, s = 1, u 0 = -2 and u 1 = 5. Thus, from Theorem 7.5 and since b = 2 is not root of the characteristic polynomial, whence k = 0, we conclude that w(n) = (wo +w1n)2n, n = 0, 1, ...
RECURRENCE RELATIONS
250
is a particular solution of the complete recurrence relation. The coefficients w 0 and w 1 are determined from the equations: ¢(2)wl Since u 0
= u1,
¢(2)w0
+ 2¢' (2)wl = uo.
= -2, u 1 = 5, ¢(2) = 5 and¢' (2) = 5wl = 5, 5wo
14, these equations become
+ 28w1
= -2
and so w 1 = 1 and w0 = -6. Therefore, w(n) = (n- 6)2n and the general solution of the complete recurrence relation is given by an = c 1 + c 2 n forn=0,1, ....
7.5
+ c3 cos(mr /2) + c4 sin(mr /2) + (n- 6)2n,
0
THE METHOD OF GENERATING FUNCTIONS
In Chapter 6, we have examined how generating functions may be used in coping with combinatorial problems. The direct determination of generating functions by invoking the assumptions and restrictions imposed by these problems was a crucial characteristic of many of them. However, a direct determination of a suitable generating function is not always possible. In many problems, a linear recurrence relation for the sequence of the numbers under consideration can be derived by appealing to the assumptions and restrictions imposed by them. We have already dealt with several such problems. In this way, the interest is converted to the solution of a linear recurrence relation. In this section, generating functions are used in solving a linear recurrence relation of order r with constant or variable coefficients and a bivariate linear recurrence relation of order (r, s) with constant coefficients. Let us, first, consider the linear recurrence relation with constant coefficients, (7.28) where b0 ::/:- 0, br ::/:- 0 and u(n), n = 0, 1, ... , is a given sequence (function) of n. The determination of~ sequence ak, k = 0, 1, ... , satisfying this recurrence relation requires the knowledge of r initial values ao, a1, ... , ar-1· Since the coefficients b0 , b1, ... , br-l are known, the numbers k ck
= l:aJbk-j, j=O
k
= 0, 1, ...
,r -1
(7.29)
7.5. THE METHOD OF GENERATING FUNCTIONS
251
can be calculated. The derivation of the solution ak, k = 0, 1, ... , of (7.28) by using a generating function is carried out in two steps. At the first step, on using (7.28) and its initial values, the generating function of the sequence ak, k = 0, 1, ... is derived in the next theorem. THEOREM7.6 Letak, k = 0, 1, ... , be a sequence satisfying the linear recurrence relation (7.28). Then the generatingfunction 00
A(t)
= L>ktk,
(7.30)
k=O is given by A()= C(t) + trU(t) t Br(t) '
(7.31)
where r
r-1
Br(t) = L>ktk, C(t) = :~:::>ktk k=O k=O
(7.32)
and 00
U(t) =
L u(n)tn.
(7.33)
n=O
PROOF
bo
Multiplying (7.28) by tn+r and summing for n = 0, 1, ... , we get
00
00
00
00
n=O
n=O
n=O
n=O
2: an+rtn+r +b1t 2: an+r-ltn+r-l +·. ·+brtr L:antn = tr 2: u(n)tn.
Since
oo
s-1
L an+stn+s = A(t) - L aktk'
s = 1, 2, 'r, n=O k=O upon introducing the generating functions (7 .30) and (7 .33), we deduce the relation
and so
0
0
0
RECURRENCE RELATIONS
252
Clearly, on using (7.29) and (7.32), we deduce expression (7.31).
I
After the derivation of expression (7.31) for the generating function A(t), the next step is the determination of the sequence ak, k = 0, 1, ... , which requires the expansion of the right-hand side of (7.31) into powers oft. Note that the polynomial Br(t) is connected with the characteristic polynomial r
L bktr-k
c/>r(t) =
k=O by the relation Br(t) = tr¢>r(1/t).
Further, when the r initial values
a 0,a1, ... ,ar-l are not given, the numbers ck, k = 0,1, ... ,r -1, de-
fined by (7.29), enter in expression (7.31) of the generating function and, consequently, in the solution of (7.28) as r arbitrary constants. In order to expand the generating function (7.31), we express it as a sum of algebraic fractions of the form, c/(1- pt)k, by the aid of the method of partial fractions. Specifically, if p 1 , P2, ... , Ps are the roots of the characteristic polynomial ¢>r (t), with multiplicities m 1 , m 2 , ... , m 8 , respectively, so that m1 + m2 + · · · + m 8 = r, then
c/>r(t)
= bo(t- PI)m' (t- P2)m
2
• • •
(t- Ps)m•
and the denominator in (7.31) is factored as follows:
Br(t)
= bo(1- p1t)m' (1- P2t)m
2
• • •
(1- p8 t)m•.
Therefore, the generating function (7.31) may be written in the form 8
( )
A t =
s
fflj
~~
""'""'
Ck,j
(1- Pit)k
II 1 t U(t) i=l (1- Pit)m;'
-1 r
+ bo
where ck,j, k = 1,2, ... ,mj, j = 1,2, ... ,s, are constants to be determined from the system of r equations that follows from the equation of the coefficients of tk, for k = 0, 1, ... , r- 1, in both members of the identity
C(t) - ~ ~ Ck,j Br(t) - L..t L..t (1 - p ·t)k · ]=l k=l J The generating function A(t), on using Newton's general binomial formula, may be expanded into powers of t as
7.5. THE METHOD OF GENERATING FUNCTIONS
253
Thus
an=
t,~Ck,je::~ 1)pj +b0
1
~ u(n- k- r) k=O
LIT (mj:. ~; j=l
1
)P7
3
,
(7.34)
J
where, in the inner sum of the second summand, the summation is extended over all n 3 = 0, 1, ... , k, j = 1, 2, ... , s, with n 1 + n 2 + · · · + n 8 = k. The use of generating functions in solving linear recurrence relations is illustrated in the following examples.
Example 7.8 Fibonacci numbers revisited Consider n points, each being either 0 or 1, and let Qn be the number of arrangements of them in a row so that no two zeros are consecutive. The numbers Ia = 1, II = 1, In = Qn-1• n = 2, 3, ... , are the Fibonacci numbers (see Example 2.28). Derive a recurrence relation for the numbers ln. n = 0, 1, ... , and solve it by using a generating function. In order to derive a recurrence relation for the numbers ln. n = 0, 1, ... , note that, in an arrangement of n points in a row, each being either 0 or 1 so that no two zeros are consecutive, the first position is occupied either by 1 or by 0. If it is occupied by 1, then there are In arrangements of the remaining n - 1 points so that no two zeros are consecutive. If the first position is occupied by 0, the second position is necessarily occupied by 1 and then there are ln-l arrangements of the remaining n - 2 points so that no two zeros are consecutive. Therefore, according to the addition principle, we deduce the following recurrence relation
In+ 1 = In + In-l, n
= 3, 4, ....
In particular, for n = 1, 2 we have the initial conditions h = 2, h = 3. Note that these initial conditions can be replaced by the values of Ia and II, which it should be noted that they do not have any combinatorial meaning. The values Ia and II are deduced from the extension of the recurrence relation at the point n = 1: h - h - II = 0, whence II = h - h = 3 - 2 = 1 and at the point n = 2: h - II - Ia = 0, whence Ia = h - II = 2 - 1 = 1. Thus, we may have the second order recurrence relation with constant coefficients,
ln+2-
ln+l -In= o, n = o, 1, ...
(7.35)
and initial conditions Ia = 1 and !I = 1. Using recurrence relation (7.35) and its initial conditions, Table 7.1 of Fibonacci numbers ln. n = 0, 1, ... , 14, is constructed.
RECURRENCE RELATIONS
254
Table 7.1
Fibonacci Numbers
0
2 2
3 3
4 5
5 8
6 13
7 21
8 34
9 55
10 89
II 144
12 233
13 377
14 610
The generating function
n=O is determined by multiplying the recurrence relation (7.35) by tn+ 2 and summing forn = 0, 1, .... Then 00
L
fn+2tn+ 2 - t
n=O and
00
00
n=O
n=O
L fn+ltn+I- t2 L
fntn = 0
[F(t)- 1- t] - t[F(t) - 1]- t 2F(t)
= 0,
whence
F(t) =
1 • 1 - t - t2
(7.36)
In order to expand it into powers of t, we calculate the roots of the characteristic polynomial (h(t) = t 2 - t- 1. These roots are
PI
1+VS
= --2-,
P2
1-vs
= --2-
and so
Then, the generating function (7.36) is written in the form 1
F(t) where
CI
C1
C2
= (1- Pit)(1- p2t) = 1- Pit+
and c2 are constants to be determined. Since
these constants satisfy the following system of equations: C1
+ C2
= 1,
C1{J2
+ C2Pl
= 0.
1- P2t'
7.5. THE METHOD OF GENERATING FUNCTIONS
Therefore, C1
P1
P1
= --'-P1- Pz
v's'
cz
Pz
255
Pz
= - -Pl.....:....:_'--P-2 = - v'5
and
whence
!.=
v'5r-('- v'5rl
~{ (1+2
2
n=D,i, ... ·
0
Example 7.9 Partial sums Consider a sequence ak, k = 0, 1, ... , and let 00
A(t) = L aktk. k=O
The sequence of partial sums n
sn=Lak, n=0,1, ... , k=O
is of interest, especially in probability theory. Clearly, this sequence satisfies the relation Sn- Sn-1 =an, n = 1,2, ... , which is a first order linear recurrence relation with constant coefficients. Multiplying it by tn and summing for n = 1, 2, ... , we get 00
00
L Sntn- t L n=1
00
Sn-1tn-
1
= L
n=1
antn.
n=1
Thus, the generating function 00
S(t) = L Sntn n=O
satisfies the relation S(t)- s0
-
tS(t) = A(t)- a0 and since s 0 = a0 ,
S(t) = (1- t)- 1 A(t). Let us apply this result to the sequence
ak=(x+~- 1 ),
k=O,l, ... ,
(7.37)
RECURRENCE RELATIONS
256
where xis a real number. Then, according to Newton's general binomial formula,
the generating function of the partial sum
on using (7.37), is obtained as 00
S(t) =
L Sntn = (1- t)-x-
1
.
n==O
This generating function is expanded into powers oft as
and so
Consider now the linear recurrence relation of order r with variable coefficients:
bo(n)an+r
+ b1(n)an+r-1 + · · · + br(n)an = u(n),
n
= 0, 1, ... , (7.38)
where u(n) and the coefficients bj(n), j = 0,1, ... ,r, with b0 (n) -:f. 0 and br(n) -:f. 0, are given functions of n. The derivation of the solution ak, k = 0, 1, ... , of this recurrence, by using a generating function, when the coefficients bj(n) are polynomials in n of order sj, j = 0, 1, ... , r, may be carried out as follows. Multiplying (7.38) by tn+r and summing for n = 0, 1, ... , we get for the generating function 00
A(t) =
L aktk, k==O
a linear differential equation of order at most s = max{ s 0 , s1, ... , Sr}. The solution of this equation gives A(t) and its expansion into powers oft yields ak, j = 0, 1, .... This method is illustrated in the following examples.
7.5. THE METHOD OF GENERATING FUNCTIONS
257
Example 7.10 Let ak, k = 0, I, ... , n, be the number of k-combinations of the set Wn { w 1 , w2, ... , Wn}. A recurrence relation for the sequence ak. k = 0, I, ... , n may be obtained as follows. Attaching in every k-combination { Wi 1 , Wi 2 , ••• , wik} of Wn any one of then- k elements of Wn- {Wi 1 , Wi 2 , ••• , wik }, we get all the (k +I)-combinations { Wi 1 , Wi 2 , ••• , wik+l} ofWn, k +I times each. Specifically, the (k +I)-combination { wii, Wi 2 , ••• , Wik+'} of Wn, is obtained from each of the k-combinations
by attaching the elements integer n, we get
wi,, Wi 2
, ••• ,
respectively. Thus, for a fixed
Wik+l,
(k + I)ak+l - (n- k)ak = 0, k = 0, I, ... , n- I, ao = I,
which is a first order linear recurrence relation with variable coefficients. Its solution may be obtained by using a generating function n
A(t) =
L>ktk, k=O
as follows.
Multiplying the recurrence relation by
tk
and summing for k
0, I, ... , n- I, we get n-1
n
n
L
L
L(k + I)ak+1tk- n aktk + t kaktk-l = 0. k=O k=O k=l
Further, :t A(t) =
n
n-1
k=l
r=O
L kaktk-l =
and so
d
(I+ t) dt A(t) Therefore
1
1 0
dA(s) --n A(s) -
L(r + I)ar+lt''
= nA(t).
1 1
0
-dsI+ s
and log A(t) -log A(O) = n log(I + t) - n log 1. Since A(O) = a 0 = I and log I = 0, it follows that
RECURRENCE RELATIONS
258
and so
ak =
(~),
Example 7.11 Consider the sequence ao = 1, an =
0
k=0,1, ... ,n.
e;), n = 1, 2, ... , and let
In order to determine this generating function, note that
an 1 = (2n + 2) = 2(2n + 1) (2n) = 2(2n + 1) an. + n+1 n+1 n n+1 Thus, the sequence an, n = 0, 1, ... , satisfies the first order linear recurrence relation with variable coefficients:
(n + 1)an+1- 2(2n + 1)an = 0, n = 0, 1, ... , ao = 1. Multiplying it by tn and summing for n = 0, 1, ... , since d
dtA(t)
00
00
n=1
k=O
= L nantn- 1 = L(k + 1)ak+1tk,
we get the first order differential equation d (1- 4t) dt A(t) = 2A(t).
Hence
t }0
t
dA(s) 2ds A(s) = } 0 1- 4s
and so log A(t) -log A(O) = -
1
{log(1 - 4t) -log 1}.
2
Since A(O) = a0 = 1 and log 1 = 0, it follows that
A(t)
= (1- 4t)- 112 .
0
Let us finally consider the bivariate linear recurrence relation of order (r, s) with constant coefficients:
bo,oan+r,k+s + bo,!an+r,k+s-1 + b1,oan+r-1,k+s +
0
0
0
+ br,san,k = w(n, k), (7.39)
7.5. THE METHOD OF GENERATING FUNCTIONS
259
where w(n,k) is a given function and the coefficients bi,j, i = 0,1, ... ,n, The determination of the doubleindex sequence an,k, n = 0, 1, ... , k = 0, 1, ... , that satisfies the recurrence relation (7.39) requires the knowledge of r + s independent sequences,
j = 0, 1, ... , k, are given constants.
ai,k, k=0,1, ... , i=0,1, ... ,r-1,
(7.40)
an,j, n = 0, 1, ... , j = 0, 1, ... , s- 1,
(7 .41)
the initial conditions. The derivation of the solution of (7.39) by using a generating function is carried out in two steps. In the first step, we determine the bivariate generating function 00
00
A(t,u) = L Lan,ktkun, n=Dk=O which, on using the sequence of generating functions 00
An(t) = L an,ktk, n = 0, 1, ... , k=O is written in the form 00
A(t, u) = L An(t)un. n=O For the derivation of the sequence of generating functions An(t), n 0, 1, ... , we multiply (7.39) by tk+ 8 and sum fork= 0, 1, .... Then r
L i=O
s
oo
oo
L bi,jti L an+r-i,k+8-jtk+o-j = t 8 L w(n, k)tk, n j=O k=O k=O
= 0, 1, ...
and, since oo
8-1
""a ·k ·tk+ 8-j -A · ·tm-j , ~ n+r-~, +S-J - n+r-~·(t)- ""a ~ n+r-~,m-J k=O m=j for j = 0, 1, ... , s- 1, we deduce the relation r
L i=O
r
8
oo
8-1 8-1
L bi,jtj An+r-i(t) - L j=O i=O
L L an+r-i,m-jtm = t 8 L w(n, k)tk' j=O m=j k=O
for n = 0, 1, .... Introducing 8
bi(t) =
'2.:: bi,jti, j=O
i
= 0, 1, ...
, r,
RECURRENCE RELATIONS
260
and
00
Wn(t) = L w(n, k)tk, k=O this relation may be written in the form bo (t)An+r(t)
+ b1 (t)An+r-1 (t) + 000+ br(t)An(t) = Cn (t) + t"Wn(t), (7.42)
for n = 0, 1, 0000 The last relation is a linear recurrence relation of order r for the sequence of generating functions An(t), n = 0, 1, 000 with constant, with respect ton, coefficients bi(t), i = 0, 1, 000 , ro Note that the generating functions 00
ai,kl, i = 0, 1, 000 , r - 1,
Ai(t) = L
(7.43)
k=O which, according to the initial conditions (7.40), are known, constitute the initial conditions of (7.42)0 Considering t as a parameter, the recurrence relation (7.42) is solved in exactly the same way as the recurrence relation (7028)0 So, multiplying (7.42) by un+r and summing for n = 0, 1, 000, we deduce the relation
A( t, u )
= C(t,u) +urt"W(t,u) Br,s(t, U)
where
r
r
i=O
=L
L bi,jtiui,
i=O
00
W(t, u)
s
= L bi(t)ui = L
Br,s(t, u)
00
Wn(t)un
=L
'
j=O
00
L w(n, k)tkun
n=O
n=Ok=O
An-i(t)bi(t)un
+L
and r-1
C(t, u) =
s-1 m
n
LL
L A:n_j(u)bj(u)tm
m=Oj=O
n=Oi=O r-1 s-1
n
-L L
n
LLan-i,m-jbi,jtmun, n=O m=O i=O j=O
with
00
Aj(u)=Lan,jUn, j=0,1,00o,s-1, n=O
(7044)
7.5. THE METHOD OF GENERATING FUNCTIONS
261
known generating functions, according to the initial conditions (7.41), and r
bj(u)
= L)i,ju,
j
= 0, 1, ...
, s.
i=O
After the derivation of the generating function A(t, u), the next step is the determination of the sequence an,k, k = 0, 1, ... , n = 0, 1, ... , which requires the expansion of the right-hand member of (7.44) into powers of t and u. For this purpose, considering t as a parameter, we expand this function into powers of u, and then we expand the resulting expression into powers of t. This procedure is further clarified in the following examples. Example 7.12 Sums of sums Let us consider a sequence ak, k
= 0, 1, ... , with generating function 00
A(t)
=L
aktk.
k=O
Further, consider the sum j s1,j
= ~ ai, j = 0, 1, ... , i=O
the double sum r
r
j
B2,r=~~ai=Lsl,j, r=0,1, ... j=O i=O
j=O
and, generally, the n-tuple sum k
Sn,k = ~ Sn-l,r, k = 0, 1, ... , n = 0, 1, .... r=O
Clearly, Sn,k - Sn,k-1 = Sn-l,k, k = 1, 2, ... , n = 1, 2, ....
Multiplying this relation by tk and summing fork = 1, 2, ... , we get 00
00
00
~ Sn,ktk- t ~ Sn,k-ltk-l k=l
and, since sn,o
k=l
= ~ Sn-l,ktk k=l
= Bn- 1,o, we deduce for the generating function 00
Sn(t)
=L k=O
Sn,ktk ', n
= 0, 1, ...
,
RECURRENCE RELATIONS
262
the first order linear recurrence relation with constant, with respect ton, coefficients
(1- t)Sn(t)
= Bn-1 (t),
n
= 1, 2, ... ,
and initial condition 00
So(t)
00
= "2:: so,ktk = "2:: aktk = A(t). k=O
k=O
Multiplying it by un and summing for n 00
(1 - t)
00
L
Sn(t)un
= U"2:: Sn-1 (t)un- 1.
n=l
n=l
Further, using the initial condition S 0 (t) variate) generating function 00
S(t, u)
= 1, 2, ... , we get
= A(t), we deduce for the double (bi-
00
00
= L "2:: Bn,ktkun = L
Sn(t)un,
n=O
n=Ok=O the expression
S(t, u) = (1- t)(1- t- u)- 1 A(t). Expanding the right-hand side of this expression into powers of u, we find
Sn(t) = (1- t)-n A(t) and since
we conclude that
Bn,k =
2:: j=O k
0
(
n+J-
.
1) ak-j·
D
J
Example 7.13 Distribution of shares Let us consider two players K and R playing in a series of games in which winner is declared the one who first wins n games. Assume that the probability of K to win in a game is p and so that of R is q = 1 - p. Further, suppose that, for some reason, the series of games is interrupted when K has won n - k games and n n - r games, with k, r < n. In this case, what should be the shares of the two players from a total stake of s dollars? The total stake should be distributed to the two players in shares proportional to the probability that each one has to win the series of games if it is continued.
7.5. THE METHOD OF GENERATING FUNCTIONS
263
So, let Pk,r be the probability of K to win the series of games, when k wins of K are required before r wins of R. Note that K may win or lose the next game with probability p or q = 1 - p, respectively. If K wins the next game, then the probability of winning the series is Pk- 1 ,r. while if K loses (whence R wins) the next game, then the probability of winning the series is Pk,r- 1 • Consequently, the probability Pk,r• r = 1, 2, ... , k = 1, 2, ... , satisfies the recurrence relation
Pk,r
= PPk-1,r + QPk,r-1,
r
= 1, 2, ... ,
k
= 1, 2, ...
,
with initial conditions
Po,r
= 1,
= 1, 2, ...
r
= 0,
, Pk,O
k
= 1, 2, ....
Multiplying this recurrence relation by tr and summing for r 00
L
00
Pk,rtr
and, since Pk,o
00
=PL
r=1
= 1, 2, ... , we get
Pk-1,rtr
+ qt LPk,r-1tr- 1 ,
r=1
k
= 1, 2, ...
r=1
= 0, we deduce for the sequence of generating functions 00
Pk(t) = LPk,rtr, k = 1,2, ...
1
r=1
the first order recurrence relation with constant, with respect to k, coefficients:
(1- qt)Pk(t) = pPk- 1(t), k = 1, 2, ... and initial condition 00
Po(t)
00
= LPo,rtr = Ltr = t(1- t)- 1 . r=1
r=1
Multiplying this recurrence relation by uk and summing fork = 1, 2, ... , we get 00
(1 - qt) L
00
Pk (t)uk
= pu L
k=1
Pk- 1(t)uk- 1
k=1
and using the initial condition P0 (t) generating function 00
=
t(1 - t)- 1 , we deduce for the double 00
00
P(t,u) = LPk(t)uk = LLPk,rtruk, k=1
the expression
k=lr=1
P(t, u) = t(1- t)- 1 (1- qt- pu)- 1pu.
RECURRENCE RELATIONS
264
Expanding the right-hand side of this expression into powers of u, we get
P(t,u) = t(1- t)- 1 (1- p(1- qt)- 1 u)- 1 p(1- qt)- 1 u 00
= t(1- t)-1 LPk(l- qt)-kuk k=l
and so
Pk(t) = t(1- t)- 1pk(1- qt)-k. Finally, expanding this generating function into powers oft, by using Newton's negative binomial formula, we deduce for the probability Pk,r the expression
Pk,r
=p
k r-1
L
(k + 1) ql.. j k - 1
J=O
Consequently, from the total stake of s dollars, player K might get a share of SPk,r and player R a share of s(1 - Pk,r) dollars. Note that, for p = q = 1/2, the probability Pk,r reduces to the probability derived in Section 2. 7 .I. 0
7.6 BIBLIOGRAPHIC NOTES The first recurrence relation was given in 1202 by Leonardo Fibonacci in his book on abacus (Liber Abaci). This recurrence relation of the Fibonacci numbers is deduced and solved in Example 7.8. The derivation of the solution by using a generating function is due to Abraham De Moivre (1718). E. Lucas (1891) named this sequence of numbers after Fibonacci and also examined the related sequence of Lucas numbers. An extensive coverage of the Fibonacci and Lucas numbers and some of their extensions and generalizations is provided by V. E. Hoggatt (1969). The interest of E. Lucas (1891) in the problem of the Hanoi tower contributed the most in its popularization. The gambler's ruin is an old problem; in 1657, Christian Huyghens' treatise, which was included in the book Ars Conjectandi of J. Bernoulli, discussed the particular case of n = k- n = 12 tokens and pfq = 5/7. Bernoulli considered and solved the general case.
7.7
EXERCISES
1. An amount of a0 = $10,000 is deposited in a bank at the beginning of an interest period at interest rate r. If the interest is compounded each
7. 7. EXERCISES
265
period, show that the amount an on deposit after n periods satisfies the first order linear recurrence relation an+l = (1
+ r)an,
n = 0, 1, ....
Iterate it to derive an. 2. Let an be the number of n-digit nonnegative integers in which no two same digits are consecutive. Show that an+ I
with a 1
= 10.
= 9an,
n
= 1, 2, ...
,
Iterate this recurrence relation to derive an.
3. A player decides to play a series of games against a casino (or against an adversary) until he wins. In any game, if he wins he gets b + 1 times the amount of his stake, while if he looses he stakes a new amount. Let an be the player's stake on the n-th game, n = 1, 2, .... Provided that, if the player wins the n-th game, he gets back not only the stakes he lost in the n- 1 previous games but also an amount a, which is fixed in advance, show that ban= (b+ 1)an-I, n = 2,3, ... , with a 1
= a/b.
Iterate this recurrence to find an.
4. Consider the set of sequences of flips of a coin that are terminated when heads appear for the second time. Let an be the number of such sequences that are terminated before or at the n-th flip. Show that an+l
with a2
= 1.
= an + n,
n
= 2, 3, ...
,
Iterate this recurrence relation to derive an.
5. Let Rn be the number of regions in which a plane can be divided by n lines, each two of them having a point in common but no three of them having a point in common. Show that
Rn = Rn-1
+ n,
n = 2, 3, ...
with R 1 = 2. Further, show that the unique solution of this recurrence relation is given by
6. Let an be the number of n-permutations of the set {0, 1, 2} with repetition that include an even number of zeros. Show that an+l=an+3n, n=1,2, ... ,
RECURRENCE RELATIONS
266
with a 1 = 2. Iterate this recurrence relation to derive an. 7. Assume that the sequence an, n = 0, 1, ... , satisfies the recurrence relation 2(n + 1)an+l = (2n + 1)an, n = 0, 1, ... , with initial condition a0 = 1. Show that its unique solution is given by
= 2!n
an
c:),
n
= 0, 1, ....
8. Let an and bn be the numbers of n-permutations of the set {0, 1, ... , 9} with repetition that include an odd and even number of 5s, respectively. Show that with a 1 = 1, a 2 = 18 and
with b1 = 9, b2 = 82. Note that both sequences an, n = 1, 2, ... , and bn, n = 1, 2, ... , satisfy the same recurrence relation but with different initial conditions. Further, derive the unique solutions a n = ~2 ( 10n - 8n) , n
= 1, 2, ...
and
9. Let an be the number of n-digit nonnegative integers in which no three same digits are consecutive. Show that
with a 1 = 10 and a 2 = 100. Further, show that the unique solution of this recurrence relation is given by an =
9
5 (3)n v'l3 2 { ( 3 + v'l3)n+l -
(3 -
v'l3)n+l} .
10. Let an be the number of n-permutations of the set {0, 1, 2} with repetition and the restriction that no two zeros are consecutive. Show that an+2
= 2an+1 + 2an,
n
= 0, 1, ... ,
7. 7. EXERCISES
267
with ao = 1 and a 1 = 3. Further, show that the unique solution of this recurrence relation is given by an =
4
1 { ( 1 + J3 )n+2 J3
(1-
J3)n+2} .
11. Let an be the number of n-permutations of the set {0, 1, 2} with repetition and the restriction that no two zeros and no two ones are consecutive. Show that an+2 = 2an+l +an, n = 0, 1, ... ,
with a0 = 1 and a 1 = 3. Further, show that the unique solution of this recurrence relation is given by
12. Let
Show that
and thus conclude the recurrence relations: an= 2an-l- an-2, n
= 2,3, ... ,
with a0 = 1, a 1 = 2, and bn with bo
= 1, b1 = 3.
= 2bn-l -
bn-2, n
= 2, 3, ...
'
Solve these recurrence relations to get
an = n
+ 1,
bn = 2n + 1, n = 0, 1, ....
13. Find the unique solution of the recurrence relation
an+l
1
= 4(an+2- an),
with initial conditions a0
n
= 0, 1, ...
,
= 1 and a 1 = 4.
14. Find the general solution of the recurrence relation
RECURRENCE RELATIONS
268
15. Find the general solution of the recurrence relation
16*. Let Qr(n, k) be the number of k-permutations of n with repetition in which no r like elements are consecutive r = 2, 3, .... Show that r-1
Qr(n, k)
= (n- 1) L
Qr(n, k- j), k?. r, Qr(n, k)
= nk,
k
j=1
and ~
Qn,r(t)
nt(1
+ t + ... + tr-2)
= ~ Qr(n, k)tn = 1- (n- 1)t(1 + t + ... + tr-2).
17*. Let fn+ 1(s) be the number of n-permutations of the set {0, 1, ... , s} with repetition and the restriction that no two zeros are consecutive. (a) Derive the recurrence relation fn+1(s)
with initial conditions
hk+1(s) and hk+2(s)
= s{fn(s) + fn-1(s)}, J0 (s)
n
= 1, 2, ... ,
= 1/s, /I(s) = 1. (b) Show that
skt (~)!k-i+1(s), = t (~) =
j=O
J
j=O
J
sk
fk-i+2(s),
k
= 0, 1, ... ,
k
= 0, 1, ....
(c) Derive the generating function 1
00
F(t; s)
= """'fn(s)t = s (1-st- st 2 )" ~ 11
n=O
18*. (Continuation). Showthat [n/2]
fn(s) =
L
(n ~
k)sn-k+ 1, n = 0, 1, ....
k=O
19*. (Continuation). Show that
Jn (8 ) =
1
1
1 sJs(s+4)
{ (
S
+J
S (S
2
+ 4) )
n+
_
( S -
J
S (S
2
+ 4)) n+
}
269
7. 7. EXERCISES
and conclude that
Note that fn(1) = fn, n = 0, 1, ... , are the Fibonacci numbers. 20*. Let fn+I (r, s) be the number of n-permutations of the set W = W 0 + W1 , where N(Wo) = r + 1, N(WI) = s, with repetition and the restriction that no two like elements of W 0 are consecutive. (a) Derive the recurrence relation fn+l(r, s) = (r
+ s)fn(r, s) + sfn-I(s),
with initial conditions fo (r, s) = 1/ s, erating function
h (r, s)
oo
F(t;r,s) =
L
fn(r,s)tn
n=O
= s (1 -
n = 1, 2, ... ,
= 1 and (b) deduce the gen-
(
1- rt )
r
+s
t- st 2
]·
Note that fn(O, 1) = fn, n = 0, 1, ... , are the Fibonacci numbers. 21 *. Fibonacci numbers of order s. Let Fn+l,s be the number of npermutations of the set {0, 1} with repetition and the restriction that no s zeros are consecutive. Show that (a) m
Fn,s = LFn-j,s, m = min{n,s}, n
= 1,2, ...
, Fo,s
= F1,s =
1
j=l
and (b)
= 1,2, ... ,s, Fn-s-l,s, n = s + 1, s + 2, ....
Fn,s = 2n- 1 , n Fn,s = 2Fn-l,s -
(c) Derive the generating function 1
00
Fs (t) =
L Fn,s tn = -1---t---t.,-2-_-,.-.-_-t-s. n=O
22. (Continuation). Show that [n-nfk]
Fn,s=
L
Es-l(n-k,k), n=0,1, ... ,
k=O
where Es-l (r, k) is the number of k-combinations of r with repetition and the restriction that each element appears at most s - 1 times.
RECURRENCE RELATIONS
270
23. Lucas numbers revisited. Let 9o = 2 and 9n, n = 1, 2, ... , be the number of combinations of then numbers {1,2, ... ,n}, displayed on a circle (whence (n, 1) is a pair of consecutive elements), which include no pair of consecutive elements. These numbers satisfy the recurrence relation 9n+2- 9n+1 - 9n
= 0,
n
= 0, 1, ...
with initial conditions 9o = 2, 91 = 1. Show that 00
2-t
G(t) = "'9ntn = ----:::-2 ~ 1- t- t n=O
and conclude that
24*. Lucas numbers of order s. Let Gn,s be the number of cyclic npermutations of {0, 1} with repetition and with one element marked by a star and the restriction that no s zeros are consecutive. Note that, for s = 2, Gn,2 = 9n, n = 0, 1, 2, ... , are the Lucas numbers. Show that (a) s
Gn,s =
L Gn-j,s,
n
= s + 1, s + 2, ... '
Gn,s = 2n - 1, n = 1, 2, ...
'8
j=l
and (b) Gn,s = 2Gn-2,s- Gn-s-I,s, n
= s + 2, s + 3, ....
(c) Derive the generating function
25. Generalized Fibonacci numbers. Let fn+s,s be the number of combinations of then numbers {1, 2, ... , n} possessing the property: between any two elements belonging to such a combination there exist at least s elements of n that do not belong to it. Show that the numbers fn,s, n = s, s + 1, ... satisfy the recurrence relation fn+s,s = fn+s-l,s
+ fn-I,s,
n =
S
+ 1, S + 2, · · ·
with initial conditions fn+s,s = n+ 1, n = 1,2, ... ,s.
7. 7. EXERCISES
Putting fn,s
271
= 1, n = 0, 1, 2, ... , s, show that 1
00
s(t)
=L
Jn,stn
= 1- t- tsH.
n=O
The numbers fn,s, n = 0, 1, ... , which for s = 1 reduce to the Fibonacci numbers, are called generalized Fibonacci numbers.
26. Generalized Lucas numbers. Let gn,s be the number of combinations of then numbers {1, 2, ... , n }, displayed on a circle, possessing the following property: between any two elements belonging to such a combination there exist at least s elements of n that do not belong to it. Show that the numbers gn,s, n = 1, 2, ... , g0 ,s = s + 1, satisfy the recurrence relation gn,s = gn-l,s + gn-s-1,8> n =
S
+ 1, S + 2, ...
with initial conditions go,s = s + 1, gn,s = 1, n = 1, 2, ... 's
and
00
G 8 (t) = ~ gn,stn = L....t
s +1-st . 1 - t - ts+l
The numbers gn,s, n = 0, 1, ... , which for s = 1 reduce to the Lucas numbers, are called generalized Lucas numbers and are connected with the generalized Fibonacci numbers by the relation gn,s = fn,s + sfn-s-l,s, n = s + 1, s + 2, ....
27. Convolution of Fibonacci numbers. Let fn, n = 0, 1, ... , be the sequence of Fibonacci numbers with fo = h = 1. The sequence n 2
fA )=LiJfn-j, n=0,1, ... j=O
is called convolution of the sequence fn, n sequence n
= 0, 1,....
In general, the
1
fAk) = LiJf~~j ), n=0,1, ... , k=2,3, ... , j=O
with JA ) = fn, n = 0, 1, ... , is called k-fold convolution of the sequence fn, n = 0, 1, .... (a) Derive the generating function 1
00
Fk(t) =
L: !Ak)el = (1- t- e)-k n=O
RECURRENCE RELATIONS
272
and deduce the expression
(b) Show that
28. Let Rn,k be the number of regions in which a plane can be divided by n lines, k of them being parallel to each other but no three of them having a point in common. Derive the recurrence relation
Rn,k=Rn-1,k-1+n-k+1, k=1,2, ... ,n, n=2,3, ... , with R 1,0 = R 1,1 = 2 and show that its solution is given by
Rn,k = 1 + (n- k
+ 1)k + ( n- 2k +
1)
·
29. Let Sn be the number of permutations of {1, 2, ... , n} without a succession. Using the recurrence relation
Sn = (n- 1)Sn-1
+ (n- 2)Sn-2, n
= 3, 4, ... , S1 = S2 = 1,
show that
30*. Consider the sum of inverse binomial coefficients:
Sn =
L n
(
~
) -1
, n = 0, 1, ....
k=O
(a) Derive the recurrence relation
2nSn- (n with initial condition S 0
=
+ 1)Sn-1
(
= 1,2, ...
1. (b) Show that
00
S(t) = ~ Sntn =
= 2n, n
1-
t)-1
2
1 ( 1(1- t)- 1 - 2
,
t)- 2
2
log(1- t),
7. 7. EXERCISES
273
and (c) conclude that
Sn
_ n
+1
-
2n
2k
-""'n
L....t k + 1 . k=O
31. Consider the sequences
and let 00
00
n=O
n=l
Show that
A(t)- 1 = tA(t)
+ B(t), B(t)
=
tA(t)
+ tB(t)
and thus, conclude that
A(t) 1- t B( ) t - (1 - t) 2 - t' t = (1 - t) 2
-
t.
32*. Let En be the number of partitions of a finite set of n elements. Show that
tn
L Bn In.= exp(et- 1) 00
B(t) =
n=O and
oo
Bn
n
r ' = e -1 ""' L....t f r.
n
= 0, 1, ....
r=O
33*. Let An be the number of partitions of a finite set of n elements into subsets with an even number of elements. Show that [n/2]
An=
n- 1
L (2 k _ 1) An-2k,
n = 2, 3, ... , Ao = 1, A1 = 0
k=l
and
tn L An I = exp(cosh t- 1), n=O n. 00
A(t) = where cosh t
= (et + e-t)/2 is the hyperbolic cosine oft.
RECURRENCE RELATIONS
274
34. (Continuation). Show that
- -1 An- e
Loo G(r,n) r!
r=O
' n
= 0, 1, ... ,
where G(r, n) is the number of n-permutations of r with repetition and the restriction that each element appears zero or an even number of times. 35*. (Continuation). Let En be the number of partitions of a finite set of n elements into subsets with an odd number of elements. Show that
n _
[(n-1)/2]
En =
~
(
2
1 k ) En-2k-1, n = 1, 2, ... , Eo = 1
and 00
tn E(t) = LEn I = exp(sinh t), n. n=O where sinh t
= (et- e-t)/2 is the hyperbolic sine oft.
36. (Continuation). Show that
En
=~ H(r,n) ~ , r=O
r.1
n
= 0, 1, ... ,
where H(r, n) is the number of n-permutations of r with repetition and the restriction that each element appears an odd number of times. 37*. Ballot numbers revisited. In a ballot between two candidates N and K, N receives n votes and K receives k votes, with n 2: k. Let Xr and Yr be the numbers of votes for N and K, respectively, after the counting of r votes, r = 1, 2, ... , n + k and 1/Jn,k be the number of ways of counting the votes in which Xr 2: Yr, r = 1, 2, ... , n + k. Show that
1/Jn,k = 1/Jn,k-1 + 1/Jn-I,k, k = 1, 2, ... ,n- 1, n = 1, 2, ... , With 1/Jn,n
= 1/Jn,n-1, 1/Jn,O = 1, and 00
'ljJ(t, u)
=L
n
k
L 1/Jn,kt u n=Ok=O
n
=
(1-4tu) 1 12 +2u-1 2(1- t- u)u ·
38*. Delannoy numbers. Let us consider an electoral district in which each voter may vote for, at most, two candidates of the same party and assume that two candidates of the same party N and K receive n and k
7. 7. EXERCISES
275
votes, respectively. The total number D(n, k) of ways of counting the votes is called Delannoy number. (a) Show that D(n, k)
= D(n, k- 1) + D(n- 1, k- 1) + D(n- 1, k),
for k = 1, 2, ... , n = 1, 2, ... , with D(n, 0) generating function 00
G(t, u)
=L
= D(O, k) = 1.
(b) Derive the
00
L D(n, k)tkun = (1- t- u- tu)-
1
n=Ok=O
and conclude that
39*. (Continuation). Let D(n) generating function
=D(n, n), n
= 0, 1, ....
From the
00
Gn(t) =
L D(n, k)tk k=O
and using Lagrange formula, 00
d(t))L:: [dn -----n J(t)gn(t) ] . ; n = J(t) ( 1- u_j!_d n=O dt t=O n. t deduce that
1
t , u = g(t),
00
n=O
and conclude that nD(n)- (6n- 4)D(n -1)
+ (n-
5)D(n- 2) = 0, n = 2,3, ... ,
with D(O) = 1 and D(1) = 3. 40*. Leibnitz numbers. The numbers
k! (n
k
+ 1)k+I'
= 0, 1, ... ,n,
n = 0,1, ...
are called Leibnitz numbers (see Exercise 3.6). Show that L(n, k)
+ L(n, k- 1) = L(n- 1, k- 1),
k
= 1, 2, ...
, n, n
= 1, 2, ...
and G( t, u
k)k n= ) =~~L( L.... L.... n, t u n=Ok=O
-log{(1-u)(1-tu)} u{1 + t(1 - u)} .
ChapterS STIRLING NUMBERS
8.1
INTRODUCTION
The Stirling numbers of the first and second kind, which are the coefficients of the expansions of the factorials into powers and of the powers into factorials, respectively, were introduced by James Stirling in 1730. Since the factorials occupy the same central position in the calculus of finite differences as the powers in the infinitesimal calculus, the Stirling numbers constitute a part of the bridge connecting these two calculi. In the classical occupancy problem, the number of ways of distributing n distinguishable balls into k distinguishable urns so that no urn remains empty was expressed by Abraham De Moivre, in 1718, in the form of a simple sum of elementary terms with alternating sign; it is essentially the Stirling number of the second kind multiplied by k!. The number of different results of a tossing of n distinguishable dice in which each of the k = 6 faces appears (at least once), derived by P. R. Montmort in 1708, probably inspired De Moivre's more general result. The Stirling numbers under different names attracted the attention of several other well-known mathematicians of the 18th and 19th centuries. The classical book of Ch. Jordan (1939a) on the calculus of finite differences revived the interest in these numbers. A variety of applications of the Stirling numbers in combinatorics and in probability theory was provided. The coefficients of the expansion of the generalized factorials into factorials are connected with the Stirling numbers and have applications in combinatorics, in occupancy problems, and probability theory. In this chapter, the Stirling numbers and the generalized factorial coefficients are thoroughly examined. Basic properties, generating functions, explicit expressions and recurrence relations are presented. In the examples many of their applications are discussed. The Stirling numbers have been generalized to several directions. The non-central Stirling numbers are briefly examined in the last section of this chapter.
278
STIRLING NUMBERS
8.2
STIRLING NUMBERS OF THE FIRST AND SECOND KIND
Consider the factorial of t of order n: (t)n = t(t- 1) · · · (t- n
+ 1),
n = 1, 2 ... , (t)o = 1.
(8.1)
Clearly, this is a polynomial oft of degree n. Executing the multiplications and arranging the terms in ascending order of powers oft, we get n
(t)n = Ls(n,k)tk, n=0,1, .... k=O
(8.2)
Inversely, the n-th power oft may be expressed in the form of a polynomial of factorials oft of degree n. Specifically, using (8.1), we get successively the expressions t 0 = (t) 0 = 1, t 1 = (t)l, t 2 = t[1
+ (t-
1)] = (th
+ (t)2,
t 3 = (t)lt + (tht = (t)1[1 + (t- 1)] + (t)2[2 + (t- 2)] = (th + 3(t)2 + (t)J
and, generally, n
tn
=L
S(n, k)(t)k, n
= 0, 1, ....
(8.3)
k=O
Then, the following definition is introduced. DEFINITION 8.1 The coefficients s(n, k) and S(n, k) of the expansions (8.2) and (8.3) of the factorials into powers and of the powers into factorials are called Stirling numbers of the first and second kind, respectively.
Clearly, this definition implies s(n, k) = S(n, k) = 0, k
> n, s(O, 0) = S(O, 0) = 1.
Further, replacing in (8.2) t by -t and, since (t we deduce the expression
+ n- 1)n
= ( -1)n( -t)n,
n
(t
+ n- 1)n =
L is(n, k)it\ n = 0, 1, ... , k=O
(8.4)
where is(n, k)l
= (-l)n-ks(n, k).
(8.5)
8.2. STIRLING NUMBERS OF THE FIRST AND SECOND KIND 279
Note that ls(n, k)l, according to (8.4), as sum of products of n- k positive integers from the set {1, 2, ... , n- 1} is a positive integer (see Theorem 8.1 that follows). The coefficient ls(n, k)l, in expansion (8.4), of the rising factorials into powers, is called signless or absolute Stirling number of the
first kind. Expansions (8.2) and (8.3) readily imply that the Stirling numbers of the first kind are derivatives of factorials and the Stirling numbers of the second kind are finite differences of powers. Specifically, a function f(t) for which the derivatives at zero, [Dk j(t)]t=O, k = 0, 1, ... , exist may be expanded, according to Maclaurin formula, into powers of t as
j(t)
=
t
k=O
[~!Dkj(t)]
_ ·tk. t-0
In the case of the n-th order factorial oft, we have Dk(t)n so
=
(t)n
t [~!Dk(t)n] k=O
_ · tk, n t-0
= 0, k > n, and
= 0, 1, ....
(8.6)
From (8.2) and (8.6) it follows that
[~ Dk(t)n]
s(n, k) =
k.
t=O
, k = 0, 1, ... , n, n = 0, 1,... .
(8.7)
Similarly
1
ls(n,k)l = [k 1 Dk(t+n-1)n]
.
t=O
, k=0,1, ... ,n, n=0,1, .... (8.8)
Further, a function f(t) for which the differences at zero, [.::1k j(t)]t=O, k = 0, 1, ... , exist may be expanded, according to Newton's formula, into factorials of t as
In the case of the n-th power t, we have dktn = 0, k
> n, and so (8.9)
From (8.3) and (8.9) it follows that
S(n, k)
=
[:!dktn
L=O, k = 0, 1, ... , n, n = 0, 1,....
(8.10)
280
STIRLING NUMBERS
THEOREM8.1 The signless Stirling number of the first kind ls(n, k)l. k 2, 3, ... , is given by the sum
I,2, ... ,n, n
(8.11)
where the summation is extended over all (n- k)-combinations {i 1, i2, ... , in-k} of then- I positive integers {I, 2, ... , n- I}. PROOF
According to definition (8.4) of is(n, k)l, we have for n = 2, 3, ... , n
(t
+ I)(t + 2) · · · (t + n- I) = L
is(n, k)itk- 1 .
k=1
Note that the i-th factor of the product of the left-hand side,
Pi(t) = t + i, i = 1, 2, ... , n- 1, is a monomial with constant term i. Executing the multiplications, the (k .:... 1)-th order power oft is formed by multiplying the constant terms of any n - k factors {i 1, i2, ... , in-k}, out of then- I factors {1, 2, ... , n- I}, together with the first order terms t of the remaining k - I factors. Since the coefficient of the first order term t, in any factor, equals one, by the multiplication principle, (8.11) is I deduced. REMARK 8.1 Expression (8.11) of the signless Stirling number of the first kind ls(n, k)l may be transformed as
is(n, k)l = (n- I)!'"' . .
I
.
L..., ]1]2 ... ]k-1
(8.12)
,
where the summation is extended over all (k -I)-combinations {ii, h, ... ,ik-d ofthen-I positive integers {I, 2, ... , n-1 }. Indeed, to each (n-k)-combination {i 1,i2, ... ,in-i.} of {I,2, ... ,n- I}, there uniquely corresponds the (k- I)combination {j 1, h, ... ,ik-d = {I, 2, ... , n-I}- {i 1, i 2, ... , in-k} and vice versa. Therefore . . ... . _ ( _ I) I Z1 Z2 ···in-k _ ( _ I)! I Zn-k - n ·I · 2 · · · (n- I) - n ·· · · · J1]2 · · · Jk-1
2122
Introducing this expression into (8.11 ), (8.12) is deduced.
I
The Stirling numbers of the first and second kind constitute a pair of orthogonal bivariate sequences. This is shown in the next theorem.
8.2. STIRLING NUMBERS OF THE FIRST AND SECOND KIND 281
THEOREM8.2 The Stirling numbers of the first and second kind satisfy the following orthogonality relations: n
n
= 15n,k,
L s(n, r)S(r, k) r=k
L S(n, r)s(r, k) r=k
= 15n,k,
(8.13)
where 15n,k = 1, if k = n and 15n,k = 0, if k ,P n is the Kronecker delta. PROOF Expanding the n-th order factorial oft into powers oft, by using (8.2), and in the resulting expression expanding the powers of t into factorials of t, by using (8.3), we get the relation n
(t)n
= =
r
n
L s(n, rW r=O
=L
s(n, r) L S(r, k)(t)k r=O k=O
~ {~ s(n, r)S(r, k)} (t)k,
which implies the first of (8.13). Similarly, expanding the n-th power of t into factorials of t and, in the resulting expression, expanding the factorials of t into I powers oft, we deduce the second of (8.13). Note that, for fixed n, the (usual) generating function of the sequence of Stirling numbers of the first kind s(n, k), k = 0, 1, ... , n, according to (8.2), is given by n
sn(t)
=L
s(n, k)tk
= (t)n,
n
= 0, 1, ...
,
k=O
while, the factorial generating function of the sequence of Stirling numbers of the second kind S(n, k), k = 0, 1, ... , n, according to (8.3), is given by n
Sn(t)
=L
S(n, k)(t)k
= tn,
n
= 0, 1, ....
k=O
Further, from (8.2), using Newton's general binomial theorem, we deduce the double generating function oo
n
n
g(t,u) = L L s(n, k)tk; = (1 n=O k=O n.
+ u)t,
(8.14)
while from (8.3) we get oo
f(t,u)
n
n
= LLS(n,k)(t)k; = et". n. n=Dk=O
(8.15)
STIRLING NUMBERS
282
The exponential generating functions of the sequences s(n, k), n = k, k + 1, ... , and S(n, k), n = k, k + 1, ... , for fixed k, are derived in the next theorem.
THEOREM8.3 (a) The exponential generating function of the Stirling numbers of the first kind s(n, k), n = k, k + 1, ... , for fixed k, is given by ~ un [log(1 + u)jk gk(u)=Ls(n,k) 1 = k' ,k=0,1,., .. n. . n=k
(8.16)
(b) The exponential generating function of the Stirling numbers of the second kind S(n, k), n = k, k + 1, ... .for fixed k, is given by
un (eu- 1)k S(n, k)! = , k = 0, 1,. n. k!
L 00
!k(u) =
n=k PROOF
o o
•
(8.17)
(a) Interchanging the order of summation in (8.14), we get
and since
g(t,u) = (1
+ u)t
= exp{tlog(1
+ u)}
~ [log(1 + u)Jk = L k! tk,
k=O we deduce (8.16). (b) Similarly, interchanging the order of summation in (8.15), we get oo
f(t, u)
=L
n
oo
L
k=On=k
S(n, k);(t)k n.
oo
=L
fk(u)(t)k
k=O
and since
f(t,u) = [1
+ (eu-
1W =
L 00
k=O (8.17) is established.
(
!
)
00
(eu- 1)k =
L
(
e
u
~! 1)k (t)k,
k=O
I
The generating functions of the signless Stirling numbers of the first kind may be obtained from the corresponding generating functions of the
8.2. STIRLING NUMBERS OF THE FIRST AND SECOND KIND 283
numbers s(n, k) by using (8.5). Thus, from the first part of Theorem 8.3, we deduce the following corollary. COROLLARY 8.1 The exponential generating function of the signless Stirling numbers of the first kind is(n, k)l. n = k, k + 1, ... ,for fixed k, is given by ~
hk(u) = L
un
[-log(1- uW k! , k = 0, 1, ....
is(n, k)l n! =
(8.18)
n=k
In the following example, a probabilistic application of the signless Stirling numbers of the first kind is given. Example 8.1 Bernoulli trials with varying success probability Suppose that balls are successively drawn one after the other from an urn initially containing m white balls, according to the following scheme. After each trial the drawn ball is placed back in the urn along with s black balls. Determine (a) the probability p( k; n) of drawing k white balls in n trials and (b) the probability q( n; k) that n trials are required until the k-th white ball is drawn. (a) Let Aj be the event of drawing a white ball at the j -th trial, j = 1, 2, ... , n. Then, setting() = m/ s, we get ()
Pi
= P(Aj) = () + j
_ 1,
qi = P(Aj) = 1- P(Aj) = ()
j- 1 .
+J- 1
, j = 1,2, ... ,n
and P(A )1· A-)2 · · · A-)k A')k+l · · · A')n ) = P(A-)1 )P(A-)2 ) · · · P(A-)k )P(A')k+l ) · · · P(A')n ) ()k
(0+n-1)n
Uk+l- 1)(jk+2- 1) · · · Un-
1).
Therefore, the probability p( k; n) of drawing k white balls in n trials is given by the sum ()k
p(k; n) = (()
+ n _ 1)n LUk+l -
1)(jk+2 - 1) · · · Un- 1),
where, since in the first trial the probability of drawing a black ball is q1 = 0, the summation is extended over all (n- k)-combinations {jk+l, Jk+ 2, ... , Jn} of the
STIRLING NUMBERS
284 n-1 positive integers {2, 3, ... , n }. Puttingim and using (8.11 ), we get
. )=
p (k , n
ls(n, k)IBk (B + n _ 1)n, k
= ik+m -1, m = 1, 2, ... , n-k,
= 1, 2, ... , n.
Note that, according to (8.4), these probabilities sum to unity. (b) The probability q( n; k) that n trials are required until the k-th white ball is drawn equals the probability p( k - 1; n - 1) of drawing k - 1 white balls in n - 1 trials multiplied by the probability Pn = P(An) = () /(0 + n- 1) of drawing a white ball at the n-th trial. Therefore
·k)= ls(n-1,k-1)10k ( qn, (O+n-1)n 'n=k,k+1, ....
0
An interesting application of the orthogonality property of the Stirling numbers is presented in the following example.
Example 8.2 Inverse relations Consider a sequence of real numbers Xk, k = 0, 1, ... , and let r
Yr=Lar,kXk, r=0,1, ... , k=O
where ar,k. k = 0, 1, ... , r, r = 0, 1, ... , are given coefficients. If there exist coefficients bn,r• r = 0, 1, ... , n, n = 0, 1, ... , orthogonal to the coefficients ar,k. k = 0, 1, ... , r, r = 0, 1, ... , n
L
bn,rar,k = 8n,k,
r=k
then
and so
n
Xn
=L
bn,rYr, n
= 0, 1,
0
0
0
°
r=O
The expressions of Yr. r = 0, 1, ... , in terms of Xk, k = 0, 1, ... , r, and inversely of Xn, n = 0, 1, ... , in terms of Yr· r = 0, 1, ... , n constitute a pair of inverse relations. Similarly if 00
Ur = Lan,rWn, r = 0,1, ... ' n=r
8.2. STIRLING NUMBERS OF THE FIRST AND SECOND KIND 285
and
n
L an,rbr,k = 8n,k, r=k then
00
Wk = Lbr,kUr, k=8,1, .... r=k In conclusion, every pair of orthogonal sequences entails a pair of inverse relations. According to Theorem 8.2, the Stirling numbers of the first and second kind constitute a pair of orthogonal sequences. Consequently, if r Yr = L s(r, k)xk, r = 0, 1, ... , k=O then
n Xn = L S(n,r}yr, n = 0, 1, ... r=O
and inversely. Also, if 00
s(n, r)wn, r = 0, 1, ... ,
Ur = L n=r
then 00
Wk = L S(r, k)ur, k = 0,1, ... r=k and inversely.
0
Example 8.3 Connection of ordinary and factorial moments Consider a sequence aj, j = 0, 1, ... (of numbers with a combinatorial interpretation or probabilities or masses). The r-th order (power) moment J.L~ and the r-th order factorial moment J.L(r) of this sequence are defined by 00
00
J.L~ = L raj, J.L(r) = 2:U)raj, r = 0, 1, .... j=O j=O Using (8.2), the r-th order factorial moment Jl(r) may be expressed as ~
J.L(r) and so
r
r
=L
L s(r, k)/aj j=Ok=O
=L k=O
~
s(r, k) L jka1 j=O
r
Jl(rJ=Ls(r,k)J.L~, r=0,1, .... k=O
STIRLING NUMBERS
286
In the same way, using (8.3), we conclude that n
J.l~ = LS(n,r)J.L(r)• n = 0, 1, .... r=O
Note that these two relations constitute a pair of inverse relations.
0
Example 8.4 The operator e = tD In the infinitesimal calculus, besides the usual derivative operator D, the operator e = tD is frequently used. Express the operator e in terms of the operator D. Clearly, e J(t) = tD J(t),
e
2
f(t) = e(ej(t)) = tD(tDf(t)) = tDf(t)
+ t 2 D 2 f(t),
e 3 f(t) = e(e 2 f(t)) = tD(tDf(t) + t 2 D 2 f(t)) = tDf(t)
+ 3t 2 D 2 f(t) + t 3 D 3 f(t)
and, generally, n
en f(t) =
L Cn,rtr Dr f(t), r=l
where the coefficients Cn,r• r = 1, 2, ... , n are independent of the function f(t). Thus, for their determination the most convenient function can be chosen. Let f(t) = tu, whence
Consequently,
r=l
and,accordingto(8.3),Cn,r
= S(n,r),r = 1,2, ... ,n. Thus n
en f(t) =
L S(n, rW Dr f(t). r=l
The inverse of this relation (see Example 8.2) is r
Dr f(t) = cr
L s(r, k)ek f(t).
D
k=l
Example 8.5 The operator .P = t..:l In the calculus of finite differences, besides the usual difference operator Ll, the operator lJt = tLl is frequently used. Express the operator lJt in terms of the operator Ll.
8.2. STIRLING NUMBERS OF THE FIRST AND SECOND KIND 287
Clearly,
t/1 f(t)
= t11f(t), + (t + 1)211 2 f(t),
2
t/1 f(t) = t/l(t/1 f(t)) = t11(t11f(t)) = t11f(t)
+ (t + 1)2112 f(t)) = t11f(t) + (t + 1)211 2 f(t) + (t + 2)311 3 f(t)
t/1 3 f(t) = t/l(t/1 2 f(t) = t11(t11f(t)
and, generally, n
t/ln f(t) =
2:: Bn,r(t + r- 1)r11r f(t), r=1
where the coefficients Bn,r• r = 1, 2, ... , n are independent of the function f(t). Thus, for their determination the most convenient function can be chosen. Let f(t) = (t + u- 1)u, whence
t/ln(t
+ U - 1)u = un(t + U - 1)u, 11r(t + U - 1)u = (u)r(t + U - 1)u-r·
Consequently,
r=1 and, according to (8.3), Bn,r = S(n, r), r
= 1, 2, ...
, n. Thus
n
t/lnf(t) = l:S(n,r)(t+r-1)r11rf(t). r=1 The inverse of this relation (see Example 8.2) is 1
11r f(t) = (
r
) "'s(r, k)t/lk f(t).
t+r-1rL k=1
0
Example 8.6 Convolution of a logarithmic distribution The probability function of a logarithmic distribution is
on
Pn=[-log(1-B)]- 1 - , n=1,2, ... , 0<8<1. n The generating function ofthe sequence of probabilities Pn• n = 1, 2, ... , is readily obtained as oo
h(u) = l:Pntn = [-log(1- 8)]- 1 =1
(8 )n 2:: _u_ oo
=1 1
= [-log(1- B)]- [-log(1- Bu)].
n
STIRLING NUMBERS
288 Therefore, if Pn(k), n = k, k 1, 2, ... , then
+ 1, ... ,
is the k-fold convolution of Pn. n =
00
2: Pn(k)tn = [h(u)]k = [-log(1- O)]-k[-log(1- Ou)]k.
hk(u) =
n=k
Using (8.14), we deduce the expression of the probability function
Pn(k)
on = [-log(1- O)r 1 k!Js(n, k)J,, n.
n
= k, k + 1, ....
The exponential generating function
of the factorial moments 00
J.L(r)(k) = l:(n)rPn(k), r = 0, 1, ... , n=k
of the k-fold convolutionpn(k), n = k, k + 1, ... , of the logarithmic distribution, is connected with the generating function hk (u) by the relation bk (u) = hk (u + 1). Therefore, using (8.14 ), we successively get
bk(u) = (1 =
+ [-log(1- O)r 1 [-log(1- 0(1- 0)- 1 u)l)k
f
(~) [-Iog(1- O)rj[-log(1- 0(1- o)-
j=O
1
u)]j
J
00
00
or
r
=
~(k)j[-log(1- 0)]-j ~s(r,j) (1- oy ~!
=
~
or
oo {
min{r,k}
}
( _ O)r
~
(k)jis(r,j)l[-log(1-
or
min{r,k}
f;
(k)jis(r,j)l[-log(1- 0)]-J,
1
o)rj
and so J.L(rJ(k) = ( _ O)r 1 for r = 0, 1,. . . .
D
.
r
~!
8.3.
EXPLICIT EXPRESSIONS AND RECURRENCES
8.3
EXPLICIT EXPRESSIONS AND RECURRENCE RELATIONS
289
An explicit expression of the Stirling numbers of the second kind is deduced in the following theorem. THEOREM8.4 The Stirling number of the second kind S(n, k), k = 0, 1, ... , n, n = 0, 1, ... , is given by the sum
;! ~( k
S(n, k) =
-1)k-r (
~) rn.
(8.19)
PROOF Expanding the generating function (8.17) into powers of u, we get the expression
= 2_ ~(- 1 )k-r k! L
r=O
=
f {;!
n=O
which implies (8.19).
(k)r ~rnun L n! n=O
t(-1)k-r r=O
(~) rn} :~,
I
REMARK 8.2 The explicit expression (8.19) of the Stirling numbers of the second kind may also be deduced from (8.1 0), by using the expression of the k-th power of the difference operator in terms of the shift operator,
Thus
and, since [Ertn]t=O = rn, (8.19) is deduced.
I
STIRLING NUMBERS
290
The Stirling numbers of the second kind, according to Theorem 8.4, are expressed in the form of a single summation of elementary terms, which are products and quotients of factorials and powers. There does not exist an analogous expression for the Stirling numbers of the first kind. An expression of the Stirling numbers of the first kind in the form of a single summation of terms that are products of binomial coefficients and Stirling numbers of the second kind is derived in the next theorem due to Schlomilch (1852). For the Stirling numbers of the first kind, it leads to an expression in the form of a double summation of elementary terms. THEOREM 8.5 Schlomilch 's formula The Stirling numbers of the first kind are expressed in terms of the Stirling numbers of the second kind by
n-k ( n + r -1 s(n,k)=~(-1Y k- 1 )
( 2n- k n-k-r)s(n-k+r,r). (8.20)
PROOF The power series t = ¢- 1 (u) = log(1 + u) is the inverse ofthe power series u = ¢(t) = et- 1, with ¢(0) = 0. Thus, by (8.16) and applying Lagrange inversion formula (see Theorem 11 .11 ),
1 [ dn _ 1 k] dun(¢ (u)) u=O =
k!
(n- 1) [ dtn-k dn-k (¢(t)) -nl -tk- 1
t=O'
we get
k] (n-1) [dn-k (et-1)-n] 1 [dn s(n, k) = k! dun (log(1 + u)) u=O = k- 1 dtn-k - t t=O. Since (see Remark 11.5)
for sa real number and h(t) a function with h(O) = 1, for which the derivatives at zero exist, we deduce the expression
s(n,k)=
( ) ( 2 (~=11) n-k ~ ~n n:::;_r
T 1) r]
k ) [ dn-k ( t _
dtn-k
Further, by (8.17), we have
r -- L
(et - 1
t
r
' tn-r r.S(n, r ) n.1 n=r 00
L r.S(J + r, r) ("J +tJ r )',. 00
j=O
'
•
t=O·
8.3.
EXPLICIT EXPRESSIONS AND RECURRENCES
whence
dn-k [
dtn-k
(et-1)r] t
t=O
291
=S(n-k+r,r) ( ~+
n- r)
and so, using the relation
we conclude (8.20). REMARK 8.3
I
Schlomilch's formula (8.20), by replacing k by n- k and since
(-1)ks(n,n- k) = ls(n,n- k)l, n+r-1) (k+n) = (- 1)k+r (k-n) (k+n), ( n-k-1 k-r k+r k-r may be rewritten in the following symmetric form
is(n,n-k)l=~ k
(
k-n k+n k+r) (k-r ) S(k+r,r).
The inverse of this relation is given in Exercise 2.
I
Introducing expression (8.19) into Schlomilch's formula (8.20), we conclude the following corollary.
COROLLARY 8.2 The Stirling number of the first kind s(n, k), k is given by the double sum
s(n, k)
= ~ ~( -1)j (~) L.... L....
r=Oj=O
J
(n + r-
k - 1
= 0, 1, ... , n,
1) (n 2nk ) r k -
n
= 0, 1, ... ,
jn-k+r. (8.21) r!
Expressions of the Stirling numbers s(n, k) and S(n, k) as multiple sums over all compositions, as well as over all partitions of n into k parts, are derived in the following theorem.
THEOREM8.6 The Stirling numbers of the first and second kind s(n, k) and S(n, k) are given by
n!L
ls(n, k)l = k!
1 T1 • T2 · · · Tk
(8.22)
STIRLING NUMBERS
292
and
1 , S(n,k) = n!""' k! ~ r1 lr2! · · · rk!
(8.23)
respectively, where the summation in both sums is extended over all nonnegative integer solutions of the equation r1 + r2 + · · · + Tk = n. Alternatively, (8.24)
and (8.25)
respectively, where the summation in both sums is extended over all nonnegative integer solutions of the equations k1 + 2k2 + · · · + nkn = n and k1 + k2 + · · · + kn = k. PROOF The exponential generating function of the singless Stirling numbers of the first kind (8.18), upon using the expansion -log(1 - u) = 1 ur /rand then the Cauchy rule of products of series, may be written as
I:::
00
~
n-k
00
un 1 ( ur) k 1 is(n, k)i n! = k! ~-;: = k! T-1
00
k
!_J
t-1
(
~
T;-1
ur•) -;::
yielding (8.22). Similarly, the exponential generating function ofthe Stirling numbers of the second kind (8.17) may be expressed as
yielding (8.23). Using the multinomial theorem instead of the Cauchy rule, the generating functions (8.18) and (8.17) may be expressed as
L oo
hk(u) =
un 1 ( is(n, k)i n! = k! u +
u2
un
2 + · ·· + ~ + · ··
)
k
n=k
=
~ { L: k1lk2~·'· ·kn! (~rl (~r, ···(~) kn} :~,
8.3.
293
EXPLICIT EXPRESSIONS AND RECURRENCES
and
un
oo
fk(u)
u2
1 (
= n=k LS(n,k)f = k' n. .
un
21. + ·.·· + 1n. + ···
u+
) k
00
=~
{
L
n! ( 1 ) kt ( 1 ) k2 ( 1 ) kn } un k1!k2! ···kn! 1! 2! ... n! n!'
I
yielding (8.24) and (8.25), respectively.
In the next theorem, triangular recurrence relations of the Stirling numbers of the first kind and second kind are deduced.
THEOREM8.7 (a) The Stirling numbers of the first kind s(n, k), k satisfy the triangular recurrence relation s(n fork = 1, 2, ... , n
+ 1, k)
+ 1, n
= 0, 1, ...
, n, n
= 0, 1, ... , (8.26)
= s(n, k- 1)- ns(n, k),
= 0, 1, ... , with initial conditions
s(0,0)=1, s(n,O)=O, n>O, s(n,k)=O, k>n.
(b) The Stirling numbers of the second kind S(n, k), k 0, 1, ... , satisfy the triangular recurrence relation
S(n fork = 1, 2, ... , n
+ 1, k)
+ 1, n
= S(n, k- 1)
0, 1, ... ,n, n
+ kS(n, k),
(8.27)
= 0, 1, ... , with initial conditions
S(O, 0) = 1, S(n, 0) = 0, n
> 0, S(n, k)
= 0, k
> n.
PROOF (a) Expanding both members of the recurrence relation (t)n+I (t- n)(t)n into powers oft, according to (8.2), we get the relation
n+l L s(n k=O
n
+ 1, k)tk = (t- n) L
s(n, rW
r=O n+l n = Ls(n,k -1)tk- L:ns(n,k)tk,
k=O which implies (8.26). The initial conditions follow directly from (8.2). (b) Expanding both members of the recurrence relation tn+I = t · tn into factorials oft, according to (8.3 ), we have k=l
n+l L S(n k=O
n
+ 1, k)(t)k = t L
S(n, r)(t)r·
STIRLING NUMBERS
294 Since (t)r+l
= (t- r)(t)r. whence t(t)r =
(t)r+l + r(t)r, we deduce the relation
n+l
n
n
k=O
r=O
r=O
L S(n + 1, k)(t)k = L S(n,r)(t)r+l + L rS(n,r)(t)r n+l
=L
n
S(n, k- 1)(t)k
+L
kS(n, k)(t)k,
k=O
k=l
I
which implies (8.27). The initial conditions follow directly from (8.3).
Multiplying the triangular recurrence relation (8.26) by ( -I)n-k+I and using (8.5), we deduce the following corollary.
COROLLARY 8.3 The signless Stirling numbers of the first kind ls(n, k)l, k 0, 1, ... , satisfy the triangular recurrence relation ls(n fork
+ 1, k)l = ls(n, k-
1)1
= 0, 1, ...
, n, n
+ nls(n, k)l,
=
(8.28)
= 1, 2, ... , n + 1, n = 0, 1, ... , with initial conditions ls(O,O)I
= 1,
ls(n,O)I = 0, n > 0, ls(n,k)l
= 0, k > n.
The signless Stirling numbers of the first kind ls(n, k)l can be tabulated by using the triangular recurrence relation (8.28) and its initial conditions. Table 8.1 gives the numbers ls(n, k)l, k = 1, 2, ... , n, n = 1, 2, ... , 9.
Table 8.1
k
Signless Stirling Numbers of the First Kind ls(n,k)l
1
2
3
4
5
6
7
8 9
n I
2 3 4 5
6 7 8 9
1 1 2 6 24 120 720 5040 40320
I
3
I
11
6 35 225 1624 13132 188124
50 274 1764 13068 109584
I 10
I
85 735 6769 67284
15 175 1960 22449
1 21 I 322 28 4536 546
I
36
1
8.3.
EXPLICIT EXPRESSIONS AND RECURRENCES
295
The Stirling numbers of the second kind S(n, k) can also be tabulated by using the triangular recurrence relation (8.27) and its initial conditions. Table 8.2 gives the numbers S(n, k), k = 1, 2, ... , n, n = 1, 2, ... , 10.
Table 8.2 Stirling Numbers of the Second Kind S(n, k) k
n 1 2 3 4 5 6 7 8 9 10
1
2
3
4
5
6
7
8
9
10
1 1 1 1 3 1 1 6 1 7 25 1 15 1 10 1 15 1 31 90 65 21 301 140 1 1 63 350 966 266 28 1 1 127 1701 1050 2646 462 1 7770 6951 36 1 255 3025 1 511 9330 34105 42525 22827 5880 750 45
1
Vertical and horizontal recurrence relations of the Stirling numbers of the first and second kind are derived in the following theorems. THEOREM8.8 The Stirling numbers of the first kind s(n, k), k = 0, 1, ... , n, n = 0, 1, ... , with s(O, 0) = 1, satisfy (a) the vertical recurrence relation n
s(n + 1, k
+ 1) = L( -1)n-r(n)n-rs(r, k)
(8.29)
r=k
and (b) the horizontal recurrence relation
s(n+1,k+1)
= ~(-1r-k (~) s(n,r).
(a) According to (8.2), for n = 0, 1, ... and since s(n
PROOF
(8.30)
+ 1, 0)
we have n
L k=O
s(n + 1, k + 1)tk
= (t- 1)(t- 2) · · · (t- n) = (t- 1)n·
= 0,
STIRLING NUMBERS
296
Expanding (t- 1)n into factorials oft by Vandennonde's formula,
(t- 1)n we find
= ~ ( ~) (-1)n-r(t)r = ~( -1)n-r(n)n-r(t)r,
n
L
n
= L( -l)n-r(n)n-r(t)r·
s(n + 1, k + 1)tk
r=O
k=O
Further, expanding the factorials in the right-hand side into powers oft, by using (8.2), we get the relation n
n
r
k=O
r=O
k=O
L s(n + 1, k + 1)tk = L( -1)n-r(n)n-r L
s(r, k)tk
from which (8.29) is deduced. (b) Differentiating the generating function (8.16),
un+l
oo
[log(1 + u)]k+l (k+ 1)! ,
~s(n+1,k+1)(n+ 1 )! = we get
~ (
L.....t s n + 1' n=k
k
)un = (1+u)- 1 [log(1+u)Jk k!
+ 1 n!
and so
un
oo
~s(n+1,k+1)n! = =
e-log(l+u)[log(1 + u)]k k!
~( _ 1r_dlog(1 +
~
uW
(r- k)!k!
Expanding the terms of the last member of this relation into powers of u, by using (8.16), and interchanging the order of summation, we deduce the relation n
n
~s(n+1,k+l):! =~(-1r-k ~ ~s(n,r):! oo
oo
= which implies (8.30).
I
(
)
oo
~ {~(-1r-k (~) s(n,r)} :~,
8.3.
EXPLICIT EXPRESSIONS AND RECURRENCES
297
THEOREM8.9 The Stirling numbers of the second kind S(n, k), k = 0, 1, ... , n, n with S(O, 0) = 1, satisfy (a) the vertical recurrence relation
S(n
't (~)
+ 1, k + 1) =
= 0, 1, ... , (8.31)
S(r, k)
r=k and (b) the horizontal recurrence relation n
S(n, k) = 2:)-1t-k(r)r-kS(n + 1,r + 1). r=k
PROOF
(8.32)
(a) According to (8.3), for n = 0, 1, ... and since S(n
we have
+ 1, 0)
= 0,
n
L
S(n
+ 1, k + 1)(t + 1)k+l = (t + 1)n+l.
k=O Further, since (t
+ 1)k+I = (t + 1)(t)k, we conclude that n
L S(n k=O
+ 1, k + 1)(t)k =
(t
+ 1)n.
Expanding the right-hand side into powers oft, by Newton's binomial formula, and in the resulting expression, expanding the powers into factorials, by using (8.3), we successively get
~ S(n + 1, k + 1)(t)k = ~ ( ~) ~ S(r, k)(t)k =
~ {~ ( ~) S(r,k)} (t)k,
yielding (8.31). (b) Multiplying the recurrence relation
S(n
+ 1, r + 1) =
+ (r + 1)S(n, r + 1) k, k + 1, ... , n, since S(n, n + 1)
S(n, r)
by ( -1Y-k(r)r-k and summing for r = we get
= 0,
n
L( -1t-k(r)r-kS(n + 1, r r=k
+ 1)
n
n-1
= L( -1t-k(r)r-kS(n,r) + L( -1t-k(r + 1)r+I-kS(n,r + 1) r=k n
= L(-1t-k(r)r-kS(n,r)r=k
r=k n
L (-1)j-k(j)j-kS(n,j) j=k+l
= S(n,k),
STIRLING NUMBERS
298
I
establishing (8.32).
The triangular recurrence relation (8.27) can be used for the determination of the (power) generating function of the sequence of the Stirling numbers of the second kind S(n, k), n = k, k + 1, ... , for fixed k. This generating function (a) suitably expanded leads to an interesting expression of the numbers S(n, k) and (b) transformed yields the expansion of the inverse factorials into inverse powers. Specifically, we have the following theorems.
THEOREM 8.10 The (power) generatingfunction ofthe Stirling numbers ofthe second kindS (n, k ), n = k, k + 1, ... ,for fixed k, is given by k
00
IT
(8.33)
= k- 1, k, ... , since
00
00
L S(n+1,k)un+ 1 =u L S(n,k-1)un+kuLS(n,k)un, n=k-1 n=k-1 n=k fork= 1, 2, .... Consequently, ¢k(u)
= u
k
= 1, 2, ...
and
¢k(u) = u(1- ku)- 1
¢k(u) = u 2(1- ku)- 1 (1- (k- 1)u)- 1 ¢k-2(u) = · · · = uk(1- ku)- 1 (1- (k- 1)u)- 1 · · · (1- u)- 1 ¢o(u) and since, according to the initial conditions of (8.27) ¢ 0 (u) = 1, we deduce (8.33). I
THEOREM 8.ll The Stirling number of the second kind S(n, k), k given by the sum
= 0, 1, ...
, n, n
= 0, 1, ... , is (8.34)
8.3.
EXPLICIT EXPRESSIONS AND RECURRENCES
299
where the summation is extended over all integers Tj 2: 0, j = 1, 2, ... , k, with r1 + r2 + · · · + Tk = n - k, or equivalently by the sum (8.35)
where the summation is extended over all (n- k )-combinations {i 1 , i 2 , ••. , in-k} with repetition of the k positive integers {1, 2, ... , k }. PROOF
Expanding each factor in (8.33) by using the geometric series, we find
=
f {:~::::>r12r2 ...
krk} un,
n=k
where, in the inner sum, the summation is extended over all integers Tj 2: 0, j = 1, 2, ... , k, with r 1 + r 2 + · · · + Tk = n- k. This relation implies (8.34), as well as its equivalent expression (8.35). I THEOREM 8.12 (a) The inverse factorial (t)-k. k = 1, 2, ... , is expanded into a series of inverse powers t-n, n = k, k + 1, ... , as 00
(t)-k = z)-1)n-ks(n,k)cn, k = 1,2, ... , t > k. n=k
(8.36)
(b) The inverse power ck, k = 1, 2, ... , is expanded into a series of inverse factorials (t)-n. n = k, k + 1, ... , as 00
ck = z)-1)n-ks(n,k)(t)-n, k = 1,2, .... n=k PROOF
(a) Setting u = -1/t in (8.33), we get
f(-1)nS(n,k)Cn n=k
=
(-1)k + k}k
(t
and, since (t)-k = 1/(t + k)k, k = 1, 2, ... , we conclude (8.36). (b) Multiplying both members of the expansion 00
(t)-n =
L( -1r-ns(r, n)cr r=n
(8.37)
STIRLING NUMBERS
300 by ( -l)n-k s(n, k) and summing for n 00
= k, k + 1, ... , we find
00
2:(-1)n-ks(n,k)(t)-n n=k
00
= 2: 2:(-1)'"-nS(r,n)s(r,k)t_,. n=k r=n =
~( -1)'"-k {~ S(r, n)s(n, k)} t-'".
By the second of the orthogonality relations (8.13), it holds
,.
2: S(r, n)s(n, k) = o,.,k n=k and so
00
00
n=k
r=k
I
which implies (8.37).
REMARK8.4 Expansion (8.36), by replacingt by -t and since ( -1)k( -t)-k 1/(t- 1)k, may be transformed to the expansion 1
00
t k+l
n=k
1
-()- = l:S(n,k)-1 , tn+
k= 1,2, ... , t
=
> k.
Similarly, (8.37) may be rewritten as
1 k1 t +
00
1
n=k
(t n+l
= 2: s(n, k)-)-,
k
= 1, 2, ...
or
1 k1 t +
00
= 2: is(n, k)l ( n=k
1 t
+n
)
n+l
,k
= 1, 2, ...
Note that, according to the last expansion, the probabilities q(n; k), n = k, k ... , derived in the second part of Example 8.1, also sum to unity. I
+ 1,
Example 8.7 A Markov chain Suppose that balls are successively drawn one after the other from an urn initially containing m white balls, according to the following scheme. After each trial, if the drawn ball is white, a black ball is placed in the urn, while if the drawn ball is black, it is placed back in the urn. Determine (a) the probability p(k; n) of drawing k white balls inn trials, with n :::; m, and (b) the probability q(n; k) that n trials are required until the k-th white balls is drawn, with k :::; m.
8.4. GENERALIZED FACTORIAL COEFFICIENTS
301
(a) The probability of drawing a white ball at any trial, given that j white balls are drawn in the previous trials, is given by PJ = (m- j) /m j = 0, 1, ... , n -1. Then the probability p(k; n) of drawing k white balls inn trials satisfies the triangular recurrence relation m-k+1 k p(k;n) = -p(k;n- 1) + p(k -1;n -1), m m fork = 1, 2, ... , n, n = 1, 2, ... , with initial conditions p(O;O) = 1, p(O;n) = 0, n
> 0,
p(k;n) = 0, k
> n.
Further, since p(1; n) = m/mn and p(n; n) = (m)n/mn, we may set (m)k p(k;n) = Cn,k mn , k = 0, 1, ... ,n.
Then the coefficient Cn,k satisfies the triangular recurrence relation Cn,k = kCn-1,k +
Cn-1,k-1
1
k = 1, 2, ... , n, n = 1, 2, ... ,
with initial conditions Co,o = 1, Cn,o = 0, n
> 0,
Cn,k = 0, k
> n.
Comparing this recurrence with the triangular recurrence relation (8.27) of the Stirling numbers of the second kind, we get Cn,k = S(n, k) and so p(k;n)=
S(n, k)(m)k ,k=1,2, ... ,n. mn
Note that, according to (8.3), these probabilities sum to unity. (b) The probability q(n; k) that n trials are required until the k-th white ball is drawn equals the probability p(k- 1; n- 1) of drawing k- 1 white balls inn- 1 trials multiplied by the probability Pk- 1 = (m- k + 1)/m of drawing a white ball at the n-trial, given that the k - 1 balls are drawn in the previous trials. Thus q(n; k) =
S(n- 1, k- 1)(m)k , n = k, k mn
+ 1, ....
Note that these probabilities, according to the first expansion in Remark 8.4, also sum to unity. D
8.4
GENERALIZED FACTORIAL COEFFICIENTS
Consider the generalized factorial oft of order n and scale parameters, (st)n = st(st- 1) · · · (st- n + 1), n = 1, 2, ... , (st)o = 1,
(8.38)
STIRLING NUMBERS
302
with s a real number. This can be expressed as a polynomial of factorials oft of degree n. Specifically, we successively get the expressions
= (t)o = 1,
(st)o
= s(t)l,
(st)l
(st)2 = st[s(t- 1) + (s- 1)] = s 2 (t)2
+ (s)2(t)l,
(st)J = s 2 (t)2[s(t- 2) + 2(s- 1)] + (s)2t[s(t- 1) + (s- 2)] = s 3 (t)3 + 3s(s)2(t)2 + (s)J(t)l and, generally, n
L C(n, k; s)(t)k,
(st)n =
n = 0, 1, ....
(8.39)
k=O In particular, for s = -1 and introducing the coefficient L( n, k) C(n, k; -1), we deduce the expression
=
n
( -t)n
=L
L(n, k)(t)k, n
= 0, 1, ....
(8.40)
k=O Further, since ( -t)n (-1)nL(n,k), we get
(-l)n(t
+
n- 1)n and setting IL(n,k)l
=
n
(t
+ n- 1)n =
L IL(n, k)l(t)k,
n = 0, 1,... .
(8.41)
k=O Then, the following definition is introduced.
DEFINITION 8.2 The coefficient C(n, k; s) of the k-th order factorial oft of the expansion (8.39) of the n-th order generalized factorial oft, with scale parameter s, is called generalized factorial coefficient. In particular, the coefficients L(n, k) and IL(n, k)l of expansions (8.40) and (8.41) are called Lah and signless or absolute Lah numbers, respectively. Clearly,
C(n,k;s) = 0, k > n, C(O,O;s) = 1. Further, expansion (8.39) implies that the generalized factorial coefficients are differences of generalized factorials. Specifically, expanding the function f(t) = (st)n into factorials oft, by using Newton's formula and since _dk(st)n = 0, k > n, we get
(st)n =
t
k=O
[:!Llk(st)n] _ · (t)k, n = 0, 1, ... t-0
8.4. GENERALIZED FACTORIAL COEFFICIENTS
303
and so, by (8.39), we deduce that
C(n,k;s)
= [;!Llk(st)nL=O, k = 0,1, ...
,n, n
= 0,1,....
(8.42)
Also, putting t = bu and s = afb in (8.39), it follows that n
(au)n
=L
C(n, k; s)(bu)k, n
= 0, 1, ... , s = afb.
(8.43)
k=O
Finally, note that the rising factorial oft of order n, (t + n- 1)n, using Vandermonde's formula, may be expanded into factorials oft as (t
n + n- 1)n = [;
(n) k (n- 1)n-k(t)k
n n! (n = (; k! k _
1) 1 (t)k
and so, by (8.41) we get for the Lah numbers the expression IL(n,k)l = (-l)nL(n,k) = n! k! (nk _ 1) , 1 for k
= 1, 2, ...
, n, n
(8.44)
= 1, 2, ....
REMARK 8.5 (a) The generalized factorial oft of order nand increment a, denoted by (t)n,a. is defined fort and a real numbers and n integer by (t)n,a
= t(t- a)··· (t- na +a), n = 1, 2, ... , (t)o,a = 1
and fort -:j:. -ra, r = 1, 2, ... , n, by 1
(t)-n,a
= (t + na)(t + na- a)··· (t +a)' n = 1 ' 2' · · · ·
Clearly, b-n(t)n,b = (tfb)n, a-k(t)k,a = (tja)k and so, replacing t by tfa in (8.39), the generalized factorial oft of order n and increment b is expressed as a polynomial of generalized factorials oft with increment a as n
(t)n,b
=L
bna-kC(n, k; s)(t)k,a, s
= ajb, n = 0, 1, ....
k=O
(b) A function f(t) for which the differences with increment a at zero, [Ll~f(t)]t=o, k = 0, 1, ... , exist may be expanded, according to Newton's formula, into generalized factorials oft as f(t) =
~ [ a;!k Ll~f(t)] t=O · (th.a·
STIRLING NUMBERS
304
Note that this formula may be deduced as follows:
f(t) = [E~fa J(u)]u=O = [(Lla 00
= [;
[
+ 1)tfa J(u)]u=O
k! Ll~f(u) u=O · (tja)k
In the case of f(t)
1
]
00
= [;
[
-k ak! Ll~f(u) ] u=O · (t)k,a.
= (t)n,b and since Ll~(t)n,b = 0, k > n, we get (t)n,b
n = {;
[
-k
ak!
Ll~(t)n,b
]
t=O · (t)k,a
and so
b-n ] C(n, k; s) = [k!Ll~(t)n,b t=O, k = 0, 1, ... , n, n = 0, 1, ....
I
where s = ajb.
The generalized factorial coefficient C(n, k; s) is a polynomial in s of degree n. Specifically, the following theorem is derived. THEOREM 8.13
The generalized factorial coefficient C(n, k; s) is a polynomial ins of degree n, the coefficient of the general term of which is a product of the Stirling numbers of the first and second kind: n
C(n,k;s) = Ls(n,r)S(r,k)sr. r=k
(8.45)
PROOF Expanding the generalized factorial oft of order nand scale parameter s into powers of u = st by using (8.2) and, in the resulting expression, expanding the powers oft into factorials oft by using (8.3), we deduce the expression n
(st)n
=L r=O =
n
s(n, r)srtr
r
=L
s(n, r)sr L S(r, k)(t)k r=O k=O
~ {~ s(n, r)S(r, k)sr} (t)k,
which, compared with (8.39), implies (8.45). REMARK 8.6
In the particular cases
I
= 1 and, since by (8.39) C(n, k; 1) =
on,k, it follows as a corollary of (8.45) the first of (8.13). Also, in the cases = -1,
8.4. GENERALIZED FACTORIAL COEFFICIENTS
305
we have C(n, k; -1) = L(n, k) and so from (8.45), using (8.5) and (8.44), we deduce the relation n!
~ ls(n, r)IS(r, k) = k! n
fork = 1, 2, ... , n, n = 1, 2,....
(n- 1) k_ 1
.
I
Note that, for fixed n, the factorial generating function of the sequence of the generalized factorial coefficients C(n, k; s), k = 0, 1, ... , n, according to (8.39), is given by n
Cn(t; s)
=L
C(n, k; s)(t)k
= (st)n,
n
= 0, 1, ...
.
k=O Further, from (8.39), using Newton's general binomial theorem, we deduce the double generating function oo
g(t, u; s) =
n
n
L L C(n, k; s)(t); = (1 + uyt.
n=Ok=O
(8.46)
n.
The exponential generating function of the sequence of the generalized factorial coefficients C(n, k; s), n = k, k + 1, ... , for fixed k, is derived in the next theorem. THEOREM 8.14 The exponential generating function of the generalized factorial coefficients C(n, k; s), n = k, k + 1, ... , for fixed k, is given by
fk(u; s)
=L oo
n=k
PROOF
un C(n, k; s) 1 n.
=
[(1
+ u)sk'
1Jk
.
, k
= 0, 1,....
Interchanging the order of summation in (8.46) we get oooo
g(t, u; s) =
LL
n
oo
C(n, k; s);(t)k k=O n=k n.
=L
fk(u; s)(t)k
k=O
and, since
g(t,u;s) = (1 + [(1 +u) 8 -1])t = =
~ (!) [(1 +u) ~ [(1 + u)s ~
k=O
k!
8
-1]k
lJk (t) k,
(8.47)
STIRLING NUMBERS
306
I
we deduce (8.47).
An explicit expression of the generalized factorial coefficient C(n, k; s) is derived in the following theorem. THEOREM 8.15 The generalized factorial coefficient C(n, k; s ), k = 0, 1, ... , n, n = 0, 1, ... , is given by the sum k
C(n,k;s) =
~! ~(-1)k-r (~) (sr)n.
(8.48)
PROOF Expanding the generating function (8.47) into powers of u, we get the expression
E
C(n, k; s)
which implies (8.48).
:~ =
:!
t.( -1)k-r (
~) (1 + u)sr
=
~! t.(-1)k-r (~) ~ ( : ) un
=
~ { ~! t.(-1)k-r (~) (sr)n} :~,
I
REMARK 8.7 (a) Expression (8.48), of the generalized factorial coefficient, may also be deduced from (8.42), by using the expression of the k-th power of the difference operator in terms of shift operator, k
.jk
= ~(-1)k-r (~) er.
Thus C(n,k;s)
= [~!.dk(st)nL=O =
:, t.(-1)k-r
and, since [Er(st)n]t=O = (sr)n. (8.48) is deduced.
(~) [Er(st)n]t=O I
Expressions of the generalized factorial coefficient C(n, k; s) as multiple sums over all compositions, as well as over all partitions of n into k parts, are given in the following theorem.
8.4. GENERALIZED FACTORIAL COEFFICIENTS
307
THEOREM 8.16 The generalized factorial coefficient C(n, k; s ), k = 0, 1, ... , n, n = 0, 1, ... , is given by C(n, k; s) =
~: L (:. ) ( :2) ··· (:k),
(8.49)
where the summation is extended over all nonnegative integer solutions of the equation r 1 + r2 + · · · + Tk = n. Alternatively, (8.50)
where the summation is extended over all nonnegative integer solutions of the equations k1 + 2k2 + · · · + nkn = n and k1 + k2 + · · · + kn = k. Expanding (1 + u) 8 - 1 into powers of u and then using the Cauchy rule of multiplication of series, the exponential generating function (8.47) may be expressed as
PROOF
f.c(n,k;'):: = ~! [~
(;) •']'
= ~!
li [; (:,) •"]
E{~: L (:. ) (:2 ) ... (:k )}:~'
=
yielding (8.49). Using the multinomial theorem instead of the Cauchy rule, we get the expansion
E
C(n, k; s)
=
:~ = ~! [ ( ~) u + (;) u
E{L
which implies (8.50).
kl !k2
2
+ ... + ( ~) un + ...
~! .. kn! ( ~ ) kt (; )
k2 • . • (
r
~) kn } :~ '
I
Limiting expressions as s -+ 0 and s -+ oo and an orthogonality relation for the generalized factorial coefficient are deduced in the following theorems.
THEOREM 8.17 Let C(n, k; s) be the generalized factorial coefficient. Then lim s-kc(n, k; s)
s-+0
= s(n, k),
lim s-nc(n, k; s)
s-+oo
= S(n, k),
(8.51)
STIRLING NUMBERS
308
where 8(n, k) and S(n, k) are the Stirling numbers of the first and second kind, respectively.
=
PROOF By using lims-4 0 8- 1 [(1 + u) 5 -1] log(1 generating function (8.47) the limiting expression oo
+ u), we deduce for the
n
lim 8-k fk(u; 8) = "'[lim 8-kc(n, k; 8)]~, ~ S-40 n=k
S-40
n.
!~ 8-k[(1 + uY- 1]k ~~--~~------
k!
=
[Iog(1
+ u)]k
~~--~~
k!
which, compared with the generating function (8.16) of the Stirling numbers of the first kind, implies the first of (8.51). Also, since lims-4oo (1 + uj 8 ) 5 = eu, we deduce the limiting expression oo lim /k(u/8; 8) =""[lim 8-nqn, k; S-400 ~ S-400 n=k
s~~[(1
+ u/8)
5
1]k
-
n
8)]~, n. (eu _ 1)k
~~--~~------= ~~~-
k!
k!
which, compared with the generating function (8.17) of the Stirling numbers of the second kind, implies the second of (8.51 ). I
THEOREM 8.18 The generalized factorial coefficients C(n, k; 8), k satisfy the relation
= 0, 1, ...
, n, n
= 0, 1, ... ,
n
L C(n, r; 81 )C(r, k; 82) = C(n, k; 8182).
(8.52)
r=k In panicular, they satisfy the orthogonality relation n
L C(n, r; 8)C(r, k;
1 8- )
= 6n,k,
(8.53)
r=k where 6n,k = 1,
PROOF
if k
= nand 6n,k = 0,
if k 1- n
is the Kronecker delta.
Expanding the n-th order factorial of 8 1 82t into factorials of 82t, using (8.39), and in the resulting expression expanding the factorials of 82t into factorials
8.4. GENERALIZED FACTORIAL COEFFICIENTS
309
oft, we get the relation n
(stSzt)n =
L C(n, r; st)(szt)r r=O
= =
n
r
r=O
k=O
L C(n, r; St) L C(r, k; s 2)(t)k
~ {~C(n,r;st)C(r,k;sz)} (t)k.
Further, according to (8.39), we have n
(s1s2t)n =
L C(n, k; StSz)(t)k k=O
and so
The last relation implies (8.52). In the particular case of s 1 since C(n, k; 1) = 8n,k. (8.53) is deduced. I
= sand s 2 = s- 1,
Recurrence relations for the generalized factorial coefficients are given in the following theorems. THEOREM 8.19 The generalized factorial coefficients C (n, k; s ), k satisfy the triangular recurrence relation
C(n
+ 1, k; s)
for k = 1, 2, ... , n
C(O,O;s)
+ 1, n = 1,
= (sk- n)C(n, k; s)
= 0, 1, ... , n, n = 0, 1, ... ,
+ sC(n, k-
1; s),
(8.54)
= 0, 1, ... , with initial conditions
C(n,O;s)
= 0,
n > 0, C(n,k;s)
= 0,
k > n.
PROOF Expanding both members of the recurrence relation (st)n+l (st - n)(st)n into factorials oft, according to (8.39), we have n+l
n
n
k=O
r=O
k=O
L C(n + 1, k; s)(t)k = st L C(n, r; s)(t)r - n L C(n, k; s)(t)k.
STIRLING NUMBERS
310
Since (t)r+l = (t- r)(t)r, whence t(t)r = (t)r+l + r(t)n the right-hand side of this relation may be written as n n n s L C(n, r; s)(t)r+I + s L rC(n, r; s)(t)r- n L C(n, k; s)(t)k r=O
r=O
and so n+l L C(n
k=O
n
n+l
+ 1, k; s)(t)k = L(sk- n)C(n, k; s)(t)k + L
k=O
sC(n, k- 1; s)(t)k.
k=l
k=O
Equating the coefficients of (t)k in this relation, we conclude (8.54). The initial conditions follow directly from (8.39). I REMARK 8.8 (a) If the parameters is a positive integer, then the numbers C(n, k; s), n = k, k + 1, ... , sk, k = 0, 1, ... , are positive integers. Indeed, from the triangular recurrence relation (8.54) and its initial conditions, it follows that these numbers result from successive summation of positive integers. Further, in addition to C(n, k; s) = 0, k > n, it follows from (8.48) that C(n, k; s) = 0, sk < n. (b) Also, if sis a positive integer, then the numbers
!C(n, k; -s)l = ( -1)nC(n, k; -s), n = k, k
+ 1, ...
, k = 0, 1, ... ,
are positive integers since, by (8.54 ), we have
+ 1, k; -s)l = (sk + n)!C(n, k; -s)l + s!C(n, k1, 2, ... , n + 1, n = 0, 1, ... , with
!C(n fork=
= 1,
IC(O, 0; -s)l
IC(n, 0; -s)l
= 0,
n > 0, !C(n, k; -s)l
1; -s)!,
= 0,
(8.55)
k > n;
this means that these numbers result from successive summation of positive integers. I THEOREM 8.20 The generalized factorial coefficients C(n, k; s), k =· 0, 1, ... , n, n with C (0, 0; s) = 1, satisfy the vertical recurrence relation C(n
+ 1, k + 1; s)
=
t (~)
(s)n-r+l C(r, k; s).
= 0, 1, ... , (8.56)
r=k
PROOF we have
(a) According to (8.39) and since C(n n
+ 1, 0; s) = 0, n = 0, 1, ... ,
2: C(n + 1, k + 1; s)(t + 1)k+I = (st + s)n+l· k=O
8.4. GENERALIZED FACTORIAL COEFFICIENTS
Further, since (t
+ 1)k+ 1
= (t
311
+ 1)(t)k, we conclude that
n
L C(n + 1, k + 1; 8)(t)k = 8(8t + 8- 1)n· k=O
Expanding the right-hand side into factorials of 8t, by Vandennonde's formula, and in the resulting expression expanding the factorials of 8t into factorials oft, by using (8.39), we successively get
~ C(n + 1, k + 1; 8)(t)k n
=
~ n
(
;
)
(8)n-r+l
= ~ {~ (;) yielding (8.56).
~ C(r, k; 8)(t)k r
(8)n-r+IC(r, k; 8)} (t)k,
I
The generalized factorial coefficients C(n, k; 8) can be tabulated by using the triangular recurrence relation (8.54) and its initial conditions. Table 8.3 gives the numbers C(n, k; 8), k = 1, 2, ... , n, n = 1, 2, ... , 5.
Table 8.3 Generalized Factorial Coefficients C(n, k; s)
k
2
1
3
4
5
n I
(8)1
2
(8)2
82
3
(8)3
3(8)28
4
(8)4
5
(8)5
7(8)38
+ 3(8)28
15(8)48 + 20(8)38
83 6(8)28 2
84
25(8)38 2 + 15(8)28 2
10(8)283
85
The numbers C(n, k; 8), k = 0, 1, ... , n, n = 0, 1, ... , are defined as the coefficients of the factorials in the expansion of the generalized factorial, with scale parameter 8. These numbers emerge also in the expansion of the
STIRLING NUMBERS
312
inverse generalized factorials into inverse factorials. Specifically, we have the following theorem.
THEOREM 8.21 The inverse generalizedfactorial oft, with scale parameters, (st) -k· k = 1, 2, ... , is expanded into a series of inverse factorials (t)-n, n = k, k + 1, ... , as 00
(st)-k = L(-1t-kC(n,k;s- 1)(t)-n, k = 1,2,....
(8.57)
n=k
PROOF
Multiplying both members of the recurrence relation
by ( -1)n-k+ 1s(t)-n and, on the left-hand side, using the recurrence relation (t)-n = (t + n + 1)(t)-n-t. we get the relation
( -1)n-k+ 1sC(n + 1, k; s- 1)t(t)-n-1 +( -1)n-k+ 1s(n + 1)C(n + 1, k; s- 1)(t)-n-1 = (-1)n-ksnC(n,k;s- 1)(t)-n- (-1t-kkC(n,k;s- 1)(t)-n +(-1)n-k- 1 C(n,k -1;s- 1)(t)-n, Summing the last relation for n = k- 1, k, ... , we derive for the sum 00
= L(-1t-kC(n, k; s- 1)(t)-n, k = 0, 1, ... ,
Ck(t; s)
n=k
the recurrence relation ck(t; s)
= (st + k)- 1ck-l (t; s), k = 1, 2, ...
, eo(t; s)
= 1.
Iterating it, we conclude that
1
ck(t; s) = [(st + k)(st + k- 1) · · · (st + 1)r co(t; s)
and so (8.57) is established. REMARK 8.9
= (st)-k,
I
(a) Expansion (8.57) with t
= bu and s = a/b becomes
00
(au)-k = L(-1)n-kC(n,k;s- 1 )(bu)-n, s = ajb, k n=k
= 1,2, ....
8.4. GENERALIZED FACTORIAL COEFFICIENTS
(b) Using the relations (t)-n = an(u)-n,a• (st)-k and u = at, (8.57) may be rewritten as
313
= bk(u)-k,b· with s = afb
00
(u)-k,b =
L (-1)n-kb-kanC(n, k; s- 1)(u)-n,a, s = afb, k = 1, 2, .... n=k
(c) Setting u = -tin (8.57) and since (-1)k(-su)-k (-l)n(-u)-n = 1f(u-1)n,weget 00
1
1 (SU - 1)k = '"'c(n,k;s)( L..,.. U -
n=k
1
=
1/(su- 1)k,
) , k= 1,2, .... 1n
Dividing both members by su, we deduce the expansion 00
(
1) '"' -1 C(n,k;s -1 )-(-) 1 -,k=0,1, ... , =L....-s SU k+1 n=k U n+l
which, equivalently, may be written as
or as 00
1 1 -() - = sC(n, k; s) ( ) , k t k+1 n=k st n+1
L
= 0, 1, ... ,
an expression useful in waiting-time probability problems.
I
Example 8.8 Coupon collector's problem Consider an urn containing s identical series of coupons, each consisting of m coupons bearing the numbers 1, 2, ... , m. Suppose that coupons are randomly drawn, one after the other, without replacement. Calculate (a) the probability p(k; n) of drawing exactly k of the numbers {1, 2, ... , m} inn drawings, with n :S: m, and (b) the probability q( n; k) that n drawings are required until the k-th different number is drawn, with k ::; m. (a) Let Aj be the event that number j is not drawn in the n drawings, j = 1, 2, ... , m. Then p(k; n) is the probability that exactly m- k among them events A 1 , A 2 , ... , Am occur. Further, for any r indices {i 1 , i 2 , ... , ir} out of them indices { 1, 2, ... , m },
STIRLING NUMBERS
314
Therefore, the events A 1 , A 2 , ... , Am are exchangeable and according to Corollary 4.4, the probability p(k; n) is given by
=
p(k;n)
(m) "(k
LJ
n
r=O
1)k-r (k) (sr)n r (sm)n
and so, by virtue of (8.48), p(k;n)
k; s)(m)k = C(n,(sm )n , k = 1,2, ...
,n.
(b) The probability q(n; k) that n drawings are required until the k-th different number is drawn equals the probability p( k- 1; n- 1) of drawing k- 1 of them numbers inn -1 drawings multiplied by the probability s(m- k+ 1)/ ( sm-n+ 1) that one of them - k + 1 not already drawn numbers is drawn at the n-th drawing. Hence q(n;k)=
C(n- 1, k- 1; s)s(m)k () ,n=k,k+1, ... ,sm. sm n
Note that these probabilities, according to Remark 8.9(c), sum to unity.
0
8.5 NON-CENTRAL STIRLING AND RELATED NUMBERS The Stirling numbers of the first and second kind and the generalized factorial coefficients have been generalized in several directions. In this section, the corresponding non-central numbers are briefly presented. Additional properties and applications of these numbers are given in the exercises. Consider the non-central factorial oft of order n, (t - r)n, where the non-centrality parameter r is a real number and let n
(t- r)n =
L s(n, k; r)tk, n = 0, 1, ....
(8.58)
k=O
Also, let n
(t
+ r)n = L
S(n, k; r)(t)k, n
= 0, 1, ....
(8.59)
k=O
The coefficients s(n, k; r) and S(n, k; r) are called non-central Stirling numbers of the first and second kind, respectively. Clearly, s(n, k; r)
= S(n, k; r) = 0, k > n,
s(O, 0; r)
= S(O, 0; r) = 1.
8.5.
NON-CENTRAL STIRLING AND RELATED NUMBERS
Further, replacing t by -t in expansion (8.58) and since (t (-1)n(-t- r)n, we deduce the expression
315
+ r + n- 1)n =
n
(t
+ r + n- 1)n =
L
(8.60)
ls(n, k; r)ltk, n = 0, 1, ... ,
k=O
where the coefficient
= (-1)n-ks(n, k; r), k = 0, 1, ... , n,
ls(n, k; r)l for r
n
= 0, 1, ...
, (8.61)
> 0, as sum of products of positive numbers, is positive. Specifically, ls(n, k; s)l =
L(r + i1)(r + i2) · · · (r +in-k),
where the summation is extended over all (n- k)-combinations {i 1, i 2, ... , in-d of the n integers {0, 1, ... , n- 1}. The coefficient ls(n, k; r)l, for r > 0, of expansion (8.60), of the rising non-central factorials into powers, is called non-centro/ signless or absolute Stirling number of the first kind. Expansions (8.58) and (8.60) imply that the non-central Stirling numbers of the first kind are derivatives of factorials, while expansion (8.59) entails that the non-central Stirling numbers of the second kind are differences of powers. Specifically,
s(n, k;r)
ls(n, k; r)l
=
[:,Dk(t)n L=-r, k = 0, 1, ... , n, n = 0, 1, ... ,
= (:, Dk(t + n- 1)n
L=r, k = 0, 1, ... , n, n = 0, 1, ...
and
S(n, k; r)
= [:, Llktn]
, k
= 0, 1, ... , n, n = 0, 1, ....
t=r
Note that, for r = 0, these numbers reduce to the corresponding usual (central) Stirling numbers. For r f= 0 the non-central Stirling numbers may be expressed in terms of the corresponding central Stirling numbers. Specifically, expanding the rising non-central factorial of t of order n, (t + r + n- 1)n, into powers of u = t + r, using (8.4), and then expanding the power of u = t + r into powers oft, using Newton's binomial formula, we deduce the expression ls(n, k; r)l
=
t (~)
r 1-kls(n,j)l.
J=k
Also, expanding the non-central factorial oft of order n, (t + r + n- 1)n, into factorials oft, using Vandermonde's formula, and then expanding the
STIRLING NUMBERS
316
factorials oft into powers oft, using (8.2), we conclude the expression
ls(n, k; r)l =
t (~) j=k
(r
+ n- j -
1)n-jls(j, k)l.
J
Similarly
t. (t)
S(n, k; r)
=
S(n,k;r)
=
and
t (~) j=k
(r)j-kS(n,j)
rn-is(j,k).
J
The non-central Stirling numbers retain the orthogonality relation of the central Stirling numbers. Specifically, for any real parameter r, n
n
= 8n,k, "'L,S(n,j;r)s(j,k;r) = 8n,k,
"'L,s(n,j;r)S(j,k;r) j=k
j=k
where 8n,k = 1, if k = n and 8n,k = 0, if k =f. n is the Kronecker delta. The exponential generating functions of Is( n, k; r) I, n = k, k + 1, ... and S(n, k; r), n = k, k + 1, ... , for fixed k and r, may be obtained as ~ un 9k(u; r) = L...- ls(n, k; r)l n! n=k
= (1- u) -rl-log(1-u)jk k! , k=
0, 1, ...
and .
-
fk(u,r)-
L S(n,k,r) unn! -oo
•
ru (eu- 1)k k! , k- 0, 1, ... ,
e
n=k respectively. The non-central Stirling number of the second kind, on using the expression of the k-th power of the difference operator in terms of the shift operator, is expressed in the form of a single sum of elementary terms as k
S(n,k;r) =
~! "'L,(-1)k-j (~)
(r+j)n.
(8.62)
J
j=O
Triangular recurrence relations for the non-central Stirling numbers, analogous to those for the central Stirling numbers, can be similarly deduced:
s(n + 1, k; r) = s(n, kfork= 1, 2, ... , n
+ 1, n
1; r)-
(n
+ r)s(n, k; r),
= 0, 1, ... , with
s(O,O;r) = 1, s(n,O;r) = (-r)n, n > 0, s(n,k;r) = 0, k > n.
8.5.
NON-CENTRAL STIRLING AND RELATED NUMBERS
317
and
+ 1, k; r) = S(n, k- 1; r) + (k + r)S(n, k; r), , n + 1, n = 0, 1, ... , with
S(n
for k = 1, 2, ...
S(O,O;r) = 1, S(n,O;r) = rn, n > 0, S(n,k;r) = 0, k > n.
Using (8.61), the first recurrence relation yields for the non-central signless Stirling numbers of the first kind the triangular recurrence relation ls(n + 1, k; r)l = ls(n, k- 1; r)l for k = 1, 2, ... , n
+ 1, n
+ (n + r)ls(n, k; r)l,
= 0, 1, ... , with
is(O, 0; r)l = 1, is(n, 0; r)l = (r
+ n- 1)n,
n > 0, is(n, k; r)l = 0, k > n.
The triangular recurrence relation for the non-central Stirling numbers of the second kind can be used for the derivation of the (power) generating function k
00
IT
¢k(u; r) = L S(n, k; r)un = uk (1- ru- ju)- 1 , n=k j=O
fork= 1, 2, .... Setting u = 1/t, we get 00
1
1
LS(n,k;r)---=i=T=( ) ,k=1,2, .... tn t- r k+l n=k
Using the orthogonality relation of the non-central Stirling numbers, this expansion can be inverted as 1
= tk+l' k = 1, 2, ... . Equivalently, this expression may be written as 00
Lls(n,k;r)l( n=k t
1
+r +n
)
n+ 1
=
1
t
k+I'
k= 1,2, ....
Consider the non-central generalized factorial of t of order n, scale parameters and non-centrality parameter r, (st + r)n, and let n
(st
+ r)n = L k=O
C(n, k; s, r)(t)k, n
= 0, 1, ... .
(8.63)
STIRLING NUMBERS
318
The coefficients C(n, k; s, r) are called non-central generalized factorial coefficients or Gould-Hopper numbers. Clearly, C(n,k;s,r)
= 0, k > n, C(O,O;s,r) = 1.
Further, expansion (8.63) implies that the non-central generalized factorial coefficients are differences of non-central generalized factorials. Specifically, , k=0,1, ... ,n, n=0,1, ....
C(n,k;s,r) = [k\Llk(st+r)n] ·
t=O
Note that, for r = 0, these numbers reduce to the corresponding central numbers. For r =f. 0, the non-central generalized factorial coefficients may be expressed in terms of the corresponding central generalized factorial coefficients. Specifically,
=
C(n, k; s, r)
:t (~)
(rfs)j-kC(n,j; s)
]=k
and C(n, k; s, r)
=
:t (~) j=k
(r)n-jC(j, k; s).
J
The non-central generalized factorial coefficient C(n, k; s, ps-r) is a polynomial ins of degree n, the coefficient of general term of which is a product of the non-central Stirling numbers of the first and second kind, n
C(n,k;s,ps-r)
= "L,s(n,j;r)S(j,k;p)si. j=k
k
The exponential generating function of the sequence C(n, k; s, r), n k and r, may be obtained as
+ 1, ... , for fixed
oo
= k,
n
!k(u;s,r) = "L,c(n,k;s,r); n. n=k = (1
+ u)
r[(1+u)s-1]k , k = 0, 1, ... . k.1
The non-central generalized factorial coefficients, on using the expression of the k-th power of the difference operator in terms of the shift operator, is expressed in the form of a single sum of elementary terms as k
C(n,k;s,r) =
~! ~)-1)k-j (~) j=O
J
(sj+r)n·
8.6. BIBLIOGRAPHIC NOTES
319
A triangular recurrence relation for the non-central generalized factorial coefficients, analogous to that for the central generalized factorial coefficients, can be similarly deduced:
C(n + 1, k; s, r) = (sk for k
+ r- n)C(n, k; s, r) + sC(n, k- 1; s, r),
= 1, 2, ... , n + 1, n = 0, 1, ... , with
C(O, 0; s, r) = 1, C(n, 0; s, r) = (r)n, n
> 0, C(n, k; s, r)
= 0, k
> n.
This triangular recurrence relation can be used to show that 00
1 -() - = L:sC(n,k;s,r)(
t
8.6
k+l
n=k
1
st + r
)
n+l
.
BffiLIOGRAPHIC NOTES
The Stirling numbers were so named by N. Nielsen (1906) in honor of James Stirling, who introduced them in his Methodus Differentialis (1730) without using any notation for them. The notation adopted in this book is due to J. Riordan (1958). Recurrence relations and certain number theoretic properties of the Stirling numbers of the first kind were derived by L. Lagrange (1770). P. S. Laplace (1812) and A. Cayley (1887) provided several approximations of the Stirling numbers of the second kind. J. A. Grunert (1822, 1843), A. Cauchy (1833), 0. Schlomilch (1852, 1895), G. Boole (1860), L. Schlafli (1867), J. Blissard (1867) and J. Worpitzky (1883) explored further the Stirling numbers of both kinds. The work of N. E. Norlund (1924) inspired several publications on certain generalizations of the Stirling numbers and their connection with the Bernoulli and the generalized Bernoulli numbers. Also, the books by N. Nielsen (1906, 1923), E. Netto (1927), J. F. Steffensen (1927) and L. M. Milne-Thomson (1933) are worth mentioning. A thorough presentation of the Stirling numbers and their most important properties provided by Ch. Jordan (1933) in an excellent paper, which was included as Chapter 4 in his classical book on the calculus of finite differences (1939a), revived the interest in the Stirling numbers. Since then, a large number of publications on these numbers appeared in the literature. The more recent book of L. Comtet (1974) devotes a chapter to these numbers and provides a very rich bibliography. The expression of the nth power of the operator e = tD in terms of powers of the operator D was obtained by J. A. Grunert (1843). The derivation of this expression in Example 8.4 is due to Ch. Jordan (1933, 1939a), who also derived the
STIRLING NUMBERS
320
expression of the n-th power of the operator tJi = tL.l in terms of powers of the operator L.l given in Example 8.5. H. W. Gould (1964) expressed the operator (a 1D)n in terms of powers of the operator D with the Stirling numbers of the first kind as coefficients. L. Comtet (1973) expressed the more general operator (>.(t)D)n in terms of powers of the operator D with coefficients Bell partition polynomials. A generalization to another direction was discussed by L. Carlitz (1932). 0. Schlomilch (1852) used the same symbol, Cf, to denote the Stirling numbers of both kinds calling them factorial coefficients. In this unified notation, Cf = ls(n, k)l and CJ:n = S(k, n). N. E. Norlund (1924) introduced the generalized Bernoulli numbers Br;), n = 0, 1, ... , with generating function the r-th power of the generating function of usual Bernoulli numbers.
=
(n-1)
(n)
(n) (-k) . Bn-k and S(n, k) = k Bn-k. (see Exerctse 1 19). Properties of the generalized Bernoulli numbers were studied by L. Carlitz (1960). F. N. David and D. E. Barton (1962) devoted a chapter to these numbers. The first short table of the Stirling numbers of the second kind, up to n = 9, was published by James Stirling (1730). Extensive tables of the Stirling numbers of both kinds were constructed by H. Gupta (1950), R. A. Fisher and F. Yates (1953), F. N. David, M. G. Kendall and D. E. Barton (1966) and M. Abramowitz and I. A. Stegun (1965). A variety of asymptotic expressions for the Stirling numbers exist in the literature. The approximate expressions given in Exercise 7 are due to Ch. Jordan (1933, 1939a). Several references on other approximations are given in the review paper by Ch. A. Charalambides and J. Singh (1988). The coefficients L(n, k), k = 0, 1, ... , n, n = 0, 1, ... of the expansion of the rising factorials into falling factorials, introduced by I. Lah (1955), were called Lah numbers by J. Riordan (1958). Extending these numbers, Ch. A. Charalambides (1976, 1977a, 1979a) systematically studied the coefficients C (n, k; s) of the expansion of the generalized factorials into falling factorials. These numbers were noted before by Ch. Jordan (1933) and appeared as coefficients of a generalized Hermite polynomial in E. T. Bell (1934b), and in several other forms in H. W. Gould (1958), R. Shumway and J. Gurland (1960), L. Bernstein (1965), L. Carlitz (1965), W. Feller (1968), L. Comtet (1973). Later, L. Carlitz (1979) studied these numbers under the name degenerate Stirling numbers. The non-central Stirling numbers of the second kind appeared in N. Nielsen (1906) as differences of the powers at an arbitrary point. J. Riordan (1937) used them as connection constants of power moments about an arbitrary point and factorial moments (see Example 8.3). Also, they appeared as coefficients in a modification of the classical occupancy problem discussed by D. E. Barton and F. N. David (1959). Recently, these numbers were studied by L. Carlitz (1980a,b) as weighted Stirling numbers, by M.
Then Js(n, k)l
k_
8. 7. EXERCISES
321
Koutras (1982) as non-central Stirling numbers, by A. Z. Broder (1984) as r-Stirling numbers and also by R. Shanmugan (1984). The differences of the generalized factorials at an arbitrary point (Gould-Hopper numbers) were studied by Ch. A. Charalambides and M. Koutras (1983). The associated Stirling numbers, introduced by J. Riordan (1958), are closely related to the numbers of Ch. Jordan (1933, 1939a) and M. Ward (1934), which are the coefficients of the representation of s(n, n- k) and S(n, n- k) as sums of binomials of n. These numbers were further discussed by L. Carlitz (1971). Recurrence relations and other properties of the r-associated Stirling numbers and generalized factorial coefficients were discussed by J. Riordan (1958), L. Comtet (1974) and Ch. A. Charalambides (1974).
8. 7 EXERCISES 1.
Additional vertical recurrence relations for the Stirling numbers.
Show that (a) the Stirling numbers of the first kind s(n, k), k = 0, 1, ... , n, n = 0, 1, ... , with s(O,O) = 1, satisfy the recurrence relation n
s(n, k)
=L
nr-k s(n + 1, r + 1), k
= 0, 1, ...
, n, n
= 0, 1, ...
,
r=k and (b) the Stirling numbers of the second kind S(n, k), k = 0, 1, ... , n, n = 0, 1, ... , with S(O, 0) = 1, satisfy the vertical recurrence relation n
S(n,k)
= Lkn-rs(r -1,k -1), k = 1,2, ...
,n, n
= 1,2, ....
r=k 2. Show that
t S(n, r)s(r r=k
+ 1, k + 1) = (-1)n-k (~)
and
ts(n+1,r+1)s(r,k)= r=k
(~).
3". Show that
k (k-n) S(n,n-k)=?; k+r (k+n) k-r !s(k+r,r)!.
STIRLING NUMBERS
322
4. Show that
( k; r) s(n, k + r)
=~ (
J) s(j, k)s(n-
j, r)
and conclude its inverse relation
(7) s(n-i,r)
=
~ (k;r) S(k,i)s(n,k+r).
5. Show that
and conclude its inverse relation
(7) S(n-i,r)
=
~ (k;r) s(k,i)S(n,k+r).
6*. Let C(n, k; s) be the generalized factorial coefficient. Show that
(-1 ) k C(n,n-k;s -1 ) = ~ ~ (k-n) k+r (k+n) k-r C(k+r,r;s). 7. (Continuation). Show that
( k;
r) C(n, k + r; s) = ~ ( J) C(j, k; s)C(n-
j, r; s)
and
8*. Show that the signless Stirling number of the first kind is given by
L-;=
8 where (n(s) = 1 lfj , m = [n/2] and the summation is extended over all nonnegative integer solutions of the equation r 1 + 2r2 + · · · + krk = k.
8. 7. EXERCISES
323
9*. Asymptotic expressions for the Stirling numbers. For fixed k and n -too, show that
ls(n
+ 1, k + 1)1
~ n![log(n
+ 1) + C]k/k!
and
S(n,k)
~
knfk!,
where C = 0.57721 is the Euler's constant. Also, for fixed k, s and n -t oo derive for the generalized factorial coefficients C(n, k; s) the asymptotic expression C(n, k; s) ~ (sk)nfk!. 10. Associated Stirling numbers of the first kind. Using the triangular recurrence relation
s(n
+ 1, k) = s(n, k- 1) s(O,O)
= 1,
- ns(n, k), k
s(n,O)
= 0,
= 1, 2, ...
n > 0, s(n,k)
,n
+ 1,
n
= 0, 1, ...
= 0, k > n,
show that
s(n, n)
= 1,
s(n, n- 1)
= - ( ~) , s(n, n -
2)
= 2 ( ~) + 3 ( ~)
and, generally, setting k
s(n,n-
k) = Ls2(k + (k: ·), j,j)
J
j=O
derive the bivariate generating function
and deduce the generating function /k.2(u)
=
~
un L...- s2(n, k) 1 n. n=2k
=
[log(1
+ u)- u]k k' .
, k
= 0, 1, ...
Further, show that
s 2(n for n
+ 1, k) =
-ns 2(n, k)- ns 2(n- 1, k- 1),
= 2k, 2k + 1, ... , k = 1, 2, ... , with s2(0, 0)
= 1,
s2(n, 0)
= 0,
n > 0, s2(n, k)
= 0,
2k > n,
.
,
324
STIRLING NUMBERS
and
k
s 2(n,k)
= ~)-1)i (~)
for n
s(n-j,k-j),
J
j=O
= 2k, 2k + 1, ... , k = 0, 1, ....
11. (Continuation). Consider, more generally, the numbers Sr (n, k), n = rk, rk + 1, ... , k = 0, 1, ... , r = 2, 3, ... , defined by their exponential generating function n
OC>
!k,r(u) =
L
1
[
sr(n, k); = kl log(1 n. ·
n=rk
k
r-l
j
j=l
J
+ u)- L( -1)j-l ~
Derive the recurrence relation sr(n + 1, k) for n
l
= (-1r- 1 (n)r- 1 sr(n- r + 1, k- 1)- nsr(n, k),
= rk, rk + 1, ... , k = 1, 2, ... , r = 2, 3, ... , with = 1,
sr(O, 0)
sr(n, 0)
= 0,
n
> 0, sr(n, k) = 0, rk > n.
Also, show that k
(n)rj Sr+l (n, k) -- "'(-1)rj L .1 j Sr (n - rJ,. k- J") , r -- 1, 2, ... i=O J .r and k
(n)rj Sr (n, k) -- "'(-1)rj+l L .1 j Sr+l (n - rJ,. k- J") , r -- 1, 2, .... j=O J.r 12. Associated Stirling numbers of the second kind. Using the triangular recurrence relation S(n
+ 1, k) = S(n, k- 1) + kS(n, k), S(O,O)
= 1,
S(n,O)
= 0,
n
k
= 1, 2, ...
,n
+ 1,
n
= 0, 1, ...
> 0, S(n,k) = 0, k > n,
show that S(n, n)
= 1,
S(n, n- 1)
= ( ~) , S(n, n- 2) = ( ~) + 3 ( ~)
and, generally, setting S(n,n-k) = ts2(k+j,j) (k n .) , j=O +J
,
8. 7. EXERCISES
325
derive the bivariate generating function
g2(t,u)
oo [n/2]
n
n=O k=O
S2(n,k)tk; n.
=L
L
= exp[t(eu -1- u)]
and deduce the generating function
Also, show that
S2(n for n
+ 1, k)
= kS2(n, k)
+ nS2(n- 1, k-
1),
= 2k, 2k + 1, ... , k = 1, 2, ... , with S2(0, 0) = 1, S2(n, 0) = 0, n
> 0, S 2(n, k)
= 0, 2k
> n,
and S2(n, k) for n
k
(~)
j=O
J
= L( -1)i
S(n- j, k- j),
= 2k, 2k + 1, ... , k = 0, 1, ....
13. (Continuation). Consider, more generally, the numbers Sr (n, k), n = rk, rk + 1, ... , k = 0, 1, ... , r = 1, 2, ... , defined by their exponential generating function n
oo
!k,r(u)
=
L
Sr(n,k);
n=rk
n.
r-1
1
= kl
·
eu(
k j
L ~I j=O ).
)
Derive the recurrence relation
for n = rk, rk
+ 1, ... , k
= 1, 2, ... , r = 1, 2, ... , with
Sr(O, 0) = 1, Sr(n, 0) = 0, n > 0, Sr(n, k) = 0, rk > n. Further, show that k
Sr+t(n,k)
= L(-1)j J..~n()~)iSr(n-rj,k-j), r. J j=O
r= 1,2, ...
326
STIRLING NUMBERS
and
k
(n )rj =" ~' -:r-( !)J Sr+I (n- TJ,. k - J') , r j=O J. r.
Sr (n, k )
= 1, 2, ....
14. Associated generalized factorial coefficients. Using the triangular recurrence relation C(n
+ 1, k; s) + 1, n
for k = 1, 2, ... , n
= (sk- n)C(n, k; s)
+ sC(n, k-
1; s),
= 0, 1, ... , with initial conditions
> 0, C(n,k;s)
C(O,O;s) = 1, C(n,O;s) = 0, n
= 0, k
> n,
show that C(n,n;s)
= sn,
C(n,n -1;s)
C(n, n- 2; s) = sn- 3 (s)3 (
= sn- 2(s)2 (~),
~) + 3sn- 4 [(shf ( ~)
and, generally, setting k
C(n,n-k;s)=LC2(k+j,j;s)sn-k-j j=O
(k: .), J
derive the bivariate generating function oo [n/2]
n
92(t,u;s) = L L C2(n,k;s)tk; = exp{t[(1 +uV -1- su]}, n=O k=O n.
and conclude the generating function 00
un [(1 !k,2(u; s) = L C2(n, k; s) n! = n=2k
+ u)
8
-
k!
1 - su]k
, k = 0, 1, ....
Also, show that C2(n
for n
+ 1, k; s)
= (sk- n)C2 (n, k; s)
+ n(s)2C2(n-
1, k- 1; s),
= 2k, 2k + 1, ... , k = 1, 2, ... , with C2(0,0;s) = 1, C 2 (n,O;s) = 0, n
and
> 0, C 2(n,k;s)
= 0, 2k
k
C 2(n, k; s)
= L( -1)1 (~) j=O
J
siC(n- j, k- j; s),
> n,
8. 7. EXERCISES
327
for n = 2k, 2k + 1, ... , k = 0, 1, .... 15. (Continuation). Consider, more generally, the numbers Cr(n, k; s), n = rk, rk + 1, ... , k = 0, 1, ... , r = 1, 2, ... , defined by their exponential generating function
Derive the recurrence relation Cr(n
+ 1, k; s) =
(sk- n)Cr(n, k; s)
+ ( r ~ 1) for n = rk, rk
+ 1, ... , k =
(s)rCr(n- r
+ 1, k-
1; s),
1, 2, ... , r = 1, 2, ... , with
> 0, Cr(n, k; s)
Cr(O, 0; s) = 1, Cr(n, 0; s) = 0, n
= 0, rk
> n.
Also, show that Cr+l (n, k; s)
)j r
k = ~( -1)1 (n!,rj J.
( 8
j=O
Cr(n- rj, k- j; s), r
= 1, 2, ...
and k
Cr(n, k; s)
j
= ~ (n!!rj j=O
(;) Cr+l (n- rj, k- j; s), r
= 1, 2, ....
J
16. Cauchy numbers. The sequence of the Cauchy numbers Cn, n = 0, 1, ... , has generating function oo
f(t)
tn
t
= ~ Cnn! = log(1 + t) ·
Show that (n)kl C n-k, n = 1, 2, ... , vo ,--, = 1 Cn = ~( L.J -1 )k-1 k
+
k=l
and n
Cn =
1
r
1
L k + 1 s(n, k), n=O L S(r, n)Cn = r + 1 , k=O
STIRLING NUMBERS
328
where s(n, k) and S(r, n) are the Stirling numbers of the first and second kind, respectively. 17. Bernoulli numbers. The sequence of the Bernoulli numbers Bn,
n
= 0, 1, ... , has generating function oo
g(t)
=L
tn Bn n!
n=O
Show that Bn
=
t (~)
Bk, n
t
= et -
1.
= 1, 2, ... , B 0 = 1
k=O
and n ( -1)kk! r ( -1Yr! Bn=L k+ S(n,k),Ls(r,n)Bn= r+ , 1 1 k=O n=O
where s(n,k) and S(r,n) are the Stirling numbers of the first and second kind, respectively. 18. (Continuation). (a) Show that B 2r+l = 0, r = 1, 2, ... , and conclude that oo t2r 2 1+ -1Y2 r B2r ( r)! = t cot t. 2
?;(
(b) Using the expansion 00
t2
1 + 2""' 2 ~ t - n 21r 2 n=O
= t cot t,
show that 00
B2r
= (-1Y+l2(2r)!(27r)- 2r((2r),
((s) =
L n-s n=l
and conclude that IB2rl = ( -1Y+l B2r, r
= 1, 2, ... , and
(27ryr ((2r) = - ( 1 IB2rl, r = 1, 2, .... 2 2r). 19. Norlund-Bernoulli numbers. The sequence of numbers Btl, n = 0, 1, ... , where r is a real number, with generating function
8. 7. EXERCISES
329
has been defined by Norlund and, in the particular case of r = 1, reduces to the sequence of Bernoulli numbers. Show that
B~+t)
= ( 1 - ~) B~) - nB~~ 1 , n = 1, 2, ... , B~r) = 1
and conclude that
B~) = s(r, r- n)/ ( r ~ 1 )
,n
B~-r) = S(n + r, r)/ ( n: r)
= 0, 1, ... ,n
, r- 1, r
= 1, 2, ... ,
= 0, 1, ... , r = 1, 2, ...
,
where s(n, k) and S(n, k) are the Stirling numbers of the first and second kind, respectively. 20. Consider the sequence B(n; s), n = 0, 1, ... , where sis a real number, with generating function tn
oo
g(t;s) =
~B(n;s)n!
t = ( 1 + t)B
-1'
Show that B(n; s)
=
t (~)
(s)n-kB(k; s), n
= 1, 2, ... , B(O; s) = 1/s
k=O
and
~ ~
B = n
k=O
(1/sh+t ) k+ 1 C( n, k·,s,
where C(n, k; s) is the generalized factorial coefficient. Further, show that lim sB(n; s) = Cn, lim s-n+I B(n; s) = Bn,
s--+ 0
s--too
where Cn and Bn are the Cauchy and Bernoulli numbers, respectively. 21 *. Garlitz-Riordan numbers of the first kind. Consider the expansion of central factorial of t of order n,
t[n] = t (t
+~-
= t (t + ~2 with t[OJ
1) (t
+ ~- 2) ··· (t- ~ + 2)
1) , n-1
n
= 1, 2, ...
,
= 1, into powers oft: n
t[n] =
L r(n, k)tk, k=O
n = 0, 1, ... .
(t-
~ + 1)
STIRLING NUMBERS
330
Show that oo
n
U
n
g(t,u)= LLr(n,k)tk:! n=Ok=O
= ((u/2)+V1+(uf2) 2 )
,
and conclude that oo un [2log((u/2)+J1+(u/2F)r fk(u)=Lr(n,k)n! = k! , k=0,1, .... n=k
Derive the recurrence relation r(n
fork= 2, 3, ... , n
+ 2, k) = r(n, k- 2)- (n/2) 2 r(n, k),
+ 2, n = 0, 1, ... , with
r(O, 0) = 1, r(n, k) = 0, k
> n, r(2n, 2k + 1) = 0, r(2n + 1, 2k) = 0.
22*. Garlitz-Riordan numbers of the second kind. Consider the expansion of the n-th order power of t into central factorials of it: n
t 0 =LR(n,k)t[kJ, n=0,1, .... k=O
Show that n
n
Lr(n,j)R(j,k)
= c5n,k,
j=k
LR(n,j)r(j,k)
= c5n,k
j=k
and
Derive the explicit expression
(k) (k-2 - )n
1 "'(-1)3 k . R(n k) = ' k! L.....t j j=O
j
23*. (Continuation). Show that R(n + 2, k) = R(n, k- 2)- (k/2) 2 R(n, k),
fork= 2, 3, ... , n
+ 2,
n = 0, 1, ... , with
R(O, 0) = 1, R(n, k) = 0, k > n, R(2n, 2k + 1) = 0, R(2n + 1, 2k) = 0
8. 7. EXERCISES
331
and deduce the generating function
k = 2s + 1.
24. Consider the sequence of non-central signless Stirling numbers of the first kind ls(n, k; r)l, k = 0, 1, ... , n, n = 0, 1, ... , for fixed r, which are defined by (see Section 8.5) n
(t
+ r + n- 1)n =
L
ls(n, k; r)itk, n
= 0, 1, ....
k=O
Show that oo
g(t, u; r)
=L
n
L
n=Dk=O
n
ls(n, k;r)ltk; n.
= (1- u)-t-r
and conclude that
. -~ . un_ -rf-log(1-u)]k _ fk(u, r) - L....is(n, k, r)l n! - (1- u) k! , k- 0, 1, .... n=k
25. (Continuation). Show that the non-central signless Stirling numbers of the first kind ls(n, k; r)l, k = 0, 1, ... , n, n = 0, 1, ... , satisfy the triangular recurrence relation ls(n for k
+ 1, k; r)l
= ls(n, k- 1; r)l
= 1, 2, ... , n + 1, n =
+ (n + r)ls(n, k; r)l,
0, 1, ... , with initial conditions
ls(O, 0; r)l = 1, ls(n, 0; r)l = (r
+ n- 1)n,
n > 0, ls(n, k; r)l = 0, k > n.
Also, show that ls(n, k; r)l =
t (~) j=k
(m
+ n- j -
1)n-jls(j, k; r- m)l
J
and conclude that n
ls(n, k; r )I = L(n)n-j ls(j, k; r- 1)1 j=k
STIRLING NUMBERS
332
and
ls(n, k; r)l =
t (~) j=k
+ n- j -
(r
1)n-jls(j, k)l·
J
26. Suppose that, balls are successively drawn one after the other from an urn initially containing w white and b black balls, according to the following scheme. After each trial the drawn ball is placed back in the urn along with s black balls. Show that (a) the probability p(k; n, r) of drawing k white balls in n trials is given by
is(n,k;r)IOk . )_ p (k ,n,r- (O+r+n- 1)n' k=0,1, ... ,n and (b) the probability q( n; k, r) that n trials are required until the k-th white ball is drawn is given by
q(n;k,r) =
ls(n- 1, k- 1; r)IOk (O ) , n = k,k +r+n-1n
+ 1, ...
,
where 0 = w/s and r = bfs.
27. Consider the sequence of non-central Stirling numbers of the second kind S(n, k; r), k = 0, 1, ... , n, n = 0, 1, ... , for fixed r, which are defined by (see Section 8.5) n
(t
+ r)n = L
S(n, k; r)(t)k, n
= 0, 1, ....
k=O Show that
n
oo
f(t, u; r)
n
=L
L S(n, k; r)(t)k; n=O k=O n.
= e(t+r)u
and conclude that .
-
oo
•
Un -
fk(u,r)- LS(n,k,r)n! -e n=k
ru ( eu -
k!
1) k
-
, k-0,1, ....
Further, derive the explicit expression
~(S( n, , r - !._ k! L....t j=O
k. )_
1 )k-j (k). (r + J·)n . J
28. (Continuation). Show that the non-central Stirling numbers of the second kind S(n,k;r), k = 0,1, ... ,n, n = 0,1, ... , satisfy the triangular recurrence relation
S(n
+ 1, k; r)
= S(n, k- 1; r)
+ (k + r)S(n, k; r),
8. 7. EXERCISES
for k = 1, 2, ... , n
333
+ 1, n
= 1,
S(O,O;r)
= 0, 1, ... , with initial conditions
S(n,O;r) =rn, n > 0, S(n,k;r)
= 0,
k > n.
Also, show that S(n,k;r)
=
t
(~) mn-jS(j,k;r-m)
j=k
J
and conclude that S(n, k; r)
=
and S(n,k;r) =
t (~) t (~) j=k
J
j=k
J
S(j, k; r- 1)
rn-jS(j,k).
29. (Continuation). Show that
~s(n,j;r1)S(j,k;r2) = (~) (r2 -rl)n-k,
t
S(n,j; ri)s(j, k; r2) = (
~) (r1 -
r 2 )n-k,
J=k and conclude that n
n
Ls(n,j;r)S(j,k;r) j=k
= On,k.
LS(n,j;r)s(j,k;r) j=k
= On,k·
30. (Continuation). Show that ( k
t m ) s (n, k + m; r 1 + r 2) = %' (;) s (j, k; r1) s( n - j, m; r2)
and conclude its inverse relation
31. (Continuation). Show that ( k
t
m) S(n, k
+ m;r 1 + r 2) =
~ ( ; ) S(j, k;r1)S(n- j,m;r2)
STIRLING NUMBERS
334
and conclude its inverse relation
(7)
~ ( k ~ m) s(k, i; r1)S(n, k + m; r 1 + r2).
S(n- i, m; r 2) =
32. (Continuation). Show that k
00
¢k(u; r) =
2: S(n, k; r)un = uk II (1- ru- ju)n=k
1
,
k = 1, 2, ...
j=O
and conclude the inverse relations 00
(t+r)-k
= '2:(-1)n-kS(n-1,k-1;r+ 1)t-n, k = 1,2, ... , n=k 00
(t- r)-k
= 2:( -1t-ks(n- 1, k- 1; r + 1)(t)-n, k = 1, 2, .... n=k
33. Suppose that, balls are successively drawn one after the other from an urn initially containing m white and r black balls, according to the following scheme. After each trial, if the drawn ball is white, a black ball is placed in the urn, while if the drawn ball is black, it is placed .back in the urn. Show that (a) the probability p(k; n, r) of drawing k white balls in n trials, with n ~ m, is given by
. _S(n,k;r)(m)k _ p(k,n,r)( ) ,k-0,1, ... ,n m+r n and (b) the probability q(n; k, r) that n trials are required until the k-th white ball is drawn, with k ::::; m, is given by
q(n; k, r) =
S(n- 1, k- 1; r)(m)k ( ) , n = k, k m+r n
+ 1, ....
34. Consider the sequence of the non-central generalized factorial coefficients C(n, k; s, r), k = 0, 1, ... , n, n = 0, 1, ... , for fixed s and r, which are defined by (see Section 8.5) n
(st
+ r)n
=
'2: C(n, k; s, r)(t)k> n = 0, 1, .... k=O
Show that oo
n
n
f(t,u;s,r) = LLC(n,k;s,r)(t)k; = (1 +u)st+r n=O k=O n.
8. 7. EXERCISES
335
and conclude that oo un [(1 fk(u;s,r)=l:C(n,k;s,r)--,-=(1+uY
+ u)s-
n.
n= k
k'
1Jk
.
,k=0,1, ....
Using a suitable generating function, show that
C(n,k;s,r)
=
t (t)
(r/s)J-kC(n,j;s),
J=k
and
C(n,k;s,r)
=
t (~) j=k
(r)n-jC(j,k;s).
J
35. (Continuation). Show that the non-central generalized factorial coefficient C(n, k; s, r), k = 0, 1, ... , n, n = 0, 1, ... , is given by the sum
C(n,k;s,r)= :,t(-1)k-J (;) (sj+r)n. J=O
36. (Continuation). Show that the non-central generalized factorial coefficients C(n, k; s, r), k = 0, 1, ... , n, n = 0, 1, ... , satisfy the triangular recurrence relation
C(n for k
+ 1, k; s, r) = (sk + r- n)C(n, k; s, r) + sC(n, k-
= 1, 2, ...
,n
+ 1, n = 0, 1, ... , with
1; s, r),
initial conditions·
C(O,O;s,r) = 1, C(n,O;s,r) = (r)n, n > 0, C(n,k;s,r) = 0, k > n. 37. (Continuation). Show that lim s-kc(n, k; s, r)
s-+0
= s(n, k; -r)
and, for lim r / s = p, that s-+oo
lim s-nc(n, k; s, r)
s-+oo
= S(n, k; p).
38. (Continuation). Non-central Lah numbers. Consider the expansion n
(-(t- r))n =
2::: L(n, k; r)(t)k, n = 0, 1, ... . k=O
STIRLING NUMBERS
336
The coefficient L(n, k; r) is called non-central Lah number; it is a particular case, s = -1, of the non-central generalized factorial coefficient. Show that n
n! (n- r- 1)
L(n,k;r)=(-1) k!
k-r- 1
.
39. (Continuation). Show that n
C(n, k; s, ps- r)
=L
s(n,j; r)S(j, k; p)sl
j=k
and conclude that ts(n,j;r)S(j,k;p) )=k t(-1)n-js(n,j;r)S(j,k;p) )=k
= (~) (p-r)n-k, = (~)
(p-r+n-1)n-k·
40. (Continuation). Show that n
LC(n,j;sl,ri)C(j,k;s2,r2) = C(n,k;s1s2,r1 +r2s1) j=k and conclude that 1 tc(n,j;s,ri)C(j,k;s- ,r2) = J=k
and
(~) (r1 +r2s)n-k,
n
L C(n, j; s, r)C(j, k; s- 1, -rs- 1) j=k
= 8n,k·
41. (Continuation). Let 1
00
cPk(u;s,r) = LC(n-1,k-1;s,r)(u)n' k = 1,2, .... n=k
Show that cPk(u; s, r)
= (u
1
_ r)js _ (k _ 1) c/Jk-du; s, r), k
= 2, 3, ...
,
8. 7. EXERCISES
with ¢ 1 (u;s,r)
337
= 1/(u- r), and conclude that 1
¢k(u; s, r)
= s (( u-r )/ s )k
and 00
1
sC(n- 1, k- 1; s, r) (
-)( = L
t k
n=k
1
st
+r
) . n
42. (Continuation). Show that
(
k+m) k C(n,k+m;s,r 1 +r2 )
=
~ (~) C(j, k; s, rt)C(n- j, m; s, r2) j=k
J
and conclude its inverse relation
(7) C(n-i,m;s,r2)
'E' (k~m)
=
C(k,i;s- 1 ,-r1 s- 1 )C(n,k+m;s,r, +r2).
43. (Continuation). Show that n
(tb+! D)n f(t) = L( -1)n-kbna-kC(n, k; s, r)tbn-ak(Dta+l )k f(t), k=O where s
= ajb, r =
(a+ 1)/b, and conclude that n
(tb+l D)n J(t)
= L( -1)nbnC(n, k; s)tbn+k Dk f(t), s = -1/b k=O
and
n
(tDt f(t) = LS(n, k)tkDk f(t). k=O 44. Consider an urn containing s identical series of coupons, each consisting of m coupons bearing the numbers 1, 2, ... , m and r additional coupons, all bearing the number m + 1. Suppose that coupons are drawn one after the other, at random, without replacement. Show that (a) the probability
STIRLING NUMBERS
338
p(k; n) of drawing exactly k of them numbers {1, 2, ... , m} in n drawings, with n ::=; m, is given by . ) = C(n, k; s, r)(m)k k = 1 0 , , ... ,n (k p,n ( ) , sm +r n and (b) the probability q(n; k) that n drawings are required until the kth different number, among the m numbers { 1, 2, ... , m}, is drawn, with k ::=; m, is given by
q(n; k)
=
C(n- 1,k- 1;s,r)s(m)k (sm +r )n ,n
= k, k + 1, ...
, sm
+ r.
45. (Continuation). Suppose that from the urn coupons are drawn one after the other, at random, by returning in the urn, after each drawing, the chosen coupon together with another coupon bearing the same number. Show that (a) the probability p(k; n) of drawing exactly k of the m numbers {1, 2, ... , m} in n drawings is given by p (k ,n)
= JC(n,k;-s,-r)J(m+k-1)k k=O ( ) , , 1, ... ,n sm + r + n -1 n
where JC(n, k; -s, -r)J = ( -1)nC(n, k; -s, -r). Further show that (b) the probability q(n; k) that n drawings are required until the k-th different number, among the m numbers { 1, 2, ... , m}, is drawn is given by
. k) _ JC(n- 1, k- 1; -s, -r)Js(m q (n, ( ) sm + r + n -1 n
+ k- 1)r
_ k k
,n-
, + 1, ....
Chapter 9 DISTRIBUTIONS AND OCCUPANCY
9.1
INTRODUCTION
A considerable number of combinatorial configurations, such as permutations, combinations and partitions of a finite set under various conditions, can be described by the model of distribution (allocation) of balls (objects) into urns (cells, boxes), introduced by P. MacMahon. It is an advantageous approach, since urn models can be easily visualized and are very flexible. Further, these models admit many equivalent interpretations. In general, the balls are of the type (r 1 , r2, ... , rm) with r1 + r2 + · · · + rm = n, that is, ri of the n balls are of the i-th kind, i = 1, 2, ... , m. The urns are of the type (si,s2,··· ,sv) with s1 + s2 + ··· + Sv = k, that is, Sj of the k urns are of the j-th kind, j = 1, 2, ... , v. Moreover, the urns may be of limited or unlimited capacity and the balls in each urn may be ordered or unordered. The enumeration of the assignments of the balls to the urns is a distribution problem, while the enumeration of the balls in specified or arbitrary urns is an occupancy problem. This general consideration reveals a host of enumeration problems. Particular cases of such problems have been examined in Chapter 2 as applications of enumeration of certain permutations and combinations. In the present chapter, more general distribution and occupancy problems are studied by using the inclusion and exclusion principle and generating functions. Specifically, the classical occupancy problem and some of its modifications are examined in length. Then the distributions of balls into urns, when the ordering of the balls in the urns counts, are enumerated. Further, the problem of enumeration of the distributions of balls of a general specification into distinguishable urns is treated by using the inclusion and exclusion principle. As applications, a variety of committee problems is discussed. Finally, the use of generating functions in coping with the same general problem is demonstrated.
DISTRIBUTIONS AND OCCUPANCY
340
9.2
CLASSICAL OCCUPANCY AND MODIFICATIONS
Let us first consider n distinguishable balls and k distinguishable urns and assume that the capacity of each urn is unlimited. The urns as distinguishable, without any loss of generality, may be numbered from 1 to k. Then, the number of distributions of n distinguishable balls into k distinguishable urns equals
the number of n-permutations of the set {1, 2, ... , k }, with repetition (see Theorem 2.3). Further, the number of distributions of n distinguishable balls into k distinguishable urns with rj balls in the j-th urn, j = 1, 2, ... , k, r1 + r2 + · · · + rk = n, equals
n!
the number of divisions of the set of n balls {1, 2, ... , n} into k subsets containing r 1, r2, ... , rk balls, respectively (see Theorem 2.8). In the classical occupancy problem, the number of distributions with a given number of occupied urns is of interest. The next theorem is concerned with this number.
THEOREM9.1 The number of distributions of n distinguishable balls into k distinguishable urns so that r urns are occupied is given by N(n, k, r) = (k)rS(n, r),
where S(n, r) =
~ r.
i)
-1)j
j=O
(9.1)
(~) (r- j)n, J
is the Stirling number of the second kind. PROOF Consider the set [l of distributions of n distinguishable balls into k distinguishable urns and let Ai be the subset of these distributions in which the i-th urn remains empty, i = 1, 2, ... , k. Then, for any selection of s indices {i 1 ,i2, ... ,i.},outofthekindices{l,2, ... ,k},
9.2.
CLASSICAL OCCUPANCY AND MODIFICATIONS
341
which is the number of distributions of n distinguishable balls into the remaining (after excluding the s specified urns) k - s distinguishable urns. This expression implies the exchangeability of the sets A 1 , A2 , ... , Ak. Further, the number N(n, k, r) of distributions of n distinguishable balls into k distinguishable urns, which leave k - r urns empty (and consequently r urns occupied), equals the number Nk,k-r of elements of [l that are contained in k - r among the k sets A 1 , A2, ... , Ak. Thus, according to Corollary 4.4, we deduce the expression
which, upon using the explicit expression of the Stirling numbers of the second I kind (see Section 8.3), implies (9.1). COROLLARY 9.1 The number of distributions of n distinguishable balls into k distinguishable urns so that, out of s specified urns, r urns are occupied is given by
N(n,k,s,r) where S (n, r; k - s) =
~
= (s)rS(n,r;k-s)
t(
-1 )i
j=O
(~) ( k -
s
+r
(9.2)
- j) n,
J
is the non-central Stirling number of the second kind. PROOF Note that i balls can be selected from n distinguishable balls in (~) ways, i = 0, 1, ... , n. Further, for each selection, thei balls, according to Theorem 9.1, can be distributed into the s specified urns, so that r among them are occupied in
ways, while the remaining n - i balls can be distributed into the remaining k - s urns, without any restriction, in (k - s )n-i ways, i = 0, 1, ... , n. So, according to the multiplication principle, there are
different such distributions. Thus, summing fori = 0, 1, ... , n, according to the addition principle, the number of distributions of n distinguishable balls into k
DISTRIBUTIONS AND OCCUPANCY
342
distinguishable urns so that r among s specified urns are occupied is obtained as
N(n, k, s, r) =
The last expression, using the explicit expression of the non-central Stirling numI bers of the second kind (see Section 8.5), implies (9.2). COROLLARY 9.2 The number of distributions of n distinguishable balls into k indistinguishable urns so that r urns are occupied is given by
·(r)
1 ~ S(n,r)=;:yL...(-1)1
. (r-j)n,
(9.3)
J
j=O
the Stirling number of the second kind, while, without any restriction, it is given by k
B(n,k)
= LS(n,r),
(9.4)
r=l
the Bell number. PROOF Note first that r urns can be selected from k indistinguishable urns in only one way. Further, let R(n, r) and N(n, r) be the number of distributions of n distinguishable balls into r indistinguishable urns and into r distinguishable urns, respectively, so that no urn remains empty. Consider a distribution of n distinguishable balls into r indistinguishable urns so that no urn remains empty. If the r indistinguishable urns are transformed to distinguishable, by numbering them, and permuted in all possible ways, r! distributions of n distinguishable balls into r distinguishable urns, so that no urn remains empty, are constructed. Consequently r!R(n, r) = N(n, r) and since, by Theorem 9.1, N(n, r) = r!S(n, r), it follows that R(n, r) = S(n, r). Thus, the number R(n, k, r) of distributions of n distinguishable balls into k indistinguishable urns so that r urns are occupied is given by (9.3). As regards the evaluation of the number B(n, k) of distributions of n distinguishable balls into k indistinguishable urns, without any restriction, note that, in such a distribution, 1 or 2 or , ... , or k urns are occupied. Since the number of distributions of n distinguishable balls into k indistinguishable urns with r occupied urns equals S(n, r), summing for all values r = 1, 2, ... , k, according to the addition principle, we deduce (9.4). I
9.2.
CLASSICAL OCCUPANCY AND MODIFICATIONS
343
Consider now n indistinguishable (like) balls and k distinguishable urns. Again, the urns as distinguishable may be numbered from 1 to k. The number of distributions of n indistinguishable balls into k distinguishable urns equals the number of nonnegative integer solutions of the linear equation r 1 + r2 + · · · + rk = n, where Tj is the number of balls in the j-th urn, j = 1, 2, ... , k. Thus, according to Theorem 2.12, the number of distributions of n indistinguishable balls into k distinguishable urns equals
the number of n-combinations of the k urns {1, 2, ... , k} with repetition. Further, the number of distributions of n indistinguishable balls into k distinguishable urns so that no urn remains empty equals the number of positive integer solutions of the linear equation r 1 +r 2 +· · · +rk = n, which, according to Corollary 2.5, equals
(n-1)
k -1 ,
the number of n-combinations of the k urns { 1, 2, ... , k}, with repetition and the restriction that each urn is included at least once. As a consequence of these remarks, the following corollary, analogous to Theorem 9.1, is deduced. COROLLARY 9.3 The number of distributions of n indistinguishable balls into k distinguishable urns so that r urns are occupied is given by (9.5)
PROOF Note that r urns can be selected from k distinguishable urns in (~) ways and n indistinguishable balls can be distributed into these r urns, so that no urn remains empty, in (~::::D ways. Thus, according to the multiplication principle,
the required number of distributions is deduced as (9.5).
I
Let us, more generally, consider n indistinguishable (like) balls and k distinguishable urns, each divided into s distinguishable cells (compartments). Further, assume that each cell is of capacity limited to one ball. Then, the number of distributions of n indistinguishable balls into the k distinguishable urns (sk distinguishable cells) equals
DISTRIBUTIONS AND OCCUPANCY
344
while the number of distributions of n indistinguishable balls into the k distinguishable urns with Tj balls in the j-th urn, j = 1, 2, ... , k, Tt + r2 + · · · + Tk = n, equals
(~) (;J ... (~).
The next theorem is analogous to Theorem 9.1.
THEOREM9.2 The number of distributions of n indistinguishable balls into k distinguishable urns, each with s distinguishable cells ofcapacity limited to one ball, so that r urns are occupied, is given by
(k)r R(n,k,s,r) = - 1-C(n,r;s) n.
where
C(n,r;s)
(9.6)
= ~ t(-1r-i(~)(sj)n J
j=O
is the generalized factorial coefficient. PROOF Consider the set[} of distributions of n indistinguishable (like) balls into k distinguishable urns, each with s distinguishable cells of capacity limited to one ball. Let Ai be the subset of these distributions in which the i-th urn remains empty, i = 1, 2, ... , k. Then, for any selection of j indices {i~, i 2 , .•. , ij }, out of the k indices {1, 2, ... , k },
vi= N(Ai,Ai 2 ···AiJ = (
s(kn
j)) .
, J = 1,2, ... ,k,
which is the number of distributions of n indistinguishable balls into the remaining (after excluding the j specified urns) k - j distinguishable urns (s(k - j) distinguishable cells each of capacity limited to one ball). This expression implies the exchangeability of the sets At, A2 , ••• , Ak. Further, the number R( n, k, s, r) of distributions of n indistinguishable balls into k distinguishable urns that leave k- r urns empty (and consequently r urns occupied) equals the number Nk,k-r of elements of [} that are contained in k - r among the k sets At, A2, ... , Ak. Thus, according to Corollary 4.4, we get the expression
which, using the explicit expression of the generalized factorial coefficient (see Section 8.4), implies (9.6). I
9.2.
CLASSICAL OCCUPANCY AND MODIFICATIONS
345
REMARK 9.1 The number of distributions of n distinguishable balls into k distinguishable urns, each with s distinguishable cells of capacity limited to one ball, equals (sk)n,
while, with the restriction that r urns are occupied, is given by n!R(n, k, s, r) = (k)rC(n, r; s),
where C (n, r; s) is generalized factorial coefficient.
(9.7)
I
Assume now that, in the preceding model, the cells are of unlimited capacity. Then, the number of distributions of n indistinguishable balls into the k distinguishable urns (sk distinguishable cells), equals
while the number of distributions of n indistinguishable balls into the k distinguishable urns, each with s distinguishable cells, with r1 balls in the j-th urn, j = 1, 2, ... , k, r 1 + r2 + · · · + Tk = n, is given by
The next theorem is analogous to Theorem 9.1 and 9.2. THEOREM9.3 The number of distributions of n indistinguishable balls into k distinguishable urns, each with s distinguishable cells of unlimited capacity, so that r urns are occupied, is given by
T(n, k, s, r)
= -(k)r IC(n, r; -s)l, n.1
(9.8)
where IC(n, r; -s)l = ( -1)nC(n, r; -s) =
~ r.
i)
J=O
-1r-j (~) (sj J
+ n- 1)n
is the generalized factorial coefficient. PROOF Consider the set fl of distributions of n indistinguishable (like) balls into k distinguishable urns, each with s distinguishable cells of unlimited capacity. Let Ai be the subset of these distributions, in which the i-th urn remains empty,
DISTRIBUTIONS AND OCCUPANCY
346
i = 1, 2, ... , k. Then, for any selection of j indices {it, i 2 , •.. , ij }, out of the k indices {1, 2, ... , k },
v1 = N(A;,A; 2
...
A;,)= (
s(k- j) + n- 1) . n , J = 1,2, ... ,k,
which is the number of distributions of n indistinguishable balls into the remaining (afterexcluding the j specified urns) k - j distinguishable urns (s(k - j) distinguishable cells, each of unlim1ted capacity). This expression implies the exchangeability of the sets At, A2, ... , Ak. Further, the number T(n, k, s, r) of distributions of n indistinguishable balls into k distinguishable urns, which leave k- r urns empty (and consequently r urns occupied), equals the number Nk,k-r of elements of fl that are contained in k - r among the k sets A 1 , A 2 , . . . , Ak. Thus, according to Corollary 4.4, we deduce the expression
which, upon introducing the explicit expression of the generalized factorial coefficient, implies (9.8). I REMARK 9.2 The enumeration of distributions of indistinguishable balls into indistinguishable urns with or without restrictions cannot be handled by using the inclusion and exclusion principle. Further, it cannot be connected with the enumeration of distributions of indistinguishable balls into distinguishable urns, as the enumeration of distinguishable balls into indistinguishable urns is connected with the enumeration of distributions of distinguishable balls into distinguishable I urns. This problem will be separately examined in the next chapter.
Example 9.1 The Morse code A letter in the Morse code is formed by a succession of dashes and dots with repetitions allowed. The two symbols, dash and dot, may be considered as two distinguishable urns and then different positions (first, second, ... , n-th) of a letter as n distinguishable balls. Thus, a formation of a letter of n symbols corresponds to a distribution of n distinguishable balls into k = 2 distinguishable urns. Consequently, there are 2n different letters of n symbols. Further, the number of letters of n symbols that include both the dash and dot symbols, according to Theorem 9.1, equals
t(-1)j j=O
(~) (2- j)n = 2n- 2. J
In the more general k-symbol code, there are kn different letters of n symbols. Further, the number of letters of n symbols that include rout of s specified symbols,
9.2.
CLASSICAL OCCUPANCY AND MODIFICATIONS
347
according to Corollary 9 .I , is given by N(n,k,s,r) = (8)rS(n,r;k- 8), where S (n, r; k - 8) is the non-central Stirling number of the second kind.
0
Example 9.2 Decomposition of a product of primes into factors Consider a product Pn = a 1 a2 ···an. where ai, i = 1, 2, ... , n, are different prime numbers. Find the number of decompositions of the product Pn· of n different prime numbers, into k factors. The n different prime numbers {a 1 , a 2 , •.• , an} may be considered as n distinguishable balls and the k factors, which are not ordered, as k indistinguishable urns. Thus, a decomposition of a product of n different prime numbers into k factors corresponds to a distribution of n distinguishable balls into k indistinguishable urns with no urn empty and vice versa. For instance, the different decompositions of the product p3 = a 1 a 2 a 3 of n = 3 different prime numbers into k = 2 factors, and their corresponding distributions of three distinguishable balls into two indistinguishable urns with no urn empty, are the following:
Hence, the number of decompositions of a product of n different prime numbers into k factors equals the number of distributions of n distinguishable balls into k indistinguishable urns with no urn empty. According to Corollary 9.2, this is given by S (n, k), the Stirling number of the second kind. 0
Example 9.3 Selection of a central committee For the selection of the n members of the central committee of a federation of k associations, each association submits a list of 8 candidates. Find the number of different selections of the n members of the central committee in which r associations are represented in the committee. The n members of the central committee may be considered as n indistinguishable balls and the k associations ask distinguishable urns, each with 8 distinguishable cells of capacity limited to one ball. Thus, a selection of the n members of the central committee from the k lists, each with 8 candidates, corresponds to a distribution of n indistinguishable balls into k distinguishable urns, each with 8 distinguishable cells of capacity limited to one ball. Consequently, the number of selections of the n members of the central committee from the k lists, each with 8 candidates, so that r associations are represented in the committee, according to Theorem 9.2, is given by (k)r R (n,k,8,r ) = - 1-C(n,r;8),
n.
where C(n, r; s) is the generalized factorial coefficient.
0
348
9.3
DISTRIBUTIONS AND OCCUPANCY
ORDERED DISTRIBUTIONS AND OCCUPANCY
The case with ordered balls in each urn is of particular interest. The urns with ordered balls are simply called ordered urns. The enumeration of the distributions of balls of any specification into distinguishable ordered urns, with or without restrictions, is closely related to the enumeration of the distributions of indistinguishable (like) balls into distinguishable (nonordered) urns. Specifically, we have the next theorem.
THEOREM9.4 The number ofdistributions ofn balls of the type (r 1, r2, ... , rm). where r 1 +r2 + · · · + rm = n, into k distinguishable ordered urns without any restriction is given by (9.9)
and, with the restriction that r urns are occupied, is given by (9.10)
PROOF Note that any distributionofn balls of the type (r 1, r 2, ... , rm) into k distinguishable ordered urns, with or without restrictions, may be carried out in two consecutive stages. Initially, the n balls are distributed into the k distinguishable urns, without taking into account which elements and in what order are placed into each urn. The number Q(n, k) of these distributions equals the number of the distributions of n indistinguishable balls into k distinguishable urns. This number, in the absence of any restriction, is given by
and, with the restriction that r urns are occupied, according to Corollary 9.3, is given by
Further, for each such distribution, by taking into account that the n balls are of the type (r 1 , r 2 , ... , r m) and permuting them, all possible orderings in the urns are accomplished. Since the number of permutations of the n balls of the type
9.3. ORDERED DISTRIBUTIONS AND OCCUPANCY
349
(r 1 , r 2 , ... , rm), according to Theorem 2.4, is given by
n!
applying the multiplication principle, (9.9) and (9 .I 0) are deduced.
I
The following corollary of Theorem 9.4 is concerned with the particular case of n distinguishable balls.
COROLLARY 9.4 The number of distributions of n distinguishable balls, into k distinguishable ordered urns, without any restriction, is given by
n.1
(k + nn -1) -(k+n-1)n, _
(9.11)
and, with the restriction that r urns are occupied, is given by (9.12)
Example 9.4 Priority lists Suppose that n persons have applied for certain vacant positions ink organizations of the public sector. Each candidate is placed on only one of k different priority lists and each organization is filling its vacant positions from the corresponding priority list. Find the number of ways of placing the n candidates on the k priority lists. Then candidates may be considered as n distinguishable balls and the kdifferent priority lists ask distinguishable ordered urns. Then, the number of ways of placing the n candidates on the k priority lists without any restriction, according to (9 .11 ), is given by
n.1
(k + nn -1) -_(k + n-
1)n,
and, with the restriction that each of r organizations should fill at least one position, according to (9.12), is given by
DISTRIBUTIONS AND OCCUPANCY
350
9.4
BALLS OF GENERAL SPECIFICATION AND DISTINGUISHABLE URNS
In the introduction to this chapter, the balls of a general specification were classified according to the kind to which they belong and the notation (r 1, r 2 , ... , rm), with r1 +r2+ · · ·+rm = n, where ri is the number of balls of the i-th kind, i = 1, 2, ... , m, was used. These balls may also be classified according to their multiplicity and the notation [m 1 , m 2 , ... , mnJ, with m 1 + 2m 2 + · · · + nmn = n, where mi ~ 0 is the number of distinguishable kinds of balls, each including i like balls, i = 1, 2, ... , n, may be used. In this case, the partition notation (1m, 2m 2 • • • n m,.) may also be used.
THEOREM9.5 The number of distributions ofn balls of the specification [m 1, m2, ... , mn], with mi ~ 0, i = 1, 2, ... , nand m 1 +2m 2 + · · · + nmn = n, into k distinguishable urns is given by
(k)1 (k +2 1) m,
m
2
...
(k + n _ 1) n
m,.
. (9.13)
PROOF
Note first that the number of distributions of i like balls into k distinguishable urns equals (k+!- 1), i = 1, 2, ... , n. Further, by the multiplication principle, the number of distributions of mi ~ 0 distinguishable kinds of balls, each including i like balls, into k distinguishable urns is given by (k+!- 1 ) m,, i = 1, 2, ... , n. Applying, once more, the multiplication principle, we conclude that the number of distributions of n balls of the specification [m 1 , m 2 , ... , mn], with mi ~ 0, i = 1, 2, ... , nand m 1 +2m 2 +···+ nmn = n, into k distinguishable urns is given by the expression (9.13). I
THEOREM9.6 The number of distributions ofn balls of the specification [m 1, m2, ... , mn], with mi ~ 0, i = 1, 2, ... , nand m 1 +2m 2 +···+ nmn = n, into k distinguishable urns so that r urns are occupied is given by
PROOF
Consider the set Jl of distributions of n balls of the specification [m 1, m 2, ... , mn] into k distinguishable urns and let Ai be the subset of these distributions in which the i-th cell remains empty, i = 1, 2, ... , k. Then, for any
9.4.
BALLS OF GENERAL SPECIFICATION
351
selection of s indices {i 1, i2, ... , is} out of the k indices {1, 2, ... , k }, according to Theorem 9.5,
This expression implies the exchangeability of the sets A 1 , A 2 , ... , Ak. Further, the number R(m 1 , m 2 , .•. , mn; k, r) of distributions of n balls of the specification [m 1, m2, ... , mn] into k distinguishable urns, which leave k - r urns empty (and consequently r urns occupied), equals the number Nk,k-r of elements of Jl that are contained in k - r among the k sets A 1 , A2 , ... , Ak. Thus, according to Corollary 4.4, (9.14) is established. I Some particular cases of (9.14), of special interest, have been already examined in Section 9.2. The case of n distinguishable balls corresponds to m 1 = n, mi = 0, i = 2, 3, ... , n, while the case of n indistinguishable (like) balls corresponds to mi = 0, i = 1, 2, ... , n-1, mn = 1. Another particular case that corresponds to m 8 = m, mi = 0, i = 1, 2, ... , s- 1, s + 1, ... , n is explicitly presented in the next corollary.
COROLLARY 9.5 The number of distributions of sm balls, which belong in m distinguishable kinds with s like balls of each kind, into k distinguishable urns so that r urns are occupied is given by
(9.15)
Let us now consider the case of the existence of restrictions in the capacity of the urns. Specifically, the placement of a ball into an urn excludes the possibility of placing any other like ball into it. Thus, the balls that are allowed to be placed in any urn are all distinguishable.
THEOREM9.7 The number of distributions ofn balls of the specification [m 1, m2, ... , mn]. with mi 2: 0, i = 1, 2, ... , nand m 1 +2m 2 + · · · + nmn = n, into k distinguishable urns, each of which may accommodate at most one ball from each kind, is given by
V(m1,m2, ... ,mn;k) =
(k)1 (k)2 m,
m2
(k)
.. · n
mn
(9.16)
PROOF Note first that, since each urn may accommodate at most one ball from each kind, the number of distributions of i like balls into k distinguishable urns
352
DISTRIBUTIONS AND OCCUPANCY
equals(~), i = 1, 2, ... , n. Further, by the multiplication principle, the number of distributions of m; ;::: 0 distinguishable kinds of balls, each including i like balls, into k distinguishable urns is given by (~) mi, i = 1, 2, ... , n. Applying, once more, the multiplication principle, we conclude that the number of distributions of n balls of the specification [m 1, m 2, ... , mn], with m; ;::: 0, i = 1, 2, ... , n and m 1 + 2m 2 + · · · + nmn = n, into k distinguishable urns, each of which may I accommodate at most one ball from each kind, is given by (9.16).
Using the inclusion and exclusion principle and Theorem 9. 7, the next theorem (analogous to Theorem 9.6) is deduced.
THEOREM9.8 The number of distributions ofn balls of the specification [m1, m2, ... , mn], with m; ;::: 0, i = 1, 2, ... , nand m 1 +2m 2 +···+ nmn = n, into k distinguishable urns, each of which may accommodate at most one ball from each kind, so that r urns are occupied, is given by
COROLLARY 9.6 The number of distributions of sm balls, which belong in m distinguishable kinds with s like balls of each kind, into k distinguishable urns, each of which may accommodate at most one ball from each kind, so that r urns are occupied, is given by Q(m,8,k,r)
=G) ~(-1r-iG) (!)m
(9.18)
Example 9.5 Formation of committees Assume that, for the 8m = n positions of m committees, each with 8 positions, there are k candidates. Find the number of ways then members of the committees can be selected so that r of the k candidates will participate in at least one committee. The 8m = n positions of the m committees, each with 8 positions, may be considered as m distinguishable kinds of balls, each with 8 balls, and the k candidates as k distinguishable urns. Thus, the placement of a ball of the i-th kind into the j-th urn corresponds to the selection of the j-th candidate for a position of the i-th committee. We assume that no candidate can be assigned to more than one position of the same committee, but can participate in more than one committee. This assumption implies that each urn may accommodate at most one ball from each kind. Consequently, according to Corollary 9.6, the number of ways then members of
9.5. GENERATING FUNCTIONS
353
the committees can be selected so that r of the k candidates will participate in at least one committee is given by
Q(m,8,k,r)
=G) ~(-rr-j(:) (!)m
In the particular case when each of the k candidates must participate in at least one committee, the number of ways the n members of the committees can be selected is given by
Example 9.6 Formation of committees from grouped candidates Assume that each of k different political groups submits a full priority list of n candidates to the president's office for the 8m = n positions of m committees, each with 8 positions. Find the number of ways then members of the committees can be selected so that r of the k political groups will be represented in at least one committee. As in the preceding example, the 8m = n positions of the m committees, each with 8 positions, may be considered as m distinguishable kinds of balls, each with 8 balls, and the k political groups as k distinguishable urns. In this case, there is no restriction on the number of balls of the same kind that each urn may accommodate. Consequently, according to Corollary 9.5, the number of ways then members of the committees can be selected so that r of the k political groups will be represented in at least one committee is given by P(m,8,k,r)
=G) ~(-rr-jG)
e+: -l)
m
In the particular case when each of the k political groups must be represented in at least one committee, the number of ways the n members of the committees can be selected is given by
9.5
GENERATING FUNCTIONS
The use of generating functions in the study of distributions and occupancy leads to a more extensive development of this subject. In this section,
DISTRIBUTIONS AND OCCUPANCY
354
we present the generating functions of the cases of distinguishable or indistinguishable balls and distinguishable urns, as well as the case of balls of a general specification and distinguishable urns. Consider first the case of distinguishable balls and urns. Let us attach the occupancy indicator Xj to the j-th urn, j = 1, 2, ... , k, so that the homogeneous product of order n, x~' x~ 2 • • • x~k, with r 1 + r 2 + · · · + rk = n, uniquely determines the distribution of n distinguishable balls into k distinguishable urns, with Tj balls in the j-th urn, j = 1, 2, ... , k. Then the indicator (generating function) of the distributions of a single ball into k distinguishable urns is
and hence the generating function of the distributions of n distinguishable balls into k distinguishable urns, with respect to the numbers of balls in the urns, is (9.19) Note that (9.19) expanded into powers of x 1 , x2, ... , Xk by using the multinomial theorem,
2:
n! I I · · "Tk·l TI.T2·
x2 rk x r, 1 x 2 ···xk
= ( x 1 +x 2 + ···+xk )n ,
gives the number of distributions of n distinguishable balls into k distinguishable urns with ri balls in the j-th urn, j = 1, 2, ... , k, r 1 + r 2 + · · · + Tk = n. The exponential generating function of the sequence 9n(x 1 , x 2, ... , xk), n = 0, 1, ... , of generating functions (9.19) is oo
G(t;xl,X2,··. ,xk)
= L9n(XI,X2,···
tn ,xk)!
n. = exp{(x1 + x2 + · · · + xk)t} n=O
Therefore, the enumerator for occupancy of k distinguishable urns is given by (9.20) where the enumerator for occupancy of the j-th urn is given by x2t2
E(t;xi)
= 1 +xit + - 12.- 1- + ··· = e"''t,
j = 1,2, ... ,k,
(9.21)
exactly as in the case of permutations with repetition (see Section 6.3). The occupancy for each urn is specified independently of the other urns. Thus,
9.5. GENERATING FUNCTIONS
355
if the j-th urn must contain at least r and at most s balls, the enumerator for its occupancy is
xrtr Er,s(t; Sj) =
xr+ltr+l
~! + Cr + 1)! + · · · +
xsts
7
(9.22)
and (9.20) is accordingly modified. In the case of n indistinguishable balls, there exists only one distribution of them into k distinguishable urns so that the j-th urn contains r i balls, for j = 1, 2, ... , k and r 1 + r2 + · · · + rk = n. Hence, the generating function of the distributions of n indistinguishable balls into k distinguishable urns, with respect to the numbers of balls in the urns, is given by (9.23)
where the summation is extended over all rj 2: 0, j = 1, 2, ... , k with r 1 +r 2 +· · ·+rk = n. The function hn(x1,x2, ... ,xk) is called homogeneous product sum of weight k. Note that the corresponding generating function of the distributions of n distinguishable balls is given by
gn(x1,x2, ... ,xk) = [hl(x1,x2, ... ,xk)]n, where hi(XI,X2, ... ,xk) =XI+ X2 + · · · + Xk· The ordinary generating function of the sequence hn n = 0, 1, ... , of generating functions (9.23), since 00
00
LLx~'x~ 2 n=O
..
00
00
·x~ktn = L:Cx1tf' L:Cx2tr 2 rt=O
=hn (x1, x2, ... , Xk), ...
r2=0
L(xktfk, rk=O
is deduced as 00
H(t; XI, X2, ... , Xk) = L hn(XI, X2, ... , Xk)tn n=O 1
(9.24)
Therefore, the enumerator for occupancy of k distinguishable urns is given by
H(t; x1, x2, ... , xk) = F(t; xi)F(t; x2) · · · F(t; Xk),
(9.25)
where the enumerator for occupancy of the j-th urn is given by
F(t;xi) = 1 +xit +x]t 2 + ·· · = (1- x 3t)- 1 , j = 1,2, ... ,k, (9.26) exactly as in the case of combinations with repetition (see Section 6.3). The occupancy for each urn is specified independently of the other urns. Thus,
DISTRIBUTIONS AND OCCUPANCY
356
if the j-th urn must contain at least r and at most s balls, the enumerator for its occupancy is · (9.27)
and (9.25) is accordingly modified. Let us finally consider the general case of n balls of the specification [m 1, m2, ... , mn], with m 1 +2m2 + · · · + nmn = n, where mi 2: 0 is the number of balls of multiplicity i (that is, the number of distinguishable kinds of balls, each including i like balls), i = 1, 2, ... , n. The generating function of the distributions of i indistinguishable (like) balls into k distinguishable urns, with respect to the numbers of balls in the urns, according to (9.23), is given by hi(x 1, x2, ... , Xk), the homogeneous product sum of weight i. Since the mi 2: 0 distinguishable kinds of balls, each of which includes i like balls, are independently distributed, the generating function of the distributions of these balls is given by [hi(x 1, x2, ... , xk)]m•, i = 1, 2, ... , n. Therefore, the generating function of the distributions of n balls of the specification [m 1, m2, ... , mnJ, mi 2: 0, i = 1, 2, ... , n, m 1 + 2m2 + · · · + nmn = n, into k distinguishable urns, with respect to the numbers of balls in the urns, is given by n
hm 1 ,m2 , ... ,mn(XI,X2,··· ,Xk)
= II[hi(XI,X2,···
,Xk)]m'.
(9.28)
i=l
Note that (9.28), for xi = 1, j = 1, 2, ... , k, yields the total number of distributions of then balls of the specification [m 1, m2, ... , mn] into k distinguishable urns. The fact that this number agrees with that of Theorem 9.5 follows from the expression hi(1, 1, ... , 1) = (k+!-I), i = 1, 2, ... , n. The enumerator for occupancy of the j-th cell by n balls of the specification [m1, m2, ... , mn], with mi 2: 0, i = 1, 2, ... , n, m1 +2m2+·· ·+nmn = n and m 1 + m 2 + · · · + mn = m, where m is the total number of distinguishable kinds of balls, is given by
F(t1,t2,···,tm;Xj)=
1
)
(1- Xjt1)(1- Xjt2 · · · (1- Xjtm
)'
where the term (xitd"' (xit 2)"2 • • • (xjtm)"m indicates the occupancy of the j-th urn by v = v 1 + 112 + · · · + Vm balls, among which 111 are of the l-th kind, l = 1, 2, ... , m. The occupancy of each urn is specified independently of the other urns and so the enumerator for occupancy of the k urns is given by
H(t1,t2,··· ,tm;XI,X2,··. ,xk) = F(t1,t2,··· ,tm;xi)F(ti,t2,··· ,tm;X2)···F(t1,t2,··· ,tm;Xk)· Two illustrative examples follow.
9.5. GENERATING FUNCTIONS
357
Example9.7 The generating function G (t), of the number of distributions of n distinguishable balls into k distinguishable urns, without any restriction, is deduced from (9.20) and (9.21) by setting Xj = 1, j = 1, 2, ... , k. Then, •
E(t; 1)
=G(t; 1, 1, ... , 1) = ekt = L kn 1tnn. , co
= et, G(t)
n=O
and hence the number of distributions of n distinguishable balls into k distinguishable urns equals In the case ofthe restriction that each urn should contain at least one ball, it follows from (9.20) and (9.22) that t2
E1(t; 1) = t +I+···= et- 1, G 1(t) =: GI(t; 1, 1, ... , 1) = (et- 1)k. 2.
Expanding the generating function GI(t) into powers oft by using Newton's binomial theorem, we find
Therefore, the number of distributions of n distinguishable balls into k distinguishable urns so that all k urns are occupied is given by N(n, k)
=
t( j=O
-1)j
(~) (k- j)n = k!S(n, k), J
in agreement with (9.1) in the particular case of r = k.
0
Example9.8 The generating function, H ( t), of the number of distributions of n indistinguishable balls into k distinguishable urns, without any restriction, is deduced from (9.25) and (9.26) by setting Xj = 1, j = 1, 2, ... , k. Then
F(t; 1) = (1- t)- 1 , H(t) =:H(t;1,1, ... ,1) = (1-t)-k =
co 2)-l)n
n=O
(-k) tn, n
358
DISTRIBUTIONS AND OCCUPANCY
and hence the number of distributions of n indistinguishable balls into k distinguishable urns equals
in agreement with the results stated in Section 9.2. In the case of the restriction that each urn should contain at least one ball, it follows from (9.25) and (9.27) that
Expanding the generating function H 1 (t) into powers oft by using Newton's negative binomial theorem, we find
Therefore, the number of distributions of n indistinguishable balls into k distinguishable urns, so that all k urns are occupied, is given by
-1)
n ( k -1
.
Further applications may be found in the exercises.
0
9.6 BIBLIOGRAPHIC NOTES P. A. MacMahon (1915, 1916) in his treatise on combinatorial analysis introduced and extensively studied, mostly through generating functions, the theory of distribution of balls (objects) into urns (cells, boxes). Theorem 9.5, which is concerned with the distributions of balls of a general specification into distinguishable urns, was derived by the aid of generating functions. Also, Section 9.5 on the study of distributions through enumerating generating function is based on the books of P. A. MacMahon (1915, 1916) and J. Riordan (1958). W. Feller (1968) treated the classical occupancy problem and the coupon collector's problem by using the inclusion and exclusion principle. N. L. Johnson and S. Kotz (1977) devoted a chapter to the occupancy theory containing a wealth of information and an extensive Jist of references.
9. 7. EXERCISES
9.7
359
EXERCISES
1. Let N 1 (n, k, r) be the number of distributions of n distinguishable balls into k distinguishable urns, so that r urns are occupied, each by j balls. Show that .
_
N1 (n,k,r)-
(k)r ~( k
_
1)
i-r
r) (ki-r
'
n. _ · n-ij (j!)i(n-ij)!(k z) .
2. (Continuation). (a) Show that
and hence that
=Nj(n, /-l(i)(n, k,j), i 0, 1, ... , k, are the factorial moments of the = k, r), r 0, 1, ... , k, show that n' .. /-l(i)(n,k,j) =(k)i(j!)i(n.-ij)!(k-i)n-•J, i =0,1, ... ,k.
(b) If /-l(i) sequence ar
= =
3. Let B(n, k) be the number of distributions of n distinguishable balls into k indistinguishable urns. Show that
B(n, k)
k = k!1 ~
where
(k) rnk-j, j
k
Dk
.
= k! L (--~)· z.
i=O
is the k-subfactorial. 4. Let Q1 (n, k, r) be the number of distributions of n indistinguishable balls into k distinguishable urns, so that r urns are occupied, each by j balls. Show that
Qj(n, k,
r) =(k) ~) _1 r
i=r
r) (k + n- i(j -~ 1)- 1).
)i-r (~z- r
n - ZJ
DISTRIBUTIONS AND OCCUPANCY
360
5. (Continuation). (a) Show that
and hence that 00
L
k
L Qj(n, k, r)xr tn = [(1- t)- 1
+(x- 1)tj]k.
n=Or=O
= k,j), 0, 1, ... , k, are the binomial moments of the =bci)(n, Qj(n, k, r), r 0, 1, ... , k, show that . -(k)(k+n-i(j+1)-1) . ... ,k. b(i)(n,k,J)= . .. , z=0,1, z n- ZJ
(b) If b(i) sequence ar
i =
=
6. Show that the number of distributions of n indistinguishable balls into k distinguishable urns, each of capacity limited to s balls, is
and, with the restriction that r urns remain empty, equals k
L(n,k,s,r)
=G) L(-1)i-r(:~;)L(n,k-i,s). t=r
7. (Continuation) Let Lj(n, k, r) be the number of distributions of n indistinguishable balls into k distinguishable urns, each of capacity limited to s balls so that each of r urns is occupied by j balls. Show that
and, for j = s, conclude that
L 8 (n, k, s, r) =
G)
8. (Continuation). (a) Show that
L(n- sr, k- r, s).
9. 7. EXERCISES
361
and hence that sk
k
L L Qj(n,k,r)xrtn = [(1- t + )(1- t)8
1
1
+ (x -1)ti]k.
n=Or=O
=
(b) If b(i) b(i)(n, k, s,j), i = 0, 1, ... , k, are the binomial moments of the sequence ar Lj(n, k, s, r), r = 0, 1, ... , k, show that
=
b(i)(n,k,s,j) =
(~)L(n-ij,k-i,s),
i=0,1, ... ,k.
9. (Continuation). Let Mj(n, k, s) be the number of distributions of n indistinguishable balls into k distinguishable urns, each of capacity limited to s balls, so that each urn is occupied by at least j balls. Show that
Mj(n, k, s) = L(n- kj, k, s- j) =
t,( _G) (n1)
kj
+ k ~ ~s - j + 1)- 1).
1
10. Let n like balls be distributed into k distinguishable urns. (a) If hn(x) is the enumerator for the occupancy of a single urn, show that 00
H(t; x) =
L
hn(x)tn = (1- xt)- 1 (1- x)-k+l
n=O
and
(b) If B(n, k, r) is the number of distributions of n like balls into k distinguishable urns so that a specified urn contains r balls, r = 0, 1, ... , n and b(s) b(s) (n, k), s = 0, 1, ... , n, are the binomial moments of the sequence ar B(n, k, r), r = 0, 1, ... , n, conclude that
= =
B(n, k, r) =
k - r - 2) (n+ n-r
, b(s)(n, k) =
(n +n-s k - 1)
.
11. (Continuation). If hn(x, y) is the enumerator for the occupancy of a pair of urns, show that 00
H(t; x, y)
=L
n=O
hn(x, y)tn
= (1- xt)- 1 (1- yt)- 1 (1- x)-k+ 2
362
DISTRIBUTIONS AND OCCUPANCY
and hence conclude that
hn(x,y) =
~~ L....tL....t
•=0 r=O n n-j
= 2: 2: j=O i=O
(n
+ k- r- s- 3)xrys n-r-s
(: ~ ~ =J~) (x- 1)i(y -
1)j.
12. Let n like balls be distributed into k distinguishable urns, each with
s distinguishable cells of capacity limited to one ball. Show that (a) the enumerator for occupancy of the j-th urn is
and (b) the generating function of the distributions with r1 balls in the j-th urn, j = 1, 2, ... , k, is
where the summation is extended over all 0 r1 + r2 + · · · + rk = n.
:S r1 :S s, j
= 1, 2, ... , k, with
13. (Continuation). In the case of cells of unlimited capacity, show that (a) the enumerator for occupancy of the j-th urn is
G.(t;
Sj)
=
~ (s + ~ -
= ~(-1r (~
1 )xjtr 8
)x;tr = (1- x1t)-•,
j
= 1,2, ...
,k
and (b) the generating function of the distributions with r1 balls in the j-th urn, j = 1, 2, ... , k, is
where the summation is extended over all r1 + r2 + · · · + rk = n.
rj
2: 0, j
= 1, 2, ... , k,
with
14. Let us consider k distinguishable urns, each with s distinguishable cells of capacity limited to one ball. Show that the number of distributions
9. 7. EXERCISES
363
of n like balls into the k urns so that each of r urns contains j balls equals
and conclude that the number of distributions of n like balls into the k urns so that r urns are completely occupied is given by
R(n, k,
s, r)
=
(k) ~( _1)i-r (~- r) (s(k- i)). r
L....t i=r
t -
r
sk - n
15. (Continuation). (a) Show that
~
s(k-r)+jr
Rj(n,k,s,r)tn=
(kr) [(;)ti] (1+t)B-; r [
(
)
ti
] k-r
and hence that
16. Let us consider k distinguishable urns, each with s distinguishable cells of unlimited capacity. Let Tj(n, k, s, r) be the number of distributions of n like balls into the k urns so that each of r urns contains j balls. Show that
TJ(n, k, s, r)
=
G) t( _ 1 =;) (s +;- 1) (s(k- i)n+_nj~ 1). )i-r (:
17. (Continuation). (a) Show that 00
LTJ(n, k, s, r)tn n=O
and hence that
i
ij-
DISTRIBUTIONS AND OCCUPANCY
364
18. Let us consider kr distinguishable cells, each of capacity limited to one ball, arranged in k columns and r rows. Show that the number of distributions of n like balls into the kr cells so that j from 8 predetermined columns of cells are occupied (each by at least one ball) equals
19. (Continuation). Show that the number of distributions of n like balls into the kr cells so that no row and no column of cells remain empty equals
A(n, k, r) =
t t(
-1)k+r-j-i
(~) (:) (~) J
t=OJ=O
and conclude that the number of distributions of n distinguishable balls into the kr cells so that no row and no column of cells remain empty equals n!A(n,k,r)
= tt(-1)k+r-j-i(~) J
t=O J=O
(:)(ij)n·
20. Let us consider kr distinguishable cells of unlimited capacity, arranged in k columns and r rows. Show that the number of distributions of n like balls into the kr cells so that j from 8 predetermined columns of cells are occupied (each by at least one ball) equals
T(n, k,
8,
r,j) =
G) ~(-1)i G) (r(k- + j: 8
i)
+ n-
1).
21. (Continuation). Show that the number of distributions of n like balls into the kr cells so that no row and no column of cells remain empty equals B(n, k, r) =
t t( •=0]=0
-1)k+r-j-i
(~) (:) (ij J
+:- i).
22. Let M(n, k, 8) be the number of distributions of n distinguishable balls into k distinguishable urns, each of capacity limited to 8 balls. Show that sk tn ( t2 t• ) k Mk(t) = M(n, k, 8) 1 = 1 + t + 2l + ... + 1 n=O n. . 8.
L
9. 7. EXERCISES
365
and M(n+1,k,s)=k{M(n,k,s)- (:)M(n-s,k-1,s)}, n?.s, M(n,k,s) = kn, n
~
s.
Further, derive the vertical recurrence relation M(n, k, s) =
f: (~)M(n-
j, k- 1, s), m = min{n, s }.
J
j=O
23. Let Sr(n, k) be the number of distributions of n distinguishable balls into k distinguishable urns so that each urn contains at least r balls. Show that
tn
00
sk ,r (t) = '""' sr (n ' k)-1 = ~ n.
n=rk
(
r-1 ) k
et - 1 - t - ... - -,----------:-:(r _ 1)1.
and Sr(n
+ 1,k) =
k { Sr(n,k)
Sr(n, k)
= 0,
+
(r:
n
1
)sr(n- r
< rk,
+ 1,k -1)},
Sr(rk, k)
=
n?. rk,
(rk)! (r!)k ·
Further, derive the recurrence relation
24. Let us consider k distinguishable urns, each with s distinguishable cells of capacity limited to one ball. Let G(n, k, s, r) be the number of distributions of n like balls into the k urns so that each urn contains at most r balls. Show that
and (n
+ 1)G(n + 1, k, s, r)
= (sk- n)G(n, k, s, r)
-1)
-sk ( s r
G(n-r,k-1,s,r), n?. r,
DISTRmUTIONS AND OCCUPANCY
366
G(n,k,s,r) =
(s:),
n-:; r.
Further, derive the vertical recurrence relation G(n, k, s, r) =
f: (~)
G(n- j, k- 1, s, r), m = min{n, s, r }.
J
j=O
25. (Continuation). Let Cr(n,k,s) be the number of distributions ofn like balls into the k urns so that each urn contains at least r balls. Show that 8
Gk,r(t)= i::kCr(n,k,s)tn= [(l+t) -1- G)t- .. ·-
c~1)tr-lr
and (n
+ 1)Cr(n + 1, k, s) = (sk- n)Cr(n, k, s) 1 r-1
+sk (s- ) Cr(n- r + 1, k- 1, s), rk
Cr(n,k,s)
= 0,
Cr(sk, k, s)
n
= 1,
< rk, Cr(rk,k,s) Cr(n, k, s)
= 1,
< n < sk,
= (;) k' n
> sk.
Further, derive the recurrence relation
26. Let us consider k distinguishable urns, each with s distinguishable cells of unlimited capacity. Let H(n, k, s, r) be the number of distributions of n like balls into the k urns so that each urn contains at most r balls. Show that rk
Hk(t)
= L H(n, k, s, r)tn n=O
= [1 +
C) s
t+ (
s+1
2 ) t2 + ... +
k
s+r-1 (
r
)
tr ]
and (n + 1)H(n + 1, k, s, r)
= (sk + n)H(n, k, s, r) -sk ( s +r) r H(n-r,k-1,s,r), n 2: r,
9. 7. EXERCISES
367
1 (sk+:- ), n:::;r.
H(n,k,s,r)=
Further, derive the vertical recurrence relation
~ H(n,k,s,r)=~
(s -1) +j.
i=O
.
H(n-J,k-1,s,r), m=min{n,r}.
J
27. (Continuation). Let Dr(n, k, s) be the number of distributions of n like balls into the k urns so that each urn contains at least r balls. Show that 00
Dk,r(t) =
L
Dr(n, k, s)tn
n=k
=[(1-t)
-s
)t- .. ·-(
s - 1 - (1
s
+ r- 2 r- 1
)t
k r-1
]
and (n
+ 1)Dr(n + 1, k, s) = (sk + n)Dr(n, k, s) +sk ( s
Dr(n, k, s)
= 0,
n
+ rr-1
1)
Dr(n- r
+ 1,k- 1,s),
< rk, Dr(rk, k, s) = (
s
+ rr
1)
n
> rk,
k
Further, derive the recurrence relation
28. Let us consider n + r balls among which n are distinguishable and the other r are indistinguishable. Let U(n, r, k) be the number of distributions of these balls into k distinguishable urns without any restriction and W(n, r, k) the corresponding number with the restriction that no urn remains empty. Show that
and
368
DISTRIBUTIONS AND OCCUPANCY
29. (Continuation). Show combinatorially that
W(n,r,k)=~ m
(
r+J·
k-
1
1)
where
. . (k)jS(n,J), m=mm{n,k},
j
S(n,j)
= ~ L( -1)j-l (~)in 0
~
J. i=O
is the Stirling number of the second kind. Also, show that W(n, r, k)
= k{W(n- 1, r, k) + W(n- 1, r, k- 1)},
W(n,O,k) = kn, W(O,r,k) = (r
30. (Continuation). Show that
and
Further, conclude that
1
+ :·- ),
W(n,r,k) = 0, k
>n +r
Chapter 10 PARTITIONS OF INTEGERS
10.1
INTRODUCTION
The theory of partitions of integers, established by Euler in the 18th century and enhanced by Hardy, Rarnanujan and Rademacher, belongs to both combinatorics and number theory. As regards the combinatorial aspect of partitions, note first .that the positive integer solutions of the linear equation x 1 + x 2 + · · · + ck = n with n a positive integer, enumerated in Chapter 2, are ordered solutions. Further, the enumeration of the corresponding non-ordered solutions, the partitions of the integer n, is of great interest. Note also that, the enumeration of distributions of indistinguishable balls into indistinguishable urns is merely a partition enumeration problem. In this chapter, after the introduction of the notion of a partition of a positive integer n, recurrence relations and generating functions for the total number of partitions of n and the numbers of partitions of n into k and into at most k parts are derived. Then, a universal generating function for the number of partitions of n into parts of specified or unspecified number, whose number of parts of any specific size belongs to a subset of nonnegative integers, is obtained. As applications of this generating function several interesting sequences of partition numbers are presented. Furthermore, relations connecting various partition numbers are deduced by using their generating functions. Also, after introducing the Ferrers diagram of a partition and the notion of a conjugate (and a self-conjugate) partition, additional interrelations among certain partition numbers are derived. Euler's pentagonal theorem on the difference of the number of partitions of n into an even number of unequal parts and the number of partitions of n into an odd number of unequal parts is obtained. The last section is devoted to the derivation of combinatorial identities; the Euler and Gauss-Jacobi identities are deduced. As a complement to this subject, a collection of exercises on q-numbers, q-factorials and q-binomial coefficients, as well as on q-Stirling numbers of the first and second kind, is provided.
PARTITIONS OF INTEGERS
370
10.2
RECURRENCE RELATIONS AND GENERATING FUNCTIONS
DEFINITION 10.1 A partition ofa positive integer n is a non-ordered collection ofpositive integers whose sum equals n. These integers (terms ofthe sum) are called summands or parts of the partition.
In the case of a partition of n into a specified number of parts, say k, then the term partitions of n into k parts is used. Since the order of parts in a partition does not count, they are registered in decreasing order of magnitude. Thus, a partition of n into k parts is a solution in positive integers of the linear equation: (10.1)
In a partition of n, let Yi fori= 1, 2, ... , n. Then Y1
2: 0 be the number of parts that are equal to i,
+ 2y2 + · · · + nyn = n,
Yi
2: 0,
i
= 1, 2, ... , n
(10.2)
In the case of a partition of n into k parts, in addition, Y1
+ Y2 + · · · + Yn
(10.3)
= k.
If {Yi 1 , Yi 2 , ••• , Yir-l, Yir }, with i1 < i2 < · · · < ir-1 < ir, is the set of the positive Yi in (10.2), the corresponding partition of n is denoted by
omitting the exponents that are equal to 1. REMARK 10.1 It is important to point out the clear distinction between a partition of a positive integer and a partition of a non-empty set. Thus, a partition of the positive integer n into k parts is a solution of the equation X1
+ X2 + · · · + Xk = n,
X1
2:
X2
2: · · · 2:
Xk
2:
1
in positive integers, say {r 1, r 2, ... , r k} ,r1 2: r2 2: · · · 2: rk 2: 1, which corresponds to a distribution of n indistinguishable balls (the units) into k indistinguishable urns containing r 1, r 2, ... , rk balls. In contrast, a partition of a non-empty set B, with N(B) = n elements, into k subsets is a solution of the set-theoretic equation
10.2.
RECURRENCES AND GENERATING FUNCTIONS
371
in non-empty disjoint sets, say {A 1 ,A 2 , ... ,Ak}, N(AI) 2: N(A 2 ) 2: ··· 2: N(Ak) 2: 1, Ai n Ai = 0, i =j:. j, with N(Ai) = ri, i = 1, 2, ... , k, which corresponds to a distribution of n distinguishable balls (the elements of B) into k indistinguishable urns containing r 1 , r 2 , ••• , rk balls. I Example 10.1 Let us determine the partitions of the integers I, 2, 3, 4, 5 and 6. Clearly, number 1 has only one partition with one part equal to I, number 2 has two partitions: 2, 12 and number 3 has three partitions: 3, 21, 13 . Further, since 4 = 3 + 1 = 2 + 2 = 2 + 1 + 1 = 1 + 1 + 1 + 1, the partitions of number 4 are: 4, 31, 22 , 21 2 , 14 . Also, since 5 = 4 + 1 = 3 + 2 = 3 + 1 + 1 = 2 + 2 + 1 = 2 + 1 + 1 + 1 = 1 + 1 + 1 + 1 + 1, the partitions of number 5 are: 5, 41, 32, 31 2 , 22 1, 21 3 , 15 . Finally, since 6 = 5 + 1 = 4 + 2 = 3 + 3 = 4 + 1 + 1 = 3 + 2 + 1 = 2 + 2 + 2 = 3+1+1+1=2+2+1+1=2+1+1+1+1=l+l+l+l+l+l,fue partitions of number 6 are: 6, 51, 42, 32 , 41 2 , 321, 23 , 31 3 , 22 12 , 21 4 , 16 • D
Let p(n) be the number of partitions of nand p(n, k) be the number of partitions of n into k parts. Then n
p(n)
= '2:p(n,k),
n
= 1,2, ....
(10.4)
k=l
If P(n, k) is the number of partitions of n into at most k parts, then k
P(n, k)
= '2:p(n, r),
(10.5)
r=l
p(n, k) = P(n, k)- P(n, k- 1)
(10.6)
P(n, k) = p(n), k 2: n.
(10.7)
and
A recurrence relation for the calculation of the number of partitions of n into k parts is given in the following theorem. THEOREM 10.1 The number p(n, k) of partitions ofn into k parts satisfies the recurrence relation m
p(n,k)='2:p(n-k,r), k=2,3, ... ,n-1, n=2,3, ... , r=l
with m = min {k, n - k} and initial conditions p(n, 1) = p(n, n) = 1, n = 1, 2, ... , p(n, k) = 0, k > n.
(10.8)
372
PARTITIONS OF INTEGERS
PROOF Setting in the linear equation (10.1) z; = x;- 1, i = 1, 2, ... , k, we deduce the linear equation Zt
+ Zz + · · · + Zk = n - k,
Zt ~
~
Zz
· · · 2: Zk
~
0.
(10.9)
Since the transformation is one to one, the number p(n, k) of solutions of (10.1) equals the number of solutions of (10.9). If P is the set of solutions of (10.9) and Pr ~ P is the subset of solutions of (10.9) for which Zr ~ 1 and z; = 0, i = r + 1,r +2, ... ,k, r = 1, 2, ... ,m, m = min{k, n- k}, then P; npi = 0, i =f. j and P = P 1 + Pz + · · · + P m. Therefore, according to the addition principle, m
p(n,k)
= N(P) = LN(Pr) r=l
and, since N(Pr) equals the number p(n- k, r) of solutions of the linear equation Zt
+ Zz + · · · + Zr = n- k,
Zt ~
Zz
~
· · · ~ Zr 2: 1,
I
(10.8) is established. Its initial conditions are obvious.
Using recurrence relation (10.8) and its initial conditions, Table 10.1 of the numbers p(n, k) is constructed. Summing the elements of each row we get, according to (10.4), the numbers p(n).
Table 10.1 The Numbers p(n, k) and p(n)
k
l
2
I l I l l l l l l l
l l 2 2 3 3 4 4
3
4
5
6
7
8
9
10
p(n)
n l 2 3 4 5 6 7 8 9 10
5
l l 2 3 4
5 7 8
l l 2 3
5
l l 2 3
6 9
5 7
l l 2 3
5
l l 2 3
l l 2
l l
l
l 2 3 5 7 II 15 22 30 42
REMARK 10.2 From recurrence relation (10.8) the following relations are readily deduced: fork~ n/2, whence n- k:::; n/2, and by the expression (10.4), n-k
p(n, k)
=L
r=l
p(n- k, r)
= p(n- k),
(10.10)
10.2.
RECURRENCES AND GENERATING FUNCTIONS
while, fork< n/2, whence n- k
> n/2, k-1
k
p(n, k)
373
= LP(n- k, r) = LP(n- k, r) + p(n- k, k) r=l
r=l
= p(n- 1, k- 1)
+ p(n- k, k).
(10.11)
Note that this recurrence relation may also be derived independently of the recurI rence relation (1 0.8) (see Exercise I). From Theorem 10.1, using (10.5), (10.6) and (10.7), the following corollary is deduced.
COROLLARY 10.1 The number P(n, k) ofpartitions ofn into at most k parts satisfies the recurrence relation P(n, k) = P(n, k- 1) fork
= 2, 3, ...
, n - 1, n
+ P(n- k, k),
(10.12)
= 2, 3, ... , with initial conditions P(n, 1) = 1, P(O, k) = 1.
Using recurrence relation (10.12) and its initial conditions, Table 10.2 of the numbers P(n, k) is constructed.
Table 10.2 The Numbers P(n, k)
k
1
2
3
4
5
6
7
8
9
10
1 1 1 1 1 1 1 1 1 1
1 2 2 3 3 4 4
1 2 3 4
1 2 3
1 2 3
1 2 3
1 2 3
1 2 3
1 2 3
1 2 3
5
5 7
6 9 11 15 18 23
5 7 10 13 18 23 30
5 7 11 14 20 26 35
5 7 11 15 21 28 38
5 7 11 15 22 29 40
5 7 11 15 22 30 41
5 7 11 15 22 30 42
n 1 2 3 4
5 6 7 8 9 10
5 5 6
8 10 12 14
Bivariate and vertical generating functions for the numbers p(n, k), k = 1, 2, ... , n, n = 1, 2, ... , are derived in the next theorem.
PARTITIONS OF INTEGERS
374
THEOREM 10.2 (a) The bivariate generating function of the numbers p(n, k) of partitions ofn intokparts, k = 1, 2, ... , n = 1, 2, ... , is given by n
CXl
(X)
(10.13)
n=Dk=O
i=l
where p(O, 0) = 1. (b) The vertical generating function of the numbers p(n, k) of partitions of n into k parts, n = k, k + 1, ... , for fixed k, is given by k
(X)
Gk(t)
=L
p(n, k)tn
= tk II (1- ti)- 1 .
n=k
(10.14)
i=l
PROOF (a) Using the fact that the number p(n, k) of partitions of n into k parts equals the number of nonnegative integer solutions of (10.2) and (10.3), it follows that CXl
G(t, u) =
n
L L (I: uYl+Y2+" ·+YntYl+2Y2+"·+nYn)' n=Dk=O
where in the inner sum the summation is extended over all nonnegative integer solutions of (10.2) and (10.3). Since this inner sum is summed over all k 0, 1, ... , nand n 0, 1, ... , it follows
=
=
establishing ( 10.13). (b) Interchanging the order of summation in (10.13), we get (X)
G(t, u) =
L Gk(t)uk k=O
and since
G(t,ut) = (1- ut)G(t,u), we deduce the recurrence relation
Consequently,
10.2.
RECURRENCES AND GENERATING FUNCTIONS
375
and k
Gk(t) = tk
II(l-
ti)-1'
i=1
I
which completes the proof of the theorem.
The bivariate generating function (10.13) of p(n, k) for u = 1 yields, by virtue of (10.4), the generating function of p(n). This is given in the following corollary of Theorem 10.2. COROLLARY 10.2 The generating function of the number p(n) of partitions of n, n = 1, 2, ... , is given by 00
G(t)
n=O
where p(O)
00
=bP(n)tn =II (1-
1 ti)- ,
(10.15)
i=1
= 1.
Bivariate and vertical generating functions for the numbers P(n, k), k = 0, 1, ... , n = 0, 1, ... , are derived in the following corollary of Theorem 10.2. COROLLARY 10.3 (a) The generating function of the numbers P( n, k) of partitions of n into at most kparts, k = 0, 1, ... , n = 0, 1, ... , is given by 00
00
00
(10.16) n=Dk=O
i=O
(b) The vertical generating function of the numbers P(n, k), n = 0, 1, ... , for fixed k, is given by k
00
Fk (t)
=L P(n, k)tn =II (1- nn=O
1
.
(10.17)
i=1
PROOF (a) The bivariate generating function F(t, u) of the numbers P(n, k), k = 0, 1, ... , n = 0, 1, ... , upon introducing (10.5), may be expressed as
00
00
= (1- u)- 1 LLP(n,r)urtn, n=Or=O
PARTITIONS OF INTEGERS
376
which, by virtue of(l0.13), implies (10.16). (b) Expanding into powers of u both members of the relation
F(t,ut) = (1- u)F(t,u), according to 00
F(t,u) = LFk(t)uk, k=O
it follows that
Thus
Fk(t)
= (1- tk)- 1 Fk-! (t),
k
= 1, 2, ...
, Fo(t)
=1
and k
Fk (t)
= II (1- ti)-1' i=l
which completes the proof of the corollary.
10.3
I
A UNIVERSAL GENERATING FUNCTION
The generating functions (10.13), (10.15) and (10.16) constitute particular cases of the generating function of the number of partitions of n into parts of specified or unspecified number, whose number of parts of any specific size belongs to a subset of nonnegative integers. Specifically, let A = (a;,j), i = 1, 2, ... , j = 0, 1, ... , be an infinite matrix with elements a;.,j = 0 or 1. The matrix A determines a sequence Y;, i = 1, 2, ... of subsets of nonnegative integers and vice versa as follows: for a specific i = 1, 2, ... , Y; = {j : ai,j = 1} is the set of indices j of the elements of the i-th row of the matrix A that are equal to 1. Let us denote by p(n; A) the number of partitions of nand by p(n, k; A) the number of partitions of n into k parts whose number y; of parts that are equal to i belongs to Y;, i = 1, 2, .... Also, let us denote by P(n, k; A) the number of partitions of n into at most k parts whose number y; of parts that are equal to i belongs to Yi, i = 1, 2, .... Note that, in particular for a;,j = 1, i = 1, 2, ... , j = 0, 1, ... , whence Y; = {0, 1, ... }, i = 1, 2, ... , p(n; A) := p(n), p(n, k; A) := p(n, k) and P(n, k; A) := P(n, k). A bivariate generating function for p(n, k; A), k = 0, 1, ... , n, n = 0, 1, ... is derived in the next theorem.
10.3. A UNIVERSAL GENERATING FUNCTION
377
THEOREM 10.3 Let A = (ai,J), i = 1, 2, ... , j = 0, 1, ... be an infinite matrix with elements ai,j = 0 or 1 and p(n, k; A) be the number of partitions of n into k parts whose number Yi of parts that are equal to i belongs to the set Yi = {j : ai,j = 1}, i = 1,2, .... Then
(10.18)
PROOF The number p(n, k; A) equals the number of nonnegative integer solutions of (1 0.2) and (1 0.3) with Yi E
Yi = {j : ai,J = 1}, i = 1, 2, ....
(1 0.19)
Consequently, oo
G(t, u; A)=
n
L L (2: uY1+Y2+·+YntY1+2Y2+·+nYn)' n=Ok=O
where, the summation in the inner sum is extended over all nonnegative integer solutions of (1 0.2) and (1 0.3) that satisfy (1 0.19). Introducing the elements a;,j of the matrix A into this sum, we get the expression oo
n
G(t ' u·A) =""'""'("'a a2 ,y2 ···a n,yn uY1+Y2+··+YntY1+2Y2+··+nyn) ' ~~ ~ l,yl
'
n=Ok=O
where, the summation in the inner sum is extended over all nonnegative integer solutions of (1 0.2) and (1 0.3). Note that this transformation of the inner sum incorporates condition ( 10.19), adding zero terms and thus saves from the concern of selecting the solutions of ( 10.2) and ( 10.3) that satisfy ( 10.19). Since this inner sum is summed over all k = 0, 1, ... , nand n = 0, 1, ... , it follows
which is the required expression of the generating function.
I
COROLLARY 10.4 Let A = (ai,J ), i = 1, 2, ... , j = 0, 1, ... , be an infinite matrix with elements ai,j = 0 or 1. Also let p(n; A) be the number of partitions of nand P(n, k; A) be the number of partitions of n into at most k parts whose number Yi of parts that
PARTITIONS OF INTEGERS
378
are equal to i belongs to the set Yi
= {j : ai,j = 1}, i = 1, 2, ....
Then
(10.20)
and
PROOF Expressing the number p(n; A) as a sum of the numbers p(n, k; A), k =0,1, ... ,n,weget oo
00
n=O
n
n=Ok=O
and so, from (10.18) with u = 1, (10.20) is deduced. Similarly we get oooo
ooook
F(t,u;A) = LLP(n,k;A)uktn= LLLP(n,r;A)uktn n=Ok=O n=Ok=Or=O
n
oo
= (1- u)- 1 L
LP(n,r; A)urtn n=Or=O
and so, by virtue of (I 0.18), (I 0.21) is deduced.
I
Several particular cases of the generating functions (10.18) and (10.20) are presented in the following examples. Example 10.2 Partitions into unequal parts Let q(n) be the number of partitions of n into unequal (different) parts and q(n, k) be the number of partitions of n into k unequal (different) parts. Determine the generating functions ex>
H(t) = L q(n)tn, H(t, u) n=O
ex>
=L
n
L q(n, k)uktn,
n=Ok=O
ex>
Hk(t)
=L
q(n, k)tn.
n=O
Note that, in this case, the number Yi of parts that are equal to i may take the values 0 or I, i = 1, 2, .... Consequently, q(n) = p(n; A), q(n, k) = p(n, k; A),
10.3. A UNIVERSAL GENERATING FUNCTION
= =0,1 and
with ai,j 1, j and (10.20),
ai,j
oo
=0, j =2, 3, ... , i =1, 2, .... Thus, by (10.18) n
00
n=Ok=O and
i=l
00
H(t)
379
00
=L
q(n)tn
n=O
=II (1 + ti). i=l
For the calculation of the third generating function, note that
H(t, u)
= (1 + ut)H(t, ut)
and since
00
=L
H(t, u)
Hk(t)uk,
k=O it follows that
Therefore
and
Hk(t)
=
00
L q(n,k)tn n=k(k+l)/2
k
k
j=l
j=l
=II ti(l- tj)-l =tl+2+ .. ·+k II(l- ti)-1.
Hence k
Hk(t) = tk(k+l)/2
II (1- tj)-l.
0
j=l Example 10.3 Partitions into even and odd parts (a) LetPo(n) be the number of partitions ofn into even parts and Po(n, k) be the number of partitions of n into k even parts. Determine the generating functions oo
Go(t)
oo
= LPo(n)tn, n=O
Go(t, u)
n
=L
LPo(n, k)uktn. n=Ok=O
In this case, the number y 2 i of parts that are equal to 2i belongs to the set Y2i = {0, 1, ... }, while the number Y2i-l of parts that are equal to 2i- 1 belongs tothesetY2 i-l {O},i 1,2, .... Consequently,po(n) =p(n;A),po(n,k)
=
=
=
PARTITIONS OF INTEGERS
380
p(n, k; A), with ai,O = 1, a2i,j Thus, by (10.18) and (10.20),
= 1 and a2i-l,j = 0, i = 1, 2, ... , j = 1, 2, .... n
oo
00
n=Ok=O
and
i=l
00
00
n=O
i=l
(b) Let Pt (n) be the number of partitions of n into odd parts and p 1 ( n, k) be the number of partitions of n into k odd parts. Then, proceeding as in the previous case, we conclude that n
oo
Gt (t, u)
=L
oo
:~::> 1 (n, k)uktn
=II (1- ut 2 i-l)- 1
n=Ok=O
and
i=l
00
00
n=O
i=l
(c) Let q0 ( n) be the number of partitions of n into unequal even parts and q1 ( n) the number of partitions of n into unequal odd parts. Determine the generating functions 00
Ho(t)
00
=L
=L
qo(n)tn, Ht(t)
n=O
qt(n)tn.
n=O
In the first case Y2i = 0 or I, Y2i-1 = 0, i = 1, 2, ... and so qo(n) = p(n; A), with a2i,j = 1, j = 0, 1, a2i,j = 0, j = 2, 3, ... , i = 1, 2, ... and a2i-t,o = 1, a2i-l,J = 0, j = 1,2, ... , i = 1,2, .... In the second case Y2i-l = 0 or I, Y2i = 0, i = 1, 2, ... and so q1 (n) = p(n; A), with a2i-l,J = 1, j = 0, 1, a2i-l,J = 0, j = 2, 3, ... , i = 1, 2, ... and a2i,o = 1, a2i,j = 0, j = 1, 2, ... , i = 1, 2, .... Thus, by virtue of ( 10.20), it follows that 00
Ha(t)
00
=L
qo(n)tn
n=O
=II (1 + t 2 i) i=l
and 00
Ht(t)
=L
00
qt(n)tn
n=O
= II(1 + t 2 i-l).
0
i=l
Example 10.4 Partitions into parts of restricted size Let R(n, k) be the number of partitions ofn with no part greater thank. Determine the generating 00
Rk(t) =
L R(n, k)tn. n=O
10.3. A UNIVERSAL GENERATING FUNCTION Note that R(n, k) = p(n; A), with ai,O 1,2, ... ,k,ai,j = O,i = k+1,k+2, ... ,j
381
= 1, i = 1, 2, ... , ai,j = 1, i = = 1,2, .... So,accordingto(l0.20),
00 k Rk(t) = L R(n, k)tn = (1 - ti)- 1 . i=l n=O
IT
Note that this generating function equals the generating function (1 0.17), Rk(t) = Fk(t). Consequently, the number R(n, k), of partitions of n with no part greater than k, equals the number P(n, k), of partitions of n into at most k parts, R(n, k) = P(n, k). 0
Example 10.5 Partitions into an even and an odd number of parts (a) Let P0 (n) be the number of partitions of n into an even number of parts and P 1 (n) be the number of partitions of n into an odd number of parts. Determine the generating functions 00 00 Ao(t) = LPo(n)tn, A1(t) = LP1(n)tn. n=O n=O The numbers P0 ( n) and P 1 ( n) may be expressed in terms of the number p( n, k) of partitions of n into k parts, k = 1, 2, ... , n, as [n/2]
P0 (n)
=
L
p(n,2r)
n
1
= 2 L{p(n,k) + (-1)kp(n,k)} k=O
r=O
and [(n-1)/2]
P 1 (n)
=
L r=O
p(n, 2r + 1)
=
1
n
L {p(n, k)- ( -1)kp(n, k)}, 2 k=O
respectively. Therefore, using (10.13) with u = ±1, it follows that
and
g(l-
00 1{00 At(t) = ~P1(n)tn = 2
ti)- 1
-
g(1 + 00
ti)- 1 }
.
(b) Let Q 0 ( n) be the number of partitions of n into an even number of unequal parts and Q1 (n) be the number of partitions of n into an odd number of unequal parts. Determine the generating functions 00
Ba(t)
=L n=O
00
Qo(n)tn, Bt (t)
=L
QI (n)tn.
382
PARTITIONS OF INTEGERS
The numbers Q 0 ( n) and Q1 ( n) may be expressed in terms of the number q( n, k) of partitions of n into k unequal parts, k = 1, 2, ... , n, as [n/2]
Qo(n)
=
L
q(n,2r) =
r=O
1
n
L{q(n,k)
2 k=O
+ (-1)kq(n,k)}
and [(n-1)/2]
Ql (n) =
L
q(n, 2r
+ 1)
=
r=O
1
n
L {q(n, k)- ( -1)kq(n, k)},
2 k=O
respectively. Therefore, using the generating function H(t, u) of Example 10.2 with u = ±1, it follows that
and
Example 10.6 Partitions into specified parts In the partitions of a positive integer n, without any restriction, XJ
+ X2 + · · · + Xk = n,
X! ~ X2 ~ · · • ~ Xk ~
1, k
= 1, 2, ...
, n,
the parts Xi, i = 1, 2, ... , n belong to the set { 1, 2, ... , n}. Let us now consider the partitions of n whose parts Xi, i = 1, 2, ... , n belong to a subset {it, i 2, ... , ir} of { 1, 2, ... , n}. In this case, if Yi. is the number of parts that are equal to i 8 , s = 1,2, ... ,r, then
The number D(n; it, i 2, ... , ir) of partitions ofn whose parts belong to the subset {it, i2, ... , ir} of { 1, 2, ... , n} equals the number of nonnegative integer solutions of this equation. Determine the generating function 00
D; 1 ,i2 ... ,dt)
= LD(n;it,i2,··.
,ir)tn.
n=O
=
Note that D(n;i 1 ,i 2 , ... ,ir) p(n;A), where the elements of the matrix A= (a;,j),i = 1,2, ... , j = 0,1, ... ,aregivenbyai,O = 1,i = 1,2, ... ,
383
10.4. INTERRELATIONS AMONG PARTITION NUMBERS
=
l,i E {it,i2,···,ir},ai,j Hence, by (I 0.20),
ai,j
= O,i
¢ {it,i2,···,ir},j r
00
Di 1 .i2, ... ,ir(t)
= 1,2, ....
=L
D(n; it, i2, ... , ir)tn
n=O
=II (I- ti·)-
1
.
s=l
The money-changing problem is a characteristic example requiring the calculation of partitions into specified parts. Specifically, let us consider a cashier that has an unrestricted number of coins of 5, 10, 25 and 50 cents. Calculate the number of ways of forming a given amount of, say, $ I. This number equals D(IOO; 5, 10, 25, 50) = D(20; 1, 2, 5, 10), the number of nonnegative integer solutions of the linear equation Sy5 + 10y10 + 25Y25 + SOy50 = 100 or, equivalently, the equation Yt + 2y2 + 5y 5 + 10y 10 = 20, which equals the coefficient of t 20 in the expansion of the generating function D1,2,5,10(t)
10.4
= [(1- t)(I- t 2)(1- t 5)(1- t 10 )t 1.
o
INTERRELATIONS AMONG PARTITION NUMBERS
The generating functions of the numbers of partitions that satisfy certain conditions may be used to deduce relations between these numbers. Such relations are derived in the following theorems.
THEOREM 10.4 The number q(n) of partitions ofn into unequal parts equals the number p 1 (n) of partitions ofn into odd parts: (10.22) q(n) = Pt(n). PROOF The generating function of the number q(n) of partitions of n into unequal parts is given by (see Example 10.2) 00
00
H(t) = L q(n)tn n=O
= II (1 + ti) i=l
and the generating function of the number p 1 ( n) of partitions of n into odd parts is given by (see Example 10.3) 00
Gt(t) = LPt(n)tn
n=O
00
=II (I- t2i-l)-1. i=l
Using the identity (1
+ ti)(I- ti) = (1- t 2i),
i
= 1,2, ...
,
PARTITIONS OF INTEGERS
384
the generating function H(t) may be written in the form 00
H(t)
00
00
=II (1- t i)(1- ti)- =II (1- t i) II (1- ti)1
2
2
i=1
i=1
1
.
j=1
If, in the last product the terms with j even are separated from those with j odd, then it is written as 00
00
00
j=1
i=l
i=1
and so 00
H(t)
=II (1- t2i-1 )-1 = Gl (t). i=1
The last relation implies (10.22).
I
THEOREM 10.5 The number P(n, k) of partitions of n into at most k parts, which equals the number R(n, k) of partitions of n with no part greater thank, is equal to the number p( n + k, k) of partitions of n + k into k parts:
P(n, k)
= R(n, k) = p(n + k, k).
(10.23)
PROOF
The generating function of the numbers P(n, k) 0, 1, ... is (see Corollary 10.3 and Example 10.4) 00
Fk(t) = LP(n,k)tn = LR(n,k)tn = n=O
II(1- ti)-
00
n=O
00
II (1- ti)- 1. i=l
00
= LP(r,k)tr-k = LP(n+k,k)tn. r=k
The last relation implies (10.23).
n=O
I
1
,
= k, k + 1, ... , is (see
k
00
Gk(t) = LP(r, kW = tk r=k
=
i=1
while the generating function of the numbers p(r, k), r Theorem 10.2)
LP(n,k)tn
R(n, k), n
k
00
n=O
=
10.4. INTERRELATIONS AMONG PARTITION NUMBERS
385
THEOREM 10.6 The number q( n, k) of partitions of n into k unequal parts equals the number P( n - k( k + 1) /2, k) of partitions of n - k( k + 1) /2 into at most k parts, which is equal to the number p(n- k(k- 1)/2,k) of partitions ofn- k(k- 1)/2 into k parts: q(n, k) = P(n- k(k PROOF
+ 1)/2, k)
= p(n- k(k- 1)/2, k).
(10.24)
Since (see Example 10.2 and Corollary 10.3) ~
Hk(t)=
k
L
q(n,k)tn=tk(k+l)/2IT(I-ti)-l
n=k(k+l)/2
and
i=l
~
Fk(t)
=
k
LP(r,kW r=O
~
= II(l-ti)-1, i=l
~
L q(n, k)tn n=k(k+l)/2
=L
P(r, k)tr+k(k+l)/2
r=O ~
=
L P(n- k(k n=k(k+l)/2
+ 1)/2, k)tn.
The last relation implies the first part of (1 0.24). Its second part is deduced from (10.23) by noting that n- k(k + 1)/2 + k = n- k(k- 1)/2. I REMARK 10.3 The following combinatorial derivation of (10.24) possesses its own merits. The number q(n, k) of partitions of n into k unequal parts equals the number of integer solutions of the linear equation X1
(a) Putting z; to the equation Zr
(10.25) + X2 + · · · + Xk = n, Xr > X2 > · · · > Xk ~ 1. = x;- (k-i+ 1), i = 1, 2, ... , k, equation (1 0.25) is transformed
+ Z2 + · · · + Zk = n- k(k + 1)/2,
z 1 ;:::
Z2 ;::: · · · ;::: Zk-1 ;::: Zk ;::: 0,
whose number of integer solutions equals the number P(n- k(k + 1)/2, k) of partitions of n - k(k + 1) /2 into at most k parts. (b) Setting Wi = xi - (k- i), i = 1, 2, ... , k, equation (10.25) is transformed to the equation W1
+ w 2 + · · · + Wk
= n- k(k- 1)/2, Wr ;::: W2 ;::: · · · ;::: Wk-1 ;::: Wk ;::: 1,
PARTITIONS OF INTEGERS
386
whose number of integer solutions equals the number p(n- k(k- 1)/2, k) of I partitions of n - k (k - 1) /2 into k parts. A simple and instructive representation of the partition of a positive integer n is its Ferrers diagram, which is defined as follows. Ferrers diagram of a partition of a positive integer n into parts Xi, i = 1,2, ... 'k, ... ' X1
+ X2 + · · · + Xk + · · · =
n,
X1
:2:
X2
:2: · · · :2:
Xk
:2: · · · :2: 1, (10.26)
is called the diagram of (equidistant) points whose i-th horizontal row of points (numbering from the bottom up) has Xi points, i = 1, 2, ... , k, .... To each partition there corresponds its conjugate partition, defined as follows. Conjugate partition of the partition (10.26) is called the partition of n into parts YJ> j = 1, 2, ... , r, ... , Y1
+ Y2 + · · · + Yr + · · · =
n,
Y1
:2:
Y2
:2: · · · :2: Yr :2: · · · :2: 1, (10.27)
whose Ferrers diagram the number YJ of points of the j-th horizontal row equals the number of points of the j-th column (numbering from left to right) of the Ferrers diagram of the partition (10.26). Self-conjugate partition is called a partition that coincides with its conjugate partition. FIGURE 10.1 Ferrers diagram y
6
•
5
•
•
4
•
•
•
3
•
•
•
2
•
•
•
•
•
1
•
•
•
•
•
•
0
1
2
3
4
5
6
X
Example I 0. 7 Figure 10.1 gives the Ferrers diagram of the partition 653 2 21 of 20. Clearly, its D conjugate partition is 6542 2 1.
10.4. INTERRELATIONS AMONG PARTITION NUMBERS
387
Some interesting interrelations among partition numbers are derived by considering the Ferrers diagrams of partitions and their conjugate partitions. Thus we have:
THEOREM 10.7 The number p( n, k) of partitions of n into k parts equals the number of partitions ofn into parts of which the maximum is k. PROOF Consider a partition of n into k parts and its Ferrers diagram. Associate to it its conjugate partition, which is also a partition of n into parts of which the maximum is k. Since this correspondence is one to one, the required conclusion is deduced. I
THEOREM 10.8 The number of self-conjugate partitions ofn equals the number q 1 ( n) of partitions of n into unequal odd parts. Consider a self-conjugate partition of n into parts xi. i = 1, 2, ... ,
PROOF X1
+ Xz + · · · + Xk + · · · =
n,
X1
~ Xz ~ · · · ~ Xk ~ · · · ~
1, (10.28)
and its Ferrers diagram. Note that this diagram is symmetric with respect to the line x = y. This symmetry implies that the pairs of straight-line sections defined by the points {(i,i), (x;,i)} and {(i,i), (i,yi)}, i = 1,2, ... ,k .. . , since xi= y;, i = 1, 2, ... , k, ... , form isosceles angles. The number Zi ofpointsofthediagram that lie on the i-th isosceles angle is odd, Zi
and since x 1
~
x2
= 2(xi -1) + 1, i = 1,2, ...
~ · • · ~ Xk ~ • • · ~ Z1
,k, ... ,
(10.29)
1, we have in addition
> Zz > · · · > Zk > · · · ~ 1.
Let us now correspond to the self-conjugate partition of n (10.28) the partition of n into unequal odd parts, Z1
+ Zz + · · · + Zk + · · · = n,
Z1
> Zz > · · · > Zk > · · · ~ 1. (10.30)
This correspondence of (1 0.28) to (I 0.30), according to (I 0.29), is one-to-one and thus the number of self-conjugate partitions of n equals the number of partitions of n into unequal odd parts. I REMARK 10.4 The one-to-one correspondence between the self-conjugate partitions of n and the partitions of n into unequal odd parts is further clarified by considering the following specific cases.
PARTITIONS OF INTEGERS
388 FlGURE 10.2
0
1 2 3 4 5 6
X
0
1 2 3 4 5 6 7 8 9 10 11
Z
(a) Consider the self-conjugate partition 62 53 2 2 of 25 into the parts x 1 = 6, = 6, x3 = 5, x 4 = 3, x 5 = 3, x 6 = 2. Figure 10.2 (left) represents its Ferrers diagram in which the three pairs of straight-line sections: x2
({ (1, 1), (6, 1)}, {(1, 1), (1, 6)} ), ({ (2, 2), (6, 2)}, { (2, 2), (2, 6)} ), ( {(3,3), (5,3)}, {(3, 3), (3, 5)}) form isosceles angles. The number z;, of points of this diagram that lie on the i-th isosceles angle, is z; = 2(x; - 1) + 1, i = 1, 2, 3: z1 = 11, z2 = 9, z 3 = 5. Hence, to the self-conjugate partition 6 + 6 + 5 + 3 + 3 + 2 = 25 there corresponds the partition 11 + 9 + 5 = 25 into unequal odd parts the Ferrers diagram of which is represented in Figure 10.2 (right). FlGURE 10.3
w
y
•
5
I
x=y
4
3
•
3 2 1
0
z3
123456789z
0
1
2
3
4
5
X
(b) Consider the partition 971 of 17 into unequal odd parts: z1 = 9, z2 = 7, = 1. Figure 10.3 (left) represents its Ferrers diagram. We have x; = y; =
10.4. INTERRELATIONS AMONG PARTITION NUMBERS
389
+ (zi- 1)/2, i = 1, 2, 3: x1 = Y1 = 5, x2 = Y2 = 5, x3 = y 3 = 3 and so the. Ferrers diagram of the corresponding self-conjugate partition forms three isosceles angles:
i
( {(1, 1), (5, 1)}, {(1, 1), (1, 5)} ), ( {(2, 2), (5, 2)}, {(2, 2), (2, 5)} ),
({(3,3),(3,3)}, {(3,3),(3,3)}) Note that the third angle degenerates to the point (3, 3) of the straight line x = y. Figure 10.3 (right) represents this diagram. From this diagram it follows that the I self-conjugate partition that corresponds to the partition 971 is 52 32 2 •
THEOREM 10.9 Euler's pentagonal theorem Let Qo (n) be the number of partitions of n into an even number of unequal parts and Q1 ( n) be the number of partitions of n into an odd number of unequal parts. Then, the difference E(n) = Qo(n)- Q 1 (n) is given by
E(n)
(-1)k, n = (3k 2 ± k)/2
={ 0,
(10.31)
otherwise.
PROOF Let us, initially, consider the Ferrers diagram F of a partition of n in any (even or odd) number of unequal parts and let: (i) A be the straight-line section that starts from the easternmost point (of the first horizontal line) of the diagram F, forms an angle of 3Jr /4 with the horizontal axis and thus, passing through only the outer points ofF, ends in the northernmost of them. (ii) B be the straight-line section that starts from the northernmost point (of the first column) of the diagram F, is parallel to the horizontal axis and thus, passing through only the outer points ofF that have the same ordinate, ends in the easternmost of them. It should be noted that B, as well as A, may contain only one point ofF (degenerate to a point straight-line sections). Further, let N (A) = r and N (B) = s be the number of points of the diagram F that lie on A and B respectively. Now, we associate with the partition of n into unequal parts with Ferrers diagram F, the partition of n into unequal parts with Ferrers diagram G that is defined as follows: (a) If r < s, the Ferrers diagram G is deduced from F by removing the points that lie on A and adjoining them to the first columns, one to each one of them (Figure 10.4), except when A and B have a common point and r = s - 1. In the latter case the corresponding partition of n into unequal parts has k = r parts and xk = s = k + 1 so that n
= 2k + (2k-
1)
+ · · · + (k + 2) + (k + 1) = (3k 2 + k)/2
(10.32)
and to its Ferrers diagram F we do not associate any diagram G (Figure 10.5).
PARTITIONS OF INTEGERS
390
FIGURE 10.4 y 5 4
y
. ..... -. B
F
-
1
0
1 2 3
5 6
7 8
X
G
1
• • • • • • • • • • • • • • • • •
.
0
1 2
7
3 2
..
4
·-· • •
4
• • • • • • • • • • ' A • • • • • • • •
3 2
B'
5
3 4 5 6
A'
X
FIGURE 10.5 y 5
F
B
4
• - • - -· - • -
3
•
•
•
•
• '•, A
2
•
•
•
•
•
1
• • • • • • • '•
0
1 2 3 4 5 6 7 8
-a,
'
• ..
X
(b) If r :2: s, the Ferrers diagram G is deduced from F by removing the points that lie on B and adjoining them to the first rows, one to each one of them (Figure 10.6), except when A and B have a common point and r = s. In the latter case the corresponding partition of n into unequal parts has k = r parts and Xk = s = k so that
n = (2k- 1)
+ (2k- 2) + · · · + (k + 1) + k =
(3k 2
-
k)/2
(10.33)
and to its Ferrers diagram F we do not associate any diagram G (Figure 10.7). The transition from F toG changes (increases or decreases) by one the number of parts of the corresponding partition, without altering the unequality of the parts. Thus, ifF belongs to the set of Ferrers diagrams :F0, of the partitions of n into an even number of unequal parts, then G belongs to the set of Ferrers diagrams :F1, of the partitions of n into an odd number of unequal parts, while, if F belongs to :F1, then G belongs to :F0 and vice versa. Consequently, if n f. (3k 2 - k) /2 and n f. (3k 2 + k) /2, then the correspondence is one to one and so E( n) = Qo (n) Q 1 (n) = 0. Ifn = (3k 2 ± k)/2 and k is even, the Ferrers diagram of the partition (10.32) or (10.33) belongs to :Fo and has no image in :F1. while ifn = (3k 2 ± k)/2 and k is odd the Ferrers diagram of the partition (l 0.32) or (l 0.33) belongs to :F1
10.5. COMBINATORIAL IDENTITIES
391
FIGURE 10.6
y 5 3 2 1
• F • • • • • • • •', A • • • • • '41. ' • • • • • • '•
0
1 2 3 4 5 6 7
4
y 5
B
B'
X
G
·------·
4
3 2 1
• • • • • • • • • • • • • • • • • • •
0
1 2 3 4 5 6 7 8
A' X
FIGURE 10.7
y 5
F
B
4
·-·--·-·--· • • • • •
3 2 1
• • • • • • ' •' • • • • • • •' ' • • • • • • • • '•
0
1 2 3 4 5 6 7 8 9
"
A
"
X
andhasnoarchetype(pre-image)inF0 . HenceE(n) = Q0 (n)-Q 1 (n) for n = (3k 2 ± k)/2, and the proof of the theorem is completed. I
10.5
= (-1)k,
COMBINATORIAL IDENTITIES
Some interesting combinatorial identities may be deduced from the relation ()()
G(t, u; A)= L Gk(t; A)uk, k=O which connects the generating functions oo
G(t,u;A)
n
= LLP(n,k;A)uktn, n=Ok=O
oo
Gk(t;A)
= LP(n,k;A)tn, n=k
of the numbers p(n, k; A) of partitions of n into k parts, whose number of parts equal to i belongs to the set {j : ai,j = 1}, i = 1, 2, ... , where
PARTITIONS OF INTEGERS
392
=
=
=
A= (ai,j), i 1, 2, ... , j 0, 1, ... , with ai,J 0 or 1. In the literature, in expressing these identities instead of the variables t and u the variables q and x, respectively, are used. Further, such an identity is referred to as q-identity. Two typical q-identities are given in the following theorem. THEOREM 10.10 00
00
k
i=l
k=O
j=l
IT (1- xqi)-1 =I: xkqk IT (1- qi)-1, 00
00
k
i=1
k=O
j=1
(10.34)
IT (1 + xqi) =I: xkqk(k+1)/2 IT (1- qi)-1. PROOF
(10.35)
Introducing into the relation 00
G(t,u) = 'L:Gk(t)uk, k=O expressions ( 10.13) and (10.14) of the generating functions, n
oo
G(t,u)
=L
oo
LP(n, k)uktn n=Ok=O
=IT (1- uti)-
1
,
i=l k
00
IT(1-
Gk(t) = LP(n,k)tn = tj)- 1, j=l n=k of the numbersp(n, k) of partitions of n into k parts, and putting t
= q and u = x,
(10.34) is readily deduced. Similarly, introducing into the relation 00
H(t,u) = LHk(t)uk, k=O the expressions of the generating functions (see Example 10.2), oo
H(t, u)
=L
n
00
Hk(t)
=
oo
L q(n, k)uktn n=Ok=O
L q(n, k)tn n=k(k+l)/2
=IT (1 +uti), i=l k
= tk(k+I)/ 2 IT (1- ti)- 1, j=1
of the numbers q( n, k) of partitions of n into k unequal (different) parts, and putting
t = q and u = x, (10.35) is deduced.
I
10.5. COMBINATORIAL IDENTITIES
393
Combinatorial identities may also be deduced from the relation 00
G(t; A) = L
p(n; A)tn
n=O
when the number p(n; A), of partitions of n whose number of parts equal to i belongs to the set {j : ai,j = 1}, i = 1, 2, ... , where A = (ai,j), i = 1, 2, ... , j = 0, 1, ... , with ai,j = 0 or 1, can be evaluated independently of the generating function G(t; A). A characteristic case of such q-identity is Euler's identity that is deduced in the following corollary of Euler's pentagonal theorem.
COROLLARY 10.5 00
00
i=l
k=l
(10.36)
PROOF The generating functions of the numbers Q 0 (n) and Q 1 (n) of partitions of n into an even and odd number of unequal parts, respectively, are given by (see Example 10.5)
and
Hence
00
00
n=O
i=l
Further, the difference E (n) = Q 0 ( n) - Q1 ( n) has been evaluated in Theorem 10.9 as 2 (-1)k, n = (3k ± k)/2 E(n) = { 0, otherwise and so
00
LE(n)tn
00
=1+
n=O
L(-1)k{tk(3k-I)/2 +tk(3k+I)/2}. k=l
Consequently,
rr(l- ti> 00
i=l
z:(00
= 1+
k=l
1)k{tk(3k-I)/2 + tk(3k+I)/2}
PARTITIONS OF INTEGERS
394
and, putting t
= q, (10.36) is deduced.
I
COROLLARY 10.6 The number p( n) of partitions of n satisfies the recurrence relation n1
p(n)
n2
= ~)-1)k-
1
p(n- k(3k- 1)/2) + ~)-1)k- 1 p(n- k(3k + 1)/2),
k=I
k=I
(10.37) where ni is the largest positive integer satisfying fori = 1 the inequality n 1 (3n 1 1) ::=; 2n and for i = 2 the inequality n 2(3n2 + 1) ::=; 2n. Expression ( l 0.15) may be rewritten as
PROOF
Replacing the first factor of the left-hand side by expression ( 10.36), it follows that
{1_
~(- 1 )k-l{tk(3k-l)/2 + tk(3k+I)f2}}. {~p(n)tn} = 1
and, since p(O) = 1,
~ p(n)tn = {~ p(n)tn}. {~( -1)k-l {tk(3k-l)/2 + tk(3k+l)f2}} =
~ {~( -1)k- p(n- k(3k- 1)/2) 1
+ ~(-1)k-Ip(n- k(3k + 1)/2)} tn. Equating the coefficients of tn in both members of the last identity, (10.37) is I deduced. In the next theorem, using (10.34) and (10.35), the Gauss-Jacobi identity is derived.
THEOREM 10.11 Gauss-Jacobi identity ~
+~
I1( 1 -q2i)( 1 +xq2i-I)( 1 +x-Iq2i-I)= L i=l
k=-~
xkqk
2 •
(10.38)
10.5. COMBINATORIAL IDENTITIES
395
PROOF Replacing q by q2 in ( 10.35) and, in the resulting expression, replacing xq by x, it follows that
oo
oo
n
i=l
n=O
j=l
II(l +xq2i-l) = "L:>nqn 2 II( 1 -
q2j)-l.
0: (1 - q i) and using the relation 2
Multiplying both members by
1
00
n
00
i=l
j=l
j=l
we get 00
00
00
i=l
n=O
j=l
II (1 _ q2i)(1 + xq2i-l) = "L:>nqn 2 II (1 _ q2n+2j) 00
=
2:::: n=-oo
xnqn
2
00
II (1 _ q2n+2i), j=l
where the last equation holds since the additional terms are zero because, for any negative integer n, the factor j = -n in the product is zero. Also, replacing q by q2 and x by -q 2 n in (10.35), we get
j=l
r=O
i=l
and, introducing it into the previous expression, we sequentially deduce
oo
II( 1 i=l
+oo
oo r 2 2 xnqn L:xrqr +r+2rn 1 - q2i)-l n=-oo r=O i=l oo r +oo =L:(-1Y(-x-lqfii(1-q2i)-l xn+rq(n+r)2 n=-oo r=O i=l oo r +oo ="L::(-1f(-x-lqfii(1-q2i)-l xkqk2. r=O i=l k=-oo
q2i)( 1 + xq2i-l) =
II(
2::::
L
L
Further, replacing q by q2 in (10.34) and, in the resulting expression, replacing xq by -x- 1 , it follows that
Introducing it into the previous expression, we deduce (10.38).
I
PARTITIONS OF INTEGERS
396
10.6 BIBLIOGRAPHIC NOTES The roots of partitions of integers, according to L. E. Dickson (1920), may be traced in a letter from Gottfried Wilhelm Leibnitz to John Bernoulli in 1669. Their systematic study and development started in 1746 with Leonhard Euler and his two-volume work Introductio in Analysin Infinitorum. The proof of Euler's pentagonal theorem given here is due to Fabian Franklin (1881). The contribution of G. H. Hardy and Ramanujan (1917, 1918) and Rademacher (1937a,b, 1940, 1943) enhanced this subject. In his two-volume treatise, P. A. MacMahon (1915, 1916) discussed at length combinatorial aspects of partitions. For further reading on partitions of integers, refer to the books of J. Riordan (1958), L. Comtet (1974) and G. E. Andrews (1976).
10.7
EXERCISES
1. Show combinatorially that the number p(n, k) of partitions of n into k parts satisfies the recurrence relation
= p(n- 1, k- 1) + p(n- k, k),
p(n, k)
k < n/2,
with initial conditions
p(n,1)=p(n,n)=1, n=1,2, .... 2. Show combinatorially that the number P(n, k) of partitions of n into at most k parts satisfies the recurrence relation
P(n,k)=P(n,k-1)+P(n-k,k), k=2,3, ... ,n, n=2,3, ... , with initial conditions P(n,1)=1, n=1,2, ... , P(O,k)=1, k=0,1, .... 3. Partitions into parts of restricted number and restricted size. Let P(n, k, r) be the number of partitions of n into at most k parts, none of which is greater than r. Show that oo
Fr(t,u)
oo
r
= LLP(n,k,r)uktn = II(l- uti)- 1 n=Ok=O
i=l
397
10. 7. EXERCISES
and
r
oo
Fr,k(t)
=L
P(n, k, r)tn
=II (1- tr+i)(1- ti)-
n=O
1
.
i=1
4. Let r(n, k) be the number of partitions of n whose smallest part equals k. Show that 00
00
n=O
i=k
and r(n, k) = r(n- 1, k- 1)- r(n- k, k- 1),
fork= 2,3, ... , [(n
+ 1)/2], n = 3,4, ... , with
r(n, 1) =p(n-1),n = 2,3, ... ,r(n,n) = 1,n = 1,2, ... ,r(n,k) = O,n
< k.
5. Show combinatorially that the number q(n, k) of partitions of n into k unequal parts satisfies the recurrence relation q(n, k) = q(n- k, k)
+ q(n- k, k- 1),
k = 2, 3, ... , [n/2], n = 4, 5, ... ,
with initial conditions q(n, 1) = 1, n
= 1, 2, ... , q(n, k)
= 0, n
< k(k + 1)/2,
q(k(k + 1)/2, k) = 1.
6. Let Q(n, k) be the number of partitions of n into at most k unequal parts. Show that 00
F(t, u) =
00
00
LL
Q(n, k)uktn
= (1 - u)- 1
n=Ok=O
II (1 +uti) i=1
and, using the identity
(1- u)F(t, u) = (1- u 2t 2)F(t, ut), conclude that the generating function 00
Fk(t)
=L
Q(n, k)tn
n=O
satisfies the recurrence relation
(1- tk)H(t) = Fk_I(t)- tkFk-2(t), k = 2,3, ... , with F0 (t) = 2, F 1 (t) = (1- t)- 1 .
PARTITIONS OF INTEGERS
398
7. Partitions into even and odd unequal parts. Let q0 (n, k) be the number of partitions of n into k even unequal parts and q1 (n, k) be the number of partitions of n into k odd unequal parts. Show that n
oo
00
n=Ok=O oo
i=l
n
oo
H1 (t, u) = L L q1 (n, k)uktn n=Ok=O
=II (1 + ut i-I) 2
i=l
and k
00
Ho,k(t) = Lqo(n,k)tn = tk(k+I) n=O
II(l- t i)-I, 2
i=l
k
00
HI,k(t) = Lql(n,k)tn = tk2 n=O
II(l-
t2i)-1.
i=l
8. Partitions into parts of restricted size. Let p(n, k, r) be the number of partitions of n into k parts, none of which is greater than r. Show that oo
n
r
Gr(t, u) = L LP(n, k, r)uktn n=Ok=O
=II (1- uti)- 1 i=l
and conclude that (1- ut)Gr(t, u) = (1- utr+I )Gr(t, ut). Using this recurrence relation show that k
00
Gr,k(t)
=L
p(n, k, r)tn
n=k
= tk II (1- tr+i-l )(1- ti)- 1 . i=l
9. Let 00
L Gr(t, u)gr(t)ur = G(t, u), r=O where Gr(t, u) is the generating function of the number p(n, k, r) of partitions of n into k parts, none of which is greater than rand G(t,u) is the generating function of the number p(n, k) of partitions of n into k parts. Using the relations (1- ut)G(t,u) = G(t,ut), (1- ut){Gr(t, u) + utr+ 1Gr+1 (t, u)} = Gr(t, ut),
10. 7. EXERCISES
399
show that
r
gr(t)
= tr2 II (1- ti)-1 i=1
and conclude the identity r
oo
2:: II (1tr2
r=O
oo
ti)-2
=II (1-
i=1
ti)-1.
i=1
10. Show that k-1
II (1 +
2k-1 t2.)
=
2:: tn
n=O
i=O
and thus conclude that 00
II(l +
2 t .)
= (1- t)- 1 ,
itl
< 1.
i=O
Using the last identity, show that for every nonnegative integer n there exists a unique finite sequence ni E {0, 1}, i = 0, 1, ... , r, such that r
n
= Z::ni2i, i=O
where the positive integer r is determined by the inequalities 2r :S n
< 2r+1.
11. (Continuation). Show that the number R 0 (n) of partitions of n into an even number of parts, with values (sizes) in the set {1, 2, 22 , ••• }, equals the number R 1 (n) of partitions of n into an odd number of such parts, for n = 2,3, ....
12. Show that
and thus conclude that
Using the last identity, show that for every nonnegative integer n there exists a unique finite sequence ni E {0, 1, ... , i}, i = 1, 2, ... , r, such that r
n = Z::nii!, i=1
PARTITIONS OF INTEGERS
400
where the positive integer r is determined by the inequalities r! (r + 1)!.
~ n
<
13. Partitions into unequal parts of restricted size. Let q(n, k, r) be the number of partitions of n into k unequal parts, none of which is greater than r. Show that oo
Hr(t, u)
n
r
=L L q(n, k, r)uktn =II (1 +uti) n=Ok=O
i=l
and conclude that
(1
+ ut)Hr(t, ut) = (1 + utr+ 1 )Hr(t, u).
Using this recurrence relation, show that k
00
L
Hr,k(t) =
p(n, k, r)tn =
n=k(k+l)/2
tk(k+l)/ 2
II (1-
r-i+l )(1-
ti)-1,
i=l
fork< r, and
14. Sum of multinomial coefficients. The multinomial coefficient
is a symmetric function of the variables k1 , k2, ... , kr-1, kr:
Thus, for the representative of this class of multinomial coefficients, with n and k1, k2, ... , kr fixed, we may assume that k1 2: k2 2: · · · 2: kr. (a) Show that the number of different classes of multinomial coefficients, for given positive integers nand r, equals the number P(n, r) of partitions of n into at most r parts, which, when r 2: n, equals the number p(n) of partitions of n. (b) Let n! M(n)
=L
k 1·'k 2·I ... k r·I'
where the summation is extended over all nonnegative integer solutions of the linear equation k1 + k2 + · · · + kr = n, k1 2: k2 2: · · · 2: kr 2: 0. This is the sum of the multinomial coefficients, representatives of the p(n) classes. Show that
10. 7. EXERCISES
401
15*. Perfect partitions. A partition of a positive integer n that contains just one partition for every positive integer r less than n is called perfect partition of n. Thus, an integer solution of the equation y 1 + 2y 2 + · · · + nyn = n, Yi 2 0, i = 1, 2, ... , n is a perfect partition of n, if for every r = 1, 2, ... , n - 1, the equation z 1 + 2z2 + · · · + rzr = r, 0 S Zi S Yi, i = 1, 2, ... , r, has a unique solution. For example, the partitions 31 2 , 2 2 1, 15 are perfect partitions of n = 5. Show that the number of perfect partitions of n equals the number of ordered factorizations of n + 1 without unit factors. 16. Compositions of integers. A composition of a positive integer n is an ordered collection of positive integers whose sum equals n. Thus a composition of n into k parts (summands) is a solution (r 1 , r2, ... , rk) in positive integers of the linear equation x 1 + X2 + · · · + Xk = n. Show that the number c( n, k) of compositions of n into k parts equals c(n,k)=
(~=~),
ksn
and, consequently,
17. (Continuation). Let c(n, k; S) be the number of compositions of n into k parts of sizes Xi, i = 1, 2, ... , k belonging to the set S = { s 1 , s2, ... , Sr, ... }, with 1 S SJ < s2 < .. · < Sr < .. ·. Show that
18. (Continuation). Let c2 (n) be the number of compositions of n with no part greater than 2. Show that 00
1+
L
c2(n)tn
=
(1- t- t 2 )- 1
n=I
and thus conclude that c2(n) = fn, n number.
= 1, 2, ... , where fn
is the Fibonacci
19. (Continuation). Let cr(n) be the number of compositions of n with no part greater than r. Setting cr(O) = 1, show that 00
Cr(t) =
L
n=O
er(n)tn = (1- t- t 2 - ... - n-l'
PARTITIONS OF INTEGERS
402 and Cr(n)
= Cr(n- 1) + Cr(n- 2) + · · · + Cr(n- r), Cr(n) = 2n-l, n
n 2: r,
< r.
Thus, conclude that Qr(n) = 2er(n) is the number of n-permutations of 2 with repetition that include no r consecutive objects alike. 20. Let p(n, k) be the number of partitions of n into k parts and q(n, k) the number of partitions of n into k unequal parts. Show that k!q(n,k) :S ( n-1) k_ :S k!p(n,k) 1
and, using the relation p(n, k) = q(n + r, k), r = k(k- 1)/2, conclude that k!p(n, k) :S (
n- r k_
-1) 1
, r = k(k- 1)/2.
21. Using the Gauss-Jacobi identity, show that oo
+oo
II <1 _ q2riH 1 + q2ri-r+sH 1 + q2ri-r-s) = :L: i=l
2
qrk +sk, r, s ;::: 0
k=-oo
and oo
II(l- q2ri)( 1 -
q2ri-r+s)( 1 - q2ri-r-s)
i=l
=
+oo
L
2
(-1)kqrk +sk, r,s 2:0.
k=-oo
Putting r = 3/2, s = 1/2, conclude Euler's identity:
II<1- qi) = 1 + L(-1)k{qk(3k-1}/2 + qk(3k+l)f2}. 00
00
i=l
k=l
Further, setting r = 1/2, s the Jacobi identity:
= E+ 1/2 and taking the limit as E -t 0, conclude
00
00
i=l
k=l
II (1- qi) = 1 + :L:< -1)k(2k + 1)qk(k+l)/2. 22*. Let
00
9i(t) =
L Ui(k)tk'
i = 1, 2,
0
0
0
k=O
and a(n) =
L Pn
u1(kt)u2(k2) · · · Un(kn), n = 0, 1, ... ,
10. 7. EXERCISES
403
where the summation is extended over the set Pn of partitions of n, that is over all nonnegative integer solutions (k 1, k 2 , •.• , kn) of the equation k1 + 2kz + · · · + nkn = n. Show that 00
00
n=O
i=l
= L a(n)tn =II g;(ti)
G(t)
and conclude that 00
00
23*. (Continuation). Let
Show that
00
00
i=l
j=l
=II (1- ti)-1 L Ujtj (1- t1)-1 and conclude that n
L A (k1 , kz, . . . , kn; u1 , Uz, ... , Un) = L p( n - k) L Ud. Pn
k=I
In particular, for u 1
djk
= j, j = 1, 2, ... , conclude that n
np(n) = LP(n- k)a(k), a(k) = Ld. dlk
k=l
24. Partitions of ordered pairs of integers. A partition of an ordered pair (m, n) of nonnegative integers, different (0, 0), is a non-ordered collection of nonnegative integers (x;, y;), i = 1, 2, ... , different (0, 0), whose sum equals (m, n). In a partition of a bipartite number (m, n), let Zi,J be the number of ordered pairs that are equal to (i,j), i = 0,1, ... ,m, j = 0,1, ... ,n, (i,j) ::j:. (0,0). Then m
n
n
m
LiLZi,J = m,
LJLZi,J = n.
i=l
j=l
j=O
i=O
PARTITIONS OF INTEGERS
404
In the case of a partition of (m, n) into k parts, in addition, n
m
LL Zi,j = k. j=Oi=O (i,j)#(O,O)
Let Pm,n be the number of partitions of the bipartite (m, n) and Pm,n,k the number of partitions of the bipartite number (m, n) into k parts. Prove that oo
F(t, u, w)
=L
oo
m+n
L L
oo
Pm,n,ktmunwk
=
oo
II II (1 -
wtiuj)- 1,
j=O i=O (i,j)#(O,O)
n=O m=O k=O
where Po,o,o = 1, and conclude that <X>
F(t, u) =
00
00
LL
Pm,ntmun =
n=Om=O
00
II II (1-
1 tiuj)- ,
j=Oi=O (i,j);>!(O,O)
where Po,o = 1. 25. q-number, q-factorial and q-binomial coefficient. Let 0 < q < 1, x be a real number and k a positive integer. The number [x]q = (1- qx)/(1- q) is called q-real number and, in particular, [k]q = (1- qk)/(1- q) is called q-positive integer. The factorial of the q-number [x]q of order k, which is defined by [x]k,q = [x]q[x- 1]q · · · [x- k
+ 1]q =
(1 _ qx)(1 _ qx-1) ... (1 _ qx-k+l) ( _ q)k ' 1
is called q-factorial of x of order k. In particular, [k]q! = [1]q[2]q · · · [k]q = (1- q)(1- q2 ) · · · (1- qk)/(1- q)k. The q-binomial coefficient is defined by
X] [x]k (1 [k q = [k];r =
qx)(1 - qx-1) ... (1 - qx-k+1) (1 _ q)(1 _ q2) ... (1 _ qk)
For x a real number and k a positive integer, derive the recurrence relations -[x-1] k[x-1] k k-1 q +q k [x] q q and
= [x)q [X- 1] [X] k q [k]q k- 1 q.
10. 7. EXERCISES
405
Also, show that
[~X] q =
( _ 1 )kq-kx-k(k-1)/2
[X+~-
[~ L/q =
~
q-k(x-k) [
1]
q'
L
and
26. (Continuation). For n,k and m positive integers, show that (a)
and (b)
[:L [;L = [~L [:~~L = [m~kL [n-;+kL, [:L [n~mL [~L [n:kL [m:kL [m~kL 27. (Continuation). For n, k and m positive integers, show that
~ -rk[r-1] L..,;q r=m
k-1
_
-q
-nk[n] _q (m-l)k[m-1] k k
q
q
q
and conclude that
28. (Continuation). For n, k and m positive integers, show that
f)
-1r-kqr(r+I)/2 [
r=k
~~
n
= qk(k+l)/2 [ ~]
q
q
+( _ 1)m-kq(m+I)(m+2)/2 [ and conclude that
~( _ 1r-kqr(r+I)/2 [ ~ ~ ~ Jq =
qk(k+I)/2 [
~ Jq.
m+1 n
] q
406
PARTITIONS OF INTEGERS
29. q-binomial and negative binomial formulae. For n a positive integer and x a real number, prove that
and
fr(1-xqi-1)-I=f:[n+z-1] k=O
i=l
xk,
O
q
Also, prove that (qx)n
='f) _
1)kqk(k-1)f2(1 _ q)k
k=O
[~]
[x]k,q· q
30. (Continuation). For n and k positive integers, show that
and
More generally, for x and y real numbers and n a positive integer, show that [ X: Y]
= q
t
q
k=O
[~] [n ~ k] q
q
or, equivalently, that
[x + Y]n,q =
L n
k=O
(n-k)(x-k) q
[
n] k [x]k,q[Y]n-k,q· q
31. (Continuation). For n and k positive integers, show that
and
10. 7. EXERCISES
407
32*. q-Stirling numbers of the first kind. Consider the n-th order factorial ofthe q-number [t]q = (1- qt)/(1- q), 0 < q < 1 (n-th order q-factorial oft): [t]n,q = [t]q[t- 1]q · · · [t- n
+ 1]q
= q-n(n-l)f2[t]q([t]q _ [1]q) ... ([t]q _ [n _ 1]q)· This is a polynomial of the q-number [t]q of degree n: n
[t]n,q = q-n(n-l)/ 2
L s(n, klq)[t]~,
n = 0, 1, ....
k=O
The coefficient s(n, klq) is called q-Stirling number of the first kind. (a) Show that s(n, klq) = ( -1)n-k L[it]q[i2]q · · · [in-k]q,
where the summation is extended over all (n - k )-com bin at ions {i 1 , i 2, ... ,
in-d of then- 1 positive integers {1, 2, ... , n- 1}. (b) Derive the triangular recurrence relation
+ 1, klq)
s(n
+ 1, n
fork = 1, 2, ... , n
= s(n, k- 1lq)- {n}qs(n, klq),
= 0, 1, ... , with
s(O,Oiq}=1, s(n,klq}=O, k>n, and the vertical recurrence relation n
s(n
+ 1, k + 1lq)
=
L( -1)n-r[n]n-r,qS(r, klq). r=k
33*. q-Stirling numbers of the second kind. Consider the expansion of the n-th power of the q-number [t]q into factorials of the same number: n
L qk(k-l)/ S(n, klq)[t]k,q,
[t]~ =
2
n = 0, 1, ....
k=O
The coefficient S(n, klq) is called q-Stirling number of the second kind. (a) Derive the triangular recurrence relation S(n
for k = 1, 2,, .. , n
+ 1, klq)
+ 1, n
= S(n, k- 1lq)
+ [k]qS(n, klq),
= 0, 1, ... , with
S(O, Olq) = 1, S(n, klq) = 0, k
> n,
PARTITIONS OF INTEGERS
408 and the generating function k
00
¢>k(uiq) =
L S(n, klq)un = uk IT (1- [j)qu)n=k
1
,
k = 1, 2, ...
j=l
and conclude the expansion __ 1_ = qk(k+l)/2
[t)k+l,q
f
n=k
S(n, kiq)
~+1
[t)q
and its inverse 1 ~ =
[t)q
00
1 L q-n(n+l)/2 s(n, kiq) . n=k [t)n+l,q
(b) Further, deduce the vertical recurrence relation n
S(n, kiq) = L[k]~-r S(r- 1, k- 1lq), r=k and the expressions
where the summation in the first sum is extended over all integers rj 2: 0, j = 1, 2, ... , k, with r 1 + r2 + · · · + rk = n - k, while, in the second sum, is extended over all (n - k )-combinations {i 1 , i 2 , ... , in-k}, with repetition, of the k positive integers {1, 2, ... , k}. (c) Derive the orthogonal relations n
n
r=k
r=k
L s(n, riq)S(r, kiq) = 6n,k, L S(n, riq)s(r, klq) = 6n,k· 34*. (Continuation). Show that the q-Stirling number of the second kind S(n, kiq), k = 0, 1, ... , n, n = 0, 1, ... , is given by the sum -k(k-1)/2
S(n, kiq) = q [k] ! q
Alternatively,
L( k
r=O
-1)k-r q(k-r)(k-r-1)/2
[k] r
[r]~. q
10. 7. EXERCISES
409
Inverting the last expression, deduce for the q-Stirling number of the first kind s(n, klq), k = 0, 1, ... , n, n = 0, 1, ... the explicit expression
[n]
s(n kiq) = ~( -1)r-kq(n-r)(n-r-1)/2 r ' (1 _ q)n-k ~ r=k 1
q
(r). k
35*. q-Lah numbers. Consider the expansion n
[-t]n,q-1
= qn(n-1)/2 L qk(k-1)f2 L(n, klq)[t]k,q· k=O
Since [-t]n,q-1 = [-1]~[t+n-1]n,q and setting IL(n, klq)l = [-1]~L(n, kiq), it can be written as n
[t + n- 1]n,q = qn(n-1)/2
L qk(k-1)f21L(n, kiq)i[t]k,q· k=O
The coefficients L(n, klq) and IL(n, klq)l are called q-Lah and signless q-Lah numbers, respectively. Show that
IL(n, klq)l = q-n(n-1)f2+k(k-1)f2 ~~l::
[~:::: ~]
q.
Chapter 11 PARTITION POLYNOMIALS
11.1
INTRODUCTION
The partition polynomials, introduced by E. T. Bell (1927), are multivariable polynomials that are defined by a sum extended over all partitions of their index. Such a sum had been previously used by F. Faa di Bruno (1855) to express the derivatives of a composite function in terms of the derivatives of the component functions. The later partition polynomials have found many applications in combinatorics, probability theory and statistics, as well as in number theory. Since they are quite general polynomials, they include as particular cases the exponential polynomials and their inverses, the logarithmic polynomials, as well as the potential polynomials, owing their particular names to the form of their generating functions. In this chapter, the partition polynomials are presented along with some of their combinatorial and probabilistic applications. Specifically, the exponential and partial Bell partition polynomials are examined first. Generating functions and recurrence relations are derived. As an example, the general arithmetical function, that led E. T. Bell to introduce the exponential partition polynomials is presented. Then, the general partition polynomials are examined; the Faa di Bruno formula is expressed in terms of these polynomials. Their use in expressing the probability function of a compound discrete distribution in terms of the component probability functions is discussed. The logarithmic and potential polynomials, constituting particular cases of the partition polynomials, are further explored. The Lagrange formula for the inversion of a power series is derived by the aid of a generalization of Faa di Bruno formula. J. Touchard (1939), in studying the problem of enumeration of permutations with a given number of partially ordered cycles introduced the partition polynomials that were later called Touchard polynomials. These polynomials are briefly presented at the end of this chapter.
PARTITION POLYNOMIALS
412
11.2
EXPONENTIAL BELL PARTITION POLYNOMIALS
DEFINITION 11.1 The polynomial Bn XI , x2, . . . , Xn defined by the sum
= Bn(xl, x2, ... , Xn) in the variables (11.1)
where the summation is extended over all partitions ofn, that is, over all nonnegative integer solutions (k1, k2, ... , kn) of the equation ki + 2k2 + · · · + nkn = n, is called exponential Bell partition polynomial.
=
DEFINITION 11.2 The polynomial Bn,k Bn,k (XI, x2 ... , Xn) in the variables X1, x2, ... , Xn of degree k defined by the sum ( 11.2)
where the summation is extended over all partitions of n into k pans, that is, over all nonnegative integer solutions (ki, k2, ... , kn) of the equations ki + 2k2 + · · · + nkn = n, ki + k2 + · · · + kn = k, is called (exponential) panial Bell panition polynomial. Definitions 11.1 and 11.2 directly imply the following relations: (11.3) ( 11.4) n
Bn(XI' X2, ... 'Xn)
=L
Bn,k(Xl' X2, ... 'Xn), n
= 0, 1,... .
(11.5)
k=O
REMARK 11.1 The number of monomials contained in the exponential Bell partition polynomial ( 11.1) equals the number p( n) of partitions of n and in the partial Bell partition polynomial (11.2) equals the numberp(n, k) of partitions ofn into k parts. These remarks justify the term partition that is included in the name of polynomials (11.1) and (11.2). The term partial that is used for polynomial (11.2) in contrast to polynomial (11.1) is justified by the fact, that in (11.2), the summation is extended over a subset of the partitions of n and, specifically, over
11.2.
EXPONENTIAL BELL PARTITION POLYNOMIALS
413
the partitions of n into k parts. The exponential form of their generating functions (see Theorem 11.1 that follows) justifies the term exponential that is included in the name of polynomial ( 11.1) and, occasionally, in the name of polynomial ( 11.2). The coefficients of polynomials ( 11.1) and ( 11.2) are positive integers. Specifically, the coefficient of the general term of the exponential Bell partition polynomial ( 11.1) equals the number of partitions of a finite set of n elements into subsets, among which ki ~ 0 subsets include i elements each, fori = 1, 2, ... , n. Also, the coefficient of the general term of the partial Bell partition polynomial ( 11.2) equals the number of partitions of a finite set of n elements into k subsets, among which ki ~ 0 subsets include i elements each, fori = 1, 2, ... , n. Thus, polynomials ( 11.1) and ( 11.2) are the multivariable generating functions of the numbers of partitions of a finite set of n elements into any number of subsets and into k subsets, respectively, with respect to the numbers ki ~ 0 of subsets including i elements each, i = 1, 2, ... , n. I Bivariate and vertical generating functions for the partial Bell partition polynomials are derived in the following theorem.
THEOREM 11.1 (a) The bivariate generating function of the partial Bell partition polynomials Bn,k(x1, x2, ... , Xn). k = 0, 1, ... , n, n = 0, 1, ... , with Bo,o 1. is given by
=
oo
B(t, u) =
n
tn
L L Bn,k(Xt, X2, ... , Xn)uk n! = exp{u[g(t)- xo]}. (11.6) n=Ok=O
(b) The vertical generating function of the partial Bell partition polynomials Bn,k(Xt, x2, ... , Xn), n = k, k + 1, ... ,for fixed k, is given by
where (11.8)
PROOF . (a) Multiplying (11.2) by uktn fn! and summing the resulting expression fork = 0, 1, ... , nand n = 0, 1, ... , it follows that
414
PARTITION POLYNOMIALS
where the summation in the inner sum is extended over all nonnegative integer solutions (k1, k2, ... , kn) of k1 +2k2 +· · ·+nkn = n andk1 +k2 + · · ·+kn = k. Since this inner sum is summed over all k = 0, 1, ... , n and n = 0, 1, ... , it follows that the summation is extended over all kr = 0, 1, ... , for r = 1, 2, ... , and so 00
E(t, u) =
00
II L r=l
1 (
kf
Xr~ tr) r.
k,=O r·
00
k,
=
II exp
(
Xr~
tr)
r.
r=l
L tr) r! . 00
= exp
(
u
Xr
r=l
Using (11.8), the last expression implies (11.6). (b) Interchanging the order of summation, ( 11.6) may be written as 00
00
~
00
E(t,u) = L LEn,k(xl,X2,··· ,xn)uk n! = LEk(t)uk k=On=k k=O and, since E(t, u) = exp{u[g(t)- xo]}, it follows that
Equating the coefficients of uk in both sides of the last expression, ( 11. 7) is deduced. I The generating function of the exponential Bell partition polynomials, by virtue of (11.5), may be deduced from (11.6) by setting u = 1.
COROLLARYII.l The generating function of the exponential Bell partition polynomials En _ En(XI,X2, ... , Xn). n = 0, 1, ... , with Eo= 1, is given by (11.9)
Recurrence relations for the exponential and the partial Bell partition polynomials are derived in the following theorem.
THEOREM 11.2 (a) TheexponentialBellpartitionpolynomialsEn
=
En(x 1 ,x2,··· ,xn). n
=
11.2.
EXPONENTIAL BELL PARTITION POLYNOMIALS
0, 1, ... , with B 0
415
= satisfy the recurrence relation 1,
(11.10)
(b) The partial Bell partition polynomials Bn,k = Bn,k(xl, X2, ... , Xn). k = 0, 1, ... , n, n = 0, 1, ... , with Bo,o 1, satisfy the recurrence relations
=
n-k ( Bn+l,k+l = L r=O
)
~ Xr+l Bn-r,k
(11.11)
n-k(n+1) r + 1 Xr+1Bn-r,k, r=O
(11.12)
and
Bn+l,k+l = k
1
+1 L
fork = 0, 1, ... , n, n = 0, 1, .... PROOF (a) Differentiating the generating function ( 11.9) and expanding the resulting expression, d d
dt B (t)
= B (t) dt g(t),
into powers oft it follows that 00
00
l[ l n) l 00
tn = [ LXr+l! tr · LEn! tn LBn+l! n=O n. r=O r. n=O n. and so 00
00
L
[ n L Bn+l 1tn = L ( n=O n. n=O r=O r
tn Xr+lBn-r 1· n.
Equating the coefficients of tn fn! in both sides of the last expression, (11.10) is deduced. (b) Differentiating the generating function ( 11. 7) and expanding the resulting expression, d d dtBk+l(t) = Bk(t) dtg(t), into powers oft, it follows that
416
PARTITION POLYNOMIALS
Equating the coefficients oftn /n! in both sides of the last expression, (ll.ll) is deduced. Further, the generating function (11.7) may be written in the form
(k + 1)Bk+I(t) = [g(t)- x 0 ]Bk(t), which, expanded into powers oft, yields 00
l[
00
00
tn+1 [ tr+1 E(k+1)Bn+1,k+1(n+ 1)! = ?;xr+l(r+ 1)! 00
[n-k =E?;
(n + 1) r+ 1
tnl · EBn,kn!
Xr+1Bn-r,k
l
tn+1 (n+ 1)!"
Equating the coefficients of tn+l /(n + 1)! in both sides of the last expression, ( 11.12) is deduced. I Using recurrence relation (11.11), a table of partial Bell partition polynomials Bn,k Bn,k(x 1,x2 ... ,xn) can be constructed. Table 11.1 gives the polynomial Bn,k fork= 1, 2, ... , n, n = 1, 2, ... , 10. From this table, using the relation Bn = 2::::~= 1 Bn,k, the exponential Bell partition polynomials may be deduced.
=
Example 11.1 An arithmetical function The Bell partition polynomials were introduced by E. T. Bell (1927) as new arithmetical functions, unifying a diversity of such functions. Let S be any set of positive integers and
Xn=aLdunfd, n=1,2, ... , d
where the summation is extended over all divisors d of n that belong to S. Consider the polynomials Bn(x 1, 1!x 2, ... , (n- 1)!xn). n = 1, 2, .... Show that oo
n
n=O
n.
L Bn(x1, 1!x2, ... , (n- 1)!xn)!, = IJ (1- ul)-a. kES
The generating function of the sequence Xn, n = 1, 2, ... , 00
00
h(t) = L Xntn =aLL dunfdtn, n=1 n=1 d on replacing the variables (d, n) by the variables (k, r), with k = d, r = n/d, and summing first for r = 1, 2, ... and then fork E S, may be obtained as 00
h(t) =a L k L(utkr =a L kutk(l- utk)- 1. kES r=1 kES
11.2.
EXPONENTIAL BELL PARTITION POLYNOMIALS
Table 11.1
417
Partial Bell Partition Polynomials Bn,k
Bt ' 1 = Xt,· B2 ' 1 = x2; B2 ' 2 = x 21,· B3 ' 1 = X3; B3 ' 2 = 3xtx2; B3 ' 3 = x 31·, B4 1 = X4; B4 2 = 4xtX3 + 3x 22; B4 3 = 6x 12x2; B4 4 = x 14; ' ' ' ' B5,1 = x5; B5,2 = Sx1x4 + l0x2x3; B5,3 = 10xix3 + 15xtx~; B5,4 = 10xrx2; B5,5 = x~; B6,l = x5; B6,2 = 6x1x5 + lSx2x4 +lOx~; B6,3 = 15xix4 + 60x1x2x3 + 15x~; B6,4 = 20xrx3 + 45xix~; B6,5 = ISxix2; B6,6 = x~; B1,1 = X7; B1,2 = 7x1x6 + 21x2x5 + 35x3x4; B7,3 = 21xix5 + 105xtX2X4 + 70x1x~ + 105x~x3; B7,4 = 35xtX4 + 105xtx~ + 210xix2x3; B7,5 = 35xfx3 + 105xrx~; B7,6 = 21x~x2;B7,7 =xi; Bs,1 = xs; Bs,2 = 8xtX7 + 28x2x6 + S6x3x5 + 35x~; Bs, 3 = 28xix6 + l68x1x2x5 + 280x1x3x4 + 210x~x4 + 280x2x~; Bs,4 = 56xrx5 + 420xix2x4 + 280xix~ + 840xtx~x3 + 105xt Bs, 5 = 70x{x4 + S60xrx2x3 + 420xix~; Bs,6 = 56x~x3 + 210xfx~; Bs,7 = 28x~x2; Bs,s = x~;. B 9,1 = x 9 ; B9,2 = 9x1X8 + 36x2x7 + 84x3x6 + 126x4x5; B 9,3 = 36xix7 + 252xtX2X6 + 504XtX3X5 + 378x~x5 + 315XtX~ +1260x 2x3x4 + 280x~; B9,4 = 84xrx6 + 756xix2x5 + 1260xix3x4 + 1890x1x~x4 +2520X1X 2 X~ + 126Qx~x3; B 9,5 = 126xfx 5 + 126oxrx2x4 + 840xrx~ + 3780xix~x3 + 945xtx~; B9,6 = 126x~x4 + 126oxix2x3 + 1260xrx~; B9,7 = 84x~x3 + 378x~x~; B9,8 = 36xi x2; B9,9 =xi; B10,1 = x~ 0 ; B10,2 = l0x1x 9 + 45x2X8 + 120x3X7 + 210x4x6 + 126x;; Bl0,3 = 45xixs + 360xtX2X7 + 840xtX3X6 + 630x~x6 + 1260x1X4X5 +2520x2X3X5 + 1575x2x~ + 2100x~x4; BI0,4 = 120xrx7 + 1260xix2x6 + 2520xix3x5 + 3780xtx~x5 + 1575xix~ +126QQx 1x 2X3X4 + 315Qx~X4 + 28QQx 1 x~ + 63QQx~x~; BI0,5 = 210xfx6 + 2520xrx2x5 + 4200xrx3x4 + 9450xix~x4 + 126Q0xix 2 x~ + 126QQx 1 X~X3 + 945x~; B10, 6 = 252x~x5 + 3150x{x2x4 + 2100x{x~ + 12600xrx~x3 + 4725xix~; B 10 ,7 = 210x~x 4 + 2520x~x2x3 + 3150x{x~; B10,8 = 120xix3 + 630x~x~; B10,9 = 45x~x2; B10,10 = x~ 0 .
PARTITION POLYNOMIALS
418
Differentiating the logarithm of the function
G(t)
= IT (1- utk)-a, kES
we get
and so
G'(t) G(t)
h(t)
t
Integrating the last equation in the interval (0, t) and using the initial condition = 1 we find the relation
G(O)
00
tr) ,
G(t) = exp ( ~Xr-;
from which, by virtue of (11.9), the required expression is deduced.
0
Example 11.2 Dinner choices in a Chinese restaurant A Chinese restaurant offers x 1 different dinner choices for one person eating alone, x 2 different choices for two persons eating together, x 3 still different choices for three persons eating together, etc. Suppose that a group of n persons arrive at this restaurant to have dinner. In how many different ways may they choose their dinner? The set (group) of then persons {p 1 , p 2 , ... , Pn}, according to Theorem 2.10, may be partitioned into subsets (subgroups), among which ki 2: 0 include i persons each, i = 1, 2, ... , n, in
different ways. Further, there are xi different choices for each subset (subgroup) of i persons eating together, i = 1, 2, ... , n. Thus, for fixed ki 2: 0, i = 1, 2, ... , n, with k1 + 2k2 + · · · + nkn = n, there are
different ways for the n persons to choose their dinner. Summing these ways for all ki 2: 0, i = 1, 2, ... , n, with k 1 + 2k2 + · · · + nkn = n, using (11.1), it follows that there are Bn (x 1 , x 2 , ... , xn) different ways n persons may choose their dinner. 0
11.3. GENERAL PARTITION POLYNOMIALS
11.3
419
GENERAL PARTITION POLYNOMIALS
DEFINITION11.3
ThepolynomialPn:: Pn(x1,X2,··· ,xn;c1,c2,··· ,en) in the variables x1, x2, ... , Xn and parameters c1, c2, ... , Cn defined by the sum
( 11.13) where k = k 1 + k2 + · · · + kn and the summation is extended over all partitions of n, that is, over all nonnegative integer solutions ( k1, k2, . . . , kn) of the equation k1 + 2k2 + · · · + nkn = n, is called partition polynomial.
The partition polynomial Pn(XI.x2, ... , Xn; c1, c2, ... , en), using the symbolic calculus, may be expressed by the exponential Bell partition polynomial Bn(XI, x2, ... , Xn) as Pn(XI' X2, ... 'Xn; C}' c2, ...
'Cn)
= Bn(CX1' CX2, ... 'CXn), ck
=
Ck' (11.14)
since
=
ck. This symbolic expression of the partition polynomial will be with ck used in the sequel. Further, the partition polynomial Bn(cxi, cx2, ... , cxn), ck ck, k = 1, 2, ... , n, can be expressed as a linear combination of the partial Bell partition polynomials Bn,k(x 1 , x 2 , ... , xn), k = 1, 2, ... , n with coefficients ck, k = 1, 2, ... , n. Specifically, from Definitions 11.3 and 11.2 and putting B 0 = eo, it follows directly that
=
n
Bn(CXI,CX2,··· ,cxn) = LCkBn,k(X1,X2,··· ,xn),
(11.15)
k=O
for n = 0, 1, .... A generating function and a recurrence relation for the partition polynomials may be deduced (at least symbolically) from the generating function and the recurrence relation for the exponential Bell partition polynomials by using the symbolic expression (11.14). Specifically, the following theorem is deduced from (11.9) and (11.10).
PARTITION POLYNOMIALS
420
THEOREM 11.3 (a) The generating function of the sequence of the partition polynomials ck, n = 0, 1, ... , with Eo =eo. is given by
En(cx 1 , cx 2, ... , cxn). ck
where g(t) =
=
I:::o Xrtr /r!, or symbolically by
exp(tE)
= exp[c(etx- xo)],
En= Bn, ck =: Ck, xr
(b) The partition polynomials En(cx 1 , cx2, ... , cxn). ck with E 0 eo. satisfy the recurrence relation
=
=
=Xr·
Ck.
n
= 0, 1, ...
En+ I (ex I' cx2, ... 'CXn+d
=
t (~)
Xr+JCBn-r(CXI, CX2, ... , CXn-r), Ck :: Ck.
(11.17)
r=O
In the next theorem, the derivative of order n of a composite function is expressed as a partition polynomial of the derivatives up to order n of the component functions.
THEOREM 11.4 Faa di Bruno formula Letftu) and g(t) be two functions of real variables for which all the derivatives,
9r =
[d~~t)]
, r = 0, 1, ... , /k =
[dd~u)]
t=a
, k = 0, 1, ... , u=g(a)
U
exist. Then the derivatives of the composite function h(t) = f(g(t)),
hn=
[d:h~t)] t
'n=0,1, ... ' t=a
are given by n
hn
= LfkEn,k(9I,92,···
,gn)
k=O
= En(f9I, Jg2, · · · ,/gn),
fk:: fk·
PROOF By successive differentiation of the composite function h( t) it follows that
(11.18)
= f (g( t) ),
421
11.3. GENERAL PARTITION POLYNOMIALS
and, in general,
z= n
hn =
!khn,k, n =
o, 1, ... ,
(ll.l9)
k=O
where ho,o = 1 and the polynomials hn,k = hn,k (91, 9 2 , ... , 9n) of the derivatives 9 1 ,92 , ... , 9n, k = 1, 2, ... , n, n = 1, 2, ... , do not depend on the derivatives h, h, ... , f n. Hence they may be determined by an arbitrary choice of the function f. The exponential function
with c an arbitrary parameter, which is the most convenient, entails
fk
=
[dk f(u)] k du u=g(a)
=
[dkecu] dk U
= u=g(a)
k cg(a) ce '
and
h = [dnh(t)] n dtn
t=a Thus, according to ( 11.19), it follows that e-cg(a) [.!!:_ecg(t)] dtn t=a
=
t
hn,kCk, n
= 0, 1, ....
k=O
Further,
e-cg(a) [ d: ecg(t)] = [ dnn ec[g(s+a)-g(a)]] , dt t=a ds s=O with
9(s+a) -9(a)
sr sr ='"' [dr9(t)] -·dtr r! ='"'9rr! t=a oo
oo
L....
L....
r=1
r=1
and so 00
8
dn { r }] [ dsn exp c ~9r-;:T r-1
, n
= 0, 1, ....
s=O
Multiplying this expression by sn /n! and summing for n = 0, 1, ... we get the generating function
PARTITION POLYNOMIALS
422
which, compared to (11.6), implies
hn,k = hn,k(9I, 92, ... , Yn) = Bn,k(9I, 92, ... , Yn), n = 0, 1, ... and, according to ( 11.19), the first part of ( 11.18) is deduced. The second part of (11.18) is a direct consequence of (11.15). I
Example 11.3 Compound discrete distributions Consider a discrete distribution assuming nonnegative integer values, with probability function Pk. k = 0, 1, ... and probability generating function 00
f(u)
= L:>kuk. k=O
Further, consider another discrete distribution assuming nonnegative integer values, with probability function qr, r 0, 1, ... and probability generating function
=
00
g(t) =
L qrtr. r=O
Then, the distribution with probability g((nerating function the composite function h(t) = f(g(t)) is called compound distribution. Its probability function Pn, n = 0, 1, ... , may be expressed in terms of Pk· k = 0, 1, ... and qr, r = 0, 1, .... Indeed, since
Pn
=~
n.1
[dnh(t)] dtn
t=o
, n = 0, 1, ... ,
using Theorem 11.4, with
9r
= [d~~t)]
= rlqr, r
= 1, 2, ... ,
Yo
= g(O) = qo,
t=O
and
fk
=
dkf(u)] [ -----;t;;k
. ..J-k =~ L..J (J )kPj'lo , u=g(O)=qo
k
= 0, 1, ...
,
j=k
we deduce the expression
Pn =
~!
t
fkBn,k(qi, 2!q2, ... , n!qn)
k=O
=
~Bn(fqi,f2!q2,···
n.
,Jn!qn), fk
=fk,
for n = 0, 1, .... The factorial moments of the compound distribution, 00
M(n) = LU)nPj, n j=n
= 1, 2, ...
,
11030 GENERAL PARTITION POLYNOMIALS
423
may be expressed in terms of the factorial moments 00
00
= L(J)rqj,
JL(r)
= 1, 2, o o o ,
r
= L(j}kpj,
ffi(k)
j=r
= 1, 2, o o o ,
k
j=k
on the distributions Pk. k = 0, 1,
0
0
and qr, r = 0, 1,
0
o
0
M _ [dnh(t)] dtn ' n = 1, 2, (n) -
0
0
Indeed, since
0
0
0
'
t=l
using Theorem 11.4, with
[d~~t)]
gr =
= JL(r)•
r
= 1, 2, o o o ,
= 1,
go= g(1)
t=l
and
fk
= [dd~u)] U
= m(k)•
k
= 1, 2,
°
0
0
,
u=g(l)=l
we deduce the expression n
M(n)
= Lm(k)Bn,k(JL(l),Jl(2),ooo
,JL(n))
k=O = Bn(ffiJL(l),ffiJL(2),ooo ,mJL(n)), mk =::=m(k)• for n = 1, 2,
0
0
0
0
0
REMARK 11.2
The discrete distribution with probability function
a·Oi Qi = /(O), j = 0, 1, where the coefficients ai, j = 0, 1,
0
0
0
0
0
0
,
0 < 0 < p,
are independent of() and
00
f(O) = Lai()i, 0 < () < p, j=O
is called power series distribution with parameter() and series function f(O)o In the preceding example, if q0 = 0, then
fk while if q0
= [ddu~u)] u=qo=O = k!pk,
= 0, 1,
0
o
o
,
> 0, then 00
!k
k
.
j
= q0 k J(qo) L(j)k JP(1 q0) = q0 k J(qo)m(kl (qo), i=k
qo
k
= o, 1,
0
0
0
,
where me k l ( q0 ) is the factorial moment of order k of the power series distribution with parameter q0 and series function f(qo) = 'L.'f'=o P1q6°
I
PARTITION POLYNOMIALS
424
11.4
LOGARITHMIC PARTITION POLYNOMIALS
The logarithmic partition polynomials, which are the inverse of the exponential Bell partition polynomials, are defined as follows.
DEFINITION 11.4 The polynomial Ln X1, X2, ... , Xn defined by the sum
= Ln(XI, x
2 , ... ,
Xn) in the variables
(11.20)
where k = k1 + k2 + · · ·+ kn and the summation is extended over all partitions of n, that is, over all nonnegative integer solutions ( k1, k2, ... , kn) of the equation k1 + 2k2 + · · · + nkn = n, is called logarithmic partition polynomial. The logarithmic partition polynomial Ln (x 1, x 2, ... , xn) constitutes a particular case of the partition polynomial Bn(cx 1, cx 2, ... , cxn), ck ck. Specifically, for n = 0, 1, ... ,
=
(11.21) with Co = 0, Ck = ( -1)k-l (k- 1)!, k = 1, 2, ... , n. Note that B 0 =Co and so L 0 = 0. Further, Definitions 11.4 and 11.2 imply, for n = 1, 2, ... , the relation n
Ln(XI' X2, ... 'Xn) = ~) -1)k-l (k- 1)!Bn,k(XI' x2, ... 'Xn)- (11.22) k=l The generating function of the logarithmic partition polynomials may be deduced from the generating function (11.16) of the partition polynomials by setting ck = (-1)k- 1(k-1)!, k = 1,2, ... , and using (11.21) and the expansion of the logarithm, log(1 + t) = L:;~ 1 (-1)k-Itk/k. Thus the following theorem is deduced.
THEOREM 11.5 The generating function of the logarithmic partition polynomials Ln(XI, x2, ... , Xn), n = 1, 2, ... , with L 0 0, is given by
=
(11.23)
11.4. LOGARITHMIC PARTITION POLYNOMIALS
425
REMARK 11.3 The recurrence relation for the partition polynomials, (11.17), in the particular case of eo = 0, ck = (-1)k-l (k- 1)!, k = 1, 2, ... , does not yield a corresponding recurrence relation for logarithmic partition polynomials. This is because, according to the symbolic calculus and (11.15), n
cBn(cx!,CX2,··· ,cxn)
= LCk+lBn,k(xl,X2,···
,xn),
k=O a relation, which for expression
eo=
0, Ck
=
(-1)k- 1 (k- 1)!, k
=
1,2, ... , yields the
n
cBn(CX!,CX2,· .. ,cxn)
= L(-1)kk!Bn,k(X!,X2,···
,xn)
k=O n
= L( -1)kBn,k(Xl, x2, ... 'Xn)· k=O Consequently,
for
eo= 0, ck = (-1)k-l (k-
1)!, k
= 1, 2, ...
, n, where
n
Cn,s(Xl' X2, ... 'Xn)
= L(s)kBn,k(Xl' X2, ...
'Xn), n
= 0, 1, ...
'
k=O with s a real number, is the potential partition polynomial examined in the next section. Thus, recurrence relation (11.17) for c0 = 0, Ck = (-1)k- 1 (k- 1)!, k = 1, 2, ... , upon using ( 11.21 ), yields Ln+l(xl,X2,··· ,Xn+i) =
t (~)
Xr+1Cn-r,-l(xl,x2,··· ,Xn-r),
r=O
for n
= 0, 1, ... , with Co,-1 = 1.
I
A recurrence relation for the logarithmic partition polynomials may be obtained by differentiating generating function (11.23). Specifically, the following theorem is derived.
THEOREM 11.6
=
The logarithmic partition polynomials Ln Ln(Xl, x2, ... , Xn), n = 1, 2, ... , with L 1 = x 1 , satisfy the recurrence relation
Ln+l
= Xn+l-
t
r=l
(~) XrLn-r+l,
n
= 1,2, ....
(11.24)
PARTITION POLYNOMIALS
426
PROOF Differentiating generating function ( 11.23) and multiplying the resulting expression by 1 + [g(t) - x 0 ], we get the relation
d d d dt L(t) = dtg(t)- [g(t)- x 0 ] dt L(t). Expanding it into powers oft, it follows that 00
00
tn LLn+l! n=O n.
l[
00
00
and so 00
l
tn [ LXr! tr · LLn+l! tn = LXn+l!n=O n. r=l r. n=O n.
00
n) XrLn-r+ll1· tn
00
tn tn [ n ( L Ln+I 1 = L Xn+I 1 - L L n=O n. n=O n. n=l r=I r
n.
Equating the coefficients of t 11 /n! in both sides of the last expression, (11.24) is I deduced.
Example 11.4 Connection of cumulants and moments The cumulant generating function 00
tTl
K(t) = Lll:n! n. n=l is usually defined through the moment generating function
by K(t) =log M(t). Thus
Comparing this relation with (11.23), it follows that ~~:n
= Ln(JL~,JL~, . ..
,JL~), n
= 1,2, ....
The logarithmic partition polynomials, according to (11.9) and (11.23), are the inverse of the exponential Bell partition polynomials and so
11.4. LOGARITHMIC PARTITION POLYNOMIALS
427
Example 11.5 Elementary and power sum symmetric functions A polynomial P(x 1, x 2 , ••• , Xn) inn variables is called symmetric function if, for any permutation (h , )2, . . . , j n) of the n indices { 1, 2, ... , n}, it holds that P(x]t,Xh, . .. ,Xj,) = P(xt,X2,· .. ,x 11 ). The elementary symmetric function ak = ak (x 1 , x 2 , ... , Xn) is defined by the sum where the summation is extended over all k-combinations {i 1 , i 2 , ... , ik} of the
n indices {1, 2, ... , n }. Therefore, with ao = 1, n
L
n
ak(Xt, X2,
... ,
X11 )tk
=II (1 + X;t).
k=O
(11.25)
i=l
The power sum symmetric function sk sum
= sk(Xt, x2, ... , Xn) is defined by the n
sk(Xt,X2,··· ,xn) =LX~, k
= 1,2, ....
i=l
Its generating function is readily deduced as
n
=
-log
II (1 - x;t).
(11.26)
i=l
Express the elementary symmetric functions ak = ak (x 1 , x2, ... , x 11 ), k = 1, 2, ... , n in terms of the power sum symmetric functions sk = sk (x1, x2, ... , X 11 ), k = 1, 2, ... , and vice versa. Note first that, in (11.25) and (11.26), n may be regarded as being as large as may be necessary. Then,
and 00
00
tk =log ( 1 + ~artr ) . t;(-1)k-lSkk Therefore, according to (11.9) and (11.23), it follows that
ak = ( -1)k Bk(-s1, -s2, ... , -(k- 1)!sk)/k! and
PARTITION POLYNOMIALS
428
11.5
POTENTIAL PARTITION POLYNOMIALS
DEFINITION 11.5 The polynomial Cn,s =: Cn,s (Xt, X2, ... , X11 ) in the variables Xt, x 2 , ••• , Xn defined for a real (or complex) numbers by the sum
where k = kt + k2 + · · · + kn and the summation is extended over all partitions of n, that is, over all nonnegative integer solutions ( k1 , k2 , •.. , kn) of the equation kt + 2k 2 + · · · + nkn = n, is called potential partition polynomial.
The potential partition polynomial Cn,s(x 1 , x 2 , ••• , Xn) constitutes a particular case of the partition polynomial Bn (cx 1 , cx 2 , .•• , cxn), ck ck. Specifically, for n = 0, 1, ... ,
=
(11.28) with Ck = (s)k, k = 0,1, ... ,n. Further, Definitions 11.5 and 11.2 imply the relation n
Cn,s(Xt' X2, ... , Xn)
= L(s)kBn,k(Xt, x2, ...
, Xn),
n
= 0, 1, .... (11.29)
k=O
The generating function of the potential partition polynomials may be deduced from the generating function of the partition polynomials, (11.16), by setting Ck = (s)k, k = 0, 1, ... , and using (11.28) and the expansion
Thus the following theorem is deduced. THEOREM 11.7 The generating function of the potential partition polynomials Cn,s(Xt, X2, ... , X11 ), n = 0, 1, ... , is given by oo
c.(t)
=
L
tn Cn,s(Xt, X2, ... 'Xn) n!
n=O
where g(t) = L~o Xrtr /r!.
= [1 + (g(t)- Xo)]",
(11.30)
11.5. POTENTIAL PARTITION POLYNOMIALS
429
REMARK 11.4 The recurrence relation for the partition polynomials, (I I. I 7), in the particular case of Ck = (s )k, k = 1, 2, ... , and since n
CBn(CXt,CX2, ... ,CXn) = L(s)k+IBn,k(Xt,X2, ... ,Xn) k=O n
s L(s- 1)kBn,k(Xt, X2, ... , Xn) k=O = sCn,s-1 (xi, X2, ... , Xn), =
yields for the potential partition polynomials Cn,s 0, 1, ... , the recurrence relation
Cn+l,s =
S
t (~)
= Cn,s(x 1, x 2 , .•. , Xn), n =
Xk+l Cn-k,s-1•
(11.31)
k=O
Note that this recurrence relation expresses the potential partition polynomial
Cn+I,s· with parameters, in terms of the potential partition polynomials ck,s-1. k = 0, 1, ... , n, with parameters- 1. I A recurrence relation for the potential polynomials, in which s remains constant, is obtained in the next theorem. THEOREM 11.8 The potentia/partition polynomials Cn,s Cn,s(Xt, x2, ... ,xn). n = 0, 1, ... , with Co,s = 1, satisfy the recurrence relation
=
PROOF
Differentiating generating function (I I .30) and multiplying the resulting expression by 1 + [g(t) - x 0 ], we get the relation
dC.(t) dt
= sC
s
(t)dg(t) _ [g(t) _ xo]dC.(t). dt dt
Expanding it into powers oft, it follows that
l[ l
= tn = s [ LXr+I! = F · LCn,s! = tn LCn+I,s! n=O n. r=O r. n=O n. -
= tr+l ] [ = tn-1 ] [~Xr+l (r + l)! · ~ Cn,s (n _ 1)!
PARTITION POLYNOMIALS
430
and so
Equating the coefficients of tn fn! in both sides of the last expression, ( 11.32) is deduced. I The potential partition polynomial Cn,s (X1, X2, ... , Xn), n = 0, 1, ... , in the case of a positive integers, may be expressed as a partial Bell partition polynomial. Specifically, we have the following theorem. THEOREM 11.9 If sis a positive integer, then for n = 0, 1, ... ,
PROOF
For Y1 = 1, Yr =
TXr-1.
r = 2, 3, ... ,
If s is a positive integer, expanding the left-hand side according to ( 11.30) and the right-hand side according to (II. 7), we get the relation
which implies (11.33).
I
An interesting property of the potential partition polynomial is given in the following theorem. THEOREM 11.10 LetCn,s = Cn, 8 (XI,x2, ... ,xn), n
=
0,1, ... , bethepotentialpartitionpoly-
11.5. POTENTIAL PARTITION POLYNOMIALS
431
nomial. Then, for any real (or complex) numbers,
C
PROOF
_ n,s-
n ~
(
s r)
(
n-s ) C n- r n,r·
(11.34)
Generating function ( 11.30) may be expressed as
C8 (t) = [1
+ (g(t)- xoW
=
f: (Z)
[g(t)- xo]k.
(11.35)
k=O
Note that the function
has the factor tk and, thus, for the determination of Cn,s• which is the coefficients of tn In!, the first n terms of the sum in the right-hand side of (11.35) are sufficient. Consequently, the potential partition polynomial Cn,s is the coefficient of tn In! in the expansion
E(Z)
[g(t) -xo]k =
E~(-1)k-r (Z) (;) Cr(t)
=
E~(-1)k-r (Z) (;) ~Cn,r:~
=
~ {E~(-1)k-r (Z) (;) Cn,r} :~.
Hence we get
Cn,s =
=
E~(-1)k-r (Z) (;) Cn,r
~{t(-1)k-r (Z) (;) }cn,r
and, since, by the horizontal recurrence relation of binomial coefficients (2.9),
PARTITION POLYNOMIALS
432
I
( 11.34) is deduced.
REMARK 11.5 The following formulation of Theorem 11.10 is of interest. For any real (or complex) numbers and for every function h(t), with h(to) = 1, for which the derivatives at t 0 exist, ( 11.36) Indeed (11.30), with h(t) 11
d (h(tW] n [ dt
_ -
= 1 + g(t- t 0 ) - g(O) and g(t) = L~o Xrtr jr!, yields
[d (1+{g(t)-xo})'] n 11
d
t=to
-C ( ) n,s Xr, X2, ... , Xn
t
t=O
I
and so (11.36) is readily deduced from (11.34).
Example 11.6 Homogeneous product sum symmetric function The homogeneous product sum symmetric function hk = hk(x 1 , x2, ... , X11 ) is defined by the sum hk(xr,x2,··· ,xn)
= Lxr
1
x;
2
where the summation is extended over all n that r 1 + r 2 + · · · + r 11 = k. Therefore, with h 0 oo
Lhk(XI,X2, ... ,xn)tk
x~n, k
= 1,2, ... , = 0, 1, ... , k, i = 1, 2, ... •••
, n, such
= 1,
oo
n
noo
k=O
i=l
i=l r;=O
=LLII(xiW• =II L(xity'
k=O
and so n
oo
L
hk(Xr, X2,
k=O
... ,
Xn)tk
=II (1- Xit)-
1
•
( 11.37)
i=l
Express the homogeneous product sum symmetric functions hk = hk(x 1 , x2, ... , x 11 ), k = 1, 2, ... in tenns of (a) the elementary symmetric functions ak = ak(x 1 ,x2 , ••• ,x 11 ), k = 1,2, ... and (b) the power sum symmetric functions Sk = sk(x 1 , x 2 , .•• , X11 ), and vice versa (see Example 11.5). Generating functions ( 11.25) and ( 11.26) are connected with ( 11.37) by the relations
I+ t,(-l)'h,f' ~ (1 +~act")_,, I+ t,(-l)'a,t' ~(I+ ~hct") _,,
11.6. INVERSION OF POWER SERIES
433
and
Therefore, according to (11.9), (11.23) and (11.30), it follows that
and hk = Bk(sl, s2, ... , (k- 1)!sk)/k!,
Sk = Lk(hl, 2!h2, ... 'k!hk)/(k- 1)!.
11.6
D
INVERSION OF POWER SERIES
Consider the power series (11.38)
which has no constant term, and let (11.39)
be its inverse series, ¢- 1 (>(t)) = >(>- 1 (t)) = t. Since 1
[
d>- (u)] du
u=¢(t)
. [d>(t)] = 1 ' dt
it follows that 7/J 1 = ¢1 1 . The coefficients 7/Jn, n = 2, 3, ... , may be expressed as potential polynomials of the coefficients >n, n = 2, 3, .... Interesting on its own a preliminary result, is derived in the following lemma, which constitutes a generalization of Faa di Bruno formula.
434
PARTITION POLYNOMIALS
LEMMA 11.1 Let I (u) and g( t) be two functions of real variables for which all the derivatives,
[~ l(u)]
I = gn = [dng(t)] dtn t=O ' n exist. Further, let h( t) =
dU n
u=g(O)
'
n = 1, 2, ... '
I (g( t)) and
hn = [dnh(t)] dtn
' n t=O
= 1' 2, . . . .
Then, for r = 1, 2, ... , n and n = 1, 2, ... , n
Bn,r(ht,h2,··· ,hn) = LBk,r(/t,/2, ... ,/k)Bn,k(gl,g2,· .. ,gn)· k=r (11.40) PROOF
According to (11.7), oo tn LBn,r(ht,h2,··· ,hn), n. n=r
=
[h(t) - h(OW I ' r r.
= 1,2, ....
Further,
f.Bk,r(ft,h, ... k=r where
,lk)(u-k~o)k
= [l(u)
In= [~1~)] u=ua
U
,
~t(uoW,
r = 1,2, ... ,
n=1,2, ....
Consequently, with u = g(t), u 0 = g(O) and, since ~ tn ~Bn,k(Yt,g2,··· ,gn)n!
=
[g(t)- g(O)]k k! , k
= 1,2, ... ,
n=k it follows that
[l(g(t))
~/(g(O)W
=f.
Bk,r(ft, h. ... 'lk) [g(t)
~~g(O)jk
k=r oo
=L
k=r
oo
Bk,r(ft, h .... ' /k)
L
n=k
tn Bn,k(gl,g2, ... ,gn) n!
11.6. INVERSION OF POWER SERIES
435
Thus
and, equating the coefficients of tn j n! in both members of this relation, ( 11.40) is I deduced. Note that expression (11.40) for r = 1, since Bn,1 (h1, h2, ... , hn) = hn, Bk,1 (!I, h, ... , /k) = fk, reduces to Faa di Bruno formula (11.18).
THEOREM 11.11 Inversion formula of Lagrange Let ¢(t) be power series ( 11.38), which has no constant term, and ¢- 1(u) its inverse power series (11.39). Then fork= 1, 2, ... , nand n = 1, 2, ... ,
dn _1 k] [ dun(¢ (u)) u=O = k(n-
1)k-1
PROOF Applying Lemma 11.1 with f(u) h(t) = f(g(t)) = t, and since
[ dn-k (¢(t)) dtn-k -t-
-nl
t=O.
(11.41)
= ¢(u), g(t) = ¢- 1 (t), whence
1 [ dn ] _ [dr¢-1(t)] Bn,k('I/J1' 'I/J2, ... ''1/Jn) = k! dtn (¢-1 (t))k t=O' '1/Jr dtT t=O' it follows that
Thus, for ( 11.41) to hold, it suffices to prove that
Cn,r
_ n k = Ln k=r
(n) [dn-k (¢(t))-n] dtn-k -t-
1 [dk r] _ . -;:! dtk (¢(t)) - - On,r·
k
t=O
t-0
PARTITION POLYNOMIALS
436
Using the relation
Cn,r may be written as
1
n (n) [dn-k (¢(t))-n] k dtn-k -tt=O
= n(r- 1)! ~
Cn,r
d: {t(<jJ(t)r-1 d<jJ(t) }]
X [
ill
ill
t=O
and so, according to the formula of the n-th derivative of the product of two functions, C = 1 [!!!:___ { (¢(t)) -n t( ¢(t)r-1 d¢(t) }] n,r n(r- 1)! dtn t dt t=O
[!!!:___ {tn+1(¢(t))-n+r-1 d¢(t) }]
1
=
n(r- 1)! dtn
dt
. t=O
In particular, for r = n, Cn
,n
= _!_
[!!!:___ {tn+l(¢(t))-1 d¢(t) }]
n!
dtn
= _!_
t=O
[!!!:___ {tn+l dlog¢(t) }]
n! and so, setting x 0 it follows that
dt
dtn
dt
t=O
= ¢ 1 , Xi = ¢1 1¢i+t/ (i + 1), i = 1, 2, ... , and using (11.23),
1 [ -dn { t n+l dlog(xot) cn,n -_ -n! dtn dt
+ t n+l -dtd log
( 1 + Loo x·ti) }] 'i! i=l t=O
~
1 [ dn { n n+l d ( ) tJ }] -_ n! dtn t +t dt~Lj Xt,X2,··· ,Xj Jl t=O
J-l 00
= n!1
[ dn { dtn
tn
+ ~ Lj(Xt, X2, ...
,
tn+j }] Xj) (j _ 1)!
= 1. t=O
J-l
Also, for r < n,
_
1
Cn,r - - n(n- r)(r- 1)!
[ dn { n+l d (,!.,( ))-n+r }] dtn
t
dt
'1-'
t
t=O
11.6. INVERSION OF POWER SERIES
437
and so, setting Xo = ¢1, Xi = ¢1 1!i+l/(i + 1), i = 1, 2, ... , dn,r -n(n- r)(r- 1)!x0 n+r Cn,r and using (Il.30), it follows that dn,r =
I
Therefore Cn,r = On,r and the proof of (Il.4I) is completed.
COROLLARY 11.2 Let ¢(t) be power series ( 11.38), which has no constant tenn, and ¢- 1(u) its inverse power series ( 11.39). Then the n-ordercoefficient'l/Jn,k• n = k, k of the k-th power of ¢- 1 (u), oo
+ 1, ...
n
"""' u = [! -1 (u) lk , k L...... 1/Jn,k! n. n=k
= 1,2, ... ,
is given by
1/Jn,k
= k(n- 1)k_1 C ( !2 .!h._
In particular (fork = 1),
1/Jn
PROOF
.
(Il.43)
According to ( II.38),
¢(t))-n ( -t-
.!h._ ~) 1/Jr cn- 1,-n (.!h._ 2¢1' 3¢1 ' ... 'n¢1
= __!:__
( =
00
tn-1)-n
~
1 ( =
00
1
+~
(r
¢r+ 1 tr)-n + 1)¢1 · r!
and so, using (11.30),
¢(t)) -n 1 ~ ( !2 ¢H1 ) ti ( -t=
438
PARTITION POLYNOMIALS
Hence dn-k [ dtn-k
(¢(t)) -nl t
= _!_C
¢~ n-k,-n
u=O
(.!h._
.!h._ f/Jn-k+l ) 2¢1' 3¢1 '· .. ' (n- k + 1)¢1
and by (11.41) we get '1/Jn,k
d" -1 = [ ~(¢ (u)) k] U
=
u=O
k(n- 1)k_1
¢~
Cn-k,-n
( ¢2 ¢3 f/Jn-k+1 ) 2¢1' 3¢1 ' ... ' (n- k + 1)¢1 '
I
which is the required expression (11.42).
COROLLARY 11.3
If
with s a positive integer, then 1
¢- (u)
=u
1 + ~ Yn oo
(
:! , sn)
where Yn = Cn,-sn-1(X1,X2,··. ,Xn)/(sn + 1) n
= L( -1)k(sn + k)k-1Bn,k(X1, X2, ... , Xn)·
(11.44)
k=1
PROOF The inversion formula of Lagrange ( 11.41 ), in the particular case of k = 1 and for sn + 1 instead of n, reduces to
n! Yn = (sn
+ 1)!
n! = (sn
+ 1)!
[ d•n+1
-1
]
du•n+I ¢
[ d"n dt•n
(u)
(¢(t))
u=O 1
-•n- ]
-t-
t=O
~-n!----:[:.: (1 + f: t;~) -•n(sn + 1)! Xr
r=
1
1 ]
t=O
11.6. INVERSION OF POWER SERIES
439
Thus, using (11.30), it follows that
Yn= (sn~ 1 )! [::s:~Cj,-sn-1(x1,x2, ... ,xn)~:]
,
1
t=O
yielding the first part of (11.44). Further, from (11.29) and since
(-sn -1)k sn + 1
=
(-sn- 1)(-sn- 2) · · · (-sn- k) sn + 1 (-1)k(sn + k)k-1,
I
the second part of ( 11.44) is readily deduced.
In the following theorem two useful forms of Lagrange formula are derived.
THEOREM 11.12 Let f(t) = 2::~ 0 fktk /k! and u
J(t) = /(0)
= ¢(t) = L~o aktk jk!, with ao =/: 0.
+~
[~~11
(gn(t)
Then
d~~)) L=O. :~
( 11.45)
and
d(t))J(t) ( 1- U_!!__d t with u
1
00
=L n=O
[dn -d n (gn(t)J(t)) ]
t
t=O
n · :!:.._,
= tjg(t).
PROOF Introducing into the expansion of f (t) the inverse series t and expanding the resulting expression into powers of u, we have
Using (11.41) and putting u
f(t) = /(0)
~ ~
00
- /(O)
+L
~1
{
= ¢- 1 ( u)
= ¢(t) = tj g(t), we get
(n1) [dkdtkf(t)] . [dn-kgn(t)] . un kdtn-k t=O t=O 1) [dn-kgn(t)] . [~ df(t)] } . Un Ln (nk- 1 dtn-k dtk-1 dt
+~~
k=1 n=k _
(11.46)
n!
~1
n!
1
~
~
n!
PARTITION POLYNOMIALS
440
and, according to the formula of the (n- 1)-th order derivative of the product of two functions, ( 11.45) is deduced. Differentiating formula ( 11.45) with respect to u, we get
Further,
df(t) du
= df(t) dt
I
du dt
and, from ug(t) = t, by differentiation with respect tot, it follows that
+ u dg(t) = 1.
g(t) du dt
dt
Therefore
df(t) du
= g(t) df(t) dt
(1- u dg(t)) dt
1
and
g(t)df(t) ( 1 -udg(t))dt dt
1
=
f
[!£... (gn+ 1(t)df(t))] un dt t=O . n! .
n=O dtn
I
Replacing g(t)df(t) / dt by f(t), (11.46) is deduced.
Example 11.7 Determine the inverse power series of (a) ¢(t) (a) By (11.41), with k = 1, it follows that
[.!E__¢-1(u)J dun
=[~(¢(t))-n] t dtn- 1
= te-t and (b) 1,/!(t) = t(1 + t) -r.
1
u=O
t=O
1 =[dn- ent] dtn- 1
=nn-1 t=O
and so the inverse of ¢(t) = te-t is the power series
(b) Again by (11.41), with k = 1, it follows that
~
[
dun 1,/1
_ 1
]
[
(u) u=O =
dn-1 dtn-1 dn-1
= [d
t
n- 1
(1,/l(t)) -nl -t-
(1
+ tYn
t=O
] t=O
= (rn)n-1
441
11.6. INVERSION OF POWER SERIES
and so the inverse of 1/J(t)
= t(1 + t)-r is the power series
Example 11.8 Determine the factorial moments of the sequence of probabilities Pk = e-Ak
(.\k)k-1 k!
, k = 1, 2, ... , 0
< ,\ < oo.
The generating function of this sequence of probabilities may be obtained as
where
is the inverse power series of <jJ(t) = tct (see Example 11.7). The generating function of the factorial moments JL(n)• n = 1, 2, ... , oo
B(z)
n
= 1 + LJL(n)~, n. n=1
is connected with the generating function P(z) by B(z) = P(1
+ z) and so
¢- 1 (u) is the inverse of u = <jJ(t) = te-t, it follows that (1 + z)-Xe->.. = te-t and z = (t/-X)e->..[(t/>..)- 1] - 1. Putting w = (t/-X)- 1 and f(w) = (1 + w)e->..w - 1, we have z = f(w) and
Since t =
where w = /- 1 (z) is the inverse of z = f(w) = (1
r
oo 1 (z)
+ w)e->..w n
" ' Jl(n)' z = 1 + 'L...., n=1
n.
- 1. Therefore
PARTITION POLYNOMIALS
442
and n
oo
f(w) = (1
+ w) L( -1)n_xn;- 1 n.
n=O n
oo
oo
m+l
= "'( -1)n_xn~ + "'( -1)n _xn~ ~ n! ~ n! n=I
n=O
n
oo
= "'(-1t-l(n- A)An-I~. ~ n!
n=I
The coefficients are obtained as /l(n) =
Jl(n)•
n = 1, 2, ... , of w = f- 1 (z), using (11.43) and (11.29),
n-I (-1)n-I(-n)k_xn-I _ ,X)n+k 1 k=O
L
(
In particular, for n Jl
=
Bn-I,k(1-
A/2, -.X/3, ... , 1- Ajn).
= 1, 2, /l(l)
= (1- .X)- 1 ,
fl(2)
= .X(2- .X)(1- .X)- 3
and
11.7
TOUCHARD POLYNOMIALS
=
DEFINITION 11.6 The polynomial Tn,k Tn,k(XI, X2, ... , Xn; YI,Y2, ... , Yn) in the variables XI, x2, . .. , Xn and y 1 , y 2 , . .. , Yn defined by the sum
where the summation is extended over all nonnegative integer solutions (k1, k2, ... ,kn,ri,r2,··· ,rn) oftheequations n
n
i=l
i=l
L i(ki + ri) = n, L ki = k, is called Touchard polynomial.
(11.48)
443
11.7. TOUCHARD POLYNOMIALS
Note that
and
Tn,k(XI,X2,··· ,xn;O,O, ... ,0) = Bn,k(XI,X2,··· ,xn), where Bn(YI,Y2, ... ,Yn) and Bn,k(XI,x2, ... ,xn) are the exponential and the partial Bell partition polynomials, respectively. Also
Tn,k(abxi,a 2bx2,··· ,anbxn;ayi,a2y2, ... ,anyn)
= anbkTn,k(XI,X2,···
,xn;YI,Y2,··· ,yn)·
Further, summing the Touchard polynomials fork= 0, 1, ... , nand setting Si = ki + ri, i = 1, 2, ... , n, it follows that n
LTn,k(xi,X2,··· ,xn;YI,Y2···· ,Yn) k=O
L =
fi k7'~:o
n! SI !s2! · · · sn! i=I
(Si) (Xi)k; (Yi)s;-k; ki i! i! 81
="'"' n! (XI+ YI ) L..,.s1!s2!···sn! 1!
82
(X2 + Y2) 2!
•••
(Xn + Yn) n!
Sn'
where the summation is extended over all partitions of n, that is, over all nonnegative integer solutions (SI, s 2, ... , sn) of the equation si + 2s2 + · · · + nsn = n. Hence n
LTn,k(Xt,X2,··· ,xn;YI,Y2,··· ,Yn) k=O
=Bn(Xt +Yt,X2+Y2,··· ,xn+Yn), n=0,1, .... This relation may also be deduced from the bivariate generating function T(t, u) of the Touchard polynomials (see Theorem 11.13 that follows) by putting u = 1 and comparing the resulting generating function with the generating function of the exponential Bell partition polynomials (11.9). REMARK 11.6 The coefficients of the Touchard polynomials (11.47) are positive integers. Specifically,
ktl(1!)k'k2!(2!)k 2
• • •
n! kn!(n!)knrtl(1!)T 1 r2!(2!Y 2
• •
·rn!(n!)Tn'
with E~=l i(ki + ri) = n and E~=l ki = k, equals the number of partitions {AI, A2, ... , Ak, BI, B2, ... , Br, ... } of a finite set Wn of n elements, where
444
PARTITION POLYNOMIALS
~ W n into k subsets, among which ki ~ 0 subsets includei elements each, i 1, 2, ... , n, and {Bt, B2, ... , Br, ... } is a partition of the set Wn- U into subsets, among which ri ~ 0 subsets include i elements each, i = 1, 2, ... , n. I
{ A 1 , A 2 , •.• , Ak} is a partition of a set U
=
Bivariate and vertical generating functions for the Touchard polynomials are derived in the following theorem. THEOREM 11.13 (a) The bivariate generating function of the Touchard polynomials, Tn,k _ Tn,k(XI,X2, ... ,xn;YbY2, ... , Yn), k = 0, 1, ... , n, n = 0, 1, .. . , with To,o 1, is given by
=
oo
~
n
T(t,u) = LLTn,k(Xt,X2, ... ,xn;Yt,Y2, ... ,yn)uk n! n=Ok=O = exp{u(g(t)- xo] + (h(t)- yo]}.
(11.49)
(b) The vertical generating function of the Touchard polynomials Tn,k = k, k + 1, ... ,for fixed k, is given by
=
Tn,k(Xt, x2, ... , Xn; Yt, Y2, ... , Yn), n
oo tn Tk(t) = L:Tn,k(Xt' X2, ... 'Xn; Yt' Y2, ... 'Yn) n! n=k [g(t)- xo]k = k! exp(h(t) -yo], k = 0, 1, ... ,
( 11.50)
where (11.51)
PROOF (a) Multiplying (11.47) by uktn jn! and summing the resulting expression fork = 0, 1, ... , nand n = 0, 1, ... , it follows that oo
T(t,u) =
~
n
L LTn,k(Xt,X2, ... ,xn;Yt,Y2, ... ,yn)uk n! n=Ok=O oo
n
L
= L L n=Ok=O X (
1
kt !k2! .. ·
kn~~l !r2! .. · rn!
X~~t) k, ... ( X:~tn) kn
( y;n r, ... (
y~~n
rn '
where the summation in the inner sum is extended over all nonnegative integer solutions (k~, k2, ... , kn, r1, r2, ... , rn) of 2::~ 1 i(ki + ri) = nand 2::~ 1 ki = k.
445
11.7. TOUCHARD POLYNOMIALS
Since this inner sum is summed over all k = 0, 1, ... , n and n = 0, 1, ... , it follows that the summation is extended over all ki = 0, 1, ... , ri = 0, 1, ... , for i = 1, 2, . . . . Therefore,
00
=IT exp i=l
(
Xi~ z.
ti
ti) +~ .
z.
( 'L:Xi-:-;-ti + 00
= exp
u
i=l
z.
00
ti)
LYi7j
z.
i=l
.
Using (11.51 ), the last expression implies (11.49). (b) Interchanging the order of summation ( 11.49) may be expressed as 00
T(t,u)
~
00
= LLTn,k(xi,X2,···
,XniYI,Y2···· 1 Yn)uk n!
k=O n=k
and, since T(t,u) = exp{u[g(t)- x 0 ] + [h(t)- y 0 ]}, it follows that
t k=O
Tk (t)uk = exp[h(t) -Yo]
t
[g(t)
~ xo]k uk.
k=O
Equating the coefficients of uk in both sides of the last expression, (11.50) is deduced. I The Touchard polynomial is expressed as a finite sum of Bell partition polynomials in the following theorem. THEOREM 11.14 The Touchard polynomial Tn,k(XI,x2, ... 1 XniYI,Y2 ... ,yn) is expressed in terms of the partial Bell polynomials Br,k(x 1 , x 2 , .•• , Xr) and the exponential Bell polynomials Bn-r(YI, Y2, ... , Yn-r).for r = k, k + 1, ... , n, as
(11.52)
PROOF
Expanding the right-hand side of (11.50) into powers oft, using (11. 7)
PARTITION POLYNOMIALS
446 and (11.9), we get the relation
which, by virtue of oo
Tk(t)
= LTn,k(X!,X2,···
tn ,XniYl,y2,··· ,yn)n!'
n=k
implies ( 11.52).
I
In the next theorem a recurrence relation for the Touchard polynomials is deduced. THEOREM 11.15 The TouchardpolynomialsTn,k Tn,k(Xl,x2,··· ,xn; Yl,Y2,··· ,yn), k 0, 1, ... , n, n = 0, 1, ... , with To,o 1, satisfy the recurrence relation
=
=
PROOF Differentiating the generating function ( 11.50) and expanding the resulting expression,
into powers oft, it follows that
Equating the coefficients oftn jn! in both sides of the last expression, (11.53) is deduced. I
11.8. BIBLIOGRAPHIC NOTES
11.8
447
BIBLIOGRAPHIC NOTES
Francesco Faa di Bruno (1855) expressed the derivatives of a composite function as a multi variable polynomial of the derivatives of the component functions. These polynomials are essentially partition polynomials. A history of the problem of deriving a general formula for the derivatives of a composite function was outlined by Eugene Lukacs (1955). The expressions of the cumulants in terms of the (power) moments, and vice versa, were also given in that paper (see Example 11.4). In the classical book of Charles Jordan (1939a) a brief sketch of proof of Faa di Bruno formula, using Taylor series, is quoted. Eric Temple Bell (1927), aiming to the unification ·of a variety of arithmetical functions, introduced and studied the partition polynomials. Further, Bell (1934a,b) examined additional arithmetical and other properties along with certain particular cases of these polynomials. It is worth noting that R. Frucht (1969), in a combinatorial approach to the Bell polynomials, furnished a nice combinatorial interpretation of these polynomials; Example 11.2 was discussed in that paper. John Riordan (1958, 1968) named the partition polynomials after E. T. Bell and extensively studied them. The derivation of the expression of the derivatives of a composite function as partition polynomials of the derivatives of the component functions provided by J. Riordan (1958) is based on umbra! calculus. A combination of the derivation of Faa di Bruno formula provided by Ch. Jordan (1939a) and J. Riordan (1958) that avoids the use of umbra! calculus is adopted in this book (see Theorem 11.4). The reader interested in a rigorous umbra! calculus derivation of this formula is referred to the paper of Steven Roman (1980). Louis Comtet (1974) devoted much of the chapter on identities and expansions to a thorough presentation of the Bell polynomials and provided an updated and rich bibliography of the subject. The exponential, logarithmic and potential polynomials, which are the most striking partition polynomials, have a direct use in combinatorics in expressing the elementary symmetric functions and the homogeneous product sum symmetric functions in terms of the power sum symmetric functions and vice versa. Examples 11.5 and 11.6, in which such expressions are derived, were taken from P. A. MacMahon (1915, 1916). Their use in expressing the probability function and factorial moments of a compound discrete distribution in terms of the probability functions and factorial moments of the component distributions was demonstrated by Ch. A. Charalambides (1977b ). Apart from the classical convolution formula, G. P. M. Heselden (1973) derived an interesting convolution formula for the exponential Bell partition polynomials; Exercise 2 is based on this paper. The bipartitional polynomials and their applications in combinatorics and statistics, which
448
PARTITION POLYNOMIALS
appear in the exercises, were examined by Ch. A. Charalambides (1981). The derivatives of a bivariate composite function may be expressed as bipartitional polynomials of the derivatives of the component functions. L. Comtet (1968) expressed the derivatives of an implicit function in terms of certain bipartitional polynomials.
11.9 EXERCISES 1. Convolution of Bell polynomials. Let Bn(x 1 , x2, ... , xn) be the exponential Bell partition polynomial. Show that Bn ( X1
=
+ Yr, X2 + Y2, · . ·
t (~)
, Xn
+ Yn)
Bk(xr,x2,··· ,xk)Bn-k(Yr,Y2,··· ,Yn-k)·
k=O
2*. Heselden's convolution of Bell polynomials (Heselden, 1973). For any real or complex number a such that a- k -::/:- 0, k = 0, 1, ... , n, show that
~a~k (~)Bk((k-a)zr,(k-a)z2,··· ,(k-a)zk) xBn-k((a- k)z1, (a- k)z2, ... , (a- k)zn-k) = cl"n,O·
Using this relation, derive the following convolution formula
~a~ k ( ~) Bk((k- a)z1, (k- a)z2, ... , (k- a)zk) xBn-k(Yr- kzr,Y2- kz2,··· ,Yn-k- kzn-k)
= Bn(Yr- azr,Y2- az2, ...
,yn- azn).
Further, show that
t a~ ~) = t a~ (~)Bk(xr k (
Bk(xr
+ kz1,x2 + kz2, ...
,xk
+ kzk)
k=O
xBn-dYr - kzr, Y2 - kz2, ... , Yy-k - kzn-k) k
+ azr,X2 + az2, ...
,xk
+ azk)
k=O
XBn-k (Yt - az1, Y2 - az2, ... , Yn-k - azn-k)·
11.9. EXERCISES
449
3. Hermite and Laguerre polynomials. Show that the exponential Bell partition polynomial Bn(x 1 ,x2,··· ,xn) in the particular case of x 1 = x, x2 = 1, Xr = 0, r = 3, 4, ... , reduces to
Bn(x, 1) =i-n Hn(ix), i = where
H (x) n
H,
[n/ 2]
= (-1)nex2f2Dne-x2f2 = n''"' · ~ k=O
x
( 1)k n-2k
X (n- 2k)!k!2k
is the Hermite polynomial. Also, show that Bn (x 1 , x2, .. . , xn) in the particular case of Xr = r!x-r+ 1 , r = 1, 2, ... , reduces to
1 -n+l) -_ (n _ 1)1.X -n+1£(1) B n (1 1 ., 21.X -1 , ... , n.X n- 1 ( - X) , where
is a Laguerre polynomial. 4. Generalized Hermite polynomials (Bell, 1934b). Show that the exponential Bell partition polynomial Bn(x 1 , x2, ... , xn) in the particular case of Xr = (s)raxs-r, r = 1,2, ... ,s, Xr = 0, r = s + 1,s + 2, ... , with sa positive integer, reduces to
where
H n (x; a, s )
= e -ax•Dnxe ax•
is a generalized Hermite polynomial. Further, show that n
H (x· a s) - '"'C(n k· s)akxsk-n n
''
-~
''
'
k=D
where
C(n, k; s)
k = k!1 ~( -1r (k)r (sr)n
is the generalized factorial coefficient. 5. Chebyshev polynomials of the first kind. Show that the logarithmic partition polynomial Ln(x 1 , x2, ... , xn) in the particular case of x 1 = x, x2 = 1, Xr = 0, r = 3, 4, ... , reduces to
Ln(x, 1)
= -Tn(-x)jn,
450
PARTITION POLYNOMIALS
where [n/2]
(
Tn(x)=n!L:>-1)kn:k
n~
k)
k=O
T
n-2k
is the Chebyshev polynomial of the first kind. 6. Gegenbauer polynomials. Show that the potential partition polynomial Cn,-s(XI,X2, ... ,xn) in the particular case of X1 = x, X2 = 1, Xr = 0, r = 3, 4, ... , reduces to
Cn,-s(x, 1)
= G~s)(-x),
-1/2 < s < 0 or 0 < s < oo,
where
is the Gegenbauer polynomial. Note that Gh / ) (x) = Pn(x) is the Legendre 1 polynomial and Gh )(x) = Un(x) is the Chebyshev polynomial of the second kind. Also lims--->o s- 1nGh8 )(x) = Tn(x) is the Chebyshev polynomial of the first kind. 1 2
7. Let Bn,k(x 1, x 2, ... , Xn) be the partial Bell partition polynomial. Show that, for r = 1, 2, ... ,
with Yi
= Xr+if(r + i)r, i = 1, 2, ....
Further, show that
Bn,k (0, · .. , 0, Xr+l, ... , Xn) k
--~"'( 1)J j!(r!)i (n)rJ B n-rj,k-j (O , ... , o,Xr, ... ,Xn-rjXr )J )=0
and
Bn,k (0, ... , 0, Xr. ... , Xn) (n)rj ( )-i ( =~ ~ -;--. Bn-rj k-j 0, .. · , 0, Xr+I,. · · , Xn-rj :Lr· 1 . J.1 r.)J , J=O
8. (Continuation). Show that
2,
') _
1)
B n,k (1.,1 ., ... 'n. - n! - 1 k! ( nk-
11.9. EXERCISES
451
and
9. (Continuation). Show that
1)
( )I) _ (2r)! ( r B 2r,k (0 ' 21 ., ..• '0, 2r . - k! k - 1 B2r-l,k(O,
'
2!, ... , (2r- 2)!, 0) = 0
and
B2r,2s(l.,1 0, ... , (2r
_
_(2r)!(r+s-1) 1).,1 0) - ( s)! , 28 _ 1 2
B2r,2s-1 (1!, 0, ... , (2r- 1)!, 0) = 0, (2r-1)! (r+s-2) ' B2r-l 2s-t(1!, 0, ... , (2r- 1)!, 0) = ( )I 2s- 2 2s- 1 . ' B2r-1,2s(1!, 0, ... , 0, (2r- 1)!) = 0. 10. Let Cn,s mial. Show that
(
=
Cn,s(Xt,
n+s)c n n,s
x2, ... , Xn) be the potential partition polyno-
=~(n+s) L....t n + r
(n-s) n - r (n+r)c n n,r
r=O
with s any real (or complex) number. 11 *. (Continuation). Setting Xt
1! 1
Yn
X2 2!
X3
Xt
X2 2!
1!
3!
Xt
Yn
= Cn,- I( x1 , x2, ... Xn-2
Xn-3
Xn-2
Xn
n! Xn-1
(n- 3)! (n- 2)! (n- 1)! Xn-4
1
0
0
0
1
0
0
0
0
= (-1)nn!
Xn-1
(n- 2)! (n- 1)!
0
1!
, Xn), show that
Xn-3
Xn-2
(n- 4)! (n- 3)! (n- 2)! X!
1! 1
X2 2! Xt
1!
PARTITION POLYNOMIALS
452
12. Let u(n)
=L
d be the sum of the divisors of n, n
= 1, 2, ....
Show
din
that
00
00
n=l k=l Further, show that the generating function of the number p( n) of partitions of n, which is given by
G(t)
00
00
n=O
k=l
= LP(n)tn = IT (1- tk)- 1 ,
may be expressed as 00
G(t) = exp
(
tr) ~u(r)-;:-
and thus conclude that p(n)
= Bn(o-(1), 1!u(2), ...
, (n- 1)!u(n))/n!.
13. Show that the factorial moments J.L(n), n of probabilities
= 1, 2, ... , of the sequence
_ k! 1 ( k rk Pk_ ) p k( 1- p )rk-k+1 , k -_ 1, 2, ... , 1
where r is a positive integer and 0 < p < 1/r orr is a negative real number and 1/r < p < 0, are given by pn-1
J.L(n)
= (1- rp )n Cn-1-n(XI,Xz, ... '
where
x1
,Xn-1), n= 1,2, ... '
= (-r) 1 1-(n+j)p/(j+1). , J = 1, 2, .... 1- rp
=
14. Laguerre polynomials. Show that the Touchard polynomial Tn,k Tn,k(x1,xz, ... ,xn;Yl,Yz, ... ,Yn) in the particular case ofxr = r!x-r+l, Yr = r!x-r+l, r = 1, 2, ... , reduces to 1 -n+1.11 1 -n+1) -_ T n,k (1 1 ., 21.X -1 , ... ,n.X ' ., 21.X -1 , ... ,n.x for n
= k, k +
1, ... , k
= 1, 2, ... , where
nl L(k- 1) (-x)
· k!xn-k n-k
'
11.9. EXERCISES
453
is the Laguerre polynomial.
15. Let Tn,k (xi, X2, ... , Xn; Yl, Y2, ... , Yn) be the Touchard polynomial. Show that, for r = 1, 2, ... ,
Tn,k(O,O, ... ,O,xr+l,Xr+2,··· ,xn;YI,Y2,··· ,Yn) n! ( )I Tn-rk k(ZI, Z2, · · · , Zn-rk; Yl, Y2, · · · , Yn-rk), n- rk. ' with Zi = Xr+i/(r
+ i)r, i
= 1, 2, .... Further, show that
Tn,k(O, ... ,O,xr+l,··· ,xn,;YbY2,··· ,Yn)
~
· (n)rj
·
= L..,..(-1)'-:--( ).Tn-rjk-;(0, ... ,O,Xr,··· ,Xn-rj;YI,Y2,··· ,Yn-rj)X~ J.1 r! J , j=O
and
Tn,k(O, ... ,O,xr,··· ,xn,;YI,Y2,··· ,yn) k
- ~ (n)rj . ·(0 0 .. ·) j - L..,.. j!(r!)i Tn-rJ,k-J ' ... ' 'Xr+l' ... 'Xn-rJ' Yl' Y2, ... 'Yn-rJ xr. J=O
16. (Continuation). Show that
1
'2'., ... 'n.,'·Of.r, 1'.r, ... ' (n -1)')-n!(n+rT n,k (1 ., .r - k! k + r - 1 ) and
Tn,k(1, 2, ... , n; r, 0, ... , 0) = (
~)
(k
+ r)n-k.
17. Let f(u), 9(t) and h(t) be functions of real variables for which the derivatives
9r =
[d'it~t)]
[drdht~t)]
' hr = t=a
' fr = t=a
[dr1~u)] U
' u=g(a)
for r = 0, 1, ... , exist. Show that the derivatives of the composite function 1/J(t) = f(9(t)) exp[h(t)- h(a)],
1/Jn
= [~d1jJ~t)] t
, n
= 0, 1, ...
,
t=a
are given by n
1/Jn =
L
fkTn,k (91, 92, · · · , 9n; h1, h2, · .. , hn)
k=O
= Bn(/91
+ h1, /92 + h2, · · ·, f9n + hn), fk:::::: fk·
454
PARTITION POLYNOMIALS
=
18*. Exponential bipartitional polynomials. The polynomial Am,n Am,n(xo,t,Xt,a, ... ,xm,n) in the variables Xo,t,Xt,o, ... ,xm,n defined by the sum
where the summation is extended over all partitions of the bipartite number (m,n), that is, over all nonnegative integer solutions (k0 , 1 ,k1 ,0 , ... ,km,n) of the equations m
n
n
L:i:L:k;,j i=l j=O
m
=m, L:i:L:ki,j =n, j=l
i=O
is called exponential bipartitional polynomial. The polynomial Am,n;k _ Am,n;k(xo,l, Xt,o, ... , Xm,n) in the variables xo,l, Xt,o, ... , Xm,n of degree k, defined by the sum Amn·k ' '
=""' ~
m!n! (Xo,l)ko,l (Xl,O)kl,O ... (Xm,n)k~,n ko,t!kt,o! · · · km,n! 0!1! 1!0! m!n! '
where the summation is extended over all partitions of the bipartite number (m, n) into k parts, that is, over all nonnegative integer solutions (k0 , 1 , k1 ,0 , ... , km,n) of the equations m
n
n
m
i=l
j=O
j=l
i=O
n
m
2::: i 2::: k;,j = m, 2::: j 2::: k;,j = n, 2::: L:ki,j = k, j=Oi=O i+#O
is called (exponential) partial bipartitional polynomial. Show that
Am,n;k(bcxo,l, aCXt,o, ... , ambnCXm,n) =ambnckAm,n;k(xo,l,Xl,O,··· ,Xm,n),
and m+n Am,n(Xo,t,Xl,O, ... ,Xm,n) =
L Am,n;k(Xo,l,xl,O,··· ,Xm,n)·
k=l
Further, show that 00
A(t, u) =
00
LL n=Om=O
tm un Am,n m! ~ = exp[g(t, u) - xo,o],
11.9. EXERCISES
455
oo
A(t, u, w)
oo
=L
m+n
LL
tm n Am,n;kWk m! ~!
= exp{ w[g(t, u)- xo,o]}
n=Om=O k=O
and
A (t u) =~~A . tm un k , L...t L...t m,n,k 1 1 n=Dm=O m. n.
= [g(t,u)xo,o]k kl , '
where 00
g(t,u)
=L
tm un
00
L Xm,n11· n=Om=O m. n.
19*. (Continuation). Show that
and
tf (7) (;)
Am+l,n;k+l =
Xi+l,jAm-i,n-j;k·
J=O •=0
20*. General bipartitional polynomials. The polynomial Pm,n :::::: Pm,n(xo,I, Xt,o, ... , Xm,n) in the variables xo,I, Xt,o, ... , Xm,n and parameters Ct, C2, . . . , Cm+n, defined by the sum
Pmn '
=L
1)ko,t
m!n! (Xo Ck -'ko,t!kt,o! · · · km,n! 0!1!
(Xl,O 1!0!
)kt,O ... (Xm,n)km,n , m!n!
where k = k0,1 + k 1 ,o + · · · + km,n and the summation is extended over all partitions of the bipartite number (m, n), that is, over all nonnegative integer solutions (k0 , 1 , k 1 ,o, ... , km,n) of the equations m
n
n
m
L:iL:ki,j =m, L:iL:ki,j =n, i=l j=O j=l i=O is called bipartitional polynonial. Note that it can be expressed by the exponential bipartitional polynomial Am,n(xo, 1 ,xt,o, ... ,xm,n) as
Pm,n(Xo,I' XJ,O, ... 'Xm,ni Ct' c2, ... 'Cm+n) = Am,n(Cxo,l' CXt,o, ... 'CXm,n), ck
=Ck·
Show that
m+n Am,n(Cxo,l, CXt,o, ... , CXm,n) =
L
k=O
CkAm,n;k(Xo,l, XJ,o, ... , Xm,n)
PARTITION POLYNOMIALS
456
and 00
A(t,u;c1,c2,···) =
tm un
00
'2:: '2:: Am,n(cxo,l,cxl,O,··· ,CXm,n)m! n! n=Om=O
~ [g(t, u)- xo o]k k = ~ Ck k! ' = exp{c[g(t, u)- xo,o]}, c
k=O where 00
g(t,u) =
=
Ck,
tm un
00
'2:: '2:: Xm,n----;1· m.n.
n=Om=O Further, show that
m+n hm,n =
2::
fkAm,n;k (Yo,l, Y1,0, · · · , Ym,n) k=O = Am,nUYo,l, fgl,O, · · · , fgm,n), Jk
=fk,
where
hm,n
=[
8m+nh(t, u)] 8 n8tm U
t=a,u=b
' Ym,n
= [8m+ng(t, u)] 8 n8tm
t=a,u=b
U
'
and
f _ [dk f(w)] k-
dwk
w=g(a,b) .
21 *. (Continuation). Compound bivariate discrete distributions. Consider a discrete distribution with probability function Pk, k = 0, 1, ... and probability generating function f( w) = ~':=o PkWk. Further, consider a bivariate discrete distribution with probability mass function Qi,j, i = 0, 1, ... , j = 0, 1, ... and probability generating function g(t, u) = ~;: 0 ~:o Qi,JtiuJ. Then the distribution with probability generating function the composite function h(t, u) = f(g(t, u)) = ~~=O ~:'=o Pm,ntmun is called compound bivariate distribution. Show that
Pm,n
=
1 -m.n. 1- 1
m+n
2:: fkAm,n;k(Qo,l,Ql,O,··· ,Qm,n)
k=O
1 - Am,nUQo,l, fql,O, · · · , fqm,n), = -m.n. 1 1
J
k-
= fk
with fk = ~:k(i)kPiQtok, and
m+n 1 M(m,n) = - 1- 1 ll(k)Am,n;k(J.t(O,l),J.t(l,O)' · · · ,J.t(m,n)) m.n. k=O
L
1
k -
= m!n!Am,n(IIJ.t(O,l),IIJ.t(l,O),··· ,IIJ.t(m,n)),v = ll(k)
11.9. EXERCISES
00
M(m,n)
457
00
00
=L
L(i)m(j)nPi,j, J.l(m,n) j=ni=m
=L
00
L(i)m(j)nQi,j·
j=n i=m
22*. (Continuation). Logarithmic biparlitional polynomials. These polynomials constitute a particular case of the bipartitional polynomials: Lm,n(Xo,I,XI,o,XI,I,··· ,xm,n) = Am,n(cxo,I,CXI,O,··· ,cxm,n), ck with
eo = 0,
=
Ck,
Ck = ( -1)k-I (k- 1)!, k = 1, 2, .... Show that 00 00 tm un L(t, u) = """' """'Lm n(Xo I, XI o, ... , Xm n) ~~ m,n, 1 1 n=Om=O m+ni"'O = log{1 + [g(t, u)- xo,o]}, I
where
I
I
I
00 00 tm un g(t,u) = L L Xm,n----;1· n=Om=O m. n.
Further, show that Lm+I,n = Xm+I,n-
~ ~ (;)
(
7)
Xi,jLm-i+I,n-j, LI,O = XI,O
i+#O
and Ym,n = Am,n(Xo,I, XI,o, · · · , Xm,n),
if and only if Xm,n = Lm,n(Yo,I, YI,O, · · · , Ym,n)·
23*. (Continuation) Cumulants and moments of bivariate distributions. Let oo tm n L J.L'm,n-,;, n=O m=O m. n. oo
M(t,u)
=L
oo tm n L 1\;m,n----;; n=O m=O m. n. oo
K(t,u)
=L
be the generating functions of the moments J.L'm n' m, n = 0, 1, ... and the cumulants ~~;m,n, m, n = 0, 1, ... , respectively, ~f a bivariate distribution. Using the relation K(t, u) =log M(t, u), show that
and conclude that
PARTITION POLYNOMIALS
458
24*. (Continuation). Potential bipartitional polynomials. These polynomials constitute a particular case of the bipartitional polynomials:
Cm,n,s(Xo,l,Xl,O,··· ,Xn,r) =Am,n(cxo,l,CXl,O,··· ,cxm,n), ck =:ck, with Ck
= (s)k, k = 0, 1, ....
Show that
00 00 tm un c.(t, u) = ""' ""'Cm n .(xo 1' X} o, ... 'Xm n)-, -, .L...t ~ ' ' ' ' ' m. n. n=Om=O = [1 + {g(t,u)- xo,o}]",
where
00 tm un L Xm,nll' m. n. n=Om=O 00
g(t,u) Also, with Cm,n,s
Cm+l,n,s
=L
= Cm,n,s(Xo,l, X1,o, ... , Xm,n),
t f (]) (7) -tf (~) (7)
=S
show that
Xi+l,jCm-i,n-j,s
J=O •=0
Xi,jCm-i+l,n-j,s, Co,o,s = 1.
J
j=Oi=O i+#O
=
25*. Symmetric functions. The symmetric functions ak,r ak,r(x 1, x2, ... ,Xn,Yl,Y2, .. · ,yn), Sk,r =: Sk,r(XI,X2, ... ,Xn,Yl,Y2, ... ,Yn), hk,r =: hk,r(x1,x2, ... ,xn,Yl,y2, ... ,yn), with respect to the variables x 1,x2, ... , Xn and with respect to the variables y 1 , y 2 , ••. , Yn, have generating functions: n n-r
=L
n
=II
L ak,rtkui (1 + xit + YiU), i=l k=O oo oo tk r n S(t, u) = L L(k + r - 1)!sk,r k! ~! = -log (1- Xit- Yiu), r=Ok=O i=l k+r;iO A(t, u)
r=O
II
oo
H(t, u)
=L
oo
L hk,rtkur r=Ok=O
n
=II (1- Xit- y;u)-
1
.
i=l
Show that (-1)k+r k!r! Ak,r(-so,l,-sl,o, ... ,-(k+r-1)!sk,r) (-l)k+r k!r! ck,r,-1 (ho,l, ht,o, ... 'k!r!hk,r ),
11.9. EXERCISES
459 (-1)k+r-1 )! Lk,r(ao,1, a1,o, ... , k!r!ak,r) 1
Sk,r = (k + r _
(k
+: _
1)! Lk,r(ho,1, h1,o, ... , k!r!hk,r)
and hk,r =
( -1)k+r k!r! Ck,r,-1 (ao,1, a1,0, · .. , k!r!ak,r) 1
= k!r!Ak,r(so,1,SI,o, ... ,(k+r-1)!sk,r).
Chapter 12 CYCLES OF PERMUTATIONS
12.1
INTRODUCTION
The permutations of a finite set of n elements may be distinguished and enumerated according to certain characteristics they may possess. Thus, in Chapter 5, the enumeration of the permutations of n with a given number of fixed points and the permutations of n of a given rank was carried out. Also, the (linear) permutations of n and the circular permutations of n with a given number of successions of points were enumerated. Further, the permutations of a finite set of n elements may be distinguished according to their decomposition into disjoint cycles. A host of interesting enumeration problems emerges from this consideration. The present chapter is devoted to the enumeration of the permutations of a finite set of n elements that are decomposed into cycles of specified or unspecified number, whose number of cycles of any specific length belongs to a subset of nonnegative integers. Specifically, after the introduction of the necessary basic notions, the permutations that are decomposed into a given number of cycles are enumerated. In particular, a combinatorial interpretation of the signless Stirling numbers of the first kind is provided. Then, the permutations are classified into even and odd, according to the number of transpositions into which they can be decomposed. The enumeration of the even and odd permutations by cycles is reduced to the preceding problem of enumeration of the permutations by cycles. Also, considering the set of possible orderings of the elements of a cycle, the cycles are distinguished by the subset of orderings allowed for their elements. The enumeration of the permutations with a given number of partially ordered cycles is carried out. It is worth noting that the problem of enumeration of the permutations of a finite set by the number of the totally ordered cycles, into which they can be decomposed, is merely a problem of enumeration of the partitions of a finite set by the number of their subsets.
462
12.2
CYCLES OF PERMUTATIONS
PERMUTATIONS WITH A GIVEN NUMBER OF CYCLES
A permutation of a finite set W n = {WI, w2, ... , Wn} of n elements, as defined in Chapter 2, is an ordered n-tuple (Wi 1 , Wi 2, ... , Win) with Wi. E W n, r = 1, 2, ... , nand wi. -::/:- wi. for r -::/:- s. Such a permutation can be equivalently considered as a rearrangement of a fixed ordering. The replacement of the fixed ordering (WI, w2, ... , Wn) by (wi,, Wi 2, ... , Win) is denoted by (12.1)
which defines the rule (mapping) O'(wr) = Wir of the replacement of the point Wr by the point Wir, r = 1, 2, ... , n. Recall that a point Wr for which Wir = Wr is called fixed point of this permutation. The columns in (12.1) corresponding to the fixed points may be omitted. Consider a subset wk = { Wi, 'Wi2' ... 'Wik} of the set Wn· The permutation (12.2)
in which the replacements 0'( wiJ = Wi 2 , 0'( Wi 2) = Wi 3 , ••• , 0' (wik_,) = wi~, O'(Wik) = wi, close a cycle is called cycle. The notation (12.2) of a cycle may be abbreviated by writing in parentheses the rule of succession of the permuted (non-fixed) points, (12.3)
The number k of elements of cycle (12.3) is called length of it. The representation (12.3) of a cycle is not unique. The k permutations
which are formed by putting as first any of the k elements and keeping the same rule of succession, correspond to (represent) the same cycle. It is conventional to write a cycle with its smallest element in the first position, making its representation (12.3) unique. Evidently, there are (n)k/k cycles of length k. A cycle of length n, which includes all the elements of the set Wn, is particularly called circular {cyclic) permutation. Thus, there are (n)n/n = (n - 1)! circular permutations of the set Wn. A transposition is a cycle of length k = 2. The number of trans.positions of the set Wn equals n(n- 1)/2. Clearly, any permutation of the set Wn is either a cycle or can be decomposed into disjoint cycles. This decomposition is unique up to a rearrangement of the cycles.
12.2. PERMUTATIONS WITH A GIVEN NUMBER OF CYCLES
463
Example 12.1 Consider the following permutation ofthe set W10 = {0, 1, ... , 9}:
0,1,2,3,4,5,6,7,8,9)· ( 2, 1,0,5,9, 7,8,6,3,4 Note that the element 1 is a fixed point of this permutation. Further, (0, 2) and (4, 9) are two cycles of length 2 and (3, 5, 7, 6, 8) is a cycle of length 5. Thus, this permutation may be expressed as a product of cycles as
(1 )(0, 2)( 4, 9) (3, 5, 7, 6, 8). The permutation
0,1,2,3,4,5,6,7,8,9) ( 3,9,5, 7,6, 1,8,2,0,4 is a cycle (cyclic permutation) (0, 3, 7, 2, 5, 1, 9, 4, 6, 8).
0
The permutations of a finite set of n elements may be distinguished according to their type of decomposition into disjoint cycles. Specifically, we introduce the following definition DEFINITION 12.1 A pennutation of a finite set Wn. ofn elements, which is decomposed into ki 2:: 0 cycles of length i, i = 1, 2, ... , n, so that ki + 2kz + · · · + nkn = n, is said to be of type [ki, kz, ... , kn]· Note that the number of different types in which then! permutations of n may be classified equals the number p( n) of partitions of n.
Example 12.2 The 24 permutationS of the Set W4 = {WI, Wz, W3, W4}, With WI < WI < W3 w4, written as products of cycles can be classified in the following types: (a) The only permutation of the type [4, 0, 0, OJ is
(b) The permutations of the type [2, 1, 0, 0] are the following six:
(wi )( wz) (w3, w4), (wt) (W3 )( Wz, W4), (wt) (w4 )( w2, w3),
(Wz )( W3 )(WI, W4), (Wz )( W4 )(WI, W3), (w3)( W4 )(WI, Wz). (c) The permutations of the type [1, 0, 1, 0] are the following eight:
<
CYCLES OF PERMUTATIONS
464
(w3)(w1, w2, w4), (w3)(w1, w4, w2), (w4)(w1, w2, w3), (w4) (w1, w3, w2). (d) The permutations of the type [0, 2, 0, OJ are the following three:
(e) The permutations of the type [0, 0, 0, 1] are the following six:
The next theorem is concerned with the enumeration of the permutations of a finite set by their decomposition into cycles. THEOREM 12.1 (a) The number ofpermutations ofa finite set ofn elements that are decomposed into k cycles, among which ki 2:: 0 are of length i, i = 1, 2, ... , n, equals (12.4)
with k1 + 2k2 + · · · + nkn = n and k1 + k2 + · · · + kn = k. (b) The number ofpermutations ofa finite set ofn elements that are decomposed into cycles, among which ki 2:: 0 are of length i, i = 1, 2, ... , n, equals (12.5)
with k1
+ 2k2 + · · · + nkn
= n.
PROOF (a) Consider a partition { A 1 , A 2 , •.. , Ak} of a finite set Wn, with N (Wn) = n, into k subsets, among which ki 2:: 0 subsets include i elements each, i = 1, 2, ... , n, where k1 + 2k2 + · · · + nkn = n and k1 + k2 + · · · + kn = k. To it there correspond
permutations of the set W n that are decomposed into k cycles, among which ki 2:: 0 are of length i, i = 1, 2, ... , n; these permutations are formed by permuting the i - 1 elements of each of the ki 2:: 0 subsets with i elements (excluding the smallest element, which, by convention, occupies the first position) in [( i - 1) !Jk• ways, i = 1, 2, ... , n. Therefore Cn,k(ki, k2, ... , kn) = [(1- 1}!]k' [(2- 1}!]k2
• • •
[(n- 1}!]k" B(n, k; k1, k2, ... , kn},
12.2. PERMUTATIONS WITH A GIVEN NUMBER OF CYCLES
465
where B(n, k; ki, k2 , ... , kn) is the number of partitions of the set Wn into k subsets, among which ki 2:: 0 subsets include i elements each, i = 1, 2, ... , n, where ki + 2k 2 + · · · + nkn = nand ki + kz + · · · + kn = k. This number, according to Theorem 2.1 0, is given by
with ki + 2kz + · · · + nkn = n, ki + kz + · · · + kn = k and so (12.4) is deduced. (b) Clearly, the summation of the numbers Cn,k(ki, k2 , ... , kn) in (12.4)for all k = 0, 1, ... , n is equivalent to keep the total number of cycles ki + k 2 + · · · + kn unspecified and so the number of permutations of a finite set of n elements that are decomposed into cycles, among which ki 2:: 0 are of length i, i = 1, 2, ... , n, is given by (12.5). I The number of permutations of a finite set of n elements that are decomposed into k cycles may be obtained by summing the numbers (12.4) for all ki 2:: 0, i = 1, 2, ... , n, with ki + 2kz + · · · + nkn = n, ki + kz + · · · + kn = k. Then, by virtue of the expression (8.24) of the signless Stirling numbers of the first kind, we deduce the following corollary of Theorem 12.1.
COROLLARY 12.1 The number ofpennutations of a finite set of n elements that are decomposed into k cycles equals
ls(n, k)l, the signless Stirling number of the first kind. REMARK 12.1 The sum of the numbers Cn,k(ki, kz, ... , kn) in (12.5) for all ki 2:: 0, i = 1, 2, ... , n, with ki + 2k 2 + · · · + nkn = n, gives the total number n!, of the permutations of a finite set of n elements. Thus, we deduce Cauchy identity:
~
1
- 1
~ ki !1 kJ kz !2k2 ... kn!nkn -
'
where the summation is extended over all integers ki 2:: 0, i = 1, 2, ... , n with ki + 2kz + · · · + nkn = n. I
Example 12.3 Restricted permutations with a given number of cycles Consider a finite set W n+r = {WI, Wz, ... , Wn+r}, with WI < Wz < · · · < Wn+r, and its subset Wr = {WI, Wz, ... , Wr}. Determine the number of permutations of the set Wn+r that are decomposed into k + r cycles such that the r elements of the set Wr belong in r distinct cycles.
CYCLES OF PERMUTATIONS
466
The k cycles of such a permutation rna y contain a total of j elements from the set Wn+r- Wr = { Wr+l, Wr+2> ... , Wn+r }, ofn elements, for j = k, k + 1, ... , n. The j elements can be chosen in (n) different ways. Further, the number of permutations of a set of j elements that are decomposed into k cycles, according to Corollary 12.1, equals the signless Stirling number of the first kind ls(j,k)l. Also, the remaining n- j elements of the set Wn+r- Wr can be placed into the r distinct cycles in (r + n- j - 1)n-j = r(r + 1) · · · (r + n- j - 1) different ways. Indeed, the first element can be placed in any of the r places between the r elements w 1, w 2, ... , Wr or after the last element. After the first element is placed, the second element can be placed in any of the r + 1 places between the r + 1 elements or after the last element. Finally, after then- j - 1 elements are placed, the last element can be placed in any of the r + n - j - 1 places between the r + n - j - 1 elements or after the last element.. Consequently, the number of permutations of the set Wn+r that are decomposed into k + r cycles, such that the r elements of the set Wr belong in r distinct cycles, is given by ls(n, k; r)l =
t (~) j=k
(r
+ n- j -
1)n-jls(j, k)l,
J
which is the non-central signless Stirling number of the first kind (see Section
s.s).
D
The multivariate generating functions of the numbers of permutations of a finite set that are decomposed into cycles of unspecified or specified number with respect to cycle-length numbers may be expressed in terms of the exponential and partial Bell partition polynomials. Thus, from Theorem 12.1, using (11.1) and (11.2), we deduce the following corollary.
COROLLARY 12.2 (a) The generating function of the sequence cn(k 1 , k 2 , ••• , kn), ki 1, 2, ... , n with k 1 + 2k 2 + · · · + nkn = n, for fixed n, is given by Cn(X], X2,
0
0
0
'Xn) =
L Cn(kl' k2,
0
0
'kn)X~ 1 X~ 2
0
0
0
0
2:
0, i
=
x~n (12.6)
= Bn(XI, 1!x2, ... , (n- 1)!xn),
where Bn is the exponential Bell partition polynomial. (b) The generating function of the sequence Cn,k(kl, k2, ... , kn). ki 2: 0, i = 1, 2, ... , n with k 1 + 2k2 + · · · + nkn = nand k1 + k2 + · · · + kn = k, for fixed n and k, is given by Cn,k(Xl' X2, .. 'Xn) 0
=
L Cn,k(ki. k2,
0
..
'kn)x~· X~ 2
0
= Bn,k(XI, l!x2, ... , (n- 1)!xn),
where Bn,k is the partial Bell partition polynomial.
..
x~n (12.7)
12.2. PERMUTATIONS WITH A GIVEN NUMBER OF CYCLES 467
Further, using the generating functions of the Bell and the partial Bell partition polynomials (11.6) and (11.9), we deduce the following corollary.
COROLLARY 12.3 (a) The generating function of the sequence Cn(k1, k2, ... , kn), ki 1, 2, ... , n, with k1 + 2k2 + · · · + nkn = n, n = 0, 1, ... , is given by
~ 0,
i =
(12.8)
(b) The generating function of the sequence Cn,k(ki, k2, ... , kn), ki ~ 0, i = 1, 2, ... , n, with k1 + 2k2 + · · · + nkn = n and k1 + k2 + · · · + kn = k, k = 0, 1, ... , n, n = 0, 1, ... , is given by
(12.9)
Example 12.4 Let Cn (k; r) be the number of permutations of the set Wn for which their decomposition into cycles includes, among other cycles, k cycles of length r. Determine a generating function for the sequencecn(k; r), k = 0, 1, ... , [n/r], n = 0, 1, ... , and, expanding it, deduce an explicit expression for these numbers. The number cn(k; r) is given by the sum
=
=
where kr k and the summation is extended over all ki ~ 0, i 1, 2, ... , n, i -:f. r with L:~=I,i# iki = n- rk. Consequently, from (12.8), with xi = 1, i = 1, 2, ... , i -:f. r, and Xr = x, we get the bivariate generating function
Loo [n/r] L cn(k; r)xk 1n.tn = exp { (x- 1)-trr + log(1- t)-
n=O k=O
= ( 1 - t)- 1 exp { ( x - 1)
~} .
1
}
468
CYCLES OF PERMUTATIONS
Expanding it into powers oft,
oo
[n/r]
tn
L L Cn(k; r)xk 1n. =
n=O k=O
1)i}
- oo {[n/r] (x-
-I: I: ., n=O
j=O
j
n
t,
J.T
we deduce the generating function [njr]
[njr] (x _
L Cn(k;r)xk = n! L k=O
}=0
)j
1
"!ri
.
J
Further, expanding it into powers of x, [njr]
L
k=O
[njr] cn(k; r)xk =
n!
j
L L(
j=O
[njr]
~
k
.
-1)}-k
(~) ~ri J
k=O
n! { [njr] ( -1)j-k } k!
~
(j-k)!ri
k
x'
we conclude for cn(k; r) the expression n! [njr] ( -1)1-k (j- k)!ri.
Cn(k; r) = k!
L
J=k
Note that cn(k; 1) = Dn,k is the number of permutations of the set Wn that have k fixed points (see Section 5.2). 0
12.3
EVEN AND ODD PERMUTATIONS
As previously noted, any permutation of a finite set W n is either a cycle or can be decomposed into disjoint cycles; this decomposition is unique up to a rearrangement of the cycles. Further, each cycle can be generated by successive transpositions. Indeed, a cycle (wi) of length 1 (fixed point) can be generated as (wi) = (wi,w1 )(w1 ,wi), i =f. j, while a cycle (w;,, Wi 2 , ••• , w;k-t, wik) of length k 2': 2 can be generated by k - 1 successive transpositions as
12.3. EVEN AND ODD PERMUTATIONS
469
Consequently, any permutation of a finite set Wn can be decomposed into transpositions. But while the decomposition of a permutation into disjoint cycles is unique up to a rearrangement of the cycles, its decomposition into transpositions, among which two or more have elements in common, may be done in different ways. Nevertheless, in these different decompositions of a permutation, the number of transpositions is either even or odd. This fact is used for the following discrimination of the permutations. DEFINITION 12.2 A permutation of a finite set W n• of n elements, is called even if it can be decomposed into an even number of transpositions, while is called odd if it can be decomposed into an odd number of transpositions.
The enumeration of the even and odd permutations is facilitated by the following characteristic property. LEMMA 12.1 A permutation of a finite set W n• of n elements, is even or odd if and only if, in its decomposition into cycles, the number of cycles of even length is even or odd, respectively. PROOF Consider a permutation of a finite set Wn, of n elements, that is decomposed into k cycles. Assume that its decomposition includes r cycles of even lengths, ii, h, ... , Jr. and k- r cycles of odd lengths, ir+l, ir+2• ... , ik· Since each cycle of length j 8 can be decomposed into j 8 - 1 transpositions, this permutation can be decomposed into r
k
n- k
k
= L(j•- 1) = :~::::>• + •=l
L
(j. -1)- r
•=l
transpositions. Note that the summands j 8 , s = 1, 2, ... , r and j 8 - 1, s = r + 1, r + 2, ... , kin the sums of the right-hand member are even numbers and so the sum r
k
s=l
s=r+l
L:J. + L:
(j.- 1)
is always an even number. Consequently, the number n - k of transpositions into which the considered permutation can be decomposed is even or odd if and only if the number r of cycles of even length is even or odd, respectively. I Let us denote by an,k (k1, k2, ... , kn) and bn,k ( k1, k2, ... , kn) the number of even and odd permutations of the type [k1 , k2, ... , knJ, respectively, so that k1 +2k2+· · ·+nkn =nand k1 +k2 +· · ·+kn = k, with k2+k4+· · ·+k2m
CYCLES OF PERMUTATIONS
470
an even and odd number, respectively, where m
= [n/2].
Clearly,
(12.10) and bn,k(kl,k2,•··,kn)=
1- ( -1Y
2
Cn,k(kl,k2,···,kn),
(12.11)
where r = k 2 +k4+· · ·+k2m, m = [n/2]. Utilizing these expressions, generating functions for the numbers an,k(kl, k2, ... , kn) and bn,k(k 1, k2, ... , kn) may be deduced from the corresponding generating functions for the numberscn,k(k1,k2,··· ,kn)·
COROLLARY 12.4 (a) The generating function of the sequence an,k(k1, k2, ... , kn), k; ~ 0, i = 1, 2, ... , n, with k1 + 2k2 + · · · + nkn =nand k1 + k2 + · · · + kn = k, for fixed n and k, is given by '"' k2 ~ an,k (k 1, k 2, ... , k n ) x kt 1 x2
· ··
Xnkn
1 = 2Bn,k(x1, 1!x2, ... , (n- 1)!xn)
+~Bn,k(X1,-1!x2,···
,(-1)n- 1(n-1)!xn),
(12.12)
where Bn,k is the partial Bell partition polynomial. (b) The generating function of the sequence an,k ( k1, k2, ... , kn), k; ~ 0, i = 1, 2, ... , n, with k1 + 2k2 + · · · + nkn =nand k1 + k2 + · · · + kn = k, k = 0, 1, ... ,n, n = 0, 1, ... , is given by
(12.13)
PROOF (a) The required generating function, using (12.12) and since r k2 + k4 + · · · + k 2m, m = [n/2], may be expressed as
L an,k (k1, k2, ... , kn)X~ x~ 1
2
• • •
x~n
1 '"' k2 ... Xn kn = 2 ~ Cn,k (k 1' k 2' ... ' k n ) X2ki X2
+~ LCn,k(k1,k2,··· ,kn)(-1)k,+k•+···+k 2 mx~ 1 X~ 2 ···X~n.
=
12.4. PERMUTATIONS WITH PARTIALLY ORDERED CYCLES 471
Then, by virtue of (12. 7), (12.12) is deduced. (b) Multiplying (12.12) by uktn jn! and summing for k = 0, 1, ... , n, n = 0, 1, ... , upon using the generating function (11.6) of the partial Bell partition I polynomials, (12.13) is readily obtained.
Example 12.5 Find the number an,k of even permutations of a finite set Wn of n elements that are decomposed into k cycles. Clearly, setting Xi = 1, i = 1, 2, ... in (12.13), a bivariate generating function of the sequence an,k. k = 0, 1, ... , n, n = 0, 1, ... , is obtained as
L Ln an,kuk tnn! = 21 exp[u log(1- t)oo
1
n=Dk=O
1 ]
+
2 exp[u log(1 + t)]
1( )-u +-1+t. 1( )u =-1-t
2
2
Thus, according to (8.14) and (8.5), it follows that 1 an,k = 2ls(n, k)l
1
+ 2s(n, k)
=
1+(-1)n-k ls(n, k)l, 2
where is(n, k)l is the signless Stirling number of the first kind.
12.4
D
PERMUTATIONS WITH PARTIALLY ORDERED CYCLES
In the preceding enumeration of permutations, cycles are distinguished only by their length. In Theorem 12.1, the number Cn,k(k1,k2, ... ,kn) of permutations of a finite set Wn, of n elements, that are decomposed into k cycles, among which ki 2: 0 are of length i, i = 1, 2, ... , n, has been deduced from the number B(n, k; k 1 , k2 , ..• , kn) of partitions of the set Wn into k subsets, among which ki 2: 0 include i elements, i = 1, 2, ... , n. In that case (i- 1)! permutations were formed from any subset of i elements by permuting the i - 1 elements (excluding the smallest element which, by convention, occupies the first position). It is possible to go further by considering the set of possible orderings of the elements within the cycles. Then the cycles may also be distinguished by the subset of orderings allowed for their elements. Only orderings independent of the particular elements of any cycle are considered. Note that, in the extreme case of (totally) ordered cycles with all their elements in a specific order, for example from the smallest to the largest, only one cycle of length i is formed from a
CYCLES OF PERMUTATIONS
472
subset of i elements. In the enumeration of permutations by the number of partially ordered cycles, the number ai of cycles of length i that are formed from a subset of i elements, where 1 :::; ai :::; (i - 1)!, i = 1, 2, ... , n, is needed. Then, Theorem 12.1 is readily extended as follows. THEOREM 12.2 (a) The number ofpermutations ofa finite set ofn elements that are decomposed into k partially ordered cycles, among which ki 2: 0 are of length i and ai cycles are formed from any subset ofi elements, i = 1, 2, ... , n, equals
with k1 + 2k2 + · · · + nkn = n and k1 + k2 + · · · + kn = k. (b) The number ofpermutations ofa finite set ofn elements that are decomposed into partially ordered cycles, among which ki 2: 0 are of length i and ai cycles are formed from any subset ofi elements, i = 1, 2, ... , n, equals
with k1
+ 2k2 + · · · + nkn = n.
PROOF (a) Consider a partition {A 1 ,A 2 , ... ,Ak} of finite set Wn, with N (Wn) = n, into k subsets, among which ki 2: 0 subsets inc! ude i elements each, i = 1,2, ... ,n,wherek1 +2kz+···+nkn = nandk 1 +k2 +···+kn = k. Toit there correspond a~ 1 a~ 2 • • • a~n, permutations of the set Wn that are decomposed into k partially ordered cycles, among which ki 2: 0 are of length i and ai cycles are formed from each subset of i elements, i = 1, 2, ... , n; these permutations are formed by permuting the i - 1 elements of each of the ki 2: 0 subsets with i elements (excluding the smallest element, which, by convention, occupies the first position) in all a~; permissible ways, fori = 1, 2, ... , n. Therefore
where B(n, k; k 1, k2 , .•• , kn) is the number of partitions of the set Wn into k subsets, among which ki 2: 0 subsets include i elements each, i = 1, 2, ... , n, where k 1 + 2k2 + · · · + nkn =nand k 1 + k2 + · · · + kn = k. Thus, introducing into it the expression of B(n, k; k 1, k2 , .•. , kn). (12.14) is obtained. (b) Clearly, the summation of the numbers (12.14) for all k = 0, 1, ... , n is equivalent to keep the total number of cycles k 1 + k2 + · · · + kn unspecified and
12.4. PERMUTATIONS WITH PARTIALLY ORDERED CYCLES 473
so the number of permutations of a finite set of n elements that are decomposed into cycles, among which ki ~ 0 are of length i, i = 1, 2, ... , n, is given by o2.1s).
I
The number of permutations of a finite set of n elements that are decomposed into k partially ordered cycles may be obtained by summing the numbers (12.14) for all ki ~ 0, i = 1, 2, ... , n with k 1 + 2k2 + · · · + nkn = n and k1 + k2 + · · · + kn = k. Also, the number of permutations of a finite set of n elements that are decomposed into partially ordered cycles may be obtained by summing the numbers (12.15) for all ki ~ 0, i = 1, 2, ... , n with k1 + 2k2 + · · · + nkn = n. These sums, according to Definitions 11.1 and 11.2, are the partial and the exponential Bell partition polynomials. Thus the following corollary is deduced. COROLLARY 12.5 (a) The number ofpennutations of a finite set of n elements that are decomposed into k partially ordered cycles, such that ai cycles are fanned from each subset of i elements, equals the partial Bell partition polynomial. (b) The total number of pennutations of a finite set of n elements that are decomposed into partially ordered cycles, such that ai cycles are fanned from each subset ofi elements, equals
the exponential Bell partition polynomial.
Further, using the generating functions of the Bell and the partial Bell partition polynomials (11.6) and (11.9), we deduce the following corollary. COROLLARY 12.6 (a) The generating function of the sequence Cn(kt, k2, ... , kn; a1, a2, ... , an). ki ~ 0, i = 1, 2, ... , n, with k 1 + 2k2 + · · · + nkn = n, n = 0, 1, ... , is given by
(12.16)
(b) The generating function of the sequence Cn,k(kt, k2, ... , kn; a1, a2, ... , an). ki ~ 0, i = 1, 2, ... , n, with k1 + 2k2 + · · · nkn = n, k1 + k2 + · · · + kn = k,
474
CYCLES OF PERMUTATIONS
k = 0, 1, ... , n, n = 0, 1, ... is given by
00
= exp
(
F)
u ~ arXr r!
. (12.17)
Example 12.6
Find the number Cn,k of permutations of a finite set W n of n elements that are decomposed into k totally ordered cycles. Clearly, according to the first part of Corollary 12.5, setting ai = 1, i = 1, 2, ... and using expression ( 11. 2), the number Cn,k is obtained as
where the summation is extended over all nonnegative integer solutions (k 1 , k2 , ... , kn) of the equations kt + 2k2 + · · · + nkn =nand kt + k2 + · · · + kn = k. Thus, by virtue of (8.25), Cn,k = S(n, k), where S(n, k) is the Stirling number of the second kind. Further, the total number of permutations of a finite set W n of n elements that are decomposed into totally ordered cycles is given by n
En= LS(n,k) k=l
the Bell number. Note that the numbers of permutations of a finite set Wn that are decomposed into a specified or unspecified number of totally ordered cycles coincide with the corresponding numbers of partitions of Wn into a specified or unspecified number of subsets (see Exercises 2.43 and 2.46). This is a consequence of the one-to-one and onto correspondence between the sets of the above permutations and partitions of Wn. 0 Example 12.7 Restricted permutations with a given number of or-
dered cycles Consider a finite set Wn+r = {Wt, w2, ... , Wn+r }, with Wt < w2 < · · · < Wn+r• and its subset Wr = {w 1 , w2, ... , Wr}. Determine the number of permutations of the set W n+r that are decomposed into k + r ordered cycles, such that the r elements of the set Wr belong in r distinct cycles. Note first that the required number equals the number of partitions of the set Wn+r into k + r subsets, such that the r elements of the set Wr belong in r
12.4. PERMUTATIONS WITH PARTIALLY ORDERED CYCLES 475
distinct subsets, since each permutation of a finite set that is decomposed into ordered cycles uniquely corresponds to a partition of this set into subsets. Further, the k subsets of such a partition may contain a total of j elements from the set Wn+r- Wr = {wr+l, Wr+2, ... , Wn+r }, ofn elements, for j = k, k + 1, ... , n. The j elements can be chosen in (n) different ways. Also, the number of partitions of a set of j elements into k su6sets equals the Stirling number of the second kind S(j, k) (see Example 12.6), while the remaining n- j elements of the set Wn+r - Wr can be distributed into the r distinct subsets in rn-j different ways. Consequently, the number of partitions of the set Wn+r into k + r subsets, such that the r elements of the set Wr belong in r distinct subsets, is given by
S(n, k; r)
=
t
j=k
(~)rn-j S(j, k), J
which is the non-central Stirling number of the second kind (see Section 8.5). D The next theorem is concerned with the more general problem of enumeration of permutations of a finite set by partially ordered cycles, where in a specified number of cycles the orderings belong in a given subset and in the other cycles the orderings belong to another given subset.
THEOREM 12.3 (a) The number of permutations of a .finite set Wn ofn elements that are decomposed (i) into k partially ordered cycles, with elements from a set U ~ W n• such that k; :2: 0 are of length i and a; cycles are formed from any subset of i elements, i = 1, 2, ... , n, and (ii) into other partially ordered cycles, with elements from the set Wn- U, such that r; :2: 0 are of length i and b; cycles are formed from any subset ofi elements, i = 1, 2, ... , n, equals Cn,k(ki, r1, k2, r2, ... , kn, rn; a1, b1, a2, b2, ... , anbn) nlak1bT1ak2br2,, ·aknbTn '1122 nn kl!rl!(l!)kl+rlk2!r2!(2!)k2+r2. ··kn!rn!(n!)kn+rn'
(12.18)
with L~=I i(k; + ri) = nand L~=l ki = k. (b) The number ofpermutations ofa .finite set W n ofn elements that are decomposed (i) into k partially ordered cycles, with elements from a set U ~ W n. such that a; cycles are formed from any subset ofi elements, i = 1, 2, ... , n, and (ii) into other partially ordered cycles, with elements from the set Wn- U, such that bicycles are formed from any subset ofi elements, i = 1, 2, ... , n, equals
the Touchard polynomial.
476
CYCLES OF PERMUTATIONS
PROOF (a) Consider a partition { A 1, A2, ... , Ak, B1, B 2, ... } of a finite set W n, of n elements, where { A1, A2, ... , Ak} is a partition of a set U ~ W n into k subsets, among which ki ~ 0 include i elements each, i = 1, 2, ... , n, and { B 1, B 2, ... } is a partition of the set W n - U into subsets among which ri ~ 0 include i elements each, i = 1, 2, ... , n, so that I:~= I i(ki + ri) = nand L:~ 1 ki = k. To it there correspond a~ 1 b~ 1 a~ 2 b~ 2 · · ·a~"b~", permutations of the set Wn of n elements that are decomposed (i) into k partially ordered cycles, with elements from the set U ~ Wn. such that ki ~ 0 are of length i and ai cycles are formed from any subset of i elements, i = 1, 2, ... , n, and (ii) into other partially ordered cycles, with elements from the set Wn - U, such that ri ~ 0 are of length i and bi cycles are formed from any subset of i elements, i = 1, 2, ... , n. Specifically, these permutations are formed by permuting the elements of each of the ki ~ 0 and each of the Ti ~ 0 subsets with i elements in all af; and W permissible ways fori = 1, 2, ... , n, respectively. Therefore
Cn,k(kl, r1, k2, r2, ... , kn, rn; a1, b1, a2, ~ •... , an, bn) -_ alk1br1 1 a2k2br2 2 ... ank,.br"B( n n, k·' k I,TI, k 2,r2,···' k n,Tn,. a1, b1, a2, b2, ... , an, bn), with B(n,k;kl,r1,k2,r2,··· ,kn,rn;al,bl,a2,b2,··· ,an,bn) the number of partitions {A1, A 2, ... , Ak, B 1, B 2, ... } of a finite set W n of n elements; { A1, A 2, ... , Ak} is a partition of a set U ~ Wn into k subsets, among which ki ~ 0 include i elements each, i = 1, 2, ... , n, and { B 1, B 2, ... } is a partition of the set Wn - U into subsets among which Ti ~ 0 include i elements each, i = 1, 2, ... , n, so that L:~ 1 i(ki + ri) = n and L:~ 1 ki = k. Clearly, this number is given by
B(n, k; k1, r1, k2, r2, ... , kn, rn; a1, b1, a2, ~ •... , an, bn) n!
with L:~ 1 i(ki + ri) = n, L:~=l ki = k and so (12.18) is deduced. (b) The number of permutations of a finite set Wn of n elements that are decomposed (i) into k partially ordered cycles, with elements from the set U ~ Wn, such that ai cycles are formed from any subset of i elements, i = 1, 2, ... , n, and (ii) into other partially ordered cycles, with elements from a set Wn- U, such that bi cycles are formed from any subset of i elements, i = 1, 2, ... , n, is obtained bysummingthenumbers(12.18)fora11ki ~ Oandallri ~ O,i = 1,2, ... ,n, with L:~ 1 i(ki + ri) = nand L:~ 1 ki = k. According to the Definition 11.6, I this sum is the Touchard polynomial and so the proof is completed. Further, using the generating function of the Touchard polynomial (11.50), we deduce the following corollary.
12.4. PERMUTATIONS WITH PARTIALLY ORDERED CYCLES 477
COROLLARY 12.7 The generating function of the sequence Cn,k Cn,k(kl, r1, k2, r2, ... , kn, rn; a!,b!,a2,b2,··. ,an,bn), for ki ~ 0, ri ~ 0, i = 1,2, ... ,n, with I:~= I i(ki + ri) = n, I:~=I ki = k, n = k, k + 1, ... , and for fixed k, is given by
=
(12.19)
Example 12.8 Find the number R( n, k) of permutations of a finite set W n of n elements that are decomposed into k (non-ordered) cycles, with elements from a set U ~ W n and into other (totally) ordered cycles, with elements from the set Wn- U. A generating function for the sequence R( n, k ), n = k, k + 1, ... , for fixed k, may be obtained from (12.19) by setting am = (m- 1)!, bm = 1 and Xm = 1, Ym = 1, m = 1, 2, .... Then
~ R( ~
n,
k)tn = [-log(1- t)]k ( t - 1) k' exp e . n.1 .
n=k Expanding the right-hand member into powers oft, using the generating function of the signless Stirling numbers of the first kind ls(n, k) 1.
~I( k)ltn=[-log(1-t)jk ~
n=k
s n,
k'
n.1
.
and the generating function of the Bell numbers Bn =
,
I:Z=o S (n, k ),
we get
L R(n, k) 1tnn. (L ls(n, k)l 1n.tn) (L Br:"jti) 00
00
00
n=k
j=O
=
n=k
=
f {t (~)
n=k Therefore
R(n, k) =
J=O
:t (~) j=O
J
ls(n-
J.
j,k)IBi}
J
ls(n- j, k)IBi.
~-
D
CYCLES OF PERMUTATIONS
478
12.5
BIBLIOGRAPHIC NOTES
A systematic and complete study of the theory of enumeration of permutations by cycles is provided by the elegant paper of Jacques Touchard (1939). In this study several partition polynomials are examined. The Touchard partition polynomials, which were briefly presented in Chapter 11, were so named in recognition of his fundamental contribution to this subject. Credit for its illuminating introduction to the theory of enumeration of permutations by cycles belongs to J. Riordan (1958). Examples 12.3 and 12.7 on the enumeration of restricted permutations by cycles are based on the paper of A. Z. Broder (1984).
12.6
EXERCISES
1. Show that the number of permutations of n that are decomposed into k cycles of length no smaller than 2 is given by
is2(n,k)l
= "f)-1) 1 (~)is(n-j,k-j)l, J
j=O
where ls(n, k)l is the signless Stirling number of the first kind. The number is2(n, k)l is the signless associated Stirling number of the first kind (see Exercise 8.10). 2. (Continuation) Show that the number of permutations of n that are decomposed into k cycles of length no smaller than r is given by signless r-associated Stirling number of the first kind lsr(n, k)l for which
isr+l (n, k)l
="f) -1)1(~):j isr(n- rj, k- j)l, i=O
r
= 1, 2, ... ,
J.r
with ls 1 (n, k)l = is(n, k)l the signless Stirling number of the first kind (see Exercise 8.11). 3. Let cn(k; r) be the number of permutations of a finite set Wn for which their decomposition into cycles includes, among other cycles, k cycles of length r. Show that the generating function [n/r]
Cn(x;r)
=L
k=O
en(k;r)xk
12.6. EXERCISES
479
satisfies the recurrence relation
Cn(x; r)- nCn-1 (x; r) = c5n,rj
n!(x- 1)i j!ri '
and conclude that n!( -1)j-k Cn(k; r)- nCn-1 (k; r) = c5n,rj k!(j _ k)!ri, where c5n,rj = 1 for n = rj and c5n,rj = 0 for n -:j; rj is the Kronecker delta. 4. (Continuation) Assume that a permutation is randomly chosen from the set of the n! permutations of a finite set of n elements. The probability that its decomposition into cycles includes, among other cycles, k cycles of length r is given by
. ) _ Cn(k;r) Pk (n,r , k = 0, 1, ... , [n/r]. n.1 Show that its factorial moments [n/r]
J.L(j)(n;r) = L(k)jPk(n;r), j = 1,2, ... ,[n/r] k=j are given by
/-l(j) (n; r)
= r-j,
j
= 1, 2, ... , [n/r].
5. Let dn(k;r) be the number of permutations of a finite set Wn that are decomposed into k cycles none of which is of length r. Show that the generating function
[njr] Dn(x;r) = L dn(k;r)xk k=O
satisfies the recurrence relation
Dn+I(x;r) = (n + x)Dn(x;r)- x(n)r-1Dn-r+1(x;r) + x(n)rDn-r(x;r), for n = r, r + 1, ... and Dn(x; r) = (x + n- 1)n, for n = 0, 1, ... , r- 1. Further, conclude the recurrence relation
dn+I (k; r) = ndn(k; r)
+ dn(k-
1; r)- (n)r-1dn-r+1 (k- 1; r)
+(n)rdn-r(k - 1; r), fork= 1,2, ... ,n+ 1, n = r,r+ 1, ... , and dn(k;r) = ls(n,k)l, fork= 0, 1, ... , n, n = 0, 1, ... , r- 1.
CYCLES OF PERMUTATIONS
480
6. (Continuation) Let dn(r) be the number of permutations of the set Wn that are decomposed into cycles none of which is of length r. Show that [nfr) (- 1)j dn(r) = n! ""' -.-. , 1 L J.rJ J=O
and
dn(r) - ndn-l (r) where 6n,rj
= 1 for n = rj
and 6n,rj
= 6n ,rj
n!(-1)1 .1 . , J.rJ
= 0 for n "I rj is the Kronecker delta.
7. Let Q(n; k, r) be the number of permutations of a finite set Wn for which their decomposition into cycles includes, among other cycles, k cycles of length 1 and r cycles of length 2 and consider the generating function [n/2]
Qn(x, y)
=
n-2r
L L
Q(n; k, r)xkyr, n
= 1, 2, ....
r=O k=O Show that
tn
oo
L Qn(x, y)---,n. = (1 -
t)- 1 exp((x- 1)t + (y- 1)t2 /2]
n=O
and conclude that
8. (Continuation) Show that oo
(1- t)
tn
L Qn+l(x,y)---,n. n=O oo
tn
n=O
n.
= {1 + (x- 1)(1- t) + (y- 1)(1- t)t} L Qn(x, y)---, and conclude the recurrence relation
Qn+l (x, y) = (n
+ x)Qn(x, y) + n(y- x)Qn-l (x, y) +n(n- 1)(1- x)Qn-z(x, y),
for n = 2, 3, ... , with initial conditions Q0 (x, y) Qz(x, y) = x 2 + y.
= 1,
Q 1 (x, y)
=x
and
481
12.6. EXERCISES
9. Cayley identity. Show that
~ ~
( -1)k1+k2+···+kn
k 1·1 ' k1 k 2!2 k2
••
·kn!n kn = 0, n = 2, 3, ... '
where the summation is extended over all integers ki ~ 0, i = 1, 2, ... , n, with kt +2k2 +· · ·+nkn = n, and conclude that the number of permutations that are decomposed into an odd number of cycles equals the number of permutations that are decomposed into an even number of cycles. 10. (Continuation) Show that
where the summation is extended over all integers ki ~ 0, i = 1, 2, ... , n, with k1 + 2k 2 + · · · + nkn = n. Note that, in particular for x = 1, it reduces to the Cauchy identity (see Remark 12.1), while for x = -1, it reduces to the Cayley identity. 11. Let an,k and bn,k be the numbers of even and odd permutations, respectively, of a finite set Wn that are decomposed into k cycles and consider the generating functions n
n
An(u) = ~ an,kUk, Bn(u) = ~ bn,kUk, n = 1, 2, .... k=O k=O
Show that
and conclude that nAn+2(u) = (2n + 1)uAnH(u) + (n + 1)(n 2
-
u 2 )An(u), n = 1, 2, ... ,
-
u 2 )Bn(u), n = 1, 2, ... ,
with A 1 (u) = u, A 2 (u) = u 2 and nBn+2(u) = (2n + 1)uBn+l(u) + (n + 1)(n 2
with Bt(u) = 0, B 2 (u) = u. 12. Let 9n,k and hn,k be the numbers of even and odd permutations, respectively, of a finite set Wn that are decomposed into k cycles of length no smaller than 2 and consider the generating functions n
Gn(u)=L9n,kUk, k=O
n
Hn(u)=Lhn,kUk, n=0,1, .... k=O
CYCLES OF PERMUTATIONS
482
Show that
and
= nHn(u) + nuHn-1 (u), Hn+l (u) = nGn(u) + nuGn_I(u),
Gn+l (u)
= 1, 2, ... n = 1, 2, ...
n
, .
Deduce the recurrence relations
Gn+4(u)
= (n + 2)(n + 3)Gn+2(u) + (n + 3)(2n + 3)uGn+I (u) +(n
for n
= 0, 1, ... , with G0 (u) = 1, GI(u) = 0, G2(u) = 0, G3(u) = 2u and Hn+4(u) = (n
for n
+ 1)(n + 3)u 2Gn(u),
+ 2)(n + 3)Hn+2(u) + (n + 3)(2n + 3)uHn+l(u) +(n + 1)(n + 3)u 2 Hn(u),
= 0, 1, ... , with
H0 (u)
= 0,
HI(u)
= 0,
H 2(u)
= u,
H3(u)
= 0.
13. (Continuation) (a) Show that
where
an,k
=
1 + (-1)n-k 2
ls(n, k)l, bn,k
=
1
( 1)n-k 2
ls(n, k)l
are the numbers of even and odd permutations, respectively, of a finite set of n elements that are decomposed into k cycles. (b) Setting n
Gn
=L
n
gn,k, Hn
k=O
=L
hn,k, n
= 0, 1, ...
'
k=O
show that
Gn
= nGn-1 + (-l)n Hn
[1-
(~)],
= nHn-1 + (-1)n(~),
n
n
= 2,3, ... ,
= 2,3, ... ,
H1
G1
= 0,
=0
483
12.6. EXERCISES
and Gn
+ Hn = Dn,
Gn - Hn
= (-l)n-l (n-
1), n
= 1, 2, ...
,
where Dn is the number of derangements of a finite set of n elements (see Section 5.2). 14. Let b(n, k) be the number of permutations of a finite set of n elements that are decomposed into k odd (of even length) cycles and n
bn(u)
=L
b(n, k)uk, n
= 0, 1, ....
k=O
Show that
and conclude that bn(2u)
=
(2r)!(u {
and b(n,k) =
+ r-
r!
0,
1)r
,n n
= 2r,
= 0, 1, ...
.
= 2r + 1, r = 0, 1, ...
,
r
'n:
(2r)!ls(r, k)l r!2k 2r, r : 0, 1, ... ' { 0, n- 2r + 1, r- 0, 1, ... ,
where ls(r, k)l is the signless Stirling number of the first kind. 15. (Continuation) Let a(n, k) be the number of permutations of a finite set of n elements that are decomposed into k even (of odd length) cycles and n
an(u)
=L
a(n, k)uk, n
= 0, 1, ....
k=O
Show that
and conclude that
and [n/2] k
a(n, k) =
L ?=< -l)n+k-i ~~:r ls(n- 2r, k- j)l·ls(r,j)l. r=O J=O
484
CYCLES OF PERMUTATIONS
16. (Continuation) Derive the recurrence relation
an+2(u) = uan+l(u)
+ n(n + 1)an(u),
n = 0, 1, ... ,
with a0 (u), a 1 (u) = u, and ~r+2(u)
= (2r + 1)(2r + u)b2r(u), r = 0, 1, ... ,
with b0 ( u) = 1. Deduce the particular expressions
and
17. (Continuation) Let a( n) and b( n) be the numbers of permutations of a finite set of n elements that are decomposed into even (of odd length) and into odd (of even length) cycles, respectively. (a) Derive the recurrence relations a(n + 2) = a(n + 1) + n(n + 1)a(n), n = 0, 1, ... , with a(O) = 1, a(1) = 1, and
b(n+2)=(n+1) 2b(n), n=0,1, ... , with b(O) = 1, b(1) = 0. (b) Show that
b(2r)=
[~~;~!r,
b(2r+1)=0, r=0,1, ...
and
a(2r)=
[~~;~!r, a(2r+1)=(2r+1)[~~;~!r,
r=0,1, ....
18. A universal generating function. Let A= (ai,j), i = 1,2, ... , j = 0, 1, ... be an infinite matrix with elements ai,J = 0 or 1 and c(n, k; A) be the number of permutations of a finite set Wn, of n elements, that are decomposed into k cycles such that the number of cycles of length i belongs to the set {j : ai,J = 1}. Show that
G(t,u;A)
oo n tn = LLc(n,k;A)uk nl
n=O k=O
00
=IT i=l
00
[
ui Lai,j1 j=O
J
(ti)j] i ·
485
12.6. EXERCISES
19. Let cn(r) be the number of permutations of n that are decomposed into cycles none of which is of length longer than r. Show that
2: cn(r) In. = exp 2:-:-ti) 00
tn
(
n=O
r
i=l
t
and conclude the recurrence relation r-1
Cn+l(r)
= 2:(n)JCn-J(r). j=O
20. Let T(n, k) be the number of permutations of n that are decomposed into cycles among which k are of length 2 and the other n- 2k are of length 1 (fixed· points). Show that the generating function [n/2)
Tn(x)
= 2: T(n, k)xk k=O
satisfies the recurrence relation Tn(x)
= Tn-!(x) + (n- 1)xTn-2(x),
with T 0 (x) = 1, T 1 (x) rence relation T(n, k)
= 1 and
n
= 2,3, ... ,
deduce for the numbers T(n, k) the recur-
= T(n- 1, k) + (n- 1)T(n- 2, k- 1),
for n = 2k, 2k+ 1, ... , k n < 2k.
= 1, 2, ... , with T(O, 0) = T(1, 1) = 1, T(n, k) = 0,
Chapter 13 EQUIVALENCE CLASSES
13.1
INTRODUCTION
The enumeration of the number of k-combinations of a finite set Wn = {w 1 , w 2 , ... , wn}, of n elements, is usually carried out in two stages. Specifically, ifCk(Wn) and Pk(Wn) are the sets of k-combinations and k-permutations of Wn, respectively, then, at the first stage, to each k-combination Ak = { a 1, a2, ... , ak} that belongs to Ck(Wn) we uniquely correspond the set of its permutations Pk(Ak), which is a subset of Pk(Wn)· Note that Pk(Ak) and Pk(Bk) are disjoint sets for Ak and Bk different k-combinations from Ck(Wn) and also that each k-permutation from Pk(Wn) belongs in one of the sets Pk(Ak), Ak E Ck(Wn)· Thus, the set {Pk(Ak) ~ Pk(Wn) : Ak E Ck(Wn)} constitutes a partition of the set Pk(Wn)· Further, according to the definition of a permutation, N(Pk(Ak)) = N(Pk(Wk)) for every Ak E Ck(Wn) and so, by the addition principle,
AkECk(Wn)
At the second stage we enumerate the number P(n, k) = N(Pk(Wn)) of k-permutations of the set Wn and conclude the number P(k) P(k, k) = N(Pk(Wk)). Then the number C(n, k) = N(Ck(Wn)), of k-combinations of the set Wn, is obtained as C(n, k) = P(n, k)/ P(k). This technique has been employed for the derivation of this number in Theorem 2.5. Note that the sets Pk(Ak), Ak E Ck(Wn) constitute equivalence classes of the k-permutations that belong to the set Pk(Wn)· The equivalence relation is defined as follows: A permutation (a 1, a 2 , .•• , ak) that belongs to Pk(Wn) is equivalent to a permutation (b 1 , b2 , •.• , bk) that also belongs to Pk (Wn) if there exists a permutation (it, h, ... , jk) of the set of the k indices { 1, 2, ... , k} such that a 8 = b3,, s = 1, 2, ... , k. In other words, two k-permutations of Wn are equivalent if they contain the same k elements. Thus, the enumeration of the number of k-combinations of a finite set of n
=
488
EQUIVALENCE CLASSES
elements is merely a problem of enumeration of the equivalence classes into which the k-permutations of the finite set of n elements are distributed. This chapter is devoted to the study of the general problem of enumerating equivalent classes of a finite set with respect to a group of its permutations. After a brief presentation of groups of permutations and their cycle indicator, we proceed to the enumeration of the orbits (equivalence classes) of the elements of a finite set, under a group of permutations of it. In this respect Burnside's lemma is shown. The study is then focused on the enumeration of models of colorings of the elements of a finite set, under a group of permutations of it; P6lya's fundamental counting theorem is derived.
13.2
CYCLE INDICATOR OF A PERMUTATION GROUP
Consider a finite set Wn = { w1 , w2 , ... , wn}, of n elements, and let Pn = Pn(Wn) be the set of its n! permutations. To each pair of permutations in Pn
there corresponds the permutation aT in P n defined by
which is called their product. If
is another permutation in Pn, then
and
Thus, the product of permutations is associative, (ap)p = a(Tp). Further, the identity permutation
13.2. CYCLE INDICATOR OF A PERMUTATION GROUP
489
is the neutral element for the product, ca = ac = a. Also, for every permutation a in Pn, there exists its inverse permutation in Pn, a-1
= (wi,,wi2, ...
,win)
WI, W2, ... ,Wn
so that aa- 1 = a- 1 a = €. Consequently, the set Pn of permutations of Wn equipped with the operation of multiplication constitutes a group called symmetric group of permutations. This group is of order N(Pn) = n! and degree N(Wn) = n. Let us consider a subset 9n of permutations of Wn that is closed under the operation of multiplication. This set, as a subset of the finite group Pn, is a subgroup and is called group of permutations of Wn. Further, consider a permutation a in 9n, the decomposition of which into disjoint cycles includes ki = ki(a) ~ 0 cycles of length i, i = 1, 2, ... , n, so that k1 (a) + 2k2(a) + · · · + nkn (a) = n. Let us attach the indicator Xi to any cycle of length i, i = 1, 2, ... , n. Then the homogeneous product x~,(u) x~ 2 (u) · · · x~n (u), of degree k1 (a) + k2 (a) + · · · + kn (a) = k( a), is the cycle indicator of the permutation a and the sum C(x1,x, ... ,xn; 9n)N(9n) =
L
X~ 1 ( 17 )X~ 2 (u} · · ·x~n(u),
(13.1)
uE9n
where the summation is extended over all permutations a in 9n, is the cycle indicator of the permutations contained in the group 9n· The polynomial C(x 1 , x 2 , ... , x; 9n) is called cycle indicator of the group of permutation 9n· Introducing the number c( k 1, k 2 , ••• , kn; 9n) of permutations contained in 9n, for which the decomposition into cycles includes ki ~ 0 cycles of length i, i = 1, 2, ... , n, so that k 1 + 2k2 + · · · + nkn = n, the cycle indicator may be written as
where the summation is extended over all partitions of n, that is, over all nonnegative integer solutions (k~, k2, ... , kn) of the equation k 1 + 2k 2 + · · · + nkn = n. In the following examples several specific groups of permutations of a finite set are considered and their cycle indicators are calculated. Example 13.1 Identity group of permutations The identity permutation c = (wi)(w 2 ) · · · (wn) of the set Wn = {w 1,w2 , ... , Wn} is clearly a group. Since this permutation includes n cycles of length 1, the cycle indicator of the identity group {€}, according to ( 13.1 ), is given by
C(xi,X2,··· ,xn;{€}) = xf.
D
EQUIVALENCE CLASSES
490
Example 13.2 Symmetric group of permutations The number of permutations that are contained in the symmetric group of permutations Yn = P n and are decomposed into ki 2: 0 cycles of length i, i = 1, 2, ... , n, with k 1 + 2k2 + · · · + nkn = n, is given by (see Theorem 12.1)
Hence, the cycle indicator of the symmetric group of permutations, according to (13.2) and since N(Pn) = n!, is given by
where the summation is extended over all partitions of n, that is over all nonnegative integer solutions ( kt, k2, ... , kn) of the equation k 1 + 2k2 + · · · + nkn = n. This polynomial, using (ll.l ), may be expressed as
where Bn(x1 , x 2 , ... , xn) is the exponential Bell partition polynomial.
0
Example 13.3 Alternating group of permutations Consider the set An C Pn of even permutations (which can be decomposed into an even number of transpositions) of the set W n. Note that the product of two even permutations a = ti, ti 2 • • • ti 2 m and T = t j 1 t h · · · t h·, where ti, , ti 2 , ••• , th,. and tit, tj 2 , • • • , tj 2 , are transpositions of elements of Wn, is also at:l even permutation aT = ti, ti 2 • • • ti 2 m tit ti2 · · · t32 •. Therefore, the set An is closed under multiplication and, as a subset of the finite symmetric group of permutations Pn, is a subgroup called alternating group of permutations. Further, the number of permutations that are contained in the alternating group of permutations Yn = An and are decomposed into ki 2: 0 cycles of length i, i = 1, 2, ... , n, with k, + 2k2 + · · · + nkn = n, is given by
where r = k2 + k 4 + · · · + k2m, m = [n/2]. Then, the cycle indicator of the alternating group of permutations, by (13.2) and since N(An) = n!/2, is given by
1 C(x,, x2, ... , xn; An) = 1Bn(xd!x2, ... , (n- 1)!xn) n.
+~Bn(Xt,-1!x2,··· n. where Bn(x 1 , x 2 ,
•.• ,
,(-1)n- 1 (n-l)!xn),
xn) is the exponential Bell partition polynomial.
0
13.2. CYCLE INDICATOR OF A PERMUTATION GROUP
491
Example 13.4 Cyclic group of permutations
Consider a permutation a of the symmetric group P n of permutations of the set W n· The powers of a arerecursivelydefined by the relations ai =a ai-l, j = 2, 3, ... , a 0 = c and a-i = (a- 1 )i, j = 2, 3, ... , with a- 1 the inverse permutation of a. Since the symmetric group of permutations Pn has a finite number of elements, N(Pn) = n!, it follows that there exists a positive integer r such that ar = c because, otherwise, Pn would have an infinite number of elements. The smallest positive integer r with this property is called the order of the permutation a. In this case, the r powers aj = ai, j = 1, 2, ... , r are all different because, if we assume that ai = ai for 1 ::; i < j ::; r, then ai-i = c for 1 ::; j - i < r, which contradicts the hypothesis that r is the smallest positive integer with this property. Also, any positive, zero or negative power ak of a coincides with one of the r different powers a j = ai, j = 1, 2, ... , r, since the integer k can be written in the form k = sr + j, with 0 ::; j < r, whence ak = asr+j = (ar)sai = cai = ai. The set 9n,r = { c, a, a 2 , ••• , ar-l }, whose elements are powers of a permutation a of order r, is closed under multiplication and, as a subset of the finite symmetric group of permutations P n• is a subgroup called cyclic group of permutations generated by the permutation a. Note that, for j = 1, 2, ... , rand d the greatest common divisor of j and r, the permutations aj = ai and ad= ad, which belong to the same cyclic group of permutations 9n,r• generate the same cyclic subgroup of permutations 9n,r 1d of order rId. The orbit of a point w of the set W n under a permutationaoforderristheset{w,a(w),a 2 (w), ... ,ar-l(w)} ~ Wn,where the length r is the smallest positive integer that satisfies the relation ar (w) = w. The cycle indicator of the cyclic group of permutations 9n,r is determined as follows: let d be a divisor of rand Hn,rld = {aj E 9n,r : d the greatest common divisor of j and r} = {a i E 9n,r : j I d a positive integer relatively prime to r ld}. Then, if sis a divisor of r different from d, the sets Hn,rls and Hn,rld are disjoint. Also, every permutation a j = ai, which belongs to the cyclic group of permutations 9n,r, is contained in one of the sets Hn,r ld and specifically in the set for which j I dis relatively prime to rId. Therefore the sets Hn,r ld for all divisors d of r constitute a partition of the cyclic group of permutations 9n,r. 9n,r
= LHn,rld· dlr
Note that the permutation ad = ad clearly belongs to the set Hn,rld· Further, for every other permutation ai = ai that belongs to Hn,rld• dis the greatest common divisor of j and r, whence the permutations aj and ad generate the same cyclic subgroup of permutations 9n,rld of order rid. Hence, the orbit of a point w of the set Wn under a permutation ai that belongs to Hn,rld is {w, ai (w), aJ( w), ... , a;ld-l (w)}, with length rl d. Consequently, the permutation aj is decomposed into d cycles, each of length rl d. The number N(Hn,rld), of permutations that belong to the set Hn,r 1d· which is the number of positive integers less than or equal and relatively prime to rId, is equal to the Euler's function
EQUIVALENCE CLASSES
492
¢(r/d) (see Example 4.4). Thus, by (13.1) and since N(Qn,r) = r, the cycle indicator of the cyclic group of permutations 9n,r is given by
D Example 13.5 Let us consider the set W6 = {1, 2, 3, 4, 5, 6} of the six faces of a cube. Its faces are numbered so that {1, 6}, {2, 5} and {3, 4} are non-ordered pairs of opposite faces. Let 96 be the group of permutations of W6 that are induced by rotations of the cube around its axes of symmetry. Determine the cycle indicator of the group
96·
The group 96 contains the following permutations written in the form of product of cycles: (a) The identity permutation
(1)(2)(3)(4)(5)(6). (b) The permutations induced by 1r /2, 1r and 3n /2 rotations of the cube around the axes connecting the centers of opposite faces in the counterclockwise direction:
(1)(2, 4, 5, 3)(6), (1)(2, 5)(3, 4)(6), (1)(2, 3, 5, 4)(6), (1, 3, 6, 4)(2)(5), (1, 6)(2)(3, 4)(5), (1, 4, 6, 3)(2)(5), (1, 5, 6, 2)(3)(4), (1, 6)(2, 5)(3)(4), (1, 2, 6, 5)(3)(4). (c) The permutations induced by 1r rotations of the cube around the axes connecting opposite edges in the counterclockwise direction:
(1, 2)(3, 4)(5, 6), (1, 3)(2, 5)(4, 6), (1, 4)(2, 5)(3, 6), (1, 5)(2, 6)(3, 4), (1, 6)(2, 3)( 4, 5), (1, 6)(2, 4)(3, 5). (d) The permutations induced by 3n /2 rotations of the cube around the axes connecting opposite vertices in the counterclockwise direction:
(1, 2, 3)(4, 5, 6), (1, 2, 4)(3, 6, 5), (1, 3, 2)(4, 5, 6), (1, 3, 5)(2, 6, 4), (1, 4, 2)(3, 5, 6), (1, 4, 5)(2, 6, 3), (1, 5, 3)(2, 4, 6), (1, 5, 4)(2, 3, 6). Consequently, the cycle indicator of the group 96 , according to (13.2) and since N (Q 6 ) = 24, is given by
493
13.3. ORBITS OF ELEMENTS OF A FINITE SET
13.3
ORBITS OF ELEMENTS OF A FINITE SET
Consider a group 9n ~ Pn, of permutations of a finite set Wn = {w 1 , w2 , ... , wn} and two elements u and w from Wn. If there exists a permutation T belonging to 9n such that r(w) = u, then the element u is said to be equivalent to the element w under the group 9n; this is denoted by u w. Clearly, this relation is (a) reflexive: u u, (b) symmetric: u w implies w u and (c) transitive: u v and v w imply u w, and so it is an equivalence relation.
=
=
= =
=
=
=
DEFINITION 13.I The set Tw = {u E Wn : r(w) = u, r E 9n}, w E Wn, which contains the elements of W n equivalent to w, constitutes an equivalence class that is called orbit of the element w under 9nNote that, for any two different elements u and w of Wn, the equivalence classes Tu and Tw either coincide (when the two elements u and w are equivalent under the group 9n) or are disjoint. Thus, the set T = {Tw,,, Tw, 2 , ••• , Tw,k }, of the different orbits of the elements of Wn under the group 9n, constitutes a partition of Wn.
DEFINITION 13.2 The set Sw = {a- E 9n : u(w) = w}, w E Wn, which contains the permutations of 9n that keep the element w fixed and is a subgroup ofQn is called stabilizer ofw. For each subgroup Sw of the group 9n and for each permutation T belonging to 9n, the left coset is defined by rSw = {TO" : u E Sw} and the right coset by SwT ={o-r: u E Sw}- Clearly, N(rSw) = N(Swr) = N(Sw)Further, for any two different permutations p and T that belong to 9n, the left cosets pSw and rSw (as well as the right cosets Swp and Swr) either coincide or are disjoint. Hence, the set {rj,Sw,Tj 2 Sw,- .. ,TJrSw} of distinct left cosets (as well as the set {Sw Tj 1 , Sw Tj 2 , ••• , Sw TJr } of distinct right cosets) constitutes a partition of 9nWe are now prepared to prove a theorem concerning the number of elements of the orbit of an arbitrary element of a finite set under a group of permutations of it.
THEOREM 13.1 The number N(Tw), of elements of the orbitTw of an element w of a finite set Wn,
EQUIVALENCE CLASSES
494
under a group gn of permutations ofWn, is given by (13.3)
where Sw is the stabilizer of the element w. PROOF Let u and v be two elements of the orbit Tw of w, under gn· Then, there existtwo permutationsT andp that belong to gn such that T(w) = u andp(w) = v. Further, u = v if and only if p(w) = T(w) or, equivalently, T-I (p(w)) = w. The last relation is equivalent to a = T-Ip being in the stabilizer Sw of w, which in turn is equivalent top= Ta being in the left coset TSw. Note that the permutation T belongs to the left coset TSw, since T = Tc and the identity permutation c belongs to the stabilizer Sw. Hence, u = v if and only if the permutations T and p belong to the same left coset TSw. As a consequence, there exist a one-to-one and onto correspondence of the orbit Tw to the set of the left co sets of the stabilizer Sw in which the element u, with T( w) = u, corresponds to the left coset TSw. Therefore, the number N(Tw) of elements of the orbit Tw equals the number of the left cosets of the stabilizer Sw. Since, the set of the left co sets of Sw constitutes a partition of gn and N(TSw) = N(Sw) for every left coset TSw of Sw, according to the addition principle, it follows that
N(gn) = N(Tw)N(Sw), from which (13.3) is deduced.
I
The next theorem, which is concerned with the number of orbits of the elements of a finite set, under a group of permutations of it, is due to W. S. Burnside.
THEOREM 13.2 The number of orbits of the elements of a finite set Wn, under a group gn of permutations of it, is given by 1
N(T)
= N(Qn)
L
(13.4)
k1 (a),
uE!/n
where k 1 (a) is the number of cycles Q/ length 1 of a permutation a. PROOF The number k 1 (a) of cycles of length 1 of a permutation a and the number N(Su) of the elements of the stabilizer Su of an element u of the set Wn, on using Kronecker's delta function, J(u, v) = 0 for u =/: v and J(u, u) = 1, may be expressed as
k1 (a) =
L
J(u, a(u)), N(Su) =
L
J(u, a(u)).
13.3. ORBITS OF ELEMENTS OF A FINITE SET
495
Thus
2:
k1(a) =
2: 2:
J(u,a(u)) =
2: 2: J(u,a(u)) = 2:
N(Su)
and, utilizing the fact that the set T of the different orbits of the elements of Wn under a group 9n constitutes a partition of Wn, we get the expression
2: k1(a) = 2: 2:
N(Su)·
Tw ET uETw
uEIJn
Further, the orbit Tu of every element u E Tw coincides with the orbit Tw and, according to (13.3), it follows that
N(Qn) N(Qn) N(Su) = N(Tu) = N(Tw) = N(Sw)· Hence
2:
N(Su)
= N(Tw)N(Sw) = N(Qn)
uETw
and
The last expression implies ( 13.4 ).
I
Example 13.6 The alternating subgroup A 4 of the group P 4 of permutations of the set W 4 = { 1, 2, 3, 4} contains the following permutations: (1)(2)(3)(4), (1, 2, 3)(4), (1, 2,4)(3), (1, 3, 2)(4), (1, 3, 4)(2), (1,4, 2)(3), (1, 4, 3)(2), (1)(2, 3, 4), (1)(2, 4, 3), (1, 2)(3, 4), (1, 3)(2, 4), (1, 4)(2, 3). The orbits of the elements of the set W 4 , under the group A 4 , are
and the stabilizers of the elements of w4 are
s1
= {(1)(2)(3)(4),(1)(2,3,4),(1)(2,4,3)},
s2 = {(1)(2)(3)(4), (1, 3, 4)(2), (1, 4, 3)(2)},
s3 = {(1)(2)(3)(4),(1,2,4)(3),(1,4,2)(3)}, s4 = {(1)(2)(3)(4),(1,2,3)(4),(1,3,2)(4)}.
EQUIVALENCE CLASSES
496
Note that N(A 4 ) = 12, N(Si) = 3, i = 1, 2, 3, 4 and N(Ti) in agreement with Theorem 13.1. Also, N(T) = 1 and 1
- ( A) N
4
LA
uE
kl ((J) •
= 4, i = 1, 2, 3, 4,
1
= -12 (4 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1) = 1,
a result that agrees with Theorem 13.2.
D
Example 13.7 Models of coloring the faces of a cube Calculate the number of models of coloring the six faces of a cube with six different colors, each face with a different color, when two colorings are considered to be of the same model if they can be transformed to each other by rotation of the cube. Any coloring of the six faces of a cube with six different colors, each face with a different color, constitutes a permutation w, = (c, 1 , c52 , ••• , C86 ) of the set C = {c 1 , c2 , ... , c6 } of the six colors, where Cs; is the color of the i-th face, i = 1, 2, ... , 6. Hence, the set W720 of colorings contains 6! = 720 elements. Let 972o be the group of permutations of the set W720 that are induced by rotations of the corresponding colored cube around the axes of symmetry. Also, let 11. 6 be the group of permutations of the set :F6 = { 1, 2, ... , 6}, of the six faces of the cube, which are induced by rotations of the cube around the axes of symmetry. To the permutation O" E 972 0 , in which the coloring W 8 = (c 81 , c52 , ••• , c56 ) is replaced by the coloring 0"( W 8 ) = (csr 1 , C 8 • 2 , •• • , C 8 • 6 ), W 8 E W72o, we correspond the permutation T E 11. 6, in which the face i is replaced by the face T(i) = ri, i = 1, 2, ... '6. For example, the identity permutation c = (wl)(w2) · · · (w 720 ) E W720 , in which the coloring W 8 = (csu c 82 , . . • , c 56 ) is replaced by the same coloring c(ws) = w. = (cspCs, ... ,c.6), Ws E w720· we correspond the identity permutation c = (1)(2) · · · (6) E 11. 6 , in which the face i is replaced by the same face c(i) = i, i = 1, 2, ... , 6. The permutation O" E 9 720 , in which the coloring W 8 = (C51 , c52 , C 83 , C54 , C85 , C86 ) is replaced by the coloring O"( W 8 ) = (Cs 1 , c, 3 , Cs 4 , Cs 5 , Cs 2 , C 86 ), we correspond the permutation T = (1 )(2, 3, 4, 5)(6) E 1/. 6 , in which T(1) = 1, T(2) = 3, T(3) = 4, T(4) = 5, T(5) = 2 and T(6) = 6. This correspondence of the group of permutations 9 720 to the group of permutations 11. 6 is one-to-one and onto and so N(9720 ) = N(1i6)· Further, according to the analysis of Example 13.5, N(9720 ) = 24 permutations, the identity permutation c = (wl) (w 2 ) · · · ( w72 0 ) E W720 retains fixed the k1 (c) = 720 elements of W720 . Also, none of the other 23 pennutations retains fixed any of the elements ofW720 , kl(O") = 0, since no cube whose six faces are colored with six different colors, each face with a different color, is left fixed by rotations around any of the axes of symmetry. The required number of models of colorings is equal to the number N (T) of orbits of the elements of W 720 , under the group of permutations
13.3. ORBITS OF ELEMENTS OF A FINITE SET
Q72 0 ,
497
which, according to Theorem 13.2, equals
N(T) =
720 = 30. 24
D
A simplified expression for the number of orbits of the elements of a finite set, under a cyclic group of permutations of it, is deduced in the following corollary of Theorem 13.2. COROLLARY 13.1 The number of orbits of the elements of a finite set Wn, under a cyclic group 9n,r ofpennutations of it, is given by (13.5)
where k 1 (ud) is the number of cycles of length 1 of a pennutation ud and cjJ(r /d) is Euler's function.
PROOF Consider a divisor d of the order r of the cyclic group of permutations 9n,r = {c, u, u 2, ... , ur-l} and let 1in,rfd = {ui E 9n,r: jfdapositive integer relatively prime tor/ d}. Then, if sis a divisor of r different from d, the sets 1in,rfs and 1in,rf dare disjoint. Also, every permutation u 1 that belongs to the cyclic group of permutations 9n,r is contained in one of the sets 1in,rfd and, specifically, in the set for which j /dis relatively prime tor/ d. Therefore, the sets 1in,rfd for all divisors d of r constitute a partition of the cyclic group of permutations 9n,r• 9n,r
=L
1in,rfd•
dlr
and, since N(Qn,r)
= r, expression (13.4) may be written as
Note that the permutation ud is contained in the set 1in,rfd and, for any other permutation u 1 contained in 1in,rfd• dis the greatest common divisor of j and r. Then, the permutations ui and ud generate the same cyclic subgroup of permutations 9n,rfd of order r / d and so there exist positive integers m and s such that ui = udm and ud = ui 8 • Thus, if an element w of Wn is left fixed by the permutation ui, ui ( w) = w, then
498
EQUIVALENCE CLASSES
and w is also left fixed by ud and inversely. Consequently, k 1 (ui) every permutation ui contained in 1-ln,rfd and so
= k(ud)
for
1""
N(T) =-;: ~ k1(u d )N(Hn,rjd)· dlr
Since the number N(1in,rjd) of permutations that belong to the set 1-ln,rfd• which is the number of positive integers less than or equal and relatively prime to r / d, is equal to Euler's function¢( rId) (see Example 4.4), the required expression ( 13.5) is established. I
Example 13.8 Models of necklaces Calculate the number K r,s of models of necklaces with r beads of s different colors when two necklaces are considered to be of the same model if they can be transformed to each other by rotation. Let Wn = { w 1 , w 2 , ... , wn} be the set of necklaces and consider a permutation u1 of the n necklaces that rotates each necklace by 2nj lr degrees in the counterclockwise direction, j = 1, 2, ... , r. Then, with u 1 = u, we have u1 = ui, j = 1, 2, ... , r, ur = c, and the set 9n,r = {c, u, u 2, ... , ur-l} constitutes a cyclic subgroup of permutations of Wn of order r generated by u. Since a permutation ud, with d a divisor of r, rotates any necklace by 2ndlr degrees, and as a result, any d consecutive beads are moved to the positions of the next d consecutive beads, a necklace is left invariant, under ud, if and only if any of the rId blocks of d consecutive beads has the same color arrangement. In other words, a model of necklaces is completely determined once the color of d consecutive beads is specified and so k1(ud) = sd. Hence, according to (13.5), the number Kr,s = N(T) of models of necklaces is given by 1 Krs=, r
L.: c/>(rjd)s. d
dlr
When the number r of the beads is a prime, this expression reduces to
Krs= (r-1)s+sr , r Note that the number Kr,s equals the number of cyclic r-permutations of the s colors with repetition. Using Table 4.1 of Euler's function, we get the following few values of the number Kr,s:
K
_s(s+l) 2,s -
2
K
,
_s(s 2 +2) 3,s -
4
3
,
K
_s(s 3 +s+2) 4,s -
4
_ s(s 5 + s 2 + 2s + 2) ' 6 5 3 6 7 _ s(s + s + 2s + 4) K _ s(s + 6) K 7,s, 8,s· 7 8
K
_ s(s
5,s-
+ 4) ,
'
K
6,s-
0
13.4. MODELS OF COLORINGS OF A FINITE SET
499
13.4 MODELS OF COLORINGS OF A FINITE SET Consider a group Yn ~ Pn of permutations of a finite set Wn = { w 1 , w2 , ... ,wn} and a finite set of colors Zr = {zJ,Zz, ... ,zr}· The notion of coloring the elements of the set Wn is introduced in the next definition. DEFINITION 13.3 A function f defined on the set Wn and taking values from the set Zr is called a coloring (of the elements) of the set Wn with colors from the set Zr, in which an element Wi ofWn is painted with color f(wi)from Zr, i = 1,2, ... ,n.
Note that a coloring f of the set Wn, with f(wi) = Zs;, i = 1, 2, ... , n, constitutes an n-permutation (z 81 , Z 82 , ••• , Zsn) of the set Zr with repetition. Thus, the set :F of the functions f from Wn to Zr, called set of colorings of the set Wn with colors from the set Zr, contains N (:F) = rn functions (colorings). Further, iff is a coloring that belongs to :F and a is a permutation that belongs to Pn, then /(u) is also a coloring that belongs to :F, in which the element Wi is painted with color f(u(wi)). Let f and g be two colorings that belong to :F. If there exists a permutation u that belongs to the group Yn such that f(u) = g, the coloring g is called equivalent to the coloring f, under the group Yn, and is denoted by g f. Clearly, this relation is (a) reflexive: f (b) symmetric: g f implies f g and (c) transitive: g h and h f imply g f and so it is an equivalence relation. Using this equivalence relation, the notion of a model of colorings is introduced in the following definition.
=
=
=/, =
=
=
=
DEFINITION 13.4 The set Mt = {g E :F : /(u) = g, u E Yn}, f E :F, which contains the colorings in :F that are equivalent to a coloring f, under the group Yn, is called model off, with respect to the group Yn·
Note that, for any two different colorings f and g in :F, the models Mt and M 9 either coincide (when the colorings f and g are equivalent under Yn) or are disjoint. Thus the set M.r = {M!t,Mfo,··· ,M,k} of the different models of colorings, under the group Yn, constitutes a partition of :F. As regards the number of models of coloring the elements of a finite set, we first prove the following theorem. THEOREM 13.3 Let :F be the set of colorings (of the elements) of a finite set W n with colors from afinitesetZr. ThenthenumberNn(ii,iz, ... ,jr) ofmodelsinM.r, underthe
EQUIVALENCE CLASSES
500
group 9n of permutations of Wn, in which j. with color Zs from Zr, s = 1, 2, ... , r, with }1
2': 0 elements of Wn are painted
+ }2 + · · · + Jr = n, is given by
Nn(}I,}2, ... ,jr)
= N(~) n
Lc(kl,k2,··· ,kn;9n)Nn(jl,}2, ... ,jr;kl,k2,··· ,kn), (13.6)
where the summation is extended over all nonnegative integer solutions (kt, k2, ... , kn) ofthe equation k1 + 2k2 + · · · + nkn = n, c(kt, k2, ... , kn; 9n) is the number of permutations of the type [k1, k2, ... , kn] that belong to the group 9n and N n (}1, h, ... , Jr; k1, k2, ... , kn) is the number of colorings in F for which j. 2': 0 elements of Wn are painted with color Z 8 from Zr, 8 = 1, 2, ... , rand are constant on every cycle of the permutations of the type (k1, k2, . . . , kn] that belong to the group 9n· PROOF Let F)I ,12, ... ,j, ~ F be the set of colorings in which is 2': 0 elements of Wn are painted with color z 8 from Zr for 8 = 1, 2, ... , r and let P(F)I,h, ... ,j,) be the symmetric group of permutations of F)I,J,, ... ,j,· A subgroup ofP(F3d 2 , ... ,j,) can be constructed as follows. Consider a permutation a in 9n and let a- be a mapping of Fj 1 ,j 2 , ... ,j, into itself defined by a-(!) = f(a-). If !I "I h then !I (a-) "I h (a"), a-(ft) "I rr(ft) and so a- is a one-to-one mapping of F)I ,12, ... ,j, onto itself. Also, since the set Fj 1 ,)2, ... ,J, is finite, jj is a permutation that belongs to the set P(Fh ,12, ... ,j, ). The set Q of all permutations a- for a in 9n. which is a subset of P(F)I ,h, ... ,j, ), is closed, with respect to the multiplication of permutations. Indeed, if a- and f belong to Q and p = rrf, then rr(f) = f(a), f(/) = f(r) and p(!) = a(f(/)) = a-(f(r)) = f(r(a)) = f(p), with p = ar a permutation in 9n. whence p = rrf belongs to Q. Since Q is a subset of the symmetric group of permutations P(Fh ,h, ... ,j.). it is a subgroup of it. Further, the correspondence of the permutation a- in Q to the permutation a in 9n is one-to-one since, for a "IT, f(a) ::p f(r) and so a-(!) "If(/), whence jj ::p f and inversely. Clearly, this is a correspondence of Qonto 9n and so N(Q) = N(Qn)· Let f be any coloring in ;:31 ,)2, ... ,J, and consider its orbit T 1 , under the group Q, and its model Mj, under the group 9n· Then, T 1 = {g E F)l,J2, ... ,j. : rr(/) = g, rr E Q} = {g E Fj,j 2 , ... ,)r : f(a) = g, a E 9n} = M 1 and so the number N n (it, h, ... , Jr) of models in M.r, under the group 9n. equals the number N(T), of orbits of the elements of F)I,]2, ... ,Jr• under the group Q. Thus, according to Theorem 13.2 and since N(Q) = N(Qn). we deduce the expression
where k 1 (a-) is the number of colorings in F)I ,)2, ... ,j, which are kept fixed by the permutation a-. Introducing the set Sit ,h, ... ,i. (a) = {! E Fil ,h. ... ,ir : f (a) =
13.4. MODELS OF COLORINGS OF A FINITE SET
501
!} for a in gn and using Kronecker's delta function, 6(!, g) = 0 for f =/: g and 6(!, f) = 1, the sum in the right-hand side of the last expression may be written as
6(!, a-(f))
=I: and so (13.7)
Further, note that, if w; is an element of Wn and {w;,a(w;),a 2(w;), ... , am- 1 (w;)}, with am(w;) = w;, is its orbit, under the permutation a, then for any coloring fin s)J,h, ... ,j.(a) it holds f(ai(w;)) = f(a(ai-l(w;))) = f(ai- 1 (w;)) f(w;),j 1,2, ... ,m-1. Hence,everycoloringfin SjJ,) 2 , .•. ,Jr (a) is constant on every cycle of the permutation a (painting with the color f(w;) = Zs; the elements of the cycle of the permutation a in which w; is contained). Inversely, every coloring fin :Fh ,)2, ... ,j. (a) that is constant on every cycle of the permutation a belongs to Sh ,)2, ... ,Jr (a) since every element w; ofWn is contained in a cycle of a in which the element a(w;) of Wn is also contained and so f(w;) = f(a(w;)). Consequently, the number N(S)J,j,, ... ,1.(a)) equals the number of colorings in :Fh ,)2, ... ,Jr (a) that are constant on every cycle of the permutation a. Partitioning the group gn, according to the permutations type,
=··· =
=
where the summation is extended over all nonnegative integer solutions ( k 1 , k2, ... , kn) of the equation k1 + 2k2 + · · · + nkn = n and gn[k 1 ,k2 , .•. ,kn] includes all the permutations of the type [k1 , k 2, ... , kn] that belong to the group gn, we deduce from (13.7) the required expression (13.6). I The expression (13.6) of the number Nn(it, h, ... , ir) of models in MF, under the group gn of permutations of Wn, in which j 8 2:: 0 elements of Wn are painted with color Zs from Zr, s = 1, 2, ... , r, with j1 + h + · · · + ir = n, is unwieldy. A multivariate generating function of sequence of these numbers, which in general constitutes a powerful tool, is more manageable. In order to construct such a generating function let us assign to each element Z 8 of the set of colors Zr = { z 1 , z2, ... , Zr} its weight w( Z 8 ), s = 1, 2, ... , r. The weight of a coloring f that belongs to :F, denoted by W (f), is defined by W(f) = w(f(wt))w(f(w2)) · · · w(f(wn)).
EQUIVALENCE CLASSES
502
When in this coloring is 2: 0 elements of Wn are painted with the color z 8 , s = 1, 2, ... , r, its weight takes the form W(f)
= [w(z!)Jl' [w(z2)]i2 · · · [w(zr)Ji·.
The multivariate generating function of the numbers Nn(j1,i2, ... ,ir), is 2: 0, s = 1, 2, ... , r, with i1 + i2 + · · · + ir = n, is expressed in terms of the corresponding cycle indicator in the following P6lya counting theorem.
THEOREM 13.4 The multivariate generating function of the numbers Nn(jl, h, ... ,ir) of models in M.r, under the group gn of permutations ofWn, in which is 2: 0 elements of Wn are painted with color Zsfrom Zr, s = 1, 2, ... , r, with it+ i2 + · · · + ir = n, is given by (13.8) where r
Xj = Xj(t1,t2, . .. ,tr) = Lt~, i = 1,2, ...
,n,
(13.9)
s=l
and C(x1, x2, ... , Xn; Qn) is the cycle indicator of the group gn of permutations ofWn. PROOF Expression (13.6), of the numbers Nn(it,h, ... ,ir). is 2: 0, s = 1, 2, ... , r, with it + i2 + · · · + ir = n, suggests first deriving the generating function
9k,,k2, ... ,kn(tl,t2, ... ,tr)
= LNn(it,h, ...
,jr;k1,k2, ... ,kn)t{'t~
2
"·#.",
in terms of which the required generating function may easily be expressed. Thus, consider a permutation a of the type [k 1 , k 2 , ... , kn] that belongs to the group gn of permutations of W n. The set { A1, A2, . . . , Ak} of the subsets of W n that contain the elements of the k 1 + k 2 + · · · + kn = k cycles of the permutation a constitutes a partition of Wn and so, setting n; = N(A;), i = 1, 2, ... , k, we have n 1 + n 2 + · · · + nk = n. Let S(a) be the subset of colorings fin :F that are constant on any cycle of the permutation a, painting with the color f(ai) = Zs; then; elements of the set A; in which a; belongs, i = 1, 2, ... , k. Note that a coloring fin S(a) is completely determined by then-permutation u E Un(Zr), of the set of colors Zr = {z 1 , z 2, ... , Zr} with repetition, in which the color Zs; appears n; times, fori = 1, 2, ... , k, with n 1 + n 2 + · · · + nk = n. Introducing the weights of the colors by w( Zs) = ts, s = 1, 2, ... , r, the generating function 9k 1 ,k 2,... ,kn (it, t2, ... , tr) is expressed as 9kt,k2, ... ,kn(lt,t2, ... ,tr) =
L /ES(rr)
W(f)
13.40 MODELS OF COLORINGS OF A FINITE SET
503
and since
L
L L
=
W(f)
/ES(CT)
w(f(wl))w(f(w 2)) 000w(f(wn))
fES(CT)
=
[w(f(a 1 ))tt [w(f(a 2 ))]n2
o
o
0
[w(f(ak))]nk
/ES(CT)
L
[w(zst)jnt [w(zs2)]n2 000[w(zsk)]nk
uEUk(Zr)
= (t[w(z.)]nt)
(t[w(zs)]n2) ooo (t[w(z.)]nk) ,
it reduces to
Note that ki ;::: 0 among the exponents n 1 , n 2 , 000 , nk are equal to i, fori 1, 2, 000 , n, with k 1 + 2k2 + 000+ nkn = n, and so
Now, multiplying both members of expression (1306) by t{ 1 ~2 000t{r and summing for j. = 0, 1, 000, s = 1, 2, 000 , r, with }I + h + 000+ ir = n, we get ~ ~
N n (}1, }2' 000 'Jr )tttth tJr 1 2 000 r o
o
•
1 = N(Qn) Lc(k1,k2,ooo ,kn;9n)Yk 1 ,k 2,... ,k,.(tl,t2,ooo ,tr),
where in the second sum the summation is extended over all partitions of n, that is, over all nonnegative integer solutions (k1, k2, 000 , kn) ofthe equation k1 + 2k2 + 000+nkn = no Introducing into it the last expression of Yk 1 ,k 2 , ... ,k,. (t1, t2, oo0 , tr) and using the cycle indicator ( 1302) of the group of permutations 9n. we deduce (13o8)o I The total number of models of coloring the elements of a finite set may be deduced from (1308) by setting t 8 = 1, s = 1, 2, 000 , r, whence Xj = r, j = 1, 2, 000 , no This number is given in the following corollary of Theorem 13.40 COROLLARY 13.2 Let F be the set of colorings (of the elements) of a .finite set Wn with colors from a .finite set Zro Then the number N(MF) of models of F. under the group 9n of
504
EQUIVALENCE CLASSES
permutations ofWn, is given by N(My) = C(r, r, ... , r; 9n),
(13.10)
where C(x1, x2, ... , xn; 9n) is the cycle indicator ofthe group 9nofpermutations ofWn. Example 13.9 Combinations with restricted repetition The number of n-combinations of r with restricted repetition may be derived, by an application of Theorem 13 .4, as follows. Consider the sets En ( Zr) and Un ( Zr) of n-combinations and n-permutations of the set Zr = {z 1 , z 2 , ... , Zr} with repetition, respectively. Let us correspond to each combination Xn = {z 81 ,Z 82 , ••• ,Zsn} that belongs to En(Zr) the set of its permutations Pn(Xn), which is a subset of Un(Zr)· Note that Pn(Xn) and Pn(Yn) are disjoint sets for Xn and Yn different combinations from En(Zr) and also that each permutation from Un ( Zr) belongs in one of the sets P n (Xn), Xn E En(Zr)· Thus, the set {Pn(Xn) ~ Un(Zr) : Xn E En(Zr)} constitutes a partition of the set Un(Zr). Further, each permutation (z 81 , Z82 , ••• , Zsn) that belongs to Un ( Zr) completely determines a coloring f of the elements of the set Wn = {w1, w2, ... , wn} with colors from the set Zr = {z1, Z2, ... , Zr }, in which the element Wi oHV'n is painted with the color f( wi) = zs., i = 1, 2, ... , n. Thus, the set Un ( Zr) completely determines a set F of colorings of the set W n with colors from the set Zr. Also, two colorings f and gin F, which are respectively determined by the permutations (Zs 1 , Zs 2 , • • • , Zsn) and (z 8 ; 1 , Zs; 2 , • • • , Zs;n) in Pn(Xn), are equivalent under the permutation a in the symmetric groupPn = Pn(Wn) with a( wk) = Wik, k = 1, 2, ... , n. Indeed, from f(wi) = Zs, and g(wk) = z 8 ,k, it follows that f(a(wk)) = f(wik) = g(wk), k = 1, 2, ... , n, and so f(a) = g. Hence the subset Pn(Xn) ofUn(Zr) uniquely corresponds to the model Mj. Consequently, the number En(j 1 , )2, ... , ir) of n-combinations of the set Zr with repetition that include is ~ 0 times the element Zs for s = 1, 2, ... , r, with i 1 + )2 + · · · + ir = n, equals the number N n (i 1 , h, ... , ir) of models Pn(Wn), in which in My, under the symmetric group of permutations Pn is ~ 0 elements of Wn are painted with color Zs from Zr for s 1, 2, ... , r, with i1 + h + · · · + ir = n. The multivariate generating function of this sequence of numbers, according to Theorem 13.4 and using the cycle indicator of the symmetric group derived in Example 13.2, is given by
=
where
=
r
Xj = Xj(tt,t2,··· ,tr) = 'L:t~, j = 1,2, ... ,n, s=l
13.4. MODELS OF COLORINGS OF A FINITE SET
505
and Bn(x 1 , x 2 , ... , Xn) is the exponential Bell partition polynomial. The number E(r, n) of n-combinations of r with repetition equals the number of models in M.r under the symmetric group of permutations Pn = Pn(Wn) and, according to Corollary 13.2, is given by
1 E(r,n) = --,Bn(r, 1!r, ... , (n- 1)!r). n. The generating function of the exponential Bell partition polynomials (see Corollary 11.1 ),
for
Xj
= (j - 1)!r yields
tn
oo
2::: Bn(r, 1!r, ... , (n- 1)!r)--,n. = exp[rlog(1- t)-
1
]
= (1- t)-r.
n=O
Therefore
2::: Bn(r, l.r, ... , (n oo
n=O
I
_
1
1).r)
_ tn _ 1
n.
-
00
2:::
(
n=O
r+n-
1) t n
n
and 1 ... , (n E(r,n ) -_ ..!._ Bn(r, l.r, n!
_
1)I.r ) -_
(r + n- 1) . n
D
Example 13.10 Cyclic permutations with restricted repetition The number of cyclic n-permutations of r with restricted repetition may be derived, by using Theorem 13.4, as follows. Note that ann-permutation (z 81 , Z82 , •• • , Zsn) of the set Zr = {Z1, Z2, ... , Zr} with repetition, in which Z8 >+ 1 follows Zs,, i = 1, 2, ... , n - 1, and Z81 follows Zsn, is called a cyclic n-permutation of r with repetition. Consider the sets Kn (Zr) and Un (Zr) of the cyclic and the linearn-permutations, respectively, of the set Zr. Let us correspond to each cyclic permutation Cn = (z 8 " Z 82 , •• • , Zsn) that belongs to Kn (Zr) the set of the corresponding linear permutations L:n(cn). which is a subset ofUn(Zn)· Clearly, the set {L:n(cn) ~ Un ( Zr) : Cn E Kn (Zr)} constitutes a partition of the set Un (Zr). Further, each (linear) permutation ( Z81 , Z82 , ••• , Zsn) that belongs to Un ( Zr) completely determines a coloring f of the elements of the set Wn = { w1 , w 2 , .•. , wn} with colors from the set Zr = {z 1 , z 2 , .•• , Zr }, in which the element Wi of Wn is painted with the color f(wi) = z 8 , , i = 1, 2, ... ,n. Thus, the set Un(Zr) completely detennines a set :F of colorings of the set Wn with colors from the set Zr.
EQUIVALENCE CLASSES
506
Also, two colorings f and gin :F, which are respectively determined by the permutations (Zs 1 , Zs 2 , ... , Zsn) and (zs~+l, Zs~+ 2 , ... , Zsn, Zs 1 , ••• , Zs~) in .Cn (en), are equivalent under the permutation CTm in the cyclic group 9n,n• of order nand degree n, with CTm(wi) = Wm+i• i = 1, 2, ... , n- m and CTm(wi) = Wm-n+i• i = n - m + 1, n - m + 2, ... , n. Indeed, from f(wi) = Z 8 ;, i = 1,2, ... ,nand g(Wi) = Zs~+i' i = 1,2, ... ,n- m, g(wi) = Zs~-n+i' i = n-m+1,n-m+2, ... ,n,itfollowsthatf(am(wi)) = f(wm+i) = g(wi), i = 1,2, ... ,n- m, f(am(wi)) = f(wm-n+i) = f(wi), i = n- m + 1, n- m + 2, ... , nand so f(a) =g. Hence the subset .Cn(cn) ofUn(Zr) uniquely corresponds to the model M 1. Consequently, the number Kn(h,i 2 , ... ,ir) of cyclic n-permutations of the set Zr with repetition that include is 2 0 times the element z 8 for s = 1, 2, ... , r, with ]r + jz + · · · + ir = n, equals the number Nn(it,iz, ... ,ir) of models in M:F, under the cyclic group 9n,n• of order n and degree n, in which is 2 0 elements of Wn are painted with color z 8 from Zr for s = 1, 2, ... , r, with i 1 + iz + · · · + ir = n. The multivariate generating function of this sequence of numbers, according to Theorem 13.4 and using the cycle indicator of the cyclic group of permutations derived in Example 13.4, is obtained as
"'""'K ( . . ... ,Jr . )tj' L....t n]I,Jz, 1 th 2
- 1 "'""'A..(d) (td1 ··· tJr r --;L....t'+'
+ tdz+··· + td)n/d r
din
and so
K (.
. .) n Jt,Jz, ... ,Jr
1"'""'
=-; ~¢
(d)
(n/d)!
(]r/d)!(jz/d)!···(ir/d)!'
where i is the greatest common divisor of the nonzero numbers among the r numbers j 1 ,jz, ... ,jr and ¢(d) is Euler's function. The number Kn,r of cyclic n-permutations of r with repetition equals the number of models in M:F. under the cyclic group of permutations 9n,n• of order n arid degree nand, according to Corollary 13.2, is given by
Example 13.11 Models of colorings of a cube with r colors Calculate the number of models of coloring the six faces of a cube with r different colors, when two colorings are considered to be of the same model if they can be transformed to each other by rotation of the cube. Let W6 = {1, 2, 3, 4, 5, 6} be the set of the six faces of a cube and Zr = { z 1 , z 2 , ... , Zr} the set of the r different colors. Note that the six faces of a usual cube are numbered so that {1, 6}, {2, 5} and {3, 4} are non-ordered pairs of opposite faces. Further, let 96 be the group of permutations of W6 that are induced
13.5. BIBLIOGRAPHIC NOTES
507
by rotations of the cube around its axes of symmetry. The cycle indicator of the group 96 , derived in Example 13.5, is given by C(x1, x2, ... , x6; 96)
= 214 (x~ + 3xix~ + 6xix4 + 6x~ + 8xD.
The set :F of colorings of the set W 6 = {1, 2, 3, 4, 5, 6}, of the six faces of a cube, with colors from the set Zr is partitioned, under the group 96 , into a set of models M.r. The numberC6,r N(M.r) of models of coloring the six faces of a cube with r colors, according to Corollary 13.2, is given by the cycle indicator C (x 1 , x 2 , ... , x 6 ; 96 ) for x j = r, j = 1, 2, ... , 6 and so
=
1 6 C6,r = -(r 24
+ 3r 4 + 12r3 + 8r 2 ).
The following few values of the number C 6 ,r may help to get an idea of its magnitude: C6,2 = 10, C6,3 = 57, C6,4 = 234, C6,5 = 800,
C6 , 6
13.5
= 2226,
C6,7
= 5390,
C 6 ,s
= 11,712.
0
BIBLIOGRAPHIC NOTES
W. S. Burnside, in 1897, essentially enumerated the orbits of the elements of a finite set, under a group of permutations of it. This result, known as Burnside's lemma, is included in Burnside (1911). The great Hungarian mathematician George P6lya provided fundamental techniques for counting equivalence classes. The famous P6lya's counting theorem was derived in G. P6lya (1937) and its combinatorial significance was demonstrated by J. Riordan (1958) and R. C. Read (1987). An elegant and useful generalization of it is given by N. G. DeBruijn (1964). The article of A. Tucker (1974) provides an elementary presentation of P6lya's counting method through examples. A rigorous treatment of this method can be found in C. Berge (1971) and L. Comtet (1974).
13.6
EXERCISES
1. Let W3 = {1, 2, 3} be the set of the corners of an equilateral triangle numbered circularly in the counterclockwise direction. (a) Determine the group 93, of permutations of w3, that is generated by rotation or reflection
508
EQUIVALENCE CLASSES
of the triangle around its axes of symmetry and show that its cycle indicator is given by
C(x1, x2, x3; ~h)
= 61 (x~ + 3xlx2 + 2x3).
(b) Calculate the number of models of coloring the three corners of the triangle with a set of r colors when two colorings are considered to be of the same model if they can be transformed to each other by rotation or reflection of the triangle around any of its axes of symmetry. (c) Show that, if r is a positive integer, then the positive integer r(r 2 + 3r + 2) is divisible by 6. 2. Let W 4 = {1, 2, 3, 4} be the set of the four corners of a square. Determine the dihedral group 94, of permutations of W 4 , that is generated by rotation or reflection of the square around its axes of symmetry and show that its cycle indicator is given by
3. (Continuation) Calculate (a) the number K 4 (j) of models of coloring the four corners of a square with j corners red and the other 4 - j corners black, for j = 0, 1, 2, 3, 4 and (b) the number K 4 ,r of models of coloring the four corners of a square with a set of r colors when two colorings are considered to belong to the same model if they can be transformed to each other by rotation or reflection of the square around any of its axes of symmetry. 4. Let W4 = { 1, 2, 3, 4} be the set of the sides of a pyramid (tetrahedron). The base bears number 1 and the other sides are numbered circularly 2, 3 and 4 in the counterclockwise direction. (a) Determine the group 94 , of permutations of W 4 , which is generated by rotation of the pyramid around the vertical axis that connects the apex with the center of the base and show that its cycle indicator is given by 1 4 ) C(x1,x2,x3,x4;94) = 3(x 1 +2xlx3.
(b) Calculate the number of models of coloring the four sides of the pyramid with a set of r colors when two colorings are considered to belong to the same model if they can be transformed to each other by rotation of the pyramid around its axis of symmetry. 5. (Continuation) Calculate (a) the number K 4 (j) of models of coloring the four sides of a pyramid with j sides red and the other 4 - j sides black, for j = 0, 1, 2, 3, 4 and (b) the number K 4 (1, 1, 1) of models of coloring
509
13.6. EXERCISES
the four sides of a pyramid with a set of four colors when in both cases two colorings are considered to belong to the same model if they can be transformed to each other by rotation of the pyramid around its axis of symmetry. 6. Let W 4 = {1, 2, 3, 4} be the set of the sides of a regular tetrahedron. (a) Determine the group ~h, of permutations of W4, which is generated by rotation of the tetrahedron around its axes of symmetry and show that its cycle indicator is given by
7. (Continuation) Calculate (a) the number K 4 (j) of models of coloring the four sides of a regular tetrahedron with j sides red and the other 4- j sides black, for j = 0, 1, 2, 3, 4 and (b) the number K4,r of models of coloring the four sides of a regular tetrahedron with a set of r colors when, in both cases, two colorings are considered to belong to the same model if they can be transformed to each other by rotation of the tetrahedron around any of its axes of symmetry. 8. (Continuation) Calculate the number of models of coloring the four sides of a regular tetrahedron with four different colors, each side with a different color, when two colorings are considered to belong to the same model if they can be transformed to each other by rotation of the tetrahedron around any of its axes of symmetry. 9. Let W 8 = {1, 2, ... , 8} be the set of the eight vertices of a cube. Determine the group 98 , of permutations of W 8 , that is generated by rotation of the cube around its axes of symmetry and show that its cycle indicator is given by
10. (Continuation) Let N 8 (i,j,k) be the number of models of coloring the eight vertices of a cube with i red, j green and k = 8 - i - j black vertices, when two colorings are considered to be of the same model if they can be transformed to each other by rotation of the cube. Determine the generating function gs(t, u, w) =
LN
8 (i,j,
and show that N 8 (1, 3, 4) = 13, N 8 (2, 2, 2) Ns,3 = "£ Ns(i,j, k) = 333.
k)tiuiwk
=
22, N 8 (2, 3, 3)
24 and
EQUIVALENCE CLASSES
510
11. Let W 12 = {1, 2, ... , 12} be the set of the 12 edges of a cube. Determine the group 912 , of permutations of W 12 , that is generated by rotation of the cube around its axes of symmetry and show that its cycle indicator is given by C(x1, x2, ... , x12i 9I2)
1
= 24 (x~ 2 + 6xix~ + 3x~ + 8x~ + 6x~).
12. (Continuation) Calculate (a) the number of models of coloring the 12 edges of a cube with 12 different colors, each edge with a different color and (b) the number of models of coloring the 12 edges of a cube with a set of r colors, when in both cases two colorings are considered to belong to the same model if they can be transformed to each other by rotation of the cube. 13. Let W 6 = { 1, 2, ... , 6} be the set of the six vertices of a regular octahedron. Determine the group 96 , of permutations of W 6 , that is generated by rotation of the octahedron around its axes of symmetry and show that its cycle indicator is given by C(x1, x2, ... , x6; 96) =
1 (x~ 24
+ 6xix4 + 3xix~ + 6x~ + Bx~).
14. (Continuation) Calculate (a) the number K 6 (j) of models of coloring the six vertices of an octahedron with j vertices red and the other 6 - j vertices black, for j = 0, 1, ... , 6 and (b) the number K 6 ,r of models of coloring the six vertices of an octahedron with a set of r colors when in both cases two colorings are considered to belong to the same model if they can be transformed to each other by rotation or reflection of the octahedron. 15. Models of coloring a roulette. The disc of roulette is divided into n equal sectors and can be rotated around its axis. Evaluate the number of models of coloring the n sectors of the disc of the roulette with a set of r colors. 16. (Continuation) Let Kn(i) be the number of models of coloring the n sectors of the disc of roulette with j red and n - j black sectors. Show that
Kn(j)=~
L ¢(d)(;j~,
j=0,1, ... ,n, n=1,2, ... ,
dlmj,n
where mo,n = n, m 1,n, j = 1, 2, ... , n, n = 1, 2, ... , is the greatest common divisor of j and n, and ¢(d) is Euler's function.
511
13.6. EXERCISES
1 7*. Let W n = {1, 2, ... , n} be the set of the n vertices of a regular n-gon. Determine the dihedral group 9n, of permutations of Wn, that is generated by rotation or reflection of the n-gon around its axes of symmetry and show that its cycle indicator is given by
for n = 2m
+ 1 and
for n = 2m, where ¢(d) is Euler's function. 18. Models of necklaces. Evaluate the number of models of necklaces with n beads of r different colors, when two necklaces are considered to be of the same model if they can be transformed to each other by rotation or reflection with respect to the diameter. 19*. Let 1-ln = {h1,h2, ... ,hn} be a finite group of order N(1-ln) = n and consider a fixed point h in 1-ln. Show that (a) the mapping ah of1-ln into itself, defined by ah(hr) = hhr, r = 1, 2, ... , n, constitutes a permutation of the elements of 1-ln, and (b) the group 9n of the permutations ah for all h in 1-ln is isomorphic to 1-ln, that is, a gh = a 9 ah for any g and h in 1-ln. Also show that (c) the cycle indicator of the group 9n is given by
where N(1-ln;d) is the number of elements h in 1-ln of order d.
20*. Partitions and compositions of integers. Let P n,k be the set of partitions of n into at most k parts and Cn,k the set of compositions (ordered partitions) of n into at most k parts. Let us correspond to each partition Rk = {rl,r2,··· ,rk}, r1 :::: r2 :::: ··· :::: rk :::: 0, that belongs to Pn,k the set of its permutations Pk(Rk), which is a subset of Cn,k· The set {Pk(Rk) : Rk E Pn,k} constitutes a partition of the set Cn,k· Using P6lya's counting theorem, show that the generating function of the sequence of numbers P(n, k) = N(Pn,k), n = 0, 1, ... , for fixed k, is given by 00
Fk(t}
=L n=O
P(n, k)tn
= Ck((1- t)- 1, (1- t 2 )- 1 , ...
,
(1- tk}- 1 ; Pk),
512
EQUIVALENCE CLASSES
where C(x 1 ,x2 , ••. ,xk;Pk) is the cycle indicator of the symmetric group Pk of order k! and conclude the identity k
ck ( (1 - t) -1, (1 - t2) -1, ... , (1 - tk) -1; Pk)
= II (1 i=1
ti) -1.
Chapter 14 RUNS OF PERMUTATIONS AND EULERIAN NUMBERS
14.1
INTRODUCTION
In the classical Newcomb's problem, cards are successively drawn one after the other from a deck of m numbered cards of a general specification. The cards are placed on a pile as long as the number Xj of the card drawn at the j-th drawing is greater than or equal to the number Xj-I of the card drawn in the previous drawing; a new pile is started whenever the number XJ is less than Xj-I, for j = 1, 2, ... , m. The enumeration of the number of different arrangements of the cards that lead to a given number of k piles is of interest. Clearly, this is a problem of counting the permutations of n kinds of elements, with s 1 , s 2 , ... , sn elements respectively, which include k non-decreasing sequences of consecutive elements. This chapter is devoted to the enumeration of the permutations of the set {1, 2, ... , n} that have k increasing sequences of consecutive elements and the n-permutations of the set {1, 2, ... , s} with repetition that have k non-decreasing sequences of consecutive elements. The Eulerian and the Garlitz numbers, which enumerate these permutations, are presented in the first two sections.
14.2
EULERIAN NUMBERS
The n-th power may be expressed as a sum of binomials (binomial coefficients) of the n-th order. Specifically, we successively get the expressions
t
0
=
(t)O't (t)1 ' t t (t + 1) +2 (t- 1) (t +2 1) +(t) 2' 1
=
2
=
=
RUNS OF PERMUTATIONS AND EULERIAN NUMBERS
514
and, generally,
Then, the following definition is introduced.
DEFINITION 14.1 The coefficient A(n, k) of expansion ( 14.1), of the n-th power into binomials of the n-th order, is called Eulerian number. Clearly, this definition implies A(n, k) = 0, k > n. The numbers A(n, k), k = 0, 1, ... , n, n = 0, 1, ... , attributed to Euler are called Eulerian to distinguish them from the Euler numbers E 2 n (see Exercise 18). Expansion (14.l),uponreplacing t by -t and using the relation
REMARK 14.1
is transformed to
tn =
t
A(n, k)
C+ ~-
1 ), n = 0, 1, ... ,
k=O
or equivalently to
tn
=
t
A(n, n-
j + 1) (t + ~- j),
n
= 0, 1, ....
J=O
Consequently
A(n,k)=A(n,n-k+1), k=0,1, ... ,n, n=0,1, .... The number
A(n,k)=A(n+k+1,k+1), k=0,1, ... ,n, n=0,1, ... , (14.2) which satisfies the symmetric property A(n, k) = A(k, n) is called symmetric Eulerian number. I
515
14.2. EULERIAN NUMBERS
An explicit expression and a recurrence relation for the Eulerian numbers are derived in the following two theorems.
THEOREM 14.1 The Eulerian number A(n, k), k
= 0, 1, ...
, n, n
= 0, 1, ... , is given by the sum (14.3)
PROOF From expansion (14.1), replacing the variable k by j and putting t = k - r, for r = 0, 1, ... , k, we deduce the expression
=
(k- r)n
1:
A(n,j) (n
+ k: r- 1), r = 0, 1, ... , k,
J=O
which, upon using the relation
(
-n-1·)•
1
n+k-r-j) = (n+k-r~j) =(- )k-r-j( n k-r-J k-r-J
may be written as
(k- r)n
= ~ A(n,j)( -1)k-r-j ( L....t
j=O
1
-n- .) , r k-r-J
= 0, 1, ...
, k.
Multiplying both sides of the last expression by ( -1 Y (n~ 1 ) and summing for r = 0, 1, ... , k, we get
l) -1r ~ 1) (n
(k- rt =
r=O
t
1:A(n,j)( -1)k-J (n
~ 1) (k--n r--1 .) J
r=OJ=O
k
=
k-j
~A(n,j)(-1)k-j ~ (n;
1) (k--nj--1r)
and since, by Cauchy's formula,
kL-J (n
+
r=O
r
1) ( -n- 1r ) - ( 0 )
expression (14.3) is deduced.
k- j -
I
-
k- j
= cSk,j,
RUNS OF PERMUTATIONS AND EULERIAN NUMBERS
516
THEOREM 14.2
TheEuleriannumbersA(n,k), k gular recurrence relation
= 0,1, ...
,n, n
= 0,1, ... , satisfy the trian-
+ 1, k) = kA(n, k) + (n- k + 2)A(n, k- 1), , n + 1, n = 0, 1, ... , with initial conditions
(14.4)
A(n fork= 1, 2, ...
A(O,O)
= 1,
= 0,
A(n,O)
n > 0, A(n,k)
= 0,
PROOF Expanding both members of the identity tn+I = coefficients, by the using ( 14.1 ),
k > n.
un
into binomial
~ A(n + 1, k) ( t + : ~ ~ + 1) = ~A( n, k) ( t + :- k) t and, since
(
t + n- k) t n
= (t + n- k) k(t + n- k + 1) + (n- k + 1)(t- k)
(t
n+1
n
= k + n- k + 1) + (n _ k + 1) n+1
(t +n+1
n- k),
we get the expression
I: k=O
A(n + 1, k) (t + n- k + 1) n+1
=t k=O
kA(n, k) (t + n- k + 1) n+1
+ t ( n - k + 1)A(n, k) k=O
(t + +
n- k).
n
1
Equating the coefficients of binomials C+~-:;-_~+ 1 ) in both sides of this expression we deduce (14.4). The initial conditions follow directly from (14.1). Note that the initial conditions may be replaced by A(n, 1) = 1, n > 0, A(n, k) = 0, k > n, which can be checked in the applications. I The Eulerian numbers can be tabulated by using recurrence relation
(14.4) and its initial conditions. Table 14.1 gives the numbers A(n, k), k
= 1, 2, ... , n, n = 1, 2, ... , 9.
The derivation of a bivariate generating function of the Eulerian numbers is facilitated by an expression of the Eulerian polynomial, n
An(t) =
L
A(n, k)tk, n
k=O deduced in the following lemma.
= 0, 1, ... ,
(14.5)
14.2. EULERIAN NUMBERS
517
Table 14.1 Eulerian Numbers A(n, k)
k
n I 2 3 4 5 6 7 8 9
2
3
4
5
6
7
I I I I 4 I 11 1 26 57 I I I20 I 247 I 502
I II 66 302 II9I 4293 I4608
I 26 302 24I6 I56I9 88234
I 57 II9I I56I9 I56190
I I20 4293 88234
I 247 I4608
I
LEMMA 14.1 The Eulerian polynomial An(t), n
8 9
I 502
I
= 0, 1, ... , is alternatively expressed as 00
An(t)
= (1- t)n+l Ljntj,
n
= 0, 1, ....
(14.6)
j=O
PROOF Expression (14.5) of the Eulerian polynomial, upon introducing the explicit expression ( 14.3) of the Eulerian numbers, may be written as
Note that the inner sum, in agreement with A(n, k) = 0, k > n, vanishes for k = n + 1, n + 2, ... , and so in the outer sum the summation may be extended to infinity without altering its value. Thus
An(t) = =
~t,(-1r(n~ 1 )(k-r)ntk ~(-1r(n;1)tr~(k-r)ntk-r
and, since
~ ( -1 r (n ~ 1) tr = expression (14.5) is deduced.
I
( 1 - t) n+ 1 '
RUNS OF PERMUTATIONS AND EULERIAN NUMBERS
518
THEOREM 14.3 The bivariate generating function of the Eulerian numbers A(n, k), k ... , n, n = 0, 1, ... , is given by oo
n
1
n
t
= 1- teu(l-t).
'"''"' ~ A(n, k)t kun! g(t, u) = ~ n=Ok=O
= 0, 1, (14.7)
PROOF The bivariate generating function of the Eulerian numbers, using expression (14.6) of the Eulerian polynomials, may be expressed as
g(t,u) =
f(l- t)n+l fjntj:~ n=O
= (1- t) Etj
j=O
j=O
f
[ju(1n~ t)]n
n=O
and, since
~ [ju(1~ t)]n
~ n=O
= eiu(l-t),
~[teu(I-t)Jj
~ j=O
=
1-
1 teu(I-t)'
I
expression (14.7) is readily deduced.
REMARK 14.2 The bivariate generating function of the shifted Eulerian numbers A(n, k + 1), k = 0, 1, ... , n- 1, n = 1, 2, ... , 00
h(t, u) = 1 +
n-1
LL
n=l k=O
un A(n, k + 1)tk 1 , n.
which emerges in their applications, is closely connected with generating function (14.7). Specifically, since A(n, 0) = 0, n > 0, it follows that
h(t,u) = 1 + g(t,u; - 1 and so oo
h(t, u)
=1+ L
n
L
:!
n
A(n, k)tk-l
n=lk=l
which is the required generating function.
1-t = e-u(l-t) _ t'
(14.8)
I
The Eulerian numbers are connected with the Stirling numbers of the second kind as shown in the following theorem.
14020 EULERIAN NUMBERS
519
THEOREM 14.4 The Eulerian numbers A(n, k), k = 0, 1, 000 ,n, n = 0, 1, 000' are expressed in terms of the Stirling numbers of the second kind S(n, k), k = 0, 1, 000 , n, n = 0, 1, 000' by (1409)
and inversely S(n, r)
= ;:!1 ~ L;
(n- k)
r _ k A(n, k)o
(14010)
k=O PROOF
Expression (1406) of the Eulerian polynomials, upon expanding the powers of j into factorials of it by using (803), may be written as
and, since
it reduces to n
An(t) =
L r!S(n, rW(l- t)n-ro
(l4oll)
r=O Thus, by virtue of (1405),
Equating the coefficients of tk in the first and last member of this relation we conclude (l4o9)o Again, from (14011) and setting u = t/(1- t), whence t = u/(1 + u), we get, by virtue of (1405), n
n
'L:r!S(n,r)ur = LA(n,k)uk(l +u)n-ko r=O k=O
RUNS OF PERMUTATIONS AND EULERIAN NUMBERS
520
Thus
n
~ r!S(n, r)ur
=
=
t; n
A(n, k)uk
n (
~ ~
=kk) ur-k
~{~ G=~)A(n,k)}ur
and, equating the coefficients of u r in the first and last member of this relation. we conclude (14.10). I
Example 14.1 Power series with coefficients powers of fixed order The first application of the Eulerian polynomials is in the expression of the power series with coefficients powers of fixed order. Specifically, solving (14.6) with respect to the power series, we get the expression
~ ·n j _ An(t) _ L. J t - (1 - t)n+l ' n - 0, 1, .... J=O
In particular, for n
= 1, 2, 3, 4 and using Table 14.1, we get the expressions 00
"
00
. j -
{=: Jt ~ ·3 L.,..J
j -
t-
t(l
-
t " (1- t)2'
+ 4t + t 2 ) ~
(1-t)3
J=l
·2 j -
{=: J ·4
'L.,..J
t
j -
t-
-
t(1
(1 ) t +t (1 - t)2'
+ llt + llt 2 + t3 ) (1-t)4
.
J=l
A probabilistic problem that requires the evaluation of such a power series is the following. Consider a sequence of throws of a coin and assume that at any throw the probability of falling heads is p and so the probability of falling tails is q = 1 - p. Then the probability that j tails preceded the first appearance of heads is given by Pi =pqi, j = 0,1, .... This is the probability function of a geometric distribution. Calculate the moments J.L~, r = 1, 2, ... , of the sequence of probabilities Pi• j = 0, 1, .... The r-th order moment is given by 00
00
J.L~=l:FPJ=Pl:Fqi, r=1,2, ... j=l
and so
j=l
14.2. EULERIAN NUMBERS
521
In particular, the mean and the variance are obtained as
P'Q
I
J.t = I-tt =
2
I
q
2
a = J.t2 - J.t = p2 ·
0
Example 14.2 Sample moments Consider a sample {i 1 , i 2 , ... , iN} of N observations from a population (set) of non-negative integers and let Ni be the frequency (number of appearances) of the number j for j = 0, 1, ... , n, so that N 0 + N 1 + · · · + Nn = N. The r-th order sample moment 1 n mr= NLrNi j=O
can be expressed in terms of the successive partial sums, n
Nr,k =
L Nr-1,j,
r
= 1, 2, ... , k = 0, 1, ... , n,
j=k
where No,j = Nj. j = 0, 1, ... , n. Clearly, the double-index sequence Nr,k. = 0, 1, ... , k = 0, 1, ... , n, satisfies the triangular recurrence relation
r
for r = 1, 2, ... , k = 1, 2, ... , n, with No,k = Nk> k = 0, 1, ... , n. Setting r = i, k = j + 1 and multiplying the resulting relation by - ~ - i + 1) = (j + r - ~ - i) + (j + r - ~ - i + 1) , (j + rr-z+1 r-z r-z+1
fori= 1,2, ... ,r,weget
(j + rr --
k - i + 1) _ N·-1 3· i +1 ' '
(j + rr -- i) N· · + (j +r -r - + 1 i) N _(j + rr-i+1 + 1) ki
k-
'• 3
i
k- i
·
t,J
N .
t,J+I,
fori = 1, 2, ... , r. Summing this expression for j = k, k + 1, ... , n and since (/-i1 1 ) = 0, Ni,n+l = 0, we get
(j + r-i+1 k- i + 1) N·_ . = ~ (j + k- i) N· . ' r-i '• ~ (j + r - k - i) N· . _ ~ (j + r - k - i + 1) N· . + r-z. + 1 r-z + 1
~
r-
~ j=k
~
j=k+l
13 '
t,J
~ j=k
~
j=k
r-
3
.
t,J+l,
RUNS OF PERMUTATIONS AND EULERIAN NUMBERS
522
fori = 1, 2, ... , rand so
n 2:
(j
j=k
2:n
+ r -· k - i + 1) N·_ .= , 13 r-i+1 '
(j
j=k
+ r - k - i) N·, . , i = 1, 2, ... , r. r-i '1
Applying it successively, we get
In particular, for i = r we deduce the expression Nr+l,k
~ = {;;:.
(j
+rr
k) Nj.
Using (14.1), the r-th order sample moment mr. is expressed as mr
= ~ tFNJ = ~ ttA(r,k)(j +~- k)Nj J=Ok=O
J=O
=
~
t
A(r, k)
k=O
t (j
+ ~- k) NJ
J=k
and so
1
mr
T
= N 2: A(r, k)Nr+l,k·
0
k=O
14.3
CARLITZ NUMBERS
Consider the generalized binomial of t of order n and scale parameter s, st) _ (st)n _ st(st- 1) · · · (st- n + 1) _ (st) _ , n- 1, 2 , ... , - 1, (n n.1 n.1 0 with s a real number. It can be expressed as a sum of binomials oft+ n- k of order n fork = 0, 1, ... , n with coefficients depending on the nonnegative integers n and k and the parameter s. Specifically, we get successively the expressions
523
14.3. GARLITZ NUMBERS
and, generally, (14.12)
Then, the following definition is introduced. DEFINITION 14.2 The coefficient B(n, k; s) of expansion (14.12), of the n-th order generalized binomial oft with scale parameters into binomials of the n-th order, is called Carlitz number.
Clearly, this definition implies B(n, k; s) REMARK 14.3 using the relation
= 0, k > n.
Expansion ( 14.12), upon replacing t by - t and s by - s and
is transformed to
or, equivalently, to
Consequently,
B(n,k;s)
= (-1)nB(n,n- k + 1; -s)
fork= 0, 1, ... , nand n = 0, 1,....
(14.13)
I
An explicit expression and a recurrence relation for the Garlitz numbers are derived in the following two theorems. THEOREM 14.5 The Carlitz number B(n, k; s), k = 0, 1, ... , n, n = 0, 1, ... , is given by the sum
(14.14)
RUNS OF PERMUTATIONS AND EULERIAN NUMBERS
524
From expansion (14.12), replacing the variable k by j and putting
PROOF
t = k - r, for r = 0, 1, .. . , k, we deduce the expression
which, upon using the relation
(
n+k-r-j) = n
(n+k-r~j) =(- 1)k-r-j( k-r-J
-n-1.),
k-r-J
may be written as
Multiplying both sides of the last expression by (-1)r(n~ 1 ) and summing for r = 0, 1, ... , k, we get
and since, by Cauchy's formula,
~ ~
(n + 1) (
1) (k-j 0 ) =l5k,j,
-n k-j-r
r
expression (14.14) is deduced.
=
I
THEOREM 14.6
The Carlitz numbers B(n, k; s ), k = 0, 1, ... , n, n = 0, 1, ... , satisfy the triangular recurrence relation (n
+ 1)B(n + 1, k; s) = (sk- n)B(n, k; s) +[s(n- k + 2) + n]B(n, k-
fork= 1, 2, ... , n
+ 1, n
1; s),
= 0, 1, ... , with initial conditions
B(O,O;s) = 1, B(n,O;s) = 0, n
> 0, B(n,k;s)
= 0, k
> n.
(14.15)
525
14.3. GARLITZ NUMBERS
PROOF
Expanding the generalized binomials in both sides of the identity
by using (14.12),
~ ~(n + 1)B(n + 1, k; s) (t+n-k+1) n+1
k=O
=~ f='oB(n,k;s) (t+nn and, since
e
+:- k) (st- n)
k) (st-n)
= (sk- n) (t +: ~ ~ + 1) +[s(n-k+1)+n] (
t
+n+ n-
1
k) ,
we get the expression
~ (t+n- k+ t:'o(n + 1)B(n + 1, k; s) n+ 1
=
1)
~(sk-n)B(n,k;s)C+:~~+ 1 ) + ~[s(n- k + 1) + n]B(n, k; s)
(t:: ~
k).
Equating the coefficients of binomials c+:~~+l) in both sides of this expression we deduce (14.15). The initial conditions follow from (14.12).
I
The Garlitz numbers can be tabulated by using the recurrence relation
(14.15) and its initial conditions. Table 14.2 gives the numbers B(n,k;s), k = 1, 2, ... , n, n = 1, 2, ... , 4. The derivation of a bivariate generating function of the Garlitz numbers is facilitated by an expression of the Garlitz polynomial, n
Bn(t;s)=l:B(n,k;s)tk, n=O,l, ... , k=O
deduced in the following lemma.
(14.16)
RUNS OF PERMUTATIONS AND EULERIAN NUMBERS
526
Table 14.2
Garlitz Numbers B(n, k; s)
k
3
2
1
4
n 1
2
3
4
G) e) G)
c;1) 4c;1) c;2) (:) C: 2) + wC: 1) 10 (s: 2) + c: 1) (s: 3)
LEMMA 14.2 The Carlitz polynomial Bn (t; s ), n
Bn(t; s)
= 0, 1, 2, ... , is alternatively expressed as
= (1- t)n+I
f: (sj)
i=O
ti, n
= 0, 1, ....
(14.17)
n
PROOF Introducing in polynomial (14.16) the explicit expression (14.14) of the Carlitz numbers, we get
Note that the inner sum, in agreement with B(n, k; s) = 0, k > n, vanishes for k = n + 1, n + 2, ... and so in the outer sum the summation may be extended to infinity without altering its value. Thus
Bn(t; s)
= ~ ~(
-1r (n ~ 1) (s(k: r)) tk
= ~(- 1 r(n~1)tr~ (s(k:r))tk-r
14.3. GARLITZ NUMBERS
527
and, since
~(-1r(n~ 1)tr = expression ( 14.17) is deduced.
(1- t)n+l,
I
THEOREM 14.7 The bivariate generating function of the Carlitz numbers B(n, k; s), k = 0, 1, ... , n, n = 0, 1, ... , is given by
=?; ,{; B(n, k; s)tkun =1 _ t[1 1-t + u( 1 _ t)jB. n
oo
g(t, u; s)
(14.18)
PROOF The bivariate generating function of the Carlitz numbers, using expression (14.17) of the polynomials ( 14.16), may be expressed as
g(t,u;s) =
~(1- t)n+l ~ (~)tiun
= (1- t) ~ti ~ (~)[u(1- t)t and, since
~ ( ~) [u(1 - t)t = ~o (t [1 + u(1 f='
t)
]s)j-
[1
+ u(1 1
+ u(1 -
1- t[1
8
t)] i,
t)]s,
I
expression (14.18) is readily deduced.
REMARK 14.4 The bivariate generating function of the shifted Carlitz numbers
B(n, k
+ 1; s), k = 0, 1, ... , n- 1, n = 1, 2, ... , oo n-1
h(t,u; s)
= 1+ L
L
n=lk=O
n
B(n, k
+ 1; s)tk;, n.
which emerges in their applications, is closely connected with the generating function (14.18). Specifically, since B(n, 0; s) = 0, n > 0, it follows that
g(t, u; s)- 1 . )_ h( t,u, s - 1 + t
RUNS OF PERMUTATIONS AND EULERIAN NUMBERS
528
and so <X>
h(t, u; s)
n
un
=1+ L
L B(n, k; s)tk-l n! n=lk=l
which is the required generating function.
1- t
= [1 + u( 1 _
t)]-s _ t' (14.19)
I
The Carlitz numbers are connected with the generalized factorial coefficients (see Section 8.4) as shown in the following theorem. THEOREM 14.8 The Carlitz numbers B( n, k; s ), k = 0, 1, ... , n, n = 0, 1, ... , are expressed in terms of the generalized factorial coefficients C(n, k; s), k = 0, 1, ... , n, n = 0, 1, by 0
0
.,
(14.20)
and inversely
C(n,r; s)
= n!r!
k)
r (nL r _ k B(n, k; s). k=O
(14.21)
PROOF Expression ( 14.17) of the polynomial ( 14.16), upon expanding the generalized binomial of j of order n and scale parameters into factorials of j by using (8.39), may be written as <X> n I ( .) Bn(t;s)=(1-tt+ 1 LLr;c(n,r;s) 1 ti j=O r=O n. r
and, since
it reduces to n
Bn(t;s)
=L
r=O
I
r. C(n,r;s)r(1- t)n-r.
n.1
(14.22)
14.3. GARLITZ NUMBERS
529
Thus, by virtue of (14.16),
r!
(n-
n n n r) {;B(n,k;s)tk = ~n!C(n,r;sW~(-1)k-r k-r tk-r
=
E{t,(
-1)k-r :\
(~ =~) C(n, r; s)} tk
and, equating the coefficients of tk in the first and last member of this relation, we conclude (14.20). Again, from (14.22) and setting u = t/(1 - t), whence t = u/(1 + u), we get, by virtue of (14.16), n
L r=O
n
1
r. C(n,r;s)ur n.1
= LB(n,k;s)uk(1 + u)n-k. k=O
Thus
and, equating the coefficients of ur in the first and last member of this relation, we I conclude (14.21). A limiting expression of the Carlitz numbers as s -+ the following theorem.
±oo
is derived in
THEOREM 14.9 Let B(n, k; s) be the Carlitz number. Then
lim s-nn!B(n, k; s) 8--->±oo
= A(n, k),
( 14.23)
where A(n, k) is the Eulerian number. PROOF Multiplying both members of expression (14.14) by s-nn!, taking the limit ass-+ ±oo and since lims--->±oo s-n(s(k- r))n = (k- r)n, we get
~(
-1r lim s-nn!B(n, k; s) = s--->±oo L.... r=O
=
(n +
1 ) [ lim s-n(s(k- r))n] r 8--->±00
~(-1r(n; 1)(k- r)n.
Thus, by virtue of (14.3), the limiting expression (14.23) is established.
I
530
RUNS OF PERMUTATIONS AND EULERIAN NUMBERS
14.4 PERMUTATIONS WITH A GIVEN NUMBER OF RUNS The permutations of a finite set can be classified according to the number and the length of the increasing (or decreasing) sequences of consecutive elements they include. In this respect, the following definition is introduced.
DEFINITION 14.3 Let (jt,h, ... ,jn) be apennutation of the set {1, 2, ... , n}. The sequence of consecutive elements
Um,im+l, ... ,im+r-d,
with
im < im+l < · · · < im+r-1,
is called ascending run of length r, for 2 :S m :S n - 1, 1 :S r :S n - 2, if Jm-1 > im and Jm+r-1 > im+r: in particular, form = 1, 1 :S r :S n- 1, if Jr > Jr+b form = n- r + 1, 1 :S r :S n- 1, if in-r > Jn-r+b and for m = 1, r = n, without any additional condition. This sequence is called descending run of length r if the corresponding conditions are satisfied with the reverse inequalities.
Example 14.3 Consider the permutations (j 1 , )2, )3, j 4 ) of the set {1, 2, 3, 4}. Clearly these 24 permutations can be classified according to the number of their ascending runs as follows: (a) The permutation (1,2,3,4) is the only one that has one ascending run of length 4. (b) The permutations with two ascending runs are the following II:
(1,2,4,3), (1,3,2,4), (1,3,4,2), (1,4,2,3), (2,1,3,4), (2,3,1,4), (2,3,4,1), (2,4,1,3), (3,1,2,4), (3,4,1,2), (4,1,2,3). (c) The permutations with three ascending runs are the following II:
(1, 4, 3, 2), (2, 1, 4, 3), (2, 4, 3, 1), (3, 1, 4, 2), (3, 2, 1, 4), (3, 2, 4, 1), (3,4,2,1), (4,1,3,2), (4,2,1,3), (4,2,3,1), (4,3,1,2). (d) The permutation
(4, 3, 2, 1) is the only one that has four ascending runs, each of length I.
D
THEOREM 14.10 The numberofpennutations of the set {1, 2, ... , n} with k ascending runs equals A(n, k), the Eulerian number.
14.4. PERMUTATIONS WITH A GIVEN NUMBER OF RUNS
531
PROOF Note that, from any permutation of the set { 1, 2, ... , n }, by attaching the element n + 1 in any of the n + 1 possible positions (one before the first element, n - 1 between the n elements and one after the last element) n + 1 permutations of the set { 1, 2, ... , n + 1} are constructed. Further, this attachment either keeps unchanged or increases by one the number of runs. Specifically, (a) from each permutation of the set { 1, 2, ... , n} with k ascending runs, by attaching the element n + 1 after the last element of any of these runs, k permutations of the set { 1, 2, ... , n + 1} with k ascending runs are constructed. Also, (b) from each permutation of the set { 1, 2, ... , n} with k - 1 ascending runs, by attaching the element n + 1 in any of the possible positions except after the last element of any of these runs (n + 1) - (k - 1) = n- k + 2 permutations of the set {1, 2, ... , n+ 1} with k ascending runs are constructed. Consequently, the number a( n, k) of permutations of the set { 1, 2, ... , n} with k ascending runs satisfies the recurrence relation
a(n
+ 1, k)
= ka(n, k)
+ (n- k + 2)a(n, k-
fork = 2, 3, ... , n
+ 1, n
= 1, 2, ... , with
1),
a(n, 1) = 1, n > 0, a(n, k) = 0, k > n. Comparing this recurrence relation and its initial conditions with the recurrence relation (14.4) of the Eulerian numbers and its initial conditions, we conclude that a(n, k) = A(n, k). I REMARK14.5 Considerapermutation(j 1 ,h, ... ,in)oftheset{1,2, ... ,n} with k ascending runs. Then, the permutation (i 1 , i 2, ... , in) of the set {1, 2, ... , n }, with im = in-m+ 1 , m = 1, 2, ... , n, which is the reverse permutation, has k descending runs. Since this correspondence is one-to-one, it follows from Theorem 14.10 that the number of permutations of the set {1, 2, ... , n} with k descending runs equals the Eulerian number A(n, k). I REMARK 14.6 Rises and falls of permutations. The ascending or descending runs of a permutation of the set {1, 2, ... , n} are connected with its rises or falls. Specifically, consider a permutation (j 1 , h, ... , in) of the set {1,2, ... ,n}. The pair Ur,ir+l) is called a rise if ir < ir+l and a fall if ir > ir+l• r = 1, 2, ... ,n- 1. If the permutation (iJ,i2 , ... ,in) has k rises (or k falls) {(jr 1 ,ir 1 +!), Ur,ir 2 +I), ... ,(jrk,irk+J)}, then it has k + 1 descending runs (or k+ 1 ascending runs) { (j1, h, ... , ir 1 ), Ur 1 +1, ir 2 +2, ... , ir2 ), Urk + 1, irk+2, ... , in)} and inversely. Hence, by Theorem 14.10, the number of permutations of the set { 1, 2, ... , n} with k rises (or k falls) equals the shifted Eulerian number A(n, k + 1). I
RUNS OF PERMUTATIONS AND EULERIAN NUMBERS
532
Example 14.4 Consider an urn containing n numbered balls { 1, 2, ... , n} and suppose that the balls are randomly drawn one after the other, without replacement. If im is the number drawn at the m-th drawing for m = 1, 2, ... , n, then (it, h, ... , in) represents a drawing of then balls. Determine (a) the probability p(k; n) that the drawing of then balls has k ascending runs, fork = 1, 2, ... , n, and (b) the r-th factorial moment J.L(r) of the sequence of probabilities p(k; n), k = 1, 2, ... , n, for r = 1, 2, .... (a) The number of permutations (j 1 , )2, ... , in) of the set {1, 2, ... , n} with k ascending runs, according to Theorem 14.10, is given by the Eulerian number A(n, k). Thus, the probability p(k; n) that the drawing of then balls has k ascending runs, on using the Laplace's classical definition of probability, is given by A(n, k) p(k; n) = , k = 1, 2, ... , n. 1
n.
(b) The generating function of the sequence of probabilities p( k; n), k
= 1, 2,
... , n, by (14.5), is given by P(t)
= tp(k;n)tk = An~t) n.
k=1
and so the factorial moment generating function, B(t)
= P(t + 1), (see Section
6.4) is
tr _ An(t + 1) _ ~ B( t ) - ~ J.L(r) I I . r=O r. n. Further, by (14.7), the exponential generating of the Eulerian polynomial An(t), n = 0, 1, ... , may be written as
t
un
oo
~ An (t) n! = 1 - t + -1----=[-eu-,.(t,---_---,-,1),-----1],...-/-:-(1---t)" Expanding it into a geometric series of z = (eu(t-l) -1)/(1-t) and then expanding the powers of eu(t- 1 ) - 1 into a series of u( t- 1), by using the generating function of the Stirling numbers of the second kind, (8.17), we get oo
n
oo
L An(t) :, = 1 + t L[eu(t- 1 ) n=O
-
1]k(t- 1)-k
k=1 oo
= 1+t
n
oo
LL
k!S(n, k)(t- 1t-k;
k=I n=k = 1+
oo ~
{
n.
t ~ k!S(n, k)(t- 1)n-k n
}
n
:,
14.5.
PERMUTATIONS WITH REPETITION
533
and so n
An(t)
=t L
k!S(n, k)(t- 1)n-k
k=l
n
=L
k!{(k + 1)S(n, k + 1) + S(n, k)}(t- 1t-k.
k=O
Thus, on using the triangular recurrence relation of the Stirling numbers of the second kind, (8.27), we deduce the relation n
An(t) =
L k!S(n + 1, k + 1)(t- 1)n-k k=O
whence 00
B(t)
r
n
= Lll(r)! =L r. r=O
r=O
(
)'
n-,r "S(n+1,n-r+1W. n.
Consequently, ll(r)
and ll(r) = 0 for r
14.5
= S(n+1,n-r+1)/(~). > n.
r
= 1,2, ...
,n,
D
PERMUTATIONS WITH REPETITION AND A GIVEN NUMBER OF RUNS
The permutations of a finite set with repetition can be classified according to the number and the length of the non-decreasing (or non-increasing) sequences of consecutive elements they include.
DEFINITION 14.4 Let (h, jz, ... ,in) be ann-permutation of the set {1, 2, ... , s} with repetition. The sequence of consecutive elements
is called non-descending run of length r; for 2 ::; m ::; n - 1, 1 ::; r ::; n - 2, if im-1 > im and im+r-1 > im+r; in particular; form = 1, 1 ::; r ::; n- 1, if ir > ir+t.for m = n- r + 1, 1 ::; r ::; n- 1, if in-r > in-r+t. and for m = 1, r = n, without any additional condition.
534
RUNS OF PERMUTATIONS AND EULERIAN NUMBERS
This sequence is called non-ascending run of length r conditions are satisfied with the reverse inequalities.
if the
corresponding
Example 14.5 Consider the permutations (j 1 , jz, h) of the set {1, 2, 3} with repetition. Clearly these 27 permutations can be classified according to the number of their ascending runs as follows. (a) The permutations with one non-descending run are the following 10:
(1, 1, 1), (1, 1, 2), (1, 1, 3), (1, 2, 2), (1, 2, 3), (1, 3, 3), (2, 2, 2), (2, 2, 3), (2, 3, 3), (3, 3, 3). (b) The permutations with two non-descending runs are the following 16:
(1, 2, 1), (2, 1, 1), (1, 3, 1), (3, 1, 1), (2, 1, 2), (2, 2, 1), (3, 1, 3), (3, 3, 1), (1, 3, 2), (2, 1, 3), (2, 3, 1), (3, 1, 2), (2, 3, 2), (3, 2, 2), (3, 2, 3), (3, 3, 2). (c) The permutation
(3,2,1) is the onlx one that has three non-descending runs. Each of these runs is of length one. U The enumeration of the permutations of a finite set with repetition and a given number of non-descending runs is facilitated by distinguishing them according to the last element they include. A bivariate generating function of the number of such permutations is derived in the following theorem.
THEOREM 14.11 Let Q(n, k; s, r) be the number of n-permutations of the set {1, 2, ... , s} with repetition and last element r, which have k non-descending runs. Then
~ ~ Q( k· ) k n ~~ n, ,s,r t u
t)(1- u(1- t)J-r 1-t(1-u(1-t)]-8
= ut(1-
(14.24)
n=lk=l
PROOF Distinguishing the n-permutations of the set { 1, 2, ... , s} with repetition and last element r that have k non-descending runs, according to the element before the last, we conclude the expressions r
8
Q(n,k;s,r)=LQ(n-1,k;s,j)+ L j=l
j=r+l
Q(n-l,k-1;s,j),
14.5.
535
PERMUTATIONS WITH REPETITION
for r = 1, 2, ... , s - 1, k = 1, 2, ... , n, n = 2, 3, ... , and 8
Q(n,k;s,s) = LQ(n-1,k;s,j), j=l fork= 1,2, ... ,n, n = 2,3, ... , with Q(n,O;s,r) = 0, n = 1,2, ... , Q(1, 1; s, r) = 1 and Q(1, k; s, r) = 0, k = 2, 3, .... Multiplying these expressions by tk and summing for k = 1, 2, ... , n, we get for the generating function n
fn(t;s,r) = LQ(n,k;s,r)tk, n = 1,2, ... , r = 1,2, ... ,s, k=l the recurrence relations T
fn(t;s,r)
S
= Lfn-t(t;s,j) +t j=l
for r
= 1, 2, ...
L fn-t(t;s,j), j=s+l
, s - 1, n = 2, 3, ... , and s
fn(t;s,s)
= Lfn-t(t;s,j), j=l
for n = 2, 3, ... , with ft (t; s, r) = t. Taking the difference of these relations with respect tor, we deduce the recurrence relation.
fn(t; s, r- 1) = fn(t; s, r) for r = 2, 3, ... , s, n = 2, 3, ... , with multiplying by
c~
1 ) (t _ 1)j =
G)
+ (t-
1)fn-1 (t; s, r),
ft (t; s, r)
(t _ 1)j-
and summing the resulting expression for j
= t. Replacing n by n- j,
G=~)
(t- 1)j
= 0, 1, ... , i, we get
~ (i ~ 1) (t- 1)j fn-j(t; s, r- 1) = 't (i.) (t- 1)j fn-j(t; s, r) ;=0
J
;=0
-'t (~ =~) j=l
(t- 1)1 fn-j(t; s, r)
J
+~
(i ~ 1) (t- 1)1+1fn-j-1 (t; s, r) J
j=O
and so
t (i.) j=O
J
(t- 1)i fn-j(t; s, r) =
~ (i ~ 1) (t- 1)j fn-j(t; s, r- 1). j=O
J
RUNS OF PERMUTATIONS AND EULERIAN NUMBERS
536
Applying successively the last relation, we deduce the expression
fn(t; s, r-
i) = t (i.) j=O
(t- 1)1 fn-j(t; s, r)
J
for n = 1, 2, ... , i = 0, 1, ... , r- 1, r = 1, 2, ... , s. Multiplying both members of this expression by un and summing for n = 1, 2, ... , we find for the bivariate generating function oo
f(t,u;s,r)
=L
oo
n
LQ(n,k;s,r)tkun
= Lfn(t;s,r)un,
n=lk=l
n=l
the relation
f(t, u; s, r- i)
= [1- u(1- t)]i f(t, u; s, r),
fori= 0, ... ,r -1, r = 1,2, ... , s. In particular, for r = s,
f(t, u; s, s- i) = [1- u(1- t)]i f(t, u; s, s), i = 0, 1, ... , s- 1. (14.25) Summing it fori = 0, 1, ... , s- 1, we get s-1
"'""'
[
.
~f(t,u;s,s-z)= i=O
tW f(t,u;s,s).
1 - 1 - u(1 ( ) U 1- t
Also s-1
~f(t,u; s,s- i)
s-1 oo
oo {s-1
= ~~ fn(t;s,s- i)un = ~
and, since In+ I (t; s, s) =
}
~fn(t; s,s- i) un
2:j= 1 fn(t; s, j),
s-1
"'""'!( . _ .) _ ~ t,u,s,s z i=O
f(t, u; s, s) - ut
.
U
Therefore
(1- t)f(t, u; s, s)- ut(1- t) = {1- [1- u(1- t)"]} f(t, u; s, s) and
f( t u· s s) -
' ' '
ut(1 - t)
- (1 - ut(1 - t)]• - t ·
Introducing the last expression into (14.25) and setting r i = s- r, we conclude that
!( t, u; s, r )
=
ut(1 - t)[1 - u(1 - t)]-r 1 - t [1 - u (1- t) ]-s
s - i, whence
14.6. BIBLIOGRAPHIC NOTES
537
and the derivation of generating function (14.24) is completed.
I
COROLLARY 14.1 Let Q(n, k; s) be the number of n-permutations of the set { 1, 2, ... , s} with repetition, which have k non-descending runs. Then oo
n
L L Q(n, k; s)t
k-1
u
n=l k=l
n
(
1- t)
= [1-u1-t ( )]
8
-t .
(14.26)
PROOF Notice that the attachment of the element s after the last element of an n-permutation of the set { 1, 2, ... , s} with repetition, which has k nondescending runs uniquely yields an (n +I)-permutation of the set {1, 2, ... , s} with repetition and last elements, which has k non-descending runs. Consequently, Q(n, k; s) = Q(n + 1, k; s, s) and introducing this expression into (14.24), we deduce (14.26). I
Clearly, comparing the generating function (14.26) with the generating function (14.19) of the Carlitz numbers we conclude the following corollary. COROLLARY 14.2 The numberofn-permutations of the set {1, 2, ... , s} with repetition, which have k non-descending runs is given by
Q(n,k;s) = IB(n,k;-s)i = (-l)nB(n,k;-s), where B(n, k; s) is the Carlitz number.
14.6
BIBLIOGRAPHIC NOTES
The problem of evaluating the power series with coefficients powers of fixed order led Euler to the introduction of Eulerian polynomials and numbers (see Example 14.1). Expression (14.1), of the n-th power of a number as sum of binomial coefficients of the n-th order with coefficients the Eulerian numbers, is due to J. Worpitzky (1883). Other properties of the Eulerian numbers and polynomials can be found in L. Carlitz (1959). Motivated by the problem of expressing the power moments of a frequency distribution in terms of cumulative totals (see Example 14.2), P. S. Dwyer (1938, 1940) introduced and studied the cumulative numbers, which are non-central Eulerian numbers. The Carlitz numbers were so named in honor of Leonard Car!itz for his stimulating contribution on the Eulerian
RUNS OF PERMUTATIONS AND EULERIAN NUMBERS
538
numbers, their generalizations and combinatorial applications. These numbers were first studied in L. Carlitz (1979) as degenerate Eulerian numbers. Ch. A. Charalambides (1982) further examined them as composition numbers. The general Simon Newcomb's problem was studied through generating functions by P. A. MacMahon (1915, 1916). J. Riordan (1958) and Ch. A. Charalambides (2002) examined it as a problem of enumeration of permutations with restricted positions by using power and factorial rook polynomials. An interesting combinatorial treatment of the same problem was provided by J. E. Dillon and D. P. Roselle (1969). The presentation of the section on the enumeration of permutations with repetition and a given number of runs (or rises) is based on the paper of L. Carlitz, D. P. Roselle and R. A. Scoville (1966).
14.7
EXERCISES
1. Non-central Eulerian numbers. Consider the expansion
~ (t+r) n =L..,A(n,k;r)
(t + n- k) n
, n=O,l, ....
k=O
The coefficient A(n, k; r) is called non-central Eulerian number or Dwyer number. Derive (a) the explicit expression
A(n, k; r) =
t(
~ 1) (k + r- it
-l)j (n
J
j=O
and (b) the triangular recurrence relation
A(n + 1, k; r) = (k for k
= 1, 2, ...
,n
+ r)A(n, k; r) + (n-
k- r
+ 1, n = 0, 1, ... , with initial
+ 2)A(n, k- 1; r),
conditions
A(O,O;r) = 1, A(n,O;r) = rn, n > 0, A(n,k;r) = 0, k > n.
2. (Continuation). Show that n
An(t; r) = L
oo
A(n, k; r)tk = (1- t)n+l L(i
k=O
and oo
g(t, u; r)
n
L A(n, k; r)t n=Ok=O
=L
+ r)nti
i=O
k
un n!
=
(1 _ t)eru(l-t) _ teu(l-t) · 1
14. 7. EXERCISES
539
3. (Continuation). Show that the non-central Eulerian numbers A(n, k; r), k = 0, 1, ... , n, n = 0, 1, ... are connected with the non-central Stirling numbers of the second kind S(n, k; r), k = 0, 1, ... , n, n = 0, 1, ... by A(n,k;r) =
t(-1)k-j(~=~)j!S(n,j;r) J
j=O
and S(n,j;r)
1
= -:-r Lj
J k=O
(
n- k k ) A(n,k;r).
._
J
4. Non-central Garlitz numbers. Consider the expansion
(
st n+
r)
= ~ L...t B(n, k; s, r)
(t + k) nn -
, n = 0, 1, ....
k=O
The coefficient B(n, k; s, r) is called non-central Carlitz number. Derive (a) the explicit expression
and (b) the triangular recurrence relation (n + 1)B(n + 1, k; s, r) = (sk + r- n)B(n, k; s, r) +[s(n- k + 2) + n- r]B(n, k- 1; s, r), for k
= 1, 2, ...
,n
+ 1, n
= 0, 1, ... , with initial conditions
B(O,O;s,r)=1, B(n,O;s,r)=(:). n>O, B(n,k;s,r)=O, k>n. 5. (Continuation). Show that
Bn(t; s,
r)
=
~ B(n, k; s, r)tk =
(1- t)n+l
t, (
sj:
r)
tj
and g(t,u;s,r) =
oo
Ln
k
L B(n,k;s,r)t u n=Ok=O
n=
(1 - t)[1 + u{1 - t}Y ( )] [ 1-t 1 +u 1-t s
6. (Continuation). Show that
lim s-nn!B(n,k;s,r)=A(n,k;p), if
s-+±oo
·
limr/s=p
s±oo
540
RUNS OF PERMUTATIONS AND EULERIAN NUMBERS
and
n
LB(n,k;s,r) = sn. k=O
7. (Continuation). Show that the non-central Carlitz numbers B(n, k; s, r), k = 0, 1, ... , n, n = 0, 1, ... are connected with the noncentral generalized factorial coefficients C(n, k; s, r), k = 0, 1, ... , n, n = 0, 1, ... by k
B(n,k;s,r)=L(-1) j=O
and C(n,j;s,r) =
k-· ( n-J") J.., . J k-. n!C(n,J;s,r) J
n! (n- k)
l" Lj
J k=O
. _ k B(n,k;s,r). J
8*. q- Eulerian numbers. Consider the expansion of the n-th power of the q-number [t]q into q-binomial coefficients of order n:
[t]~ =
t
qk(k-l)/2 A(n, klq) [t + ~- k] , n = 0, 1, ....
k=O
q
The coefficient A(n, klq) is called q-Eulerian number. (a) Show that A(n,klq)=A(n,n-k+1lq), k=0,1, ... ,n, n=0,1, ...
and (b) derive the explicit expression A(n,klq) =
q-k(k-l)/2
~(-1rqr(r-l)/2
[
n;
1
L
[k-
r]~,
for k = 0, 1, ... , n, n = 0, 1, .... 9*. k
(Continuation). Show that the q-Eulerian numbers A(n,klq), , n, n = 0, 1, ... , satisfy the triangular recurrence relation
= 0, 1, ...
A(n
for k
= 1, 2, ...
+ 1, klq) , n, n
= [k]qA(n, klq)
+ [n- k + 1]qA(n, klq),
= 0, 1, ... , with initial conditions
A(O, Olq) = 1, A(n, Olq) = 0, n
> 0 A(n, klq) = 0, k > n.
10*. Records. Let (]t,h, ... ,jn) be a permutation of {1,2, ... ,n}. The element ir, for 2 :S r :S n, is called a record of this permutation if Jr > j 8 , s = 1, 2, ... , r - 1. Especially, the first element h is regarded,
14. 7. EXERCISES
541
by convention, as a record. Show that the number of permutations of the set {1, 2, ... , n} that have k records equals ls(n, k)l, the signless (absolute) Stirling number of the second kind. 11. Inversions of permutations. Let (j1,h, ... ,jn) be a permutation of the set { 1, 2, ... , n }. If ir >is for 1 ::; r < s ::; n, this permutation has an inversion at the pair of points (r, s). Show that the number b(n, k) of permutations of the set { 1, 2, ... , n} with k inversions satisfies the horizontal recurrence relation k
b(n,k) =
L
b(n- 1,i), m = max{O,k- n
+ 1},
j=m
for k = 0, 1, ... , n(n- 1) /2, n = 1, 2, ... , with initial conditions
b(n, 0) = 1, b(O, k) = 0, k
~
1, b(n, k) = 0, k
> n(n- 1)/2
and conclude that
b(n, k)
= b(n, k- 1) + b(n- 1, k),
fork= 1, 2, ... , n- 1, n = 1, 2, ... and
b(n, k)
= b(n, k- 1) + b(n- 1, k)- b(n- 1, k- n),
fork= n,n + 1, ... ,n(n- 1)/2, n = 3,4, .... 12. (Continuation). Show that
~n(t) =
n(n-1)/2
L
n
b(n, k)tk
k=O
1
j
= IJ 1 -=. tt ,
n
= 1, 2, ...
j=l
and conclude that
b(n, n(n- 1)/2- k) = b(n, k), n(n-1)/2
L
k=O
n(n-1)/2
b(n, k) = n!,
L
(-1)kb(n,k) = 0.
k=O
13. Local maxima and minima. Let (j 1 , h, ... , in) be a permutation of the set { 1, 2, ... , n}. The element ir, for 2 ::; r ::; n - 1, is called a local maximum or a peak at the point r of this permutation if ir > ir-I and ir > ir+l· Especially, the element ii is a peak if i1 > h, while the element Jn is a peak if in > in- I· The element ir is a local minimum if the conditions are satisfied with the reverse inequalities. Show that the number T1 (n, k) of
RUNS OF PERMUTATIONS AND EULERIAN NUMBERS
542
permutations of the set {1, 2, ... , n} with k local maxima (minima) satisfies the triangular recurrence relation T1 (n + 1, k) = (2k
+ 2)T1 (n, k) + (n-
2k +- 1)TI(n, k- 1),
for k = 1, 2, ... , n = 2, 3, ... , with initial conditions T1 (n,0)=2n-I, n=2,3, ... , TI(2,k)=O, k=1,2, .... 14. Show that the number T2(n, k) of permutations of the set { 1, 2, ... , n} with k ascending runs, each of length greater than one, satisfies the triangular recurrence relation
T2(n
+ 1, k)
= (2k
+ 1)T2(n, k) + (n- 2k + 2)T2(n, k-
1),
for k = 1, 2, ... , n = 2, 3, ... , with initial conditions T2(n, 0) = 1, n = 2, 3, ... , T2(2, 1) = 1 T2(2, k) = 0, k = 2, 3, .... 15*. Consider the double sequence of numbers T(n, k), k = 0, 1, ... , n = 2,3, ... , where T 1 (n,k) = T(n,2k + 1) and T2(n,k) = T(n,2k) are the numbers of permutations of the set { 1, 2, ... , n} with k local maxima (minima) and with k ascending runs of length greater than one, respectively. (a) Show that
T(n
+ 1, k)
= (k
+ 1)T(n, k) + (n- k + 2)T(n, k- 2),
for k = 2, 3, ... , n = 2, 3, ... , with T(n, 0) = 1, T(n, 1) = 2n-I, n = 2, 3, ... ,
T(2, 2) = 1, T(2, k) = 1, k = 3,4, .... (b) Setting T(1, k)' = 1, k = 0,1 and T(1, k) = 0, k = 2, 3, ... , derive the generating function ~~
g(t, u) =
k
un-1
1 - t2
~ ~ T(n, k)t (n- 1)! = t(cosh z- 1)'
with z = u(1- t 2) 1 12 + arccosh(1/t), where coshz = (ez + e-z)/2 is the hyperbolic cosine and arccoshw is the arch of the hyperbolic cosine of w. 16*. Show that the number R(n,k) of permutations of {1,2, ... ,n} with k (ascending or descending) runs of length greater than one satisfies the recurrence relation
R(n
+ 1, k)
= kR(n, k)
+ 2R(n, k-
1) + (n- k + 1)R(n, k- 2),
14.7. EXERCISES
543
for k = 2, 3, ... , n = 2, 3, ... , with initial conditions
R(n, 0) = 0, R(n, 1) = 2, n = 2, 3, ... , R(2, k) = 0, k = 2, 3, .... 17*. Up-down and down-up permutations. A permutation (j 1 , h, ... , in) of the set { 1, 2, ... , n} is called up-down permutation if hr- 1 < hr for r = 1, 2, ... , [n/2] and hr > hr+ 1 for r = 1, 2, ... , [n/2] - 1, while it is called down-up permutation if hr- 1 > hr for r = 1, 2, ... , [n/2] and hr < hr+l for r = 1, 2, ... , [n/2]- 1. (a) Show that the number An of updown permutations of the set { 1, 2, ... , n}, which is equal to the number of down-up permutations of the same set, satisfies the recurrence relation
with An = 1, n = 0, 1, 2 and (b) deduce the generating function
L Ann!tn =tan ( 2t + 47r) . 00
A(t) =
n=O
18*. (Continuation). Euler numbers. The sequence of Euler numbers E 2 n, n = 0, 1, ... , (E2 n+ 1 = 0, n = 0, 1, ... ) has generating function
(a) Show that
IE2nl
= (-1)nE2n =
A2n,
where A 2 n is the number of up-down permutations of the set {1, 2, ... , 2n }. (b) Derive the expression
IE2nl
= i)-1)n-d 2
where
R(n,k)=
:)!
2
k=1
R(2n,2k)
~!t,(-1fG) (~-j)n
is the Carlitz-Riordan number of the second kind (see Exercise 8.22). 19*. (Continuation). Tangent coefficients. Consider the sequence T2 n+l, n = 0, 1, ... , (T2 n = 0, n = 0, 1, ... ) with generating function
oo
T(t) =
t2n+1
1_
e2t
~ T2n+1 (2n + 1)! = 1 + e 2 t
= -tanh t.
544
RUNS OF PERMUTATIONS AND EULERIAN NUMBERS
(a) Show that IT2n+ll = (-1)nT2n+l = A2n+l
1
where A 2n+l is the number of up-down permutations of the set {1, 2, ... , 2n + 1}. (b) Derive the expression y.
l 2n+l
I=
~(-1)n-k (k + 1)(2k)! R(2n 2k) L.J k ' , 2
k=l
where R(n, k) is the Carlitz-Riordan number of the second kind. 20*. (Continuation). Genocchi numbers. The sequence of Genocchi numbers Gn, n = 1, 2, ... , has generating function
G(t)
CXl
tn
2t
n=l
n.
+e
= LGn 1 = -1 - t
and so G 1 = 1, G 2n+I = 0, n = 1, 2, .... (a) Show that
where A 2n-l is the number of up-down permutations of the set { 1, 2, ... , 2n - 1}. (b) Derive the expression 2n-l IG2nl = 2n
kl
L (-1)n-k 2 ~ S(2n- 1, k),
k=l
where S(n, k) is the Stirling number of the second kind.
HINTS AND ANSWERS TO EXERCISES
CHAPTER I
= A 3 = {(t,t,t),
(t,t,h), (t,h,t), (h,t,t), (t,h,h), (h,t,h), (h,h,t), (h,h,h)}, F((t, t, t)) = 0, F((t, t, h)) = F((t, h, t)) = F((h, t, t)) = 1, F((t, h, h)) = F((h, t, h)) = F((h, h, t)) = 2, F((h, h, h)) = 3.
1.
s3
2. (a) N(S2) = 36, (b) A 2 = {(1, 1)}, A 3 = {(1, 2), (2, 1)}, A 4 = {(1, 3), (2, 2), (3, 1)}, A 5 = {(1,4), (2,3), (3,2), (4,1)}, A 6 = {(1,5), (2,4), (3,3), (4,2), (5,1)}, A 7 = {(1,6), (2,5), (3,4), (5,2), (6, 1)}, A 8 = {(2,6), (3,5), (4,4), (5,3), (6,2)}, A 9 = {(3,6), (4,5), (5,4), (6,3)}, Aw = {(4,6), (5,5), (6,4)}, Au= {(5,6), (6,5)}, A12 = {(6,6)}. 3. W = {1, 2, 3, 4, 5, 6}, S3 = W 3 , N(S3) = [N(W)j3 = 6 3 = 216, A= {(w,b,r) E S3: w+b+r > 10}, A'= {(w',b',r') E S3: w' +b' +r' :S 10}. The element (w, b, r) in A uniquely corresponds to the element (w', b', r') in A', with w' = 7- w, b' = 7- b, r' = 7- r. Indeed, w' + b' + r' = 21- (w + b + r) :S 10 if and only if w + b + r > 10.
4. N(L5 xR5)
= N(L5)N(R 5 ) = 25,
N(L5 xR4)
= N(L5)N(R4) = 20.
5. The set Bn of n-digit binary sequences (1, a1, a 2, ... , an-I) is equivalent to the Cartesian product A 1 x A2 x ··· x An-I, with Ai = {0,1}, i = 1, 2, ... , n - 1, and so N(Bn) = N(A1)N(A2) · · · N(An_I) = 2n-l, n = 2,3, ... , N(BI) = 2. Also, N(Tn) = L~=l N(Br) = 2 +I:~,:; 2r-l = 2n. Alternatively, the set Tn of binary sequences of at most n digits is equivalent to the Cartesian product A 1 x A 2 x · ·· x An, with Ai = {0, 1}, i = 1, 2, ... , nand so N(Tn) = 2n. 6. The set Bn of sequences of n symbols (a 1 , a 2 , ... , an) is equivalent to the Cartesian product A 1 x A2 x · · · x An, with Ai = {0, 1}, i = 1, 2, ... , n,
HINTS AND ANSWERS TO EXERCISES
546
where 0 corresponds to a "dot" and 1 to a "dash." Thus N(Bn) = 2n, n = 1,2, ... , and the required number is L~= 1 N(Br) = 2n+1. 7. (a)8+9=17,
(b)2·8·9+9·9=225,
(c) 1+17+225=243.
8. (a)9·5=45, (b)9·10·5=450, (c)5+45+450=500. 9.(a)n 3, (b)n(n-1)(n-2), (c)3·n 2. 10. (a) 4 · 3 · 2 = 24,
(b) 33 = 27,
(c) 3 · 22 = 12.
11. Note that any factor of the number N is of the form p~ 1 p;2 • • • p~n , where ir E Ar = {0, 1, ... , kr }, r = 1, 2, ... , n, and apply the multiplication principle. 12. 4n. 13. (a) 3 13 = 1,594,323, (b) 25 · 32 = 288. 14. 143 . 9 . 103 = 24,696,000.
15. kn. 16. Apply the multiplication principle (a) with Ar = {1, 2,} and (b) with Ar = {1, 2, ... , k} for r = 1, 2, ... , n. Then the number of divisions (a) in two subsets is 2n and (b) ink subsets is kn.
17. Note that a map f from X into Y corresponds to an ordered ntuple (Yit,Yh,··· ,Yjn) with Yir = f(xr), r = 1,2, ... ,nand apply the multiplication principle. 18. Suppose that each cell contains at most one object and conclude that this hypothesis leads to a contradiction. Use the fact that each integer k; E K can be written in the form ki = 2r; · s;, where r; is a nonnegative integer and s; is a positive odd integer less than 2n, and apply the pigeonhole principle.
19. Consider the partial sums s1 = k 1, s2 · · · + kn and apply the pigeonhole principle.
= k1
+ k2, ... , sn = k1 + k2 +
20. Each integer i from the set {1, 2, ... , 10} can be written in the form i = 2r; · s;, where r; is a nonnegative integer and s; belongs to the set
{1, 3, 5, 7, 9} of five positive odd integers. Apply the pigeonhole principle and conclude that between the six chosen numbers there are two having the same s.
CHAPTER2 1. (a) Let the four boys {bt, b:!, b3, b4 } seat first. Then the three girls {9 1, 92, 93} may take any three among the five permissible positions
CHAPTER2
547
{w 1,w2,w3,w4,w5 }, where Wi is the position before the i-th boy fori= 1, 2, 3, 4 and w5 is the position after fourth boy. Apply the multiplication principle and conclude that the required number is 4!(5)3 = 480. (b) 7! = 5040. 2. 16. 15 = (2. 15) . 8 = 240. 3. 4!(51. 3! . 1. 1) = 17,280. 4. 4 3 = 64, 3. 3 2 = 27. 5. (7)4 = 840. 6. Consider the set Aj that contains the permutations of {j,j+1,j+2}, j = 1, 2, 3,4, and conclude that the required number is N(A 1 ) + N(A2) + N(A3) + N(A4) = 4 · 3! = 24.
7. (a) 2 · 33 =54, (b) 9 · 102 · 5 = 4500, (c) 9 · 10 2 · 5 8. (a) (10)4 = 5040, (b) 104 = 10,000.
= 4500.
9. Consider the two like elements of each of the 2 kinds {w1 , w2} as two single elements and conclude that the required number is (2 . 3 + 2 )! = 8! = 7' = 5040 23 . 12 23 . . 10. 10!/2 2 = 907,200. 11. N(A) = 3 · 3! + 2 · 3 + 1 = 25, N(fl) = 63 = 216.
N(B) = 3 · 3! + 3 · 3 = 27,
12. Note that each circular permutation (i 1 , i2, ... , in) of the set {1, 2, ... , n} corresponds ton (linear) permutations of the same set and conclude the required number. 13. (a) 2 · (5)3 · 2 · 3 = 720, 3
14. (a) (8 + 3)! · 2
(b) (5)3 · 2 = 120
= 319,334,400,
(b) (8 + 3 - 1)! · 23
15. (a) N(A 4) = 42 = 16, (b) N(A3) = 32 = 9, (c) N(B4) = N(A 4 - A 3) = N(A 4)- N(A 3) 16. N(D4)
= N(C4- C5) = N(C4)- N(C5) 2 - (6- 5 + 1) = 5.
= (6- 4 + 1) 2
17.
(7)
18. 2
2 + 7=
(7 + 2- 1) 2
G) G)+(~)
19. (a)
G).=
= 28.
2
10, (b)
= 472.
G) =
10.
= 42 -
= 29,030,400 32
= 7.
HINTS AND ANSWERS TO EXERCISES
548
20. (a) (;) (;),
(b)
(~)2 5 ,
21. (a) 510 = 9,765,625,
22.
23. (a) c2°) 8!
C+ ~~-
(b)
G) G) + G) G)
C;).
(c)
1 ) = 1001.
= 420.
= ~! = 1,814,400, 1
(b) c3°) 7!
1
= 3~! = 604,800,
1 - "22 10! -- 907,200. (c) ( 10) (8) 6.2 2
10! 24. 1!2!3!4! = 12,600. 6! 25. (a) ( !) 3 = 90, 2 10! 26. (a) 25"
6! (b) 31 ( 2!) 3 = 15.
= 113,400,
(5!) 2
= 14,400,
(b ) 10! -- 945, 5.1 -- 120. 5125
11
27. (a) 3 11 = 177,147,
(b)
L 3 · 1i2ll-i = 3(2
6
-
1) = 189.
j=6
28. The required number is the number of paths from the point (0, 0) to the point (5, 3) and equals = 56.
m
29. Consider the inverse procedure starting with n one-element sets and, at each stage merging together any two subsets derive, by applying the multiplication principle, the required number. 30. (a) The least number of lockers needed is the number of different "restricted" lockers needed and equals an = (;), which is the number of k-combinations of the n generals, with k = [n/2] the integer part of nj2. (b) The number of keys a general should have equals bn = (n; 1 ), which is the number of k-combinations of n - 1 generals. 31. (a) The number of n-combinations of a set Wr+s, of r + s elements, which equals (r~•), may equivalently be evaluated by selecting k elements from a subset Ar ~ Wr+s, of r elements, and n - k elements from the complementary set Wr+s- Ar of s elements, fork= 0, 1, ... , n, and using the principles of multiplication and addition. (b) Similarly, evaluate the number of n-combinations of Wr+s with repetitions. 32. (a) Use the expression
(~)
=
k!(n~ k)!"
(b) The pair of sets (A, B), with A~ B ~ Wand N(A) = k, N(B) = s, N(W) = n, uniquely corresponds to the pair of sets (A, C), where C =
CHAPTER2
549
B - A, with A ~ fl and C ~ A' = W - A. Also, the same pair of sets (A, B) uniquely corresponds to the pair of sets (A, D), where D = B- A, with D ~ fl and A~ fl- D. Evaluate the pairs of sets (A, B), (A, C) and (A, D) and conclude the first two equalities. The other two equalities are similarly deduced with s = r + k. 33.
Multiply the expression
.
(n) k
and deduce the first relat10n. Express
n'
= k!(n ~ k)! by n = (n - k)
(n) (s+(n+s)) k
=
k
+ ·k
as a sum of
binomial coefficients, by using the first expression in Exercise 31; using the second part of Exercise 32, deduce the required formula. n) n! (n+1)k+(n-k) 34. Multiply the expression ( k = k!(n _ k)! by n = k+ 1 and deduce the first relation. Work as in the second part of Exercise 33. 35. Use Pascal's triangle and, splitting the sum into two sums, conclude the first formula. Using the first part of Exercise 32 and the first part of this exercise, derive the second formula. 36. The use of Pascal's triangle splits the sum into two sums, which reduce to the required expression.
37. Verify that each injective map f of X into Y, with f(xr) = Yir, r = 1, 2, ... , k, uniquely corresponds to a k-permutation (Yh, Yh, ... , Yik) of the set Y. 38. Verify that each map f of {1,2, ... ,k} into {1,2, ... ,n} uniquely corresponds to a k-combination (a) without repetition if f is strictly increasing and (b) with repetition if f is increasing.
39. Consider the set C of k-combinations of the set Wn+I in which the element w 0 appears at most s times and the subset Cj ~ C of these combinations in which the element w 0 appears exactly j times, for j 0, 1, ... , m, with m = min{k, s }, and apply the addition principle. 40. Consider the set E of k-combinations of n, with repetition, in which each element appears at most twice and the subset Cj ~ E of these combinations in which exactly j elements appear twice, for j = 0, 1, ... , m, with m = min{n, [k/2]} and apply the addition principle. 41. Consider the set A of k-combinations of n + r with repetition, in which each of n specified elements appears at most twice, while each of the other r elements appears at most once. Further, consider (a) the subset Ai ~ A of these combinations in which exactly j of the n specified elements appear twice, for j = 0, 1, ... , m, with m = min{n, [k/2]}, and apply the
550
HINTS AND ANSWERS TO EXERCISES
addition principle. Also, consider (b) the subset Bi ~A of these combinations in which exactly i of the r elements appear, fori = 0, 1, ... , s, with s = min {r, k}, and apply the addition principle. 42. Consider the set K of the k-combinations of n elements belonging in r kinds with k 1 , k2 , ... , kr elements, respectively. Further, consider the subset Ki ~ K of these combinations which contain exactly j of the k 1 elements of the first kind, for j = 0, 1, ... , k 1 and apply the addition principle. 43. (a) Use Theorem 2.10. (b) Consider an element w of the set Wn, of n elements, and enumerate the partitions of Wn in k subsets in which w belongs in a unit set and the partitions of Wn in k subsets in which w belongs in a subset that is not a unit set. Applying the addition principle, conclude the required recurrence relation. (c) Enumerate the partitions of Wn in k subsets in which w belong in a subset with a total of j elements, for j = 1, 2, ... , n and apply the addition principle. 44. (a) Show that the required number equals the product of the number of partitions of X ink subsets and the number of k-permutations ofY. (b) Use the result of Exercise 1.17. (c) Use the first part of Exercise 32. 45. Note that, to each partition of a set Wn in k (nonempty) subsets, there correspond k! divisions of Wn in k nonempty subsets, and use the result (c) of Exercise 44. 46. (a) Use Theorem 2.10. (b) Consider an element w of the set Wn, of n elements, and enumerate the partitions of Wn in which w belongs in a subset with a total of j elements, for j = 1, 2, ... , n, and apply the addition principle. 47. Consider the set P of partitions of the set Wn, of n elements, and the subset Pk ~ P of partitions of Wn in k subsets, for k = 1, 2, ... , n, and apply the addition principle and the result (a) of Exercise 43. Further, introduce the expression (c) of Exercise 44 into the preceding expression. 48. The required number equals (~:::~), the number of positive integer solutions of the linear equation x 1 + X2 + · · · + Xn = k. 49. Select first the s positions for the s runs of zeros among the n- k + 1 positions between the n - k ones or before the first and after the last one. Then (a) allocate the k zeros in the selected s positions, placing at least one zero in each of these positions. (b) Choose the sr positions of the runs of length r, for r = 1, 2, ... , k, among the s selected positions. 50. To each k-combination {i 1 , i 2 , ..• , ik} of the set {1, 2, ... , n} correspond the permutation (a 1 , a 2 , ... , an) of k zeros and n- k ones in which the element ai,, ai 2 , ••• , aik are zeros. Verify that this correspondence is one-to-one and use the result of Exercise 49.
CHAPTER 2
551
51. To each (circular) k-combination of the first n integral numbers displayed on a circle, correspond a circular permutation of k zeros and n- k ones in which one of the n elements is marked with a star corresponding to number 1.
52. (a) Use the one-to-one transformation Yi = Xi-s, i = 1, 2, ... , n, and conclude that the required numbers equals (n+z=:~- 1 ). (b) Use the one to one transformation Zi = m- xi, i = 1, 2, ... , n and conclude that the required number equals (n+:~=z- 1 ). 53. To each partial derivative of order k of an analytic function of n variables, correspond a nonnegative integer solutions of a linear equation 1 r1 + r2 + · · · + rn = k and conclude that the required number is ).
(n+z-
54. Verify that the number of monomials in the most general polynomial in n variables X1, x2, ... , Xn of degree k equals the number of nonnegative integer solutions of a linear inequality r 1 + r 2 + · · · + rn -::; k and conclude that an,k = (ntk). 55. Correspond to each k-combination of {1, 2, ... , n }, satisfying the required property, an integer solution of linear equation ji + h + · · · + ik + jk+ 1 = n, satisfying the restrictions j 1 ~ 1, h ~ s + 1, h ~ s + 1, ... , jk ~ S + 1, jk+1 ~ 0. 56. Using the result of Exercise 55 enumerate the k-combinations of {1, 2, ... , n }, displayed on a circle, which satisfy the required property and (a) do not contain the elements n- s + 1, n- s + 2, ... , n and (b) contain at least one of the s elements n- s + 1, n- s + 2, ... , n and apply the addition principle.
57. (a) The evaluation of the number C(n, k; sk-I) may be reduced to the enumeration ofthe k-combinations {j1 , h, ... , jk} of {1, 2, ... , n-sk-d by using the transformation j 1 = ii, im = im- Sm-1> m = 2, 3, ... , k. (b) Using the same transformation, the evaluation of the number B(n, k; sk-I, r) may be reduced to the enumeration of the k-combinations {j 1 ,h, ... ,jk} of the set {1, 2, ... , n- sk-d, which satisfy the restriction jk -::; n- sk-1 + (ii - r- 1). 58. The number Qn,k equals the number of ways of selecting k positions for the zeros among the (n-k-1)+2 = n-k+1 positions between the n-k ones or before the first and after the last one. Apply the addition principle to deduce Qn· Use Pascal's triangle to deduce the recurrence relation. 59. The required number is given by Cn+I = N(A-B) = N(A)-N(B), where A is the set of lattice paths from the point (0, 0) to the point (n, n) and B is the set of lattice paths from the point (0, 0) to the point (n, n) that do not touch or intersect the straight line x = y - 1.
HINTS AND ANSWERS TO EXERCISES
552
60. (a) Note that each lattice path from (0, 0) to (n, k) with r diagonal steps requires, in addition, k- r vertical and n- r horizontal steps. Select the r diagonal and k- r vertical steps among the total of n + k- r steps. (b) Exclude the r diagonal steps and enumerate the number of lattice paths from (0, 0) to (n - r, k - r) that do not touch or intersect the straight line x = y. Such a path passes through n + k - 2r points (not including the origin). Select the r starting points of the diagonal steps among the n + k - 2r points. 61. Use Laplace's classical definition of probability and the results of Exercise 60. 62. The probability that number r is drawn at the k-th drawing is given by Pn,k = (n- 1)k-t/(n)k· 63. Consider the set fh of possible outcomes of k drawings and the subset Ak of these outcomes in which a white ball is drawn for the first time at the k-th drawing. Then Pn,r,k = P(Ak)/ P(ilk), k = 1, 2, ... , r + 1. Use the fact that A 1 + A2 + · · · + Ar+l = ilk to conclude the required expression.
65. Use Laplace's classical definition of probability and the result of Exercise 58.
CHAPTER3 1. Use Vandermonde's formula to get Sn,r
= (n)r(a)r(a + b- r)n-r·
2. Express (x + y + n)n into factorials of x and y + n, using Vandermonde's formula, and then multiply both members by (Y)-n = 1/(y + n)n· 3. Express (Y)n = ( -1)n(x + (-x- y -1 + n))n into factorials of x and ( -x- y- 1 + n) and then divide both members by (x + y)n· 4. Rewrite the expression to be shown as
f.(~=
D(r; ~: j) = (r; s),
which follows from the expansion of the identity [tn(l- t)-n][tr-n(I- t)-r+n-1] = tr(l- t)-r-1 into powers oft.
CHAPTER3
553
5. Use the result of the first part of Exercise 4 to get sn = ns/(r+ 1)n+I and Sn,m = (n + m- 1)m(s)m/(r + m)n+m· 6. Use Newton's binomial formula to get sn,r = (n)rPr·
1. Use Newton's negative binomial formula to get Sn,r = (n+r-1)r}r· 8. Differentiate a suitable expression of Newton's binomial formula (see Example 3.4). 9. Integrate a suitable expression of Newton's binomial formula (see Example 3.5).
10. Use the result of Exercise 2.32 and Newton's binomial formula. 11. Use Pascal's triangle to split the sum and derive the recurrence relation. 12. Use Newton's binomial formula (3.10) with x = -t, y = 1 and formula l:::~= 1 uk- 1 = (1- u)- 1 (1- un) with u = 1- t. 13. Integrate, with respect to t, in the interval [0, u] the identity derived in the first part of Exercise 12 and then integrate, with respect to u, in the interval [0, 1] the resulting expression to deduce the required relation. 14. Use Pascal's triangle to derive the recurrence relation. 15. Use the result of Exercise 14 with z = 1/2 and z = -1/2. 16. Use the relation
1 - _1_ (1 +
r-k+1-r+1
k
)
r-k+1 to derive the recurrence relation and iterate it to get the required expression.
17. Express ('"!k) into binomials of x and k, using Cauchy's formula, and then use the result of Exercise 10. 18. Use Cauchy's formula with x = y = n = 2r and x to derive the first and the second sums, respectively.
= y = n = 2r + 1
19. Express (~!~) into binomials of n and r, using Cauchy's formula and then use the result of Exercise 10. 20. Use the relation kG) = r(~=:~) and evaluate the resulting expression by expanding the identity (x + 1r- 1 (x + 1) 8 = (x + 1r+s- 1 into powers of X.
21. Expand the identity (1- W(1-t)-s- 1 = (1-t)-s+r- 1 into powers of t and equate the coefficients of tn in both sides of the resulting expression. 22. Use the relation
(~)(n;r)-
1
(r:~~k)(n:r)-
1
HINTS AND ANSWERS TO EXERCISES
554
and then the result of Exercise 21. 23. Expand into powers oft the identity (1- t)-r- 1 (1- t)-(s-n)- 1 = (1- t)-(r+s-n+ 1l- 1 and equate the coefficients of tn in both sides of the resulting expression. 24. Using Newton's binomial formula, show that
tr(l- t)-r-1
r-s _ r-s-k ( r ~ k) ts(l- t)-s-k-1_ = 2) 1 k=D
Expand this identity into powers of t and equate the coefficients of tn in both sides of the resulting expression. 25. Expand into powers oft the identity (1 + tr(l + t)-s = (1 + w-s and equate the coefficients of tn in both sides of the resulting expression. 26. Use for part (a) the expression
X) X(X - 1) · ·k!· (X - k + 1) , and (k =
for parts (b) and (c) the "triangular" recurrence relation. 27. Expand into powers oft and u the function (1 + t + u + tu)"' = (1+[t(1+u)+u])"', using Newton's general binomial formula. Also, expand into powers oft and u the product of functions (1 + t)"' (1 + u)"'. Equate the coefficients of tnuk in the resulting expansion of the identity.
x)
x(x-1)···(x-k+1)
28. Use the expression ( k = k! , with x = -1/2, for the derivation of the first relation and expand into powers of u the identity (1- 4u)- 112 (1 - 4u)- 112 = (1 - 4u)- 1 to conclude the second relation. 29. Use Pascal's triangle to derive the relations
-X ) = (kX) (n-k
~(X- 1) ( n
k
-X ) _ n- nk + 1 (X1) ( -X ) k-1 n-k+1
n-k
and
Summing these relations for k = 0, 1, ... , r, deduce the required expres· sions. 30. Expand into powers oft the identity
and equate the coefficients of tn in both sides of the resulting expression.
CHAPTER 4
555
CHAPTER4
+ 3 · 84 -74 = 204. 2. N(A' B') = 1000- 31 - 10 + 3 = 962. 3. N(A~A~A;A~A~) = 25 5 - 25 · 24 4 + 10 · 20 · 23 3 + 5. 120. 21 - 120. 1. N(A~A~A;) = 10 4 -3 · 9 4
4. N(At u A2 u A3 u A4 u A5) =
s.
G) G) -G)
10 · 60 · 22 2
= 130.
G) -{G) + (~) + G) + G)} -{G) + G)} N5,2 = G)~( G) j)
= 20 .
3
6.
-1)j
(3-
4
= 360.
7. Apply the inclusion and exclusion principle with {l the set of positive integers less than or equal to 70n and Ai its subset that contains the integers divisible by the prime Si, i = 1, 2, 3, with s 1 = 2, s2 = 5 and s3 = 7.
8. Apply the inclusion and exclusion principle with {l the set of positive integers less than or equal to 100 and Ai its subset that contains the multiples Of i = 1, 2, 3, 4, with S1 = 2, S2 = 3, S3 = 5 and S4 = 7.
sr,
9. Apply the inclusion and exclusion principle with {l the set of positive integers less than or equal ton and Ai its subset that contains the integers divisible by the prime si, i = 1, 2, ... , r. 10. Consider the set {l = {2, 3, ... , r} and its subset Ai that contains the multiples of ai, i = 1, 2, ... , n, with n = E(y'r), and show that E(r)- E(y'r) = N(A~A~···A~). Apply the inclusion and exclusion principle to establish the required expression. 11. Apply the result of Exercise 10. 12. Consider the set {l of nonnegative integer solutions of the linear equation x1 + X2 + · · · + Xn = k, with k a nonnegative integer, and the set Ai ~ {l that contains the solutions for which xi 2: 2, i = 1, 2, ... , n. Evaluate the number N (A~ A~ · · · A~) (a) directly and (b) applying the inclusion and exclusion principle to establish the required identity. 13. Consider the set {l of nonnegative integer solutions of the linear equation x 1 + x 2 + · · · + Xn = k, with k a nonnegative integer, and the set Ai ~ {l that contains the solutions for which Xi = 0, i = 1, 2, ... , n. Evaluate the number N(A;A~ ···A~) (a) directly and (b) applying the inclusion and exclusion principle to establish the required identity.
HINTS AND ANSWERS TO EXERCISES
556
14. Consider the set n of positive integer solutions of the linear equation X} + X2 + ... + Xn = k, with k a positive integer, and the set Ai ~ n that contains the solutions for which Xi > 6, i = 1, 2, ... , n. Then apply the inclusion and exclusion principle to evaluate the required number N(A~A~ ···A~).
15. Note that the number U(n, k,r) is equal to the number of positive integer solutions (il, h, ... , ik) of the linear inequality ii + i+2+· · ·+ ik ::; r which satisfy the restrictions is ::; n, s = 1, 2, ... , k. Use the inclusion and exclusion principle to derive the required expression. 16. Note that the number C(n, k, s) is equal to the number of nonnegative integer solutions of the linear equation x 1 + x2 + · · · + Xn-k+l = k satisfying the restrictions Xi ::; s - 1, for i = 1, 2, ... , n. Use the inclusion and exclusion principle to derive the required expression.
17. Consider the number Bu (n, k, s) of (n- k )-combinations {h, h, ... , in-k} of {1,2, ... ,n}, 1::; i1 < h <··· u, and show that B(n, k, s) = Bo(n, k, s) - B 8 (n, k, s). Further, consider the set n of (n- k)-combinations {il,h,··· ,in-d of {1,2, ... ,n}, with 1 :S h < h < · · · < in-k ::; n, n- (in-k -h) > u and its subset Am that contains those combinations for which im+l- im > s, m = 1, 2, ... , n-k-1. Verify that Bu (n, k, s) = N (A~ A~ · · · A~-k-l) and use the inclusion and exclusion principle to evaluate this number. 18. Consider the set
n of k-combinations {i 1 ,i2, ...
,ik}, 1::; i 1
< i2 <
··· < ik::; n, for which dm
= im+l- im >am, m = 1,2, ... ,k -1 and its subset Am that contains those combinations for which dm > bm, m = 1, 2, ... , k - 1. Verify that the required number equals N (A~ A~ · · · A~_ 1 )
and evaluate it by using the inclusion and exclusion principle and the result of Exercise 2.57. 19. Consider the number Bu(n,k;a 1 ,b 1 , ••• ,ak- 1,bk_ 1) of k-combinations {i1, i2, ... , ik}, 1 ::; i1 < i2 < · · · < ik ::; n, with am < dm < bm, m = 1, 2, ... , k - 1 and n - d > u, and show that
B(n, k; a1, b1, ... , ak. bk) = Bak (n, k; a1, b1, ... , ak-1, bk-d -Bbk(n,k;a1,b1, ... ,ak-1,bk-1)·
Further, consider the set n of k-combinations {i 1, i 2, ... , ik}, 1 ::; i1 < i2 < · · · < ik ::; n, with dm > am, m = 1, 2, ... , k-1, n-d > u and its subset Am that contains those combinations for which dm > bm, m = 1, 2, ... , k- 1. Verify that Bu(n,k;a1,b~, ... ,ak-1,bk-d = N(A~A~···Ak_ 1 ) and evaluate it by using the inclusion and exclusion principle and the result of Exercise 2.57.
CHAPTER4
557
20. Work as in Example 4.5 by considering the subsets A 1 , A 2 , ... , A2 n-l of the set D of the permutations of {1, 2, ... , n }. 21. Use the explicit expressions of Mn and Ln to express Mn in terms of Ln. Then express Mn and Ln in terms of the auxiliary numbers
Kn
=
i:<-1)kcn-:+ 1)
k)!
k=O
and, crossing out Kn, deduce the required recurrence relations for the Mn and Ln. 22. Consider the set D of seating n married couples around a circular table and its subset Aj which contains the seating of the j-th man next to his wife, j = 1, 2, ... , n. Using the inclusion and exclusion principle, evaluate the number H n = N (A~ A~ · · · A~).
23. Work as in Exercise 22. 24. Consider the set D of the terms in the development of a determinant of order n and its subset Ai that includes the terms containing the element ai, i = 1, 2, ... , n. Using the inclusion and exclusion principle, evaluate Dn,k·
25. Consider the set D of the different outcomes of a series of k throws of a die and its subset Ai of outcomes in which the i-th face does not appear, i = 1, 2, ... , 6. Using the inclusion and exclusion principle, evaluate the number Q(k, r) = N(A~, A~ 2 ···AU. 26. Consider the subset Bi of Dk that contains the different outcomes of a series of k throws of a pair of distinguishable dice in which the pair (i,i) does not appear, i = 1,2, ... ,6. Using the inclusion and exclusion principle, evaluate the number N(Ak) = N(B~ B~ · · · B~).
27. Consider the set D of k-permutations (a 1, a 2 , ••• , ak) of Wn = {w 1 , w2 , ..• , Wn} with repetition and its subset Ai which includes those permutations that do not contain the element Wi, i = 1, 2, ... , n. Evaluate the number U1 (n,k) = N(A~A~ ···A~) by applying the inclusion and exclusion principle. 28. Work as in Example 4. 7. 29. Consider the set D of the permutations of the 2n elements and its subset Aj of those permutations in which the two like elements of the j-th kind are consecutive, j = 1, 2, ... , n, and apply the inclusion and exclusion principle to evaluate the number Qn = N(A~A~ ···A~).
30. Consider the set D of the s-tuple drawings and its subset Ai that contains the s-tuple drawings in which number i is not drawn, i = 1, 2, ... , n. Then apply the inclusion and exclusion principle to evaluate the number L(n, r, s) = N(AJ.A~ ···A~).
HINTS AND ANSWERS TO EXERCISES
558
31. Consider the set D of divisions (At, A2, ... , Ar) ofW, with N(W) = n and N(Ai) 2: s, i = 1, 2, ... , n, and its subset Di that contains those divisions for which N(Ai) = s, i = 1, 2, ... , r. Note that D(n, r, s + 1) = N(D~D~ · · · D~) and use the inclusion and exclusion principle to evaluate this number in terms of the numbers N(Di 1 Di 2 • • • Di, ), {it, i 2 , •.• , iJ} ~ {1,2, ... ,r}. 32. Work as in Example 4.10 and use the result of Exercise 31. 33. Express the product sum of binomial coefficients, r!C(n,r;s)fn!, as a coupon collector's number (see Example 4.11) and using the inclusion and exclusion principle, evaluate it. 34. Work as in Exercise 33. 35. Use expression (4.20) and the result of Exercise 2.32. 36. Use expression (4.21) and the result of Exercise 2.32. 37. (a) The necessity of the condition follows from f(x, x)g(x, x) = 1 for every x in P. The sufficiency is shown by induction starting from g(x, x) = [f(x, x)t 1 for every x in P since Pis locally finite. (b) Introducing into the expression h(x,y) = L.x<w~yh(x,w)c5(w,y) the function g(x,y), through the result of part (a), and interchanging the order of summation, conclude that h(x,y) g(x,y). (c) Set into the expression of part (a) f(x,y) ((x, y) and g(x, y) = h(x, y) = J.L(x, y).
=
38. Use the zeta function and the fact that '£z~y~x ((z, x)J.L(Y, x)
= =
c5(z,x). 39. Use the expression of J.L(X, Y) in part (c) of Exercise 37 to show that the relation holds for N(Y) - N(X) = 0, 1 and, assuming that it holds for N(Y) - N(X) S r- 1, show that it also holds for N(Y) - N(X) = r. 40. Use the results of Exercises 38 and 39.
CHAPTERS 1. Use the explicit expression of Dn and the inequality connecting the remainder of an alternating series with the first omitted term.
2. Use the explicit expression of Dn to derive the first recurrence and using it deduce the second recurrence relation. 3. Note that, in a permutation (jr,h, ... ,jn) of the set {1, 2, ... , n}, which is of rank k, there are r elements among the n-k elements (Jk+t, jk+ 2 ,
CHAPTER5
559
... , in) that remain fixed, for r = 0, 1, ... , n- k. Then use the addition principle to deduce the required expression.
4. Summing the recurrence relation for k = 2, 3, ... , n, conclude that Rn-l = (n- 1)!. Multiplying the recurrence relation by k and summing fork= 2, 3, ... , n, conclude that En-1 = n!- Dn. 5. Using the relation n- s- 1 = (n- k) expression of Rn,k·
+ (k- s -1), split the explicit
6. Consider the set fl of permutations (ii, h, ... , in) of { 1, 2, ... , n} and its subset As that contains the permutations in which is is a fixed point, s = 1, 2, ... , n. Use the inclusion and exclusion principle to evaluate the number En,r = N(A~, A~ 2 ···AU. Use Pascal's triangle to split the explicit expression of En,r and then the relation n- i = (n- r) + (r- i), derive the first and second recurrences, respectively.
7. Consider the subsets Ai, , Ai2 , ••• , Ai. of fl defined in Exercise 6 and evaluate the number En,r,k of elements of fl that are contained in k among the r sets Ai 1 , Ai2 , ••• , Ai. by applying the inclusion and exclusion principle. 8. Using the relation n- k- i = ( n- k) of En,r,k·
i, split the explicit expression
9. Utilize the fact that there are s fixed elements among the n - r non-specified positions for s = 0, 1, ... , n- r. 10. Consider the set fl of allocations of n letters and n invoices into n envelopes and its subset Ar that contains the allocations in which both the r-th letter and the r-th invoice are placed in the r-th envelope, for r = 1, 2, ... , n. Use the inclusion and exclusion principle to evaluate the number Qn = N(A~A~ ···A~). 11. Utilize the explicit expression of Qn.
12. Consider the subsets A1 , A2 , ... , An of fl defined in Exercise 10 and evaluate the number Qn,k of elements of fl that are contained ink among the n sets by applying the inclusion and exclusion principle. 13. Consider the set fl of the different drawings of the balls from the r urns and its subset Aj that contains the drawings in which the i-th ball is drawn from each urn at the i-th drawing, j = 1, 2, ... , n. Evaluate the number Bn,r = N(A~A~ ···A~) and the number Bn,r,k of elements of fl that are contained in k among the n sets A 1 , A2 , ... , An by applying the inclusion and exclusion principle.
14. Use the explicit expression of Bn,r·
15. Consider the set fl of the different drawings of the sn balls from the urn and its subset Ai that contains the drawings in which a ball bearing
HINTS AND ANSWERS TO EXERCISES
560
the number i is drawn at the i-th drawing, i = 1, 2, ... , n. Evaluate the number Gn,s = N(A~ A~··· A~) and the number Gn,k,s of elements of D that are contained in k among the n sets A1 , A2 , ... , An by applying the inclusion and exclusion principle. 16. Consider the subsets A1 , A2 , ... , An of D that are defined in Exercise
15. Then Hn,k,s is the number of elements of D of rank k with respect to the sets
A1, A2, ... ,
An.
17. Note that the permutations of {1, 2, ... , n, n+ 1} may be constructed from the permutations of {1, 2, ... , n} by attaching the element n + 1 in one of the n + 1 possible positions. Further, this attachment either alters (reduces or increases by one) or keeps unchanged the number of successions. 18. Use the expressions connecting Cn,k and Dn,k with Cn and Dn, respectively, along with the expressions (5.12) and part (a) of Exercise 2.
19. Consider the set Ar,s of permutations of {1, 2, ... , n} that include the transposition (r, s), for r, s = 1, 2, ... , n. Note that there are G) different such sets and a permutation of {1, 2, ... , n} is contained in at most m = [n/2] among these sets. Using the inclusion and exclusion principle, evaluate the number Tn,k of permutations of {1, 2, ... , n} that are contained in exactly k among these sets. 20. Use the explicit expression of Tn,k for k = 2r and k = 2r
+ 1.
CHAPTER6 1. A(t) = ~ ~ akt k = t 7 (1 - t) -5 , ak = k=7
(k-4 3) ,
k = 7, 8, ....
18
2. A(t) = Laktk = (t + t 2 + · · · + t 6 ) 3 = t 3 (1- t 6 ) 3 (1- t)- 3 , k=3
ag =
G) -G) G)
= 25, an =
G) -G) G)
= 27.
17
3. A(t) = Laktk = (1 +t 2 + ··· +t 8 )(t+t 3 + ··· +t 9 ) k=1
=t(1-t 10 ) 2 (1-t 2 )- 2 , a7=4, ag=5, an=4.
561
CHAPTER 6
4. A(t)
a13
= (1 + t +
=
c 6 3)
= 280, 00
5. (a) E(t) =
· · · + t 13 )4 = (1- t 14 ) 4(1- t)-4, a26
=
tk
c:) -G) c:)
L ak k! = (1 + t)
5
= 1834.
,
k=O
8
00
L
tk
(
t2 ) 1+ t + ! + ··· 2
ak k! = k=O = (eiOt- 2e8t + e6t)/4, ak
6. (a) E(t) =
00
tk
(b) F(t) = Lbkk! = k=O
(
(b) F(t)
=
f:
bk ~
t3 ) t + ! + ··· 3
= (104- 2. 8k + 6k)/4,
t2 ) 1+t+ 2! +···
= (elOt + 2e8t + e6t)j4,
2
(
8
(
t2 t4 ) 1+ 2! + 4! +···
2
bk = (lOk + 2. 8k + 6k)j4.
= ~(e 10 t- ebt),
bk
= (10k- 6k)j2.
k=O 00 tk 8. (a) E(t) = Lak k! = e4 t k=O 00
(b) F(t)
+ eu,
ak = 4k
tk
= Lbk k! = e 4 t + e3 t -1,
bk
+ 2k,
= 4k + 3k.
k=O 9. Tn(t) = 2:~~ 0 T(n, k)tk = (1 + t+ t 2 )n. Use first Newton's binomial formula to expand Tn(t) = ((1 + t) + t 2 )n. Then, expand the resulting expression into powers oft to deduce the first expression. In order to derive the second expression, expand each factor of Tn(x) = (1 - t 3 )n(l - t)-n into powers of t and form the Cauchy product of series.
10. Expand each member of Tn(t) = Tn-l(t) + tTn-l(t) + t 2 Tn-l(t) into powers of t and equate the coefficients of tk in both members of the resulting expression. 11. Differentiate the generating function Tn(t) to get the expressions = nTn_I(t)+2nTn_I(t), T;:(t) = 2n(2n-1)Tn-l(t)-3n(n-1)Tn-2(t), which, expanded into powers oft, imply the required recurrence relations.
T~(t)
562
HINTS AND ANSWERS TO EXERCISES
12. Cross out the term T(n - 1, k - 2) between the two recurrence relations of Exercise 11 to deduce the recurrence relation for Tn = T(n, n). Multiplying the recurrence relation by tn- 1 and summing for n = 2, 3, ... , derive the first order differential equation (1 - 2t- et 2 )T' (t) = (1 + et)T(t), with T(O) = 1. Integrate it to obtain the required expression. 13. Use Lagrange formula with f(t) = 1, g(t) = 1 + t + t 2 to show
that T(n) = (1- u- 2ut)- 1 , with t = h(u) the inverse of u = h- 1 (t) = t/(1 + t + t 2), and thus conclude that T(u) = =F(1- 2u- 3u2)- 1 12, where the case -(1- 2u- 3u 2)- 112 is rejected. 14. An,r(t) = A(n, r, k)tk = (1 + t + t 2)n(1 + W· Expand first the
L:;::6r
term ((1 +t) +t 2 )n, using Newton's binomial formula, and then expand the resulting expression of An,r(t) into powers oft to obtain the first expression. In order to derive the second expression, expand each member of An,r(t) = Tn(t)(1 + t)n into powers oft and form the Cauchy product of series. 15. An(t) = L~o G(n, k)tk = (1 + t 2 + t 4 + · · · )n = (1- t 2)-n.
= L~o H(n, k)tk = (t + t 3 + t 5 + · · · )n = tn(l- t 2)-n. Bn,s(t) = L:Z~~ B(n, k, s)tk = (1 + t + t 2 + .. · + t")(1 + t)n. Expand
16. Bn(t)
17. the second factor into powers oft, using Newton's binomial formula, and in the resulting expansion of Bn,s(t), equate the coefficients of tk. Further, derive the relation (1 - t)Bn,s = (1 - t•+ 1 )(1 + t)n, which, expanded into powers oft, yields the required expression. 18. En,s(t)
= L:::0 E.(n,k)tk = (1+t+ .. ·+t")n.
Expandeachmember of En,s(t) = En-I,s(t) + tEn-1,s(t) + · · · + t• En-1,s(t) into powers oft and equate the coefficients of tk in both sides of the resulting expression. 19. Expand the identity An,s(t) = Ar,s(t)An-r,s(t) into powers oft. Also, expand An,s(t) = (1 + t(1 + t + · · · + t•- 1 ))n, using Newton's binomial formula, and then expand the resulting expression into powers oft. 20. Use the exponential and the geometric series to deduce the expression of the generating function P(t), which can be written in the form P(t) = tP(t) + et. Expanding both members of the last relation into powers oft, deduce the required recurrence relation. 00
21.
An(t)
=
L
tk A(n, k) k!
=
(
k=O
t2
1+ ! 2
t4
+ 4 ! + .. ·
) n
=
(
e
t
+ 2
e
-t) n
Expand the generating function to get the explicit expression. Differentiate twice the generating function to find the differential equation A~(t) = n 2 An(t) +n(n-1)An_ 2(t), which implies the required recurrence relations. oo
tk
22. Bn(t) = { ; B(n, k) k! =
(
t3 t5 )n t + ! + 5! + .. · 3
=
(et _e-t)n
Expand the generating function to find the required expression.
2
CHAPTER 6
563
23. Differentiate the generating function Bn(t) to get the differential equation B~(t) = n 2 Bn(t) + n(n- 1)Bn_ 2 (t), which implies the required recurrence relations. 24. Rn(t) = 'L.~: 0 R(n,k)tkfk! = (1 + t + t 2 /2)n. This generating function satisfies the relation Rn+l (t) = Rn(t) +tRn(t) +(t 2 f2)Rn(t), which implies the first recurrence relation. Further, differentiate Rn(t) to find the differential equations R~(t) = nRn(t)- (nt 2f2)Rn-I(t) and R~(t) = n(2n- 1)Rn-I(t)- n(n- 1)Rn- 2 (t), which, expanded into powers oft, imply the other two recurrence relations. 25. Sum for all k = 0, 1, ... , 2n - 2 the third recurrence relation of Exercise 24 to find the required recurrence relation.
26. Use the fact that the stick is initially broken into two parts of length j and n- j units, respectively, to derive the recurrence relation. Note that the recurrence relation and its initial conditions coincide with the recurrence relation and initial conditions of the Catalan numbers.
27. Consider the vertices VI, v2 , .•. , Vn of the convex n-gon circularly ordered and note that Vn VI is a side of the triangle Vn VI Vk, for k = 3, 4, ... , n- 2, obtained by ruling the diagonals VnVk and VkVI, or the triangle VnVIV2 obtained by ruling the diagonal VnV2, or the triangle VnVIVn-I obtained by ruling the diagonal Vn-I VI· Use that the ruling of these diagonals divides the convex n-gon into a convex k-gon and a convex (n- k + 1)-gon, for k = 3, 4, ... , n- 2, or into a triangle and a convex (n- 1)-gon, or into a convex (n- 1)-gon and a triangle, to establish the recurrence relation. Multiplying it by tn and summing for n = 3, 4, ... , derive the generating function which implies the required expression. 28. (a) Multiplying the recurrence relation by tn and summing for = 1,2, ... , derive the recurrence Ck(t) = CI(t)Ck-dt), k = 2,3, ... , and iterate it to find the required expression. (b) Show that ck+I(t) = Ck(t)- tCk_I(t) and deduce the required recurrence relation. (c) Expand the generating function Ck(t) to get the explicit expression of the numbers
n
c~k}_
29. Work as in Example 6.4.
30. Use the symbolic calculus to show that S(t, u) = Se 5 u+tu, sr :=Sr. Then use the result of Exercise 29 to deduce the required expression of the generating function. 31. Determine the moment generating function B(t) = L~o Jl(r)tr fr! and from it deduce the probability generating function P(t) = L~oPktk. Expand it to find the probabilities Pk = e--' Ak /k!, k = 0, 1, ....
32. Use the expansion of the exponential function and the geometric series.
HINTS AND ANSWERS TO EXERCISES
564
33. Use the general binomial formula and the geometric series. k
34. In order to evaluate the series An(t) = 2::~ 0 an,ktk, split it for n - 1 and k 2: n.
~
35. Use the negative binomial formula.
CHAPTER 7 1. an= (1
+ r)n · 10,000.
2. an= 10 · gn- 1 . 3. (b + 1)an = l:Z=o ak +a, n = 2, 3, ... , (b + 1)a1 = a1 +a. Take the difference (b + 1)an- (b + 1)an_ 1 to establish the required recurrence relation. Iterate it to get an= (a/b)(1 + 1/b)n- 1.
5. Consider a plane divided into Rn- 1 regions by n- 1 lines, each two of them having a point in common but no three of them having a point in common. Rule the n-th line and establish the recurrence relation. Iterate it to find the unique solution. 6. Consider also the number bn of n-permutations of the set {0, 1, 2} with repetition that include an odd number of zeros and establish the relation an+1 = 2an + bn, which, along with the relation an+ bn = 3n, implies the required recurrence relation. Its solution is an = 2 + 3(3n- 1 - 1)/2.
7. Iterate the recurrence to get an= (2n-1)(2n-3) · · · 3·1/(2n·n!) and multiply it by 2n(2n- 2) · · · 4 · 2 = 2nn! to establish the required expression. 8. Derive the auxiliary relations an+ 1 = 9an and deduce the required recurrence relations.
+ bn
and bn+1 =an+ 9bn
9. Use the fact that the last two elements of an n-digit nonnegative integer are either different or like to derive the required recurrence relation. 10. Use the fact that the first position of such a permutation may be occupied either by any of the numbers {1, 2} or by 0 to establish the required recurrence relation. 11. Use the fact that the last two elements of such a permutation are either two different elements of the set {0, 1, 2} or two 2s to establish the required recurrence relation.
CHAPTER 7
565
12. Use Pascal's triangle to derive the relations an bn = 4an-l - bn-l· 13. an
2
= ~ { ( 2 + J5) n+l
14. an= Ct 15. an
= Ct
- (2 -
bn- an-l and
J5) n+l}.
+ c2( -2)n + 2n- 2 . + c2n + 3n-l /4.
16. Use the fact that in such a permutation either the last element is different from its previous one or the last j elements are like elements different from their previous element, for j = 2, 3, ... , r - 1.
17. (a) Utilize the fact that the first position of such a permutation may be occupied either by any of the numbers { 1, 2, ... , s} or by 0. (b) Note that such a permutation contains at least k elements from the set {1, 2, ... , s}, with k = n/2 if n is even and k = (n- 1)/2 if n is odd. (c) Multiply the recurrence relation by tn+l and sum for n = 1, 2, .... 18. Distinguish these permutations according to the number of zeros each permutation contains and show that the number of those permutations that contain k zeros equals (nk"k) sn-k-l. 19. The first expression may be derived either by the method of characteristic roots or by the method of generating function. Expand this expression, using Newton's binomial formula, to establish the second expression. 20. Use the fact that the last two elements of such a permutation are either different elements of the set fl or like elements of fl 1 to establish the recurrence relation. 21. Distinguish these permutations according to the number of Os that they include before the first 1 in order to get the recurrence relation. 22. Distinguish these permutations according to the number of Os each permutation contains and show that the number of those permutations that contain k Os equals Es-l (n- k, k). 23. Work as in Example 7.8.
24. Distinguish these cyclic permutations according to the number of Os that follow the marked element, if this is 1, or the first 1 after the marked element. 25. Use the result of Exercise 2.55 to find the explicit expression
fn+s,•
=~
8
(n + k- ks), m
= [(n + s)/(s- 1))
and, using Pascal's triangle, deduce the recurrence relation.
HINTS AND ANSWERS TO EXERCISES
566
26. Use the result of Exercise 2.56 to find the explicit expression 9n,s
=~
n:: ks (n ~ ks), m= [n/(s +I)]
and, using Pascal's triangle, deduce the recurrence relation. 27. (a) Multiply the general recurrence relation by tn and sum for n = 0, 1, ... to get for the generating function Fk(t) the recurrence relation Fk (t) = F1(t)Fk-1 (t), k = 2, 3, .... Iterate it to find the explicit expression for Fk(t). (b) Expand Fk(t) into powers oft to obtain f~k)_ (c) Multiply Fk(t) by uk and sum fork= 0, 1, ... to derive F(t, u). 28. Consider a plane divided in Rn-l,k-I regions by n- 1 lines, k- 1 of them being parallel to each other but no three of them having a point in common. Rule the n-th line and establish the recurrence relation. Iterate it to find the unique solution. 29. Multiplying the recurrence relation by tn- 2 j(n- 2)! and summing for n = 3, 4, ... , derive the differential equation (1- t)S'(t) = (1 + t)S(t); integrating it, deduce the required expression of S(t)." 30. (a) Show first that
(~) - = 1
n: 1(n ~ 1) - (k: 1) 1
_
-I
and then, introducing it into the expression of Sn, conclude the recurrence relation. (b) Multiplying the recurrence relation by tn-I and summing for n = 1, 2, ... , derive the differential equation (1- t/2)S'(t)- S(t) = (1- t)- 2 and, solving it, find the generating function. (c) Expand the generating function to get the required expression of Sn. 31. Use Pascal's triangle to derive the relations an = an-I + bn and bn = bn-1 + an-1, which imply the generating function relations A(t)- 1 = tA(t) + B(t) and B(t) = tB(t) + tA(t). Solve this system to get the expression of A(t) and B(t). 32. The number Bn, n = 0, 1, ... , satisfy the recurrence relation (see Exercise 2.46)
Bn
=
t (~ =~)Bk-1, k=1
= 1. summing for n = 1, 2, ... , derive the Bo
Multiplying it by tn- 1 j(n- 1)! and differential equation B'(t) = B(t)et. Integrate it to get B(t) and expand it to find the required expression of Bn.
33. Consider the set Po of partitions of a finite set Wn of n elements into subsets with even number of elements and its subset !3k that contains the partitions in which the element Wn E Wn belongs in a subset with 2k
CHAPTERS
567
elements, for k = 1, 2, ... , m, m = [n/2]. Then, Po = 81 + 82 + · · · + Bm. Applying the addition principle, conclude the recurrence relation. Multiplying it by tn- 1 j(n- 1)! and summing for n = 1, 2, ... , derive the differential equation A' (t) = A(t) sinh t, the solution of which gives the required expression of the generating function A(t). 34. Expand the generating function A(t) into powers of t and use the generating function constructed in Exercise 6.15. 35. Work as in Exercise 33.
36. Expand the generating function E(t) into powers oft and use the generating function constructed in Exercise 6.16. 37. Use the fact that the counting of the n + k votes with Xr ~ Yx, + k is terminated either with a vote for Nor a vote forK to derive the recurrence relation.
r = 1, 2, ... , n
38. (a) Use the fact that the counting of the votes is terminated with a vote for N or with a vote for K or with a vote by both N and K to establish the recurrence relation. (b) Rewrite the generating function as G(t, u) = (1- u)- 1 [1 + t(1 + u)(1- u)- 1 ]- 1 and, expanding it, conclude the first expression of D(n, k). Further, rewrite the generating function as G(t) = (1- t)- 1 (1- u)- 1 [1- 2t(1- t)- 1 u(1- u)- 1 1 and, expanding it, conclude the second expression of D(n, k).
t
39. Rewrite the bivariate generating function G(t, u) of the Delannoy numbers (see Exercise 38) in the form G(t, u) = (1-t)- 1 [1-(1+t)(1-t)ut 1 and, expanding it, into powers of u, derive the generating function Gn(t) = L:~=O D(n, k)tk = (1 + t)n(l- t)-n- 1 . Further, use Lagrange formula with f(t) = (1- t)- 1 , g(t) = (1 + t)(1 - t)- 1 to find the expression of G(u). Differentiate it to deduce the differential equation (1 - bu + u 2 )G'(u) (3u- 2)G(u) = 0, which implies the required recurrence relation. 40. Show first that
G) -
1
n: 1(n ~ 1) -
1
=
(k: 1)-
1
_
and then, introducing it into the expression of L(n, k), deduce the recurrence relation.
CHAPTERS 1. (a) Expand the identity (t)n = [(t)n+I/t] · [1/(1- n/t)] into powers oft. (b) The generating function ¢k(u) = L:::"=k S(n, k)uk satisfies the
HINTS AND ANSWERS TO EXERCISES
568
recurrence relation ¢k(u) = u(1- ku)- 1 ¢k-I (u). Expand it into powers of
u. 2. Multiplytherelation2::~= 0 s(r+1,k+1)tk = (t-1)r byS(n,r) and the relation I:~=O s(r, k)tk = (t)r by S(n + 1, r + 1) and sum the resulting expressions for r = 0, 1, ... , n. 3. Use Lagrange inversion formula with t = ¢- 1 ( u) = eu - 1 and u = ¢(t) = log(1 + t) (see Theorem 8.5) to find the expression
S(n,j) = ~ L..,..(-lr r=O
(n +. 1 1) ( 2n -. rJ-
j ) s(n-j+r,r),
n- J- r
which, for j = n- k, reduces to the required expression. 4. Expand the function (t+u)n into powers of t+u and into factorials of
t and u. Further, expand both sides of the resulting expression into powers oft and u. 5. Expand the function (t + u)n into factorials oft+ u and into powers of t and u. Further, expand both sides of the resulting expression into factorials oft and u. 6. Use Lagrange inversion formula with t = ¢- 1 (u) = (1 + u) 1 1• - 1 and u = ¢(t) = (1 + t)• - 1 (see Theorem 8.5) to find the expression 1 2 C(n,j;s- 1 )=~(-1r(n~r)(n-J-r n~j )c(n-j+r,r;s), J-1 r=O
which, for j = n- k, reduces to the required expression.
7. Expand the function (st + su)n into factorials oft+ u and into factorials of st and su. Further, expand both sides of the resulting expression into factorials of t and u. 8. Using the expansion which defines the signless Stirling numbers of the first kind, derive the relation
~ is(n + l,k + 1)1tk = n!exp {~(-1r- 1 (n(rW /r}. Expanding the right-hand side into powers oft, deduce the required expression. 9. Use the expression of Exercise 8 and limn-+oo (n(1)/ log(n + 1) = 1, limn-+oo[log(l +n)]ijn = 0, (n(s) :S 71' 2 /6, s = 2,3, ... , to show that limn-+oo js(n+1, k+1)1[log(n+1)]-k fn! = 1/k!. Use the explicit expressions of S(n, k) and C(n, k; s) to derive the limits limn-+oo S(n, k)/kn = 1/k! and limn-+oo C(n, k; s)j(sn)n = 1jk!.
10. Setting successively k = n + 1, n, n - 1 in the recurrence relation, conclude the required expressions. Multiplying the relation s(n, k) =
CHAPTERS
569
LJ=k s 2 (n - j, k - j) (;) successively by tk and un fn! and summing for k = 0, 1, ... , [n/2] and n = 0, 1, ... , derive the bivariate generating function. Rewrite it as g2 (t, u) = exp{t[log(1 + u)- u]} and expand it into powers oft to find /k, 2 (u). Differentiate either the generating /k, 2 (u) or the bivariate generating function g2 (t, u), with respect to u, to derive the recurrence relation. Expand the bivariate generating function g2 (t, u), first into powers of u and then into powers of t, get the required expression. 11. Differentiate the generating function to get the differential equation (1 + u)n,r(u) = ( -1)r-lur-l fk- 1 ,r(u), which, expanded into powers of u, yields the required recurrence relation. Use Newton's binomial formula to express h,r+l(u) as a sum of fk-j,r(u), j = 0,1, ... ,k. Also, express fk.r(u) as a sum of h-j,r+l (u), j = 0, 1, ... , k.
12. Work as in Exercise 10. 13. Work as in Exercise 11. 14. Work as in Exercise 10. 15. Work as in Exercise 11. 16. Expand both members of the relation t[f(t) -1] = [t -log(1 + t)]f(t) into powers oft to derive the recurrence relation. Rewrite the generating function as f(t) = (elog(l+t) -1)jlog(1 +t) and expand it, first into powers of u = log(1 + t), and then into powers of t to get the expression of the Cauchy numbers in terms of the Stirling numbers of the first kind. Multiply it by S(r, n) and sum for n = 0, 1, ... , r. 17. Expand both members of the relation t[g(t) -1] = -(et -1- t)g(t) into powers of t to derive the recurrence relation. Rewrite the generating function as g(t) = log[1 + (et -1)]/(et -1) and expand it, first into powers of u = et - 1, and then into powers of t to get the expression of the Bernoulli numbers in terms of the Stirling numbers of the second kind. Multiply it by s(r,n) and sum for n = 0, 1, ... ,r. 18. Show that the generating function h(t) = "':,~= 2 Bntn fn! = -1 + t/2+t/(et-1) is an even function and conclude that B 2 r+l = 0, r = 1, 2, .... Further, show that 1+ "':,~ 1 B 2 rt2r /(2r)! = (tj2)(et1 2 +e-tl 2 )f(et1 2 -e- 112 ) and, replacing t by 2it, with i = A, conclude the required expression. (b) Show that tcott = 1- 2"':,~ 1 7r- 2 r((2r)t 2 r and deduce the required expressions. 19. Differentiate the generating function to get the differential equation 9r+ 1 (t) = (1- t)gr(t)- (t/r)g~(t), which, expanded into powers oft, yields the recurrence relation. 20. Expand both members of the relation st[g(t;s) -1/s] = -[(1 +t)" -1- st]g(t;s)
HINTS AND ANSWERS TO EXERCISES
570
into powers oft to derive the recurrence relation. Rewrite the generating function in the form
g(t; s) = {[1 + [(1 + t)"- 1jpl•- 1}/[(1 + t r - 1] and expand it, first into powers of u = (1 + t)" - 1, and then into powers of t to get the required expression. Take the limits of the corresponding generating function. 21. Use the relation
~_a_
L..- a+ bn n=O
(a+
n
bn)un = ya, u = (y- 1)y-b,
with a = t, b = 1/2, and then follow the steps of the derivation of the corresponding relations for the Stirling number of the first kind. 22. Follow the steps of the derivation of the corresponding relations for the Stirling numbers.
23. Follow the steps of the derivation of Theorems 8. 7(b) and 8.10. 24. Work as in Theorem 8.3(a).
25. Expand both members of (t+r+n)n+l = (t+r+n)(t+r+n-1)n into powers of t to derive the triangular recurrence relation. Express the rising factorial (t + r + n - 1) n into a sum ofrising factorials (t + r - m + j - 1) j, j = 0, 1, ... , n, using Vandermonde's formula, and then expand both members of the resulting expression into powers of t to find the required expression.
26. Work in analogy to Example 8.1.
27. Work as in Theorem 8.3(b) and 8.4. 28. Work as in Theorem 8. 7(b) to derive the recurrence triangular recurrence relation. Further, express the power (t + r)n into a sum of powers (t + r - m)j, j = 0, 1, ... , n, using Newton's binomial formula, and then expand both numbers of the resulting expression into factorials of t to get the required expression.
29. Express (t+r 2 -r1 )n into powers oft+r2 and then express the powers (t + r 2 )j into factorials oft. In addition, express (t + r 2 - r1 )n directly into factorials oft, using Vandermonde's formula, and equate the coefficients of (t)k in the resulting expression. Also, express (t- r 2 + r1)n into factorials oft- r 2 and then express the factorials (t- r 2 )j into powers oft. Further, express (t + r 1 - r 2 )n directly into powers of t, using Newton's binomial formula, and equate the coefficients of tk in the resulting expression. 30. Work with the function (t + u- r 1
-
r 2 )n as in Exercise 4.
31. Work with the function (t + u + r 1 + r 2 )n as in Exercise 5.
CHAPTER9
571
32. Follow the steps of the derivation of Theorems 8.10 and 8.12. 33. Work in analogy to Example 8.7. 34. Work as in Theorem 8.14.
35. Work as in Theorem 8.15. 36. Work as in Theorem 8.19.
37. Work as in Theorem 8.17. 38. Expand the non-central factorial (-(t-r))n = (-1)n(t-r+n-l)n into factorials oft, using Vandermonde's formula, and conclude the expression L(n,k;r) = (-1)nG)(n- r -1)n-k, which can be transformed into the required expression. 39. Expand the factorial (s(t + p) - r)n into powers of s(t + p) and then expand the powers (t + p)i into factorials of t. Also, expand the same factorial (st + (sp- r))n directly into factorials oft and equate the coefficients of (t)k in the resulting expression. 40. Expand the factorial (s1 (s 2 t + r 2 ) + ri)n into factorials of s 2 t + r 2 and then expand the factorials (s 2 t + r 2 )j into factorials oft. Also, expand the same factorial (s 1 s 2 t + (r 1 + r 2 si))n directly into factorials oft and equate the coefficients of (t)k in the resulting expression. 41. Use the triangular recurrence relation for the numbers C(n, k; s, r), derived in Exercise 36, and 1/(u)n = (u-n)f(u)n+l to deduce the required recurrence relation for k (u; s, r). 42. Work with the function (st + su + r 1 + r 2 )n as in Exercise 7. 43. Work as in Example 8.4. 44. Work as in Example 8.8.
45. Work as in Example 8.8.
CHAPTER9 1. Consider the set fl of distributions of n distinguishable balls into k distinguishable urns and its subset Ai of these distributions in which j balls are allocated in the i-th urn, for i = 1, 2, ... , k, and apply the inclusion and exclusion principle.
HINTS AND ANSWERS TO EXERCISES
572
2. (a) Use the enumerator (9.22). (b) Deduce the factorial moment generating function from the generating function of the sequence ar, r = 0, 1, ... , k. 3. Use Corollary 9.2. 4. Consider the set f! of distributions of n indistinguishable balls into k distinguishable urns and its subset Ai of these distributions in which j balls are placed in the i-th urns, fori = 1, 2, ... , k, and apply the inclusion and exclusion principle. 5. (a) Use the enumerator (9.27). (b) Deduce the binomial moment generating function from the generating function of the sequence ar, r = 0, 1, ... ,k. 6. Consider the set f! of distributions of n indistinguishable balls into k distinguishable urns (of unlimited capacity) and its subset Ai of these distributions in which at least s + 1 balls are placed in the i-th urn, for i = 1, 2, ... , k, and apply the inclusion and exclusion principle to find L(n, k, s). Further, consider the set W of distributions of n indistinguishable balls into k distinguishable urns, each of capacity limited to s balls, and its subset Bi of these distributions in which the i-th urn remains empty, for i = 1, 2, ... , k, and apply the inclusion and exclusion principle to get the expression of L(n, k, s, r). 7. Work as in the second part of Exercise 6 replacing the subset Bi by the subset of those distributions in which j balls are placed in the i-th urn, fori = 1, 2, ... , k. For the derivation of the second part, use the first part of Exercise 6.
ci
8. Work as in Exercise 5. 9. Note that these distributions may be carried out in two consecutive stages. Initially kj indistinguishable balls are distributed into the k distinguishable urns with j balls in each urn and then the remaining n - kj indistinguishable balls are distributed into the k distinguishable urns, each of capacity limited to s- j balls. Enumerate the distributions of both stages, using the result of the first part of Exercise 6, and by the multiplication principle deduce the required number. 10. Note that when the interest is only on the occupancy of a single urn, say the i-th urn, and not on the individual occupancy of the n urns, the corresponding enumerator follows from the enumerator (9.24) by setting xi = x and Xj = 1, j -:f. i. Expand the enumerator H(t; x) into powers of x and t and into powers of (x - 1) and t to find the two expressions of hn(x). These expressions imply the required expressions for B(n, k, r) and b(s)(n, k). 11. Work as in the first part of Exercise 10.
CHAPTER9
573
12. (a) Show that the enumerator for occupancy of the 8 distinguishable cells of the j-th urn is (1 + x 1 ,jt)(l + x 2 ,jt) · · · (1 + X 8 ,jt) and, putting Xi,j = Xj, i = 1, 2, ... , 8, deduce the enumerator for occupancy of the j-th urn. (b) Use this result to find the enumerator for occupancy of the k distinguishable urns and expand it into powers of t to establish the expression of hn,s(X!, X2, ... , Xk)·
13. Work as in Exercise 12. 14. Consider the set fl of distributions of n indistinguishable balls into the k distinguishable urns and its subset A; of these distributions in which j balls are placed in the i-th urn, fori = 1, 2, ... , k, and apply the inclusion and exclusion principle. 15. Use the result of Exercise 12. 16. Work as in Exercise 14.
17. Use the result of Exercise 13. 18. Consider the set fl of distributions of n indistinguishable balls into the kr distinguishable cells and its subset A; of these distributions in which j balls are placed in the i-th column of cells, for i = 1, 2, ... , 8, and apply the inclusion and exclusion principle. 19. Consider the set W of distributions of n indistinguishable balls into the kr distinguishable cells in which at least one ball is placed in each column of cells. Further, consider the subset Bs of these distributions that leave the 8-th row of cells empty, for 8 = 1, 2, ... , r, and apply the inclusion and exclusion principle.
20. Work as in Exercise 18. 21. Work as in Exercise 19. 22. Use the enumerator (9.22) to find the generating function Mk(t). Further, differentiate it to get the differential equation MHt) = k{Mk(t)(tB I 8!)Mk-l (t)}, which, expanded into powers of t, yields the first recurrence relation. Finally, derive the expression Mk(t) = L::;=O Mk-l (t)tJ I j!, which implies the second recurrence relation. 23. Work as in Exercise 22. 24. Properly modify the enumerator for occupancy of the j-th urn, for j = 1, 2, ... , k, obtained in Exercise 12, to establish the generating function
Gk(t) and continue as in Exercise 22. 25. Work as in Exercise 24. 26. Properly modify the enumerator for occupancy of the j-th urn, for j = 1, 2, ... , k, obtained in Exercise 13, to establish the generating function
Hk(t) and then continue as in Exercise 22.
574
HINTS AND ANSWERS TO EXERCISES
27. Work as in Exercise 26. 28. Consider the set fl of distributions of the n + r balls into the k distinguishable urns and its subset Ai of these distributions which leave the i-th urn empty, for i = 1, 2, ... , k, and apply the inclusion and exclusion principle to find the expression of the number W(n, r, k).
29. Consider the set A of the distributions of the n + r balls into the k distinguishable urns that do not leave any of the urns empty. Further, consider the subset Bj of these distributions in which k- j of the urns contain none of then distinguishable balls, for j = 1,2, ... ,m, m = min{n,k}, whence A= BI + B 2 +···+Em. Apply the addition principle to conclude the required expression of the number W(n, r, k). In order to derive the recurrence relation, consider the set B ~ A of the distributions in which a specified ball b, among the n distinguishable balls, is placed in an urn with at least one other ball and the set C ~ A of the distributions in which ball b is placed in an urn with no other ball, whence A = B + C and N(A) = N(B) + N(C). 30. Use the enumerators (9.21) and (9.26) to form the enumerator for occupancy of the k distinguishable urns by distinguishable and indistinguishable balls. For the other generating function, consider a suitable modification of this enumerator.
CHAPTERlO 1. Consider the following division in two subsets (PI, P 2 ) of the set P of partitions of n into k parts: PI is the set of partitions of n into k parts with at least one part of length 1 and P 2 is the set of partitions of n into k parts with no part of length 1. Apply the addition principle.
2. Consider the following division into two subsets (PI, P 2 ) of the set P of partitions of n into at most k parts: PI is the set of partitions of n into at most k - 1 parts and P 2 is the set of partitions of n into exactly k
parts. Apply the addition principle. 3. Deduce the bivariate generating function Fr(t, u) from the corresponding universal generating function. For the derivation of the generating function Fr,k(t), note that (1- utr+I)Fr(t,ut) = (1- u)Fr(t,u) and work as in the second part of Theorem 10.2. 4. Deduce the generating function '1/Jk (t) from the corresponding universal generating function. Note that '1/Jk (t) = t(1- tk-I )'1/Jk-I (t) and establish the recurrence relation for r(n, k).
CHAPTERlO
575
5. Consider the following division in two subsets (Q1,Q 2) of the set Q of partitions of n into k unequal parts: Q 1 is the set of partitions of n into k unequal parts with one part of length 1 and Q 2 is the set of partitions of n into k unequal parts with no part of length 1. Apply the addition principle. 6. Deduce the bivariate generating function F(t, u) from the corresponding universal generating function. Note that the generating function F(t, u) satisfies the relation (1-u)F(t, u) = (1-u 2 t 2 )F(t, ut), which implies the required recurrence relation for the generating function Fk(t). 7. The bivariate generating functions H 0 (t, u) and H1 (t, u) may be deduced for the corresponding universal generating function. For the derivation of the generating functions Ho,k(t) and H 1 ,k(t), note that Ho(t,u) = (1 + ut 2 )H0(t, ut 2 ) and HI(t, u) = (1 + ut)H1 (t, ut 2 ) and work as in the second part of Theorem 10.2. 8. Deduce the bivariate generating function Gr(t, u) from the corresponding universal generating function. Note that (1- utr+I )Gr(t, ut) = (1- ut)Gr(t, u) and work as in the second part of Theorem 10.2. 9. Using the relations (1- ut)G(t,u) = G(t,ut), (1- ut){Gr(t,u) + utr+lGr+l (t, u)} = Gr(t, ut), derive the recurrence relation (1 - tr)9r(t) = t 2 r-I9r- 1 (t), r = 1, 2, .... Iterate it to get the explicit expression for 9r(t). In order to derive the required identity, use the expression connecting the generating functions G(t, u), Gr(t, u) and 9r(t) along with the first part of Theorem 10.2 and the result of the first part of Exercise 8. 1
10. Use the identity (1+t 2 ') = (1-t 2 >+ ) / (1-t 2 ') to derive the expression n:-~(1 + t 2 ') = (1- t 2 k)/(1- t) and, for ltl < 1, conclude the expression n:,o(1 + t 2') = (1 - t)- 1' which implies the required expression for n. 11. From the corresponding universal generating function deduce the 1 2 generating function :L::::"=o R(n)tn = 0(1-t r)_ , where R(n) = R1 (n). Use this generating function to show that :L::::"=o Ro(n)tn - (1 - t)/2 = :L::::"=o Rt(n)tn+(1-t)/2 and conclude that Ro(n) = R 1 (n), for n = 2, 3, ....
fl::
12. Use the relation L~;=O ti!r; expression
n~,:-~ ( L~;=O ti!r;)
the expression n:,l expression for n.
= (1- t(i+ll')/(1- ti')
= (1- tk')/(1- t), and for
(2:::~;=0 ti!r;)
to derive the
It I < 1, conclude
= (1- t)- 1 ' which implies the required
13. Deduce the bivariate generating function Hr(t, u) from the corresponding universal generating function. Note that (1 + ut)Hr(t, ut) = (1 + utr+l )Hr(t, u) and work as in the second part of Theorem 10.2.
576
HINTS AND ANSWERS TO EXERCISES
14. (a) Correspond to each class of multinomial coefficients a nonnegative integer solution of the linear equation x 1 + x 2 + · · · + Xr = n, with x 1 2: x 2 2: · · · 2: Xr 2: 0. (b) Note that n! M(n) L... (1!Y' (2!)r2 ... (n!Yn where the summation is extended over aJl nonnegative integer solutions of the equation r 1 + 2r 2 + · · · + nrn = n, and deduce the required generating function.
="'
,
15. Note first that, in a perfect partition of n, the number of unit parts is y 1 2: 1. Consider a perfect partition of n that includes y 1 = r 1 - 1 unit parts. Then, every positive integer r < r 1 has exactly one partition and r 1 is the next part of the perfect partition. The number of parts that are equal to r1 is Yr 1 2: 1, whence, with Yr, = r 2 - 1, every positive integer r < r 1r 2 has exactly one partition with parts 1 and r 1 . Continuing this step-bystep procedure, conclude that n = (r 1 - 1) + r 1(r 2 - 1) + r 1r 2(r 3 - 1) + · · · + (r1r2 · · ·Tk-d(rk- 1) and n + 1 = r1r2 · · ·rk. 16. Note that the number c(n, k) of compositions of n into k parts equals the number of nonnegative integer solutions of the linear equation z1 + z 2 + · · · + Zk = n- k, which is equaJ to the number of distributions of n- k indistinguishable balls (the units) into k distinguishable urns (the summands). Use the expression of c(n, k) to evaluate the generating function G(t, u).
17. Evaluate the expression 00
L n=k
00
c(n, k; S)tn =
L (L t"''+x2+··+xk)' n=k
where, in the inner sum, the summation is extended over all solutions of the linear equation x 1 + x 2 + · · · + Xk = n, which Xi E S, i = 1, 2, ... , k.
18. Use the result of Exercise 17, with S = { 1, 2, }, and the relation c2(n) = L:~=l c2(n, k), with c2(n, k) = c(n, k; {1, 2} ). 19. Use the result of Exercise 17, with S = {1, 2, ... , r}, and the relation cr(n) = L:~=l cr(n, k), with cr(n, k) = c(n, k; {1, 2, ... , r} ), to find the generating function Cr(t). Show that Cr(t) = 1 + L:j=l tiCr(t) and deduce the required recurrence relation. 20. Consider the set Pn,k = {Xk = {x 1, x 2, ... , xk} : x1 +x2 +· · ·+xk = n, x 1 2: x 2 2: · · · 2: Xk 2: 1}, of partitions of n into k parts, and the set Cn,k = {(x1,x2, ... ,xk): x1+x2+ .. ·+xk = n, Xi 2:1, i = 1,2, ... ,k}, of compositions of n into k parts. Correspond to each partition Xk E Pn,k the set P(Xk) ~ Pn,k of compositions of n into k parts that are composed of the same parts (in different orderings). Show that the set {P(Xk) : Xk E Pn,k} is a partition of Cn,k and, applying the addition principle, conclude that
CHAPTER 10
577
(~:i):::; k!p(n,k). Further, consider the Qn,k = {Yk = {x 1,x2, ... ,xk}: X1 + x2 + · · · + Xk = n, X1 > x 2 > · · · < Xk ~ 1}, of partitions of n into k unequal parts, and correspond to each partition Yk the set P(Yk) of permutations of Yk. Since P(Yk) ~ Cn,k, conclude that k!q(n, k) :::; (~:i).
21. In the Gauss-Jacobi identity, replace (a) q by qr, r ~ 0 and x by q8 , s ~ 0 and (b) q by qr, r ~ 0 and x by -q8 , s ~ 0 and deduce the required identities. 22. Use the relation 00
00
00
n=O P., i=l
00
i=l k;=O
23. Use the result of Exercise 22 for a(n) and ui(k) = 1, i =j:. j.
=a(n; Uj), with Uj(k)
= ujk
24. Work as in the proof of the first part of Theorem 10.2. 25. Use the expression (1- q"')(l _ qx-1) ... (1 _ qx-k+I)
(1- q)(1- q2 ) .. ·(1- qk) 26. Use the expression
27. Use the triangular recurrence relation
to split the left-hand side sum into a difference of two sums.
28. Work as in Exercise 27. 29. In the generating functions Hr(t, u) and Hr,k (t) of Exercise 13, which are connected by Hr(t, u) = I:%"=o Hr,k(t)uk, replace t by q, ut by x and r by n to obtain the q-binomial formula. Also, in the generating functions Gr(t, u) and Gr,k(t) of Exercise 8, which are connected by Gr(t, u) = I:%"=o Gr,k (t)uk, replace t by q, ut by x, and r by n to obtain the q-negative binomial formula. These formulae may also be derived algebraically. For the derivation of the third formula, consider the function Fn(q,x) = q"'n and its expansion Fn(q, x) = I:~o Fn,k(q)[x]k,q and deduce the recurrence relation [k]qFn,k(q) = (q -1)qk-I [n- k+ 1]qFn,k-1 (q), k = 1, 2, ... , n, with Fn,o(q) = 1, which implies Fn,k(q) = qk(k-I}f 2(q- l)k [ ~
L·
HINTS AND ANSWERS TO EXERCISES
578
30. Expand the identities r+8
r
8
i=l
i=1
j=1
II (1 + xqi-1) =II (1 + xqi-1) II (1 + xqr+j-1)
and
r+8
r
8
i=1
i=1
j=1
II (1- xqi-1 )-1 =II (1- xqi-1 )-1 II (1- xqr+j-1 )-1, using the q-binomial and the q-negative binomial formulae of Exercise 29, respectively, to derive the first two formulae. Show the third formula by induction on n. 31. Utilize the results of Exercise 26(b) together with the q-binomial and negative binomial formulae of Exercise 29.
32. (a) Note that n-1
n
II ([t]q- [i]q) = L s(n, klq)[t]~-
1
i=1 k=1 and work as in Theorem 8.1 to get the required expression. (b) Expand both members of the recurrence relation n n-1 ([tJq - [iJq) = ([tJq - [nJq) ([tJq - [iJq) i=1 i=l into powers of [t]q and conclude the required triangular recurrence relation. Further, use the triangular recurrence relation to obtain the vertical recurrence relation.
II
II
33. (a) Note first that n
[t]~ =
k-1
L S(n, klq) II ([t]q- [i]q)
k=O i=O and, using this expression, expand both members of the identity [t]~+ 1 = [t]q[t]~. Transform the resulting expression by introducing the expression
[t]q n~;~([t]q- [i]q) = n~=o([t]q- [i]q) + [r]q n~;~([t]q- [i]q) and conclude the triangular recurrence relation. Further, use the triangular recurrence relation to get the recurrence relation ¢k(ulq) = u(1 - [k]qu)- 11/lk-dulq), k = 1, 2, ... , ¢ 0 (ulq) = 1 and iterate it to obtain the required expression. (b) Expand both members of the recurrence relation for 1/Jk (u Iq) to get the vertical recurrence relation. Further, expand the generating function ¢k(ulq) into powers of u and equate the coefficients of un in the resulting expression. (c) Expand the n-th order q-factorial [t]n,q into powers of [t]q and, in the resulting expression, expand the powers [t]~ into q-factorials [t]k,q and equate the coefficients of [t]k,q to deduce the first orthogonal relation. The second relation may be similarly derived.
CHAPTER 11
579
34. Show first that k
k
j=O
r=O
IT (t- [j]q)-1 = :~:::>r. (t- [r]q)-1' where c; 1 =
! [U J-
= (-1)k-r qr(2k-r-1)/2[r]q![k _
(t _ [j]q)l
r]q!
t=[r] 0
and, using this formula, expand the generating function 4>k(uiq) into powers of u to find the required expression. 35. Using the last expression in Exercise 30, with x = n- 1 andy = t, expand the q-factorial (t + n - 1]n,q into a sum of q-factorial [t]t,q, and deduce the expression IL(n, kiq)i = q-n(n- 1 )1 2 +k(k- 1 )1 2
[
~] q [n- l]n-k,q,
which can be transformed into the required expression.
CHAPTER 11 1. Use the generating function of the exponential Bell partition polynomials.
2. For n > 0 and k1 , k2, . . . , kn nonnegative integers satisfying the equation k 1 + 2k 2 + · · · + nkn = n, consider the function
where the summation is extended over all Ti = 0, 1, ... , ki, i = 1, 2, ... , n and show that Ck,,k 2 , •.. ,kn (a)= 0. Multiply it by TI~ 1 (zi/i!)k• /ki! and sum for all nonnegative integer solutions of the equation k 1 + 2k2+ · · · + nkn = n, to get the relation
where, in the inner sums, the summation is extended over all nonnegative integer solutions of the equations TI + 2r2 + · · · + krk = k and m 1 +2m 2 + · · · + (n- k)mn-k = n - k, respectively, and thus conclude the required formula. Further, replace n by s, multiply both sides by Bn-s(Y1 - az1,
HINTS AND ANSWERS TO EXERCISES
580
Y2 - az2, ... , Yn-s - azn-s) and sum for s = 0, 1, ... , n to get the convolution formula. Finally, replace n - k by k, a by n - a and Yi - nzi by Xi. In the resulting expression, replace n by s, multiply both sides by Bn-s(Yt- az1,Y2- az2, ... ,Yn-s- azn-s) and sum for s = 0, 1, ... ,n to get the required expression.
3. Set x 1 = x, x 2 = 1, Xr = 0, r = 3, 4, ... , in the generating function of the exponential Bell partition polynomials to find the generating function of Bn(x, 1). Deduce from it the generating function of Hn(x) and conclude the required expression. Similarly, find the generating function of 1 Bn(1!, 2!x- 1, ... ,n!x-n+l) and deduce the generating function of £~ )( -x), which implies the required expression. 4. Set Xr = (s)raX 8 -r, r = 1,2, ... ,s, Xr = 0, r = s+ 1,s+2, ... , in the generating function of the exponential Bell partition polynomials to find the generating function of Hn(x; a, s). Deduce from it the required expressions. 5. Set x 1 = x, x 2 = 1 and Xr = 0, r = 3, 4, ... , in the generating function of the Logarithmic polynomials and find the generating function of Ln(x, 1), which, expanded into powers oft, yields the required expression. 6. Set x 1 = x, x 2 = 1 and Xr = 0, r = 3, 4, ... , in the generating function of the potential polynomials to find the generating function of Cn,-s(x,1) = a}:l(-x), which, expanded into powers oft, yields the required expression. 7. The vertical generating function of the partial Bell polynomials for Xi= 0, i = 1,2, ... ,r, is given by Bk,r+l(t) = c~=:r+lXitiji!)k jk!. Set Xi = (i)rYi-r, i = r + 1, r + 2, ... , and conclude the first relation. Use Newton's binomial formula to express the generating function Bk,r+l (t) in terms of the generating function Bk-j,r(t); expanding into powers oft both sides of the resulting expression, deduce the second relation. The third relation is similarly derived. 8. Set (a) Xr = r!, r = 1,2, ... , and (b) Xr = r, r = 1,2, ... , in the vertical generating function of the partial Bell partition polynomials and deduce the required expression. 9. Set (a) x 2j-l = 0, x 2j = (2j)!, j = 1, 2, ... , and (b) X2j-1 = (2j-1)!, x 2 j = 0, j = 1, 2, ... , in the vertical generating function of the partial Bell partition polynomials and deduce the required expressions. 10. Multiply both members of (11.34) by (n~s) and use the relation (n~s) (;) = (~t;) (n~r). 11. From the generating function of the potential polynomials, with
s
=
-1 and putting ar
=
Xr/r!, r
=
1, 2, ... , ao
=
1, derive the linear
CHAPTER 11
581
system of equations 2::7= 1 ak-iYi find the required expression.
=
-ak, k
=
1, 2, ... , n and solve it to
12. In order to evaluate the generating function h(t) = 2::~= 1 Ldln dtn, use the transformation k = d, r = njk, with inverse d = k, n = rk, and sum first for r = 1, 2, ... and then for k = 1, 2, .... Further, differentiate the function logG(t) and conclude that G'(t)jG(t) = h(t)jt. Finally, integrate this differential equation to get the required expression of G(t). 13. Work as in Example 11.8 and use the result of Example 11.7(b). 14. Set Xr = Yr = r!x-r+l, r = 1, 2, ... , in the generating function of the Touchard polynomials to find the generating function of these particular polynomials. Deduce from it the generating function of L~k- 1 ) (x), n = 1, 2, .... 15. Work as in Exercise 7. 16. Work as in Exercise 8. 17. Use Leibnitz formula for the derivatives of a product of functions and Faa di Bruno formula for the derivatives of a composite function. 18. Follow the steps of the derivation of the corresponding properties of the exponential partition polynomials in Section 11.2. 19. Take the partial derivatives of the generating functions A(t, u) and Ak(t, u) with respect to t and, expanding the resulting partial differential
equations, conclude the corresponding recurrence relations. 20. Follow the steps of the derivation of the corresponding properties of the general partition polynomials in Section 11.3. 21. Work as in Example 11.3, using the last part of Exercise 20. 22. In order to derive the recurrence relation, take the partial derivative of the generating function L(t, u) with respect tot and deduce the relation
aL(t,u) _ ag(t,u) _ [ ( ) _ at at g t, U
Xo,O
]aL(t,u) at .
23. Use the results of Exercise 22. 24. In order to derive the recurrence relation, take the partial derivative of the generating function C 8 (t, u) with respect tot and deduce the relation
aC8 (t,u)_ C( )ag(t,u)_[()at - S s t, U at gt
Xo,O
]aC 8 (t,u) at .
25. Use the generating functions of exponential, logarithmic and potential bipartitional polynomials (Exercises 18, 22, 24) and conclude the required expressions.
HINTS AND ANSWERS TO EXERCISES
582
CHAPTER12 1. Set x 1 = 0, Xj = 1, j = 2, 3,. . . in (12.9) to find the bivariate generating function of the required number of permutations and, expanding it into powers of u and t, conclude the required expression.
2. Set x 1 = 0, j = 1, 2, ... , r - i, Xj = 1, j = r, r + 1, ... into (12.9) to find the bivariate generating function of the required number of permutations and use the results of Exercise 8.11 to conclude the required expression. 3. Set Xj = 1, j = 1, 2, ... , j f- r and Xr = x in (12.8) to find the expression generating function C(x, t; r) = l::~=O Cn(x; r)tn /n!. Rewrite this expression as (1 - t)C(x, t; r) = exp[(x - 1)r /r] and expand it into powers oft to get the required recurrence relation. Further, expanding it into powers of x, deduce the recurrence relation for the numbers Cn(k; r). 4. Use the relation connecting the factorial moment generating function with the probability generating function. 5. Set x 1 = x, j = 1,2, ... , j f- rand Xr = 0 in (12.8) to get the generating function D(x, t; r) = l::~=O Dn(x; r)tn /n!. Differentiate it with respect to t and deduce the partial differential equation
(1- t) BD(~~ t; r) = xD(x, t; r)-
W- 1 -
nn(x, t; r),
which, expanded into powers oft, yields for Dn(x; r) the required recurrence relation. Further, expand it into powers of x to deduce the recurrence relation for the numbers dn(k; r). 6. Note that dn(r) = :L:l~~l dn(k; r) and from the expression of D(x, t; r) deduce the generating function D(t; r) = l::~=O dn(r)tn /n!, which, expanded into powers oft, yields the explicit expression of dn(t). Further, rewrite the expression of D(t; r) as (1- t)D(t; r) = exp( -r /r) and expand it into powers oft to find the recurrence relation for dn(r). 7. Set x 1 = x, x 2 = y and Xi = 1, i = 3,4, ... , in (12.8) to get the generating function Q(x, y, t) = l::~=O Qn(x, y)tn jn!. Multiply both members of this expression by (1- t) and, expanding it into powers oft, conclude the required recurrence relation. 8. Differentiate, with respect to t, the generating function Q(x, y, t), which is derived in Exercise 7, and then equate the coefficients of tn /n! in the resulting expression.
CHAPTER 12
583
9. Denote by Cn the multiple sum in the left-hand side of the required identity. Put xi = -1, 'i = 1, 2, ... , in (12.8) and deduce the generating function, L:~=O Cntn fn! = 1 - t, which implies Cn = 0, n = 2, 3, .... 10. Denote by Cn(x) the multiple sum in the left-hand side of the required identity. Set Xi = x, i = 1, 2, ... , in (12.8) and deduce the generating function L:~=O Cn(x)tn fn! = (1- t)-x, which, expanded into powers oft, yields the required expression for Cn(x). 11. Deduce from (12.13) the generating function A(t, u) = 2:: An(u)tn fn!. Similarly find the generating function B(t, u) = 2:: Bn(u)tn fn!. Differentiate these functions with respect to t and get the differential equations
aA(t,u) _ aB(t,u) _ A( ) aB(t,u) _ aA(t,u) _ B( ) at t at - u t, u , at t at - u t, u . Expand both sides of these equations into powers of t to establish the required recurrence relations. 12. Work as in Exercise 11. 13. (a) Use the results of Exercises 10 and 11 to show that
Gn(u)
= i)-1)i(~)uiAn-j(u), j=O J
Hn(u)
= i)-1)i(~)uiBn-j(u) j=O J
and conclude the required expressions. (b) Note that Gn = Gn(l) and Hn = Hn(1) and, from the first part of Exercise 12, conclude the generating functions L:~=O Gntn fn! and L:~=O Hntn fn!. Multiply each by (1 - t) and expand the resulting expression into powers of t to get the recurrence relations. For the derivation of Gn + Hn = Dn, use the generating function L:~=O Dntnfn! = (1- t)-le-t. 14. Set x 2 i-l = 0, x 2 i = 1, i = 1, 2, ... , in (12.9) to get the required generating function. Expand it into powers of t and conclude the generating function bn(2u), which implies the required expression for the number b(n,k). 15. Work as in Example 14. 16. Differentiate the generating functions L:~=O bn(u)tn fn! and L:~=O an(u)tn fn!, with respect to t, and multiply each of the resulting expressions by 1 - t 2 • Expand the final expressions into powers of t to deduce the recurrence relations. 17. Note that a(n) = an(1) and b(n) = bn(1) and, from the first part of Exercises 14 and 15, conclude the generating functions L::'=o a(n)tn fn! and L::'=o b(n)tn fn!. Use these generating functions to derive the required recurrence relations.
HINTS AND ANSWERS TO EXERCISES
584
18. Use the expression
where the summation is extended over all nonnegative integer solutions of the equations k1 + 2k2 + · · · + nkn = n and k1 + k2 + · · · + kn = k, with ki E {j : ai,j = 1}, for i = 1, 2, ... , n, and proceed as in Theorem 10.3. 19. Put ai,O = 1, i = 1,2, ... , ai,j = 1, i = 1,2, ... ,r, ai,j = 0, i = r+ 1, r+2, ... , j = 1, 2, ... and u = 1 in the universal generating function of Exercise 18 to deduce the generating function C(t; r) = L;~=O cn(r)tn fn!. Differentiate it to derive the differential equation C' (t; r) = C(t; r) I:~:~ ti, which implies the recurrence relation. 20. Set x 1 = 1, x 2 = x, xi = 0, i = 3, 4, ... , in (12.8) to deduce the generating function C(x, t) = L;~=O Tn(x)tn fn! = exp(t + xt 2/2). Differentiate it with respect to t to find the differential equation 8C(x, t)f8t = (1 + xt)C(x, t), which implies the required recurrence relation for Tn(x).
CHAPTER13 1. (a) 93
= {(1)(2)(3),
(1, 2, 3), (1, 3, 2), (1)(2, 3), (1, 3)(2), (1, 2)(3) }, 2 (b) K3,r = r(r + 3r + 2)/6.
2.
94
= { (1)(2)(3)( 4), (1, 2, 3, 4), (1, 3)(2, 4), (1, 4, 3, 2),
(1)(2,4)(3), (1,3)(2)(4), (1,4)(2,3), (1,2)(3,4)}. 3. (a) Use P6lya's theorem and the cycle indicator of Exercise 2 to I:;=O K 4(j)ti = 1 + t + 2t 2 + t 3 + t 4 and conclude that K 4(j) = 1, j = 0, 1, 3, 4 and K4(2) = 2. (b) K4,r = r(r 3 + 2r 2 + 3r + 2)/8.
get
4. (a)
(b)
= {(1)(2)(3)(4), (1)(2,3,4), K4,r = r 2 (r 2 + 2)/3.
94
(1)(2,4,3)},
5. (a) Use P6lya's theorem and the cycle indicator of Exercise 4 to get 2 3 4 0 K 4 (j)ti = 1+2t+2t +3t +t and conclude that K 4 (j) = 1,j = 0,4 and K 4 (j) = 2, j = 1, 2, 3. (b) Similarly K4(1, 1, 1) = 8.
L:;=
6.
94
= {(1)(2)(3)(4), (1)(2,3,4), (1)(2,4,3), (1,3,4)(2),
(1, 4, 3)(2), (1, 2, 4)(3), (1, 4, 2)(3), (1, 2, 3)(4), (1,3,2)(4), (1,2)(3,4), (1,3)(2,4), (1,4)(2,3)}.
CHAPTER13
585
7. (a) Use P6lya's theorem and the cycle indicator of Exercise 6 to find L~=O K4(j)ti = 1 + t + t 2 + t 3 + t 4 and conclude that K4(j) = 1, j = 0, 1, ... ,4. (b) K 4 ,j = r 2 (r 2 + 11)/4. 8. Consider the set W24 of the 4! = 24 colorings and the group 92 4 of the permutations that are induced by rotations of the corresponding colored tetrahedron around its axes of symmetry. Show that N(Q 24 ) = N(1l 4 ) = 12, where 1-£4 is the group 94 of Exercise 6, and apply Burnside's Theorem to conclude that the required number is N(T) = 24/12 = 2. This number may also by obtained by using the cycle indicator of Exercise 6 and applying P6lya's theorem. 9. 98={ (1 )(2)(3) (4) (5) (6) (7) (8), (1, 2, 3, 4) (5, 6, 7, 8), ( 1, 4, 3, 2)(5, 8, 7, 6), (1,4,8,5)(2,3, 7,6), (1,5,8,4)(2,6, 7,3), (1,5,6,2)(3,4,8, 7), (1, 2, 6, 5) (3, 7, 8, 4), (1, 3) (2, 4) (5, 7) (6, 8), (1, 8) (4, 5) (2, 7) (3, 6), (1, 6) (2, 5) (3, 8) (4, 7), (1, 2) (3, 5) (4, 6) (7, 8), (1, 4) (2, 8)(3, 5) (6, 7), (1, 5)(2, 8)(3, 7)(4, 6), (1, 7)(2, 3)(4, 6)(5, 8), (1, 7)(2, 6)(3, 5)(4, 8), (1, 7)(2,8)(3,4)(5,6), (1)(2,4,5)(3,8,6)(7),(1)(2,5,4)(3,6,8)(7), (1, 6, 3)(2)(4, 5, 7)(8), (1, 3, 6)(2)(4, 7, 5)(8), (1, 6, 8)(2, 7,4)(3)(5), (1,8,6)(2,4, 7)(3)(5), (1,3,8)(2, 7,5)(4)(6),(1,8,3)(2,5, 7)(4)(6)} 10. Use P6lya's theorem and the cycle indicator of Exercise 9 to get 98(t,u,w) = [(t + u + w) 8 + 8(t + u + w) 2 (t 3 + u 3 + w3) 2 +9(t2 + u 2 + w 2 ) 4 + 6(t 4 + u 4 + 24 )]/24 and conclude the required values. Further, N8,3 = 98,3(1, 1, 1) = (38 + 17 · 34 + 6 · 32 )/24.
11. The group 91 2 is {(1)(2)(3)(4)(5)(6)(7)(8)(9)(10)(11)(12), (1, 8, 2, 5)(3, 6, 4, 7)(9, 10, 11, 12), (1, 2)(5, 8)(3, 4)(6, 7)(9, 11)(10, 12), (1, 5, 2, 8)(3, 7, 4, 6)(9, 12, 11, 10), (1, 9, 4, 11) (2, 12, 3, 11) (5, 6, 7, 8), ( 1, 4) (2, 3) (5, 7)(6, 8)(9, 10) (11, 12),
(1, 10, 4, 9)(2, 11, 3, 12)(5, 8, 7, 6), (1, 2, 3, 4)(5, 12, 6, 9)(7, 10, 8, 11), (1, 3) (2, 4) (5, 6) (7, 8) (9, 12) (10, 11 ), (1, 4, 3, 2) (5, 9, 6, 12) (7, 11, 8, 10)' (1)(2, 4)(3)(5, 10)(6, 11)(7, 12)(8, 9), (1, 3)(2)(4)(5, 11)(6, 10)(7, 9)(8, 12), (1, 12)(2, 9)(3, 10)(4, 11)(5)(6, 8)(7), (1, 11)(2, 10)(3, 9)(4, 12)(5, 7)(6)(8), (1, 6)(2, 7)(3, 8)(4, 5)(9)(10, 12)(11), (1, 7)(2, 6)(3, 5)(4, 8)(9, 11)(10)(12), (1, 5, 9)(2, 6, 10)(3, 7, 11)(4, 8, 12), (1, 9, 5) (2, 10, 6) (3, 11, 7)( 4, 12, 8), (1, 10, 8)(2, 9, 7)(3, 12, 6)( 4, 11, 5), (1, 8, 10)(2, 7, 9)(3, 6, 12)(4, 5, 11), (1, 7, 12)(2,8, 11)(3,5, 10)(4,6,9), (1, 12, 7)(2, 11,8)(3, 10,5)(4,9,6), (1, 11,6)(2, 12,5)(3,9,8)(4, 10, 7), (1,6, 11)(2,5, 12)(3,8,9)(4, 7, 10)}.
HINTS AND ANSWERS TO EXERCISES
586
12. (a) Use Polya's theorem and the cycle indicator of Exercise 11 to get '""' · · ... ,)12 · ) th ~ N 12 ()1,)2, 1 th 2 ... th2 12
1 12 2 2 2 2 5 =-[(t1+t2+···+tl2) +6(t1+t2+···+tl2) (t1+t2+···+tl2) 24 26 + 8(t13 + t23 + ... + td 34 4 +3(t12 + t22 + ... + td + 6(t14 + t24 + ... + td] and conclude that the required number is N12(1, 1, ... , 1) = 12!/24 = 19,958,400. (b) K12,r = r 3 (r 9 + 6r 4 + 3r 3 + 8r + 6)/24. 13.
~h
= {(1)(2)(3)(4)(5)(6), (1)(2, 3, 5, 4)(6), (1)(2, 5)(3, 4)(6), (1)(2, 4, 5, 3)(6), (1, 3, 6, 4)(2)(5), (1, 6)(2)(3, 4)(5), (1, 4, 6, 3)(2)(5), (1, 2, 6, 5)(3)(4), (1, 6)(2, 5)(3)(4), (1, 5, 6, 2)(3)(4), (1, 2)(3, 4)(5, 6), (1, 3)(2, 5)(4, 6), (1, 4)(2, 5)(3, 6), (1, 5)(2, 6)(3, 4), (1, 6)(2, 3)(4, 5), (1, 6)(2, 4)(3, 5), (1, 2, 3)(4, 5, 6), (1, 3, 2)(4, 5, 6), (1, 2, 4)(3, 6, 5), (1, 4, 2)(3, 5, 6), (1, 3, 5)(2, 6, 4), (1, 5, 3)(2, 4, 6), (1, 4, 5)(2, 6, 3), (1, 5, 4)(2, 3, 6)}.
14. (a) Use Polya's theorem and the cycle indicator of Exercise 13 to get = 1 + t + 2t 2 + 2t 3 + 2t 4 + t 5 + t 6 and conclude that K 6 (j) = 1, j = 0,1,5,6andK6(j) = 2,j = 2,3,4. (b) K 6 ,r = r 2(r 4 +3r 2 +12r+8)/24.
2:: K 6 (j)tJ
15. Use Polya's theorem and the cycle indicator of the symmetric group 9n of order n, derived in Example 13.4, to get
Kn r '
= ..!_n~ '""'cp(d)rnfd. din
16. Use Polya's theorem and the cycle indicator of the symmetric group 9n of order n, derived in Example 13.4, to get n
1
L Kn(j)tj = -;-; L cp(d)(1 + tdtfd j=O din and, expanding the right-hand side into powers of t, deduce the required expression of Kn(j). 17. Show that 9n = { t:, a, a 2, ... , an- 1 , T, TO", Ta 2 , ... , TO"n- 1 } for n = 2m + 1 and 9n = { t:, a, a 2, ... , an- 1 , p, pa, pa 2 , ... , pan- 1 } for n = 2m, where the permutations a, T and p are defined as follows: a(j) = j + 1, j = 2, 3, ... , n - 1, a(n) = 1 (rotation of the n-gon by 21r jn degrees), 7(1) = 1, T(j) =2m+ 3- j, j = 2, 3, ... , 2m+ 1 (reflection of the n-gon,
CHAPTER 14
587
for n = 2m+ 1, around the axis connecting vertex 1 and the middle of the side connecting vertices m + 1 and m + 2) and p(1) = 1, p(j) =2m+ 2- j, j = 2, 3, ... , 2m (reflection of the n-gon, for n = 2m, around the axis connecting vertices 1 and m + 1) . 18. Set Xi = r, i = 1, 2, ... , n, in the cycle indicator derived in Exercise 17 to get, according to P6lya's theorem,
+ ~2 r m+I ,
- _..!.._ Kn,rn ""' L...- 4>(d)r nfd 2 djn
for n
= 2m + 1 and Kn,r =
1 n L¢(d)rnfd
2
din
+
1
4(r + 1)rm
for n =2m. 19. (c) Show that the order k = k(ah) of the permutation ah in 9n equals the order k(h) of the element h in 1-ln and, since the orbit {hr, ah(hr), ... , a~-I (hr)} of any element hr in 1-ln under the permutation ah is of length k, conclude that ah is decomposed in n/k cycles of length k and so . _ 1 ""' nfk(h) C(xl, X2, ... , Xn, 9n) - ~ L...- Xk(h) · hE'Hn
Further, use the fact that 1-ln sion.
= L:;dln 1-ln;d to conclude the required expres-
20. Consider the set F of colorings of the set Wn = {1, 2, ... , k }, of the k parts of a composition (r 1 , r 2 , .•• , rk) in Cn,k, (zero parts are allowed) with colors from Zn+l = {0, 1, ... , n }. Show that the number Pk(jo, ii, ... , jn), j 0 + j 1 + · · · + jn = k, of partitions of n into at most k parts, in which j 8 2:: 0 parts are equal to s, s = 0, 1, ... , n, equals the number of models M.r, under the symmetric group Pk of Wk, in which j 8 2:: 0 elements of wk are painted with color Zs from Zn+l' s = 0, 1, ... 'n. For derivation of the required identity, use the vertical generating function of the number of partitions of n into at most k parts obtained in Corollary 10.3.
CHAPTER14 1. (a) Use the definition of the non-central Eulerian numbers to get the relation
1)
k-J . . ( -n(r+k-j)n=LA(n,i;r)(-1)k-J-• k - j - i , j=0,1, ... ,k.
•=0
HINTS AND ANSWERS TO EXERCISES
588
Multiply it by ( -1 )1 (nr) and sum for j = 0, 1, ... , k to deduce the expression of A(n, k; r). (b) Expand both members of the identity (t + r)n+ 1 = (t + r)(t + r)n into binomial coefficients of order n + 1 and conclude the recurrence relation. 2. Work as in Lemma 14.1 and Theorem 14.3.
3. Express the coefficients of the power series in the expression of An(t; r) (see Exercise 2) into factorials of i, using the non-central Stirling numbers of the second kind, and deduce the relation n
An(t;r) = Lj!S(n,j;r)tj(1- t)n-j. j=O
Expand both sides of it into powers oft and conclude the first expression. Also, set t = uj (1 + u) and expand the resulting relation into powers of u and conclude the second expression. 4. Work as in Exercise 1. 5. Work as in Lemma 14.2 and Theorem 14.7. 6. Work as in Theorem 14.9. 7. Work as in Theorem 14.8. 8. (a) Replace t by -tin the definition of q-Eulerian numbers and use the relations [-t]q = -q-t[t]q and [ -t +nn- k
L
= ( _ 1)nq-nt+n(n-k)-n(n-1)/2 [ t
+ ~-
1
L.
(b) Use the definition of the q-Eulerian numbers to get the relation
[k-
rJ;
=I:
qj(j- 1)/ 2A(n,jlq)
J=O
Multiply it by (-1tqr(r- 1 )/ 2
[n;
1
L,
[n; ~ ~ ~ j j] . q
sum for r
= 0,1, ...
,k and con-
clude the required expression for A(n, klq), since
~()k-j-r qr(r-1)/2 [n +r ~ 1
1] [n + k-: r]
r=O
= 6 ·. k,J
j-
k- J - r
q
q
The last relation may be deduced by using the q-binomial and q-negative binomial formulae (see Exercise 10.29). 9. Expand into q-binomial coefficients, using the q-Eulerian numbers, both members of the identity [t]~+ 1 = [t]q[t]~ and then use the relation [t
+ ~- k] q [t]q
= [k]q [ t
+~~~ +
1] q + qk[n _ k + 1]q [ t : : ~ k] q.
CHAPTER 14
589
10. Show first that the number of permutations (j 1, )2, ... , Jn) of the set {1, 2, ... , n} that have k records Jr, ,Jr2 , ••• ,jrk at the points r 1, r2, ... , rk, - 1 an d Jrk. - n 1S . g1ven . by (n- rk. )' i=O Jr;- ri r;+ 1 -r;-1· W1"th r1-
rrk-1 (.
)
Summing for 1 ~ Jr 1 < Jr 2 < · · · < Jrk-t < Jrk = n, derive the number of permutations of {1, 2, ... , n} that have k records at the points r 1, r 2, ... , rk as (n- 1)! (r 2 - 1)(r3 - 1) ... (rk- 1). Summing for 2 ~ r 2 < r 3 < · · · < rk :$ n and using (8.12), conclude that the number of permutations of the set { 1, 2, ... , n} that have k records equals is(n, k)j. 11. Consider the set Jl of permutations (]1,)2, ... ,jn) of {1,2, ... ,n} that have k inversions and its subset A; of the permutations in which j 1 = i, i = 1, 2, ... , n, and use the relation Jl = A1 + A2 +···+An to deduce the horizontal recurrence relation. 12. Use the horizontal recurrence relation of the numbers b(n, k), derived in Exercise 11, to get for the generating function cf>n(t) the recurrence relation cf>n(t) = (1 - t)- 1(1- tn)c/>n- 1(t), n = 1, 2, ... , ¢ 0 (t) = 1. Iterate it to deduce the required expression.
13. Note that the permutations of {1, 2, ... , n + 1} that have k local maxima can be deduced from the permutations of {1,2, ... ,n} that have k or k- 1 local maxima by placing the element n + 1 in one of the possible positions. Use it to derive the required recurrence relation. 14. Work as in Exercise 13. 15. (b) Multiply both members of the recurrence by tkun- 1 /(n- 1)! and sum for k = 0, 1, ... , n = 1, 2, ... , to deduce the partial differential equation
t(t 2 - 1) ag(t, u)
at
+ (1- t 2u) ag(t, u)
= (t 2 + 1)g(t u)
au ' ' the solution of which, with g(t, 0) = 1 + t, gives the required expression of g(t, u). 16. Work as in Exercise 13.
17. (a) Note that removing the element n + 1 from any up-down permutation (j 1,)2, ... ,Jn+d of {1,2, ... ,n + 1} then we get two up-down permutations (j1,]2, ... ,hr-1) and (hr+1,J2r+2, ... ,Jn+l) of two disjoint subsets of {1, 2, ... , n} with 2r- 1 and n- 2r + 1. Use it to derive the required recurrence relation. (b) Multiply the recurrence relation by tn jn! and sum for n = 0, 1, . . . to get the differential equation 2A' (t) = 1 + A 2(t), the solution of which gives the required expression of A(t).
590
HINTS AND ANSWERS TO EXERCISES
18. (a) Use the relation tan(t/2 + 7r/4) = (1/ cost)+ tan t to show that Ao(t) = L~=O A2nt 2n /(2n)! = 1/ cost and, since Ao(t) = E(it), i =A, conclude the required expression. (b) Use the result of Exercise 8.22 to derive the required expression. 19. Work as in Exercise 18. 20. (a) In the generating function of G 2 n, n = 1, 2, ... , replace t by 2it, i = J=T, to get the generating function L~=I ( -1)n2 2 n- 1 G 2 nt 2 n-I /(2n)! = tan t and, since L~=l A2n-l en- I /(2n- 1)! =tan t, conclude the required expression. (b) Rewrite the generating function of G 2 n, n = 1, 2, ... , as L~=l G2nt 2n /(2n)! = [(e-t - 1)/2]/[1 + (e-t - 1)/2] and expand it into powers of u = (e-t- 1)/2. Using the generating function (8.17) of the Stirling numbers of the second kind, deduce the required expression of the Genocchi numbers.
BIBLIOGRAPHY
Abel, N. H. (1826) Beweis eines Ausdruckes, von welchem die BinomialForme! ein einzelner Fall ist, Journal fiir die reine und angewandte Mathematik, 1, 159-160. Abramovitz, M. and Stegun, I. A. (1965) Handbook of Mathematical Functions, Dover, New York. Andersen, E. S. (1953) Two summation formulae for product sums of binomial coefficients, Math. Scand. 1, 261- 262. Andre, D. (1887) Solution directe du probleme resolu par M. Bertrand, Comptes Rendus del' Academie des Sciences, Paris, 105, 436-437. Andrews, G. E. ( 1976) The Theory of Partitions, Encyclopedia of Mathematics and its Applications, Vol. 2, Addison- Wesley, Reading, MA. Apostol, T. M. ( 1962) Calculus, Vol. II, Blaisdell, Publishing Company, New York. Barton, D. E. (1958) The matching distributions: Poisson limiting forms and derived methods of approximation, Journal of the Royal Statistical Society, Series B, 20, 73-92. Barton, D. E. and David, F.N. (1959) Contagious occupancy, Journal of the Royal Statistical Society, Series B, 21, 120- 133. Bell, E. T. (1927) Partition polynomials, Annals of Mathematics, 24, 3846. Bell, E. T. (1934a) Exponential numbers, American Mathematical Monthly, 41, 411-419.
592
BIBLIOGRAPHY
Bell, E. T. (1934b) Exponential polynomials, Annals of Mathematics, 35, 258-277. Bell, E. T. (1940) Postulational bases for the umbral calculus, American Journal of Mathematics, 62, 717-724. Berge, C. (1971) Principles of Combinatorics, Academic Press, New York. Bernoulli, Jacobus (1713) Ars Conjectandi, (Opus Posth.) Basileae. Bernstein, L. (1965) Rational approximations of algebraic irrationals by means of a modified Jacobi-Perron algorithm, Duke Mathematical Journal, 32, 161- 176. Bertrand, J. (1887) Solution d' un probleme, Comptes Rendus del' Academie des Sciences, Paris, 105, 369. Blissard, J. (1867) On the properties of ~non class numbers and of other analogous to them, as investigated by means of representative notation, Quarterly Journal of Pure and Applied Mathematics, 8, 85-110. Bonferroni, C. E. (1936) Teorie statistica delle classi e calcolo delle probabilita, Publicazioni del R. Instituto Superiore di Scienze Economiche e Commerciali di Firenze, 8, 1-62. Boole, G. (1860) A Treatise on the Calculus of Finite Differences, Stechert, New York. (Reprinted by Chelsea, New York, 1950.) Broder, A. Z. (1984) The r-Stirling numbers, Discrete Mathematics, 49, 241-259. Burnside, W. S. (1911) Theory of Groups of Finite Order, 2nd ed., Cambridge University Press, Cambridge (Reprinted by Dover, New York, 1955.) Carlitz, L. (1932) On arrays of numbers, American Journal of Mathematics, 54, 739-752. Carlitz, L. (1959) Eulerian numbers and polynomials, Mathematics Magazine, 32, 247-260. Carlitz, L. (1960) Note on Norlund's polynomials B~z), Proceedings of the American Mathematical Society, 11, 447-451. Carlitz, L. (1965) Note on a paper of L. Bernstein, Duke Mathematical Journal, 32, 177- 180. Carlitz, L. (1971) Note on the numbers of Jordan and Ward, Duke Mathematical Journal, 38, 783-790.
BIBLIOGRA.PHY
593
Carlitz, L. (1979) Degenerate Stirling, Bernoulli and Eulerian numbers, Utilitas Mathematica, 15, 51-88. Carlitz, L. (1980a) Weighted Stirling numbers of the first and second kind-I, Fibonacci Quarterly, 18, 147-162. Carlitz, L. (1980b) Weighted Stirling numbers of the first and second kind- II, Fibonacci Quarterly, 18, 242-257. Carlitz, L., Roselle, D. P., and Scoville, R. A. (1966) Permutations and sequences with repetition by number of increases, Journal of Combinatorial Theory, 1, 350-374. Cauchy, A. (1833) Resumes Analytiques, Turin. Cayley, A. (1878a) On a problem of arrangements, Proceedings of the Royal Society of Edinburgh, 9, 338- 342. Cayley, A. (1878b) Note on Mr. Muir's solution of a problem of arrangement, Proceedings of the Royal Society of Edinburgh, 9, 388- 391. Cayley, A. (1887) Note on a formula for .6.noi jni when n and i are very large numbers, Proceedings of the Royal Society of Edinburg, 14, 149153. Charalambides, Ch. A. (1974) The generalized Stirling and C-numbers, Sankhya, Series A, 36, 397- 418. Charalambides, Ch. A. (1976) The asymptotic normality of certain combinatorial distributions, Annals of Institute of Statistical Mathematics, 28, 499-506. Charalambides, Ch. A. (1977a) A new kind of numbers appearing in the n-fold convolution of truncated binomial and negative binomial distributions, SIAM Journal on Applied Mathematics, 33, 279-288. Charalambides, Ch. A. ( 1977b) On the generalized discrete distributions and the Bell polynomials, Sankhya, Series B, 39, 36-44. Charalambides, Ch. A. (1979a) Some properties and applications of the differences of the generalized factorial, SIAM Journal on Applied Mathematics, 36, 273-280. Charalambides, Ch. A. (1979b) Bernoulli related polynomials and numbers, Mathematics of Computation, 33, 794-804. Charalambides, Ch. A. (1981) Bipartitional polynomials and their applications in combinatorics and statistics, Discrete Mathematics, 34, 81-84.
594
BIBLIOGRAPHY
Charalambides, Ch. A. (1982) On the enumeration of certain compositions and related sequences of numbers, Fibonacci Quarterly, 20, 132-146. Charalambides, Ch. A. (2002) The rook numbers of Ferrers boards and the related restricted permutation numbers, Journal of Statistical Planning and Inference, 101, 33-48. Charalambides, Ch. A. and Koutras, M. (1983) On the differences of the generalized factorials at an arbitrary point and their combinatorial applications, Discrete Mathematics, 47, 183-201. Charalambides, Ch. A. and Singh, J. (1988) A review of the Stirling numbers, their generalizations and statistical applications, Communications in Statistics- Theory and Methods, 17, 2533- 2595. Chung, K. L. (1941) On the probability of the occurrence of at least m events among n arbitrary events, Annals of Mathematical Statistics, 12, 328-338. Chung, K. L. (1943a) Generalization of Poincare's formula in the theory of probability, Annals of Mathematical Statistics, 14, 63-65. Chung, K. L. ( 1943b) On fundamental systems of probabilities of a finite number of events, Annals of Mathematical Statistics, 14, 123- 133. Chung, K. L. (1943c) Further results on probabilities of a finite number of events, Annals of Mathematical Statistics, 14, 234-237. Comtet, L. (1968) Polynomes de Bell et formule explicite de derivees successives d' une fontion implicite, Comptes Rendus de l' Academie des Sciences, Paris, 267, 457-460. Comtet, L. (1973) Une formule explicite pour les puissances successives de l' operateur de derivation de Lie, Comptes Rendus de l' Academie des Sciences, Paris, 276, 165- 168. Comtet, L. (1974) Advanced Combinatorics, Reidel, Dordrecht-Holland. David, F. N. (1962) Games, God, and Gambling, Hafner Press, New York. David, F. N. and Barton, D. E. (1962) Combinatorial Chance, Griffins, London. David, F. N., Kendall, M. G., and Barton, D. E. (1966) Symmetric Functions and Allied Tables, Cambridge University Press, Cambridge. De Moivre, A. (1718) The Doctrine of Chances, Pearson, London (2nd ed. 1738 and 3rd ed. 1756).
BIBLIOGRAPHY
595
De Moivre, A. (1730) Miscellanea Analytica de Seriebus et Quadraturis, J. Tonson and J. Watts, London. DeBruijn, N. G. (1964) Polya's theory of counting, in Applied Combinatorics as Chapter 5, E. F. Beckenbach (ed.), John Wiley & Sons, New York. Dickson, L. E. (1920) History of the Theory of Numbers, Vol. II, Carnegie Institute, Washington. (Reprinted by Chelsea, New York, 1952.) Dillon, J. F. and Roselle, D.P. (1969) Simon Newcomb's problem, SIAM Journal on Applied Mathematics, 17, 1086- 1093. Dwyer, P. S. (1938) The calculation of moments with the use of cumulative totals, Annals of Mathematical Statistics, 9, 288-304. Dwyer, P. S. (1940) The cumulative numbers and their polynomials, Annals of Mathematical Statistics, 11, 66- 71. Euler, L. (1746) Introductio in analysin infinitorum. Euler, L. (1751) Calcul de Ia probabilite dans le jeu de rencontre, Memoires de l' Academie des Sciences de Berlin, 7, 255- 270 (Opera Omnia 1-7, 11- 25.) Euler, L. (1760) Theoremata arithmetica nova methodo demonstrata, Novi Commentarii Academiae Petropolitanae, 8, 74-104 (Opera Omnia 1-2, 531- 535.) Faa di Bruno, F. (1855), Sullo sviluppo delle funzioni, Annali di Scienze Mathematiche et Fisiche di Tortolini, 6, 479-480. Faa di Bruno, F. (1857), Note sur un nouvelle formule de calcul differentiel, Quarterly Journal of Mathematics, 1, 359-60. Feller, W. (1968) An Introduction to Probability Theory and Its Applications, Vol. 1, 3rd ed. John Wiley & Sons, New York. Fisher, R. A. and Yates, F. (1953) Statistical Tables, Oliver Boyd, London. Franklin, F. (1881) Sur le developpement du produit infini (1-x)(1-x 2 ) (1- x 3 ) · · ·, Comptes Rendus de l' Academie des Sciences, Paris, 92, 448-450. Frechet, M. (1940) Le Probabilites associees a un systeme d' evenements compatibles et dependants, I: Evenements en nombre fini fixe, Actualites Scientifiques et Industrielles, No. 859, Hermann, Paris.
596
BIBLIOGRAPHY
Frechet, M. (1943) Le Probabilites associees a un systeme d' evenements compatibles et dependants II: Cas particuliers et applications, Actualites Scientifiques et Industrielles, No. 942, Hermann, Paris. Frucht, R. (1969) A combinatorial approach to the Bell polynomials and their generalizations, in Recent Progress in Combinatorics, pp. 6974, Academic Press. Gould, H. W. (1956) Some generalizations of Vandermonde's convolution, American Mathematical Monthly, 63, 84-91. Gould, H. W. (1958) A theorem concerning the Bernstein polynomial, Mathematics Magazine, 31, 259-264. Gould, H. W. (1964) The operator (ax D)n and the Stirling numbers of the first kind, American Mathematical Monthly, 71, 850-858. Grunert, J. A. (1822) Mathematische Abhandlungen, Altona. Grunert, J. A. (1843) Ueber die Summirung der Reihen von der Form Ao¢(0), A 1 ¢(1)x, A2 ¢(2)x 2 , •.. , An¢(n)xn, ... wo A eine beliebige constante Grofse, An eine beliebige und ¢( n) eine ganze rationale algebraische Function der positiven ganzen Zahl n bezeichnet, Journal fUr die reine und angewandte Mathematik, 25, 240-279. Gupta, H. (1950) Tables of distributions, Research Bulletin of East Panjab University, 13-44. Hardy, G. H. and Rarnanujan, S. (1917) Une formule asymptotique pour le nombre des partitions den, Comptes Rendus de l' Academie des Sciences, Paris, 164, 35-38. Hardy, G. H. and Rarnanujan, S. (1918) Asymptotic formulae in combinatory analysis, Proceedings of the London Mathematical Society, Series 2, 17, 75- 115. Heselden, G. P. M. (1973) A convolution involving Bell polynomials, Proceedings of the Cambridge Philosophical Society, 7 4, 97- 106. Hoggat, V. E. (1969) Fibonacci and Lucas numbers, Houghton Mifflin, Boston, MA. Johnson, N. L. and Kotz, S. (1977) Urn Models and Their Application, Wiley, New York. Jordan, C. (1867) De quelques formules de probabilite, Comptes Rendus de l' Academie des Sciences, 65, 993- 994.
BIBLIOGRAPHY
597
Jordan, Ch. (1926) Sur la probabilite des epreuves repetees, le theoreme de Bernoulli et son inversion, Bulletin de la Societe Mathematique de France, 54, 101-137. Jordan, Ch. (1927a) Sur un cas generalise de la probabilite des epreuves repetees, Comptes Rendus de l' Academie des Sciences, Paris, 184, 315-317. Jordan, Ch. (1927b) Sur un cas generalise de la probabilite des epreuves repetees, Acta Scientiarum Mathematicarum, Szeged, 3, 193-210. Jordan, Ch. (1933) On Stirling numbers, Tohoku Mathematical Journal, 37, 254-278. Jordan, Ch. (1934) Le theorem de probabilite de Poincare generalise au cas de plusiers variables independantes, Acta Scientiarum Mathematicarum, Szeged 7, 103-111. Jordan, Ch. (1939a) Calculus of Finite Differences, Rotting and Romwalter, Sorron, Hungary. (Reprinted Chelsea, New York, 1947, 1960, 1965.) Jordan, Ch. (1939b) Problemes de la probabilite des epreuves repetees dans le cas general, Bulletin de la Societe Mathematique de France, 67, 223-242. Koutras, M. (1982) Non-central Stirling numbers and some applications, Discrete Mathematics, 42, 73- 89. Lagrange, L. (1770) Nouvelle methode pour resoudre les equations litterales par le moyen de series, Mem. Acad. Roy. Sci. Belles-Lettres de Berlin, 24. Lah, I. (1955) Eine neue Art von Zahlen, ihre Eigenschaften und Anwendung in der mathematischen Statistik, Mitteilungsbl. Math. Statist., 7, 203-212. Laplace, P. S. (1812) Theorie Analytique des Probabilites, Courvier, Paris. Lucas, E. (1891) Theorie de nombres, Paris. Lukacs, E. (1955) Applications of Faa di Bruno's formula in mathematical statistics, American Mathematical Monthly, 62, 340-349. MacMahon, P. A. (1902) The problem of derangement in the theory of permutations, Transactions of the Cambridge Philosophical Society, 21,467-481.
598
BIBLIOGRAPHY
MacMahon, P. A. (1915) Combinatory Analysis, Vol. 1, Cambridge University Press, London, (Reprinted by Chelsea, New York, 1960.) MacMahon, P. A. (1916) Combinatory Analysis, Vol. 2, Cambridge University Press, London. (Reprinted by Chelsea, New York, 1960.) Milne-Thomson, L. M. (1933) The Calculus of Finite Differences, MacMillan, London. Mohanty, S. G. (1979) Lattice Path Counting and Applications, Academic Press, New York. Montmort, P. R. (1708) Essai d' Analyse sur les Jeux de Hazards, Paris. Muir, T. (1878) On Professor Tait's problem of arrangement, Proceedings of the Royal Society of Edinburgh, 9, 382- 387. Narayana, T. V. (1979) Lattice Path Combinatorics with Statistical Applications, University of Toronto Press, Toronto. Netto, E. (1927) Lehrbuch der Kombinatorik, 2nd ed., Teubner. (Reprinted by Chelsea, 1958.) Nielsen, N. (1906) Hambuch der Theorie des Gammafunktion, Leipsig. (Reprinted by Chelsea, 1966.) Nielsen, N. (1923) Traite Elementaire des Nombres de Bernoulli, GauthierVillars, Paris. Norlund, N. E. (1924) Vorlesungen iiber Differenzenrechnung, Berlin. (Reprinted by Chelsea, 1954.) Polya, G. (1937) Kombinatorische Anzahlbestimmungen fiir Gruppen, Graphen und chemische Verbindungen, Acta Mathematica, 68, 145254. Poincare, H. (1896) Calcul des Probabilites, Gauthier-Villars, Paris. Raabe, J. L. (1851) Journal fur reine und angewandte Mathematik 42, 350. Rademacher, H. (1937a) On the partition function p(n), Proceedings of the London Mathematical Society, Series 2, 43, 241- 254. Rademacher, H. (1937b) A convergent series for the partition function, Proceedings of the National Academy of Sciences, U.S.A., 23, 78-84. Rademacher, H. (1940) Fourier expansions of modular forms and problems of partition, Bulletin of the American Mathematical Society, 46, 59-73.
BIBLIOGRAPHY
599
Rademacher, H. (1943) On the expansion of the partition function in a series, Annals of Mathematics, 44, 416-422. Read, R. C. (1987) P6lya's theorem and its progeny, Mathematics Magazine, 60, 275-282. Riordan, J. (1937) Moment recurrence relations for binomial, Poisson and hypergeometric frequency distributions, Annals of Mathematical Statistics, 8, 103- 111. Riordan, J. (1958). An Introduction to Combinatorial Analysis, John Wiley & Sons, New York. Riordan, J. (1968) Combinatorial Identities, John Wiley & Sons, New York. Roman, S. (1980) The formula of Faa di Bruno, American Mathematical Monthly, 87, 805-809. Schlafli, L. (1867) Erganzung der abhandlung uber die entwickelung des products, Journal fUr die reine und angewandte Mathematik, 67, 179182. Schlomilch, 0. (1852) Recherches sur les coefficients des faculties analytiques, Journal fur die reine und angewandte Mathematik, 44, 344355. Schlomilch, 0. (1895) Compendium der Hoheren Analysis, Braunschweig. Seal, H. L. (1949) The historical development of the use of generating functions in probability theory, Bulletin de l' Association des Actuaires Suisses, 49, 209- 228. Shanmugan, R. (1984) On central versus factorial moments, South African Statistical Journal, 18, 97- 110. Shumway, R. and Gurland, J. (1960) A fitting procedure for some generalized Poisson distributions, Skandinavisk Aktuarietidskrift, 43, 87108. Spitzer, F. (1964) Principles of Random Walks, Van Nostrand, New York. Stanley, R. P. (1978) Generating functions, in Studies in Combinatorics, Vol. 17, G.-C. Rota (ed.), pp. 100-141, Mathematical Association of America, Washington, D.C. Steffensen, J. F. (1927) Interpolation, Williams and Wilkins, Baltimore. (Reprinted by Chelsea, New York, 1950.)
600
BIBLIOGRAPHY
Stirling, J. (1730) Methodulus Differentialis sine Tractatus de Summatione et Interpolatione Serierum Infinitarum, Londini. (English translation by F. Holliday with title: The Differential Method, London, 1749.) Sylvester, J. (1883) Note sur le theorem de Legendre cite dans une Note inseree dans les Comptes Rendus, Comptes Rendus de l' Academie des Sciences, Paris, 96, 463- 465. Takacs, L. (1967a) Combinatorial Methods in the Theory of Stochastic Processes, John Wiley & Sons, New York. Takacs, L. (1967b) On the method of inclusion and exclusion, Journal of the American Statistical Association, 62, 102-113. Takacs, L. (1991) A moment convergence theorem, American Mathematical Monthly, 98, 742-746. Touchard, J. (1934) Sur un probleme de permutations, Comptes Rendus de l' Academie des Sciences, Paris, 198, 631-633. Touchard, J. (1939) Sur les cycles des substitutions, Acta Mathematica, 70, 243-279. Touchard, J. (1953) Permutations discordant with two given permutations, Scripta Mathematica, 19, 108-119. Tucker, A. (1974) P6lya's enumeration formula by example, Mathematics Magazine, 47, 248-256. Vandermonde, N. (1772) Memoire sur des Irrationneles de differens ordres avec application au cercle, Histoire de l' Academie Royale des Sciences, Part 1, 489-498. Vilenkin, N. Y. (1971) Combinatorics, Academic Press, New York. Ward, W. (1934) The representation of the Stirling's numbers and the Stirling's polynomials as sums of factorials, American Journal of Mathematics, 56, 87-95. Whitworth, W. A. (1867) Choice and Chance, Hafner Press, New York. Worpitzky, J. (1883) Studien iiber die Bernoullischen and Eulerschen Zahlen, Journal fiir die reine und angewandte Mathematik, 94, 203232.
Index
Abel polynomials, 206 Abel's formula, 207 Addition principle, 16 Arithmetic progression, sum of terms of, 31, 194 Ballot numbers, 81, 230, 274 Ballot problem, 80, 85, 100 Banach matchbox problem, 85 Bell numbers, 97, 199, 342, 474, 477 exponential, 199 Beneficial bet, 82 Bernoulli numbers, 328, 329 Binary number system, 19, 54 Binary sequences, enumeration of, 19, 36, 54 Binomial coefficient(s), 110 cycles of, 231 definition of, 112 monotonicity of, 115 orthogonality relation, 126 recurrence relation of, 55, 56, 59, 129 table of, 56 q-binomial coefficient( s) defined, 404 orthogonality relation, 406 recurrence relation of, 404, 405 Binomial convolution formula, 115 q-binomial convolution formula, 406 q-binomial formula, 406
Binomial generating function, 216 Binomial moments of a sequence, 215 Bipartitional polynomials exponential, 454 general, 455 logarithmic, 457 partial, 454 potential, 458 Birthday problem, 88 Bonferroni inequalities, 154 Booking tickets, 20 Boole inequality, 155 Boolean algebra, 12 Burnside theorem, 494 Caravan in the desert, 180 Cardinal of a set, 14 Carlitz numbers, 537 definition of, 523 explicit expression of, 523 expressed by the generalized factorial coefficients, 528 generating function of, 527 limiting expression of, 529 non-central, 539 recurrence relation of, 524 table of, 526 Carlitz polynomial, 525 Carlitz-Riordan numbers of the first kind, 329
601
602
Carlitz-Riordan numbers of the second kind, 330, 543, 544 Cartesian product, 5 Cashier problem, 81 Catalan numbers, 81, 100, 196, 229 convolution of, 229 generating function of, 197 recurrence relation of, 196 table of, 196 Cauchy identity, 465, 481 Cauchy numbers, 327, 329 Cauchy's binomial convolution formula, 115 Cayley identity, 481 Characteristic equation, 239 Chebyshev polynomials of the first kind, 449 of the second kind, 450 Circular permutation(s), 92, 462 enumeration by successions, 181, 183 succession of, 181 Coefficients of the generalized factorials, 345 associated, 367 Coincidence numbers, 173 generating function of, 219, 222 table of, 173 Coincidences double, 186 generalized problem, 188 multiple, 187 number of, 173 problem, 173 Coloring(s) of a cube, 496, 506 a roulette, 510 the elements of a set, 499 enumeration of, 500 model of, 499 weight of, 501 Combination (s)
INDEX
definition of, 51 enumeration of, 52 general generating function for the number of, 209 generating function for the number of, 193 recurrence relation for the number of, 55, 56 with limited repetition generating function for the number of, 211 with repetition definition of, 51 enumeration of, 58 generating function for the number of, 210 recurrence relation for the number of, 59 with restricted repetition enumeration of, 139, 144, 164, 504 Compositions of integers, 401, 511 Compound bivariate discrete distributions, 456 Compound discrete distributions, 422 Connection of cumulants and moments, 426, 457 Connection of ordinary and factorial moments, 285 Convolution of a logarithmic distribution, 287 Convolution of sequences, 194 Correspondence, 7 Coupon collector's problem, 151, 313 Cycles of binomial coefficients, 231 De Morgan's formulae, 12 Decomposition of a product of primes into factors, 34 7 Delannoy numbers, 274 Derangement(s) definition of, 170
INDEX
number of, 170 recurrence relation for the number of, 171 Derivatives of a composite function, 420, 453 Difference equation, 22 Dinner choices in a Chinese restaurant, 418 Display of flags on poles, 60 Distribution of shares, 83, 262 Distributions of balls of general · specification into distinguish. ordered urns enumeration of, 348, 349 into distinguishable urns enumeration of, 350-352 generating function of the number of, 356 Distributions of distinguishable balls into distinguishable urns enumeration of, 48, 340, 341 generating function of the number of, 354 into indistinguishable urns enumeration of, 68, 342 Distributions of indistinguish. balls into distinguishable urns, 60 connection with integer solutions of a linear equation, 71 enumeration of, 54, 343345 generating function of the number of, 355 Distributions of students in sections, 67 Division(s) of a finite set definition of, 13 enumeration of, 62, 97, 124, 149 recurrence relation for the number of, 64 Double coincidences, 186 Down-up permutations, 543
603
Duration of a series of drawings, 175 Elementary symmetric functions, 192, 427, 432, 458 Elements in a given number of exchangeable sets, enumeration of, 143, 147, 148 Elements in a given number of sets, enumeration of, 137, 145, 148 Elements in a union of exchangeable sets, enumeration of, 142 Elements in a union of sets, enumeration of, 132, 134 Elements of a given rank, 156 enumeration of, 156, 157 Elevator passengers' discharge, 67, 91, 133 Equivalence class, 493 Equivalence relation, 7 Equivalent sets, 9 Euler numbers, 514, 543 Euler's function, 140, 491, 497, 498, 506, 510, 511 table of, 140 Euler's identity, 393, 402 Euler's pentagonal theorem, 389 Euler's recurrence relation for subfactorials, 171 Eulerian numbers, 530 definition of, 514 explicit expression of, 515 expressed by Stirling numbers of the second kind, 519 expressing sample moments, 521 generating function of, 518 non-central, 538 expressed by non-central Stirling numbers of the second kind, 539 recurrence relation of, 516
604
symmetric, 514 table of, 517 q-Eulerian numbers, 540 Eulerian polynomial, 516 expressing power series, 520 Exchangeable sets, 142 Faa di Bruno formula, 420 generalization, 434 Factorial, 43, 104 central, 329 falling, 105 rising, 105 q-factorial, 404 Factorial convolution formula, 105 q-factorial convolution formula, 406 Factorial generating function, 216 Factorial moments of a sequence, 215 Factors of a positive integer, enumeration of, 19, 37 Family of elements, 8 Fibonacci numbers, 74, 100, 101, 253, 269, 401 convolution of, 271 generalized, 270 generating function of, 254 of order s, 269 table of, 254 Formation of committees, 352, 353 Frechet inequality, 166 Function, 7 Galilei problem, 92, 161 Gambler's ruin, 242 expected time to, 246 Gauss-Jacobi identity, 394, 402 Gegenbauer polynomials, 450 Generalized factorial coefficients, 152, 165, 307, 312, 344, 345, 347 associated, 166, 326, 327, 366 asymptotic expression of, 323 definition of, 302
INDEX
explicit expression of, 306 generating function of, 305 in terms of Stirling numbers, 304 limiting expression of, 307 non-central, 318, 319, 334, 540 orthogonality relation, 308 recurrence relation of, 309, 310 table of, 311 Generating function binomial, 201, 216 exponential, 194 factorial, 201, 216 for the number of combinations, 193, 209 for the number of permutations, 193, 210 general form of, 200 moment, 216 multivariate, 219 ordinary, 194 Genocchi numbers, 544 Geometric progression, sum of terms of, 21, 33 Gould polynomials, 207 Gould's formula, 208 Gould-Hopper numbers, 318 Group of permutations, 489 alternating, 490 cycle indicator of, 489 cyclic, 491 identity, 489 symmetric, 489, 490 Gumbel inequality, 166 Hanoi tower, transfer of, 238 Hermite polynomials, 449 generalized, 449 Homogeneous product sum symmetric functions, 432, 458 q-identity, 392 Inclusion and exclusion principle, 134, 136
INDEX
general expression of, 145 Inequalities of Bonferroni, 154 Inequality of Boole, 155 Frechet, 166 Gumbel, 166 Integer solutions of a linear equation, 68 connection with distributions of indistinguish. balls into distinguishable urns, 71 enumeration of, 69-71,98, 138 Inverse map, 8 Inverse relation, 7 Inverse relations, 284 Inversion of power series, 437, 438 Inversions of permutations, 541 Lagrange inversion formula, 435 Lagrange series, 205, 439 Laguerre polynomials, 449, 452 Lah numbers, 302 non-central, 335 signless, 302 q-Lah numbers, 409 signless, 409 Lattice paths, 75 enumeration of, 76-78 figure, 77 with diagonal steps, 100 Leibnitz numbers, 127, 275 Lucas numbers, 75, 270 generalized, 271 of order s, 270 Maclaurin power series, 202 Magic squares, 1 Map, 7 bijective, 7 identity, 8 injective, 7 inverse, 8 surjective, 7
605
Mean of a sequence, 215 Menages numbers, reduced, 142 table of, 142 Menages problem, 140 modified, 163 straight table, 163 Mobius function, 166 Mobius inversion formula, 167 Models of necklaces, 498, 511 Moment generating function, 216 Moments of a sequence, 215 Money-changing problem, 383 Monomials in a polynomial, enumeration of, 99 Morse code, 36, 346 Multinomial coefficient(s), 123 generating function of, 222 recurrence relation of, 64 sum of, 150, 165, 400 Multinomial formula, 123 Multiple coincidences, 187 Multiplication principle, 20 Multivariate generating function, 219 q-negative binomial formula, 406 Newcomb's problem, 513 Newton factorial series, 204 Newton's formula binomial, 111 general binomial, 115 negative binomial, 112 Norlund-Bernoulli numbers, 328 Null set, 3 q-number, 404 Number system binary, 19, 54 of base 5, 159 quaternary, 224 ternary, 47 Occupancy problem, 339 classical, 340 Operator IP = tLl, 286
INDEX
606
e
Operator = tD, 286 Orbit, 493 enumeration of the elements of, 494 Order relation, 7 Ordered n-tuple, 5 Ordered pair, 5 Parcelling out procedures, 228 Partial derivatives of a function, number of, 99 Partial sums, generating function of, 255 Partition polynomial(s) exponential Bell, 412, 452, 466, 473, 490, 505 convolution of, 448 generating function of, 414 of an arithmetical function, 416 recurrence relation of, 415 general, 419 generating function of, 420 recurrence relation of, 420 logarithmic, 424 generating function of, 424 recurrence relation of, 425 partial Bell, 412, 466, 473 generating function of, 413 recurrence relation of, 415 table of, 417 potential, 428, 431, 451 expressed by partial Bell, 430 generating function of, 428 recurrence relation of, 429 Partition(s) of a finite set definition of, 14 enumeration of, 66, 273, 274 Partition(s) of integers conjugate, 386 definition of, 370 Ferrers diagram of, 386
generating function for the numbers of, 374, 375, 511 interrelations among partition numbers, 383-385, 387 into even number of parts, 381 into even number of unequal parts, 381, 389 into even parts, 379 into even unequal parts, 398 into odd number of parts, 381 into odd number of unequal parts, 381, 389 into odd parts, 379 into odd unequal parts, 398 into parts of restricted size, 380, 396, 398 into specified parts, 382 into unequal parts, 378 into unequal parts of restricted size, 400 perfect, 401 recurrence relation for the number of, 371, 373 self-conjugate, 386 table for the numbers of, 372, 373 universal generating function for the numbers of, 377, 378 Partitions of ordered pairs of integers, 403 Pascal's triangle, 55 Perfect partitions, 401 Permutation(s) ascending runs of, 530 cycle decomposition of, 463 cyclic with restricted repetition, 505 definition of, 40 enumeration of, 42 by ascending runs, 530 by cycles, 464, 465 by fixed points, 170, 172 by inversions, 541
INDEX
by partially ordered cycles, 472, 473, 475 by peaks, 541 by ranks, 175 by records, 540 by successions, 177, 179 by transpositions, 189 even, 469 falls of, 531 fixed points of, 169 general generating function for the number of, 210 generating function by number of cycles, 466, 467 generating function by number of partially ordered cycles, 474, 477 generating function for the number of, 193 odd, 469 order of, 491 rank of, 174 recurrence relation for the number of, 45, 46 restricted enumeration by cycles, 465 enumeration by ordered cycles, 474 rises of, 531 succession of, 176 universal generating function by number of cycles, 484 with limited repetition generating function for the number of, 214 with repetition generating function for the number of, 213 definition of, 40 enumeration of, 47, 49 generating function by the number of non-descending runs, 537 non-descending runs of, 533
607
with restricted repetition enumeration of, 164 Pigeonhole principle, 38 P6lya counting theorem, 502 Population, 86 Power set, 4 Power sum symmetric functions, 427, 432, 458 Principle of addition, 16 inclusion and exclusion, 134, 136 multiplication, 20 pigeonhole, 38 reflection, 78 the want of sufficient reason, 24 Priority lists, 349 Probability, 26 classical, 24 Probability distribution binomial, 88, 218 binomial moments of, 218 mean of, 111 moments of, 125 geometric, 217 factorial moments of, 217 moments of, 520 hypergeometric, 87 mean of, 106 moments of, 124 logarithmic distribution convolution of, 287 negative binomial moments of, 126 negative hypergeometric, 87 mean of, 125 moments of, 125 Product, 30 Rank numbers, 176, 185 table of, 176 Rank of a permutation, 174 Recurrence relation
608
definition of, 22 linear, 233 linear complete, 233 general solution of, 235 particular solution of, 235, 244 solution by generating function, 256 solution by iteration, 235 linear homogeneous, 233 solution by method of characteristic roots, 239 linear with constant coefficients general solution of, 248 particular solution of, 248 solution by generating function, 250 solution of, 237 solution of, 234 Reflection principle, 78 figure, 79 Regions of a plane enumeration of, 237,265,272 Relation, 7 equivalence, 7 inverse or reciprocal, 7 Round table conference, 183 Runs in combinations, 98, 161 Runs in permutations, 97 Sample, 86 Sample points, 24 Sample space, 24 Schlomilch's formula, 290 Selection of a central committee, 347 Sequence of elements, 8 Set, 3 cardinal of, 14 complement of, 10 countable, 9 division of, 13 empty or null, 3 finite, 9
INDEX
infinite, 9 infinitely countable, 9 partition of, 14 uncountable, 9 universal, 3 Sets difference of, 10 disjoint, 13 equivalent, 9, 14 exchangeable, 142 intersection of, 10 union of, 9 Sieve of Eratosthenes, 160 Soccer's results foresight, 37 Spread of rumors, 101 Stabilizer, 493 Statistical mechanics model Bose-Einstein, 89 Fermi-Dirac, 90 Maxwell-Boltzman, 89 Stirling numbers of the first kind, 204, 291, 299, 328, 329 Schlomilch's formula for, 290 associated, 323, 324 asymptotic expression of, 323 definition of, 278 explicit expression of, 291 expressed in terms of the Stirling numbers of the second kind, 290 generating function of, 282 in non-identical Bernoulli trials, 283 non-central, 314 non-central signless, 315, 331, 332, 466 recurrence relation, 321 recurrence relation of, 293, 295 signless, 279, 280, 322, 465, 471, 477, 478, 483 generating function of, 283 recurrence relation of, 294 signless associated, 478 table of, 294
INDEX
q-Stirling numbers of the first kind, 407, 408 Stirling numbers of the second kind, 96,97, 150,151,165,202, 291, 298, 299, 328, 329, 340, 342, 347, 368, 474, 519, 533, 544 associated, 165, 324, 325, 365 asymptotic expression of, 323 definition of, 278 explicit expression of, 289 generating function of, 282, 298 in a Markov chain, 300 non-central, 188, 314, 332, 341, 347, 475 recurrence relation, 321 recurrence relation of, 293, 297 table of, 295 q-Stirling numbers of the second kind, 407, 408 Stirling numbers, orthogonality relations, 281 Stirling's formula, 109 Stochastic model, 24 Subfactorials, 178, 182, 185 defined, 172 generating function of, 199 table of, 172 Subset, 4 Subsets of a finite set number of, 21, 116 recurrence relation for the number of, 23 Succession numbers, 179, 230 generating function of, 230 table of, 180 Succession of a circular permutation, 181 Succession of a permutation, 176 Sum, 27 Sum of multinomial coefficients, 150, 165, 400
609
Summation, changing the order of, 29 Sums of sums, generating function of, 261 Symbolic calculus, 198 Symmetric functions elementary, 192, 427, 432, 458 homogeneous product sum, 432, 458 power sum, 427, 432, 458 Tangent coefficients, 543 Tennis tournament problem, 237 Ternary number system, 47 Ternary sequences enumeration of, 47, 93 Touchard polynomial(s), 442,452, 475 expressed by Bell polynomials, 445 generating function of, 444 recurrence relation of, 446 Transportation of products, 73 Transposition, 189, 462 Triangulation of convex polygons, 229 Universal set, 3 Up-down permutations, 543 Vandermonde's formula, 105 Variance of a sequence, 216 Venn diagrams, 4 Wallis formula, 107 Wronski determinant, 234