Hi Pete,
     I think you are not permuting the elements. But rather you are looking
for combinations with repetition for a set of elements. The number of such
combinations would be n+r-1Cr where n is the number of the elements and r is
the number of elements we have to choose.  So a combinatorial algo would
accomplish your task I guess.

Thanks,
Priya

On Mon, Jul 6, 2009 at 10:04 PM, lad4bear <[email protected]> wrote:

>
> Hi Guys,
>
> Here is my situation.
>
> The set of room types available is [s, d, t]. A user specifies the
> number of rooms required [n] and I have to generate a list of
> permutations.
>
> So where n=3 we get [sss, ssd, sst, sdt, std, etc]
>
> The problem I have is that sdt and std really are the same.
>
> How can I get an efficient list of permutations but without
> duplicates?
>
> Cheers
>
> Pete
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/algogeeks
-~----------~----~----~----~------~----~------~--~---

Reply via email to