# How to decompose a 5-cycles into a permutationproduct of two 3-cycles?

We know that every 3-cycles can be expressed as the product of two commutations.

Cycles[{{1, 2, 3}}] ==
PermutationProduct[Cycles[{{1, 3}}], Cycles[{{3, 2}}]]


In the same way, we can see that each 5-cycles can be expressed by the product of two 3-cycles:

Cycles[{{1, 2, 3, 4, 5}}] ==
PermutationProduct[Cycles[{{1, 2, 3}}], Cycles[{{1, 4, 5}}]]


And, we can also see that each 3-cycles can be expressed by the product of two 5-cycles.

Cycles[{{1, 2, 3}}] == PermutationProduct[Cycles[{{5, 4, 2, 1, 3}}],
Cycles[{{1, 3, 2, 4, 5}}]]


How can I customize a function generator[lis_List] := Module[{}, ...] to find all the possible products of two 3-cycles of a 5-cycles?

For example, enter generator[{1, 2, 3, 4, 5}] to get:

{{{1, 2, 3}, {1, 4, 5}},
{{3, 4, 5}, {3, 1, 2}},
{{2, 3, 4}, {2, 5, 1}},...}


A general idea is as follows, but it is too complicated. I hope there is a more ingenious method:

Threecircleslist =
Flatten[Permutations /@ Subsets[{1, 2, 3, 4, 5}, {3}], 1] //
DeleteDuplicates;
data = Flatten[
Table[{Cycles[{i}], Cycles[{j}]}, {i, Threecircleslist}, {j,
Threecircleslist}], 1] // DeleteDuplicates;
Select[data,
PermutationProduct[#[[1]], #[[2]]] == Cycles[{{1, 2, 3, 4, 5}}] &]

{  {Cycles[{{1, 2, 3}}], Cycles[{{1, 4, 5}}]},
{Cycles[{{1, 2, 5}}], Cycles[{{3, 4, 5}}]},
{Cycles[{{1, 4, 5}}], Cycles[{{2, 3, 4}}]},
{Cycles[{{2, 3, 4}}], Cycles[{{1, 2, 5}}]},
{Cycles[{{3, 4, 5}}], Cycles[{{1, 2, 3}}]}}

• @kglr I've corrected that mistake, thank you. Mar 10, 2021 at 8:23

Maybe something like

ClearAll[threeCycles, toThreeCycles]
threeCycles[{a_, b___}] := Flatten[{a, #}] & /@ Partition[{b}, 2]

toThreeCycles[pc_Cycles] := Module[{perms =
Permute[pc[[1,1]], CyclicGroup[Length @ pc[[1,1]]]]},
Map[Map[Cycles @* List] @* threeCycles] @ perms]


Example:

toThreeCycles[Cycles[{{1, 2, 3, 4, 5}}]] // Column


PermutationProduct @ ## == Cycles[{{1, 2, 3, 4, 5}}] & @@@
toThreeCycles[Cycles[{{1, 2, 3, 4, 5}}]]

{True, True, True, True, True}


Note: Cycles are automatically canonicalized (Cycles >> Details):

Thus,

Equal[Cycles[{{1, 2, 3}}], Cycles[{{2, 3, 1}}], Cycles[{{3, 1, 2}}]]

True


So if the desired output is a list of pairs of Cycles objects toThreeCycles does the job.

If the desired output is a list of pairs of triples, then you can explode the output from toThreeCycles by taking, for each pair {Cycles{{a,b,c}}], Cycles[{{e,f,g}]}, tuples of cyclic permutations of {a,b,c} and {e,f,g} as follows:

explode = Apply[Join] @* ReplaceAll[{a_Cycles, b_Cycles} :>
Tuples[Permute[#[[1, 1]], CyclicGroup[Length @ #[[1, 1]]]] & /@ {a,   b}]];

explode @ toThreeCycles[Cycles[{{1, 2, 3, 4, 5}}]] //
Multicolumn[#, 3, Appearance -> "Horizontal"] &


• Your code seems to have some syntax errors, I can't get the desired results. Mar 10, 2021 at 8:44
• @Alittlemouseonthepampas, was missing  @ after Length. Fixed now.
– kglr
Mar 10, 2021 at 8:57