I would like to find out what is the most effective PHP script to evenly represent all numbers in a specific combinations subset.
Lottery problem example:
- create 10 combinations each consisting of of 6 numbers
- from set of number (1,2,3,4,5,6,7,8,9,10,11,12)
I know that from 12 numbers I can create 924 combinations each consisting of 6 numbers.
Since I can't afford to play 924 lines - I want to pick only 10 lines which represent evenly all my selected numbers.
So in this example it would be something like:
- 1-2-3-4-5-6
7-8-9-10-11-12
and 8 more lines
I'm trying to avoid combinations like:
- 1-2-3-4-5-6
- 1-2-3-4-5-7
- 1-2-3-4-5-8
... etc. which are almost the same; I want to evenly represent each number.
Hope that makes sense.