Welcome Guest
You last visited December 5, 2016, 11:30 am
All times shown are
Eastern Time (GMT-5:00)

# lexicographic clustering

Topic closed. 43 replies. Last post 9 years ago by time*treat.

 Page 2 of 3
mid-Ohio
United States
Member #9
March 24, 2001
19824 Posts
Offline
 Posted: January 9, 2008, 7:26 pm - IP Logged

Rather than looking for clustering of combinations with all the winning numbers, I'm look for clustering that won the most prizes or the most money.  When looking at combinations with all the winning numbers the distributions of combinations are spread out fairly even.

This should be fairly easy to check once I figure out a routine to assign the lexicographic numbers to each combination as I check for matches with other combinations in the data file.  It too big of a task to do by hand.

* you don't need to buy more tickets, just buy a winning ticket *

mid-Ohio
United States
Member #9
March 24, 2001
19824 Posts
Offline
 Posted: January 9, 2008, 7:36 pm - IP Logged

Rather than looking for clustering of combinations with all the winning numbers, I'm look for clustering that won the most prizes or the most money.  When looking at combinations with all the winning numbers the distributions of combinations are spread out fairly even.

This should be fairly easy to check once I figure out a routine to assign the lexicographic numbers to each combination as I check for matches with other combinations in the data file.  It too big of a task to do by hand.

I tried something similar on the 10 lines I posted on the prediction board for tonight's Ohio Classic Lotto and the best I could do is match 3.  It still needs some work.

* you don't need to buy more tickets, just buy a winning ticket *

United States
Member #13130
March 30, 2005
2171 Posts
Offline
 Posted: January 9, 2008, 7:58 pm - IP Logged

Since these are constants, you just generate each combo, in order, and have a file contain them.

combo 1 (the first record in the file) will be 1,2,3,4,5

combo 575,757 (the last record in the file) will be (35,36,37,38,39)

The combo value (record number) is in effect the lex val

It's a big file, but you only need to make it once. Then you just read from it. Probably find other uses for it, down the line.

I made a routine that would create the lex val from the 5 numbers, and another that would give me the 5 numbers from the lex value.

In my number history, there wasn't much clustering in the results, either.

In neo-conned Amerika, bank robs you.
Alcohol, Tobacco, and Firearms should be the name of a convenience store, not a govnoment agency.

mid-Ohio
United States
Member #9
March 24, 2001
19824 Posts
Offline
 Posted: January 9, 2008, 8:32 pm - IP Logged

Ion Saliu had a program on his website that would find the lexicographic number of any combination and the combination of any lexicographic number.  Years ago I down loaded it when his website was free but I didn't transfer it when I bought my last computer and now his site requires a paid membership to down load his free programs.  So now I giving some thought to writing a routine for my program that will do the same thing.

* you don't need to buy more tickets, just buy a winning ticket *

mid-Ohio
United States
Member #9
March 24, 2001
19824 Posts
Offline
 Posted: January 10, 2008, 1:08 pm - IP Logged

Since these are constants, you just generate each combo, in order, and have a file contain them.

combo 1 (the first record in the file) will be 1,2,3,4,5

combo 575,757 (the last record in the file) will be (35,36,37,38,39)

The combo value (record number) is in effect the lex val

It's a big file, but you only need to make it once. Then you just read from it. Probably find other uses for it, down the line.

I made a routine that would create the lex val from the 5 numbers, and another that would give me the 5 numbers from the lex value.

In my number history, there wasn't much clustering in the results, either.

N=0
FOR A=1 TO 35
FOR B=A+1 TO 36
FOR C=B+1 TO 37
FOR D=C+1 TO 38
FOR E=D+1 TO 39
N=N+1:PRINT N;" =  ";A;"-";B;"-";C;"-";D;"-";E
NEXT E
NEXT D
NEXT C
NEXT B
NEXT A

That's a big loop to run and store all the results.  I'm sure there's a better way to find N when you know A,B,C,D and E

* you don't need to buy more tickets, just buy a winning ticket *

United States
Member #13130
March 30, 2005
2171 Posts
Offline
 Posted: January 10, 2008, 3:25 pm - IP Logged

I know of two methods, but you can't mix them.

Easy to code, slow to run vs. hard to code, fast to run.

What you have above is the easy to code version (presuming your 'PRINT' goes to a file) for creating the file.

Once the file is created, if you know the A, B, C, D, & E and are looking for N, what you would do is something like.

FOR N = 1 to 575,757
IF val(col1) = A then
IF val(col2) = B then
IF val(col3) = C then
IF val(col4) = D then
IF val(col5) = E then
PRINT N         (there's the lex val)
EXIT FOR       (drops out of the for-next)
END IF
END IF
END IF
END IF
END IF
NEXT N

In neo-conned Amerika, bank robs you.
Alcohol, Tobacco, and Firearms should be the name of a convenience store, not a govnoment agency.

mid-Ohio
United States
Member #9
March 24, 2001
19824 Posts
Offline
 Posted: January 10, 2008, 5:39 pm - IP Logged

Ion Saliu's program works for any lottery once the combination and number pool sizes are entered.  That's more along the line of what I'm thinking off, I just have to figure out the number of loops needed to reach a certain combination.

* you don't need to buy more tickets, just buy a winning ticket *

mid-Ohio
United States
Member #9
March 24, 2001
19824 Posts
Offline
 Posted: January 10, 2008, 8:53 pm - IP Logged

I solve my problem by adding 5 lines and changing one in the routine in my earlier post.  If time is not wasted writing the index numbers and combinations to a file or the screen, the routine takes about 2.5 seconds to run.  I tested it by entering 35 36 37 38 39 and it took 2.5 seconds to match the combination and print out index number 575757.

INPUT "#1",N1
INPUT "#2",N2
INPUT "#3",N3
INPUT "#4",N4
INPUT "#5",N5
N=0
FOR A=1 TO 35
FOR B=A+1 TO 36
FOR C=B+1 TO 37
FOR D=C+1 TO 38
FOR E=D+1 TO 39
N=N+1:IF A=N1 AND B=N2 AND C=N3 AND D=N4 AND E=N5 THEN PRINT N:END
NEXT E
NEXT D
NEXT C
NEXT B
NEXT A

This is a lot better than writing a file and then searching it.

* you don't need to buy more tickets, just buy a winning ticket *

Arizona
United States
Member #4595
May 6, 2004
57 Posts
Offline
 Posted: January 12, 2008, 11:28 pm - IP Logged

In reference to a 5/39 lotto:

I don't even look at individual numbers.  I think looking at lottery combinations (such as  1-2-3-4-5) has almost nothing to do with individual numbers characteristics.  (Your mileage may vary.)

In my previous post, I never mean't to make a distinction between individual numbers and their relationship with the overall lottery.

I did try to indicate that there are more combinations leading with the number1 than any other combinations.

I also tried to indicate that there are more combinations leading with the number 2 than any other combinations (except those leading with the number 1).

And so on, all the way to the last combination leading with the number 35.

The least number of combinations occur with the leading number 35.

No combinations occur with the leading numbers 36, 37, 38, or 39.

United States
Member #4877
May 30, 2004
5118 Posts
Offline
 Posted: January 12, 2008, 11:50 pm - IP Logged

 lex num combination 1 01,02,03,04,05:36 376,992 32,33,34,35,36:36 -- -- 1 01,02,03,04,05:39 376,992 08,09,18,24,25:39 575,757 35,36,37,38,39:39

Most of us would call the 'lex' the "combination number".

I'm wondering if anyone has noticed their p5 game tending to cluster somewhat anywhere?  Or are the combos spread out evenly? Not looking for anything spectacular, maybe 15~20% of the combos falling in a 10% range, or 40% falling in a certain third of the range. Maybe even a fraction that is mostly "unused".

YES>>>WE >>>NOTICE.................HOW

the lottery can screw-UP your PICK's with ###########'sssss

the LOTTERY mechanic's>>>>throw-into-GAME!!

??can U-BLOCK (THEM???)

YOU may have a friend in the WHEELING BUSINESS>>>>>\$\$\$???

TELL HIM WHAT UR PROBLEM'\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$>>>>>>ARE??

HE MAY KNOW HOW TO development software to HELP>>>HIM!!

LOL

PSYKOMO

United States
Member #13130
March 30, 2005
2171 Posts
Offline
 Posted: January 13, 2008, 12:21 am - IP Logged

Ah, you mean low numbers in the early positions, and high numbers in the later positions.
Yes, of course, that is understood. It is used with the Delta system, so that's a whole other method.

In neo-conned Amerika, bank robs you.
Alcohol, Tobacco, and Firearms should be the name of a convenience store, not a govnoment agency.

Arizona
United States
Member #4595
May 6, 2004
57 Posts
Offline
 Posted: January 13, 2008, 10:23 am - IP Logged

time*treat:

Have you been able to display all of the 5/39 combinations in a way that you can view them... such as a spreadsheet?

hypersoniq helped me with the VB coding a couple of years ago.

I was working on a 5/49 back then, which I remember generated about 20 million combinations.  I used excel to display them.

I displayed each combination from lowest to highest number.  I then sorted the combinations.

I noticed the ~20 million combinations I was working with were finite.  They had a beginning and an end.

I graphed the ~20 million combinations.  Want to guess what the graph looked like?

United States
Member #13130
March 30, 2005
2171 Posts
Offline
 Posted: January 13, 2008, 3:07 pm - IP Logged

XL has 65536 rows, 256 cols, and 32 worksheets, IIRC.

If you were willing to use multiple columns, or worksheets, you could show as many combos as you could stand. It could be done. I've never needed to look at all of the combos at once. For huge blocks of data like that, I would create a file, then use that file like a random access database.

In neo-conned Amerika, bank robs you.
Alcohol, Tobacco, and Firearms should be the name of a convenience store, not a govnoment agency.

mid-Ohio
United States
Member #9
March 24, 2001
19824 Posts
Offline
 Posted: January 19, 2008, 5:15 pm - IP Logged

time*treat:

Have you been able to display all of the 5/39 combinations in a way that you can view them... such as a spreadsheet?

hypersoniq helped me with the VB coding a couple of years ago.

I was working on a 5/49 back then, which I remember generated about 20 million combinations.  I used excel to display them.

I displayed each combination from lowest to highest number.  I then sorted the combinations.

I noticed the ~20 million combinations I was working with were finite.  They had a beginning and an end.

I graphed the ~20 million combinations.  Want to guess what the graph looked like?

possible combos of 5 with 49 numbers are 1,906,884
MATCH    ODDS                      WINNING COMBOS
5/5       1 : 1906884                 1
4/5       1 : 8668                       220
3/5       1 : 202                         9460
2/5       1 : 14                           132440
1/5       1 : 3                             678755

You might want to change that ~20 millions to ~2 millions

* you don't need to buy more tickets, just buy a winning ticket *

United States
Member #13130
March 30, 2005
2171 Posts
Offline
 Posted: January 20, 2008, 6:21 am - IP Logged

I'm not sure how someone would graph a list of 5-point groups without consolidating them into some single value like a sum or a lex value. A quick glance at my own numbers leads me to believe that a graph of either of those sets will look much like the ones in LottoVantage's blog

In neo-conned Amerika, bank robs you.
Alcohol, Tobacco, and Firearms should be the name of a convenience store, not a govnoment agency.

 Page 2 of 3