gap icon indicating copy to clipboard operation
gap copied to clipboard

Another method for minimum generating set for finite groups

Open pranav-joshi-iitgn opened this issue 1 year ago • 9 comments

I have added a function MinimalGeneratingSetUsingChiefSeries that computes a minimum generating set for finite groups using the algorithm derived from the research paper by Dhara Thakkar and Andrea Lucchini. We (me and Ruchit Jagodara) tried doing the same thing in SageMath first. The pull request is yet to be merged.

The algorithm works as shown in this flowchart :

MinGenSet

image

pranav-joshi-iitgn avatar May 17 '24 08:05 pranav-joshi-iitgn

@fingolfin could you please review this PR ? This is the same algorithm that you reviewed in the PR to SageMath.

pranav-joshi-iitgn avatar May 17 '24 09:05 pranav-joshi-iitgn

My initial comment is maybe add some tests? I'm guessing you understand the types of groups you need to hit the various cases in the algorithm, and make sure it is fully tested?

ChrisJefferson avatar May 17 '24 10:05 ChrisJefferson

I have some small comments, but I'd say the BIG missing thing is tests, lots of tests!

As a suggestion, you could base you tests on something like this:

checkMinimalGeneratingSet := function(G,x)
local genset;
  genset := MinimalGeneratingSet(G);
  if Group(genset, Identity(G)) <> G then Print(genset, " does not generate ", G); fi;
  if Length(genset) <> x then Print(genset, " of ", G, " is size ", Length(genset), " instead of ", x); fi;
end;

As (I think!) this is basically what we want to check -- we make the write group, and the set has the right size.

Then, you can just call checkMinimalGeneratingSet with lots of pairs of group, genset size (which you can hopefully get from another source).

In case you wonder, that Group(genset, Identity(G)) is to cover the case where genset is empty, in which case you need to explictly give the identity of the group, so Group know what type of group it is making.

ChrisJefferson avatar May 28 '24 02:05 ChrisJefferson

I have some small comments, but I'd say the BIG missing thing is tests, lots of tests!

As a suggestion, you could base you tests on something like this:

checkMinimalGeneratingSet := function(G,x)
local genset;
  genset := MinimalGeneratingSet(G);
  if Group(genset, Identity(G)) <> G then Print(genset, " does not generate ", G); fi;
  if Length(genset) <> x then Print(genset, " of ", G, " is size ", Length(genset), " instead of ", x); fi;
end;

As (I think!) this is basically what we want to check -- we make the write group, and the set has the right size.

Then, you can just call checkMinimalGeneratingSet with lots of pairs of group, genset size (which you can hopefully get from another source).

In case you wonder, that Group(genset, Identity(G)) is to cover the case where genset is empty, in which case you need to explictly give the identity of the group, so Group know what type of group it is making.

I have added a test (opers/MinimalGeneratingSetUsingChiefSeries.tst) that checks equality between the size of outputs of MinimalGeneratingSet and MinimalGeneratingSetUsingChiefSeries, and if the latter generates the group.

I am eager to know the small comments as well.

pranav-joshi-iitgn avatar May 28 '24 11:05 pranav-joshi-iitgn

I don't think this test ever executes the code from line 76 onwards

ChrisJefferson avatar May 28 '24 12:05 ChrisJefferson

I don't think this test ever executes the code from line 76 onwards

Yes, the first time that block runs is for SmallGroup(120,34), which I have added now.

pranav-joshi-iitgn avatar May 28 '24 18:05 pranav-joshi-iitgn

Any other changes that I should make ?

pranav-joshi-iitgn avatar Jun 02 '24 06:06 pranav-joshi-iitgn

There is no documentation at the moment.

I think in this case (but I might be wrong, feel free to comment!) this probably shouldn't be used by default for MinimalGeneratingSet, as there are cases where it is much faster and cases where it is much slower? If that's true, then it would make more sense to add it as another option, and try to give a hint when this method should be used.

ChrisJefferson avatar Jun 03 '24 02:06 ChrisJefferson

I added a paragraph in documentation for MinimalGeneratingSet which mentions it as another option.

pranav-joshi-iitgn avatar Jun 04 '24 18:06 pranav-joshi-iitgn