
Written by Ion Saliu on December 2, 2002 (2 WE); revised December 14, 2002 (2 WE).
• FORMULA.EXE, version 8.1, April 22, 2003 ~ Retired 16-bit software.
• SuperFormula.EXE, version 11.0, May 22, 2004 ~ 32-bit software, supersedes FORMULA.
• COLORDER.EXE, version 2.0, December 2002.
• DrawIndex.EXE, version 2.0, December 2002.
• SORTING.EXE, version 4.0, 2003.
Here is a neat program to round up the combination lexicographical order task. My previous software calculated the combination lexicographical order one combination at a time. The user enters the numbers in the combination one by one. The software calculates the combination index, or rank, or order instantly. The result is displayed on screen and also saved to a disk file. No doubt, everybody wanted automated procedures. I heard it. People have past draws saved in text files. They wanted software to open the draws file, take each draw and calculate its combination lexicographical order and write it next to the draw, in the same line. Each combination must be sorted in ascending order. You can use my free program SORTING.EXE to correctly sort the draws files for lotto and Powerball games.
Here is a real life report for the PowerBall 53/5/42 played in the United States.
The drawing #4 in the data file consists of the following regular numbers:
Past draw #51: LON = 178. Perhaps a strategy would have played only the combinations with indexes in the range 101 to 200.
The ratio between new visitors and repeat visitors has changed recently. There are many more new visitors to my site compared to old timers. I am aware that some visitors have problems with basic tasks such as creating the lottery data files. Be aware that just about everything is covered here. This site has a huge volume of information; probably 1000 pages of a standard-size book. Take your time and read as much as you can. Use the search engine to find answers to your problems. The lottery data files are presented in detail in several places here. You may not be able to use DrawIndex.EXE if your lottery draws files are not in the correct format. I recommend you use another free program I offer here: PARSEL.EXE. It can help you find and fix many errors in your lotto files.
A numerologist with the meaningful pen name Serendipity discovered a serious bug in COLORDER.EXE v1.0. The Powerball routine was no longer correct for the new American game format 53/5/42. The same erratic results were reported by the PowerBall modules of DrawIndex.EXE v1.0. I had a hard time finding the bugs. The algorithm was correct. The problem was the data type used by the 16-bit compiler.
Please update your software:
PowerBall '5+1' Draw Lexicographical Order
File: C:\LOTTERY\PAPB-53 ~ Date: 12-14-2002
Game Type: 53 / 5 / 42
Total Combinations: 120,526,770
-----------------------------------------------------------------------------
Line D R A W Lexicograhical
no. Order
-----------------------------------------------------------------------------
1: 1 20 25 40 53 19 9,510,919
2: 15 16 19 21 49 5 96,398,951
3: 14 21 22 29 44 3 94,633,857
4: 32 33 35 40 51 1 119,430,949
5: 18 23 31 38 50 20 105,671,978
6: 30 36 38 40 53 8 118,991,132
7: 9 11 12 17 19 23 69,737,747
8: 8 15 32 34 35 34 66,048,856
9: 9 16 19 23 41 12 71,870,412
10: 12 14 27 33 39 41 85,479,743
11: 2 14 18 30 31 36 18,125,262
12: 4 18 20 25 42 29 37,993,019
13: 8 11 24 31 37 41 64,347,989
14: 23 26 46 49 52 28 113,802,640
15: 9 10 38 42 43 5 69,709,337
32 33 35 40 51
plus the power ball: 1
The lexicographical order of the combination in the 53/5/42 PowerBall game is: 119,430,949.
As expected, the combination indexes or ranks follow the normal distribution or Gauss curve. They are highly concentrated around the FFG median. I detailed the topic in a previous thread of messages:
Some will certainly wait for wacky situations: indexes at the extremes of the Gauss curve. Perhaps a situation such as this Cash-5 combination lexicographical order report:
Lotto-5 Draw Lexicographical Order
File: PA-5 ~ Date: 12-02-2002
Game Type: 39 / 5
Total Combinations: 575,757
--------------------------------------------------------------------------
Line D R A W Lexicograhical
no. Order
--------------------------------------------------------------------------
49: 2 14 21 30 37 126,356
50: 12 15 18 28 36 483,013
51: 1 2 3 9 22 178 *
52: 4 18 28 31 38 244,946
53: 4 18 20 24 28 244,055
Your lotto-5 data file is most likely in the correct format if it looks like the middle block in the above real-life example:
2 14 21 30 37
12 15 18 28 36
1 2 3 9 22
4 18 28 31 38
4 18 20 24 28
I reconfigured all data types to accommodate the largest possible numbers. I recompiled for 32-bit Windows; that is, the under-lying DOS 7. The new formatting of huge numbers is now easier to read. For example, total possible combinations for Keno 80/20 is no longer expressed in scientific notation. The huge number can be read something like “billions of billions”:
3,535,316,142,212,174,320
COLORDER.EXE v2.0, December 2002.
DrawIndex.EXE v2.0, December 2002.





Copyright ©1997-2007, Ion Saliu. All rights reserved worldwide. Reproduction, in any form, of the contents of this site is strictly prohibited. Read important copyright information regarding web site www.saliu.com