```Date: Thu, 25 Apr 1996 17:38:41 +0100 Reply-To: John Whittington Sender: "SAS(r) Discussion" From: John Whittington Subject: Re: basic stats dumb question Comments: To: GERALD ZUCKIER On Thu, 25 Apr 1996, GERALD ZUCKIER wrote: >First they ask me how many different subsets can I get out of a set with N >members, where order is not important, and after (too much) thought I was able >to come back with 2^N different subsets, including the null set. Now they want >to know how many different subsets, where order IS important. I did a lot of >scribbling and can get it down to a sort of recursive function, but is there a >simple answer to this question? Thanks. Not dumb at all (I thought I was dumb, too, when I first encountered it!) - this is one of those things which sounds as if it ought to be totally straightforward, but isn't. There may be a closed form solution but, if so, I am unaware of it. As I'm sure you've figured, one has to deal separately with subsets of each 'size' (number of members) - the number of possible subsets (order being important) of size R from a set of N is obviously N! / (N-R)! and one 'simply' has to sum this over all values of R from 1 to N (remembering, which I usually forget, that 0!=1 :-). John ----------------------------------------------------------- Dr John Whittington, Voice: +44 1296 730225 Mediscience Services Fax: +44 1296 738893 Twyford Manor, Twyford, E-mail: johnw@mag-net.co.uk Buckingham MK18 4EL, UK CompuServe: 100517,3677 ----------------------------------------------------------- ```

Back to: Top of message | Previous page | Main SAS-L page