Professional Documents
Culture Documents
Notation iii
Chapter 1. Introduction 1
§1.1. What is discrete mathematics? 1
§1.2. Applications 2
§1.3. Famous theorems 2
§1.4. Combinatorial objects 2
§1.5. Combinatorial ideas 3
§1.6. Prizes and journals in discrete mathematics 3
§1.7. People in discrete mathematics 4
§1.8. Conjectures in discrete mathematics 4
§1.9. Computer programming 6
§1.10. Internet sources 6
§1.11. Recommended books 6
Chapter 2. Basic mathematical logic 7
§2.1. Propositions and truth tables 8
§2.2. Mathematical proof 12
§2.3. Paradoxes 14
Exercises 2 14
Chapter 3. Enumeration 15
§3.1. How to count 15
§3.2. Set partitions and multisets 17
§3.3. Integer partitions and compositions 18
§3.4. Permutations 24
§3.5. Words 31
i
ii Contents
iii
Chapter 1
Introduction
(3) Logic: valid reasoning and inference, directed graphs, fuzzy logic, . . .
1
(10) Operations research: Linear programming, optimization, queuing theory, scheduling
theory, . . .
(11) Decision theory, utility theory, social theory, game theory, . . .
(12) Discretization: Numerical analysis, . . .
(13) Discrete analogues of continuous mathemtics: discrete Fourier transforms, discrete
geometry, di↵erence equations, . . .
(14) . . .
1.2. Applications
(1) Computer algorithms
(2) Programming
(3) Cryptography: Tutte at World War II and the public-key cryptography in the Cold
War.
(4) Automated theorem proving
(5) Software development
The Fulkerson Prize is awarded for outstanding papers in discrete mathematics. See also
Kirkman Medal.
(28) . . .
(5) . . .
Conjecture 1.1 (Erdős-Turán conjecture). Let A be a set of positive integers such that
X1
= 1.
n
n2A
Green and Tao [52] solved the case the A consists of all positive primes.
P
Conjecture 1.2 (Kurepa [70]). Define !n = nj=01 j!. Then no odd prime p divide !p.
Conjecture 1.3 (Collatz conjecture, the 3n + 1 problem). Define the function f by
(
n/2, if n is even;
f (n) =
3n + 1, if n is odd.
Then for any positive integer n, there exists a number j such that the jth iteration f (j) (n)
equals 1.
Paul Erdős said about the Collatz conjecture: “Mathematics may not be ready for such
problems.” He also o↵ered 500 US dollars for its solution. Lagarias in 2010 claimed that
based only on known information about this problem, “this is an extraordinarily difficult
problem, completely out of reach of present day mathematics.”
Conjecture 1.4 (Singmaster, 1971). The multiplicities of entries in Pascal’s triangle that is
not 1 have a finite upper bound. In other words, the number N (a) of times the number a > 1
appears in Pascal’s triangle satisfies N (a) = O(1).
For instance,
✓ ◆ ✓ ◆ ✓ ◆ ✓ ◆ ✓ ◆ ✓ ◆
120 16 10 10 16 120
120 = = = = = = ,
1 2 3 7 14 119
✓ ◆ ✓ ◆ ✓ ◆ ✓ ◆ ✓ ◆ ✓ ◆ ✓ ◆ ✓ ◆
3003 78 15 14 14 15 78 3003
3003 = = = = = = = = ,
1 2 5 6 8 10 76 3002
It can be checked that
N (120) = 6 and N (3003) = 8.
It is not known whether there is a number a 6= 3003 such that N (a) = 8. It is also not known
whether there is a number a such that N (a) = 5 or N (a) = 7. See Kane [64], Singmaster
[109].
Conjecture 1.5 (Ringel, 1964). For any tree T with m edges, the complete graph K2m+1
decomposes into 2m + 1 copies of T .
Conjecture 1.6 (Kotzig and Ringel, 1964). Every tree has an elegant labeling, where an
elegant labeling of a tree with m edges is an injection f : V (G) ! {0, 1, . . . , m} such that
{|f (u) f (v)| : uv 2 E(G)} = {1, 2, . . . , m}.
Conjecture 1.7 (Erdős-Straus). For any integer n 2, the number 4/n is the sum of three
positive unit fractions, i.e., the Diophantine equation
4 1 1 1
= + +
n x y z
has a positive integer solution (x, y, z).
Conjecture 1.7 is confirmed for n up to 1017 , see arxiv:1406.6307 and Erdős [37].
Conjecture 1.8 (Erdős–Gyárfás conjecture, 1995). Every graph with minimum degree 3
contains a simple cycle whose length is a power of 2.
Erdős o↵ered a prize of $100 for proving this conjecture, or $50 for a counterexample.
Daniel and Shauger (A result on the Erdős–Gyárfás conjecture in planar graphs, 2001) showed
its truth for planar claw-free graphs.
Conjecture 1.9 (Thomassen). Every 4-connected line graph is Hamiltonian.
Basic mathematical
logic
7
Much material of this chapter comes from Byer, Smeltzer, and Wantz [13], Epp [34]. The
next paragraph is almost copied from Epp’s book.
The first great treatises on logic were written by the Greek philosopher Aristotle. They
were a collection of rules for deductive reasoning that were intended to serve as a basis for
the study of every branch of knowledge. In the 17th century, Leibniz conceived the idea
of using symbols to mechanize the process of deductive reasoning in much the same way
that algebraic notation had mechanized the process of reasoning about numbers and their
relationships. Leibniz’s idea was realized in the 19th century by Boole and De Morgan, who
founded the modern subject of symbolic logic.
In 1977, Barwise [7] makes a rough division of contemporary mathematical logic into four
areas:
We do not use the definition enviroments for most “definitions” in this chapter, for most
notion involved are informally described. Rather, to be inspiring are they expected.
A statement or proposition is a declarative sentence that is true of false but not both. Every
proposition can be assigned an associated truth value, either true or false, denoted by T
and F , respectively. A conjecture is a statement that is believed to be true and has not been
proven.
The symbol ¬ is used in front of a proposition to denote the negation of the proposition.
The navigation statement ¬p is read “not p” when symbols are alone used. While the
statements are written out, the negation is usually written using typical sentence structures.
For example, if
p : Earth is a planet,
then the negation is
¬p : It is not the case that Earth is a planet,
or, alternatively,
¬p : Earth is not a planet.
Let p and q be propositions. We introduce four logical connectors, each of which is to create
a compound proposition based on p and q.
The statement “A unless B” means if B is false then A is true. A vacuous truth is a conditional
statement that is true because the antecedent cannot be satisfied.
Table 2.1 summarizes succinctly the rules for determining the truth value of the compound
proposition of two simple statements p and q, formed by negation, conjuction, disjunction,
conditional and biconditional.
Table 2.1. A truth table example.
p q ¬p p ^ q p _ q p ) q p , q
T T F T T T T
T F F F T F F
F T T F T T F
F F T F F T T
(1) parentheses,
(2) ¬,
(3) ^,
(4) _,
(5) ),
(6) ,.
For example, Table 2.2 is the truth table for the proposition (p ) q) ) r.
p q r p ) q (p ) q) ) r
T T T T T
T T F T F
T F T F T
T F F F T
F T T T T
F T F T F
F F T T T
F F F T F
A predicate is a statement that may be true of false depending on the values of its
variables. For example, x2 > 0 is a predicate, while “for each real number x, there exists a
real number y such that x2 + y > 0” is a proposition.
(1) The phrase “for each” (alternatively, for all, for every, for any) is called universal
quantifiers and denoted by the symbol 8.
(2) The phrase “there exists” (alternatively, there is/are) is called existential quantifiers
and denoted by the symbol 9.
Both universal quantifiers and existential quantifiers are called quantifiers. Incorporating
more than one variable using nested quantifiers can render predicates significantly more
complicated. Two common propositions are
The sentence implies a possibility that all boys admires the same girl. To minimize ambiguity,
the universal quantifier in a statement of the form
8 a 9 b, P (a, b),
is often translated as “For each” or “For any”, rather than “For all” or “For every”.
2.2. Mathematical proof
A mathematical proof that consists of a sequence of statements that begins with hypotheses
or premises and ends with a conclusion is also called a formal argument. The final conclusion
of a proof establishes a theorem, a statement that has been proven to be true using other
mathematical statements and acceptable rules of reasoning.
A syllogism is a kind of logical argument that applies deductive reasoning to arrive at a
conclusion based on two or more propositions that are asserted or assumed to be true. Some
basic forms of valid arguments are called rules of inference. Here are some basic rules of
inference.
(1) Appeal to probability is the logical fallacy of taking something for granted because
it would probably be the case or might possibly be the case.
For example, do you think every problem in the final examination of our class
should be lectured by David before the examination?
(2) The fallacy fallacy:
(p ) q) ^ ¬p =) ¬q.
For example, students go to class when there is no COVID-19. Now, along with
COVID-19, do students go to class or not?
(3) A false exclusionary disjunct:
(p _ q) ^ p =) ¬q.
For example, David writes a recommendation letter for a student if the student
obtained the full score in the class of Algebra or the student passed the examination
of Discrete Mathematics. Would David recognize a student with the full score in
Algebra as failed in the Discrete Mathematics examination?
(4) Fallcy of the converse:
(p ) q) ^ q =) p.
For example, a student has basic knowledge on Discrete Mathematics if he has
joined David’s class. Has every student who has basic knowledge on Discrete Math-
emaics joined David’s class?
(5) Fallacy of the inverse:
(p ) q) ^ ¬p =) ¬q.
A modified version of David’s class example works as an example of this fallacy.
(6) The existential fallacy:
(p ) q) =) 9 p.
For example, a girl claims that she will marry the first man who proposed to her
riding a colorful Xiangyun.
(7) Affirmative conclusion from a negative premise:
(p ) ¬q) ^ (q ) ¬r) =) (p ) r).
For example, no dogs are cats, and no cats can fly, therefore all dogs can fly.
(8) Illicit major (the major term is undistributed in the major premise but distributed
in the conclusion):
(p ) q) ^ (r ) ¬p) =) (r ) ¬q).
An example hint is that cats are animals and dogs are not cats.
(9) Illicit minor (the minor term is undistributed in the minor premise but distributed
in the conclusion):
(p ) q) ^ (p ) r) =) (q ) r).
An example hint is that dogs are animals and dogs weigh less than 1 ton.
(10) A fallacy of necessity is a fallacy whereby a degree of unwarranted necessity is placed
in the conclusion.
For example, bachelors are necessarily unmarried and Duadua is a bachelor.
Does these imply that Duadua cannot marry?
There are several methods of proving something that we have been already very familiar
with:
2.3. Paradoxes
Exercises 2
1) Consider the following inference: Since time is money and money is no object, time is no
object. How do you think?
2) Check Zeno’s paradox on Achilles and the tortoise, and find out a solution for the paradox.
3) Please tell some examples of the logic fallacies in your real life.
4) In philosophical logic, the masked-man fallacy is commited when one makes an illicit
use of Leibniz’s law in an argument, which states that if A and B are the same object,
then A and B are indiscernible. The masked-man fallacy can be seen from the argument
that duadua thinks David is smart but the instructor of Discrete Mathematics is not, and
obtain the conclusion that David is not the instructor. However, we know in mathematics
that if x = y and y 6= z then x 6= z. What di↵erences lie in there if we compare these
two inferences?
Homework: Ex. 2 1). Due time: 11.59 pm, Sept. 26th, 2021.
Chapter 3
Enumeration
For general and extensive intrdouction for all kinds of enumerative problems arising from
combinatorics, see Stanley’s bible book [114].
Throughout this note, we use Z to denote the set of integers, N the set of natural integers,
and Z+ the set of positive integers.
15
(5) Let f (n) be the number of subsets of [n] that do not contain two consecutive integers.
For example, f (4) = 8. It is easy to see that
f (n) = f (n 1) + f (n 2)
for n 2, which implies that
1
f (n) = p ⌧ n+2 ⌧¯n+2 ,
5
p p
where ⌧ = (1 + 5)/2 and ⌧¯ = (1 5)/2.
Example 3.1. Find the sequence a0 = 1, a1 , a2 , . . . of real numbers satisfying
Xn
(3.1) ak an k = 1
k=0
for all n 2 N.
The double factorial n!! is the product of all positive integers at most n that have the
same parity as n.
For general ideas of analysing methods and more examples for generating functions,
see Flajolet and Sedgewick [41] and Wilf [126].
Example 3.2. Suppose that a0 = a1 = 1 and
(3.2) an = an 1 + (n 1)an 2
Conclusion.
We use the notation [q n ]f (q) to denote the coefficient of q n in the Taylor’s expansion of
the series f (q) at q = 0.
Definition 3.3. A partition of the set [n] is a distribution of the elements of [n] into several
disjoint nonempty sets B1 , B2 , . . . , Br , so that each element is placed into exactly one set Bi .
The sets Bi are called blocks. The Stirling number S(n, k) of the second kind is the number
of ways of partitioning [n] into k nonempty indistinguishable blocks. A matching of [n] is a
partition of [n] whose every block contains at most 2 elements.
Let n = 7 and r = 4. Then
{1, 2, 4}, {3, 6}, {5}, {7}
is a partition of the set [7] into 4 blocks.
n=0 1
n=1 0 1
n=2 0 1 1
n=3 0 1 3 1
n=4 0 1 7 6 1
n=5 0 1 15 25 10 1
Figure 3.1. The Stirling numbers S(n, k) of the second kind for 0 n 5.
Hint. Consider the surjections from [n] to [k], and use the principle of inclusion-exclusion. ⇤
Conjecture 3.5 (Wegner, 1973). For any n 3, there is only one index rn such that
S(n, rn ) = max S(n, k).
1kn
It is checked for n 106 , see Canfield and Pomerance [15, 16], Wegner [123].
A multiset is a set allowing repeated elements. We write
n o
M = am 1
1
, a m2
2 , . . . , a mr
r
to denote a multiset, where the elements ai are distinct, and mi is the multiplicity of ai .
A bible for the theory of integer partitions is Andrews and Eriksson [4], see also Stanley [114,
Chapter 1].
Definition 3.6. A partition of a positive integer n is a sequence of positive integers,
commonly written as
= ( 1 , 2 , . . . , r ) ` n,
such that
r
X
1 2 ··· r 1 and i = n.
i=1
Let p(0) = 1 and let p(n) be the number of integer partitions of n for n 1. The function
p(n) is called the partition function. A composition of n is a finite sequence µ of positive
integers, commonly written as
µ = (µ1 , µ2 , . . . , µr ) |= n,
such that
r
X
µi = n.
i=1
The numbers i and µi are said to be the parts of and µ, respectively. A weak composition
of n is a list of nonnegative integers whose sum is n.
Set p(0) = 1. The values of the partition function p(n) for small n, see Table 3.1. The
Table 3.1. The values of the partition function p(n) for n = 0, 1, . . . , 16.
n 0 1 2 3 4 5 5 7 8 9 10 11 12 13 14 15 16
p(n) 1 1 2 3 5 7 11 15 22 30 42 56 77 101 135 176 231
From definition, we see that a partition ` n is essentially a set of integers whose sum
is n. Thus it corresponds to a multiset 1m1 2m2 . . . nmn bijectively, where mi is the number
of occurrences of the part i in . Commonly the term imi is omitted if mi = 0. In this way,
the partition is denoted compactly as
mk
= am 1 m2
1 a2 · · · ak ,
where n a 1 > a 2 > · · · > ak 1 are positive integers, and mj 1 is the multiplicity of
aj for all j 2 [k]. The multiplicities mj that equal to 1 are also omitted. For instance, the
partition (4, 4, 2, 1, 1) ` 12 is alternatively denoted by 42 212 ` 12.
By considering the last part of a composition, we know that the number of compositions
of n into ones and twos equals the Fibonacci number Fn+1 , which is defined recursively by
Fn = Fn 1 + Fn 2 and F1 = F2 = 1.
Proposition 3.7. The di↵erence p(n) p(n 1) is the number of partitions whose every
part is at least 2. As a consequence, p(n) > p(n 1).
See Fig. 3.2 for these graphs corresponding to the partition 42 211 , whose conjugate is
5322 .The self-conjugate partitions of 12 are
6214 , 53212 , and 42 22 .
If we turn the Young diagram up-side-down, then we call the resulting diagram the Young
Figure 3.2. The Ferrers diagram and Young board corresponding to the partition 42 211 .
Proof. The hooks of the cells on the diagonal of a self-conjugat partition of n form a partition
of n into distinct odd parts. For example, the self-conjugate partition 53212 ` 12 corresponds
to the partition 93 ` 12. It is obvious that this correspondence is a bijection. ⇤
Proposition 3.11. The number of partitions of n with Durfee side j is
X
p(m | parts j) · p(n j 2 m | parts j).
m
where p(t | parts j) is the number of partitions of t whose every part is at most j.
Proof. Let be a partition with Durfee side j. The Durfee square of divides into a right
part and a lower part. Count the number of such partitions with respect to the number of
boxes in the right part yields the desired formula. ⇤
Proposition 3.12. For any set S of positive integers, let
mk
Pn (S) = am 1 m2
1 a2 · · · ak ` n : ai 2 S for all i
the set of partitions in Pn (S) whose every part appears at most d times. Then
X Y 1
(3.3) |Pn (S)|q n = , and
1 qn
n 0 n2S
X Y1 q (d+1)n
(3.4) |Pn (S, d)|q n = .
1 qn
n 0 n2S
Euler’s function is a model example of a q-series, a modular form, and provides the
prototypical example of a relation between combinatorics and complex analysis.
Corollary 3.15. The coefficient in the formal power series expansion for 1/ (q) gives the
number of partitions of n. In other words,
X 1
p(n)q n = .
(q)
n 0
Corollary 3.17. Let pn (m) be the number of partitions of n with at most m parts. Then
X 1
pn (m)q n = .
(1 q)(1 q 2 ) · · · (1 q m )
n 0
Proof. Using the conjugation transformation, we know that the number of partitions of n
whose every part is at most m equals the number of partitions of n with at most m parts.
Taking S = [m] in Eq. (3.3), we obtain the desired identity. ⇤
where ⇢
1 1 1
✏(n) 2 , , 0, .
3 12 4
The desired formula then follows from the fact that |✏(n)| < 1/2. ⇤
Theorem 3.19. Every number has as many integer partitions into odd parts as into distinct
parts.
For instance, the integer partitions of 6 into odd parts are
3 + 3 + 3 + 1 + 1 + 1 + 1 ! (3 + 3) + 3 + (1 + 1) + (1 + 1) = 6 + 3 + (2 + 2) ! 6 + 3 + 4.
Conversely, we describe a procedure of repeated splitting of even parts: whenever one gets a
partition with an even part 2k, split them and get 2 new parts k + k. For example,
6 + 4 + 3 ! (3 + 3) + (2 + 2) + 3 = 3 + 3 + 3 + 2 + 2 ! 3 + 3 + 3 + (1 + 1) + (1 + 1).
It is easy to check that the above two procedures do not depend on the order of merging and
spliting, and that they form a bijection. ⇤
An algebraic proof to Theorem 3.19. Let an be the number of partitions of n into odd
parts, and bn the number of partitions of n into distinct parts. Then
X Y Y1 q 2n Y 1 X
bn q n = (1 + q n ) = = = an q n .
1 qn 1 qn
n 0 n 1 n 1 n odd n 0
For example, the partitions of 9 whose every part equals 1 or 4 modulo 5 are
while the partitions of 9 whose any two parts have di↵erence at least 2 are
McCoy (in a joint paper with Berkovich (1998)) speaking to the International Congress
of Mathematicians gave a survey of applications of Roger-Ramanujan identities in physics.
In addition, the fruitful interaction of partition identities with other combinatorial models is
beautifully outlined by Alladi (1995).
3.4. Permutations
Let ⇡ 2 Sn . Let ci be the number of cycles of length i in ⇡. Then the total number
c(⇡) = c1 + c2 + · · · + cn
is the number of cycles of ⇡. We call the integer partition 1c1 2c2 · · · ncn the type of ⇡. Then
c1 + 2c2 + 3c3 + · · · + ncn = n.
As the notation of a multiset, the number ci is commonly omitted if ci = 1, and the whole
part ici is omitted if ci = 0. For instance, the type of the permutation ⇡ = (125)(34) is
10 21 31 40 50 ` 5,
which can be alternatively written as 32 to denote that ⇡ consists of a cycle of length 3 and
a cycle of length 2. Since all information contained in the notation 1c1 2c2 · · · ncn is contained
in the simpler notation
(c1 , c2 , . . . , cn ),
one may find in some literature that the sequence (c1 , c2 , . . . , cn ) is used to denote the type
of ⇡, or used together with the notation 1c1 2c2 · · · ncn . For clarification, we adopt the notation
1c1 2c2 · · · ncn only.
All permutations of [n] form a symmetric group, denoted Sn , where the group operation
is function composition. In general, the composition of two permutations of the same length
is not commutative, that is,
⇡ 6= ⇡.
A permutation 2 Sn is a conjugate of ⇡ if there is ⌧ 2 Sn such that
1
=⌧ ⇡⌧.
Two permutations in Sn are conjugate if and only if they are of the same type, see Sagan
[104, Page 3].
Proposition 3.22. The number of ⇡ 2 Sn of type c = 1c1 2c2 · · · ncn is n!/zc , where
zc = 1c1 c1 ! 2c2 c2 ! · · · ncn cn !.
Proof. Choose a permutation ⇡ 2 Sn 1 and we use its cycle notation. In order to obtain a
permutation in Sn with k cycles, we can either add a cycle (n) to ⇡ if ⇡ has k 1 cycles,
or place the letter n after any of the letters in some cycle of ⇡ if ⇡ has k cycles. These two
cases give the summands c(n 1, k 1) and (n 1)c(n 1, k) respectively. This proves the
desired recurrence. Let
Xn
Fn (x) = x(x + 1)(x + 2) · · · (x + n 1) = b(n, k)xk .
k=0
Then
n
X n
X1
Fn (x) = (x + n 1)Fn 1 (x) = b(n 1, k 1)xk + (n 1) b(n 1, k)xk .
k=1 k=0
Extracting the coefficients of Fn (x), we find
b(n, k) = (n 1)b(n 1, k) + b(n 1, k 1).
It is clear that b(0, 0) = 1 and b(n, k) = 0 if n < 0 or k < 0. Hence b(n, k) satisfies the same
recurrence and initial conditions as c(n, k) and they agree. ⇤
The number dn of derangements on [n] can be found by using the principle of inclusion-
exclusion:
Xn ✓ ◆ ✓ ◆
n n i 1 1 1 ( 1)n
dn = ( 1) i! = n! 1 + + ··· + ,
i 1! 2! 3! n!
i=0
which is the integer nearest to n!/e. As another example of using the principle of inclusion-
exclusion, let h(n) be the number of permutations of the multiset Mn = {12 , 22 , . . . , n2 } with
no consecutive terms equal. Then h(1) = 0, h(2) = 2, and
Xn ✓ ◆
n (n + i)!
h(n) = ( 1)n i .
i 2i
i=0
Permutation statistics is an active and popular research field. We introduce some basic
statistics on permutations.
Definition 3.25 (Permutation statistics). Let ⇡ = ⇡1 ⇡2 · · · ⇡n 2 Sn .
Proof. Define a bijection : Sn ! Sn such that des(⇡) = exc( (⇡)). For example,
(931682745) = (139)(286)(47)(5).
Precisely speaking, form a cycle (⇡j ⇡j 1 · · · ⇡1 ), where j = ⇡ 1 (1). Continue this process
iteratively with the next smallest integer in what remains in ⇡, building up (⇡) cycle by
cycle. It is easy to show that is bijective. ⇤
Theorem 3.30. For n, r 1,
r ✓ ◆
1 X n k
S(n, r) = A(n, k) .
r! r k
k=0
Proof. We shall present a bijection between ordered partitions of [n] into r blocks and
permutations of [n] with at most r 1 descents. Since the former is counted by the left hand
side, and the latter the right hand side, we obtain a bijective proof.
In fact, the number of ordered partitions of [n] into r blocks is r!S(n, r). Given such an
ordered partition, we write the elements in every block in the increasing order, concatenate
the blocks, and remove the parentheses for distinguishing blocks. In this way, we obtain a
permutation of [n] with at most r 1 descents.
Conversely, let 0 k r. Let ⇡ be a permutation of [n] with k 1 descents. Then the
descents partition ⇡ into k ascending runs. We are going to construct a partition of [n] into
r blocks based on the k ascending runs. For this, we need to partition some of the ascending
runs into small pieces so that the total number of pieces is r. Thus we need to “cut” r k
times on the ascending runs. Note that for any ascending run of t letters, there are t 1
candidate places to cut. Thus there are in total n k candidate places for ⇡ to do the cutting.
Therefore, we have nr kk choices to cut the runs and obtain exactly r ascending runs in a
sequence. ⇤
Definition 3.31. Let n 2 Z+ be a positive integer. The q-analogue of n is the polynomial
1 qn
[n]q = 1 + q + q 2 + · · · + q n 1 = ,
1 q
where q is an indeterminate. The q-analogue of n! is
[n]q ! = [n]q [n 1]q · · · [1]q .
The q-analogue of the binomial coefficient nk is
✓ ◆
n [n]q !
= .
k q [k]q ! [n k]q !
Proof. By considering the e↵ect of inserting the letter n into a permutation on [n 1], we
obtain X X
q inv(⇡) = [n]q q inv(⇡) .
⇡2Sn ⇡2Sn 1
Corollary 3.34 (MacMahon [83]). The major index is a Mahonian statistic, i.e., for any
n 1, X X
q inv(⇡) = q maj(⇡) .
⇡2Sn ⇡2Sn
See Elizalde and Noy [32], Kitaev [65], Mendes and Remmel [87].
Lin and Kim [71] gave a joint distribution identity on 12 statistics.
Definition 3.36. Let L = (a0 , a1 , . . . , an ) be a sequence of positive numbers. We say that L
is unimodal if there exists an index 1 k n such that
a0 a1 · · · ak ak+1 ··· an .
We say that L is log-concave if
ak 1 ak+1 a2k
P
for all k. We say that L is real-rooted if every zero of the polynomial nj=0 aj xj is real.
n
For example, the sequence k for k = 0, 1, . . . , n is unimodal, log-concave, and real-
rooted.
Theorem 3.37. Let L = (a0 , a1 , . . . , an ) be a sequence of positive numbers. Then we have
the following implications.
In particular monotonic sequences of positive numbers are unimodal. One may find
examples to show that the converses of Theorem 3.37 are false.
Theorem 3.38. The sequence {A(n, k)}k of Eulerian numbers is real-rooted, i.e., all zeros
of the Eulerian polynomial are real.
For instance, the reduced form of the permutation 3174 is 2143, and the permutation
25431 is 213-avoiding.
Theorem 3.40 (Marcus and Tardos [84]). For any pattern ⌧ , the limit
p
lim n sn (⌧ )
n!1
The readers are referred to Berstel and Perrin [10] for the history of combinatorics on words.
From Wiki, one may find the following introduction.
“Combinatorics on words is a fairly new field of mathematics, branching from combina-
torics, which focuses on the study of words and formal languages. The subject looks at letters
or symbols, and the sequences they form. Combinatorics on words a↵ects various areas of
mathematical study, including algebra and computer science. There have been a wide range
of contributions to the field. Some of the first work was on square-free words by Axel Thue
in the early 1900s. He and colleagues observed patterns within words and tried to explain
them. As time went on, combinatorics on words became useful in the study of algorithms
and coding. It led to developments in abstract algebra and answering open questions.”
“The first books on combinatorics on words that summarize the origins of the subject
were written by a group of mathematicians, many of whom were students of Marcel-Paul
Schützenberger, that collectively went by the name of M. Lothaire. Their first book was
published in 1983, when combinatorics on words became more widespread.”
Definition 3.41. Let A be a set that we shall call an alphabet. Its elements will be called
letters. A finite word over A is a finite sequence of elements of A. The set of all finite words
over A is denoted by A⇤ . It is equipped with a binary operation obtained by concatenating
two words.
• proper if v 6= x,
• a left factor or prefix if x = vw for some word w 2 A⇤ ,
• a right factor or suffix if x = uv for some word u 2 A⇤ .
•
•
Proof. If x and y are conjugate, then there exists u, v 2 A⇤ such that x = uv and y = vu.
Hence xz = zy holds for z = u. This proves the forward direction. For the backward
direction, suppose that xz = zy for some z 2 A⇤ . It follows that for any n 1,
(3.7) xn z = xn 1
zy = xn 2
zy 2 = · · · = zy n .
On the other hand, there exists a unique integer n 1 such that
(3.8) (n 1)|x| |z| < n|x|.
Consider this n in Eq. (3.7), we find that there exists u 2 A⇤ such that
z = xn 1
u.
Substituting it into Eq. (3.7), we obtain x2n 1u = xn 1 uy n , which reduces to
n n
(3.9) x u = uy .
Substituting it into Ineq. (3.8), we obtain 0 |u| < |x|. Therefore, there exists v 2 A+
such that x = uv. Substituting it into Eq. (3.9), we obtain (uv)n u = uy n , which reduces to
y = vu. It follows that x and y are conjugate. On the other hand,
z = xn 1
u = (uv)n u = u(vu)n 2 u(vu)⇤ .
This completes the proof. ⇤
Definition 3.44. Let A be an ordered alphabet. The lexicographic order on the set A+ is
as follows: for any words u, v 2 A+ , u < v if and only if either v = ux with x 2 A+ , or
u = ras, v = rbt, with a, b 2 A, a < b, and r, s, t 2 A⇤ .
A Lyndon word is a primitive word that is minimal in its conjugate class.
Equivalently speaking, a word w 2 A+ is Lyndon if and only if w < vu for any factor-
ization w = uv. For the enumeration of Lyndon words, see Exercise 2.38). Lyndon words
are named after mathematician Roger Conant Lyndon [78]. Lyndon’s original motivation of
introducing these words was to describe free Lie algebras.
Below we introduce two characterizations of Lyndon words. Denote by L the set of
Lyndon words.
Theorem 3.45. A word w 2 A+ is Lyndon if and only if it is strictly smaller than any of
its proper suffixes.
• w 2 A, or
• w = uv with Lyndon words u and v such that u < v.
More precisely, if v is the longest proper Lyndon suffix of a Lyndon word w = uv, then u is
Lyndon.
Proof. For the backwards direction, suppose that w = uv with u, v 2 L such that u < v.
We claim that
uv < v.
In fact, if u is a prefix of v, then uv < v by applying Theorem 3.45 for v 2 L; otherwise, the
premise u < v implies uv < v directly. Now, for any suffix v 0 of v, we have
w = uv < v v 0
by Theorem 3.45; for any proper suffix u0 of u, we have u < u0 by applying Theorem 3.45 for
u 2 L and thus uv < u0 v. Therefore, w is smaller than any of its proper suffixes and thus
Lyndon.
For the forwards direction, suppose that w = uv 2 \A, where v is the longest proper
Lyndon suffix of w. Indeed v exists since the last letter of w is a proper Lyndon suffix. If
u 2 A, then u 2 L and u < uv < v by applying Theorem 3.45 for w 2 L, as desired.
Below we can suppose that u 62 A, i.e., |u| 2. We shall show that u 2 L. Let u0 be a
proper suffix of u. By the definition of v, we have u0 v 62 L. By Theorem 3.45, u0 v has a proper
suffix t such that u0 v > t. If u0 < t, then u0 < t < u0 v and t = u0 t0 for some t0 2 A+ such
that t0 < v. Now, the word v has a proper suffix t0 that is smaller than v. By Theorem 3.45,
v 62 L, a contradiction. Therefore, t u0 . It follows that
u < uv < t u0 .
By Theorem 3.45, we obtain u 2 L. This completes the proof. ⇤
Theorem 3.47. Any word w 2 A+ may be written uniquely as a nonincreasing product of
Lyndon words:
w = l1 · · · lk , li 2 L and l1 · · · lk .
Moreover, lk is the smallest suffix of w.
Proof. Any word w 2 A+ can be written as the product of Lyndon words since every letter
is Lyndon. Let
w = l1 · · · lk
be a factorization of w into Lyndon words with minimal number k of Lyndon words. If
li < li+1 for some i, then li li+1 2 L by Theorem 3.46, contradicting the minimality of k. This
proves that w has a factorization into nonincreasing Lyndon words. Suppose that
w = l1 · · · lk = l10 · · · lh0
be two distinct factorizations of w into nonincreasing Lyndon words. Without loss of gener-
ality, we can suppose that
l1 = l10 · · · li0 u,
0 . By Theorem 3.45, we deduce that
where u is a prefix of li+1
0
l1 < u li+1 l10 < l1 ,
a contradition! This proves the uniqueness of the factorization.
Let v be the smallest suffix of w and set w = uv. Then v 2 L by Theorem 3.45. If u = ✏,
then the result is proved. Otherwise, let s be the smallest suffix of u with w = rsv. If s < v,
then sv 2 L by Theorem 3.45. It follows that sv < v by Theorem 3.45, contradicting the
choice of v. Hence s v. Iterating this process gives the factorization of w. ⇤
It is possible to obtain the factorization from left to right. See Duval [28].
From Lothaire [73, Page 18], one may find the following point of view for the study
of combinatorics on words. “The investigation of words includes a series of combinatorial
studies with rather surprising conclusions that can be summarized roughly by the following
statement: Each sufficiently long word over a finite alphabet behaves locally in a regular
fashion... The discovery and the analysis of these unavoidable regularities constitute a major
topic in the combinatorics of words.” See also Lothaire [74, 75].
Definition 3.48. Let A be an alphabet. A square is a word of the form uu over A, where
u 2 A+ . A square-free word is a word that does not contain a square. A cube is a word of
the form uuu, where u 2 A+ . A cube-free word is a word that does not contain a cube.
The only square-free nonempty words over two letters a and b are
a, b, ab, ba, aba, bab.
We will show that there is an infinite number of finite square-free words over a 3-letter
alphabet, see Proposition 3.52 and Theorem 3.58. For this purpose, we introduce the concept
of overlapping factors, hereditary properties of words, and the infinite word of Thue-Morse.
Theorem 3.49. Let A be an alphabet. A word w 2 A⇤ contains two overlapping occurrences
of a word u 2 A+ if and only if w contains a factor of the form avava, where a is a letter
and v is a word.
Proof. Assume that an infinite word ! over an alphabet A contains a cube uuu. Suppose
that u = av where a 2 A and v 2 A⇤ . Then the factor avava is contained in uuu, and thus
in !. ⇤
Definition 3.51. An infinite word over an alphabet A is a function
! : N ! A,
denoted ! = a0 a1 · · · , where ai 2 A are letters. For any k 2 N, the prefix of length k of ! is
the word
! [k] = a0 a1 · · · ak 1 .
A factor of ! is a factor of ! [k] for some k. For any property P of words over A, we say
that ! satisfies P if so does every factor of !. A property for words is hereditary if it carries
over from a word to its factor; in other words, if a word w satisfies this property, then so does
every factor of w.
For instance, the property of being square-free is hereditary. Infinite words are useful in
dealing with hereditary properties, see Proposition 3.52.
Proposition 3.52. Let A be a finite alphabet and P a hereditary property. Then the set of
finite words over A that satisfies P is infinite if and only if there is an infinite word over A
that satisfies P .
Proof. Let L be the set of finite words over A that satisfies P . If there is an infinite word
over A satisfies P , then L contains all factors of that word and is infinite. This proves the
backwards direction.
For the forward direction, suppose that L is infinite. Since A is finite, there exists a
letter a0 2 A that starts an infinite number of words in L. Let L0 be the set of words in L
that starts with a0 . Since L0 is infinite, there exists a letter a1 2 A such that a0 a1 starts
an infinite number of words in L0 . Continuing in this way, one may obtain an infinite word
! = a0 a1 · · · whose every prefix starts an infinite number of words in L. We claim that !
satisfies P . In fact, for any factor u = ai · · · aj of !, every word in the infinite set Lj starts
with a0 · · · ai 1 u and satisfies P . Since P is hereditary, u satisfies P . ⇤
Note that Proposition 3.52 gives a way of producing infinite words from finite ones. We
now introduce another way of doing this.
Let w0 , w1 , · · · 2 A⇤ such that wn 1 is a prefix of wn for all n. This allows us to define
an infinite word ! over A by
! [|wn |] = wn for all n.
The word ! is called the limit of the sequence {wn }n 0 , denoted ! = limn!1 wn or simply
! = lim wn .
Then ↵n (a0 ) is a prefix of ↵n+1 (a0 ) for all n, and the limit lim ↵n (a0 ) exists.
We say that the limit lim ↵n (a0 ) is obtained by iterating ↵ on a0 . Note that any map
f : A⇤ ! A⇤ can be extended to a map on all words over A by defining
f (b0 b1 · · · ) = f (b0 )f (b1 ) · · · , where bi 2 A.
Since ↵(a) 6= ✏ for any a 2 A, the image f (b0 )f (b1 ) · · · is an infinite word.
With Proposition 3.53 in hand, one may define the infinite word of Thue-Morse as follows.
For instance, the first few words in the sequence {µn (a)}n 1 are as follows:
µ(a) = ab,
µ2 (a) = abba,
µ3 (a) = abbabaab,
µ4 (a) = abbabaabbaababba.
If |v| is even, then cvc, v 2 X ⇤ , contradicting the first claim. Thus |v| is odd.
If |x| is even, then cv 2 X ⇤ . Thus w = rsst where r, s, t 2 A⇤ are determined by
µ(r) = x, µ(s) = cv and µ(t) = cy.
Then both s and t start with the letter c. Suppose that s = cs0 . Then w contains the factor
ssc = czczc. By Theorem 3.49, w has an overlapping factor.
If |x| is odd, then vc 2 X ⇤ . Thus w = rsst such that
µ(r) = xc, µ(s) = vc and µ(t) = y.
Then both r and s end with the letter c̄, and w contains the overlapping factor c̄ss. This
confirms the second claim.
Now, if the infinite word ! of Thue-Morse has an overlapping factor avava, then avava is
contained in a prefix µk (a) for some k. On the other hand, since a has no overlapping factor,
by iterated application of the second claim, the prefix µn (a) for any n has no overlapping
factor, a contradiction. This completes the proof. ⇤
Theorem 3.58. There exists a square-free infinite word over the alphabet B = {a, b, c}.
Proof. Let A = {a, b} and B = {a, b, c}. Consider the morphism : B ⇤ ! A⇤ defined by
(a) = abb, (b) = ab and (c) = a.
Let ! be an infinite word over A = {a, b} starting with a, and without overlapping factor.
By Theorem 3.57, such a word ! exists. By algorithmic arguments, we see that ! can be
factored uniquely as
! = y0 y1 · · · ,
where yi 2 {abb, ab, a}. In other words, there exists a unique infinite word ⌫ 2 B ⇤ such that
(⌫) = !. If ⌫ contains a square uu, then
! = (⌫) = · · · (u) (u)a · · ·
contains an overlapping factor avava, where v is the suffix of (u) such that (u) = av, a
contradiction. Hence ⌫ is square-free infinite word over B. ⇤
Definition 3.59. A Young tableau consists of a Young board with each board cell filled with
an integer. A Young tableau is said to be standard if the union of the integers is [n], such
that the integers increasing in every row and in every column, where n is the number of cells.
The number of standard tableaux of shape ` n is denoted by f .
Rich structures of Young tableaux would be clearer when one studies the symmetric
functions and Schur bases, wich is closely related to the representation theory, see Fulton
[45], Mendes and Remmel [88], Sagan [104].
Theorem 3.60 is the famous “hook-length formula” due to Frame, Robinson, and Thrall,
see also Franzblau and Zeilberger [44] for a combinatorial proof.
Theorem 3.60 (Frame et al. [43]). The number of standard tableaux of shape ` n is
n!
f =Q ,
(i,j) h(i,j)
Below we describe the procedure of forming the tableau Q. At the step of putting the
element ⇡k into P , we add a new cell to Qk 1 that is contained in Pk but not in Pk 1 , and
place the number k into that cell. So the shape of Qk coincide with the shape of Pk for each k.
We call P = Pn the P -tableau or insertion tableau, of ⇡, and write P = P (⇡). Similarly,
Q = Qn is called the Q-tableau or recording tableau, and denoted Q = Q(⇡). The above
procedure defines a map ⇡ 7! (P, Q).
For instance, the procedure of row-inserting the element 3 into the partial tableau is as
1 2 5 8
P = 4 7
6
9
follows:
1 2 5 8 3 1 2 3 8 1 2 3 8 1 2 3 8
4 7 4 7 5 4 5 4 5 .
6 6 6 7 6 7
9 9 9 9
Theorem 3.62 (Robinson [98], Schensted [105]). The map ⇡ 7! (P, Q) defined above is a
bijection between Sn and the set of pairs of standard tableaux (P, Q) of partitions of n, where
P and Q have the same shape.
SR1: Set x = Pij and erase Pij . Set R to be the (i 1)th row of Pk .
SR3: Now x has been removed from the first row. Set ⇡k = x.
It is easy to see that Pk 1 is Pk after the deletion process is complete, and that Qk 1 is Qk
with the number k erased. Continuing in this way, we eventually recover all elements of ⇡ in
reverse order. ⇤
Corollary 3.63. For n 1,
X
n! = (f )2 .
`n
Proof. By Theorem 3.62, the number n! of permutations on [n] equals the number of pairs
of standard tableaux of n, which is counted by the right hand side of the desired formula. ⇤
Theorem 3.64 (Schützenberger [106]). For any permutation ⇡, the insertion tableau of ⇡ 1
Proof. Note that involutions are exactly permutations ⇡ such that ⇡ 1 = ⇡. By Theo-
rem 3.64, the pair (P, Q) of tableaux corresponding to an involution satisfies P = Q. The
number of such pairs is exactly the number of standard tableaux of n. Hence the desired
result follows from Theorem 3.62. ⇤
Theorem 3.66 (Greene [53]). Given ⇡ 2 Sn . Let shP (⇡) = ( 1 , . . . , l ) with conjugate
( 01 , . . . , 0m ). Then for any k, the sum 1 + · · · + k is the largest total length of k disjoint
increasing subsequences of ⇡, and the sum 01 + · · · + 0k is the largest total length of k disjoint
decreasing subsequences of ⇡.
More interesting structure includes the Knuth relations, Viennot’s geometric construction,
Schützenberger’s jeu de taquin, . . . .
Stanley [113] talked about the length of a longest inceasing subsequence in a permutation
on ICM 2006. Let isn (⇡) be the length of a longest increasing subsequence of ⇡. The expected
value isn (⇡) of isn (⇡), where ⇡ ranges uniformly over Sn , is
1 X
En = isn (⇡).
n!
⇡2Sn
It is shown that p
n p
En e n.
2
Hammersley [59] showed in 1972, using subadditive ergodic theory, that the limit
En
lim p
n!1 n
exists. This limit was then showed to be 2. One of the proofs is based on the identity
1 X 2
En = 1· f ,
n!
`n
which is an immediate consequence of the Robinson-Schensted correspondence.
2.3) A nonempty set has the same number of odd subsets (i.e., subsets with an odd number
of elements) as even subsets.
2.5) We have 20 kinds of presents and we want to distribute them to 12 children. We have a
large supply of each kind. If no children get two copies of the same present, in how many
ways can we give presents?
2.6) n boys and n girls go out to dance. Assume that only couples of mixed gender dance
with each other. In how many ways can they all dance simultaneously?
2.8) What is the number of 20-digit integers in which no two consecutive digits are the same?
2.9) Alice has 10 distinct balls. First she splits them into 2 piles. Then she picks one of the
piles with at least 2 balls, and split it into 2. She repeats this until each pile has only 1
ball.
(a) How many steps does this take?
Q
(b) The number of di↵erent ways in which she can carry out this procedure is 10 n
n=3 2 .
2.10) What is the number of ways to color n objects with 3 colors if every color must be used
at least once?
✓ ◆✓ ◆ ✓ ◆
a b a
=2 .
b c c
2.12) 20 persons are sitting around a table. How many ways can we choose 3 persons, no 2 of
whom are neighbors?
2.13) In a mathematical contest, three problems, A, B, C were posed. Among the participants
ther were 25 students who solved at least one problem each. Of all the contestants who
did not solve problem A, the number who solved B was twice the number who solved C.
The number of students who solved only problem A was one more than the number of
students who solved A and at least one other problem. Of all students who solved just
one problem, half did not solve problem A. How many students solved only problem B?
2.14) Find the ordinary generating functions of each of the following sequences, in simple,
closed form. In each case the sequence is defined for all n 0.
(a) an = ↵n2 + n + .
(b) an = a · bn + c · dn 1.
2.16) A partition is said to be long rectangular if its Ferrers graph is rectangular with length
at least as great as height. Show that the number of partitions of n whose consecutive
parts di↵er by 2 is equal to the number of long rectangular partitions of n.
2.17) The partition function p(n) is odd if and only if the number of partitions of n into distinct
odd parts is odd.
2.18) What is the number of standard tableaux of shape two rows of equal length m?
2.19) The parts in a partition is super-distinct if every di↵erence is at least 2. The number of
partitions of n into super-distinct parts equals the number of partitions of n into distinct
parts such that every part is not 2.
2.20) The order of a permutation ⇡ is the smallest positive integer m such that ⇡ m is the
identity. Show that
(a) a permutation is of odd order if and only if each of its cycles is of odd length, and
(b) find the number of odd order permutations of [n].
2.21) For any set S of positive integers, let Pn (m, S) be the set of partitions of n into m parts
such that each part is in S, and Pn (m, S, d) the set of partitions in Pn (m, S) such that
each part appear at most d times. Then
XX Y 1
|Pn (m, S)|z m q n = ,
1 zq n
n 0m 0 n2S
XX Y1 z d+1 q (d+1)n
|Pn (m, S, d)|z m q n = .
1 zq n
n 0m 0 n2S
2.22) For any set S of positive integers, let p0n (m, S) be the number of partitions of n into m
distinct parts in S. Then
XX Y
p0n (m, S)z m q n = (1 + zq n ).
n 0m 0 n2S
2n + 3 + ( 1)n
pn (2) = .
4
2.24) The number of permutations of [n] with k 1 excedances is the Eulerian number A(n, k).
2.25) Suppose that A(0, 0) = 1 and A(n, 0) = 0 for n > 0. Then for all nonnegative integers n
and real numbers x,
Xn ✓ ◆
n x+n k
x = A(n, k) ,
n
k=1
Xn ✓ ◆
n x+k 1
x = A(n, k) .
n
k=0
2.26) Prove that the nth Eulerian polynomial has the alternative description
X
An (x) = (1 x)n+1 in xi .
i 0
2.28) How may ways of changing n fens into jiaos, yuans, and 100-yuans?
2.29) What statistics on integer partitions or compositions can you define? What statistics
on permutations can you define? From what perspective do you think they might be
interesting?
2.31) Show that the number dn of derangements on the set [n] satisfies
dn = ndn 1 + ( 1)n ,
dn = (n 1) dn 1 + dn 2 , and
X xn 1
dn = .
n! (1 x)ex
n 0
2.32) Let n, k 2 Z+ . For any partition ` n, let mk ( ) be the number of times k appears as a
part of , and let gk ( ) be the number of distinct parts of that appear at least k times.
For example, if = 323 12 , then m2 ( ) = 3 and g2 ( ) = 2. Show that
X X
mk ( ) = gk ( ).
`n `n
2.33) For each nonempty word w 2 A⇤ , there exists a unique primitive word x such that w 2 x⇤ .
2.34) Two nonempty word commute if and only if they are powers of the same word.
2.35) Let x, y 2 A⇤ . If two powers xp and y q have a common prefix of length at least |x| + |y|
gcd |x|, |y|, then x and y are powers of the same word.
2.36) In the definition of the infinite word of Thue-Morse, the word µ2n (a) are palindromes for
all n 1.
2.37) With the notations in the proof of Theorem 3.58: ⌫ is a square-free word such that neither
aba nor acbca is a factor of ⌫ if and only if (⌫) has no overlapping factor.
Combinatorial numbers
and identities
This section is devoted to combinatorial numbers which appear frequently in modern research
in combinatorics.
Figure 4.1. The On-Line Encyclopedia of Integer Sequences (OEIS), also cited simply as
Sloane’s, is an online database of integer sequences.
1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
1 5 10 10 5 1
1 6 15 20 15 6 1
1 7 21 35 35 21 7 1
The binomial expansions of small degrees were known in the 13th century mathematical
works of Yang Hui and also Chu Shih-Chieh. Yang attributes the method to a much earlier
11th century text of Jia Xian, although those writings are now lost.
Definition 4.1. For n 2 R and k 2 Z, a binomial coefficient is a number of the form
✓ ◆
n nk
= ,
k k!
where
nk = n(n 1) · · · (n k + 1)
is called the Pochhammer symbol .
where the range for k is Z by default, and the sum has essentially a finite number of nonzero
terms. We will adopt this convenience.
47
Figure 4.3. Yang Hui triangle (Pascal’s triangle) using rod numerals, as depicted in a
publication of Zhu Shijie in 1303 AD. Stolen from Wiki.
Proof. The binomial coefficient nk is the number of ways of chooing k elements from [n].
This coincides with the interpretation that in the product
according to the distributive law, one chooses either x or y from each of the n factors x + y
and obtains a term of the form xk y n k by choosing exactly k terms x. ⇤
Around 1665, Newton generalized Theorem 4.2 to allow n 2 R, restricting that |x| < |y|
to gaurantee the convergence. The same generalization also applies to complex numbers n.
For example, taking n = 1, Eq. (4.1) reduces to the geometric series formula, valid for
|x| < 1:
1
= 1 x + x2 x3 + x4 x5 + · · · .
1+x
Taking n = 1/2, Eq. (4.1) reduces to
1 1 3 5 3 35 4 63 5
p =1 x + x2 x + x x + ··· .
1+x 2 8 16 128 256
Note that the infinite series in Eq. (4.1) reduces to a finite sum if n 2 N.
Theorem 4.3 (Chu-Vandermonde identity). Let n, m 2 C and k 2 N. Then
X ✓n◆✓ m ◆ ✓n + m◆
= .
j k j k
j
Proof. For positive integers n and m, one may show combinatorially as follows. Choosing
several elements from [n] and another several elements from the set {n + 1, n + 2, . . . , n + m}
so that in total k elements are chosen, is equivalent to choosing k elements from the set [n+m].
The two sides of the desired identity count the above two number of choices, respectively.
For n, m 2 C, algebraic proof works:
X ✓m + n ◆
xr = (1 + x)m+n
r
r 0
! !
X ✓m◆ X ✓n ◆
= xi xj
i j
i 0 j 0
X ✓m◆✓ n ◆
= xr .
k r k
r,k 0
Proof. Omitted. But please consider a combinatorical proof and an algebraic proof for each
of these identities. ⇤
Proposition 4.5 (Hockey-stick identity).
✓ ◆ ✓ ◆ ✓ ◆ ✓ ◆
n n 1 r n+1
+ + ··· + = .
r r r r+1
Replacing n by n in Eq. (4.1), one obtains the generating function for the multiset
coefficients:
1 X ⇣ ✓n ◆ ⌘
= xk .
(1 x)n k
k 0
Theorem 4.8 (Multinomial theorem). Let n 2 N. Then
m
!n ✓ ◆Y
m
X X n k
xj = xj j .
k 1 , k 2 , . . . , km
j=1 k +k +···+k =n
1 2 m j=1
k1 ,...,km 2N
Proof. By Proposition 4.9, or by using the method of stars and bars, the number of positive
integer solutions (x1 , x2 , . . . , xk ) to the equation
x1 + x2 + · · · + xk = n + k
is n+k 1
k 1 . Let yi = xi 1. Then a positive integer solution (x1 , . . . , xk ) is in a bijection with
a nonnegative integer solution (y1 , . . . , yk ) to the equation
y1 + y2 + · · · + yk = n.
Therefore, by Proposition 4.9,
✓✓ ◆◆ ✓ ◆
n+1 n+k 1
= .
k 1 k 1
Replacing n by n 1 and replacing k by k + 1 in the above equation, one obtains the desired
formula. ⇤
Eugène Charles Catalan studied Catalan numbers in [17] in the attempt of figuring out
the solution of the equation
Pn+1 = Pn + Pn 1 P3 + Pn 2 P4 + · · · + P4 Pn 2 + P3 Pn 1 + Pn .
Most material of Section 4.2 come from Stanley [115]. We start from the definition as the
historically first combinatorial interpretation.
Let Pn denote a convex n-gon in the plane. A triangulation of Pn is a set of n 3 diagonals
of Pn which do not cross in their interiors. It follows easily that these diagonals partition the
interior of Pn into n 2 triangles. Define the nth Catalan number Cn to be the number of
triangulations of Pn+2 . See Fig. 4.4 for the triangulations for small n.
The first Catalan numbers (OEIS A000108) are listed in Table 4.1. Combinatorially, it
Table 4.1. The Catalan numbers Cn for n = 0, 1, . . . , 10.
n 0 1 2 3 4 5 5 7 8 9 10
Cn 1 1 2 5 14 42 132 429 1430 4862 16796
Figure 4.4. The triangulations of the triangle, square, pentagon and hexagon. Stolen
from [115, Page 2].
We now introduce more combinatorial interpretations for Catalan numbers, which are
considered most basic.
Theorem 4.12. The Catalan number Cn counts the following:
We draw a binary tree by putting the root v at the top, the left subtree T1 below and to
the left of v, and the right subtree T2 below and to the right of v, with an edge drawn from
v to the root of each nonempty Ti . Fig. 4.5 shows the five binary trees with 3 vertices.
Figure 4.5. The five binary trees with 3 vertices. Stolen from [115, Page 6].
Definition 4.14. A plane tree (also called an ordered tree) P may be defined recursively as
follows. One specially designated vertex v is called the root of P . Thus plane trees cannot be
empty. Then either P consists of the single vertex v, or else it has a sequence (P1 , . . . , Pm )
of subtrees Pi , 1 i m, each of which is a plane tree. Thus the subtrees of each vertex are
linearly ordered.
When drawing such trees, these subtrees are written in the order left-to-right. The root v
is written on the top, with an edge drawn from v to the root of each of its subtrees. Fig. 4.6
shows the five plane trees with 4 vertices.
Definition 4.15. A ballot sequence of length 2n is a sequence with n each of 1’s and 1’s
such that every partial sum is nonnegative.
Figure 4.6. The five plane trees with 4 vertices. Stolen from [115, Page 6].
(1) A Dyck path of length 2n is a lattice path in Z2 from (0, 0) to (2n, 0) with steps N E
and SE, with the additional condition that the path never passes below the x-axis.
(2) A Motzkin path of length 2n is a lattice path in Z2 from (0, 0) to (2n, 0) with steps
N E, SE, and E, with the additional condition that the path never passes below the
x-axis.
(3) A Schröder path of length 2n is a lattice path in Z2 from (0, 0) to (2n, 0) with steps
N E, SE, and E 0 = (2, 0), with the additional condition that the path never passes
below the x-axis.
Fig. 4.7(a) shows the five Dyck paths of length 6. A trivial but useful variant of Dyck
paths (sometimes also called a Dyck path) is obtained by replacing the step (1, 1) with (1, 0)
and (1, 1) with (0, 1). In this case we obtain lattice paths from (0, 0) to (n, n) with steps
(1, 0) and (0, 1), such that the path never rises above the line y = x. See Fig. 4.7(b) for the
case n = 3.
Moreover, the Catalan number Cn counts the number of standard tableaux of shape
(n, n). Stanley’s book [115] contains 214 combinatorial interpretations of Catalan numbers.
Pak contributed an extensive history on Catalan numbers as its Appendix B, from where
one may found Catalan numbers have historical connections with Euler, Goldbach, Segner,
Kotelnikow, Fuß, Liouville, Pfa↵, Kirkman, Cayley, Taylor, Schröder, Lucas and so on, as
well as the following quotes.
Figure 4.7. The five Dyck paths of length 6. Stolen from [115, Page 8].
It is not exaggerated to say that the Catalan numbers are the most promi-
nent sequence in combinatorics. —Kauers and Paule (2011)
The Catalan numbers are one of the most important sequences of combi-
natorial numbers, with a large range of occurrences in apparently di↵erent
counting problems. —Cameron (2013)
For example,
0 1 0 1
1 1 2 5 1 2 5 14
B 1 2 5 14 C B 2 5 14 42 C
det B C B
@ 2 5 14 42 A = det @
C = 1.
5 14 42 132 A
5 14 42 132 14 42 132 429
The Fibonacci numbers (OEIS A000045) are named after the Italian mathematician Fi-
bonacci, whose name was made up in 1838 by the Franco-Italian historian Guillaume Libri
and is short for filius Bonacci (“son of Bonacci”). Fibonacci was considered to be “the most
talented Western mathematician of the Middle Ages”.
Definition 4.19. The Fibonacci numbers Fn are defined by F0 = 0, F1 = 1 and
(4.3) Fn = Fn 1 + Fn 2 for n 2.
The first Fibonacci numbers are listed in Table 4.2. The generating function of the
Fibonacci numbers is X z
Fn z n = .
1 z z2
n 0
Table 4.2. The Fibonacci numbers Fn for n = 0, 1, . . . , 16.
n 0 1 2 3 4 5 5 7 8 9 10 11 12 13 14 15 16
Fn 0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987
The Bell numbers (OEIS A000110) are named after Eric Temple Bell.
Definition 4.20. The nth Bell number Bn is the number of partitioning the set [n].
From definition, we know that Bn is the sum of the Stirling numbers S(n, k) of the second
kind, namely
Xn
Bn = S(n, k)
k=0
The first few Bell numbers are listed in Table 4.3. Choosing a subset from [n 1] to form a
Table 4.3. The Bell numbers Bn for n = 0, 1, . . . , 9.
n 0 1 2 3 4 5 5 7 8 9
Bn 1 1 2 5 15 52 203 877 4140 21147
There is a huge number of combinatorial numbers that are not mentioned in our class, such
as Motzkin numbers, Schröder numbers, Padovan numbers, Narayana numbers, Genocchi
numbers, . . . .
3.1) Find 3 more kinds of combinatorial numbers and try understand their history and back-
groud.
3.3) In a city, the North-South streets are called Street 1, Street 2, ..., Street 20, and the
East-West streets are called Avenue 1, Avenue 2, ..., Avenue 10. What is the minimum
number of blocks you have to walk to get from the corner of Street 1 and Avenue 1 to
the corner of Street 20 and Avenue 10? In how many ways can you get there walking
this minimum number of blocks?
3.5) Suppose that you want to choose a (2k + 1)-element subset of the set [n]. You decide to
do this by choosing first the middle element, then the k elements to its left, then the k
elements to its right. Formulate the combinatorial identity you get from this.
3.9) What if the chessboard is replaced by the Chinese chessboard in Exercise 3.8)?
3.10) In how many ways can you distribute n pennies to k children if each child is supposed to
get at least 2?
3.11) Two candidates A and B are running in an election. There are 2n voters who vote
sequentially for one of the two candidates. At the end each candidate receives n votes.
What is the probability that A never trails B in the voting and both candidates receive
n votes?
3.12) Two candidates A and B are running in an election. There are n voters who vote sequen-
tially for one of the two candidates. What is the probability that A never trails B in the
voting?
3.18) How many subsets does the set [n] have that contain no two consecutive integers?
3.19) Show that for even integer n, the Fibonacci numbers Fn satisfy
Fn = Fn 1 + Fn 3 + · · · + F1 .
3.21) The Bell number Bn the Bell number counts the number of partitions of the set [n + 1]
into blocks of nonconsecutive integers.
[1] M. Aigner and G. M. Ziegler. Proofs from THE BOOK. Springer-Verlag Berlin Heidel-
berg, 6th edition, 2018.
[4] G. E. Andrews and K. Eriksson. Integer Partitions. Cambridge University Press, Cam-
bridge, 2004. ISBN 0-521-84118-6; 0-521-60090-1. doi: 10.1017/CBO9781139167239.
URL https://mathscinet.ams.org/mathscinet-getitem?mr=2122332.
[5] W. Anglin. The square pyramid puzzle. The American Mathematical Monthly, 97(2):
120–124, 1990.
[6] A. Avron and N. Dershowitz. Cayley’s formula: A page from the book. The American
Mathematical Monthly, 123(7):699–700, 2016.
[8] G. Baxter. On fixed points of the composite of commuting functions. Proc. Amer.
Math. Soc., 15:851–855, 1964. ISSN 0002-9939. doi: 10.2307/2034894. URL https:
//mathscinet.ams.org/mathscinet-getitem?mr=184217.
[10] J. Berstel and D. Perrin. The origins of combinatorics on words. European J. Combin.,
28(3):996–1022, 2007. URL https://www.sciencedirect.com/science/article/
pii/S0195669805001629.
63
[11] M. Bóna. Combinatorics of Permutations. Discrete Mathematics and its Applications
(Boca Raton). CRC Press, Boca Raton, FL, 2nd edition, 2012. ISBN 978-1-4398-5051-
0. doi: 10.1201/b12210. URL https://mathscinet.ams.org/mathscinet-getitem?
mr=2919720. With a foreword by Richard Stanley.
[12] N. Bonichon, M. Bousquet-Mélou, and E. Fusy. Baxter permutations and plane bipolar
orientations. In The International Conference on Topological and Geometric Graph
Theory, volume 31 of Electron. Notes Discrete Math., pages 69–74. Elsevier Sci. B. V.,
Amsterdam, 2008. doi: 10.1016/j.endm.2008.06.011. URL https://mathscinet.ams.
org/mathscinet-getitem?mr=2571108.
[15] E. R. Canfield and C. Pomerance. On the problem of uniqueness for the maximum
Stirling number(s) of the second kind. Integers, 2:A1, 13, 2002. ISSN 1553-1732. URL
https://mathscinet.ams.org/mathscinet-getitem?mr=1876176.
[16] E. R. Canfield and C. Pomerance. Corrigendum to: “On the problem of uniqueness
for the maximum Stirling number(s) of the second kind” [Integers 2 (2002), A1, 13 pp.
(electronic); mr1876176]. Integers, 5(1):A9, 1, 2005. ISSN 1553-1732. URL https:
//mathscinet.ams.org/mathscinet-getitem?mr=2192227.
[17] E. Catalan. Note sur une équation aux di↵érences finies. Journal de mathématiques
pures et appliquées, 3:508–516, 1838.
[18] G. Chartrand and P. Zhang. Chromatic Graph Theory. Discrete Mathematics and its
Applications (Boca Raton). CRC Press, Boca Raton, FL, 2009. ISBN 978-1-58488-800-
0. URL https://mathscinet.ams.org/mathscinet-getitem?mr=2450569.
[20] F. Chung and R. Graham. Erdős on Graphs. A K Peters, Ltd., Wellesley, MA,
1998. ISBN 1-56881-079-2; 1-56881-111-X. URL https://mathscinet.ams.org/
mathscinet-getitem?mr=1601954. His legacy of unsolved problems.
[24] de la Vallée-Poussin. Recherches analytiques sur la théorie des nombres premiers, i–iii.
Ann. Soc. Sci. Bruxelles, 20:183–256, 1896.
[25] R. Diestel. Graph theory. Graduate Texts in Mathematics, 2017. ISSN 2197-5612. doi:
10.1007/978-3-662-53622-3. URL http://dx.doi.org/10.1007/978-3-662-53622-3.
[26] P. L. Dirichlet. Beweis des satzes, dass jede unbegrenzte arithmetische progression,
deren erstes glied und di↵erenz ganze zahlen ohne gemeinschaftlichen factor sind, un-
endlich viele primzahlen enthält. Abhandlungen der Königlich Preussischen Akademie
der Wissenschaften, 45:81, 1837.
[28] J.-P. Duval. Mots de Lyndon et périodicité. RAIRO - Theoretical Informatics and
Applications - Informatique Théorique et Applications, 14(2):181–191, 1980. URL http:
//www.numdam.org/item/ITA_1980__14_2_181_0/.
[30] Ő. Eǧecioǧlu and J. Remmel. The monomial symmetric functions and the frobe-
nius map. Journal of Combinatorial Theory, Series A, 54(2):272–295, 1990. ISSN
0097-3165. doi: https://doi.org/10.1016/0097-3165(90)90035-U. URL https://www.
sciencedirect.com/science/article/pii/009731659090035U.
[32] S. Elizalde and M. Noy. Consecutive patterns in permutations. volume 30, pages 110–
125. 2003. doi: 10.1016/S0196-8858(02)00527-4. URL https://mathscinet.ams.org/
mathscinet-getitem?mr=1979785. Formal power series and algebraic combinatorics
(Scottsdale, AZ, 2001).
[36] P. Erdős. On a new method in elementary number theory which leads to an elementary
proof of the prime number theorem. Proceedings of the National Academy of Sciences
of the United States of America, 35(7):374, 1949.
[37] P. Erdős. Az 1/x1 + 1/x2 + ... + 1/xn = a/b egyenlet egész számú megoldásairól (on a
diophantine equation). Matematiki Lapok.(in Hungarian), 1:192–210, 1950.
[42] S. Fomin and J.-Y. Thibon. Inverting the Frobenius map. Algebra i Analiz,
10(3):183–192, 1998. ISSN 0234-0852. URL https://mathscinet.ams.org/
mathscinet-getitem?mr=1628046.
[45] W. Fulton. Young Tableaux, volume 35 of London Mathematical Society Student Texts.
Cambridge University Press, Cambridge, 1997. ISBN 0-521-56144-2; 0-521-56724-6.
URL https://mathscinet.ams.org/mathscinet-getitem?mr=1464693. With appli-
cations to representation theory and geometry.
[47] J. Gallier. Mathematical Reasoning, Proof Principles, and Logic. Universitext. Springer,
2011.
[50] D. Goldfeld. Beyond the last theorem. Math Horizons, 4(1):26–34, 1996.
[51] F. Göring. Short proof of menger’s theorem. Discrete Mathematics, 219(1-3):295–296,
2000.
[52] B. Green and T. Tao. The primes contain arbitrarily long arithmetic progressions. Ann.
of Math. (2), 167(2):481–547, 2008. ISSN 0003-486X. doi: 10.4007/annals.2008.167.481.
URL https://mathscinet.ams.org/mathscinet-getitem?mr=2415379.
[54] J. Hadamard. Sur la distribution des zéros de la fonction ⇣(s) et ses conséquences
arithmétiques. Bull. Soc. Math. France, 24:199–220, 1896. ISSN 0037-9484. URL
https://mathscinet.ams.org/mathscinet-getitem?mr=1504264.
[56] P. Hall. The eulerian functions of a group. The Quarterly Journal of Mathematics, (1):
134–151, 1936.
[58] P. R. Halmos and H. E. Vaughan. The marriage problem. In Classic Papers in Com-
binatorics, pages 146–147. Springer, 2009.
[62] J. Huh. Milnor numbers of projective hypersurfaces and the chromatic polynomial of
graphs. Journal of the American Mathematical Society, 25(3):907–927, 2012.
[63] C. Jongsma. Introduction to Discrete Mathematics via Logic and Proof. Undergraduate
Texts in Mathematics. Springer Nature, 2019.
[67] C. Kostka. Über den zusammenhang zwischen einigen formen von symmetrischen funk-
tionen. Crelle’s Journal, 93:89–123, 1882. URL http://gdz.sub.uni-goettingen.
de/no_cache/dms/load/img/?IDDOC=259790.
[68] A. Kulikauskas and J. Remmel. Lyndon words and transition matrices between ele-
mentary, homogeneous and monomial symmetric functions. The Electronic Journal of
Combinatorics, 13(1), Feb. 2006. URL https://doi.org/10.37236%2F1044.
[69] C. Kuratowski. Sur le problème des courbes gauches en topologie. Fundamenta Math-
ematicae, 15(1):271–283, 1930. URL http://eudml.org/doc/212352.
[70] D. Kurepa. On the left factorial function !n. Math. Balkanica, 1:147–153, 1971. ISSN
0350-2007. URL https://mathscinet.ams.org/mathscinet-getitem?mr=286736.
[71] Z. Lin and D. Kim. A sextuple equidistribution arising in pattern avoidance. J. Combin.
Theory Ser. A, 155:267–286, 2018. ISSN 0097-3165. doi: 10.1016/j.jcta.2017.11.009.
URL https://mathscinet.ams.org/mathscinet-getitem?mr=3741429.
[76] L. Lovász and M. D. Plummer. Matching Theory. AMS Chelsea Publishing, Providence,
RI, 2009. ISBN 978-0-8218-4759-6. doi: 10.1090/chel/367. URL https://mathscinet.
ams.org/mathscinet-getitem?mr=2536865. Corrected reprint of the 1986 original
[MR0859549].
[78] R. C. Lyndon. On Burnside’s problem. Trans. Amer. Math. Soc., 77(2):202–215, 1954.
[80] I. Macdonald. Symmetric Functions and Hall Polynomials. Oxford Mathematical Mono-
graphs. Clarendon Press, 1979. ISBN 9780198535300. URL https://books.google.
com/books?id=XoMpAQAAMAAJ.
[82] P. A. MacMahon. The Indices of Permutations and the Derivation Therefrom of Func-
tions of a Single Variable Associated with the Permutations of any Assemblage of Ob-
jects. Amer. J. Math., 35(3):281–322, 1913. ISSN 0002-9327. doi: 10.2307/2370312.
URL https://mathscinet.ams.org/mathscinet-getitem?mr=1506186.
[83] P. A. MacMahon. Combinatory Analysis, Volumes I and II, volume 137. American
Mathematical Soc., 2001.
[84] A. Marcus and G. Tardos. Excluded permutation matrices and the Stanley-Wilf con-
jecture. J. Combin. Theory Ser. A, 107(1):153–160, 2004. ISSN 0097-3165. doi: 10.
1016/j.jcta.2004.04.002. URL https://mathscinet.ams.org/mathscinet-getitem?
mr=2063960.
[103] G.-C. Rota. On the foundations of combinatorial theory. I. Theory of Möbius functions.
Z. Wahrscheinlichkeitstheorie und Verw. Gebiete, 2:340–368 (1964), 1964. doi: 10.1007/
BF00531932. URL https://mathscinet.ams.org/mathscinet-getitem?mr=174487.
[109] D. Singmaster. Research problems: How often does an integer occur as a binomial
coefficient? Amer. Math. Monthly, 78(4):385–386, 1971. ISSN 0002-9890. doi: 10.2307/
2316907. URL https://mathscinet.ams.org/mathscinet-getitem?mr=1536288.
[113] R. P. Stanley. Recent progress in algebraic combinatorics. volume 40, pages 55–
68. 2003. doi: 10.1090/S0273-0979-02-00966-7. URL https://mathscinet.ams.org/
mathscinet-getitem?mr=1943133. Mathematical challenges of the 21st century (Los
Angeles, CA, 2000).
73
Subject Index
q-analogue, 29 derangement, 27
descent, 26
alphabet, see word diagram
antecedent, 9 arm, 20
appeal to probability, 12 box, 19
argument, 12 cell, 19
arm, see diagram Ferrers, see Ferrers diagram
ascent, 26 French notation, 20
hook, 20
leg, 20
ballot sequence, 54
shape, 19
Binet’s formula, 57
square, 19
binomial coefficient, 48
Young, see Young diagram, 19
binomial theorem, the, 49
disjunction, 9
block, see partition (of a set)
double factorial, 16
box, see diagram
drop, 26
bracketing, 55
Durfee square, 20
75
hereditary (property), 36 path
hockey-stick identity, the, 51 Dyck, 55
hook, see diagram lattice, 55
hook-length formula, the, 39 Motzkin, 55
hypothese, 12 Schröder, 55
hypothesis, 9 pattern, 30
pattern avoiding, 30
Illicit major, 13 peak, 26
Illicit minor, 13 permutation, 24
implication, 9 Pochhammer symbol, 48
insertion tableau, the, 40 predicate, 11
inverse prefix, 31
(of an implication), 11 premise, 12
inversion, 26 primitive, see word
involution, 27 proposition, 8
valley, 26
Young diagram, 19
word Young tableau, 39
alphabet, 31 standard, 39