|
EXAMPLE
|
All permutations of 1-6 with minimum displacement 2:
(4,5,1,6,2,3) (4,5,1,6,3,2) (4,5,6,1,2,3) (4,5,6,1,3,2) (4,5,6,2,1,3)
(4,5,6,2,3,1) (4,6,5,1,2,3) (4,6,5,1,3,2) (4,6,5,2,1,3) (4,6,5,2,3,1)
(5,4,1,6,2,3) (5,4,1,6,3,2) (5,4,6,1,2,3) (5,4,6,1,3,2) (5,4,6,2,1,3)
(5,4,6,2,3,1) (5,6,1,2,3,4) (3,4,5,6,1,2) (3,4,5,6,2,1) (3,5,1,6,2,4)
(3,5,6,1,2,4) (3,5,6,2,1,4) (3,6,5,1,2,4) (3,6,5,2,1,4) (6,4,5,1,2,3)
(6,4,5,1,3,2) (6,4,5,2,1,3) (6,4,5,2,3,1) (6,5,1,2,3,4)
|