Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Another method for minimum generating set for finite groups #5716

Open
wants to merge 23 commits into
base: master
Choose a base branch
from

Conversation

pranav-joshi-iitgn
Copy link

@pranav-joshi-iitgn pranav-joshi-iitgn commented May 17, 2024

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

lib/grp.gi Outdated Show resolved Hide resolved
@pranav-joshi-iitgn
Copy link
Author

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

@ChrisJefferson
Copy link
Contributor

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?

Copy link
Member

@fingolfin fingolfin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution, much appreciated!

Unfortunately the code has a lot of issues (I pointed out a couple of them), and it is difficult to read and/or match to the paper. Adding some more comments would make it easier to review and thus increase the chance of it being merged.

But sadly as it is right now, the code quality is not at a level that would make it acceptable to merge this.

lib/grp.gi Outdated Show resolved Hide resolved
lib/grp.gi Outdated Show resolved Hide resolved
lib/grp.gi Outdated Show resolved Hide resolved
lib/grp.gi Outdated Show resolved Hide resolved
lib/grp.gi Outdated Show resolved Hide resolved
lib/grp.gi Outdated Show resolved Hide resolved
lib/grp.gi Outdated Show resolved Hide resolved
@pranav-joshi-iitgn pranav-joshi-iitgn changed the title Improvement in MinimalGeneratingSet Another method for minimum generating set for finite groups. May 22, 2024
@pranav-joshi-iitgn pranav-joshi-iitgn changed the title Another method for minimum generating set for finite groups. Another method for minimum generating set for finite groups May 22, 2024
@ChrisJefferson
Copy link
Contributor

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.

@pranav-joshi-iitgn
Copy link
Author

pranav-joshi-iitgn commented May 28, 2024

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.

@ChrisJefferson
Copy link
Contributor

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

@pranav-joshi-iitgn
Copy link
Author

pranav-joshi-iitgn commented May 28, 2024

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
Copy link
Author

Any other changes that I should make ?

@ChrisJefferson
Copy link
Contributor

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.

@pranav-joshi-iitgn
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants