writing down minimum and maximum cyclical permutations
Eugene McDonnell
eemcd at mac.com
Tue Feb 1 07:41:53 CET 2005
maximum odd
2 4 6 - - - -
- - - 7 5 3 1
2 4 6 7 5 3 1
maximum even
1 3 5 7 - - - -
- - - - 8 6 4 2
1 3 5 7 8 6 4 2
minimum odd
1 - 3 - 5 - 7
- 6 - 4 - 2 -
1 6 3 4 5 2 7
minimum even (this gets tricky)
write odd number pairs adding to n (say 10), first number smaller
1 9 3 7
write half n (5)
- - - - 5
write even number pairs adding to n, first number larger
- - - - - 6 4 8 2
end with n
- - - - - - - - - 10
giving
1 9 3 7 5 6 4 8 2 10
Having written one of these, generate all the other max or min
permutations by all rotations and all rotations of reversal, giving 2n
altogether.
Eugene McDonnell
More information about the SeqFan
mailing list