In my last post I talked about how to interpret the following formula combinatorially:

I skipped some parts of the argument, though. I gave the bijection relating a combinatorial interpretation of the left-hand side with a combinatorial interpretation of the right-hand side, but I did not justify the interpretations of the two sides themselves. This post will do that. (As with my previous post, this is pretty much lifted from my answer to one of my own math.SE questions.)

**Left-hand side interpretation:** Select a permutation of uniformly at random. For each cycle *w* of color *w* red with probability ; otherwise, color it blue. This creates a colored permutation . Then is the probability that exactly *k* of the *n* elements of a randomly-chosen permutation are colored red.

**Proof: **There are ways to choose which *k* elements of a given permutation will be red and which *n-k* elements will be blue. Given* k* particular elements of , the number of ways those *k* elements can be expressed as the product of *i* disjoint cycles is , an unsigned Stirling number of the first kind. Thus the probability of choosing a permutation that has those *k* elements as the product of *i* disjoint cycles and the remaining *n-k* elements as the product of* j* disjoint cycles is , and the probability that the *i* cycles are colored red and the *j* cycles are colored blue as well is Summing up, the probability that exactly *k* of the *n* elements in a randomly chosen permutation are colored red is

The two sums on the right-hand side are basically the same, so we’ll just do the first one.

(The first equality is the well-known property that Stirling numbers of the first kind are used to convert rising factorial powers to ordinary powers. This property can be proved combinatorially. For example, Vol. 1 of Richard Stanley’s *Enumerative Combinatorics* [1], 2nd ed., pp. 33-34, contains two such combinatorial proofs.)

Thus the probability that exactly* k* of then elements of a randomly chosen permutation are colored red is

**Right-hand side interpretation: **Select a permutation of uniformly at random. Then, if *n* is even, is the probability that contains only cycles of even length.

**Proof: **Since there can be no odd cycles, . Thus there are choices for . We have already chosen the element that maps to , but otherwise there are no restrictions on the value of , and so we have choices for as well.

Now elements are unassigned. If , then we have an open cycle. We cannot assign , as that would close the current cycle at an odd number of elements. Also, and are already taken. Thus there are choices for the value of . If , then we have just closed an even cycle. Selecting any unassigned element in , say *j*, we cannot have , as that would create an odd cycle, and 1 and are already taken. Thus we have choices for as well.

In general, if there are *i* elements unassigned and *i* is even, there is either one even-length open cycle or no open cycles. If there is an open cycle, we cannot close it, and so we have choices for the next element in the cycle. If there is not an open cycle, we select any unassigned element *j*. Since we cannot have , there are choices for . Either way, we have choices. If there are *i* elements unassigned and *i* is odd, though, there must always be an odd-length open cycle. Since we can close it, there arei choices for the next element in the cycle.

All together, then, if *n* is even then the number of permutations of that contain only cycles of even length is Thus the probability of choosing a permutation uniformly at random and obtaining one that contains only cycles of even length is

**References**

- Richard Stanley,
*Enumerative Combinatorics,*2nd ed., Cambridge University Press, 2011.