[Tutor] Generating Unique Permutations
Kent Johnson
kent37 at tds.net
Fri Dec 18 14:39:14 CET 2009
On Fri, Dec 18, 2009 at 12:54 AM, Michael Morrissey <gdoghomes at gmail.com> wrote:
> I'm looking for an efficient way to create all the unique, non-duplicated
> permutations of a list (I believe these are called "necklaces" in
> combinatorics). I need to do this without actually generating every possible
> permutation (which includes all the duplicates).
This seems to do what you want:
http://code.activestate.com/recipes/496819/
Kent
More information about the Tutor
mailing list