Skip to the Main Content

Note:These pages make extensive use of the latest XHTML and CSS Standards. They ought to look great in any standards-compliant modern browser. Unfortunately, they will probably look horrible in older browsers, like Netscape 4.x and IE 4.x. Moreover, many posts use MathML, which is, currently only supported in Mozilla. My best suggestion (and you will thank me when surfing an ever-increasing number of sites on the web which have been crafted to use the new standards) is to upgrade to the latest version of your browser. If that's not possible, consider moving to the Standards-compliant and open-source Mozilla browser.

December 15, 2024

Random Permutations (Part 14)

Posted by John Baez

I want to go back over something from Part 11, but in a more systematic and self-contained way.

Namely, I want to prove a wonderful known fact about random permutations, the Cycle Length Lemma, using a bit of category theory. The idea here is that the number of kk-cycles in a random permutation of nn things is a random variable. Then comes a surprise: in the limit as nn \to \infty, this random variable approaches a Poisson distribution with mean 1/k1/k. And even better, for different choices of kk these random variables become independent in the nn \to \infty limit.

I’m stating these facts roughly now, to not get bogged down. But I’ll state them precisely, prove them, and categorify them. That is, I’ll state equations involving random variables — but I’ll prove that these equations come from equivalences of groupoids!

First I’ll state the Cycle Length Lemma, which summarizes a lot of interesting facts about random permutations. Then I’ll state and prove a categorified version of the Cycle Length Lemma, which asserts an equivalence of groupoids. Then I’ll derive the original version of the lemma from this categorified version by taking the cardinalities of these groupoids. The categorified version contains more information, so it’s not just a trick for proving the original lemma.

What do groupoids have to do with random permutations? You’ll see, but it’s an example of ‘principle of indifference’, especially in its modern guise, called the ‘principle of transformation groups’: the idea that outcomes related by a symmetry should have the same probability. This sets up a connection between groupoids and probability theory — and as we’ll see, we can “go down” from groupoids to probabilities using the theory of groupoid cardinalities.

The Cycle Length Lemma

In the theory of random permutations, we treat the symmetric group S nS_n as a probability measure space where each element has the same measure, namely 1/n!1/n!. Functions f:S nf \colon S_n \to \mathbb{R} then become random variables, and we can study their expected values:

E(f)=1n! σS nf(σ). E(f) = \frac{1}{n!} \sum_{\sigma \in S_n} f(\sigma).

An important example is the function

C k:S n C_k \colon S_n \to \mathbb{N}

that counts, for any permutation σS n\sigma \in S_n, its number of cycles of length kk, also called kk-cycles. A well-known but striking fact about random permutations is that whenever knk \le n, the expected number of kk-cycles is 1/k1/k:

E(C k)=1k E(C_k) = \frac{1}{k}

For example, a random permutation of any finite set has, on average, one fixed point!

Another striking fact is that whenever jkj \ne k and j+knj + k \le n, so that it’s possible for a permutation σS n\sigma \in S_n to have both a jj-cycle and a kk-cycle, the random variables C jC_j and C kC_k are uncorrelated in the following sense:

E(C jC k)=E(C j)E(C k). E(C_j C_k) = E(C_j) E(C_k) .

You might at first think that having lots of jj-cycles for some large jj would tend to inhibit the presence of kk-cycles for some other large value of kk, but that’s not true unless j+k>nj + k \gt n, when it suddenly becomes impossible to have both a jj-cycle and a kk-cycle!

These two facts are special cases of the Cycle Length Lemma. To state this lemma in full generality, recall that the number of ordered pp-tuples of distinct elements of an nn-element set is the falling power

n p̲=n(n1)(n2)(np+1). n^{\underline{p}} = n(n-1)(n-2) \, \cdots \, (n-p+1).

It follows that the function

C k p̲:S n C_k^{\underline{p}} \colon S_n \to \mathbb{N}

counts, for any permutation in S nS_n, its ordered pp-tuples of distinct kk-cycles. We can also replace the word ‘distinct’ here by ‘disjoint’, without changing the meaning, since distinct cycles must be disjoint.

The two striking facts mentioned above generalize as follows:

1) First, whenever pknp k \le n, so that it is possible for a permutation in S nS_n to have pp distinct kk-cycles, then

E(C k p̲)=1k p. E(C_k^{\underline{p}}) = \frac{1}{k^p}.

If you know about the moments of a Poisson distribution here’s a nice equivalent way to state this equation: when pknp k \le n, the ppth moment of the random variable C kC_k equals that of a Poisson distribution with mean 1/k1/k.

2) Second, the random variables C kC_k are better and better approximated by independent Poisson distributions. To state this precisely we need a bit of notation. Let p\vec{p} denote an nn-tuple (p 1,,p n)(p_1 , \dots, p_n) of natural numbers, and let

|p|=p 1+2p 2++np n. |\vec{p}| = p_1 + 2p_2 + \cdots + n p_n.

If |p|n|\vec{p}| \le n, it is possible for a permutation σS n\sigma \in S_n to have a collection of distinct cycles, with p 1p_1 cycles of length 1, p 2p_2 cycles of length 2, and so on up to p np_n cycles of length nn. If |p|>n|\vec{p}| \gt n, this is impossible. In the former case, where |p|n|\vec{p}| \le n, we always have

E( k=1 nC k p̲ k)= k=1 nE(C k p̲ k). E\left( \prod_{k=1}^n C_k^{\underline{p}_k} \right) = \prod_{k=1}^n E( C_k^{\underline{p}_k}) .

Taken together, 1) and 2) are equivalent to the Cycle Length Lemma, which may be stated in a unified way as follows:

Cycle Length Lemma. Suppose p 1,,p np_1 , \dots, p_n \in \mathbb{N}. Then

E( k=1 nC k p̲ k)={ k=1 n1k p k if|p|n 0 if|p|>n E\left( \prod_{k=1}^n C_k^{\underline{p}_k} \right) = \left\{ \begin{array}{ccc} \displaystyle{ \prod_{k=1}^n \frac{1}{k^{p_k}} } & & \mathrm{if} \; |\vec{p}| \le n \\ \\ 0 & & \mathrm{if} \; |\vec{p}| \gt n \end{array} \right.

This appears, for example, in Ford’s course notes on random permutations and the statistical properties of prime numbers [Lemma 1.1, F]. The most famous special case is when |p|=n|\vec{p}| = n. Apparently this goes back to Cauchy, but I don’t know where he proved it. I believe he would have phrased it in terms of counting permutations, not probabilities.

I won’t get into details of precisely the sense in which random variables C kC_k approach independent Poisson distributions. For that, see Arratia and Tavaré [AT].

The Categorified Cycle Length Lemma

To categorify the Cycle Length Lemma, the key is to treat a permutation as an extra structure that we can put on a set, and then consider the groupoid of nn-element sets equipped with this extra structure:

Definition. Let Perm(n)\mathsf{Perm}(n) be the groupoid in which

  • an object is an nn-element set equipped with a permutation σ:XX\sigma \colon X \to X

and

  • a morphism from σ:XX\sigma \colon X \to X to σ:XX\sigma' \colon X' \to X' is a bijection f:XXf \colon X \to X' that is permutation-preserving in the following sense:

fσf 1=σ. f \circ \sigma \circ f^{-1} = \sigma'.

We’ll need this strange fact below: if n<0n \lt 0 then Perm(n)\mathsf{Perm}(n) is the empty groupoid (that is, the groupoid with no objects and no morphisms).

More importantly, we’ll need a fancier groupoid where a set is equipped with a permutation together with a list of distinct cycles of specified lengths. For any nn \in \mathbb{N} and any nn-tuple of natural numbers p=(p 1,,p n)\vec{p} = (p_1 , \dots, p_n), recall that we have defined

|p|=p 1+2p 2++np n. |\vec{p}| = p_1 + 2p_2 + \cdots + n p_n.

Definition. Let A p\mathsf{A}_\vec{p} be the groupoid of nn-element sets XX equipped with a permutation σ:XX\sigma \colon X \to X that is in turn equipped with a choice of an ordered p 1p_1-tuple of distinct 11-cycles, an ordered p 2p_2-tuple of distinct 22-cycles, and so on up to an ordered p np_n-tuple of distinct nn-cycles. A morphism in this groupoid is a bijection that is permutation-preserving and also preserves the ordered tuples of distinct cycles.

Note that if |p|>n|p| \gt n, no choice of disjoint cycles with the specified property exists, so A pA_\vec{p} is the empty groupoid.

Finally, we need a bit of standard notation. For any group GG we write B(G)\mathsf{B}(G) for its delooping: that is, the groupoid that has one object \star and Aut()=G\mathrm{Aut}(\star) = G.

The Categorified Cycle Length Lemma. For any p=(p 1,,p n) n\vec{p} = (p_1 , \dots, p_n) \in \mathbb{N}^n we have

A pPerm(n|p|)× k=1 nB(/k) p k \mathsf{A}_{\vec{p}} \simeq \mathsf{Perm}(n - |\vec{p}|) \; \times \; \prod_{k = 1}^n \mathsf{B}(\mathbb{Z}/k)^{p_k}

Proof. Both sides are empty groupoids when n|p|<0n - |\vec{p}| \lt 0, so assume n|p|0n - |\vec{p}| \ge 0. A groupoid is equivalent to any full subcategory of that groupoid containing at least one object from each isomorphism class. So, fix an nn-element set XX and a subset YXY \subseteq X with n|p|n - |\vec{p}| elements. Partition XYX - Y into subsets S kS_{k\ell} where S kS_{k \ell} has cardinality kk, 1kn1 \le k \le n, and 1p k1 \le \ell \le p_k. Every object of A p\mathsf{A}_{\vec{p}} is isomorphic to the chosen set XX equipped with some permutation σ:XX\sigma \colon X \to X that has each subset S kS_{k \ell} as a kk-cycle. Thus A p\mathsf{A}_{\vec{p}} is equivalent to its full subcategory containing only objects of this form.

An object of this form consists of an arbitrary permutation σ Y:YY\sigma_Y \colon Y \to Y and a cyclic permutation σ k:S kS k\sigma_{k \ell} \colon S_{k \ell} \to S_{k \ell} for each k,k,\ell as above. Consider a second object of this form, say σ Y:YY\sigma'_Y \colon Y \to Y equipped with cyclic permutations σ k\sigma'_{k \ell}. Then a morphism from the first object to the second consists of two pieces of data. First, a bijection

f:YY f \colon Y \to Y

such that

σ Y=fσ Yf 1. \sigma'_Y = f \circ \sigma_Y \circ f^{-1}.

Second, for each k,k,\ell as above, bijections

f k:S kS k f_{k \ell} \colon S_{k \ell} \to S_{k \ell}

such that

σ k=f kσ kf k 1. \sigma'_{k \ell} = f_{k \ell} \circ \sigma_{k \ell} \circ f_{k \ell}^{-1}.

Since YY has n|p|n - |\vec{p}| elements, while σ k\sigma_{k \ell} and σ k\sigma'_{k \ell} are cyclic permutations of kk-element sets, it follows that A p\mathsf{A}_{\vec{p}} is equivalent to

Perm(n|p|)× k=1 nB(/k) p k. \mathsf{Perm}(n - |\vec{p}|) \; \times \; \prod_{k = 1}^n \mathsf{B}(\mathbb{Z}/k)^{p_k}. \qquad \qquad &#9646;

The case where |p|=n|\vec{p}| = n is especially pretty, since then our chosen cycles completely fill up our nn-element set and we have

A p k=1 nB(/k) p k. \mathsf{A}_{\vec{p}} \simeq \prod_{k = 1}^n \mathsf{B}(\mathbb{Z}/k)^{p_k}.

Groupoid Cardinality

The cardinality of finite sets has a natural extension to finite groupoids, and this turns out to be the key to extracting results on random permutations from category theory. Let’s briefly recall the idea of ‘groupoid cardinality’ [BD,BHW]. Any finite groupoid G\mathsf{G} is equivalent to a coproduct of finitely many one-object groupoids, which are deloopings of finite groups G 1,,G mG_1, \dots, G_m:

G i=1 mB(G i), \mathsf{G} \simeq \sum_{i = 1}^m \mathsf{B}(G_i),

and then the cardinality of G\mathsf{G} is defined to be

|G|= i=1 m1|G i|. |\mathsf{G}| = \sum_{i = 1}^m \frac{1}{|G_i|}.

This concept of groupoid cardinality has various nice properties. For example it’s additive:

|G+H|=|G|+|H| |\mathsf{G} + \mathsf{H}| = |\mathsf{G}| + |\mathsf{H}|

and multiplicative:

|G×H|=|G|×|H| |\mathsf{G} \times \mathsf{H}| = |\mathsf{G}| \times |\mathsf{H}|

and invariant under equivalence of groupoids:

GH|G|=|H|. \mathsf{G} \simeq \mathsf{H} \implies |\mathsf{G}| = |\mathsf{H}|.

But none of these three properties require that we define |G||\mathsf{G}| as the sum of the reciprocals of the cardinalities |G i||G_i|: any other power of these cardinalities would work just as well. What makes the reciprocal cardinalities special is that if GG is a finite group acting on a set SS, we have

|SG|=|S|/|G| |S\sslash G| = |S|/|G|

where the groupoid SGS \sslash G is the weak quotient or homotopy quotient of SS by GG, also called the action groupoid. This is the groupoid with elements of SS as objects and one morphism from ss to ss' for each gGg \in G with gs=sg s = s', with composition of morphisms coming from multiplication in GG.

The groupoid of nn-element sets equipped with permutation, Perm(n)\mathsf{Perm}(n), has a nice description in terms of weak quotients:

Lemma. For all nn \in \mathbb{N} we have an equivalence of groupoids

Perm(n)S nS n \mathsf{Perm}(n) \simeq S_n \sslash S_n

where the group S nS_n acts on the underlying set of S nS_n by conjugation.

Proof. We use the fact that Perm(n)\mathrm{Perm}(n) is equivalent to any full subcategory of Perm(n)\mathrm{Perm}(n) containing at least one object from each isomorphism class. For Perm(n)\mathsf{Perm}(n) we can get such a subcategory by fixing an nn-element set, say X={1,,n}X = \{1,\dots, n\}, and taking only objects of the form σ:XX\sigma \colon X \to X, i.e. σS n\sigma \in S_n. A morphism from σS n\sigma \in S_n to σS n\sigma' \in S_n is then a permutation τS n\tau \in S_n such that

σ=τστ 1. \sigma' = \tau \sigma \tau^{-1} .

But this subcategory is precisely S nS nS_n \sslash S_n.       ▮

Corollary. For all nn \in \mathbb{N} we have

|Perm(n)|=1 |\mathrm{Perm}(n)| = 1

Proof. We have |Perm(n)|=|S nS n|=|S n|/|S n|=1|\mathrm{Perm}(n)| = |S_n \sslash S_n| = |S_n|/|S_n| = 1.       ▮

It should now be clear why we can prove results on random permutations using the groupoid Perm(n)\mathsf{Perm}(n): this groupoid is equivalent to S nS nS_n \sslash S_n, a groupoid with one object for each permutation σS n\sigma \in S_n, and with each object contributing 1/n!1/n! to the groupoid cardinality.

Now let us use this idea to derive the original Cycle Length Lemma from the categorified version.

Cycle Length Lemma. Suppose p 1,,p np_1 , \dots, p_n \in \mathbb{N}. Then

E( k=1 nC k p̲ k)={ k=1 n1k p k if|p|n 0 if|p|>n E\left( \prod_{k=1}^n C_k^{\underline{p}_k} \right) = \left\{ \begin{array}{ccc} \displaystyle{ \prod_{k=1}^n \frac{1}{k^{p_k}} } & & \mathrm{if} \; |\vec{p}| \le n \\ \\ 0 & & \mathrm{if} \; |\vec{p}| \gt n \end{array} \right.

Proof. We know that

A pPerm(n|p|)× k=1 nB(/k) p k \mathsf{A}_{\vec{p}} \simeq \mathsf{Perm}(n - |\vec{p}|) \; \times \; \prod_{k = 1}^n \mathsf{B}(\mathbb{Z}/k)^{p_k}

So, to prove the Cycle Length Lemma it suffices to show three things:

|A p|=E( k=1 nC k p̲ k) |\mathsf{A}_{\vec{p}}| = E\left( \prod_{k=1}^n C_k^{\underline{p}_k} \right)

Perm(n|p|)={1 if|p|n 0 if|p|>n \mathsf{Perm}(n - |\vec{p}|) = \left\{ \begin{array}{ccc} 1 & & \mathrm{if} \; |\vec{p}| \le n \\ \\ 0 & & \mathrm{if} \; |\vec{p}| \gt n \end{array} \right.

and

|B(/k)|=1/k |\mathsf{B}(\mathbb{Z}/k)| = 1/k

The last of these is immediate from the definition of groupoid cardinality. The second follows from the Corollary above, together with the fact that Perm(n|p|)\mathsf{Perm}(n - |\vec{p}|) is the empty groupoid when |p|>n|\vec{p}| \gt n. Thus we are left needing to show that

|A p|=E( k=1 nC k p̲ k). |\mathsf{A}_{\vec{p}}| = E\left( \prod_{k=1}^n C_k^{\underline{p}_k} \right).

We prove this by computing the cardinality of a groupoid equivalent to A p\mathsf{A}_{\vec p}. This groupoid is of the form

Q(p)S n Q(\vec{p}) \sslash S_n

where Q(p)Q(\vec{p}) is a set on which S nS_n acts. As a result we have

|A p|=|Q(p)S n|=|Q(p)|/n! |\mathsf{A}_{\vec{p}}| = |Q(\vec{p}) \sslash S_n| = |Q(\vec{p})| / n!

and to finish the proof we will need to show

E( k=1 nC k p̲ k)=|Q(p)|/n!. E\left( \prod_{k=1}^n C_k^{\underline{p}_k} \right) = |Q(\vec{p})| / n!.

What is the set Q(p)Q(\vec{p}), and how does S nS_n act on this set? An element of Q(p)Q(\vec{p}) is a permutation σS n\sigma \in S_n equipped with an ordered p 1p_1-tuple of distinct 11-cycles, an ordered p 2p_2-tuple of distinct 22-cycles, and so on up to an ordered p np_n-tuple of distinct nn-cycles. Any element τS n\tau \in S_n acts on Q(p)Q(\vec{p}) in a natural way, by conjugating the permutation σS n\sigma \in S_n to obtain a new permutation, and mapping the chosen cycles of σ\sigma to the corresponding cycles of this new permutation τστ 1\tau \sigma \tau^{-1}.

Recalling the definition of the groupoid A p\mathsf{A}_{\vec{p}}, it is clear that any element of Q(p)Q(\vec{p}) gives an object of A p\mathsf{A}_{\vec{p}}, and any object is isomorphic to one of this form. Furthermore any permutation τS n\tau \in S_n gives a morphism between such objects, all morphisms between such objects are of this form, and composition of these morphisms is just multiplication in S nS_n. It follows that

A pQ(p)S n. \mathsf{A}_{\vec{p}} \simeq Q(\vec{p}) \sslash S_n.

To finish the proof, note that

E( k=1 nC k p̲ k) E\left( \prod_{k=1}^n C_k^{\underline{p}_k} \right)

is 1/n!1/n! times the number of ways of choosing a permutation σS n\sigma \in S_n and equipping it with an ordered p 1p_1-tuple of distinct 11-cycles, an ordered p 2p_2-tuple of distinct 22-cycles, and so on. This is the same as |Q(p)|/n! |Q(\vec{p})| / n!.       ▮

References

[AT] Richard Arratia and Simon Tavaré, The cycle structure of random permutations, The Annals of Probability (1992), 1567–1591.

[BD] John C. Baez and James Dolan, From finite sets to Feynman diagrams, in Mathematics Unlimited—2001 and Beyond, vol. 1, eds. Björn Engquist and Wilfried Schmid, Springer, Berlin, 2001, pp. 29–50.

[BHW] John C. Baez, Alexander E. Hoffnung and Christopher D. Walker, Higher-dimensional algebra VII: groupoidification, Theory and Applications of Categories 24 (2010), 489–553.

[F] Kevin Ford, Anatomy of Integers and Random Permutations—Course Lecture Notes.

Posted at December 15, 2024 12:00 PM UTC

TrackBack URL for this Entry:   https://golem.ph.utexas.edu/cgi-bin/MT-3.0/dxy-tb.fcgi/3583

22 Comments & 0 Trackbacks

Re: Random Permutations (Part 14)

Wow, this is lovely. It may be a silly question, but could the cycle length lemma imply relations in some kind of Burnside ring?

Posted by: jack on December 17, 2024 1:18 AM | Permalink | Reply to this

Re: Random Permutations (Part 14)

Hmm, I don’t know! Since the cycle decomposition of a permutation in S nS_n, described by an nn-box Young diagram, specifies its conjugacy class, and the Cycle Length Lemma says (among many other things!) how many permutations are in each conjugacy class, one thing it does is describe the “integration over S nS_n” map from the ring of class functions on S nS_n to \mathbb{Q}.

There’s also a map from the Burnside ring of S nS_n to its representation ring, which at least over \mathbb{Q} is the same as the ring of class functions. That’s as close as I can immediately get!

Posted by: John Baez on December 17, 2024 6:08 AM | Permalink | Reply to this

Re: Random Permutations (Part 14)

Oh, and I should say that any finite S nS_n-set XX gives not only an element of the Burnside ring of S nS_n, but also a groupoid XS nX\sslash S_n, which gets us into the realm of the games I’m playing here.

Posted by: John Baez on December 17, 2024 6:14 AM | Permalink | Reply to this

Re: Random Permutations (Part 14)

I love the idea of proving stuff about random permutations using groupoid cardinality.

But first, a comment on something from earlier in the series. Your posts about random permutations always seem to get me thinking about random endomorphisms. Maybe that’s because they’re easier: when ff is a random endomorphism of a finite set XX (chosen uniformly at random), the random variables f(x)f(x) (xXx \in X) are independent, unlike for permutations.

You said, among other things, that the expected number of kk-cycles in a random permutation of nn elements converges to 1/k1/k as nn \to \infty. What about a random endomorphism?

It seems to me that the answer is the same for endomorphisms as permutations, and very easy to prove.

As a warm-up, consider k=1k = 1: fixed points. For a random endomorphism ff of an nn-element set, the probability that a given element xx is fixed by ff is 1/n1/n. Put another way, the expected number of 1-cycles that xx belongs to is 1/n1/n (since the number of 1-cycles that xx belongs to is either 00 or 11!). Summing over all xx in our nn-element set XX gives the expected number of 1-cycles as xX1/n=1\sum_{x \in X} 1/n = 1.

Now take any k1k \geq 1, and take a random endomorphism ff of an nn-element set XX. For a given element xXx \in X, the probability that xx belongs to a kk-cycle is the probability that f(x),f 2(x),,f k1(x)f(x), f^2(x), \ldots, f^{k - 1}(x) are all different from xx and f k(x)=xf^k(x) = x. This is

(n1n) k11n=1n(11n) k1. \Bigl(\frac{n - 1}{n}\Bigr)^{k - 1} \cdot \frac{1}{n} = \frac{1}{n} \cdot \Bigl( 1 - \frac{1}{n} \Bigr)^{k - 1}.

Again, this expression can be interpreted as the expected number of kk-cycles that xx belongs to. Summing over all xXx \in X gives the number of kk-cycles in ff, multiplied by kk because each cycle gets counted kk times. Hence the expected number of kk-cycles in a random endomorphism of an nn-element set is

1k(11n) k1. \frac{1}{k} \cdot \Bigl( 1 - \frac{1}{n} \Bigr)^{k - 1}.

Here I’m using the fact that the expected value of a sum of random variables is the sum of the expected values, even if they’re not independent. (They’re not, in this case. E.g. if we have some xXx \in X and we know that none of the elements other than xx belong to a 2-cycle, then xx can’t either.)

If we let nn \to \infty, it converges to 1/k1/k. So that’s the expected number of kk-cycles in a random endomorphism of a large finite set.

This is the same as the answer for random permutations. So I’d now like to wave a wand and deduce the result on permutations from the result on endomorphisms.

Unfortunately, I don’t know how, but maybe I have an inkling. The picture I have in my head is something like this:

colim XSym(X)colim XEnd(X) colim_X Sym(X) \leftrightarrows colim_X End(X)

Here End(X)End(X) and Sym(X)Sym(X) are the sets of endomorphisms and permutations of a finite set XX, and the colimits are over the category of finite sets and injections. Any permutation is an endomorphism, which gives one of the two arrows. The other one comes from the fact that any permutation of a finite set XX restricts canonically to a permutation of a subset YXY \subseteq X:

endo of finite set

It would be nice to show that when we choose endomorphisms uniformly at random, then the resulting permutations are distributed uniformly too. Then we could deduce the result on expected number of cycles in a random permutation from the analogous result for endomorphisms. But right now, I don’t even know how to make sense of this statement about uniform distributions, because different endomorphisms of XX restrict to permutations on subsets of different sizes.

I’m being lazy and not looking up the proof that the expected number of kk-cycles in a random permutation is 1/k1/k. How hard is it anyway?

Posted by: Tom Leinster on December 17, 2024 10:26 AM | Permalink | Reply to this

Re: Random Permutations (Part 14)

I don’t have time to think through how good the analogy is (I’m procrastinating from grading exams right now), but your comment reminds me of a common trick (or technique, or whatever — like you, I mean to cast no shade with that term) from geometric probability, sometimes called (de-)Poissonization.

Say you want to prove something about random collections of points in a fixed set KR dK \subseteq \mathrm{R}^d. The first thing you have to do is decide what you mean by a random collection of points. Assuming that KK has finite positive volume, perhaps the most obvious thing to do is fix a positive integer nn, then choose X 1,,X nX_1, \ldots, X_n uniformly and independently in KK.

If you don’t want to be tied to a specific nn, you could first pick NN at random, say with a Poisson distribution, and then pick NN points uniformly and independently. If NN is a Poisson random variable with mean nn, then the resulting random collection of points is called a Poisson point process (PPP) in KK with intensity n/vol(K)n / vol(K). This probably sounds like a more complicated thing to deal with than a fixed number of random points, but it magically turns out to have a very special property: if AA and BB are disjoint subsets of KK, then the number of random points in AA and the number of random points in BB are independent random variables. (In fact, the collections of random points in those sets are themselves independent PPPs.) This makes certain things easier to prove about the PPP model.

Now maybe you are actually interested in the fixed-nn model, or more realistically, in the large-nn asymptotics of that model. Depending on what you’re doing, extra independence property may make it easier to do what you want to do for the PPP model. So you “Poissonize” the problem and prove results for the PPP model instead.

Then if you’re lucky, you can transfer large-nn results for the PPP model back to the fixed-nn model, using (among other things) that a Poisson random variable with large mean is tightly concentrated around its mean. That’s the “de-Poissonization” step.

The appearance of the Poisson distribution in this stuff is (as far as I see anyway) completely different from its appearance in the original post. This is all really to say that it’s a familiar situation to me to see two different, but conceptually related, random constructions, each with different technical advantages, that lead to similar results in some asymptotic regime.

Posted by: Mark Meckes on December 17, 2024 1:33 PM | Permalink | Reply to this

Re: Random Permutations (Part 14)

I see; very interesting! So in this kind of situation, it can be easier to work with a Poisson random variable with mean nn than it is to work with the plain old number nn itself. I like it.

To implement a similar idea here — that is, to relate the statistics of random permutations and random endomorphisms — we’d surely need to know something about the number of elements in the eventual image of a random endomorphism. By the eventual image, I mean the set of periodic points of the endomorphism. In the diagram above, it’s the five-element yellow subset.

Five years ago, we had a conversation about the expected number of periodic points of a random endomorphism. For an endomorphism of a set with a large number nn of elements, it’s πn/2\sim \sqrt{\pi n/2}. From what John wrote in that conversation, I suspect that lots more is known about the distribution of the number of periodic points than merely its mean.

Posted by: Tom Leinster on December 17, 2024 4:30 PM | Permalink | Reply to this

Re: Random Permutations (Part 14)

Tom wrote:

I’m being lazy and not looking up the proof that the expected number of kk-cycles in a random permutation is 1/k1/k. How hard is it anyway?

I’m also being lazy and neither looking it up nor thinking about it, but I believe it should be a straightforward application of the method of indicators: you just need to compute the probability that one fixed kk-cycle appears in your permutation, and count the number of kk-cycles.

Posted by: Mark Meckes on December 17, 2024 1:36 PM | Permalink | Reply to this

Re: Random Permutations (Part 14)

Ah, thanks. Following your hints, I see that it is easy! In fact, it’s easier than the proof for endomorphisms (so my whole previous comment was misguided), and gives a cleaner answer too: it’s exactly 1/k1/k, for all nn.

I dug back through John’s posts and found a different proof in Part 6.

By the way, I didn’t know the method you alluded to was called the “method of indicators”. And thanks for using British English; presumably Americans actually call it the “method of turn signals”.

Posted by: Tom Leinster on December 17, 2024 4:18 PM | Permalink | Reply to this

Re: Random Permutations (Part 14)

Oops, I messed up that calculation of the expected number of k-cycles in a random endomorphism. Never mind.

Posted by: Tom Leinster on December 17, 2024 6:46 PM | Permalink | Reply to this

Re: Random Permutations (Part 14)

I’m trying to read your comment, Tom, and I bumped into this:

Now take any k1k \ge 1, and take a random permutation ff of an nn-element set XX.

I think you meant “endomorphism” here, not “permutation”. Do you want me to fix it?

Posted by: John Baez on December 17, 2024 9:36 PM | Permalink | Reply to this

Re: Random Permutations (Part 14)

You’re right, I meant endomorphism; thanks. I’ve fixed it. However, as per my last comment, I got that calculation wrong anyway.

Posted by: Tom Leinster on December 17, 2024 10:36 PM | Permalink | Reply to this

Re: Random Permutations (Part 14)

Tom wrote:

I’m being lazy and not looking up the proof that the expected number of kk-cycles in a random permutation is 1/k1/k. How hard is it anyway?

There are a bunch of proofs — for example, my blog article gave a proof, since it’s a special case of the Cycle Length Lemma that E(C k)=1/kE(C_k) = 1/k — but if this result is all you want, here’s a much more efficient approach based on Sridhar Ramesh’s comment on Part 6.

Suppose 1kn1 \le k \le n.

Theorem. Given a random permutation of an nn-element set, the probability that any given point lies on a kk-cycle is 1/n1/n.

Proof. Choose a particular point in an nn-element set. How many permutations of this set have this point in a kk-cycle? To choose such a permutation we have to choose the other k1k - 1 elements in the cycle and put an ordering on them. Then we have to permute the remaining nkn - k elements. There are

(n1k1)×(k1)!×(nk)!=(n1)! \binom{n - 1}{k - 1} \times (k - 1)! \times (n - k)! = (n-1)!

ways of doing this. Dividing by the total number of permutations of our nn-element set we obtain the probability 1/n1/n.   ■

Corollary. Given a random permutation of an nn-element set, the expected number of kk-cycles is 1/k1/k.

Proof. Suppose the expected number of kk-cycles is EE. Then the expected number of points lying on kk-cycles kEk E, and the probability that a point lies on a kk-cycle is kE/nk E /n . But this equals 1/n1/n by the Theorem, so E=1/kE = 1/k.   ■

Also, even simpler to state:

Corollary. Given a random permutation of an nn-element set, the expected number of points lying on kk-cycles is 11.

It would be nice if there were a proof of this last corollary that made it instantly obvious, rather than detouring through the fact that

(n1k1)×(k1)!×(nk)!=(n1)! \binom{n - 1}{k - 1} \times (k - 1)! \times (n - k)! = (n-1)!

Posted by: John Baez on December 17, 2024 10:01 PM | Permalink | Reply to this

Re: Random Permutations (Part 14)

John wrote:

Corollary. Given a random permutation of an nn-element set, the expected number of points lying on kk-cycles is 11

and

It would be nice if there were a proof of this last corollary that made it instantly obvious.

You probably know this, but an equivalent challenge is to find an “instantly obvious” proof that the expected number of points lying on kk-cycles is independent of the cardinality nn of the ambient set, for nn in the range k,k+1,k, k + 1, \ldots.

For suppose we know that the expected number of points lying on kk-cycles is independent of nkn \geq k, for all kk. Call this expected number e ke_k. For each nn and permutation σ\sigma of nn letters,

k=1 n(number of points lying in a k-cycle of σ)=n. \sum_{k = 1}^n (\text{number of points lying in a }\ k\text{-cycle of }\ \sigma) = n.

Taking the mean over all σS n\sigma \in S_n gives

k=1 ne k=n. \sum_{k = 1}^n e_k = n.

The same argument applied to n1n - 1 in place of nn gives

k=1 n1e k=n1. \sum_{k = 1}^{n - 1} e_k = n - 1.

Subtracting the last equation from the second-to-last equation gives e n=1e_n = 1. This holds for all nn, so we’re done.

Posted by: Tom Leinster on December 21, 2024 5:07 PM | Permalink | Reply to this

Re: Random Permutations (Part 14)

Nice! I’m not sure the relation “P instantly follows from Q” is transitive, but I will accept this as a zero-effort step.

Posted by: John Baez on December 21, 2024 8:29 PM | Permalink | Reply to this

Re: Random Permutations (Part 14)

I’m not sure it is either!

In situations like this, I like to ask myself whether a proof could be explained to a mathematical friend while you’re out for a walk together. That means no pen and paper, no furious feats of concentration, and the possibility of occasional interruptions to cross a road or look at a tree.

It would be great to have a proof like that for the fact that the expected number of kk-cycles in a random permutation (or equivalently, the expected number of elements belonging to a kk-cycle) is independent of the size of the ambient set. As long as it’s at least kk, obviously.

Posted by: Tom Leinster on December 21, 2024 11:16 PM | Permalink | Reply to this

Re: Random Permutations (Part 14)

This is all very cool. Presumably the groupoids you consider can be generalized to GG-sets equipped with an element of GG, potentially further equipped with distinguished orbits (for GG a fixed finite group). There is a whole literature on probability on groups that could maybe be approached from this angle.

Posted by: Mark Meckes on December 17, 2024 3:50 PM | Permalink | Reply to this

Re: Random Permutations (Part 14)

Thanks! I can indeed categorify a bunch of general abstract nonsense results along the lines you mention. For some category theorists, stripping off all the specifics might be enjoyable. But for me, the concreteness of the results being categorified is part of the fun. So I guess I should learn what people have done with other finite groups.

It’s really tempting to look at groups GL(n,𝔽 q)GL(n,\mathbb{F}_q), since they are ‘qq-deformed versions’ of the symmetric groups S nS_n, and we might get similar formulas showing up but with qq-factorials replacing factorials, etc.

The phrase “a whole literature” is simultaneously intriguing yet terrifying. Do you know a nice review article or something?

Posted by: John Baez on December 17, 2024 10:16 PM | Permalink | Reply to this

Re: Random Permutations (Part 14)

There are a lot of mostly disconnected facets to probability on groups and I don’t know a good review for the whole area generally. But here is a not-too-old review of one important facet of this literature (random walks on groups), here is a recent paper I happen to know of that feels closer in spirit to the kind of stuff you’re doing here, and (since you mentioned GL(n,𝔽 q)GL(n, \mathbb{F}_q)) here is an older survey about random matrices over finite fields.

Posted by: Mark Meckes on December 18, 2024 10:54 PM | Permalink | Reply to this

Re: Random Permutations (Part 14)

Thanks! That survey on random matrices over finite fields is just what I want.

Posted by: John Baez on December 21, 2024 1:27 AM | Permalink | Reply to this

Re: Random Permutations (Part 14)

Nice post, as usual.

A typo: Following “is the falling power” xx should be nn.

Posted by: Kevin Walker on December 20, 2024 5:10 PM | Permalink | Reply to this

Re: Random Permutations (Part 14)

Thanks! Fixed.

Posted by: John Baez on December 21, 2024 1:26 AM | Permalink | Reply to this

Re: Random Permutations (Part 14)

I’ve polished up this blog article and turned it into a paper:

It’s the shortest paper I’ve written in… forever? I really like the idea of writing short papers now.

The last section is new, not in the blog article. It explains how whenever you have a finite group GG, a functor

F:GGFinSet F: G \sslash G \to FinSet

describes a kind of structure you can put on elements of GG, which is equivariant under conjugation. Counting the number of structures you can put on an element of GG, you get a function

|F|:G |F| \colon G \to \mathbb{N}

where the bars mean the cardinality of a finite set. The expected value of |F||F| is

E(|F|)=1|G| gG|F(g)| E(|F|) = \frac{1}{|G|} \sum_{g \in G} |F(g)|

But we can compute this as the cardinality of a groupoid! Just apply the Grothendieck construction to FF, or in other words form its category of elements, to get a groupoid F\int F. This is the groupoid of “elements gGg \in G equipped with a structure xF(g)x \in F(g)”. Then I show

E(|F|)=|F| E(|F|) = |\textstyle{\int} F|

where the bars at right mean groupoid cardinality.

This equation is cute, but it gets even cuter if we remember that the expected value of |F||F| is its integral with respect to the normalized Haar measure on GG. Then we can write the equation as

|F|=|F| \textstyle{\int} |F| = |\textstyle{\int} F|

Posted by: John Baez on December 21, 2024 1:40 AM | Permalink | Reply to this

Post a New Comment