# How to determine if a group H is a normal subgroup of group G?

A subgroup $$H$$ of the group $$G$$ is normal group in $$G$$ if and only if $$\displaystyle ghg^{-1}\in H$$ for all $$\displaystyle g\in G$$ and $$\displaystyle h\in H$$. How to use MMA to know the group $$H$$ is a normal group of group $$G$$? Such as:

G = SymmetricGroup;
H = AlternatingGroup;

• g = GroupElements[SymmetricGroup]; h = GroupElements[AlternatingGroup]; conj[x_] := PermutationProduct[#, x, InversePermutation[#]] & /@ g Brute fprcing: Union[Flatten[conj /@ h]] == Sort[h] yields True May 16, 2022 at 8:43
• @ubpdqn Yes, I note your solution here. But RandomSample[Sort[GroupElements[AlternatingGroup]]]===GroupElements[AlternatingGroup] will return False. You need a parameter Less like my answer in following. And I use the PermutationReplace to get the conjugate is more concise than yours. :)
– yode
May 16, 2022 at 9:10
• Not sure I understand but I'll accept your point May 16, 2022 at 9:12
• @ubpdqn I've just updated the very efficient algorithm.
– yode
May 27, 2022 at 7:49

IsNormalQ[H_, G_] := Sort[DeleteDuplicates[Catenate[
Outer[PermutationReplace, GroupElements[H],
Complement[GroupElements[G], GroupElements[H]]]]], Less] === GroupElements[H]


Or little concise, but sometimes it will be slower:

IsNormalQ[H_, G_] := ContainsExactly[
Catenate[Outer[PermutationReplace, GroupElements[H],
Complement[GroupElements[G], GroupElements[H]]]],GroupElements[H]]


# Update(Simplicity and efficiency)

IsNormalQ[H_,G_]:=AllTrue[GroupElements[G],PermutationReplace[H,#]==H&]