Subj : Algorithm to generate permutation for a non sequential single array To : comp.programming From : mmarin1m@hotmail.com Date : Fri Jul 01 2005 10:07 am Hi all, I'm looking for an algorithm that would generate all permutations for a given non sequential list. As an example: Given the list 125, 126, 5, 88 and 33, all permutations must be generated in that sequence. The perfect algorithm would yields the following matrix: 125, 126, 5, 88, 33 125, 126, 5, 88 126, 5, 88, 33 125, 126, 5 125, 126, 88 125, 126, 33 125, 5, 88 125, 5, 33 125, 88, 33 126, 5, 88 126, 5, 33 126, 88, 33 5, 88, 33 125, 126 125, 5 125, 88 125, 33 126, 5 126, 88 126, 33 5, 88 5, 33 88, 33 125 126 5 88 33 Sorry about the length of this post. The fact that the numbers are non sequential is irrelevant. What matters is that 126 should never appears before 125, etc, etc. Thank you in advance, mmarin1m .