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

Improve SelectSmallGroups to cover more orders efficiently #4

Open
fingolfin opened this issue Aug 3, 2016 · 1 comment
Open

Improve SelectSmallGroups to cover more orders efficiently #4

fingolfin opened this issue Aug 3, 2016 · 1 comment

Comments

@fingolfin
Copy link
Member

The function SelectSmallGroups is the underlying engine driving AllSmallGroups and IdsOfAllSmallGroups. This can for example be used to get all groups of a certain order which are not solvable.

For many orders, there are efficient implementations. But for many others (e.g. order 1920, many of the large cube free orders), there are not. These then fallback to a generic routine, which ends up creating all groups of a given order. This is very inefficient.

For example, there are 241004 groups of order 1920, but only 588 of these are non-solvable -- namely exactly the last 588. (In fact, for most of the "non-legacy" orders, the authors of the small groups library took care to first list the nilpotent groups, then the other solvable ones, and finally the non-solvable ones). Based on this knowledge,
AllSmallGroups(1920, IsSolvableGroup, false); could terminate in a few milliseconds, but instead it takes ages (I didn't bother to let the computation finish, so I don't know how long exactly).

It would be highly desirable to improve this. For order 1920 (which is a special case in the small groups library anyway), that would be fairly easy. It's somewhat more work for the cubefree groups, I guess.

@olexandr-konovalov
Copy link
Member

Indeed - this knowledge on order 1920 is easily retrievable in a human-readable form:

gap> SmallGroupsInformation(1920);

  There are 241004 groups of order 1920.
  They are sorted using Hall subgroups. 
     1 - 2328 are the nilpotent groups.
     2329 - 236344 have a normal Hall (3,5)-subgroup.
     236345 - 240416 are solvable without normal Hall (3,5)-subgroup.
     240417 - 241004 are not solvable.

  This size belongs to layer 6 of the SmallGroups library. 
  IdSmallGroup is available for this size. 

but this knowledge is not propagated to SelectSmallGroups.

One could likely find more examples for improvements calling SmallGroupsInformation and checking when it says nothing on the precomputed attributes. As an example when it says, SmallGroupsInformation(64) returns

...
  For the selection functions the values of the following attributes 
  are precomputed and stored:
     IsAbelian, PClassPGroup, RankPGroup, FrattinifactorSize and 
     FrattinifactorId. 
...

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

No branches or pull requests

2 participants