Contents
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 19
§3.4. Permutations 24
§3.5. Words 31
i
ii Contents
§3.6. Young tableaux, the Robinson-Schensted correspondence, and beyond 39
§3.7. Topics for an undergraduate thesis 42
Exercises 3 43
Chapter 4. Combinatorial numbers and identities 47
§4.1. Binomial coefficients 48
§4.2. Catalan numbers 52
§4.3. Fibonacci numbers 56
Exercises 4 57
Chapter 5. Partially ordered sets 61
§5.1. Basic concepts 61
§5.2. Lattices 64
§5.3. More topics on posets 68
Exercises 5 69
Chapter 6. Integers 71
§6.1. Divisibility of integers 71
§6.2. Primes 75
§6.3. Euler’s totient function and the M¨obius inversion formula 78
§6.4. Quadratic residues 82
§6.5. Diophantine equations 88
Exercises 6 93
Chapter 7. Brief introduction to graph theory 95
§7.1. Basic concepts 95
§7.2. Trees 104
Exercises 7 106
Bibliography 107
Author Index 119
Subject Index 121
Notation
(x, y) The interval {z ∈ P : x < z < y}, 62
A∗ The set of finite words over an alphabet A, 31
A+ The set of nonempty finite words over an alphabet A, 31 α(G) The independence number of a graph G, 96
Bn The poset of subsets of [n] ordered by inclusion, 61 Bn The boolean algebra of rank n, 62
Cn The cycle graph, 100
G/e The contraction of a graph G with respect to an edge e of G, 103 degG(v) The degree of the vertex v in a graph G, 96
A ⊔ B The disjoint union of two sets A and B, 103 G + H The disjoint union of two graphs G and H, 102 b | a The integer b ̸= 0 divides the integer a, 71
b ∤ a The integer b ̸= 0 doe not divide the integer a, 71
Dn The poset consists of positive integral divisors of n ordered by divisibility, 62 E(G) The set of edges of a graph G, 95
fλ The number of standard tableaux of shape λ ⊢ n, 39 gcd(a, b) The greatest common divisor of a and b, 71
G ∨ H The join of two graphs G and H, 103 Kn The complete graph of order n, 99 λ ⊢ n A partition of the integer n, 19
lcm(a, b) The least common multiple of a and b, 71 L(G) The line graph of a graph G, 103
µ(n) The M¨obius funtion, 78
µ |= n A composition of the integer n, 19
iii
[n] The set {1, 2, . . . , n}, 15 N The set of natural integers, 15 n The totally ordered set [n], 61
¬p It is not the case that p, 8
N (U ) The neighborhood of a vertex set U , 97 N (v) The neighborhood of a vertex v, 95
P + Q The disjoint union of two posets P and Q, 64 p ∧ q The proposition p and the proposition q, 9 ϕ(q) Euler’s function ϕ(q) =Q
n≥1(1 − qn), 21 ϕ(m) Euler’s totient function ϕ(m), 74
π(x) The number of primes not exceeding x, 78
p ⇔ q The proposition p if and only if the proposition q, 9 p ⇒ q The proposition p implies the proposition q, 9
Πn The poset of the partitions of [n] ordered by refinement, 62 p ∨ q The proposition p or the proposition q, 9
[qn]f (q) The coefficient of qn in the Taylor’s expansion of the series f (q) at q = 0, 17 c(n, r) The signless Stirling numbers of the first kind, 26
S(n, r) The Stirling numbers of the second kind, 17 s(n, r) The Stirling numbers of the first kind, 26 sh(λ) The shape of the Ferrers/Young diagram λ, 20 Sn The set of permutations on the set [n], 24 V (G) The set of vertices of a graph G, 95
⟨x⟩ The principal order ideal generated by x, 63 x ∨ y The least upper bound of x and y in a poset, 64 x ∧ y The greatest lower bound of x and y in a poset, 64 [x, y] The interval {z ∈ P : x ≤ z ≤ y}, 62
Z The set of integers, 15
Z+ The set of positive integers, 15
zλ The number 1c1c1! 2c2c2! · · · if λ = 1c12c2· · · , 25 Zm The complete system of residues modulo m, 74 Z∗m The complete set of residues prime to m, 74
Chapter 1
Introduction
Discrete Mathematics appeared in university curricula in the 1980s, initially as a computer science support course. The curriculum has thereafter developed in conjunction with efforts by ACM and MAA into a course that is basically intended to develop mathematical maturity for first-year students.
1.1. What is discrete mathematics?
(1) Theoretical computer science: graph theory, mathematical logic, algorithm, data structure, automato theory, formal language theory, . . .
(2) Information theory and coding theory, . . .
(3) Logic: valid reasoning and inference, directed graphs, fuzzy logic, . . .
(4) Combinatorics: enumerative combinatorics, analytic combinatorics, algebraic com- binatorics, probabilistic combinatorics, topological combinatorics, arithmetic combi- natorics, partition theory (q-series, special functions, orthogonal polynomials, . . . ), graph theory (structural, algebraic, topological, . . . ), design theory, finite geometry, matroid theory, extremal combinatorics, . . .
(5) Order theory: posets, lattices, . . . (6) Combinatorics on words
(7) Discrete and computational geometry: tiling, . . .
(8) Number theory: cryptography, modular arithmetic, transcendental numbers, p-adic analysis, Diophantine approximation
(9) Topology: combinatorial topology, topological graph theory, topological combina- torics, computational topology, finite topological space, . . .
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, difference 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
1.3. Famous theorems
(1) The four color theorem solved by Appel and Haken in 1976.
(2) The marriage theorem.
(3) The friendship theorem: Suppose in a group of people we have the situation that any pair of persons have precisely one common friend. Then there is always a person (the “politician”) who is everybody’s friend.
(4) The art gallary theorem.
(5) Buffon’s needle theorem: If a short needle of length l is dropped on paper that is ruled with equally spaced lines of distance d ≥ l, then the probability that the needle comes to lie in a position where it crosses one of the lines is exactly (2l)/(πd).
(6) Monsky’s theorem: It is impossible to dissect a square into an odd number of trian- gles of equal area.
(7) The Sylvester-Gallai theorem: In any configuration of n points in the plane, not all on a line, there is a line which contains exactly two of the points.
(8) . . .
1.4. Combinatorial objects
(1) Sets, sequences, permutations, partitions
(2) Graphs (3) Lattice paths
(4) Young tableaux, symmetric functions
(5) All other kinds of combinatorial configurations, . . . 1.5. Combinatorial ideas
(1) A = B: Design an autoproof, try double counting, . . .
(2) A nonstandard method of counting trees: Put a cat into each tree, walk your dog, and count how often he barks.
(3) Make something extreme (cf. consider a limit) (4) The pigeon-hole principle.
(5) Find recurrence (6) . . .
1.6. Prizes and journals in discrete mathematics
The Fulkerson Prize is awarded for outstanding papers in discrete mathematics. See also Kirkman Medal.
(1) Annals of Combinatorics.
(2) Combinatorial Theory.
(3) Combinatorica.
(4) Combinatorics, Probability and Computing.
(5) Designs, Codes and Cryptography.
(6) Discrete & Computing Geometry.
(7) Discrete Applied Mathematics.
(8) Discrete Mathematics.
(9) Discrete Mathematics & Theoretical Computer Science.
(10) Electronic Jounral of Combinatorics.
(11) European Jounral on Combinatorics.
(12) Geometriae Dedicata.
(13) Journal of Algebraic Combinatorics.
(14) Journal of Algorithms.
(15) Graphs and Combinatorics.
(16) Journal of Combinatorial Designs.
(17) Journal of Combinatorial Optimization.
(18) Journal of Combinatorics.
(19) Journal of Combinatorics Series A.
(20) Journal of Combinatorics Series B.
(21) Journal of Cryptology.
(22) Journal of Discrete Algorithms.
(23) Journal of Graph Theory.
(24) Random Structures and Algorithms.
(25) S´eminaire Lostharingien de Combinatoire.
(26) SIAM Journal on Discrete Mathematics.
(27) The Ramanujan Journal.
(28) . . .
1.7. People in discrete mathematics (1) Paul Erd˝os
(2) Richard Stanley (3) Lauren Williams (4) Laszlo Lov´asz (5) . . .
1.8. Conjectures in discrete mathematics
Conjecture 1.1 (Erd˝os-Tur´an conjecture). Let A be a set of positive integers such that X
n∈A
1 n = ∞.
Then A contains an arithmetic progression of any given length.
Green and Tao [54] solved the case the A consists of all positive primes.
Conjecture 1.2 (Kurepa [73]). Define !n =Pn−1
j=0 j!. Then no odd prime p divide !p.
Conjecture 1.3 (Collatz conjecture, the 3n + 1 problem). Define the function f by f (n) =
(n/2, if n is even;
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˝os said about the Collatz conjecture: “Mathematics may not be ready for such problems.” He also offered 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 =120
1
=16 2
=10 3
=10 7
=16 14
=120 119
, 3003 =3003
1
=78 2
=15 5
=14 6
=14 8
=15 10
=78 76
=3003 3002
, It can be checked that
N (120) = 6 and N (3003) = 8.
It is not known whether there is a number a ̸= 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 [67], Singmaster [113].
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 ∈ E(G)} = {1, 2, . . . , m}.
Conjecture 1.7 (Erd˝os-Straus). For any integer n ≥ 2, the number 4/n is the sum of three positive unit fractions, i.e., the Diophantine equation
4 n = 1
x + 1 y + 1
z has a positive integer solution (x, y, z).
Conjecture1.7is confirmed for n up to 1017, see arxiv:1406.6307 and Erd˝os [38].
Conjecture 1.8 (Erd˝os–Gy´arf´as conjecture, 1995). Every graph with minimum degree 3 contains a simple cycle whose length is a power of 2.
Erd˝os offered a prize of $100 for proving this conjecture, or $50 for a counterexample.
Daniel and Shauger (A result on the Erd˝os–Gy´arf´as conjecture in planar graphs, 2001) showed its truth for planar claw-free graphs.
Conjecture 1.9 (Thomassen). Every 4-connected line graph is Hamiltonian.
1.9. Computer programming
(1) Mathematical softwares: C, Maple, Mathematica, Matlab, Sage, . . . . (2) Operating systems: Linus, MacOS, Unix, Windows, . . .
1.10. Internet sources (1) Wiki in English.
(2) OEIS.
(3) Links on my homepage.
(4) . . . .
1.11. Recommended books Aigner and Ziegler [1].
Chapter 2
Basic mathematical logic
When dealing with people, remember you are not dealing with creatures of logic...
Dale Carnegie
Three classical paradoxes:
(1) Is the answer to this question ‘No’ ?
(2) A barber shaves all those, and those only, who do not shave themselves.
(3) Impossible is not in my vocabulary.
7
Much material of this chapter comes from Byer, Smeltzer, and Wantz [14], Epp [35]. 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 [8] makes a rough division of contemporary mathematical logic into four areas:
(1) set theory, (2) model theory, (3) recursion theory,
(4) proof theory and constructive mathematics.
For instance, basic questions addressed by recursion theory include:
• What does it mean for a function on the natural numbers to be computable?
• How can noncomputable functions be classified into a hierarchy based on their level of noncomputability?
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.
2.1. Propositions and truth tables
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.
(1) The symbol p ∧ q reads “p and q”, and called a conjunction.
(2) The symbol p ∨ q reads “p or q”, and called a disjunction.
(3) The symbol p ⇒ q, reads
• p implies q, or
• If p, then q, or
• q if p, or
• p is sufficient for q, or
• q is necessary for p,
and called an implication, or a conditional statement . In the proposition p ⇒ q, the proposition p is called the hypothesis or antecedent , and q the conclusion or consequent .
(4) The symbol p ⇔ q, reads
• p if and only if q, or
• p is necessary and sufficient for q, or
• If p, then q, and conversely, and called a biconditional statement .
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.
Table2.1summarizes 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
For a given compound proposition C, we determine the truth value of C incrementally, using the order of operations as
(1) parentheses, (2) ¬,
(3) ∧, (4) ∨, (5) ⇒,
(6) ⇔.
For example, Table2.2is the truth table for the proposition (p ⇒ q) ⇒ r.
Table 2.2. 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 compound proposition is a tautology (resp., contradiction) if its truth value is true (resp., false) for all truth value combinations of the simple propositions. For example,
(p ∧ q) ⇒ p and (p ∧ q) ⇔ (q ∧ p) are tautologies; p ∧ ¬p is a contradiction.
Theorem 2.1. Let p, q and r be propositions. Then the following laws hold.
(1) Commutative laws:
• p ∧ q ⇐⇒ q ∧ p and
• p ∨ q ⇐⇒ q ∨ p.
(2) Associative laws:
• (p ∧ q) ∧ r ⇐⇒ p ∧ (q ∧ r) and
• (p ∨ q) ∨ r ⇐⇒ p ∨ (q ∨ r).
(3) Distributive laws:
• (p ∧ q) ∨ r ⇐⇒ (p ∨ r) ∧ (q ∨ r) and
• (p ∨ q) ∧ r ⇐⇒ (p ∧ r) ∨ (q ∧ r).
(4) the double negation law: ¬(¬p) ⇐⇒ p.
(5) De Morgan’s laws:
• The negation of a disjunction is the conjunction of the negations, namely
¬(p ∧ q) ⇐⇒ (¬p) ∨ (¬q).
• The negation of a conjunction is the disjunction of the negations, namely
¬(p ∨ q) ⇐⇒ (¬p) ∧ (¬q).
(6) Idempotent laws:
• (p ∧ p) ⇐⇒ p and
• (p ∨ p) ⇐⇒ p.
Augustus De Morgan (1806–1871) introduced a formal version of the laws to classical propositional logic. De Morgan’s formulation was influenced by algebraization of logic un- dertaken by George Boole. Nevertheless, a similar observation was made by Aristotle, and was known to Greek and Medieval logicians. Still, De Morgan is given credit for stating the laws in the terms of modern formal logic, and incorporating them into the language of logic.
An instructor who do not know de Morgan’s law may ask the students that “do you like my teaching and would you join my class next semester?” He may feel confused, or not, if a student replies “No.”
Let p ⇒ q be an implication. Then we have the following terminologies.
(1) The converse of p ⇒ q is
q ⇒ p.
(2) The inverse of p ⇒ q is
¬p ⇒ ¬q.
(3) The contrapositive of p ⇒ q is
¬q ⇒ ¬p.
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 ∀.
(2) The phrase “there exists” (alternatively, there is/are) is called existential quantifiers and denoted by the symbol ∃.
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
(1) ∀ x, ∃ y, P (x, y).
(2) ∃ x, ∀ y, P (x, y).
Consider the following dialogue which is adapted from [14].
• Duadua: I believe all boys in your class admires some girl.
• David: She must be quite busy.
The sentence implies a possibility that all boys admires the same girl. To minimize ambiguity, the universal quantifier in a statement of the form
∀ a ∃ 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) Modus ponens (implication elimination):
p ∧ (p ⇒ q) =⇒ q.
(2) Modus tollens (denying the consequent):
¬q ∧ (p ⇒ q) =⇒ ¬p.
(3) Conjunctive simplification:
p ∧ q =⇒ p.
(4) Disjunctive syllogism:
(p ∨ q) ∧ ¬p =⇒ q.
(5) Hypothetical syllogism:
(p ⇒ q) ∧ (q ⇒ r) =⇒ p ⇒ r.
(6) Universal modus ponens:
∀ x ∈ S, P (x) ⇒ Q(x) ∧ P (s) =⇒ Q(s).
(7) Universal modus tollens:
∀ x ∈ S, P (x) ⇒ Q(x) ∧ ¬Q(s) =⇒ ¬P (s).
A fallacy is the use of invalid or otherwise faulty reasoning in the construction of an argument.
(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) =⇒ ∃ 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:
(1) direct proof,
(2) proof by contradiction, (3) proof by contrapositive,
(4) constructive proof, (5) counterexample,
(6) probablistic proof for existence, (7) vacuous proof,
(8) . . . 2.3. Paradoxes
A paradox is a logically self-contradictory statement or a statement that runs contrary to one’s expectation.
(1) The liar paradox: I am lying.
(2) The barber paradox: one who shaves all those, and those only, who do not shave themselves.
(3) Is the answer to this question ‘No’ ? (4) Impossible is not in my vocabulary.
(5) My wish is to make my wish fail.
Exercises 2
2.1) Consider the following inference: Since time is money and money is no object, time is no object. How do you think?
2.2) Check Zeno’s paradox on Achilles and the tortoise, and find out a solution for the paradox.
2.3) Please tell some examples of the logic fallacies in your real life.
2.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 ̸= z then x ̸= z. What differences 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 [119].
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.
3.1. How to count
(1) The number of subsets of the set
[n] = {1, 2, . . . , n}
is 2n, since every element belongs to or does not belong to a given subset.
(2) The number of permutations on [n] is n!, since there are n choices for the element at the first position, n − 1 choices for the element at the second position, . . . , and 1 choice for the element at the last position.
(3) The number of derangements on [n]:
dn= n!
n
X
i=0
(−1)i i! .
This formula can be obtained by using the principle of inclusion-exclusion, see Sec- tion 3.4.
(4) Let f (n) be the number of n × n 01-matrices M such that every row and every column of M has three ones. For example, f (0) = f (1) = f (2) = 0, f (3) = 1. In fact,
f (n) = 1 6n
X(−1)βn!2(β + 3γ)!2α3β
α!β!γ!26γ ∼ (3n)!
36ne2, where α, β, and γ run over nonnegative integers such that
α + β + γ = n.
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
f (n) = 1
√5 τn+2− ¯τn+2, where τ = (1 +√
5)/2 and ¯τ = (1 −√ 5)/2.
Example 3.1. Find the sequence a0 = 1, a1, a2, . . . of real numbers satisfying (3.1)
n
X
k=0
akan−k = 1 for all n ∈ N.
Solution. Consider the ordinary generating function F (x) =X
n≥0
anxn. Then Eq. (3.1) is to say that
F (x)2 =X
n≥0
xn and
F (x) = 1
√1 − x =X
n≥0
−1/2 n
(−x)n. It follows that
an= (−1)n−1/2 n
= (−1)n(−1/2)(−3/2)(−5/2) · · · ((1 − 2n)/2)
n! = (2n − 1)!!
(2n)!! .
□ 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 [42] and Wilf [131].
Example 3.2. Suppose that a0= a1 = 1 and
(3.2) an= an−1+ (n − 1)an−2
for n ≥ 2. Consider the exponential generating function F (x) =X
n≥0
anxn n!. By Eq. (3.2), we deduce that
F (x) = 1 + x +X
n≥2
an
xn
n! = 1 + x +X
n≥2
an−1+ (n − 1)an−2
xn n!.
Taking differentiation of both sides yields
F′(x) = 1 + (F (x) − 1) + xF (x).
Solving it we obtain
F (x) = exp
x + x2
2
.
With the generating function in hand, we can deduce for anan explicit formula, a recurrence, an asymptotic formula and so on. First,
X
n≥0
anxn
n! = exex2/2= X
n≥0
xn n!
! X
n≥0
x2n (2n)!!
! . Extracting the coefficient of xn/n! yields
an= X
0≤i≤n i even
n i
(i − 1)!!.
Second, by differentiation, we obtain X
n≥0
an xn−1
(n − 1)! = (1 + x) exp
x +x2
2
= (1 + x)X
n≥0
anxn n!.
Equating the coefficients of xn/n! yields the recurrence Eq. (3.2). Thirdly, regarding as a function of a complex variable, exp x + x2/2 is an entire function so that standard technique from the theory of asymptotic estimates can be used to estimate that
f (n) ∼ 1
√2nn/2exp
−n 2 +√
n − 1 4
.
Conclusion.
(1) Explicit formulas.
(2) Recurrences.
(3) Generating functions: Ordinary generating functions and exponential generating functions.
(4) Asymptotic formulas.
(5) . . .
We use the notation [qn]f (q) to denote the coefficient of qn in the Taylor’s expansion of the series f (q) at q = 0.
3.2. Set partitions and multisets
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. For any two partitions π and σ of [n], we say that π is a refinement of σ if every block of π is contained in a block of σ.
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 = 5 0 1 15 25 10 1
n = 4 0 1 7 6 1
n = 3 0 1 3 1
n = 2 0 1 1
n = 1 0 1
n = 0 1
Figure 3.1. The Stirling numbers S(n, k) of the second kind for 0 ≤ n ≤ 5.
Proposition 3.4. For all n, k ≥ 1, S(n, k) = 1
k!
k
X
i=0
(−1)ik i
(k − i)n.
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
1≤k≤nS(n, k).
It is checked for n ≤ 106, see Canfield and Pomerance [16,17], Wegner [128].
A multiset is a set allowing repeated elements. We write M =n
am11, am22, . . . , amrro
to denote a multiset, where the elements ai are distinct, and mi is the multiplicity of ai. Here is an example as an application of set partitions appeared in analysis.
Theorem 3.6 (Fa`a di Bruno’s formula). Suppose that f, g : C → C are n times differentiable functions. Then
dn
dznf g(z) = X
π=B1/B2/...
f(|π|) g(z) Y
B∈π
g(|B|)(z)
,
where the sum runs over all partitions of [n].
Hint. By induction on n. □
A compacter restatement of Theorem3.6 is Theorem3.23.
3.3. Integer partitions and compositions
A bible for the theory of integer partitions is Andrews and Eriksson [4], see also Stanley [119, Chapter 1].
Definition 3.7. A partition of a positive integer n is a sequence λ of positive integers, commonly written as
λ = (λ1, λ2, . . . , λr) ⊢ n, such that
λ1 ≥ λ2 ≥ · · · ≥ λr ≥ 1 and
r
X
i=1
λi= n.
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=1
µi = n.
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 only known direct formula for p(n) is
X
k≥1
√ k π√
2 X
0<h<k (h,k)=1
exp −2πinh k + πi
k−1
X
j=1
j k
hj
k − hj k
−1 2
· d dz
sinh
π k
q2
3 z −241 q
z − 241 z=n
.
From definition, we see that a partition λ ⊢ n is essentially a set of integers whose sum is n. Thus it corresponds to a multiset 1m12m2. . . 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
λ = am11am22· · · amkk,
where n ≥ a1 > a2 > · · · > ak ≥ 1 are positive integers, and mj ≥ 1 is the multiplicity of aj for all j ∈ [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 42212⊢ 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.8. The difference 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).
Proof. By adding a 1-part to a partition of n−1, one obtains the combinatorial interpretation
of p(n) − p(n − 1). □
Definition 3.9. For any partition λ = (λ1, . . . , λr) ⊢ n, we draw a left-justified array of n dots with λi dots in the ith row. This array is called the Ferrers diagram of λ. If we replace the dots by juxtaposed squares, then we call the resulting diagram the Young diagram. The squares are also called boxes or cells. The partition that is represented by such a diagram λ is said to be the shape of the diagram, denoted shλ. For any cell c = (i, j) in a Ferrers diagram λ, the set of dots that lie to the right of c and c itself is said to be the arm of c, and the set of dots that lie below c and c itself is said to be the leg of c. The hook with respect to c is the union of c and its arm and leg. Flipping the diagram of a partition λ of n along its main diagonal gives another partition of n. We call the resulting partition the conjugate of λ. A partition is self-conjugate if it is its own conjugate. The Durfee square of a Young diagram is the largest square that fits inside the board.
See Fig. 3.2 for these graphs corresponding to the partition 42211, whose conjugate is 5322. The self-conjugate partitions of 12 are
6214, 53212, and 4222.
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 42211.
diagram in the French notation.
Proposition 3.10. The number of partitions of n with m parts equals the number of parti- tions of n with the largest part m.
Proof. Direct by considering the conjugate of a partition. □ Proposition 3.11. The number of self-conjugate partitions of n equals the number of parti- tions of n into distinct odd parts.
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.12. The number of partitions of n with Durfee side j is X
m
p(m | parts ≤ j) · p(n − j2− m | parts ≤ j).
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.13. For any set S of positive integers, let
Pn(S) =am1 1am22· · · amkk ⊢ n : ai∈ S for all i be the set of partitions of n whose parts are in S, and
Pn(S, d) =am1 1am22· · · amkk ∈ Pn(S) : mi ≤ d for all i the set of partitions in Pn(S) whose every part appears at most d times. Then
X
n≥0
|Pn(S)|qn= Y
n∈S
1
1 − qn, and (3.3)
X
n≥0
|Pn(S, d)|qn= Y
n∈S
1 − q(d+1)n 1 − qn . (3.4)
Proof. Suppose that S = {n1, n2, . . . , ns}. Then Y
n∈S
1
1 − qn = 1 + qn1+ q2n1+ · · · · 1 + qn2 + q2n2 + · · · · · · 1 + qnk+ q2nk+ · · ·.
Extracting the coefficient of qn, we find [qn]Y
n∈S
1 1 − qn =
(a1, a2, . . . , ak) ∈ Nk: a1n1+ a2n2+ · · · + aknk = n , which equals Pn(S) by definition. Similarly, since
Y
n∈S
1 − q(d+1)n
1 − qn = 1 + qn1+ · · · + qdn1
1 + qn2+ · · · + qdn2 · · · 1 + qnk+ · · · + qdnk, Eq. (3.4) is to say that
|Pn(S, d)| =
(a1, a2, . . . , ak) ∈ Nk:
k
X
i=1
aini = n and ai≤ d for all i ∈ [k]
,
which is true by the definition of Pn(S, d). □
Remark 3.14. Eq. (3.3) can be obtained from Eq. (3.4) by taking d → ∞.
Definition 3.15. The Euler’s function is ϕ(q) =Y
n≥1
(1 − qn).
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.16. The coefficient in the formal power series expansion for 1/ϕ(q) gives the number of partitions of n. In other words,
X
n≥0
p(n)qn= 1 ϕ(q).
Proof. Immediate by taking S in Proposition 3.13to be the set of positive integers. □ Corollary 3.17. For any set S of positive integers, let p′n(S) be the number of partitions of n whose parts are distinct and are in S. Then
X
n≥0
p′n(S)qn= Y
n∈S
(1 + qn).
Proof. Immediate by taking d = 1 in Proposition3.13. □
Corollary 3.18. Let pn(m) be the number of partitions of n with at most m parts. Then X
n≥0
pn(m)qn= 1
(1 − q)(1 − q2) · · · (1 − qm).
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. □ Corollary 3.19. The number pn(3) is the integer nearest to
(n + 3)2 12 .
Proof. Considering the generating function, we can deduce that X
n≥0
pn(3)qn= 1
(1 − q)(1 − q2)(1 − q3)
= 1
6(1 − q)3 + 1
4(1 − q)2 + 17
72(1 − q)+ 1
8(1 + q)+ q + 2 9(1 + q + q2)
= 1
6(1 − q)3 + 1
4(1 − q)2 + 1
4(1 − q2) + 1 3(1 − q3)
= 1 6
X
n≥0
n + 2 2
qn+1
4 X
n≥0
(n + 1)qn+ 1 4
X
n≥0
q2n+1 3
X
n≥0
q3n
=X
n≥0
(n + 3)2 12 qn−1
3qn+1
4q2n+1 3q3n
=X
n≥0
(n + 3)2
12 + ϵ(n)
qn, where
ϵ(n) ∈
−1 3, −1
12, 0, 1 4
.
The desired formula then follows from the fact that |ϵ(n)| < 1/2. □
Theorem3.20 is a classical result due to Euler.
Theorem 3.20. 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 16, 313, 32, and 51, and the integer partitions of 5 into distinct parts are
6, 51, 42, and 321.
Proof. We construct a bijection as follows.
For any partition λ ⊢ n into odd parts, we describe a procedure of repeated merging of pairs of equal parts: whenever one gets a partition with two equal parts λi, merge them and get a new part 2λi. For example,
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.20. 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
n≥0
bnqn= Y
n≥1
(1 + qn) = Y
n≥1
1 − q2n
1 − qn = Y
n odd
1
1 − qn =X
n≥0
anqn.
Extracting the coefficient of qn from both sides, one obtains an= bn. □ Theorem 3.21 (Rogers-Ramanujan identity). The number of partitions of n whose every part equals 1 or 4 modulo 5 equals the number of partitions of n whose any two parts have difference at least 2.
For example, the partitions of 9 whose every part equals 1 or 4 modulo 5 are 9, 613, 421, 415, and 19,
while the partitions of 9 whose any two parts have difference at least 2 are 9, 81, 72, 63, and 531.
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).
The type of a set partition π is the integer partition that consists of the block sizes of π.
Proposition 3.22. The number of partitions of [n] of type λ = 1c12c2· · · is n!
1!c1c1! 2!c2c2! · · ·.
Hint. Given λ. Consider adding pairs of parentheses to a permutation on [n] so that the letters in the permutation are separated into ℓλ blocks, which correponds naturally to a partition of [n]. Note that without changing the set partition, the letters inside any block can be permuted, as can the blocks of the same size. This explains the denominator. □
Using Proposition3.22, one may restate Fa`a di Bruno’s formula as follows.
Theorem 3.23 (A restatement of Theorem 3.6). Suppose that f, g : C → C are n times differentiable functions. Then
dn
dznf g(z) = X
λ=1c12c2···⊢n
n!
1!c1c1! 2!c2c2! · · ·· f(ℓλ) g(z) ·Y
j
g(j)(z)
cj
.
3.4. Permutations
There is a huge number of books and papers concentrated on permutation combinatorics.
See B´ona [12], Kitaev [69] for instance.
Definition 3.24. A permutation is a bijection from a set onto itself. The set of permutitions on the set [n] is commonly denoted Sn. The complement of π is the permutation σ1σ2· · · σn, where σi= n + 1 − πi.
There are several commonly notation for permutations in Sn: (1) One-line notation: π = π1π2· · · πn∈ Sn. Eg., π = 25431.
(2) Two-line notation:
π =
1 2 3 4 5 2 5 4 3 1
=
3 2 5 1 4 4 5 1 2 3
(3) Cycle notation: π = (125)(34).
(4) Matrix representation:
π =
0 1 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 1 0 0 1 0 0 0 0
Let π ∈ 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 1c12c2· · · 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
1021314050⊢ 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 1c12c2· · · 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 1c12c2· · · ncn. For clarification, we adopt the notation 1c12c2· · · ncn only.
For any group G, a function f : G → C is called a class function if it is constant on conjugacy classes. 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,
πσ ̸= σπ.
A permutation σ ∈ Sn is a conjugate of π if there is τ ∈ Sn such that σ = τ−1πτ.
Two permutations in Sn are conjugate if and only if they are of the same type, see Sagan [108, Page 3]. Class functions for the symmetric group are functions f : Sn → C such that f (π) = f (σ) if each of π and σ is a conjugate of the other.
Proposition 3.25. The number of π ∈ Sn of type λ = 1c12c2· · · is n!/zλ, where zλ = 1c1c1! 2c2c2! · · · .
Proof. Let Sn(λ) be the set of permutations of type λ in Sn. Define a map ϕ : Sn→ Sn(λ)
for π = π1π2· · · πn∈ Snby defining ϕ(π) to be the permutaiton
(π1)(π2) · · · (πλ1)(πλ1+1πλ1+2)(πλ1+3πλ1+4) · · · (πλ1+2λ2−1πλ1+2λ2) · · · ,
i.e., each of the first λ1 elements of π forms a cycle of length 1 in ϕ(π), the next 2λ2 elements of π form λ2 cycles of length 2, . . . .
For any σ ∈ Sn(λ), we claim that there are zλ ways to write it in disjoint cycle notation so that the cycle lengths are non-decreasing from left to right. In fact, one may order the cycles of length i in λi! ways, and choose the first element of each of these cycles in i ways.
These choices are all independent, and the claim is proved.
Hence the map ϕ is a zλ-to-1 map, i.e.,
|ϕ−1(σ)| = zλ
for each σ ∈ Sn(λ). The proof follows since |Sn| = n!. □
Definition 3.26. The numbers
s(n, k) = (−1)n−kc(n, k)
are the Stirling numbers of the first kind , where c(n, k) is the number of π ∈ Snwith exactly k cycles, called a signless Stirling number of the first kind .
Proposition 3.27. The numbers c(n, k) satisfy the recurrence c(n, k) = (n − 1)c(n − 1, k) + c(n − 1, k − 1),
for n, k ≥ 1, with the initial conditions c(n, k) = 0 if n ≤ 0 or k ≤ 0, except c(0, 0) = 1.
Moreover,
n
X
k=0
c(n, k)xk= x(x + 1)(x + 2) · · · (x + n − 1).
Proof. Choose a permutation π ∈ 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
Fn(x) = x(x + 1)(x + 2) · · · (x + n − 1) =
n
X
k=0
b(n, k)xk. Then
Fn(x) = (x + n − 1)Fn−1(x) =
n
X
k=1
b(n − 1, k − 1)xk+ (n − 1)
n−1
X
k=0
b(n − 1, k)xk. 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:
dn=
n
X
i=0
n i
(−1)n−ii! = n!
1 − 1
1!+ 1 2! − 1
3!+ · · · +(−1)n n!
,
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
h(n) =
n
X
i=0
n i
(−1)n−i(n + i)!
2i .
Permutation statistics is an active and popular research field. We introduce some basic statistics on permutations.
Definition 3.28 (Permutation statistics). Let π = π1π2· · · πn∈ Sn.
(1) A descent of π is a number i ∈ [n − 1] such that πi > πi+1.
An ascent of π is a number i ∈ [n − 1] that is not a descent, i.e., a number i ∈ [n − 1]
such that
πi < πi+1.
The major index maj(π) is the sum of descents of π, i.e., maj(π) = X
πi>πi+1
i.
(2) An inversion of π is a pair (πi, πj) such that i < j and πi> πj.
(3) A fixed point of π is a number i ∈ [n] such that πi = i. An excedance of π is a number i ∈ [n] such that πi> i, see Ehrenborg and Steingr´ımsson [32]. A drop of π is a number i ∈ [n] such that πi< i.
(4) A peak of π is a number i ∈ {2, 3, . . . , n − 1} such that πi−1< πi and πi > πi+1. A valley of π is a number i ∈ {2, 3, . . . , n − 1} such that
πi−1> πi and πi < πi+1. (5) A left-to-right maxima of π is a number πi such that
πi> πj
for all j < i. Similarly one may defines left-to-right minima, right-to-left maxima, right-to-left minima.
(6) The number of cycles of π is denoted
c(π) = c1+ c2+ · · · + cn, where ci is the number of cycles of π of length i.
(7) . . . .
Two important kinds of permutations are involutions and derangements:
• An involution is a permutation whose every cycle has length at most 2.
• A derangement is a permutation π ∈ Snwithout fixed points.
The number of descents of π is denoted by des(π). Simliar notation contains asc(π), inv(π), maj(π), . . . . For example, the permutation π = 25431 ∈ S5 has descent set {2, 3, 4}, ascent set {1}, inversion set
{(5, 4), (5, 3), (4, 3), (2, 1), (5, 1), (4, 1), (3, 1)}, excedance set {1, 2, 3}, and thus
des(π) = 3, maj(π) = 9, asc(π) = 1, inv(π) = 7, and exc(π) = 3.
The set of left-to-right maxima of π is {2, 5}, The set of left-to-right minima is {2, 1}, The set of right-to-left maxima is {1, 3, 4, 5}, and The set of right-to-left minima is {1}.
The major index is named after Major MacMahon who showed Corollary 3.37 in 1913, see MacMahon [85].
Definition 3.29. The nth Eulerian polynomial is An(t) = X
π∈Sn
t1+des(π)=
n
X
k=1
A(n, k)tk, where the coefficient
A(n, k) = |{π ∈ Sn: des(π) = k − 1}| (1 ≤ k ≤ n) is called an Eulerian number.
See Petersen [101] for Eulerian numbers.
Proposition 3.30. For 1 ≤ k ≤ n,
A(n, k + 1) = (k + 1)A(n − 1, k + 1) + (n − k)A(n − 1, k).
Proof. Choose a permutation π = π1π2· · · πn−1 ∈ Sn−1. In order to obtain a permutation in Sn with k descents, we can place the letter n
(1) to the left of π1 if π has k − 1 descents, or
(2) between πi and πi+1if πi< πi+1 and if π has k − 1 descents, or (3) to the right of πn−1 if π has k descents, or
(4) between πi and πi+1if πi> πi+1 and if π has k descents.
By definition, there are A(n − 1, k) permutations in Sn−1 with k − 1 descents, which are exactly those with n−k−1 ascents. For each of them, the first two possibilites above give n−k permutations in Snwith k descents. Similarly, for each of the A(n − 1, k − 1) permutations in Sn−1with k descents, the last two possibilities above give k + 1 permutations in Snwith k descents. Combining them together, we obtain the desired recurrence. □ Definition 3.31. Any statistic on permutations that has the same distribution with the descent numbers is called an Eulerian statistic. Any statistic on permutations that has the same distribution with the inversion numbers is called a Mahonian statistic.
Theorem 3.32. Excedance is an Eulerian statistic, i.e., for any n ≥ 1, X
π∈Sn
qdes(π) = X
π∈Sn
qexc(π).
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.33. For n, r ≥ 1,
r!S(n, r) =
r
X
k=1
A(n, k)n − k r − k
.
Proof. 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 which are used to distinguish the blocks. In this way, we obtain a permutation of [n] with at most r − 1 descents.
Conversely, let 1 ≤ k ≤ r. Let π be a permutation of [n] with k − 1 descents. Note that the descents partition π into k ascending runs. We will “cut” r − k times on the ascending runs into small pieces so that the total number of pieces is r. Since for any ascending run of t letters there are exactly t − 1 places to cut, there are in total n − k places to do the cutting.
Therefore, we have n−kr−k choices to cut the runs and obtain r pieces of ascending runs. This
completes the proof. □
Definition 3.34. Let n ∈ Z+ be a positive integer. The q-analogue of n is the polynomial [n]q= 1 + q + q2+ · · · + qn−1= 1 − qn
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 k
q
= [n]q! [k]q! [n − k]q!.
The q-analogue of n is a generalization of n, since one recovers n by taking limit as q → 1.
The indeterminate q is simply a device to track the operations performed on n.
Theorem 3.35 (Rodriguez [103]). For n ≥ 1, X
π∈Sn
qinv(π)= [n]q!.
Proof. Considering the effect of inserting the letter n into a permutation on [n − 1] yields X
π∈Sn
qinv(π)= [n]q
X
π∈Sn−1
qinv(π).
By induction, the desired formula holds. □
Theorem 3.36. The inversion number and the major index are symmetrically distributed, namely,
X
π∈Sn
xinv(π)ymaj(π) = X
π∈Sn
xmaj(π)yinv(π).
Corollary 3.37 (MacMahon [86]). The major index is a Mahonian statistic, i.e., for any n ≥ 1,
X
π∈Sn
qinv(π)= X
π∈Sn
qmaj(π).