Tech Support > Computers & Technology > Programming > ordered subset question
ordered subset question
Posted by John Trunek on August 1st, 2005


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


Posted by Roger Willcocks on August 2nd, 2005


"John Trunek" <jtrunek@hotmail.com> wrote in message
news:11esn8ihc8snh92@corp.supernews.com...
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




Similar Posts