A055091 Minimum number of transpositions needed to represent each permutation given in reversed colexicographic ordering A055089.
0, 1, 1, 2, 2, 1, 1, 2, 2, 3, 3, 2, 2, 3, 1, 2, 2, 3, 3, 2, 2, 1, 3, 2, 1, 2, 2, 3, 3, 2, 2, 3, 3, 4, 4, 3, 3, 4, 2, 3, 3, 4, 4, 3, 3, 2, 4, 3, 2, 3, 3, 4, 4, 3, 1, 2, 2, 3, 3, 2, 2, 3, 3, 4, 4, 3, 3, 2, 4, 3, 3, 4, 3, 4, 2, 3, 3, 4, 2, 3, 1, 2, 2, 3, 3, 4, 2, 3, 3, 4, 4, 3, 3, 4, 2, 3, 4, 3, 3, 2, 4, 3, 3, 2, 2
Offset: 0
Keywords
Links
Crossrefs
Programs
-
Maple
with(group); [seq(count_transpositions(convert(PermRevLexUnrank(j),'disjcyc')),j=0..)]; count_transpositions := proc(l) local c,t; t := 0; for c in l do t := t + (nops(c)-1); od; RETURN(t); end; # Procedure PermRevLexUnrank given in A055089.
Formula
Extensions
Entry revised by Antti Karttunen, Dec 30 2017