Combinatorial Species

Combinatorial species S is any sort of labelled structure built from a finite A which does not depend on the names or properties of the elements of A.

Let’s see some examples.

2 / 49 Example: Trees

Let A = {1, 2, 3, 4}.

Members of the species Trees built from A:

3 / 49 Example: Linear Orders

Let A = {a, b, c, d, e}.

Structures of type Linear Orders put on A:

4 / 49 Example: Partitions

Let A = {1, 2, 3, 4}.

Members of Partitions constructed from A:

5 / 49 Example:

Let A = {1, 2, 3, 4}.

Structures of type Permutations built from A:

6 / 49 Combinatorial Species, again

Combinatorial species S is any sort of labelled structure built from a finite set A which does not depend on the names or properties of the elements of A.

More concretely, S is a function which sends a finite set A to S(A) the set of all structures of S built from A.

For the technocrats: a combinatorial species is a S : Fin0 → Fin0 from the groupoid of finite sets with to itself.

7 / 49 Example: Linear Orders

L is the species of Linear Orders.

8 / 49 Example: Permutations

P is the species of Permutations.

9 / 49 What’s in a name?

Members of a species S built from A “can’t interpret” the names of the elements of A. For example, if A = {1, 2, 3, 4, 5} and B = {a, b, c, d, e}, then Trees “knows” how to use i to transform structures built from A into structures built from B.

10 / 49 To Specify a Species

Let [n] = {1, 2, 3,..., n}.

We only need to know S[n] the members of S built from [n] for each n ≥ 0.

Say species S and T are equivalent and write S ≈ T if there is a “natural” way to get a correspondence between members of S and T.

Technocrats: S and T are equivalent if S and T are naturally isomorphic as .

11 / 49 Example

The species of Red and Blue Colorings of a Set.

The species of Functions to [2].

The species of Subsets.

12 / 49 Counting Members of a Species

Write |S[n]| for the number S structures on [n].

If S ≈ T, then |S[n]| = |T[n]| for all n ≥ 0.

13 / 49 Counting Members of a Species

Write |S[n]| for the number S structures on [n].

If S ≈ T, then |S[n]| = |T[n]| for all n ≥ 0.

Caution: |S[n]| = |T[n]| for each n ≥ 0 does not imply S ≈ T!

14 / 49 Non-Example

Linear Orders and Permutations have the same number of members |L[n]| = |P[n]| = n!, but they are not equivalent!

Question: How would you show two species were inequivalent? Hint: consider the symmetries of members of the two species.

15 / 49 Generating Function of a Species

To any species S we associate the generating function

X xn S(x) = |S[n]| . n! n≥0

“S(x) is an algebraic manifestation of the entire species S.” I hope to explain this idea through examples.

16 / 49 Example: Permutations

Let P be the species of Permutations. Since |P[n]| = n! we have

X xn X xn X 1 P(x) = |P[n]| = n! = xn = n! n! 1 − x n≥0 n≥0 n≥0

1 The same calculation shows L(x) = 1−x when L is the species of Linear Orders.

17 / 49 Example: Cyclic Permutations

Let C be the species of Cyclic Permutations.

Note that |C[n]| = (n − 1)!.

X xn X xn X xn  1  C(x) = |C[n]| = (n − 1)! = = log . n! n! n 1 − x n≥0 n≥0 n≥0

18 / 49 Example: Finite Sets

Let Exp be the species of Finite Sets.

Then |Exp[n]| = 1 for every n.

X xn X xn Exp(x) = |Exp[n]| = = ex. n! n! n≥0 n≥0

You could view this as a “reason” why ex shows up so often. It is also related to why some people say things like

|Finite Sets| = e.

19 / 49 Examples: m Element Sets

Let Em be the species of m Element Sets. Then ( 1 m = n |Em[n]| = 0 m 6= n.

Hence X xn xm E (x) = |E [n]| = . m m n! m! n≥0

We write X for the species E1 of singletons.

20 / 49 Operations on Species: Sum

Let S and T be species.

Sum: Structures of S + T on A are either structures of S or of T.

(S + T)(A) = S(A) t T(A).

21 / 49 Operations on Species: Product

Let S and T be species.

Product: S · T is trickier to define. A structure of (S · T)(A) is formed by partitioning A = B t C, then putting an S structure on B and a T structure on C. G (S · T)(A) = S(B) × T(C). A=BtC

22 / 49 Example: Cyclic Permutations · Linear Orders

23 / 49 Ops on Species = Ops on Generating Functions

There’s some justice in this world:

(S + T)(x) = S(x) + T(x) (S · T)(x) = S(x)T(x).

24 / 49 Example

Consider the identity

1 1 − x + x 1 = = 1 + x · . 1 − x 1 − x 1 − x Its fun to try “lifting” algebraic identities to the level of species.

? L ≈ 1 + X · L.

25 / 49 Example

Consider the identity

1 1 − x + x 1 = = 1 + x · . 1 − x 1 − x 1 − x Its fun to try “lifting” algebraic identities to the level of species.

L ≈ 1 + X · L.

“A linear order is either empty or it may be written as a first element followed by a linear order.”

26 / 49 Composition

Let S and T be species and suppose T has no structures on the (|T[0]| = 0.)

Composition: S ◦ T takes some explaining. To construct a member of (S ◦ T)(A): 1. Partition A = B1 t B2 t ... t Bk into non-empty sets. 2. Put a T structure on each Bi.  3. Put an S structure on {B1, B2,..., Bk} . G Y (S ◦ T)(A) = S[k] × T(Bi).

A=ti≤kBi i≤k

27 / 49 Example: Cyclic Perms ◦ Trees

C and T are the species of Cyclic Permutations and Trees. Let’s build a member of (C ◦ T)[10]:

28 / 49 Example: Cyclic Perms ◦ Trees

29 / 49 Exponentiation

Useful to compose with Exp the species of Finite Sets.

Members of (Exp ◦ S)(A) have a simpler description: 1. Partition A = B1 t B2 t ... t Bk into non-empty sets. 2. Put an S structure on each Bi.

30 / 49 Comp of Species = Comp of Generating Functions

(S ◦ T)(x) = S(T(x)) (Exp ◦ S)(x) = eS(x).

31 / 49 Example: Exp ◦ C

C is the species of Cyclic Permutations.

Here is a member of the species (Exp ◦ C)[10].

∴ P ≈ Exp ◦ C, Permutations = Exp(Cyclic Permutations) 1   1  = exp log 1 − x 1 − x

32 / 49 Simple graphs

A simple graph is a graph with no edges from a point to itself and at most one edge between a pair of points.

Question: Can you express Simple Graphs as the composition of two species? Hint: Try counting the number of simple graphs built from [n] and then work backwards.

33 / 49 Bernoulli Polynomials

Bernoulli polynomials Bn(q) arise in the study of the Riemann Zeta function, p-adic integration, classic summation formulas, etc.

Their coefficients are the mysterious Bernoulli numbers.

1 1 1 1 1 5 691 7 3617 43867 1, − 2 , 6 , 0, − 30 , 0, 42 , 0, − 30 , 0, 66 , 0, − 2730 , 0, 6 , 0, − 510 , 0, 798 ,...

Bn(q) is defined by the following identity:

X xn xeqx = (ex − 1) B (q) . n n! n≥0

Question: Can you lift this to a species identity?

34 / 49 Derangements

A with no fixed points is called a derangement.

Counting derangements of [n] is a classic problem.

Let’s count with species!

35 / 49 Derangements

Permutations = Exp(Cyclic Permutations)

Derangements = Exp(Cyclic Permutations of Size ≥ 2)

 1  C (x) = C(x) − x = log − x. ≥2 1 − x

log( 1 )−x 1 −x D(x) = e 1−x = e . 1 − x

36 / 49 1 How to multiply a power series by 1−x:

P n Say f(x) = n≥0 anx is a power series.

37 / 49 Derangements

1 1 X (−1)n D(x) = e−x = xn 1 − x 1 − x n! n≥0     m m n X X (−1) n X X (−1) x =   x = n!  m! m! n! n≥0 m≤n n≥0 m≤n

38 / 49 Derangements

1 1 X (−1)n D(x) = e−x = xn 1 − x 1 − x n! n≥0     m m n X X (−1) n X X (−1) x =   x = n!  m! m! n! n≥0 m≤n n≥0 m≤n

Therefore,

39 / 49 Differentiation

The derivative of S is the species:

DS(A) = S(A t {∗})

S structures on A together with a distinguished point ∗. Here are members of DT[4] where T is the species of Trees.

40 / 49 Example: Derivative of Linear Orders

Let L be the species of Linear Orders.

Example member of DL[5]:

1 < 5 < 2 < ∗ < 4 < 3

Notice there’s a natural correspondence between members of DL and members of L2 = L · L:

1 < 5 < 2 < ∗ < 4 < 3 ! (1 < 5 < 2, 4 < 3) Thus DL ≈ L2.

41 / 49 Differentiation

d DS(x) = S(x). dx

d 1 1 DL ≈ L2 =⇒ = . dx 1 − x (1 − x)2

42 / 49 Example: Derivative of Cyclic Permutations

Let C be the species of Cyclic Permutations.

“Linear orders are the derivative of cyclic permutations.”

DC ≈ L d  1  1 log = . dx 1 − x 1 − x

43 / 49 Example: Derivative of Finite Sets

Let Exp be the species of Finite Sets.

Adding an extra point to a set yields a set.

d x x ∴ DExp ≈ Exp =⇒ dx e = e .

44 / 49 Application

What are the chances of a random permutation of [2n] having all even length cycles?

C2 = Even Cyclic Permutations P2 = Permutations with all Even Cycles

P2 ≈ Exp(C2)

n X x2n 1 X x2 1  1   1  C2(x) = = = log = log √ . 2n 2 n 2 1 − x2 2 n≥1 n≥1 1 − x   1  1 P2(x) = exp log √ = √ . 1 − x2 1 − x2

45 / 49 Application

P2 = Permutations with all Even Cycles 1 P2(x) = √ . 1 − x2 Expand with binomial theorem:   1 −1/2 X −1/2 √ = 1 − x2 = (−1)nx2n 2 n 1 − x n≥0 X −1/2 x2n = (2n)! (−1)n n (2n)! n≥0

46 / 49 Application

Therefore, the probability of a random permutation of [2n] having all even length cycles is:

|P [2n]| − 1  2 = (−1)n 2 (2n)! n

− 1  − 1 − 1 − 1− 1 − 2 ··· − 1 − n + 1 (−1)n 2 = (−1)n 2 2 2 2 n n! 1  1 + 1 1 + 2 ··· 1 + n − 1 = 2 2 2 2 n! 1 · 3 · 5 ··· 2n − 1 1 · 3 · 5 ··· 2n − 1 2 · 4 · 6 ··· 2n = = · 2nn! 2nn! 2nn! 1 (2n)! 1 2n = = 22n n!n! 22n n

47 / 49 Application

|P [2n]| 1 2n 2 = (2n)! 22n n Probability that a random permutation of [2n] has all even length cycles is the same as the probability of getting exactly n heads in 2n coin tosses.

48 / 49 Thanks.

49 / 49