jumble find permutations by lexicographical order See the wikipedia page on permutations here: http://en.wikipedia.org/wiki/Permutation Particularly, reference the section on generating permutations by lexicographic order.