List all combinations of 6/36 with unique 4 numbers
"joeu2004" wrote in message
...
For example, 1 3 5 29 is not covered.
Ah, OK, so I had a go, and came up with 57725 6-number cominations.
Obviously that's not right but FWIW this is what I did -
Make the 58905 4-number combinations, from each make single 'long' 7 or 8
digit numbers, eg for 1,2,3,4 = 1020304, and make a lookup table of the 59k
single 'long' numbers
Make a similar listing of the 1.9m 6-number combinations, and make 3
equivalent 'long' numbers with each, eg for 1,2,3,4,5,6 make
1020304 : 2030405 : 3040506
look-up each of the 3 x 1.9 'long' numbers up in the list of 59k and return
the index
If the index is not already marked (in a 1-59k boolean array) as found add
the 6 numbers to an array. As mentioned it returns a qty of 57725
That all works surprising quickly (less than a minute), but what am I
misunderstanding or missing?
Regards,
Peter T
|