I have been wrestling with this problem for a while and i can't seem to find any information on the internet about it.
The problem is this:
I have ten numbers (not necessarily sequential) and I want to print out all the 6 group combinations, ie 10 choose 6. I know the formula n_c_p = n!/(p!(n-p)!) which tells me how many combinations there are. I am stumped. It should also be able to handle arbritary n and p values ie, I should be able to input 25 numbers and have it generate all the 5 number combinations.
Any help would be appreciated. Pointers to websites would be appreciated as well
Thanks...
Troy Williams B.Eng.
fenris@hotmail.com
The problem is this:
I have ten numbers (not necessarily sequential) and I want to print out all the 6 group combinations, ie 10 choose 6. I know the formula n_c_p = n!/(p!(n-p)!) which tells me how many combinations there are. I am stumped. It should also be able to handle arbritary n and p values ie, I should be able to input 25 numbers and have it generate all the 5 number combinations.
Any help would be appreciated. Pointers to websites would be appreciated as well
Thanks...
Troy Williams B.Eng.
fenris@hotmail.com