Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On 20/07/2012 21:52, joeu2004 wrote:
I am posting this "follow-up" to a previous discussion [1] to correct many misstatements that I made. Martin-888 wrote: Subject: List all combinations of 6/36 with unique 4 numbers Date: Fri, 13 Jul 2012 11:09:25 +0000 Message-ID: I would like Excel to give me all the possible combinations of a 6/36 lottery, but only to win the 4 out of 6 numbers. [....] These wouldn't be valid [...] because "1 2 3 4" and "2 3 4 6" are appearing twice. I believe that Martin is asking for an "abbreviated wheel" of all 36 numbers that guarantees a 4-of-6 win. An "optimal" abrreviated wheel would be a minimum number of 6-of-36 combinations. Originally, I had concluded that 2240 combinations are needed to satisfy the requirements. Later, I "corrected" myself, saying that 5456 combinations are needed. But that was based on my misunderstanding of the objectives (see below). As it turns out, 2240 is indeed the correct answer, although that might not be (and probably is not) the minimum number. My representation of the problem used 64 bit integers with bit0 = 1 bit1 = 2 etc. Tables of the 4C36 and 6C36 were generated and then a fast matching bits counting algorithm used to sift the most likely contenders for an optimum. No guarantee that there isn't a better one. The smallest subset I found was 2215 numbers with the first one being the 64 bit seed numeric value 599 = 0x257 = { 1,2,3, 5, 7, 10 } Deterministic search using the natural generated order of the ~2M 6C36 combos starting from 0x3F obtained by shifting the most significant bit first and iterating over all six bits. Sanity check shows that there are no free 6 digit combos that don't match at least one of these. The OP would do well to note that only the Irish government have ever been dumb enough to create a lottery scheme that was susceptible to this particular method of attack. -- Regards, Martin Brown |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
List all combinations | Excel Programming | |||
how can i get a list of combinations? | Excel Discussion (Misc queries) | |||
Can excel list combinations | Excel Worksheet Functions | |||
Matching Combinations | Excel Worksheet Functions | |||
List all possible combinations | Excel Programming |