Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhance DirectFactorsOfGroup for faster StructureDescription
The default DirectFactorsOfGroup attribute has undergone a serious enhancement, without having proper documentation, yet. - The Kayal-Nezhmetdinov algorithm is implemented with some tweaks under the attribute DirectFactorsOfGroupKN. From now on, it is referred to as the KN method. Some parts of the code is reused in the main DirectFactorsOfGroup attribute, but there are no direct calls to DirectFactorsOfGroupKN. - The KN method has an algorithm for computing a direct complement to a normal subgroup. This is implemented in the operation ComplementNormalSubgroup. This particular operation (in theory) should work for infinite groups, as well. - The main DirectFactorsOfGroup algorithm works as follows: - for Abelian groups computes the decomposition to cyclic groups of prime-power order, (for infinite Abelian groups the output is only a list of the direct factors instead of a set, because calling Set on the factors might not finish running in reasonable time; infinite non-Abelian groups are not handled, at all) - for nilpotent groups it calls itself on the Sylow subgroups, - checks several sufficient conditions for the group being direct indecomposable, - looks for Abelian cyclic components from the center of the group, - checks for more sufficient conditions for the group being direct indecomposable, - computes the normal subgroups and the minimal normal subgroups, and calls DirectFactorsOfGroupFromList. - DirectFactorsOfGroupFromList is a more efficient version of the old factorization method. It essentially searches through the normal subgroups (2nd argument, which is a list) by size and looks for a complement from the same list. If it finds a complement then the first factor is direct indecomposable, the second is decomposed further using the same list filtered from the clearly noncomplemented normal subgroups. Trivial intersection is checked by IsTrivialNormalIntersectionInList, which checks if any of the minimal subgroups (3rd argument, which is a list) is contained in both normal subgroups. This is faster than computing the normal intersection and checking if that is trivial. - IsTrivialNormalIntersection is implemented in cases where one knows more about the structure of the group. - Cases where the group is already a direct product or already has NormalSubgroups computed are handled in separate methods. - Some lines contained a space at their end, these spaces are all removed automatically by the text editor. Tested on SmallGroups of order different than 512, 768, 1024, 1280, 1536, 1792, and on a couple hundred test permutation groups. More times than not the new method was significantly (>200ms, >10%) faster than the old method, in many cases because it immediately found the group is direct indecomposable, rather than spending much time computing the normal subgroups. The KN method seems to be drastically slower if the direct factors are non-Abelian. Computing normal subgrups in such cases is much faster. However, the implementation is kept for possible future enhancements.
- Loading branch information