sympy / sympy

A computer algebra system written in pure Python

Home Page:https://sympy.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Intersection of PermutationGroups

thomasahle opened this issue · comments

It seems there's an easy way to compute G∩H = G.subgroup_search(H.contains) on two PermutationGroups.

Would it make sense to implement __and__ with this function. It should satisfy (G & H).elements == G.elements & H.elements.

The benefit would be that it's not clear what the best algorithm for group intersections actually is.
But according to Section 4.6.6 of "Handbook of Computational Group Theory" by Holt, Eick and O'Brien (see also https://math.stackexchange.com/questions/4931631 ) the best method indeeds seems to be using subgroup_search.

One thing I'm not sure about is whether it could be speed up more by e.g. doing

base, strong_gens = G.schreier_sims_incremental()
G.subgroup_search(H.contains, base, strong_gens)

or adding "tests" functions like in the group.centralizer method, which also uses subgroup_search.

Would it make sense to implement __and__ with this function. It should satisfy (G & H).elements == G.elements & H.elements.

Maybe. At least there could be a method like G.subgroup_intersect(H) if not G & H.

I would be wary about using set operators if we can't support all the set operations (G | H etc). Does anything apart from intersection make sense in this context?

I don't know anything about algorithms in this area and I'm not sure that anyone who does would answer questions about that here in this issue. Improvements are of course welcome though.