Combinatorial Enumeration. Jason Z. Gao Carleton University, Ottawa, Canada

Similar documents
Generating Functions

An Introduction to Combinatorial Species

Unlabelled Structures: Restricted Constructions

Integration of Rational Functions by Partial Fractions

Integration of Rational Functions by Partial Fractions

*Generating Function Topics

5. Analytic Combinatorics

Finite Fields. Saravanan Vijayakumaran Department of Electrical Engineering Indian Institute of Technology Bombay

and the compositional inverse when it exists is A.

Generating Functions

q xk y n k. , provided k < n. (This does not hold for k n.) Give a combinatorial proof of this recurrence by means of a bijective transformation.

Multiplying two generating functions

Chapter Generating Functions

GENERATING FUNCTIONS AND CENTRAL LIMIT THEOREMS

Partial Fractions. (Do you see how to work it out? Substitute u = ax + b, so du = a dx.) For example, 1 dx = ln x 7 + C, x x (x 3)(x + 1) = a

are the q-versions of n, n! and . The falling factorial is (x) k = x(x 1)(x 2)... (x k + 1).

THE NUMBER OF INDEPENDENT DOMINATING SETS OF LABELED TREES. Changwoo Lee. 1. Introduction

Notes by Zvi Rosen. Thanks to Alyssa Palfreyman for supplements.

How might we evaluate this? Suppose that, by some good luck, we knew that. x 2 5. x 2 dx 5

Calculus II. Monday, March 13th. WebAssign 7 due Friday March 17 Problem Set 6 due Wednesday March 15 Midterm 2 is Monday March 20

6.3 Partial Fractions

Approaches to the Enumerative Theory of Meanders. Michael La Croix

Mapping the Discrete Logarithm: Talk 2

March Algebra 2 Question 1. March Algebra 2 Question 1

7.4: Integration of rational functions

Chapter 2 Formulas and Definitions:

Enumerative Combinatorics 7: Group actions

10/22/16. 1 Math HL - Santowski SKILLS REVIEW. Lesson 15 Graphs of Rational Functions. Lesson Objectives. (A) Rational Functions

LECTURE Questions 1

1. How many labeled trees are there on n vertices such that all odd numbered vertices are leaves?

1. Definition of a Polynomial

ADDITIONAL NOTES. 3 Surjections 6

Chapter 11. Taylor Series. Josef Leydold Mathematical Methods WS 2018/19 11 Taylor Series 1 / 27

0 Sets and Induction. Sets

k-protected VERTICES IN BINARY SEARCH TREES

Lecture 7: Sections 2.3 and 2.4 Rational and Exponential Functions. Recall that a power function has the form f(x) = x r where r is a real number.

THE DEGREE DISTRIBUTION OF RANDOM PLANAR GRAPHS

x 9 or x > 10 Name: Class: Date: 1 How many natural numbers are between 1.5 and 4.5 on the number line?

ACO Comprehensive Exam March 17 and 18, Computability, Complexity and Algorithms

5.1 - Polynomials. Ex: Let k(x) = x 2 +2x+1. Find (and completely simplify) the following: (a) k(1) (b) k( 2) (c) k(a)

Discrete mathematics , Fall Instructor: prof. János Pach

MTH310 EXAM 2 REVIEW

Hankel determinants, continued fractions, orthgonal polynomials, and hypergeometric series

De part en retraite de Pierre

Functions and Equations

3. Coding theory 3.1. Basic concepts

TEST CODE: MMA (Objective type) 2015 SYLLABUS

Math123 Lecture 1. Dr. Robert C. Busby. Lecturer: Office: Korman 266 Phone :

Section 8.3 Partial Fraction Decomposition

Notes on cycle generating functions

Legendre s Equation. PHYS Southern Illinois University. October 18, 2016

Review problems solutions

A field F is a set of numbers that includes the two numbers 0 and 1 and satisfies the properties:

Partial Fractions. June 27, In this section, we will learn to integrate another class of functions: the rational functions.

(x + 1)(x 2) = 4. x

Generating Functions (Revised Edition)

A Library of Functions

Homework 8 Solutions to Selected Problems

8.3 Partial Fraction Decomposition

Partial Fractions. Calculus 2 Lia Vas

Permutation groups/1. 1 Automorphism groups, permutation groups, abstract

Recursive constructions of irreducible polynomials over finite fields

Chapter 2 Polynomial and Rational Functions

Series Solution of Linear Ordinary Differential Equations

Chapter 4. Remember: F will always stand for a field.

Simplifying Rational Expressions and Functions

b n x n + b n 1 x n b 1 x + b 0

Partial Fraction Decomposition Honors Precalculus Mr. Velazquez Rm. 254

Limits at Infinity. Horizontal Asymptotes. Definition (Limits at Infinity) Horizontal Asymptotes

A conjecture on the alphabet size needed to produce all correlation classes of pairs of words

Cyclic Codes. Saravanan Vijayakumaran August 26, Department of Electrical Engineering Indian Institute of Technology Bombay

Algebra Review 2. 1 Fields. A field is an extension of the concept of a group.

Distribution of the Number of Encryptions in Revocation Schemes for Stateless Receivers

MATH 121: EXTRA PRACTICE FOR TEST 2. Disclaimer: Any material covered in class and/or assigned for homework is a fair game for the exam.

CALCULUS JIA-MING (FRANK) LIOU

1) The line has a slope of ) The line passes through (2, 11) and. 6) r(x) = x + 4. From memory match each equation with its graph.

Polynomials. In many problems, it is useful to write polynomials as products. For example, when solving equations: Example:

8.4 Partial Fractions

Mathematics 136 Calculus 2 Everything You Need Or Want To Know About Partial Fractions (and maybe more!) October 19 and 21, 2016

Review session Midterm 1

Team Solutions. November 19, qr = (m + 2)(m 2)

Integer-Valued Polynomials

What you learned in Math 28. Rosa C. Orellana

Algebraic and geometric methods in enumerative combinatorics

Information Theory. Lecture 7

Recommended questions: a-d 4f 5 9a a 27.

Solutions 2017 AB Exam

ECEN 604: Channel Coding for Communications

2 the maximum/minimum value is ( ).

CS 250/251 Discrete Structures I and II Section 005 Fall/Winter Professor York

Local properties of plane algebraic curves

Partial Fractions. (Do you see how to work it out? Substitute u = ax+b, so du = adx.) For example, 1 dx = ln x 7 +C, x 7

Section Properties of Rational Expressions

ACO Comprehensive Exam October 14 and 15, 2013

What is a semigroup? What is a group? What is the difference between a semigroup and a group?

EE 229B ERROR CONTROL CODING Spring 2005

ELG 5372 Error Control Coding. Lecture 12: Ideals in Rings and Algebraic Description of Cyclic Codes

Solutions to Exercises, Section 2.5

Generator Matrix. Theorem 6: If the generator polynomial g(x) of C has degree n-k then C is an [n,k]-cyclic code. If g(x) = a 0. a 1 a n k 1.

A = A U. U [n] P(A U ). n 1. 2 k(n k). k. k=1

Transcription:

Combinatorial Enumeration Jason Z. Gao Carleton University, Ottawa, Canada

Counting Combinatorial Structures We are interested in counting combinatorial (discrete) structures of a given size. For example, binary sequences of length n, trees with n vertices (or edges), permutations of n elements, number of ways to partition a set with n elements, number of ways to partition a positive integer n, polynomials of degree n over a finite field. Labelled structures are structures involving labels, e.g., permutations, set partitions, and labelled trees. Unlabelled structures are structures not involving labels, e.g., integer partitions, polynomials, and unlabelled trees.

Two Basic Counting Principles Let S and T be two finite sets. Then S denotes the cardinality (the number of elements) of S, and S T denotes the Cartesian product, that is, the set of ordered pairs (s, t) with s S, t T. The Addition Principle: Suppose S and T are two disjoint sets, then S T = S + T. The Multiplication Principle: S T = S T.

Generating Functions Let A be a set of structures, and A n be the set of structures in A of size n. We assume that A n is a finite set. Let a n be the number of elements in A of size n. The formal power series A(x) = n 0 a nx n is called the ordinary generating function (OGF) of A, and Â(x) = n 0 a nx n /n! is called the exponential generating function (EGF) of A.

Generating Functions We will see that generating functions are very powerful tools in combinatorial enumeration, which link discrete structures with continuous functions. Ordinary generating functions are usually linked with unlabelled structures and exponential generating functions are usually linked with labelled structures.

Examples of Generating Functions Let A be the set of binary sequences, including the empty sequence. Here the size of a sequence is the length of the sequence. It is easy to see that A n = 2 n. Hence A(x) = n 0 Â(x) = n 0 2 n x n = 2x, 2 n x n /n! = exp(2x).

Examples of Generating Functions Let A be the set of permutations, including the empty permutation. The size here is the number of elements of a permutation, and it is clear that A n = n!. Thus we have A(x) = n 0 n!x n, Â(x) = n 0 n!x n /n! = x.

The Product Formula for OGF of Unlabelled Structures Let A(x) be the OGF for A and B(x) be the OGF for B. Suppose A B =, then it is easy to see that A(x) + B(x) is the OGF for A B. Suppose that the size of (a, b) A B is the sum of the sizes of a and b. Then the number of structures in A B of size n n is equal to a j b n j. Thus the OGF for A B is given by j=0 ( n ) a j b n j x n = A(x)B(x). n 0 j=0

Counting Unlabelled Structures with OGF Example Let A be the set of all binary sequences. We note that each nonempty binary sequence is uniquely decomposed into an ordered pair (a, b), where a is the first bit of the sequence and b consists of the remaining bits of the sequence. We can write A = A 0 (A A). Hence we have A(x) = + (2x)A(x), where is the OGF for A 0 and 2x is the OGF for A. Thus we have A(x) = 2x = 2 n x n. n 0

Counting Unlabelled Structures with OGF Example Let A be the set of binary sequences with no adjacent 0 s. We have A = A 0 ({} A) {0} ({0} A). Thus A(x) = + xa(x) + x + x 2 A(x), or + x A(x) = x x 2 = ( n 0 5 + ) n+2 ( 5 2 ) n+2 5 x n. 2

Counting Unlabelled Structures with OGF Let A n be the set of rooted plane trees with n edges.

Counting Unlabelled Structures with OGF First Approach: We note A = k 0 (A A) k. That is, an element in A is decomposed into a sequence of elements in A A. Hence A(x) = k 0(xA(x)) k = xa(x). So we have A(x) = 4x 2x = n 0 ( ) 2n x n. n + n

Counting Unlabelled Structures with OGF Second Approach: Decompose a rooted plane tree with at least one edge into three components: the left-most subtree, the left-most edge incident with the root vertex, and the rest. This gives A(x) = + xa(x)a(x).

The Product Formula for EGF of Labelled Structures Now we consider labelled structures such that each structure of size n is also associated with n standard labels, 2,..., n. Let Â(x) be the EGF for A and ˆB(x) be the EGF for B. Suppose A B =, then Â(x) + ˆB(x) is the EGF for A B. Now we consider labelled structures formed by ordered pairs (a, b) of structures in A and B. There is an extra factor to be considered here. That is the distribution of labels among a and b. We again assume that the size of (a, b) is the sum of the sizes of a and b.

The Product Formula for EGF of Labelled Structures Now a structure (a, b) of size n is obtained by taking a structure a A k, a structure b B n k, and a distribution of labels, 2,..., n among a and b. Since there are ( n k) ways to distribute k labels to a and n k remaining labels to b, the number of structures (a, b) of size n is equal to n k=0 ( ) n a k b n k. k

The Product Formula for EGF of Labelled Structures Let A B denote the set of (a, b) with a distribution of labels. Then the EGF for structures A B is ( n ( ) n )a k b n k x n /n! k n 0 k=0 = ( n ) a k b n k x n k! (n k)! n 0 k=0 = Â(x) ˆB(x).

Counting Labelled Structures with EGF Example Derangements are permutations with no fixed elements. Let S be the set of all permutations, D be the set of derangements, and F be the set of sets (of fixed points). We note that each permutation is decomposed uniquely into a set of fixed points and a derangement, that is, S = D F. Also the EGF for F is ˆF (x) = n 0 x n /n! = e x. Thus e x ˆD(x) = Ŝ(x) = x, ˆD(x) = x e x.

Counting Labelled Structures with EGF Recall that each permutation is decomposed uniquely into an unordered collection of cycles. For each k, let  k (x) denote the EGF for permutations with exactly k cycles. Since there are (n )! cyclic permutations of size n, we have  (x) = n (n )!x n /n! = n x n /n = ln x. Noting that the order of the cycles does not matter, we obtain ( ) 2  2 (x) = (/2) (x)â (x) = (/2) ln. x

Counting Labelled Structures with EGF In general we have  k (x) = (/k!)(â (x)) k = (/k!). Now suppose ˆD k (x) denotes the EGF for derangements with exactly exact k cycles. Since a derangement has no cycle of length, we have ˆD (x) = n 2(n )!x n /n! = ln and ˆD(x) = k x x, ˆD k (x) = (/k!)( ˆD (x)) k, (/k!)( ˆD (x)) k = exp( ˆD (x)) = x e x.

The Exponential Formula for Labelled Structures We saw that permutations are decomposed into an unordered collection of cycles. Many combinatorial structures have similar decompositions. For example, a graph is decomposed into connected components, a rooted tree is decomposed into subtrees. Let C be a set of labelled structures, called the components. Let F be the set of labelled structures obtained by taking any unordered collection of structures in C, and by distributing the labels. We say that F is constructed from C by the multi-set construction.

The Exponential Formula for Labelled Structures Let Ĉ(x) be the EGF for the components (structures in C, and ˆF (x) be the EGF for the structures in F. We have ˆF (x) = k 0(/k!)(Ĉ(x)) k = exp(ĉ(x)). This is called the Exponential Formula for labelled structures.

The Exponential Formula for Labelled Structures Example Let Ĝ(x) be the EGF of labelled graphs, and Ĉ(x) be the EGF of labelled connected graphs, where the size of a graph is the number of vertices. We have Ĝ(x) = exp(ĉ(x)), Ĉ(x) = ln Ĝ(x). Since there are 2 (n 2) labelled graphs with n vertices, we have Ĝ(x) = n 0 2 (n 2) x n /n!.

The Exponential Formula for Labelled Structures Example Let Â(x) be the EGF of partitions of {, 2,..., n}, and Ĉ(x) be the EGF of sets. Then we have Ĉ(x) = n x n /n! = exp(x), Â(x) = exp(ĉ(x)) = exp(exp(x) ).

The Exponential Formula for Labelled Structures Example Let Â(x) be the EGF of rooted labelled trees, where the size of a tree is the number of vertices. We note that each rooted tree is decomposed into a vertex and an unordered collection of rooted subtrees. Thus Â(x) = x exp(â(x)). One may apply Lagrange inversion formula to obtain Â(x) = n 0 n n x n /n!. This implies that there are n n rooted labelled trees with n vertices.

The Exponential Formula for Unlabelled Structures Now we consider unlabelled structures consisting of a multi-set of components. Let F be the set of unlabelled structures which are built by taking a multi-set of components from C. Let c k be the number of structures in C of size k. For each c C, let SEQ(c) denote the set of sequences of c. Then F = c C SEQ(c), and hence F (x) = j = ( ) cj. x j x j c C j j

The Exponential Formula for Unlabelled Structures We note F (x) = ( ) ( x j ) c = exp c j j ln( x j ) j j ( ) ( = exp c j x kj /k = exp j k k (/k) ) c j x kj j ( ) = exp (/k)c(x k ). k This is called the Exponential Formula for unlabelled structures.

The Exponential Formula for Unlabelled Structures Example A partition of a positive integer n is a multi-set of positive integers whose sum is n. Here the OGF of components is C(x) = n x n = k x x. Hence the OGF of integer partitions is ( ) x k P(x) = exp. k x k

The Exponential Formula for Unlabelled Structures Example Let F q denote the finite field with q elements. Let C(x) be the OGF for monic irreducible polynomials, and F (x) be the OGF for all monic polynomials over F q. Then we have ( ) exp (/k)c(x k ) = F (x) = n 0 k and hence k (/k)c(x k ) = ln inversion, we obtain q n x n = qx,. Using Möbius qx C(x) = r µ(r) r ln qx r.

Bivariate Generating Functions We may use a bivariate generating function F (x, y) for decomposable structures so that x marks the size of the structure and y marks the number of components of the structure. Let F n,k denote the set of structures of size n with exactly k components. For labelled structures, we use F (x, y) = F n,k x n y k /n!. n 0 k 0 For unlabelled structures, we use F (x, y) = F n,k x n y k. n 0 k 0

The Exponential Formula for Bivariate Generating Functions For labelled structures, we have F (x, y) = k 0 y k (Ĉ(x)) k /k! = exp(yĉ(x)). For unlabelled structures, we have F (x, y) = ( ) ( yx j c j = exp (/k)y k C(x k ). j k )

Use Bivariate Generating Functions to Compute Moments We may turn F n into a probability space by assigning a uniform distribution so that each structure in F n has probability / F n. Let X n be the number of components of a random structure in F n. We may use the bivariate generating function to compute E(X n ) and E(X n (X n )). E(X n ) = [x n ]F y (x, ) [x n ]F (x, ), E(X n(x n )) = [x n ]F yy (x, ) [x n ]F (x, ).

Use Bivariate Generating Functions to Compute Moments Example Let X n be the number of cycles of a random permutation of n elements. We had EGF for the components Hence Ĉ(x) = ln F y (x, ) = ln, F (x, y) = exp x ( y ln ). x ( ) x exp ln = x x ln x. [x n ]F y (x, ) = n k= k = ln n + γ + o(),

Use Bivariate Generating Functions to Compute Moments Example Let X n be the number of irreducible factors of a random monic polynomial of degree n over F q. We have F (x, y) = exp(yc(x)), C(x) = r µ(r) r ln qx r, F (x, ) = qx, F y(x, ) = C(x) exp(c(x)) = qx C(x). One can show that [x n ]F y (x, ) [x n ] ( ) qx ln n = q n qx k. k=

Use Bivariate Generating Functions to Compute Moments Example Let A(x, y) be the OGF for binary sequences with no adjacent 0 s such that x marks the length of the sequence and y marks the number of s in the sequence. We have A(x, y) = + x + yxa(x, y) + yx 2 A(x, y). Hence A(x, y) = + x xy x 2 y. A(x, ) = + x x x = 3 + 5 2 2 5 r x 3 5 2 5 r 2 x.

The Binary Sequence Example Continued Example A y (x, ) = ( + x)(x + x 2 ) ( x x 2 ) 2 = 2 + 5 5 + 2 5 5 ( r x) 0 + 7 5 2 25 r x ( r 2 x) 0 7 5 2 25 r 2 x, where r = + 5, r 2 = 5. Noting r > and r 2 <, 2 2 we have [x n ]F y (x, ) [x n ]F (x, ) 5 + 5 n. 0

Structures with Distinct Components: The Set Construction Let D(x, y) be the OGF for unlabelled structures with distinct components. Then we have D(x, y) = ( ) + yx j c j j ( ) = exp (/k)( y) k ( C(x k )) k ( ) = exp (/k)( ) k y k C(x k ). k Compare this with the exponential formula on slide 29.

Structures with Distinct Components: Integer Partitions The component generating function for integer partitions is C(x) = x x. Hence the OGF for integer partitions with distinct parts is D(x, y) = ( ) ( ) + yx j = exp (/k)( ) k y k x k x k j k

Structures with Distinct Components: Polynomials Recall that the OGF for irreducible polynomials over F q is C(x) = r µ(r) r ln qx r. Hence the OGF for monic polynomials over F q with distinct irreducible factors is ( ) D(x, y) = exp (/k)( ) k y k C(x k ) k It will be shown later that the asymptotic behavior of D(x, y) is mainly determined by the first term (k = ).

Structures with Restricted Component Sizes: Integer Partitions Let P o (x) be the OGF for integer partitions with odd parts only, and P d (x) be the OGF for integer partitions with distinct parts. Then we have P o (x) = x = 2j j j x 2j = ( + x j ) = P x j d (x). j