Aug-21-2019, 10:12 PM
Hi,
My current method of generating permutations with repetition is to first generate all combinations with repetition, then find the permutations (w/out repetition) of each combination, and lastly to remove all copies.
Can anyone suggest a more efficient way of doing this?
Sorry I can't provide source code... I use Scheme/Lisp not Python (but I know this is a good site, so that's why I ask).
My current method of generating permutations with repetition is to first generate all combinations with repetition, then find the permutations (w/out repetition) of each combination, and lastly to remove all copies.
Can anyone suggest a more efficient way of doing this?
Sorry I can't provide source code... I use Scheme/Lisp not Python (but I know this is a good site, so that's why I ask).