Noob mathematical question
Posted: Wed Dec 07, 2011 12:17 pm
Hi, I'm new here and I know this is a noob question but I'm interested in how to do this. I'm learning php basics. I know how arrays, integers and strings work. I can do if conditions and for or while loops.
My problem is:
I have got 80 numbers (1-80)
And I would like to list all combinations of number-picking if
1. I can choose 10 numbers from the 80 and I can only pick a number once.
2. The same but only with 20 numbers.
I would like to list these two cases. I'm very interested in how to use these. Oh and I would also like to put all these veriations into and array, like... possibilities[0] = "1-2-3-4-5-6-7-8-9-10", possibilities[0] = "1-2-3-4-5-6-7-8-9-11" and so on.
Thank you in advance.
My problem is:
I have got 80 numbers (1-80)
And I would like to list all combinations of number-picking if
1. I can choose 10 numbers from the 80 and I can only pick a number once.
2. The same but only with 20 numbers.
I would like to list these two cases. I'm very interested in how to use these. Oh and I would also like to put all these veriations into and array, like... possibilities[0] = "1-2-3-4-5-6-7-8-9-10", possibilities[0] = "1-2-3-4-5-6-7-8-9-11" and so on.
Thank you in advance.