Jump to content

Permutations by swapping: Difference between revisions

m
Line 26:
Here, bfsjt0 N gives the initial permutation of order N, and bfsjtn^:M bfsjt0M gives the Mth Steinhaus–Johnson–Trotter permutation of order N. (bf stands for "brute force".)
 
To convert from the Steinhaus–Johnson–Trotter representation of a permutation to J's representation, use <:@|, or to find J's permutationanagram index of a Steinhaus–Johnson–Trotter representation of a permutation, use A.<:@|
 
Example use:
6,962

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.