I have A = Permutations[{1, 2, 3, 4}]
. And c = Cycles[{{1, 2, 3, 4}}]
.
And I need to output for all $a \in A: a \cdot с \cdot a^{-1}$. How can I do this?
P.S. $a^{-1}$ is InversePermutation[a]
.
Mathematica Stack Exchange is a question and answer site for users of Wolfram Mathematica. It only takes a minute to sign up.
Sign up to join this communityI have A = Permutations[{1, 2, 3, 4}]
. And c = Cycles[{{1, 2, 3, 4}}]
.
And I need to output for all $a \in A: a \cdot с \cdot a^{-1}$. How can I do this?
P.S. $a^{-1}$ is InversePermutation[a]
.
Well, first I'm going to use the fact that the set of permutations you have is just a SymmetricGroup
:
g = SymmetricGroup[4]
PermutationCycles /@ Permutations[{1, 2, 3, 4}] === GroupElements[g]
(* True *)
Then it's a simple matter of Map
ping over GroupElements
:
Map[PermutationProduct[#, c, InversePermutation[#]] &,
GroupElements@g]
(* {Cycles[{{1, 2, 3, 4}}], ... Cycles[{{1, 4, 3, 2}}]} *)
You can also use GroupBy
to break these up as equivalence classes, which is often what one wants to do in this situation:
GroupBy[GroupElements@g,
PermutationProduct[#, c, InversePermutation[#]] &]
This will return an Association
where the keys are the unique products $ a\cdot c \cdot a^{-1} $ generated, and the values are the group elements $ a $ that yield that product.
edited to add missing definition
Perhaps the following?:
A = PermutationCycles /@ Permutations[{1,2,3,4}];
Thread @ PermutationProduct[
A,
Cycles[{{1,2,3,4}}],
Thread @ InversePermutation @ A
]
{Cycles[{{1, 2, 3, 4}}], Cycles[{{1, 2, 4, 3}}], Cycles[{{1, 3, 2, 4}}], Cycles[{{1, 4, 2, 3}}], Cycles[{{1, 3, 4, 2}}], Cycles[{{1, 4, 3, 2}}], Cycles[{{1, 3, 4, 2}}], Cycles[{{1, 4, 3, 2}}], Cycles[{{1, 2, 4, 3}}], Cycles[{{1, 2, 3, 4}}], Cycles[{{1, 4, 2, 3}}], Cycles[{{1, 3, 2, 4}}], Cycles[{{1, 4, 2, 3}}], Cycles[{{1, 3, 2, 4}}], Cycles[{{1, 4, 3, 2}}], Cycles[{{1, 3, 4, 2}}], Cycles[{{1, 2, 3, 4}}], Cycles[{{1, 2, 4, 3}}], Cycles[{{1, 2, 3, 4}}], Cycles[{{1, 2, 4, 3}}], Cycles[{{1, 3, 2, 4}}], Cycles[{{1, 4, 2, 3}}], Cycles[{{1, 3, 4, 2}}], Cycles[{{1, 4, 3, 2}}]}