Subj : Re: ordered subset question To : comp.programming From : Roger Willcocks Date : Tue Aug 02 2005 01:36 am "John Trunek" wrote in message news:11esn8ihc8snh92@corp.supernews.com... >I need to obtain all the ordered subsets of containing 7 elements from a > list of 15 elements. From what I remember, the number of ordered sets is > given by the formula > numOfSets = 15! / (15-8)! = 32,432,400 > Unfortunately, I'm not familiar with permutation algorithms. Could > someone > please point me in the right direction to solve this problem? > > John > > Recursion is your friend. Pick one of the fifteen elements, and then append each of the ordered subsets containing 6 elements from a list of (the remaining) 14 elements. -- Roger .