# Ordering finite groups by sum of order of elements

Given two finite groups $$G, H$$, we are going to say that $$G<_oH$$ if either

a. $$|G|<|H|$$

or

b. $$|G|=|H|$$ and $$\displaystyle\sum_{g\in G} o(g)<\sum_{h\in H} o(h)$$,

where $$o(g)$$ denotes the order of the element $$g$$ (has this ordering a name?).

What is the smallest example (in this ordering) of a pair of nonisomorphic groups such that $$G$$ and $$H$$ are incomparable, i.e., such that they have same cardinal and same sum of orders of elements?

• Interesting question. Can you edit to show the best bound you have so far? – Ethan Bolker Sep 27 '18 at 23:44
• @EthanBolker I don't have any computations yet. The thing is, I tend to think about "the smallest possible" group in some contexts, and I don't actually know if there is some simple "arithmetical" total ordering on finite groups in the sense of my question. Tomorrow I give a conference in which the concept of "smallest" group will have a minor role (in an informal way), and I've just thought that I cannot define the ordering, except if the one above does it (which I doubt). Of course, I can go with equivalence classes, but the doubt is now planted :) – Jose Brox Sep 27 '18 at 23:54

Feed the following code to Magma(http://magma.maths.usyd.edu.au/calc/):

for grouporder in [1..24] do
printf "Checking sum of order for groups or order %o:", grouporder;
numgroup := NumberOfSmallGroups(grouporder);

sset := [];
for i in [1..numgroup] do
sumorder := 0;
G := SmallGroup(grouporder,i);
for j in G do
sumorder := sumorder + Order(j);
end for;
Append(~sset, sumorder);
end for;

sset;
printf "\n";
end for;


You can see that there are two groups with "signature" $$(16,47)$$. Much thanks to Travis for pointing it out. Two of them are non-abelian; they have GAP id $$(16,3)$$ and $$(16,13)$$. Please refer the groupprop page for the description. The third is $$\mathbb Z/4\mathbb Z \times (\mathbb Z/2\mathbb Z)^2$$. All have 1 element of order 1, 7 elements of order 2, and 8 elements of order 4.

Also, there are three groups with "signature" $$(16,55)$$.

The groups are the following:

$$G_1 = (\mathbb Z/4\mathbb Z)^2$$; $$G_2 = \langle a, b \ | \ a^4 = b^4 = 1, ba = ab^3\rangle$$ (the semi-direct product of two copies of $$\mathbb Z/4\mathbb Z$$), $$G_3 = Q \times \mathbb Z/2\mathbb Z$$, where $$Q$$ is the quaternion group. All have 1 element of order 1, 3 elements of order 2, and 12 elements of order 4.

Edit: This is copied from Travis' comment below. There are two groups of signature $$(16,87)$$ as well. One of them is the abelian group $$\mathbb Z/8\mathbb Z \times \mathbb Z/2\mathbb Z$$, and the other is the non-abelian group with GAP ID $$(16, 6)$$ or is also called $$M_4(2)$$. They both have 1, 3, 4, and 8 elements of order 1, 2, 4, and 8, respectively.

• There are also three groups of order $16$ with order sum $47$, and in particular they are smaller with respect to the partial order $<_o$ than the groups mentioned here. – Travis Sep 28 '18 at 0:49
• You're right. I did not see it as I skipped the sorting add looked at it by myself. – Hw Chu Sep 28 '18 at 0:50
• I will accept this question because it includes the particular groups involved. Thanks! – Jose Brox Sep 28 '18 at 1:31
• For completeness, let me point out that there are also two groups with signature $(16, 87)$, $\Bbb Z_8 \times \Bbb Z_2$ and the group with GAP ID GAP, which is sometimes denoted $M_4(2)$. Both have 3 elements of order $2$, 4 of order $4$, and eight of order $8$. – Travis Sep 28 '18 at 13:21
• Thanks for the remark. I added it to my post, if you do not mind. – Hw Chu Sep 28 '18 at 13:27

The following Maple function (code here requires the Maple package GroupTheory) takes as argument a group and returns the sum of the orders of its elements:

sumOfOrders := G -> add(u, u in map(PermOrder, convert(Elements(G), list), G));


This function takes as argument a positive integer $$n$$ and returns the multiset of sums of orders of elements of groups of order $$n$$:

sumOfOrdersList := n -> sort(map(sumOfOrders, AllSmallGroups(n)));


Checking the lowest orders manually we find that groups incomparable in your sense occur first in order 16: Executing sumOfOrdersList(16) shows there are three groups with sum $$47$$, three with sum $$55$$ and two with $$87$$.

• Thank you also for your contributions! – Jose Brox Sep 28 '18 at 15:11
• You're welcome, I'm glad you found it useful. NB that there are other invariants, too, some rather more natural than the sum of orders of elements, that can be used to give partial orders on (isomorphism classes of) groups. – Travis Sep 29 '18 at 1:53
• I'm still interested in this subject. Do you know of some complete system of invariants for finite groups? – Jose Brox May 1 at 10:53

To give an answer which uses open source software - one could do this in GAP.

First, the GAP code based on the one from the answer by @Travis. It looks quite similar.

gap> sumOfOrders := G -> Sum(List(G,Order));
function( G ) ... end
gap> sumOfOrdersList := n -> SortedList(List(AllSmallGroups(n),sumOfOrders));
function( n ) ... end
gap> List([1..16],sumOfOrdersList);
[ [ 1 ], [ 3 ], [ 7 ], [ 7, 11 ], [ 21 ], [ 13, 21 ], [ 43 ],
[ 15, 19, 23, 27, 43 ], [ 25, 61 ], [ 31, 63 ], [ 111 ],
[ 31, 33, 45, 49, 77 ], [ 157 ], [ 57, 129 ], [ 147 ],
[ 31, 39, 47, 47, 47, 55, 55, 55, 59, 67, 75, 87, 87, 171 ] ]


You can see that the last list contains 47 three times. Now let's find those three groups:

gap> l:=AllSmallGroups(16,g->sumOfOrders(g)=47);
[ <pc group of size 16 with 4 generators>,
<pc group of size 16 with 4 generators>,
<pc group of size 16 with 4 generators> ]


and get their IDs:

gap> List(l,IdGroup);
[ [ 16, 3 ], [ 16, 10 ], [ 16, 13 ] ]


Some notion about their structure can be obtained by StructureDescription (which however does not define the group up to isomorphism - see here):

gap> List(l,StructureDescription);
[ "(C4 x C2) : C2", "C4 x C2 x C2", "(C4 x C2) : C2" ]


If I would be less lucky and did not manage to find an example with such quick exploration, I would likely write some code for more systematic search, which would look like the code below, following the guidelines from "Small groups search" in the GAP Software Carpentry lesson:

TestOneOrder:=function(n)
# find the smallest example among the groups of order n
local s,i,m,d,x;
# Calculate lists of sums of element orders.
# Avoid using AllSmallGroups(n) which potentially may be very large
s := List([1..NrSmallGroups(n)],i->Sum(List(SmallGroup(n,i),Order)));
if Length(Set(s))=NrSmallGroups(n) then
# Sum of element orders uniquely defines each group
return fail;
else
# There are duplicates - find them first
d := Filtered( Collected(s), x -> x[2] > 1 );
# Find the minimal possible value of the sum of element orders
m := Minimum( List( d, x-> x[1] ) );
# Find positions of m in the list
# Return the list of group IDs
return List( Positions(s,m), x -> [n,x] );
fi;
end;

FindSmallestPair:=function(n)
# check all groups of order up to n
local i, res;
for i in [1..n] do
# \r at the end of the print returns to the beginning of the line
Print("Checking groups of order ", i, "\r");
res := TestOneOrder(i);
if res<>fail then
# print new line before displaying the output
Print("\n");
return res;
fi;
od;
return fail;
end;


You can find this code on GutHub here. Reading it into GAP, one could obtain the same result as follows:

gap> FindSmallestPair(20);
Checking groups of order 16
[ [ 16, 3 ], [ 16, 10 ], [ 16, 13 ] ]