3

My question is fairly simple.

Given a finite group $G$ and a prime $p$ dividing the order of $G$, I'd like to ask $\mathtt{GAP}$ to provide two lists: one with every subgroup of $G$ that is a $p$-group, and one with every $p$-subgroup lying in a single Sylow.

Ideas?

P.S. I would appreciate an answer in the form of a function accepting two arguments: $G$ and $p$.

the_fox
  • 5,805
  • How large are the groups you're dealing with? – Olexandr Konovalov Jul 21 '15 at 15:48
  • 1
    The use of AllSubgroups, as @Orat suggests below, has a big overhead since it really returns a list of ALL subgroups, and therefore is suitable only for toy examples. For larger groups, one should think in terms of conjugacy classes of subgroups and/or Sylow $p$-subgroups. E.g. you may calculate conjugacy classes of subgroups and then work only with those whose representatives are $p$-groups for some $p$. If you are interested only in a fixed $p$, then compute Sylow $p$-subgroup for this $p$, and then look at its subgroups, and at subgroups of its conjugates. – Olexandr Konovalov Jul 21 '15 at 20:42
  • P.S. what do you mean by "and one with every p-subgroup lying in a single Sylow"? – Olexandr Konovalov Jul 22 '15 at 19:38

2 Answers2

4

While Orat's solution in principle works, it is very inefficient, and I wouldn't want to give it as an example to my students. Instead, let me try to give a more efficient solution, which demonstrates that for computational algebra, you really should know and use both good algorithms, and powerful theorems.

AllPSubgroups := function(G, p)
    local S, c, result;
    S := SylowSubgroup(G, p);
    result := [];
    for c in ConjugacyClassesSubgroups(S) do
        c := ConjugacyClassSubgroups(G, Representative(c));
        Append(result, AsList(c));
    od;
    return Set(result);
end;

For example, on my laptop, for $PSL(3,3)$, this code take 0.34 seconds, while Orat's code takes 8.3 seconds.

The key idea is to exploit the Sylow theorems: Every $p$-subgroup is contained in a Sylow subgroup. Equivalently, if we take a fixed Sylow subgroup $S$, then every $p$-subgroup is conjugate to a subgroup of $S$.

Thus the above code first determines all subgroups of $S$, up to conjugacy. It then takes a representative of each such conjugacy class, and takes all conjugates of that in the original group. Note that we may see some $G$-conjugacy classes twice, since two subgroup $A$, $B$ of $S$ may be conjugate in $G$, but not conjugate in $S$. Hence we invoke Set on the result before returning it.

One can do even better with some further tricks, if one really wants to. But in reality, for most questions one wants to answer, one would not optimize this code, but rather try to modify the question so that it e.g. suffices to know the conjugacy classes of $p$-subgroups, instead of explicitly enumerating the all. E.g. the number of 2-subgroups of $PSL(3,5)$ is 82926, but a Sylow 2-subgroup only has 22 conjugacy classes of subgroups; thus $PSL(3,5)$ has at most 22 conjugacy classes of 2-subgroups. It's much easier to answer questions about these 22 classes than about 82926 groups.

Max Horn
  • 1,832
3

For given a group $G$ and a prime $p$, the following would give a solution to your request.

AllPSubgroups := function(G, p)
 return Filtered(AllSubgroups(G), S -> S = SylowSubgroup(S, p));
end;

For given Sylow $p$-subgroup, AllSubgroups would satisfy your request.

Orat
  • 4,065