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

Enhance DirectFactorsOfGroup for faster StructureDescription #379

Merged
merged 26 commits into from
Jan 31, 2016

Commits on Dec 10, 2015

  1. 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.
    
    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.
    hungaborhorvath committed Dec 10, 2015
    Configuration menu
    Copy the full SHA
    ea04de9 View commit details
    Browse the repository at this point in the history
  2. Add documentation to DirectFactorsOfGroup

    Added documentation to the following commands:
    - IsTrivialNormalIntersection,
    - IsTrivialNormalIntersectionInList,
    - ComplementNormalSubgroup (added GAPDoc label),
    - DirectFactorsOfGroup (added GAPDoc label),
    - DirectFactorsOfGroupFromList (mainly merged from old documentation),
    - DirectFactorsOfGroupKN.
    hungaborhorvath committed Dec 10, 2015
    Configuration menu
    Copy the full SHA
    420d92b View commit details
    Browse the repository at this point in the history
  3. Apply some changes suggested by @fingolfin

    - Abelian -> abelian
    - IsIdenticalObj put into ComplementNormalSubgroup
    - comment about Set or List is slightly expanded
    - Nilpotent -> nilpotent for unity's sake
    hungaborhorvath committed Dec 10, 2015
    Configuration menu
    Copy the full SHA
    b7549fd View commit details
    Browse the repository at this point in the history
  4. Comply with fingolfin's requests on IsTrivialNormalIntersection*

    - IsTrivialNormalIntersectionInList is now a function.
    - IsFamFamFam is added where applicable.
    - List creations are replaced by corresponding loops.
    - Trivial generators are excluded.
    - Special methods for Socle and nilpotent groups are removed for now.
      (They seemed to perform slower than the basic method,
       may reinvent them later.)
    - The idea behind the MinimalNormalSubgroups method is that the list of
      minimal normal subgroups is generally small, whereas there could be many
      normal subgroups and computing the intersection of any two would be slower
      than to check if each contains a generator of a minimal normal subgroup.
    hungaborhorvath committed Dec 10, 2015
    Configuration menu
    Copy the full SHA
    5db1121 View commit details
    Browse the repository at this point in the history
  5. Slightly improve DirectFactorsOfGroup code

    If a group is a nonabelian p-group, then it cannot have a unique maximal
    normal subgroup, therefore it is useless to check for this property.
    hungaborhorvath committed Dec 10, 2015
    Configuration menu
    Copy the full SHA
    953651d View commit details
    Browse the repository at this point in the history
  6. Replace filtered lists by loop, throw away trivial generators

    Replace the filtered list definition of gs with loops,
    and throw away trivial generators.
    hungaborhorvath committed Dec 10, 2015
    Configuration menu
    Copy the full SHA
    d0ed28a View commit details
    Browse the repository at this point in the history
  7. Replace another filtered lists by loop, throw away trivial generators

    Replace a (previously missed) filtered list definition of gs with loops,
    and throw away trivial generators.
    hungaborhorvath committed Dec 10, 2015
    Configuration menu
    Copy the full SHA
    31bb3b4 View commit details
    Browse the repository at this point in the history
  8. Slightly improve DirectFactorsOfGroup for nonsolvable groups

    If G is not solvable, then at the point where checking for unique maximal
    normal subgroup, it is worth checking if the factor by the commutator has
    a unique maximal subgroup. If not then there is no point computing
    MaximalNormalSubgroups at all.
    hungaborhorvath committed Dec 10, 2015
    Configuration menu
    Copy the full SHA
    5b72f66 View commit details
    Browse the repository at this point in the history
  9. Enhance DirectFactorsOfGroup and DirectFactorsOfGroupKN

    Use a loop in RationalClasses for going through the cyclic subgroups of
    the center.
    hungaborhorvath committed Dec 10, 2015
    Configuration menu
    Copy the full SHA
    4f646a6 View commit details
    Browse the repository at this point in the history

Commits on Dec 14, 2015

  1. Configuration menu
    Copy the full SHA
    deee1a4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1046e59 View commit details
    Browse the repository at this point in the history
  3. Add global function UnionIfCanEasilySortElements

    Takes some lists as an input and returns their union if all elements of all
    lists satisfy CanEasilySortElements. Otherwise, it returns the concatenation
    of the lists.
    
    Should this code go into a different library file?
    hungaborhorvath committed Dec 14, 2015
    Configuration menu
    Copy the full SHA
    3c0e44a View commit details
    Browse the repository at this point in the history
  4. Correct typo

    hungaborhorvath committed Dec 14, 2015
    Configuration menu
    Copy the full SHA
    371acb4 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    2846bc6 View commit details
    Browse the repository at this point in the history

Commits on Dec 19, 2015

  1. Enhance ComplementNormalSubgroup if G/N is abelian

    PreImage was computed as a set rather than a coset. Cosets can be handled
    faster for bigger permutation groups.
    Order can be computed faster for permutation groups than IsCentral.
    hungaborhorvath committed Dec 19, 2015
    Configuration menu
    Copy the full SHA
    38b0b20 View commit details
    Browse the repository at this point in the history
  2. Slightly enhance DirectFactorsOfGroup

    Replace SylowSubgroups with SylowSystem for nilpotent groups.
    hungaborhorvath committed Dec 19, 2015
    Configuration menu
    Copy the full SHA
    af31b58 View commit details
    Browse the repository at this point in the history
  3. Clean code a bit

    hungaborhorvath committed Dec 19, 2015
    Configuration menu
    Copy the full SHA
    cad5ecd View commit details
    Browse the repository at this point in the history

Commits on Jan 27, 2016

  1. Change rank increments to 0

    These were 10 by accident.
    hungaborhorvath committed Jan 27, 2016
    Configuration menu
    Copy the full SHA
    5298879 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c47602c View commit details
    Browse the repository at this point in the history
  3. Use Representative for RationalClasses

    Set was used before, and Representative is faster if the RationalClass is big.
    hungaborhorvath committed Jan 27, 2016
    Configuration menu
    Copy the full SHA
    d30b92c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    ab73a3d View commit details
    Browse the repository at this point in the history
  5. Make DirectFactorsOfGroupKN a function and call it by an option

    Instead of an attribute, DirectFactorsOfGroupKN is now a function,
    which is called by using the option "useKN".
    hungaborhorvath committed Jan 27, 2016
    Configuration menu
    Copy the full SHA
    cf6e03f View commit details
    Browse the repository at this point in the history
  6. Remove TryNextMethod from functions

    Functions should not call TryNextMethod. Removed the appropriate lines
    and confirmed that the removed checks do not cause any problem in the
    main algorithm.
    hungaborhorvath committed Jan 27, 2016
    Configuration menu
    Copy the full SHA
    efff11e View commit details
    Browse the repository at this point in the history
  7. Add testinstall file

    hungaborhorvath committed Jan 27, 2016
    Configuration menu
    Copy the full SHA
    6b11f51 View commit details
    Browse the repository at this point in the history

Commits on Jan 30, 2016

  1. Enhance ComplementNormalSubgroup

    If G/N is abelian, then check whether groups knows its Center and how big
    it is compared to the rightcoset to determine which to choose to loop through
    the elements.
    hungaborhorvath committed Jan 30, 2016
    Configuration menu
    Copy the full SHA
    7e8f811 View commit details
    Browse the repository at this point in the history
  2. Rename ComplementNormalSubgroup to NormalComplement

    Added some extra tests to direct_factors.tst, as well.
    hungaborhorvath committed Jan 30, 2016
    Configuration menu
    Copy the full SHA
    aa77167 View commit details
    Browse the repository at this point in the history