Random generation with cycle type restrictions

We study random generation in the symmetric group when cycle type restrictions are imposed. Given $\pi, \pi' \in S_n$, we prove that $\pi$ and a random conjugate of $\pi'$ are likely to generate at least $A_n$ provided only that $\pi$ and $\pi'$ have not too many fixed points and not too many $2$-cycles. As an application, we investigate the following question: For which positive integers $m$ should we expect two random elements of order $m$ to generate $A_n$? Among other things, we give a positive answer for any $m$ having any divisor $d$ in the range $3 \leq d \leq o(n^{1/2})$.


Introduction
Fix two conjugacy classes C, C ′ of the symmetric group S n . Should we expect random elements π ∈ C, π ′ ∈ C ′ to generate at least A n ?
Clearly not if C and C ′ both represent elements with many fixed points, for then it is likely that π and π ′ have a common fixed point, and therefore cannot possibly generate A n . Also not if C and C ′ both represent elements with many 2-cycles: if both C and C ′ represent elements with Ω(n) 2-cycles, then it is not hard to see that the probability that π and π ′ have a common 2-cycle is bounded away from zero.
The purpose of this paper is to prove that, apart from these two basic obstructions, yes we should expect π, π ′ to generate at least A n . The following is our main theorem.
Theorem 1.1. Let C, C ′ ⊂ S n be fixed conjugacy classes. For each j let c j be the number of j-cycles in a representative element of C, and similarly c ′ j for C ′ . Let π ∈ C, π ′ ∈ C ′ be chosen uniformly at random. Assume that c 1 , c ′ 1 = o(n 2/3 ). Then (2) P( π, π ′ A n ) = Ω(1) if and only if (c 1 + c 1/2 2 )(c ′ 1 + c ′ 2 1/2 ) = O(n), and c 2 + c ′ 2 = n − Ω(n). In fact the hypothesis c 1 , c ′ 1 = o(n 2/3 ) is not needed for the "only if " statements. The point of the theorem is that the likelihood of π, π ′ σ A n is more-or-less completely characterized by counting fixed points and 2-cycles. The symmetric version of the theorem is illustrative: Corollary 1.2. Assume c 1 = c ′ 1 and c 2 = c ′ 2 .
Our theorem refines some previous results about random generation in S n . The most well-known and basic of these is Dixon's theorem [Dix69], confirming a conjecture of Neto, that two random elements of S n almost surely generate at least A n . Confirming a conjecture of Robinson, Shalev [Sha97] proved that this remains true if we require the two elements to be conjugate. One can view Theorem 1.1 as a common generalization of all these two results, since a random permutation almost surely has very few fixed points and very few 2-cycles. 1 In another direction, Babai and Hayes [BH06] proved that if π is fixed and π ′ is uniformly random, then π and π ′ will almost surely generate at least A n if and only if π has o(n) fixed points. This does not follow from our theorem (because of the c 1 , c ′ 1 = o(n 2/3 ) restriction), but it certainly has a similar flavour.
Our original motivation was the following question. Let ord S n be the set of all m which occur as the order of at least one π ∈ S n . Fix m ∈ ord S n , and let π and π ′ be two random elements of order m. Should we expect π and π ′ to generate at least A n ? For the almost-sure version of the question, we give a positive answer for a broad class of m. Specifically, we prove the following theorem.
Theorem 1.3. Let m ∈ ord S n , and assume that either (1) m has a divisor d in the range 3 d o(n 1/2 ), or (2) m is even and there is at least one π ∈ S n with o(n 1/2 ) fixed points and o(n) 2-cycles. Then two random elements of S n of order m almost surely generate at least A n .
For the positive-probability version of the question, we give a complete characterization.
Theorem 1.4. Let m ∈ ord S n . Then two random elements of order m generate at least A n with probability bounded away from zero if and only if (1) m is odd and there is at least one π ∈ S n of order m with O(n 1/2 ) fixed points, or (2) m is even and not 2.
The novelty of these results is the wide range we allow for m. The case of bounded m is included in work of Liebeck and Shalev: see [LS96], and particularly [LS04]. In the latter paper the authors consider more generally random homomorphisms Γ → S n for any Fuchsian group Γ: thus for example they prove that A n is generated by random elements satisfying x 2 = y 3 = (xy) 7 = 1. It is clear that our rather elementary approach, relying essentially on the independence of the generators, does not apply to such a problem. On the other hand we are not aware of any previous results for unbounded m.
1.1. Notation and idiosyncrasies. Much of our notation has already appeared. We consistently write π and π ′ for our two permutations, which we assume are random subject to having c j and c ′ j j-cycles, respectively, for each j. We will write c and c ′ for the total number of cycles: 1 To be precise, for any ωn → ∞, the probability that π has at most ωn fixed points tends to 1 as n → ∞, and similarly for 2-cycles.
Occasionally, we will denote cycle types using exponent notation: thus for example the conjugacy class C consists of all permutations with cycle type (1 c1 , 2 c2 , . . . , n cn ). We write Ω for our ground set of size n, and we write S n and A n for the symmetric and alternating groups on Ω. If G acts on a set X, g ∈ G, x ∈ X, we write x g for the image of x under g. In particular, if g, h ∈ G we write h g for g −1 hg. Thus if fix X (g) is the fixed point set of g then we have We use standard big-O and little-o without reservation, all understood with respect to the limit n → ∞. Additionally we use the Vinogradov notation x ≪ y to mean x = O(y), and x ≍ y to mean x ≪ y and x ≫ y (i.e., x/y is bounded above and below by positive constants).
As will be clear already and annoying to some readers, we are mainly interested in asymptotic properties of S n as n → ∞, so almost all of our results are expressed with inexplicit error terms like o(1) or 1 − o(1). None of our methods are especially advanced, so it is certainly possible to prove everything with explicit error terms, but doing so would be notationally cumbersome and, we feel, distracting. Instead, we have prioritized statements which are as general as possible with respect to the conjugacy classes C and C ′ . If ever our theorem is needed with an explicit error term for specific conjugacy classes, it will be easy enough to rehash the essential arguments.
In line with this philosophy, we do not hesitate to say "almost surely", when really we mean "with probability tending to 1 as n → ∞", and "with positive probability" instead of "with probability bounded away from 0", etc. This technically imprecise language could actually be made precise by working with an ultraproduct of (S n ) ∞ n=1 instead of the finite groups S n , but there is no reader whom this would help.
1.2. Organization of the paper. We now briefly sketch the proof of Theorem 1.1, and explain the organization of the paper.
First, we prove the "only if" statements in Theorem 1.1 in Section 2. We also give a few examples justifying the c 1 , c ′ 1 = o(n 2/3 ) hypothesis. We hope that starting with a wealth of examples will orient the reader, and motivate the rest of the paper.
In particular, it will be clear from these examples that the main obstruction in Theorem 1.1 is transitivity. Therefore in Section 3 we estimate the probability that G = π, π ′ is transitive by studying the distribution of the number N of orbits of G of size less than n/2. This is the most technical part of the paper. We will prove that if (c 1 + c and c 2 + c ′ 2 = n − Ω(n) then we will prove EN = O(1). We will then use the method of moments to prove the Poisson-type approximation Hence G is transitive with probability bounded away from zero.
If G is transitive, then very likely G A n . We prove this in Section 4. We treat the imprimitive and primitive cases separately. Neither argument is very difficult, and the bounds are much stronger than the bounds we give for the intransitive case. For the primitive case we use results depending the classification of finite simple groups. This will complete the proof of Theorem 1.1.
Finally, in Section 5 we study fixed-order generation. Again we give a wealth of examples, and we prove Theorems 1.3 and 1.4 using Theorem 1.1.

Necessity of the hypotheses
Our first order of business is to discuss the necessity of the various hypotheses in Theorem 1.1. We prove the stated "only if" conditions, and additionally we discuss some examples where c 1 + c ′ 1 exceeds n 2/3 .

2.1.
The case c 1 c ′ 1 /n = Ω(1) or c 1 c ′ 1 /n = ω(1). If π and π ′ each have many fixed points then it is likely that they have a common fixed point. The expected number of common fixed points of π and π ′ is exactly c 1 c ′ 1 /n. We claim that if c 1 c ′ 1 /n = Ω(1) then there is a nonvanishing probability that π and π ′ have a common fixed point, and if c 1 c ′ 1 /n = ω(1) then almost surely π and π ′ have a common fixed point. To see this, note that fix(π) is just a random set of size c 1 and fix(π ′ ) is just a random set of size c ′ 1 . The probability that two random sets of size c 1 and c ′ 1 are disjoint is This proves both our claims.
2.2. The case c 2 c ′ 2 ≫ n 2 . Suppose that c 2 c ′ 2 ≫ n 2 . We claim that there is a nonvanishing probability that π and π ′ have a common 2-cycle. To see this, fix the c 2 2-cycles of π, and consider picking the c ′ 2 2-cycles of π ′ in order. The k-th 2-cycle is chosen uniformly from a pool of n−2k+2 2 possibilities, of which at least c 2 − 2k + 2 are also 2-cycles of π. Thus the probability that each of these fails to be a common 2-cycle is bounded by If c 2 c ′ 2 ≫ n 2 then this is bounded away from 1.
2.3. The case c 1 c ′ 2 1/2 /n = Ω(1) or c 1 c ′ 2 1/2 /n = ω(1), or vice versa. Morally, a similar argument applies if c 2 1 c ′ 2 ≫ n 2 , but the situation is complicated by the need to track two "state variables": the number of remaining 2-cycles to place, and the number of exhausted fixed points. Instead we use moment methods.
Assume c 2 1 c ′ 2 ≫ n 2 , and let N be the number of 2-cycles (xy) of π ′ such that x, y are both fixed points of π. Clearly, Counting ordered pairs of such 2-cycles, we have (1 + O(1/c 1 + 1/c ′ 2 )). Hence Note now that if c 2 1 c ′ 2 ≫ n 2 then c 1 ≫ n 1/2 . The case in which c 1 ≍ n and c ′ 2 ≍ 1 can be handled separately, so assume also c ′ 2 = ω(1). Then we have Thus if c 2 1 c ′ 2 /n 2 = ω(1) then P(N = 0) = o(1). The case in which c 2 1 c ′ 2 /n 2 ≍ 1 is a little more delicate, but can be handled with the method of moments. By a similar argument we have Moreover, Thus from Bonferroni's inequalities we have Figure 1. Bijection between pairs of permutations σ, σ ′ of cycle type (2 k ) and permutations τ having only even-length cycles 2.4. The case c 2 , c ′ 2 = n/2 − o(n). Now suppose that c 2 , c ′ 2 = n/2 − o(n). We have already shown that the probability that π and π ′ have a common 2-cycle is bounded away from zero. We claim further that π, π ′ is almost surely intransitive. We do not claim however that π and π ′ almost surely have a common 2-cycle -instead we use a more involved argument.
Let N be the number of sets X ⊂ Ω with the following properties: (1) 0 < |X| < n 1/3 , (2) X is preserved by both π and π ′ , (3) π| X and π ′ | X both consist only of 2-cycles, and (4) π, π ′ | X is transitive. In other words, N is the number of orbits of π, π ′ , of size less than n 1/3 , consisting exclusively of 2-cycles. We claim that N is almost surely positive, so in particular π, π ′ is almost surely not transitive.
To prove this we use the second moment method. Let N k be the number of such sets of size 2k. Then where p(k) is the probability that two elements of S 2k , each of cycle type (2 k/2 ), generate a transitive subgroup. Using k = o(n 1/2 ) and Stirling's approximation, Next we need to estimate p(k).
Proof. There is a bijection between ordered pairs of permutations σ, σ ′ ∈ S 2k of cycle type (2 k ) and permutations τ ∈ S 2k having only even-length cycles, defined as follows (see Figure 1). Given σ, σ ′ , define τ by repeating the following process: find the smallest (in some arbitrary but fixed order) element x at which we have not yet defined τ , and define It is easy to see that the cycle must terminate after an even number of steps, so the process does indeed define a permutation having only even-length cycles. In the other direction, suppose τ ∈ S 2k has only even-length cycles. On a given cycle of τ , find the smallest element x and define These maps are clearly mutually inverse. Now note that σ, σ ′ is transitive if and only if τ is a 2k-cycle. Thus In the last line we applied Stirling's approximation. Hence As long as c 2 , c ′ 2 = n/2 − o(n), this is ω(1). In order to estimate Var N , consider E(N (N − 1)). This is the expected number of ordered pairs of distinct sets X, Y satisfying conditions (1) through (4). Let E X be the event that X satisfies (1) through (4). If |X| = 2k, we have and |X| = 2k and |Y | = 2l say, then It follows from this that and so Since EN = ω(1), this implies N > 0 almost surely.

Cases in which c
In this case a straightforward modification of our argument in the c 2 1 c ′ 2 ≫ n 2 case (Subsection 2.3) shows that there is likely a 3-cycle (xyz) of π ′ such that x, y, z are fixed points of π. Similarly if c 4 1 c ′ 4 ≫ n 4 , etc. These examples are not too troubling. In fact, a slight elaboration of our proof shows that if c 1 + c ′ 1 n 1−Ω(1) then it is enough to assume for the almost-sure problem, and n 1−Ω(1) then really only boundedly many terms in these expressions are important.) The following example is more troubling. Suppose π is a random n-cycle and π ′ a random transposition. Then up to conjugacy π is (12 · · · n) and π ′ is (xn) for some x chosen uniformly from {1, . . . , n − 1}. Let G = π, π ′ . Then G is determined by gcd(x, n): if gcd(x, n) > 1 then G is imprimitive, while if gcd(x, n) = 1 then G = S n . Thus the probability that G A n is ϕ(n)/(n − 1), which can be small or large depending on the arithmetic of n. This example illustrates the difficulty of pinning down a pithy if-and-only-if condition without any a priori hypothesis on c 1 + c ′ 1 . Finally, we note that if c + c ′ > n + 1 then there are in fact no π ∈ C and π ′ ∈ C ′ such that π, π ′ is transitive.

Intransitive subgroups
Let G = π, π ′ . As so often the case in random generation problems in S n , the main obstruction is transitivity: if G is transitive then very likely G A n (we will prove this in Section 4). In other words, our main job is to estimate the probability that π and π ′ have a common fixed set of some size k.
Let N k be the number of orbits of G of size k, in other words the number of k-sets fixed by G and on which G acts transitively. Let Our goal is to estimate P(N = 0). We will accomplish this in two stages: (1) We will bound λ = EN . This will already establish what we need for the almost-sure problem, since P(N = 0) 1 − λ.
(2) We will prove a Poisson-type approximation for N which shows that P(N = 0) ≈ e −λ .
3.1. Bounding λ = EN . There are many ways we can form a fixed k-set from the cycles of π and π ′ . For any two partitions such that d j c j , d ′ j c ′ j for each j, we can form a fixed k-set by taking d j jcycles from π and d ′ j j-cycles from π ′ , for each j. The probability that these k-sets coincide after π ′ is conjugated by σ is 1/ n k . Thus we have In this subsection we simply ignore is the number of k-sets fixed by π, and similarly f ′ k . (In the next subsection we will need the full force of (3).) Proof. This follows from Define the function h by It is well known that k −1/2 e h(k/n)n ≪ n k e h(k/n)n (1 k n/2).
2 Of course, this is the very thing we are trying to estimate in this section. This "self-similarity" is largely incidental: when we write p(d 1 , . . . , d k ; d ′ 1 , . . . , d ′ k ) we usually have in mind k, d 1 , . . . , d ′ k of bounded size, whereas in the bigger picture of this section we are concerned with asymptotics.
The latter inequality follows from . The former inequality follows from Stirling's approximation.
Lemma 3.2. For any ǫ ∈ (0, 1/2) we have Note that the middle term here is of the form The more precise bound is important to us, however.
The result is Since c n this proves the lemma.
Lemma 3.3. We have Bounding each of f k and f ′ k using the previous lemma and expanding the product, we get .
Here we used the simple bound n k (n/k) k for every term except the one involving both c 2 and c ′ 2 , where we used the more precise bound n k ≫ k −1/2 e h(k/n)n . Additionally, for the other terms involving c 2 or c ′ 2 we used If we apply this bound also to the c 2 , c ′ 2 term, and bound various things crudely, then we get the first statement in the lemma.
To get the second statement, the only term which requires further comment is the c 2 , c ′ 2 term. Since h is concave and h ′ (x) = log(1/x − 1), we have h(x) h(k/n) + (x − k/n) log(n/k − 1).
The above lemma suffices as long as k = o(n). For larger k it is convenient to argue a little differently (and more simply). Proof. From Lemma 3.1 we have, for 0 < x < 1, Hence f k f ′ k e h(k/n)n e (2k/n) 1/2 (c1+c ′ 1 )−k(n−c−c ′ )/n , and The following theorem follows by combining the previous two lemmas.

A Poisson approximation.
In the previous subsection we bounded the expectation EN of N . In this subsection we apply the method of moments to show that, under similar hypotheses, if EN is bounded then in fact The method of moments depends on being able to prove moment estimates of the form EN (N − 1) · · · (N − m + 1) ≈ (EN ) m . We therefore now turn our attention to the estimation of the moments and mixed moments of (N k ) k 1 .

Recall from (3) that
We first ask to what extent we have, for k = O(1), We have so the approximation is appropriate for the factors in which c j , c ′ j are large, as well as the ones in which d j 1. Our contention is that the other terms do not contribute significantly, so overall the approximation is fine.
Moreover, for any particular index j and any t 0 we have Proof. We revisit the calculation of the previous section, now armed with the restrictive hypothesis k = O(1). From (4), The maximum is not difficult to analyze: in fact the maximum over real d i is precisely max{c k 1 , c k/2 2 , . . . , c k/k k }. We bound this crudely by max{c k 1 , c k/2 } ≍ k (c 1 + c 1/2 ) k . Now consider the part of the sum in which d j t. By the same token we have

This proves the lemma.
Lemma 3.7.
Proof. Let δ be a parameter, and split the sum according to whether there is any j such that d j 2 and c j δ(c 1 + c 1/2 ) j , or d ′ j 2 and c ′ j δ(c ′ 1 + c ′ 1/2 ) j . By the previous lemma, the part of the sum where there is some such j is bounded by On the other hand, if c j δ(c 1 + c 1/2 ) j whenever d j 2 then we have and similarly for the primed variables. Thus the error in our approximation is bounded by To get the best bound we take

Proof. We have
The rest of the proof is the same as in the previous lemma.
Theorem 3.9. Let B = max{(c 1 + c 1/2 )(c ′ 1 + c ′ 1/2 )/n, 1}. Then . Thus also, for any k, m, Proof. The first bound follows immediately from the previous two lemmas. For the second bound, we use and similarly Note that the value of M = 1m 1 + · · · + km k over m 1 + · · · + m k = m ranges between m and km. This proves the theorem.
By Lemmas 3.3 and 3.4 from the previous subsection, there is a k = O ǫ (1) such that EN >k is smaller than ǫ, and P(N = 0) P(N k = 0) P(N = 0) + P(N >k > 0), so the main thing to understand is EN k . From Bonferroni's inequalities we have, for any M 0, Therefore, from the previous theorem, Finally, note that the hypothesis c 1 + c ′ 1 = o(n 2/3 ) ensures that either (c 1 + c 1/2 )(c ′ 1 + c ′ 1/2 ) = o(n), in which case we are already done by Theorem 3.5, or as claimed.
Remark 3.11. An argument along the same line shows that N is asymptotically distributed as Poisson(EN ), and indeed for any fixed k the random variables N 1 , . . . , N k are asymptotically distributed as independent Poisson random variables.

Transitive subgroups
In the previous section we estimated the probability that G = π, π ′ is transitive. In this section we show that G is almost surely not a transitive subgroup smaller than A n . The proof is easier (modulo known results about primitive groups), and the bounds rather stronger.
The following rather trivial lemma (which was already used implicitly in the previous section) seems worth isolating.
Lemma 4.1. Suppose G acts transitively on a set X, and suppose π 1 , π 2 ∈ G have k 1 and k 2 fixed points in X, respectively. Draw σ ∈ G uniformly at random. Then P(fix(π 1 ) ∩ fix(π σ 2 ) = ∅) k 1 k 2 /|X|. Proof. This is immediate from E| fix(π 1 ) ∩ fix(π σ 2 )| = E| fix(π 1 ) ∩ fix(π 2 ) σ | = k 1 k 2 /|X|. The utility of the lemma is easy to explain. Most maximal subgroups of S n are given explicitly as the stabilizer of a point in some natural action. For each such subgroup M , we need to show that π, π ′ are not simultaneously trapped in a conjugate of M , i.e., do not have a common fixed point in the given action. By the lemma it will suffice to bound the number of fixed points of π and π ′ (with more than a square-root saving).

Imprimitive subgroups. First consider imprimitive transitive subgroups.
To show that π, π ′ are not simultaneously trapped by any such subgroup, we need to show π, π ′ do not simultaneously preserve a partition of Ω into k blocks of size m for some m, k > 1 such that n = mk.
Let X k be the set of all k-(equi)partitions of Ω, i.e., partitions such that |Ω i | = n/k for each i. The order of the cells Ω 1 , . . . , Ω k is not considered significant. We have Note that S n acts transitively on X k , and π, π ′ preserves a k-partition if and only if π and π ′ have a common fixed point in X k . By Lemma 4.1 it suffices to bound | fix X k (π)|. Lemma 4.3. Suppose π ∈ S n has c cycles. Then | fix X k (π)| k c .
Proof. Fixed points in X k correspond to k-partitions (6) preserved by π, i.e., such that for some τ ∈ S k we have Fix τ ∈ S k , and let us count the ordered partitions satisfying (7). For each cycle of π, pick a base point. The position of the base point in the partition {Ω 1 , . . . , Ω k }, together with τ , determines the position of every other point in the cycle. Thus there are at most k choices for how to partition the cycle, and therefore at most k c choices for the partition.
To deduce a bound for | fix X k (π)| we need to (1) sum over all possibilities for τ ∈ S k , and (2) divide by k! because the order of the cells in a partition is not important, so we just get k c again.
We need a stronger bound when k is very large, say when k = n/2 or k = n/3. In this regime we can use the following lemma.  (1) Each j-cycle of π must induce on the partition a cycle of length ℓ = j/d for some d m. Label each cycle of π by this integer ℓ.
(2) Next, organize the cycles of π into piles of cycles of a common label so that in any pile with label ℓ, the sum of the lengths of the cycles is exactly ℓm. Lemma 4.5. Assume that c + c ′ (1 − δ)n for some δ ω(log log n/ log n) (e.g., a constant). Then the probability that π, π ′ is contained in an imprimitive transitive subgroup is bounded by 2 −δn+o(n) .
Proof. By Lemmas 4.1 and 4.3, the probability that π and π ′ share a fixed point in X k is bounded by Using Stirling's approximation we have m! k n! ≍ O(m) k/2 (m/e) n n 1/2 (n/e) n = O(1) k n k/2−1/2 k k/2+n .

Hence (8) is bounded by
This bound is log-convex in k, so its maximum in the range 2 k n/ log n occurs at one of the end points. At k = 2 we get O(2 c+c ′ −n n 1/2 ), and at k ≍ n/ log n we get For k n/ log n we use Lemma 4.4 instead of Lemma 4.3. Let m = n/k. Repeating the same calculation, we find that the probability that π and π ′ share a fixed point is bounded by We obtain a bound for the probability that π, π ′ is imprimitive by summing over k. The result is O(2 c+c ′ −n n 3/2 ) + (log n) O(n) n c+c ′ −n .
If c + c ′ (1 − δ)n (where δ ω(log log n/ log n)) then the first term dominates, and the lemma follows.
Remark 4.6. The lemma is likely not sharp, but improving it would require more careful methods. For example, suppose π and π ′ both have cycle type 2 n/2 , so that c + c ′ = n. As in Lemma 2.1, there is a bijection between such pairs (π, π ′ ) and permutations τ ∈ S n having only even cycles, and π, π ′ preserves a k-partition if and only if τ does. This problem is similar to the one considered by Luczak and Pyber: see [ LP93].

4.2.
Primitive subgroups. Finally we must consider the possibility that π and π ′ get trapped in a primitive subgroup. To some extent we could carry on as we have done for intransitive and imprimitive subgroups, since many families of primitive subgroups of S n are explicitly given as the stabilizer of a point in some action, 4 but at some point we will need to use some deeper knowledge about simple groups. Fortunately, at this point there is a convenient sledgehammer: primitive subgroups are few and small, while every conjugacy class with few cycles is big.
Proof. We have Proof. The probability that a random conjugate of M contains π is the same as the probability that a random conjugate of π is contained in M , so (That |S n : M | is the number of conjugates of M follows from maximality.) Therefore, by the previous lemma, Lemma 4.9. The probability that π, π ′ is contained in a primitive subgroup other than S n or A n is bounded by n c+c ′ + √ n /n!. In particular, if c + c ′ (1 − δ)n then this probability is bounded by n −δn e O(n) .
Proof. Let M be a maximal primitive subgroup other than S n or A n . By Lemma 4.1 again, along with the previous lemma, the probability that π, π ′ are both contained in a conjugate of M is bounded by Now as in Babai [Bab89, Lemma 2.5 and the proof of Theorem 1.4], the sum of |M | over all conjugacy classes of primitive maximal subgroups of S n (other than S n and A n ) is bounded by n √ n . This proves the lemma.
Remark 4.10. There do exist permutations π such that π and a random conjugate are trapped in a common primitive subgroup with positive probability. For example, suppose n = k 2 , and consider S k ≀ S 2 acting on the cartesian square {1, . . . , k} 2 . This gives us a map S k ≀ S 2 → S n whose image is a primitive subgroup M of order 2k! 2 , and different conjugates of M correspond to different labelling maps {1, . . . , k} 2 → {1, . . . , n}. Let π be the element of M which swaps the first two rows, and let π ′ be the element which swaps the third and fourth rows. Then π and π ′ are elements of cycle type 2 k with disjoint supports, and conversely any two elements of cycle type 2 k with disjoint supports are contained in a conjugate of M . Note that two random elements of cycle type 2 k have disjoint supports with probability ∼ e −4 . This may be essentially the only counterexample, however. We formalize this in the following conjecture, which we have so far not been able to prove.
Conjecture 4.11. Let C, C ′ ⊂ S n be fixed nontrivial conjugacy classes, and let π ∈ C and π ′ ∈ C ′ be random. Then almost surely π, π ′ is not contained in any primitive subgroup apart from S n , A n , and any conjugate of S √ n ≀ S 2 or A √ n ≀ S 2 .
In any case, we have now proved under the hypotheses of Theorem 1.1 that G = π, π ′ is almost surely not a transitive subgroup smaller than A n , which completes the proof.

Generators with a given order
In this section we will apply Theorem 1.1 to deduce some results concerning random generation of S n under order constraints. Let ord S n = {ord π : π ∈ S n }. For m ∈ ord S n , we are interested in the probability that two random elements of order m generate at least A n .
We may think of drawing a random π ∈ S n of order m in two stages: first we pick a conjugacy class C of elements of order m with probability proportional to |C|, then we pick π ∈ C uniformly. As a consequence of this and Theorem 1.1, we have the following criteria: (1) Assume almost all elements of order m have o(n 1/2 ) fixed points and o(n) 2-cycles. Then two random elements of order m almost surely generate at least A n .
(2) Assume almost all elements of order m have O(n 1/2 ) fixed points and n/2 − Ω(n) 2-cycles. Then two random elements of order m generate at least A n with probability bounded away from zero. Clearly, the converses in Theorem 1.1 also apply. For instance, if a positive proportion of elements of order m have Ω(n 1/2 ) fixed points, the probability of generating at least A n will be bounded away from 1. Therefore, our business in this section is to understand which conditions on m ensure that a random element of order m has few fixed points and few 2-cycles. This condition is certainly not automatic, as the following examples show.
Example 5.1. The case m = 2 is rather special. A random permutation of order 2 has ∼ n 1/2 fixed points (see [FS09,Proposition IX.19]) so random pairs of elements of order 2 do not generate. In fact, since any two elements of order 2 generate a dihedral group, indeed no two elements of order 2 generate A n .
Example 5.2. Suppose m = p for some prime p ∼ 3n/4. Then any element of order m has Ω(n) fixed points, so random elements of order m almost surely do not generate.
Example 5.3. Similarly, suppose m = 2p for some p ∼ 3n/4. Then all π of order m have one p-cycle and either Ω(n) fixed points or Ω(n) 2-cycles. It is not hard to see that random elements of order m have Θ(n 1/2 ) fixed points, so by Theorem 1.1 random pairs of elements of order m generate with probability bounded away from 0 and from 1.
Example 5.4. There are also examples with much larger m. Let p 1 < · · · < p k be primes, let m = p 1 · · · p k , and let Then any π ∈ S n has one p i -cycle for each i and p 1 − 1 fixed points. If p 1 is large compared to n 1/2 then random pairs of permutations of order m almost surely do not generate.
In each of these examples, the arithmetic of m guarantees that all permutations of order m have either many fixed points or many 2-cycles. As a last resort, one might hope at least for a "zero-one law": perhaps as long as there is at least one permutation of order m with few fixed points and few 2-cycles, then almost all permutations of order m are such. Our last example also dishes this hope.
Example 5.5. Let p and q distinct primes of roughly the same size, p < q, let n = pq + p − 1, and let m = pq. There are just two ways that π ∈ S n can have order m: (1) π might be a pq-cycle. Any such π has p − 1 ∼ n 1/2 fixed points.
(2) π has cycle type p µ q ν for some µ, ν 1. There is some π of this type with no fixed points (by the Frobenius postage stamp problem).
The proportion of elements of the first type is The proportion of elements of the second type is at most Summing over µ, ν adds just another two factors of n, so almost all π of order m are pq-cycles. Therefore the probability that two random elements of order m generate is bounded away from 1.
Having moderated our expectations, we will prove the following positive results. Assume m ∈ ord S n .
(1) If m has a divisor d in the range 3 d o(n 1/2 ), then two random elements of order m almost surely generate.
(2) If m is even and there is at least one π ∈ S n with o(n 1/2 ) fixed points and o(n) 2-cycles, then two random elements of order m almost surely generate.
(3) If m is odd and there is at least one π ∈ S n with O(n 1/2 ) fixed points, then two random elements of order m generate with positive probability. (4) If m > 2 is even, then two random elements of order m generate with positive probability.
The first two of these points are the content of Theorem 1.3; the latter two are the content of Theorem 1.4. 5.1. Theorem 1.3: Almost-sure generation. We will use a simple computation a couple of times: for convenience we isolate the statement.
Lemma 5.6. Let C be a conjugacy class of S n , and let 2 d n. Assume c 1 2kd for some k 1. Define C ′ by replacing kd fixed points by k d-cycles, i.e., c ′ 1 = c 1 − kd, c ′ d = c d + k, and c ′ j = c j for every other j. Then Proof.
To prove the first part of Theorem 1.3 we must show that if m has a small divisor (other than 2) then almost all π of order m have o(n 1/2 ) fixed points and o(n) 2-cycles. This is the content of the following lemma. Proof. Let k be such that n 1/2 / log n kd o(n 1/2 ). We will show that almost all permutations of order m have at most 2kd = o(n 1/2 ) fixed points. If a conjugacy class C is made of elements with c 1 2kd, define C ′ as in the previous lemma. We have |C| |C ′ | n −1/2+o(1) k = o(1).
Therefore we have injectively associated to every conjugacy class of permutations of order m with c 1 2kd some much larger conjugacy class of permutations of order m, so it follows that almost all π ∈ S n of order m have fewer than 2kd = o(n 1/2 ) fixed points. The proof for 2-cycles is the same, starting with k such that n/ log n kd o(n). If c 2 2kd, we define c ′ 2 = c 2 − kd and c ′ d = c d + 2k, and a similar computation concludes the proof.
Assume now m is even. Then we can prove the zero-one law suggested earlier. This will be small unless c 2 k 2 . This means that the number of permutations of order m with at least 4k fixed points is dominated by the number of permutations of order m with more than k 2 2-cycles. Note that the density of such permutations is bounded by 1/(k 2 )!. On the other hand let C 0 be a conjugacy class of elements of order m having o(n 1/2 ) fixed points and o(n) 2-cycles. Write a j for the number of j-cycles. If m has any small odd divisor, then we conclude by Lemma 5.7. Otherwise, the elements of C 0 have o(n) cycles. Therefore |C 0 | n! = 1 a j !j aj 1 (a j j) aj n −o(n) .
Therefore we can choose k = o(n 1/2 ) so that 1/(k 2 )! = o(|C 0 |/n!). It follows that C 0 is much bigger than the set of all permutations with more than k 2 2-cycles, so again we find that almost all π ∈ S n have at most 4k = o(n 1/2 ) fixed points and at most k 2 = o(n) 2-cycles.
This completes the proof of Theorem 1.3. 5.2. Theorem 1.4: Positive-probability generation. Now we investigate the conditions under which two random elements of order m generate with positive probability. We are able to give a complete characterization of this property.
Lemma 5.9. Let m ∈ ord S n .
(1) Assume m is odd, and assume there exists a permutation of order m having O(n 1/2 ) fixed points. Then almost all permutations of order m have the same property.
(1) Let d denote the smallest nontrivial divisor of m. If d = o(n 1/2 ), we conclude by Lemma 5.7. Assume then d = Ω(n 1/2 ). As in the proof of Lemma 5.8, the density of permutations having at least bn 1/2 fixed points (for some constant b) is at most 1/(bn 1/2 )!. Moreover, if C 0 is a conjugacy class of elements of order m having O(n 1/2 ) fixed points, then the elements of C 0 have O(n 1/2 ) cycles, and |C 0 | n! n −O(n 1/2 ) .
Thus if b is a sufficiently large constant then this dominates, so indeed almost all elements of order m have O(n 1/2 ) fixed points.
(2) Let d denote the smallest divisor of m larger than 2. Note that d is either 4 or prime. As above, we may assume d = Ω(n 1/2 ). The argument of Lemma 5.7 (with k = 1) shows that almost all elements of order m have at most 2d 2-cycles. On the other hand any element of order m must have a cycle of length at least d. Thus almost all permutations have at most min{2d, (n − d)/2} 2-cycles. This is at most 2n/5 = n/2 − Ω(n), so the statement on 2-cycles is proved.
This shows that almost all elements of S n of order m have at most 4n 1/2 fixed points, and the proof is concluded.
Theorem 1.4 follows immediately from this and Theorem 1.1.