Pensieve header: Testing the permutations package.

SetDirectory["C:\\drorbn\\AcademicPensieve\\Classes\\16-1750-ShamelessMathematica"];
Get["160330-PermutationsPackage.m"]

?Permutation

n=54;
(Subscript[γ, 1])=Permutation[18,27,36,4,5,6,7,8,9,3,11,12,13,14,15,16,17,45,2,20,21,22,23,24,25,26,44,1,29,30,31,32,33,34,35,43,37,38,39,40,41,42,10,19,28,52,49,46,53,50,47,54,51,48];
(Subscript[γ, 2])=Permutation[1,2,3,4,5,6,16,25,34,10,11,9,15,24,33,39,17,18,19,20,8,14,23,32,38,26,27,28,29,7,13,22,31,37,35,36,12,21,30,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54];(Subscript[γ, 3])=Permutation[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,31,32,33,34,35,36,48,47,46,39,42,45,38,41,44,37,40,43,30,29,28,49,50,51,52,53,54];(Subscript[γ, 4])=Permutation[3,6,9,2,5,8,1,4,7,54,53,52,10,11,12,13,14,15,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,18,17,16];(Subscript[γ, 5])=Permutation[13,2,3,22,5,6,31,8,9,12,21,30,37,14,15,16,17,18,11,20,29,40,23,24,25,26,27,10,19,28,43,32,33,34,35,36,46,38,39,49,41,42,52,44,45,1,47,48,4,50,51,7,53,54];(Subscript[γ, 6])=Permutation[1,2,48,4,5,51,7,8,54,10,11,12,13,14,3,18,27,36,19,20,21,22,23,6,17,26,35,28,29,30,31,32,9,16,25,34,37,38,15,40,41,24,43,44,33,46,47,39,49,50,42,52,53,45];

$RecursionLimit=∞; σ_∘τ_ := PermutationProduct[τ, σ];
Feed[Permutation@@Range[n]]:=Null;
Feed[τ_]:=Module[{i,j,k,l},
i=Min[PermutationSupport[τ]]; j=τ[[i]];
If[Head[(Subscript[σ, i,j])]===Permutation,
Feed[InversePermutation[(Subscript[σ, i,j])]∘τ],
(*Else*) (Subscript[σ, i,j])=τ;
For[k=1, k<n, ++k, For[l=k+1, l≤n, ++l,
If[Head[(Subscript[σ, k,l])]===Permutation, Feed[(Subscript[σ, i,j])∘(Subscript[σ, k,l])]; Feed[(Subscript[σ, k,l])∘(Subscript[σ, i,j])]]
]]
]];

Table[Feed[(Subscript[γ, α])];(∏_(i=1)^n)(1+Count[Range[n], j_ /; Head[(Subscript[σ, i,j])]==Permutation]), {α, 6}] // Timing