3
$\begingroup$

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].

$\endgroup$
1
  • $\begingroup$ Related my this post. $\endgroup$
    – yode
    Commented May 23, 2017 at 10:04

2 Answers 2

5
$\begingroup$

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 Mapping 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.

$\endgroup$
1
  • 1
    $\begingroup$ @jjc385 So I did. That'll teach me to answer Mathematica questions before I have my coffee. $\endgroup$
    – Pillsy
    Commented May 5, 2017 at 2:37
3
$\begingroup$

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}}]}

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.