# Theory of Markov Chains in Lottery, Lotto, Followers, Pairs, Software

## 1. Introduction to Markov Chains, Applications to Random Events, Lottery

• Published in July, year of grace 2015.

Axiomatic one, the Markov Chains theory is very simple and also very hard to comprehend. Why? Because it is many hats to many people. The common ground of this simple example of interaction is randomness. Just about everybody states the Markov Chains only apply to random events. Nice and dandy — but what is not random? The Universe itself is random beyond mathematical doubt. Still a majority of people will say right away that the lottery is random, while the Newtonian system is not. Yet, the Markov Chains do not apply to lottery, because the next drawing is not at all influenced by the previous drawing. Meanwhile, the Newtonian system is closer to being a Markov Chain application because it is far easier to predict the next state!

One much given example of a Markov Chain application is weather forecasting. The weather is "less random" than the lottery. The tomorrow forecast is dependent on today's weather, without the need to go back further in time (the day before yesterday, three days ago, etc.) If the weather state today is, randomly: 40% sunny, 30% cloudy, 30% rainy — tomorrow will be just about the same, but not exactly the same.

I won't go any further and confuse you deeper because the interpretation of the Markov Chains thingy is a huge mess! Fuzzy mathematics is the queen of confusion. As you can discover at this website, my theory of everything is founded on the ubiquitous randomness. Everything, the entire Universe, is random and randomness has rules. The phenomena are differentiated by different probabilities, which in turn determine different degrees of randomness. A lower probability leads to a higher degree of randomness. The Sun appears as a perfect circle from the Earth. The next state (point) in a circle is predictable with a very high degree of certainty (some say absolute certainty). In reality, the Sun is far from being a perfect circle — there are random variations in Sun's shape that are much larger than the Earth! No perfect shape has ever been discovered on Earth or in the Universe.

Furthermore, my theory states that everything is correlated — all events are randomly correlated, if you will. I discovered the third fundamental element of the Fundamental Formula of Gambling: Degree of Certainty. Various degrees of certainty are correlated with various degrees of randomness. Yes, it is more difficult to predict the next lotto draw than to predict tomorrow's weather. If it is hot and sunny and dry today, chances are it won't snow tomorrow. But I can be wrong weather-wise and right lottery-wise! There is no degree of certainty equal to 100% AND no degree of certainty equal to 0 — that's undeniable mathematics, it is axiomaticism.

With the help of computers, I have discovered possibly hundreds of parameters that prove all events are correlated, lottery included. In fact, the first application of my probability theory was lottery and gambling. Hence, I labeled that universal mathematical relation Fundamental Formula of Gambling (FFG). The most descriptive name is Fundamental Formula of Everything (FFE). Everything happens with a degree of certainty determined by a probability and a number of trials.

To make it brief, I noticed that the lotto numbers repeat more often after a number of trials (lottery drawings) equal to or less than the FFG median (one of my fundamental concepts). I discovered also that the lottery numbers have tendencies to pair differently with other numbers. The most frequent lotto pairings will hit more often within certain ranges of drawings. I called the pairing discovery the lotto wonder grid and it is applied by thousands of lottery players worldwide. If applied to lottery, the Markov Chains theory represents a subset of my lotto wonder grid.

The first software implementation of Markov Chains in lottery was first presented at this website in 2003: Markov Chains, Lottery, Lotto, Software, Algorithms, Program. The first Markov Chains Lotto program was the creation of Cristiano Lopes, a system engineer from Portugal/Italy. He was inspired by a college programming book that "predicted" a set of sentences from a previous set of sentences. A word was followed by other words. The algorithm would randomly select from a list of followers. Cristiano Lopes made the algorithm select lotto numbers from a list of numbers that followed the respective number. For example, in the lotto drawings 3 22 24 26 28 49 and 5 22 23 24 36 37, number 22 was followed by the numbers 24 and 23. 24 and 23 represent followers of lotto number 22.

My lotto wonder grid is more encompassing as it pairs the numbers that appeared in the same draw. In this example, it appears that numbers 22 and 24 are well paired. The lotto wonder grid will make a list of all pairs for each lotto number; the pairs are displayed in descending order, from the most frequent to the least frequent. Then, the software will generate combinations only from the top N pairings. The Markov Chains Lotto program generates random combinations from the followers of the respective numbers.

## 2. Ion Saliu's Software for Markov Chains in Lottery, Lotto, Horse Racing

• The ultimate lotto,lottery, horse racing software for applying Markov Chains, pairs, number frequency:
• MarkovPick3 ~ for pick-3 daily games;
• MarkovPick4 ~ for pick-4 lotteries;
• MarkovLotto5 ~ for 5-number lotto games;
• MarkovLotto6 ~ for 6-number lottos;
• MarkovHorses3 ~ for horse racing trifectas.

• Please be advised that these programs, released in 2015, require a special form of membership to download software: Ultimate Lottery Software. Click on the top banner to learn the terms, conditions, and availability. All my software is always announced in the Forums, New Writings, Software Downloads. The presentation pages are always published first. Such Web resources are free to read and help the reader make a decision regarding the licensing of software.
• The Markov Chains program runs from the main menu of the respective Ultimate Software package, function M = Markov Chains, Pairs, Followers.

• The following screenshot is the main menu of all programs —

## 3. Reports in Markov Chains Software

• The function R = Report Pairs, Frequency (Hot) is mandatory to run first. If not, the software triggers an error.

Here is a screenshot of R = Report Pairs, Frequency (Hot).

Here is a fragment of the main report, MarkovLotto6.REP:

```                   Lotto-6 Report PAIRS & FREQUENCY
Draws Analyzed:  200
Pair ParpaluckP1: 54  ~  Frequency ParpaluckF1: 16

P  A  I  R  I  N  G  S     R  A  N  K  S               FREQUENCIES 'ANY POSITION'
Line  D R A W I N G S        LOWEST LAST RANK             HIGHEST 1ST RANK                     RANKS
no.                      PR#1 PR#2 PR#3 PR#4 PR#5     PR#1 PR#2 PR#3 PR#4 PR#5       #1   #2   #3   #4   #5   #6

1   4 18 20 32 43 47     4   18   20   32   43        6   13   20   41   46        23   26   29   33   42   49
2   2  5 19 22 23 31    11   14   29   32   36       11   14   29   32   36         1    5    7    8   12   24
3   1 22 31 33 34 46     6   11   22   31   34       15   16   32   41   45         2    9   15   30   31   34
4   8 16 31 37 44 49     8   16   31   37   44        8   16   31   37   44         3   11   18   42   43   44
5   9 14 35 37 39 41     2    3   35   37   39        9   20   23   34   38        13   23   26   30   39   49
6   1  6 30 42 43 44    10   15   25   30   43        5   20   21   37   43         3   17   18   25   37   47
7   3 22 24 26 28 49     3   22   24   26   28        9   10   20   25   48         4   26   33   42   44   49
...
```

In addition, Reporting creates automatically 4 files that are needed by the rest of the functions (combinations generators). These text files are as exemplified for the 6-number lotto.

• MarkovNumbersL6 = all N numbers sorted from Hot to Cold;
```  22 44 31 37 38  5 46 24 39 42 43 19 23 47 29 14 33 36  2 20 21  4  1  6 25 28 49 18 32  8 34 35  9 10 11 13 41  3 15 26 16 17 30 40 45  7 12 48 27
```

• MarkovPairsPivL6 = all Pairs sorted from Hot to Cold on N rows - with PIVOT;
```  1 43 38  3 27  6 42  8 14 19 22 24  5 30 34 35  2  4 10 44 47 29 41 20 31 26 46 15 49 36 37 13 39 40 11 21 12 32 45 33 16 17 25 18  7 28 23 48  9
2  4 39  7 12 18 38  6 14 11 24 28 32 35 37  3 13 27  1 30 31 15 33  9 36 19 10 26 40 45 47 49 22 29 42  8 20 21  5 41 23 44 16 46 25 34 43 17 48
3  4  8  1 14 15 38 41 28 30  2 39 12 45 19 34 22 24 26  7 47 23  6 40 32 42 43 33 16 20 31 25 17 11 44 36 29 48 13 18 10  5 27 35 21 46 37  9 49
4 10 21  2 14 16  3 29 38 43 39 20 49 36 18 27 41 15 33 32 40  1  7 45 47  8 35 24 37 26 11 28  5 42 30 31 17 48 22 25 34  6 19  9 23 46 13 12 44
...
46 44 33 39  9  6 34 17 20 14 38 23 43  5 47 26 29 31 13  7 36  8  1 40 42 11 24 25 35 19 15 27 21 41 22 32 16 45  2 48 28  4 30 37 12  3 10 49 18
47 33 39 38 24 25 14 15 20 40 43  6 36 27 44 45  7 13  2 37  3 16 17 42  4  5  1 46 22 41 34  9 18 11 30 19 10 28 21 31 32  8 23 35 12 48 49 29 26
48 16 20 38 12 13  5  7 29 33 10 45 23 24 43 21  8 34 26 39 42 28 44  4 32 22 14 35 37  3 19 41  6  9 30 31 46 47 27 18  1 36 15 25 11 49 40  2 17
49  4  8 10 11 13 24 28  2 22 35 38 45 21  5  1 25 26 27  9 30 31 32 33 16 18 40 42 20 36 12 39  7 19 14 47 37 15 23  3 41 34 43 44 29 46  6 48 17
```

• MarkovPairsNoPL6 = all Pairs sorted from Hot to Cold on N rows - NO PIVOT
``` 43 38  3 27  6 42  8 14 19 22 24  5 30 34 35  2  4 10 44 47 29 41 20 31 26 46 15 49 36 37 13 39 40 11 21 12 32 45 33 16 17 25 18  7 28 23 48  9
4 39  7 12 18 38  6 14 11 24 28 32 35 37  3 13 27  1 30 31 15 33  9 36 19 10 26 40 45 47 49 22 29 42  8 20 21  5 41 23 44 16 46 25 34 43 17 48
4  8  1 14 15 38 41 28 30  2 39 12 45 19 34 22 24 26  7 47 23  6 40 32 42 43 33 16 20 31 25 17 11 44 36 29 48 13 18 10  5 27 35 21 46 37  9 49
10 21  2 14 16  3 29 38 43 39 20 49 36 18 27 41 15 33 32 40  1  7 45 47  8 35 24 37 26 11 28  5 42 30 31 17 48 22 25 34  6 19  9 23 46 13 12 44
...
44 33 39  9  6 34 17 20 14 38 23 43  5 47 26 29 31 13  7 36  8  1 40 42 11 24 25 35 19 15 27 21 41 22 32 16 45  2 48 28  4 30 37 12  3 10 49 18
33 39 38 24 25 14 15 20 40 43  6 36 27 44 45  7 13  2 37  3 16 17 42  4  5  1 46 22 41 34  9 18 11 30 19 10 28 21 31 32  8 23 35 12 48 49 29 26
16 20 38 12 13  5  7 29 33 10 45 23 24 43 21  8 34 26 39 42 28 44  4 32 22 14 35 37  3 19 41  6  9 30 31 46 47 27 18  1 36 15 25 11 49 40  2 17
4  8 10 11 13 24 28  2 22 35 38 45 21  5  1 25 26 27  9 30 31 32 33 16 18 40 42 20 36 12 39  7 19 14 47 37 15 23  3 41 34 43 44 29 46  6 48 17
```

• MarkovFollowersL6 = Markov Chains Followers for all N lotto numbers - NO PIVOT.

```  2  3  4  5  6 10 17 22
7  4  5  3 16 21 22
11 15 18 22
8 11 10 12 15 18
-1
...
47  4  5 13 23  1
4  6 11 15
-1
1  3  8  9
```

• MarkovLikePairsL6 = Followers-like Pairs for all N numbers - NO PIVOT.

``` 15 30 11  1 16  2 32 47
1 11 18 42 44
12 13 28 31 34
11 21 26 32 46
-1
...
26 11 20 21  7 32 33 35 40
2  3 15 30 32
-1
4 11 17 33 41
21 23 18  2  4 28 32 42
```

• The first version of this software triggered an error if the user chose a very low range of analysis. It happened that a few lotto numbers might not have had followers. The user would see empty lines: Numbers did not come out, therefore had no followers. You would have to run the Report function again with higher (longer) parpalucks.
• Important changes to the Markov Chain programs, November 2015: Both Followers and Follower-like Pairings can have null lines; i.e. no Followers or no Pairings.
• A null line is represented by -1 (minus 1).
• Also, Followers and Follower-like Pairings are generated by the same methodology.
• The Followers are still calculated by the longer analysis range for pairings (ParpaluckP)
• The Follower-like Pairings are generated by the shorter analysis range for number frequency (ParpaluckF).
• This Markov Chains methodology shows an improvement in performance based on analyses of past drawings in several lottery games. Plus, there are no more errors caused by empty lines (null values).

The program offers defaults for the ranges of analysis or parpalucks. You can also choose your own parameters, of course. You might want to try lower parpaluck values than the defaults. Go back in your data file several draws and check how your strategies would fare.

## 4. Generate Combinations in Markov Chains Software

There are 5 combination generating methods in this type of software: Functions H, P, N, M, C in the main menu.

• The function H = Combinations of Hot Numbers generates combinations from Hot-to-Cold numbers from the file created automatically by Reporting. The user chooses the number ranks to generate combinations from. You can see in the main report that a lotto drawing consists of the top half of hot numbers or the top half of cold numbers. Therefore, generating combinations from top hot only or top cold only makes a good candidate for the LIE elimination feature of LotWon lottery software.

Since the combinations will miss 1 or 2 or even 3 of winning lotto numbers in a real drawing, we can apply the LieID5, or LieID4, or even LieID3 filters. This statement is especially true for the very next lottery drawing, and most likely the next 5-6 draws.

• The function P = Generate Combinations from Pairings with PIVOT. The report file MarkovPairsPivL6 shows all lotto numbers and their pairings from HOT to COLD. You can choose a RANGE of ranks in the frequency matrix to generate combinations from; e.g. for the hottest 10 numbers AND the hottest 10 pairs. Each lotto number is pivot: it appears in all combinations generated. The lotto combinations generated by this function also make good candidates for the LIE elimination feature of LotWon lottery software.

• The function N = Generate Combinations from HOT-to-COLD Pairings. The file MarkovPairsNoPL6 shows all lotto numbers and their pairings from hot to cold. You can choose a range of ranks in the frequency matrix to generate combinations from; e.g. for the hottest 10 numbers AND the hottest 10 pairs. The lottery combinations generated by this function also make good candidates for the LIE elimination feature of LotWon lotto software.

• The function M = Generate Combinations from Pairings as Markov Chains. The combinations generated are Markov-style, but not entirely. Instead of randomly picking numbers from a list of Followers, the numbers are randomly picked from the Followers-like Pairs file, MarkovLikePairsL6. The lotto combinations generated by this function also make good candidates for the LIE elimination feature of LotWon lottery software.

• The function C = Generate Combinations as Traditional Markov Chains. The combinations follow the traditional Markov-Chains-generating. The function randomly picks numbers from the followers list (MarkovFollowersL6). The lottery combinations generated by this function also make good candidates for the LIE elimination feature of LotWon lotto software. This statement is especially true for the very next drawing, and most likely the next 5-6 lotto draws, as no significant lottery prizes are expected.

• Both Markov-Chains-style generators strip the duplicates: The users gets only unique lottery combinations. For example, I generate traditional Markov Chains combinations for my pick 3 lottery game. I choose to generate 1000 random pick-3 sets based on the last (most recent) lottery drawing. The final output is around 90 unique combinations.

## 5. Strategies for Markov Chains in Lottery, Lotto, Horse Racing

A. You've read in the previous section about one type of lottery strategies created by this type of software: LIE elimination.

B. The other type is straight lottery strategy. That is, generate lottery combinations to win directly, instead of generating and then lie-eliminating.

• The player generates combinations and plays them for a range of future drawings known as the cycle of fruition. The software user tests first how various functions of combination generating fared in past lottery drawings. You open your real data file (actual lottery drawings) and delete, say, the top 100 draws. Save As the file (e.g. Data-6.2). Be careful NOT to Save the file (you'd lose 100 real drawings!) Create a D6.2 file with Data-6.2 at the top. Generate combosnations and save them to an output file.
• In Super Utilities, check for winners in the output file against the original data file (e.g. Data-6). Check (the top) 100 lottery draws in the data file and all the combinations in the output file. See how many drawings elapsed from draw #100 to the first major win (e.g. 4 of 6 or 5 of 6, mare rarely a 6 of 6). Those values represent cycles of fruition.
• The cycles of fruition can be a valuable indicator of establishing a pivot: the draw in the data file when to start the strategy (generating combinations). For example, if you see draw #80 as the first major hit, the fruition cycle would be 20 (100 – 80). We apply a safety margin and establish the pivot 15 draws back. Thus, we delete the top 15 drawings in the lottery data file. Save As and recreate the D6.2 file, then generate combinations to play. Read more on where to establish a pivot for a particular strategy: First Lottery Systems, Gambling Systems on Skips, Software.

## 6. Resources in Lotto Software, Strategies, Lottery Systems

See a comprehensive directory of the pages and materials on the subject of lottery, software, systems, lotto wheels.

| Home | Search | New Writings | Odds, Generator | Contents | Forums | Sitemap |