# How to compute the stabilizer subgroup of a partition with GAP?

A partition $$P$$ of a set $$S$$ is a set of disjoint subsets of $$S$$ whose union is $$S$$. Let $$G$$ be a subgroup of the symmetric group $$S_n$$. Define the stabilizer subgroup of $$G$$ for a partition $$P$$ of $$\{1,2, \dots , n\}$$ by $$G_P:= \{g \in G \ | \ gP=P \}$$ where $$gP:= \{ \{ga \ | \ a \in p \} \ | \ p \in P \}$$.

Question: How to compute explicitly $$G_P$$ with GAP?

• Such a stabilizer should just be the direct product of smaller symmetric groups right? If we write a stabilizer element in cycle notation, each cycle should contain only elements of a set in the partition. – Rylee Lyman Aug 13 at 23:57
• @RyleeLyman No, since a partition is defined as set of sets, the sets could be permuted, so it is (if all sets have the same size) the intersection with a wreath product. – ahulpke Aug 14 at 3:21

Stabilizer(G,P,OnSetsDisjointSets);

(assuming that $$P$$ is a set of sets in the GAP sense). IIRC this has been introduced only in recent releases, but the underlying function PartitionStabilizerPermGroup(G,P) has been around for longer. The calculation involves a backtrack search, and probably offers many possibilities for improvement.