4

Suppose I have two (random) permutations of $[n].$ We know (Dixon, Babai) that they almost surely generate $A_n$ or $S_n$ (if both even, then $A_n,$ otherwise $S_n.$) But the question is: what is the best (theoretical or practical) algorithm to check that the generated subgroup really is one of those big groups?

Igor Rivin
  • 26,372
  • 1
    Since every finite group is a subgroup of a finite symmetric group, and every non-abelian finite simple group can be generated by two elements (https://link.springer.com/chapter/10.1007/978-94-011-3382-1_8) it could be quite tricky to exclude smaller subgroups - two-generator groups can be more complex than might be thought at first glance. Clearly if the two elements both fix the same point we have a trivial case. – Mark Bennet Mar 23 '21 at 21:09
  • 1
    huh. in Dixon 1992, he has all sorts of computing stuff, statistics, but seems to make no mention of how he verified the generated group... – Will Jagy Mar 23 '21 at 21:09
  • This question is so fundamental is computational group theory, that the two groups $A_n$ and $S_n$ (in their natural action) are usually called the "giants", and then the question becomes how to recognise the giants. This may help in finding references, see for example https://arxiv.org/abs/1905.09431 For an older reference, it is Section 10.2.4 in Seress "Permutation Group Algorithms", 2002. – verret Mar 23 '21 at 21:54
  • 1
    I'm not an expert, but my understanding is the following. First, we check whether the group is transitive, which is easy, then if it is imprimitive, which is not much harder. At this point, we know the group is primitive. Finally, we try looking for elements with particular cycle type which will guarantee it's $A_n$ or $S_n$. This is usually done probabilistically. If you want a non-random algorithm, I think you use the fact that the primitive maximals are known and check we are not in any of those. Somebody else with more knowledge can probably add some more details or better references. – verret Mar 23 '21 at 21:54
  • @verret Thanks! I consulted Seress, but could not really make head or tail of it... – Igor Rivin Mar 23 '21 at 22:03
  • Sketch of Seress: you first check if the group is transitive (this is easy). Suppose it is. Corollary 10.2.2 tells you that if your group contains an element with a $p$-cycle, with $p$ within certain bounds, (call this element a witness) then the group is a giant. There are algorithms to produce "random" elements (this is another question on its own), so you just compute random elements looking for a witness. If you find one, you have a giant. If you don't find one for a long time, then you know the chances that it is a giant are very low. – verret Mar 23 '21 at 23:38
  • This is where Lemma 10.2.3 comes in, it gives bound on the proportion of witnesses, so it gives you bounds on the chance that you don't have a giant after failing to find a witness for a long time. – verret Mar 23 '21 at 23:38
  • From the practical point of view, GAP has several methods implemented which are usually very efficient. See IsSymmetricGroup(G) https://www.gap-system.org/Manuals/doc/ref/chap43.html and also https://mathoverflow.net/questions/286316/recognition-of-symmetric-groups-in-gap – thibo Mar 24 '21 at 08:58
  • 1
    @thibo $\mathtt{ IsSymmetricGroup}$ in GAP is using the Monte-Carlo method described in my answer. – Derek Holt Mar 24 '21 at 16:13

1 Answers1

4

The algorithm described in Seress' book (and also in Section 4.2, page 81 of "Handbook of Computational Group Theory" by Holt, Eick and O'Brien) is one of the best examples of a Monte-Carlo algorithm.

It is very fast (almost linear time), and its output is either "yes, the group generated is definitely $A_n$ or $S_n$" or "the group is almost certainly not $A_n$ or $S_n$. It is extremely simple to describe and program, although of course it has to be justified theoretically.

It can be given an error probability $\epsilon$ as input, which means that the probability of a false negative is less than $\epsilon$.

It works as follows. Let $G = \langle \alpha,\beta \rangle$ be the input group. First check that $G$ is transitive (that's easy) - if not, answer no.

Now choose a collection of $N(n,\epsilon)$ (pseudo)random elements $g \in G$, where $N(n,\epsilon)$ is a function to be defined below. (There are good ways of choosing random elements, which I won't go into here - the Product Replacement Algorithm is used in practice.) For each $g$ compute all powers of $g$ that have prime order $p$. If one of these is a $p$-cycle with $n/2 < p < n-2$ then, by a theorem of Jordan, $G = A_n$ or $S_n$, and so we return the answer yes. If none of them have this property then return the answer probably no.

The probability estimate for the false negative is based on a result (Lemma 10.2.3 of Seress' book) that the proportion of elements of $A_n$ and $S_n$ that power to a $p$-cycle with $n/2 < p < n-2$ is at least $$\sum_{p\ {\rm prime},\ n/2<p<n-2}\frac{1}{p},$$ which is approximately $\log(2)/\log(n)$.

Choose $c(n)$ such that this proportion is at least $c(n)\log(2)/\log(n)$ (for example, we put $c(n)=0.34$ for $8 \le n \le 16$ and $c(n) = 0.57$ for $n>16$) and then let $d(n) := c(n)\log(2)/\log(n)$. Then, setting $N(n,\epsilon) = -\log(\epsilon)/d(n)$ gives the required error probability.

To be precise, if the group really was $A_n$ or $S_n$, then the probability of choosing $N(n,\epsilon)$ random elements without finding one that powers to a $p$-cycle with $n/2<p<n-2$ is less than $\epsilon$.

Theoretically, the weakest part of the method is the difficulty of choosing genuinely random elements, but that is not a serious obstacle in practice, because Product Replacement works very well when the group is $A_n$ or $S_n$.

I should perhaps add that the standard Schreier-Sims algorithm for computing the order of $G$ runs in polynomial-time (and it has various refinements that make it run faster in practice) , so you can use that to verify a negative answer if you want to.

Derek Holt
  • 96,726