Introduction To Combinatorial Mathematics: George Voutsadakis
Introduction To Combinatorial Mathematics: George Voutsadakis
George Voutsadakis1
1 Generating Functions
Introduction
Generating Functions and Combinations
Enumerators for Permutations
Distributions of Distinct Objects Into NonDistinct Cells
Partitions of Integers
The Ferrers Graph
Elementary Relations
Subsection 1
Introduction
The sequences (1, 3, 7, 0, 0) and (1, 2, 6, 1, 1) will also yield the same
ordinary generating function:
1 + 3(1 + x) + 7(1 − x) = 11 − 4x;
1 + 2(1 + x) + 6(1 − x) + (1 + x 2 ) + (1 − x 2 ) = 11 − 4x.
Thus, the functions 1, 1 + x, 1 − x, 1 + x 2 , 1 − x 2 , . . . should not be
used as indicator functions.
George Voutsadakis (LSSU) Combinatorics April 2016 7 / 71
Generating Functions Introduction
F (x) = a0 + a1 x + a2 x 2 + · · · + ar x r + · · · .
Subsection 2
Enumerators
We saw that the polynomial (1 + ax)(1 + bx)(1 + cx) is the ordinary
generating function of the different ways to select the objects a, b and
c.
Instead of the different ways of selection, we may only be interested
in the number of ways of selection.
By setting a = b = c = 1, we have
(1 + x)(1 + x)(1 + x) = (1 + x)3 = 1 + 3x + 3x 2 + x 3 .
We see that there are:
One way to select no objects from the three objects C (3, 0);
Three ways to select one object out of three, C (3, 1); etc.
A generating function that gives the number of combinations or
permutations is called an enumerator.
An ordinary generating function that gives the number of
combinations or permutations is called an ordinary enumerator.
George Voutsadakis (LSSU) Combinatorics April 2016 10 / 71
Generating Functions Generating Functions and Combinations
C (n, r ).
Some Consequences
From n0 + n1 x + n2 x 2 + · · · + nr x r + · · · + nn x n = (1 + x)n , by
setting x = 1, we get
n n n n n
+ + + ··· + + ··· + = 2n .
0 1 2 r n
The combinatorial significance of this identity is that both sides give
the number of ways of selecting none, or one, or two, . . ., or n objects
out of n distinct objects.
By setting x = −1, we also have the identity
n n n r n + · · · + (−1)n n = 0. Rewriting as
0 − 1 + 2 − · · · + (−1) r n
n n n n n n
+ + + ··· = + + + ··· ,
0 2 4 1 3 5
we see that
the number of ways of selecting an even number of objects is equal to
the number of ways of selecting an odd number of objects from n
distinct objects.
George Voutsadakis (LSSU) Combinatorics April 2016 12 / 71
Generating Functions Generating Functions and Combinations
An Application
Find the number of 2n-digit binary sequences which are such that the
number of 0’s in the first n digits of a sequence is equal to the
number of 0’s in the last n digits of the sequence.
Since the number of n-digit binary sequences containing r 0’s is nr ,
What does the combinatorial argument used in the previous slide tell
us in this case?
George Voutsadakis (LSSU) Combinatorics April 2016 15 / 71
Generating Functions Generating Functions and Combinations
Example
Start with
n n n r n n
+ x + ··· + x + ··· + x = (1 + x)n .
0 1 r n
Now set x = 1.
Example
Example
Claim: The ordinary generating function of the sequence
0 2 4 2r −1/2 .
0 , 1 , 2 , . . . , r , . . . is (1 − 4x)
Recall the binomial theorem
∞
n
X n(n − 1)(n − 2) · · · (n − r + 1) r
(1 + x) = 1 + x
r!
r =1
for n not a positive integer.
Applying the theorem, we get
(−1/2)(−1/2−1)···(−1/2−r +1)
(1 − 4x)−1/2 = 1 + ∞ (−4x)r
P
Pr =1 r!
4r (1/2)(3/2)(5/2)···((2r −1)/2) r
= 1+ ∞ x
Pr =1 2r (1·3·5···(2r −1)) r
r!
= 1+ ∞ x
Pr =1 r!
(2r ·r !)(1·3·5···(2r −1)) r
= 1+ ∞ x
Pr =1 r !r !
(2·4·6···2r )(1·3·5···(2r −1)) r
= 1+ ∞ x
Pr =1 (2r )! r
r !r ! P
= 1+ ∞ r =1 r !r ! x = 1 +
∞ 2r r
r =1 r x .
An Application
Evaluate the sum
t
X 2i 2t − 2i
, for a given t.
i t −i
i =0
We know:
2i
is the coefficient of the term x i in (1
i − 4x)−1/2 ;
2t−2i
is the coefficient of the term x t−i
t−i in (1 − 4x)−1/2 .
Thus, ti=0 2ii 2t−2i is the coefficient of the term x t in
P
t−i
(1 − 4x)−1/2 (1 − 4x)−1/2 .
But, we have (1 − 4x)−1/2 (1 − 4x)−1/2 = (1 − 4x)−1 =
1 + 4x + (4x)2 + (4x)3 + · · · + (4x)r + · · · . Thus,
t
X 2i 2t − 2i
= 4t .
i t −i
i =0
We can extend the framework for the case when repetitions are
allowed in the selections.
Example: The ordinary generating function for the combinations of
the objects a, b and c, where a can be selected twice is
(1 + x + x 2 )(1 + x)2 = 1 + 3x + 4x 2 + 3x 3 + x 4 .
Example
Given two each of p kinds of objects and one each of q additional
kinds of objects, in how many ways can r objects be selected?
The ordinary enumerator for the combinations is
(1 + x + x 2 )p (1 + x)q .
r
2, if r is even
Let ⌊ 2r ⌋ denote the integral part of r
2: ⌊ 2r ⌋ = r −1 .
2 , if r is odd
Note that in the product above, to form the r
power x we may select:
i x 2 ’s among the p factors of the form 1 + x + x 2 ;
r − 2i x’s among the p − i remaining factors of the form 1 + x + x 2
and the q factors of the form 1 + x.
Thus, the coefficient of x r in the enumerator above is
⌊r /2⌋
X p p+q−i
.
i r − 2i
i =0
(1 + x + x 2+ · · · +x k + · · · )n
n
1
=
1−x
= (1 − x)−n
(−n)(−n − 1) · · · (−n − r + 1)
=1+ ∞ (−x)r
P
r =1
r!
(n)(n + 1) · · · (n + r − 1) r
=1+ ∞
P
r =1 x
r !
= ∞ n+r −1 r
P
r =0 r x .
(x + x 2 + · · · + x k + · · · )n
= x n (1 + x + · · · + x k−1 + · · · )n
n
1
=x n = x n (1 − x)−n
1−x
= xn ∞ x = ∞
n+i −1 i n+i −1 n+i
P P
i =0 i i =0 i x
P∞ r −1 r
= r =n r −n x
= ∞ r −1 r
P
r =n n−1 x .
Example
An Application
Find the number of ways in which four persons, each rolling a single
die once, can have a total score of 17.
For r = 17, n = 4, q = 1 and z = 6, the ordinary enumerator is
6 4
x 4 1−x
1−x . We have:
(1 − x 6 )4 = 1 − 4x 6 + 6z 12 − 4z 18 + x 24 ;
4 4·5 2 4·5·6 3
(1 − x)−4 = 1+ x + x + x + ··· .
1! 2! 3!
Thus, the coefficient of x 13 in (1 − x 6 )4 (1 − x)−4 is
4 · 5 · 6 · · · 16 4 · 5 · 6 · · · 10 4
−4· +6·
13! 7! 1!
14 · 15 · 16 8 · 9 · 10 4
= −4· +6· = 104.
3! 3! 1!
Subsection 3
P∞ −1/2
(1 − 4x)−1/2 = n=0n (−4x)n
P∞ (− 12 )(− 32 )(− 52 )···(− 12 −n+1)
= n=0 n! (−4)n x n
P∞ (−1)(−3)(−5)···(−2n+1)
= n=0 2n n! (−1)n 2n 2n x n
P∞ 1·3·5···(2n−1)n!2n x n
= n=0 n! n!
P∞ (2n)! x n
= n=0
P∞ n! n! x n
= n=0 P(2n, n) n! .
Examples
Example
e x (e x − 1)(e x − 1)(e x − 1) = e x (e 3x − 3e 2x + 3e x − 1)
= e 4x − 3e 3x + 3e 2x − e x
P∞ (4r −3·3r +3·2r −1) r
= r =0 r! x .
Example
Example
Example
Example (Cont’d)
We obtained
h
r ! r1! · 1 + (r −1)!1!
1
·n+ 1
(r −2)!2! · n(n + 1)+
i
1 1
(r −3)!3! · n(n + 1)(n + 2) + · · · + r! · n(n + 1) · · · (n + r − 1) .
Subsection 4
..
.
x r
(e −1) S(1,r ) S(2,r ) 2 S(r ,r ) r
r! = S(0, r ) + 1! x + 2! x + · · · + r ! x + ···
(e x −1)r +1
(r +1)! = S(0, r + 1) + S(1,r1!+1) x + S(2,r2!+1) x 2 + · · · + S(r ,r +1) r
r! x + ···
..
.
Subsection 5
Partitions of Integers
4, 3 + 1, 2 + 2, 2 + 1 + 1, 1 + 1 + 1 + 1.
Partition Enumerators
F (x) = (1 + x + x 2 + x 3 + · · · + x r + · · · )
(1 + x 2 + x 4 + x 6 + · · · + x 2r + · · · )
(1 + x 3 + x 6 + x 9 + · · · + x 3r + · · · )
(1 + x 4 + x 8 + x 12 + · · · + x 4r + · · · )
· · · (1 + x n + x 2n + x 3n + · · · + x nr + · · · )
1
= .
(1 − x)(1 − x )(1 − x 3 )(1 − x 4 ) · · · (1 − x n )
2
F (x) does not enumerate the p(j)’s for j > n. It only enumerates the
number of partitions of the integer j that have no part exceeding n.
Examples
From (1−x)(1−x1 2 )(1−x 3 ) = 1 + x + 2x 2 + 3x 3 + 4x 4 + 5x 5 + 7x 6 + · · ·,
we get:
There are three ways to partition the integer 3.
There are seven ways to partition the integer 6, such that the parts do
not exceed 3.
The ordinary generating function of the infinite sequence
(p(0), p(1), p(2), . . . , p(n), . . .) is
1
F (x) = .
(1 − x)(1 − x 2 )(1 − x 3 ) · · ·
1
In (1−x)(1−x 3 )(1−x 5 )···(1−x 2n+1 )
:
the coefficient of x k for k ≤ 2n + 1 is the number of partitions of the
integer k into odd parts;
the coefficient of x k for k > 2n + 1 is the number of partitions of the
integer k into odd parts not exceeding 2n + 1.
George Voutsadakis (LSSU) Combinatorics April 2016 50 / 71
Generating Functions Partitions of Integers
More Examples
Example
Note that
(1 + x)(1 + x 2 )(1 + x 3 )(1 + x 4 ) · · · (1 + x r ) · · ·
1 − x2 1 − x4 1 − x6 1 − x 2r
= · · · · · ···
1 − x 1 − x2 1 − x3 1 − xr
1
= .
(1 − x)(1 − x 3 )(1 − x 5 ) · · ·
So, the number of partitions of an integer into distinct parts is equal
to the number of partitions of the integer into odd parts.
Example The integer 6 can be partitioned into distinct parts in four
different ways:
6, 5 + 1, 4 + 2, 3 + 2 + 1.
There are also exactly four different ways in which 6 can be
partitioned into odd parts:
5 + 1, 3 + 3, 3 + 1 + 1 + 1, 1 + 1 + 1 + 1 + 1 + 1.
Example
Note that
r
(1 − x)(1 + x)(1 + x 2 )(1 + x 4 )(1 + x 8 ) · · · (1 + x 2 ) · · ·
r
= (1 − x 2 )(1 + x 2 )(1 + x 4 )(1 + x 8 ) · · · (1 + x 2 ) · · ·
r
= (1 − x 4 )(1 + x 4 )(1 + x 8 ) · · · (1 + x 2 ) · · ·
= · · · = 1.
So, we have the identity
1 r
= (1 + x)(1 + x 2 )(1 + x 4 )(1 + x 8 ) · · · (1 + x 2 ) · · · .
1−x
1
Recalling that 1−x = 1 + x + x 2 + x 3 + x 4 + · · ·, we conclude that
any integer can be expressed as the sum of a selection of the integers
1, 2, 4, 8, . . . , 2r , . . . (without repetition) in exactly one way.
This is the well-known fact that a decimal number can be represented
uniquely as a binary number.
George Voutsadakis (LSSU) Combinatorics April 2016 53 / 71
Generating Functions Partitions of Integers
Example
Note that
1
1−x = (1+x)(1+x 2 )(1+x 4 )(1+x 8 )···(1+x 2r )···
= (1 − x + x 2 − x 3 + x 4 − · · · )
(1 − x 2 + x 4 − x 6 + x 8 − · · · )
(1 − x 4 + x 8 − x 12 + x 16 − · · · ) · · ·
r r r r
(1 − x 2 + x 2·2 − x 3·2 + x 4·2 − · · · )...
Thus, to partition any integer n larger than 1 into parts that are
powers of 2, namely, 1, 2, 4, 8, . . . , 2r , . . ., the number of partitions
that have an even number of parts is equal to the number of
partitions that have an odd number of parts.
The series 1 − x + x 2 − x 3 + x 4 − · · · enumerates the number of 1’s in
a partition, with terms corresponding to an even number of 1’s in the
partition having +1 as the coefficients and terms corresponding to an
odd number of 1’s in the partition having −1 as the coefficients.
George Voutsadakis (LSSU) Combinatorics April 2016 54 / 71
Generating Functions Partitions of Integers
Example (Cont’d)
Example (Illustrated)
Example: The four partitions of the integer 5 into parts that are
powers of 2 are
4 + 1, 2 + 1 + 1 + 1, 2 + 2 + 1, 1 + 1 + 1 + 1 + 1.
Subsection 6
Ferrers Graphs
Subsection 7
Elementary Relations
Similarly, by definition,
C (x) = A(x) × B(x)
if and only if the members of the sequences are related as follows:
c0 = a0 b0 , c1 = a1 b0 + a0 b1 , . . . ,
cr = ar b0 + ar −1 b1 + ar −2 b2 + · · · + a1 br −1 a0 br , . . . .
(a0 , a0 + a1 , a0 + a1 + a2 , . . . , a0 + a1 + a2 + · · · + ar , . . .).
1
1−x is, therefore, called the summing operator.
Example: Find the coefficient of the term x 37 in
1 − 3x 2 + 4x 7 + 12x 21 − 5x 45
.
1−x
We have as the answer 1 − 3 + 4 + 12 = 14.
c0 = a0 + b0 , c1 = a1 + b1 , . . . , cr = ar + br , . . . .
By definition,
C (x) = A(x) × B(x)
if and only if the members of the sequences are related as follows:
Example
Pr r!
Evaluate the sum i =0 (r −i +1)!(i +1)! .
Note
P that
r r! Pr r! 1 1 Pr r 1 1
i =0 (r −i +1)!(i +1)! = i =0 (r −i )!i ! r −i +1 i +1 = i =0 i r −i +1 i +1 .
We also have
1 1 2 1 r
ex = 1+ 1! x + 2! x + ··· + r! x + · · ·
1 x 1 1 2 1 r −1
x (e − 1) = 1+ 2! x + 3! x + ··· + r! x + ···
Example (Cont’d)
Note that
1 1
x2
(e x − 1)2 = x2
(e 2x − 2e x + 1)
1 (2x) (2x)2 x x2
= x2
((1 + 1! + 2! + · · · ) − 2(1 + 1! + 2! + · · · ) + 1)
(22 −2) (23 −2)
= 1
x2
(((1 − 2) + (2x−2x)
1! + 2! x2 + 3! x 3 + · · · ) + 1)
2 3 4
= ( 22! − 2!
2
) + ( 23! − 3!
2
)x + ( 24! − 2
4! )x
3 + ···
r+2
+ ( (r2+2)! − 2
(r +2)! )x
r + ··· .