Yeah ,
                I agree with priya . This situation is something like this:
if n=3 , you may want all 3 [s] rooms , or each [s] , [d] ,[t] rooms or two
[s] rooms and a [d] room.....this goes on. So , straight forward you have to
chose r ( e.g. r=3) rooms from n ( total number of rooms , n= s+d+t), then
you will have to compute nCr where r is required number of rooms and n is
total number of rooms n=s+d+t.

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
>
> >
>


-- 
regards,
Shrikant

--~--~---------~--~----~------------~-------~--~----~
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