View Full Version : PHP algorithm

12-09-2008, 02:53 PM
Guys i have been trying to make this algorythm but with no sucess, can
you help me out ?

The problem is the follow

for the following numberset like 1,2,3,4,5,6,7,8,9,10,11,12 i need to
take all the five number combinations, six number combinations and the
seven number combinations, this cant be "hardcoded", this need to be
flexible because at any time i may need all the 3 number combinations
and later i may need numbersets of 15 or even more.

Need a little help with this guys :)

Note: this is not for a school work or project :)

12-09-2008, 04:00 PM
When you say 5 number combinations, do you mean (in the above example) {1,2,3,4,5},{6,7,8,9,10} etc as output.

Or do you mean 5 random numbers generated from the set of numbers given?