3

Could someone suggest a piece of code that will produce the subgroup permutability graph of a finite group? There is more than one way this graph can be defined. The one I have in mind has the non-normal subgroups of the group as vertices and two vertices are joined by an edge if the corresponding subgroups permute.

the_fox
  • 5,805
  • 1
    Perhaps this may be implemented using ConjugacyClassesSubgroups and functions from PERMUT package. – Olexandr Konovalov Feb 15 '15 at 23:42
  • By the way, how does one obtain the full set of nonnormal subgroups of a group (not just reps)? – the_fox Feb 16 '15 at 12:49
  • 1
    By iterating over each conjugacy class of subgroups, containing more than 1 subgroup. A one-liner would be cc:=Concatenation(List(Filtered(ConjugacyClassesSubgroups(G),c->Size(c)>1),AsList)) (though you'd probably like to unroll it in the code). – Olexandr Konovalov Feb 16 '15 at 14:20
  • I see a strange symbol in AsList in my previous comment but I can't get rid of it. Strange :( Certainly it's not a part of the GAP syntax. – Olexandr Konovalov Feb 16 '15 at 14:23
  • So, for example:

    G:=SmallGroup(81,9);; cc:=Concatenation(List(Filtered(ConjugacyClassesSubgroups(G),c->Size(c)>1),AsLi‌​st)) for H in cc do; for K in cc do; if Size(ClosureGroup(H,K))Size(Intersection(H,K))=Size(H)Size(K) then … fi; od; od;

    What would you recommend to ask GAP after "then" so as to print, say, the relative positions of H,K in the list?

    – the_fox Feb 16 '15 at 15:18
  • Yes, knowing positions will tell you which vertices are connected. You may better use for i in [1..Length(cc)-1] do for j in [i+1..Length(cc)] since you don't want to check the same pair twice. – Olexandr Konovalov Feb 16 '15 at 16:14
  • Also, are you sure that it suffices to test the equality for group orders, not that ClosureGroup(H,K)=ClosureGroup(K,H) ? – Olexandr Konovalov Feb 16 '15 at 16:15
  • Yes, I think so. Because $H$ permutes with $K$ if and only if $HK$, which is contained in $\langle H, K \rangle$, is a subgroup. – the_fox Feb 17 '15 at 12:59
  • I am still not clear on how to ask GAP to display the position of i or j in the list.

    G:=SmallGroup(81,9);; cc:=Concatenation(List(Filtered(ConjugacyClassesSubgroups(G),c->Size(c)>1),AsLi‌‌​​st)) for i in [1..Length(cc)-1] do; for j in [i+1..Length(cc)] do; if Size(ClosureGroup(i,j))Size(Intersection(i,j))=Size(i)Size(j) then … fi; od; od; What should I put after "then"?

    – the_fox Feb 17 '15 at 13:02
  • Position(list,elt) will return a position (or fail) but it will be an overhead as each time it will look up in the list from the beginning. However, here i and j are already positions! You have only to write Size(cc[i]) instead of Size(i). After then you may of course print i and j but I would suggest to create a zero matrix of the appropriate dimension and then set its $(i,j)$ and $(j,i)$ positions to $1$ if the condition holds. Then you will have an adjacency matrix for the graph. – Olexandr Konovalov Feb 17 '15 at 14:01
  • Then, having adjacency matrix A, you may create a graph with the GRAPE package with Graph( G, [1..n], OnPoints, function(x,y) return A[x][y]=1; end, true ); - see here. – Olexandr Konovalov Feb 17 '15 at 14:05
  • Aha, I've found out that checking the orders is enough: see the manual for ArePermutableSubgroups from the PERMUT package. I do really advise to use ArePermutableSubgroups because the manual claims that it has shortcuts for special cases in which one of a subgroups is a subgroup in the other or both are permutable in a common supergroup. – Olexandr Konovalov Feb 17 '15 at 14:14
  • ArePermutableSubgroups also says that its performance depends strongly on the existence of good algorithms to compute the intersection of two subgroups and, of course, the order of a subgroup - there is a GAP package Ferret by @ChrisJefferson which among other functionality improves intersecting groups performance for permutation groups. One could compare the performance of your code for pc groups (as SmallGroup returns) vs permutation groups with/without Ferret (Ferret is in active development and not yet redistributed with GAP). – Olexandr Konovalov Feb 17 '15 at 14:21
  • Thanks! I'd be happy to use commands from the PERMUT package, but my school does not have the latest GAP release and I can't, for the life of me, figure out how to install GAP on my mac. By the way, if you care to put your comments together in an answer, I'll be happy to accept. – the_fox Feb 17 '15 at 14:38
  • Cheers, I will put it all together. Interesting discussion, indeed! For questions on GAP installation, you're welcome to ask GAP Support. Briefly, if you're using GAP on school's Linux machine and don't have access to the directory of the GAP installation, you can install a package outside the GAP main directory by unpacking it inside a directory ~/.gap/pkg/. It's worth efforts to install in on Mac, see here and here for some advise. – Olexandr Konovalov Feb 17 '15 at 14:52

2 Answers2

4

First, let's pick up some group, for example this one, which is a semidirect product of $C_9 \times C_3$ and $C_3$:

gap> G:=SmallGroup(81,9);
<pc group of size 81 with 4 generators>
gap> StructureDescription(G);
"(C9 x C3) : C3"

The next command calculates the list of all its non-normal subgroups by iterating over each conjugacy class of subgroups, containing more than 1 subgroup:

gap> cc:=Concatenation( List( Filtered( ConjugacyClassesSubgroups(G),
>                             c -> Size(c)>1), AsList ) )
[ Group([ f3 ]), Group([ f3*f4 ]), Group([ f3*f4^2 ]), Group([ f1 ]), ...
... some more lines omitted ...
... Group([ f1*f2^2*f3^2, f4 ]), Group([ f1*f2^2*f3, f4 ]) ]
gap> Length(cc);
42

Remarkably, it has 42 of them, what makes this group an excellent example :-)

The next function constructs the adjacency matrix for the permutability graph. It first creates the identity matrix (obviously, each subgroup is permutable with itself, so we have $1$s on the main diagonal and do not have to check this), and then populates the rest of the entries:

PermutabilityMatrix:=function(cc)
local A, i, j;
A := IdentityMat(Length(cc));
for i in [1..Length(cc)-1] do
  for j in [i+1..Length(cc)] do 
    if Size(ClosureGroup(cc[i],cc[j]))*Size(Intersection(cc[i],cc[j])) = 
       Size(cc[i])*Size(cc[j]) then 
      A[i][j]:=1;
      A[j][i]:=1;
    fi;
  od; 
od;
return A;
end;

One could do even better with the Permut package:

LoadPackage("permut");
PermutabilityMatrixWithPERMUT:=function(cc)
local A, i, j;
A := IdentityMat(Length(cc));
for i in [1..Length(cc)-1] do
  for j in [i+1..Length(cc)] do 
    if ArePermutableSubgroups(cc[i],cc[j]) then
      A[i][j]:=1;
      A[j][i]:=1;
    fi;
  od; 
od;
return A;
end;

which have some shortcuts for partial cases. Just to check that both functions agree about the result:

gap> A:=PermutabilityMatrix(cc);;
gap> B:=PermutabilityMatrixWithPERMUT(cc);;
gap> A=B;
true

Now you may load the GRAPE package and construct GRAPE graph given by this adjacency matrix with the commmands:

LoadPackage("grape");
g:=Graph( Group(()), [1..Length(cc)], OnPoints, function(x,y) return A[x][y]=1;end,true);

This allows you to explore properties of this graph, for example:

gap> Diameter(g);
4
gap> IsConnectedGraph(g);
true

One could further call AssignVertexNames(g,cc); to label vertices of the graph with subgroups.


Update:. Trying to understand and reproduce example from page 6 of the paper you've mentioned, I've made some quickly-written code, which may be useful to you for further experiments. First, this function returns a list of all non-normal subgroups:

AllNonNormalSubgroups:= function(G)
local c;
return Concatenation( List( Filtered( ConjugacyClassesSubgroups(G),
                            c -> Size(c)>1), AsList ) );
end;

Remember that their ordering is not guaranteed to be the same for different instances of $G$ as probabilistic methods may be involved.

Next, GAP operates with binary relations - for example, finds a transitive closure. This function looks similar to adjacency matrix, but it returns an input for BinaryRelationOnPoints:

PermutabilityRelation:=function(cc)
local r, i, j;
r := List( [ 1 .. Length(cc) ], i -> [i]);
for i in [1..Length(cc)-1] do
  for j in [i+1..Length(cc)] do 
    if Size(ClosureGroup(cc[i],cc[j]))*Size(Intersection(cc[i],cc[j])) = 
       Size(cc[i])*Size(cc[j]) then 
      AddSet(r[i],j);
      AddSet(r[j],i);
    fi;
  od; 
od;
return r;
end;

In the following example we will show that $C_3 \times S_3$ is irreducible with respect to permutability (as defined in the paper) since the transitive closure of the permutability relation has one equivalence class:

gap> G:=DirectProduct(CyclicGroup(3),SymmetricGroup(3));
gap> nns := AllNonNormalSubgroups(G);;
gap> pr := PermutabilityRelation(nns);
[ [ 1, 6 ], [ 2, 7 ], [ 3, 8 ], [ 4, 5, 6, 7, 8 ], [ 4, 5, 6, 7, 8 ], 
  [ 1, 4, 5, 6 ], [ 2, 4, 5, 7 ], [ 3, 4, 5, 8 ] ]
gap> R  := BinaryRelationOnPoints( pr );
Binary Relation on 8 points
gap> T  := TransitiveClosureBinaryRelation ( R );
Binary Relation on 8 points
gap> IsEquivalenceRelation( T );
true
gap> EquivalenceClasses( T );
[ {1} ]

The following function takes a binary relation and returns a GRAPE graph corresponding to it:

LoadPackage("grape");
PermutabilityGraphByRelation:=function( rel )
local n;
n := DegreeOfBinaryRelation(rel);
return Graph( Group(()), [1..n], OnPoints, 
       function(x,y) return y in Successors(rel)[x]; end, true );
end;

Now we may explore graphs given by R and T above:

gap> PermutabilityGraphByRelation( R );;
gap> Diameter(last);
4
gap> PermutabilityGraphByRelation( T );;
gap> Diameter(last);
1

On the other hand, for $D_{32}$ we have two classes:

gap> G:=DihedralGroup(32);
<pc group of size 32 with 5 generators>
gap> nns := AllNonNormalSubgroups(G);;
gap> pr := PermutabilityRelation(nns);;
gap> R  := BinaryRelationOnPoints( pr );;
gap> T  := TransitiveClosureBinaryRelation ( R );;
gap> EquivalenceClasses( T );
[ {1}, {9} ]

GRAPE can construct graph as above, but it can find connected components only if the graph is simple. So if we want to find the diameter of each of the two connected components, we have to construct two graphs first, and then find their diameters. Luckily, GRAPE already has functionality for that via InducedSubgraph:

gap> pg:=PermutabilityGraphByRelation(R);;
gap> erp:=EquivalenceRelationPartition(T);
[ [ 1, 2, 3, 4, 5, 6, 7, 8, 17, 18, 19, 20, 25, 26 ], 
  [ 9, 10, 11, 12, 13, 14, 15, 16, 21, 22, 23, 24, 27, 28 ] ]
gap> List(erp, w -> Diameter(InducedSubgraph(pg,w)));
[ 2, 2 ]

Thus, both of the connected components for permutability graph has the diameter 2, so $\Delta(G_{32})=2$.


Update (communicated to me by Leonard Soicher)

The code posted above may be improved to use the full power of GRAPE package to associate a group acting as a group of automorphisms of the graph we are constructing, as illustrated below:

gap> LoadPackage("grape");
-----------------------------------------------------------------------------
Loading  GRAPE 4.6.1 (GRaph Algorithms using PErmutation groups)
by Leonard H. Soicher (http://www.maths.qmul.ac.uk/~leonard/).
Homepage: http://www.maths.qmul.ac.uk/~leonard/grape/
-----------------------------------------------------------------------------
true
gap> G:=SmallGroup(81,9);; # for example
gap> nonnormalsubgroups:=Concatenation( List( Filtered( ConjugacyClassesSubgroups(G),
>                                             c -> Size(c)>1), AsList ) );;
gap> permutable := function(A,B)
> return Size(ClosureGroup(A,B))*Size(Intersection(A,B)) = Size(A)*Size(B);
> end;
function( A, B ) ... end

Now nonnormalsubgroups is a $G$-invariant list, and permutable defines a $G$-invariant binary relation on nonnormalsubgroups (for the conjugation action of $G$ on its subgroups). Hence the required GRAPE graph can be computed as:

gap> gamma:=Graph(G,nonnormalsubgroups,OnPoints,permutable,true);;
gap> Diameter(gamma);
4

If you want this graph with the loops removed so as to obtain a simple graph, you can do:

gap> delta:=Graph(G,nonnormalsubgroups,OnPoints,
> function(A,B) return A<>B and permutable(A,B); end,true);;
gap> Diameter(delta);
4
gap> Girth(delta);
3
Olexandr Konovalov
  • 7,002
  • 2
  • 34
  • 72
  • Thanks! Interestingly, the diameter of the permutability graph is never more than 4 for soluble groups, so this example is one where the upper bound is attained. I don't suppose GAP has (visual) graph drawing capabilities? – the_fox Feb 18 '15 at 13:26
  • 1
    No, but you may autogenerate input file for some graph visualising tools. Also, look at SgpViz package, perhaps you may be able to reuse some of its functionality. – Olexandr Konovalov Feb 18 '15 at 13:31
  • By the way, just in case you ever want to see a drawing of this graph (or some other graph), Mathematica can automatically do this for you with the command AdjacencyGraph[A], where A is the adjacency matrix produced by your code :) – the_fox Feb 19 '15 at 14:41
  • 1
    Thanks :) You may also try Sage, see here – Olexandr Konovalov Feb 19 '15 at 14:57
  • Something seems to be wrong. I get 8 vertices when I enter the group $G:= C_3 \times S_3$, but there should be only 6... – the_fox Feb 21 '15 at 17:16
  • But G:=DirectProduct(CyclicGroup(3),SymmetricGroup(3)); and then Filtered(AllSubgroups(G),g -> not IsNormal(G,g)); gives a list of length 8 ... – Olexandr Konovalov Feb 21 '15 at 18:15
  • I need only representatives for the conjugacy classes of subgroups. I assumed that this is the default when calling ConjugacyClassesSubgroups in the definition of cc. – the_fox Feb 21 '15 at 18:28
  • Ah, right. I meant taking the whole class by writing "iterating over each conjugacy class of subgroups". Then it's easy to fix the code in my answer (ah, then we will no longer have 42, what a shame!). I will fix it now, and I suggest that you could fix the formulation in the question, too. – Olexandr Konovalov Feb 21 '15 at 19:25
  • But now for $C_3 \times S_3$ Filtered(ConjugacyClassesSubgroups(G), c -> not IsNormal(G,Representative(c))); return list of length 3, while you're expecting 6 ??? – Olexandr Konovalov Feb 21 '15 at 19:38
  • I quickly searched for papers on permutability graphs and discovered three papers with three different definitions, and yours seem to be the fourth one. They all seem to agree about permutability of subgroups, but have different approaches as to which subgroups should be taken as vertices. Do you have a reference to the definition that you are using? – Olexandr Konovalov Feb 21 '15 at 19:44
  • 1
    Yes. http://link.springer.com/article/10.1007%2FBF01759356 – the_fox Feb 21 '15 at 19:47
  • I am a little confused myself. I am trying to reconcile with the examples given in the sixth page. – the_fox Feb 21 '15 at 19:49
  • Thanks. On which page they define the graph? – Olexandr Konovalov Feb 21 '15 at 19:50
  • The first one, although it's not well-written. – the_fox Feb 21 '15 at 19:51
  • I have been a little hasty to suggest representatives. Sorry for this back and forth. My initial understanding for this graph was the one given in the original question, but that didn't agree with what the authors deduce for $S_3 \times C_3$ and I only discovered that later. – the_fox Feb 21 '15 at 20:06
  • I am going to start a bounty and award it to your answer, once necessary time lapses, because you have already devoted too much time on this question. – the_fox Feb 21 '15 at 20:15
  • Thanks, it's very generous :) No problem with changing the definition - it's easy to revert the edit with the history of edits, and because PermutabilityMatrix is designed to take any list of subgroups, it only matters how do you construct its argument. – Olexandr Konovalov Feb 21 '15 at 20:42
  • I haven't found yet where $6$ appears for $C_3 \times S_3$, but at least the diameter of the permutability graph on 8 vertices constructed as above is reported by GRAPE package as 4, while page 6 says $\Delta(G)=1$. It occurs to me that $\Delta(G)$ is not the graph diameter, but (as page 1 says), "the maximum among the diameters of the classes" - we have to understand now what does that mean. – Olexandr Konovalov Feb 21 '15 at 20:48
  • It irritates me beyond belief when people don't write clearly when it comes to mathematics. When they don't write clearly no matter what the topic is, actually... In order to agree with $\Delta(G)=1$ that the authors give there, it occurred to me that perhaps what they are aiming for is a graph with three components, each with two vertices joined by an edge. If you draw the graph originally obtained with 8 vertices by using AdjacencyGraph[] in Mathematica, you get a certain graph. Removing the two vertices in the middle of that graph (spring electrical style) would yield the 3-component graph. – the_fox Feb 21 '15 at 21:07
  • 1
  • I've got $\Delta(G)=1$ for $C_3 \times S3$. I will publish now an update to the question, as it involves some more GAP code. – Olexandr Konovalov Feb 21 '15 at 22:01
  • Oh, no. I've only got that it is irreducible. Let's move to chat. – Olexandr Konovalov Feb 21 '15 at 22:06
2

I think there can be problems if you define the graph with conjugacy classes of non-normal subgroups instead of considering all subgroups. For instance, take the semidirect product $G=[V]S$ of the symmetric group of degree $3$, $S=\langle a,b\mid a^3=b^2=1\rangle $ say, by a faithful and irreducible module $V=\langle c,d\rangle$ over the field of $7$ elements. This is

    SmallGroup(294, 7)

in GAP. Then $\langle b\rangle$ permutes with $\langle a\rangle$, but $\langle b\rangle$ does not permute with $\langle a^c\rangle$. Therefore I think that we will need all non-normal subgroups in the construction of the graph, as Alexander Konovalov says, not only the conjugacy classes of such subgroups.

  • Yes, that's what I had originally asked, then foolishly asked another thing so as to reconcile with a result mentioned in a paper. Almost immediately I realized that taking representatives as vertices doesn't make sense, but I forgot to switch back to the original version... – the_fox Feb 23 '15 at 17:55
  • Welcome to MSE - glad to see you here! Now with 20+ points you may also take part in this chat we created to continue the discussion on this question. You can also leave comments on your answer, and with 50+ points you will be able to leave comments everywhere. BTW, Permut package is also mentioned in this question. – Olexandr Konovalov Feb 23 '15 at 20:49
  • And thank you for the answer! We still can't reproduce the result from page 6 of this paper though - GAP calculation tells us that $\Delta(C_3 x S_3)=4$, and we don't know why - please see the chat – Olexandr Konovalov Feb 23 '15 at 20:52