On 20100111, sherman <sherman> wrote:
> On Mon, 11 Jan 2010 06:22:59 +0100, "Alf P. Steinbach"
><(EMail Removed)> wrote:
>
>>* sherman:
>>> Can you guys direct me to some code that contains
>>> a way of finding all permutations of n things taken
>>> k at a time without repetition?
>>> I am particularly interestd in all permutations of
>>> the numbers 0,1,2,...,9 taken 7 at a time without repetition.
>>> Thank you very much.
>>>
>>> sherman
>>
>>Uh, how do you permute something without repeating anything?
>>
>>Please clarify.
>>
>>
> Alf,
>
> We pick up all possible permutations of all combinations of 7 numbers
> from the ten numbers 0,1,...,9.
> For example, here are two different such permutations for the same 7
> numbers picked (the same combination of 7 numbers):
> 0,1,3,5,6,7,8
> 6,3,1,8,7,5,0
>
> What it amounts to is: pick all combinations of 7 numbers out of 10,
> and then all permutations of them. I know how many they are.
> However, I do need all the 7tuples for a project I am involved in.
> Thank you!
>
Well, your best bet is probably to try comp.programming, if you
haven't already. From my experience, for any code that generates
permutations, recursion is a good plan.
