Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Coverage Calculations

728 views
Skip to first unread message

Yang Michael

unread,
Sep 2, 2013, 11:51:41 PM9/2/13
to
Hello Colin Fairbrother, Michael, and all the other coverage experts.

I currently develop my own software program to keep track of my lottery hobby. My newest task is to include lottery systems, in particular wheeling systems. From the scratch, i first calculated all coverages for a given set of draws by the Brute-force method. For the 3if3, 4if4, 5if5 and 6if6, the task is easy and fast (no brute-force required). However, as it was clear to me from the very beginning, the 3if4, 3if5, ...coverages take a long time using the brute-force approach due to the many-fold comparisons. Therefore i started to think about more efficient methods to calculate the 3if4,3if5,... coverages.

Having a look at the available wheeling softwares in the internet, I very soon found the "Covermaster" program. The enourmous speed of the coverage calculations showed me that there must be a MUCH more elegant way to calculate the coverages. Driven by this fact, i checked the internet again with the hope to find some hints about the calculation mechanism in Covermaster. The search directed me to this lottery news group, where i read some posts of Colin, Michael, and others written in 2009. Reading all the comments in the posts i figured out that the author of Covermaster, Honest John, makes a pretty big secret about the algorithm. Since he surely invested a lot of time to make all the optimizations i can understand this very well. Nevertheless, i saw the first attempts of Colin and Michael to implement a good coverage function. Actually, the initial part with limiting of the amount of neccessary comparisons for the test of a single draw was pretty similar to what i also considered before. But i realized pretty soon that it cannot work by only considering the entire draws with 6 numbers each. The problematic is that a given set of N draws contains a certain amount of subsets. These subsets intersect with each other and all subsets of the complete wheel together often do not represent the full coverage. The not well-defined (or maybe not fore-seeable) intersections make it difficult to determine the amount of combinations of one subset which are already covered by another subset.

In my opinion a fast method for coverage determination, such as perfectly achieved in Covermaster, cannot work if the operations are exclusively made on the sets of the complete 6-element-containing draws. In addition, I don't see the possibility to extract the coverages 3if4, 3if5, etc. only by operations on the lines in a wheel (A comment of Honest John would be nice :)). For fast and accurate processing, we probably have to go the opposite way. I suggest as a first step, to create an Array which holds all possible, unique 3-element subsets of all 6-element draws in the wheel. Or lets say, we better make a two-dimensional Array where the dimension i (the width) is equal to the amount of numbers in the number pool, and where the dimension j (the height) contains lines with information about the 3-element subsets.For example:

| 1 | 2 | 3 | 4 | 5 | <- dimension i, Pool = {1,2,3,4,5}
=====================
[ 2 , 0 , 0 , 2 , 2 ] <- subset [1,4,5] , Number 2 marks the element
[ 0 , 2 , 0 , 2 , 2 ] <- subset [2,4,5]
...
and all other unique 3-element subsets in the wheel

Based on this basic Matrix of 3-element subsets (i call it the 3-Matrix), I think it is a good idea to determine the number of all possible supersets. I already found an algorithm based on line comparison operations, which allows me to transform the 3-matrix into a 4-matrix (same dimensions as 3-Matrix, i.e., the size does not expand. Just the content changes). The resulting 4-Matrix is all what we need to get the 3if4 coverage as it directly gives the number of covered 4-element subsets. It also allows to quickly create a list with all covered 4-element subsets.

Implementing via this approach for a 6-pick 49-Pool wheel with 75 lines, shortend the calculation time for the 3if4 coverage from ca. 2000ms (Brute-Force) to ca. 20ms (Matrix-method). I should mention that the executable runs in the slower Delphi debug mode and the Windows 7 + Delphi platform both run within an Oracle Virtual Box :). If a new line is added to the wheel, the 3-Matrix can be just extended by the addition of the new subsets. The subsequent transformation to the 4-Matrix (or better modification of the existing 4-Matrix) has only to be carried out for the new subsets, i.e., the second and further coverage calculations for a growing wheel are significantly faster than the initial calculation.

I am currently thinking how to modify the 4-Matrix to the 5-Matrix, and the 5-Matrix to the 6-Matrix, in order to get the two coverages 3if5 and 3if6. After some first brainstorm yesterday, i am quite confident that this is also possible. It however, requires deeper thinking about the developing intersections.

I guess Covermaster takes a quite similar way. Especially because it works so fluently even with constantly increasing wheel size. This behavior and the very good speed indicate me that the current state of the wheel is probably saved in a kind of object which only needs to be updated if a new line is added to the wheel (similar to the way how my matrices would work).

Anyway, i would be very happy if the coverage experts here could give me some reply or comment :). And Colin, if this sounds wrong to you, please don't give me an award. I am definitely no dubious numerologist :P.

Many greets

Michael Yang

Colin Fairbrother

unread,
Sep 3, 2013, 7:48:39 AM9/3/13
to
Michael published the code in this newsgroup for fast coverage calculation. I was following and updating my methods to faster code as info was extricated from John Rawson the author of Covermaster.

The covers I prefer are those that don't repeat payable subsets, use all the integers for the relevant Lotto game (Pool) and are built progressively using next best play. Any number of lines up to 365 as for my 6/49 Lotto game Cover can then be used and will give over a reasonable number of draws the best yield.

So my approach is one of best yield.

Published Covers as at

La Jolla http://www.ccrwest.org/cover.html

or

Weef http://www.weefs-lottosysteme.de/systeme,en.htm


have as their objective the least number of lines to guarantee the specified prize for the combinations considered. If in a 6/49 Lotto game the Cover is for a CombThree win from all CombSixes as in C(49,6,3,6,1)=163 then because all combinations of 6 integers have been considered you can put the cart before the horse and say if the 6 winning integers are in your set then you win a prize.

You will find that cudos for producing Covers rest with the coding expertise of the authors who are very coy about releasing their code. Apart from some general stuff you will have to continue doing what you have been doing. For what I needed the code I wrote, albeit slow, did the job.

Colin Fairbrother
http://www.ColinFairbrother.com

Yang Michael

unread,
Sep 3, 2013, 10:31:17 PM9/3/13
to
Hello Colin,

thanks for the comments.

With "Michaels code" you mean the coverage calculation which restricts the comparisons to a subspace of all C_n(49,6) combinations, right? Did he publish any other code?

With "Info was extricated from John Rawson" you probably mean his suggestions to stop the comparisons earlier if a match was already obtained, right? Or did he also give some more sophisticated informations? There are thousands of posts and i couldn't check all for the last years.

According to your explanations you seem to be mainly interested in the 3if3, 4if4, 5if5, and 6if6 coverages. I guess you also calculate the 3if4 and other partial coverages by creating a list of 3's (4's, 5's) and then using Michaels code to compare with all 4's (5's, 6's) in the subspace to all possible 4's (5's, 6's). Can you give me some time values how long you need to calculate 3if4, 3if5, 3if6, 4if5, 4if6, and 5if6 for a particular wheel?, preferentially a bigger one, lets say 49-pool, 6-pick and 100 Lines wheel.

I will implement the 3if4 according to the subspace comparison method and the compare the required speed with an implementation of my Matrix idea. Then i will tell you if there is a significant difference or not.

In my opinion the right idea is the major parameter for high speed. Implementing the same basic idea as used in Covermaster should result in a software which is at least 80 to 90% as fast as Covermaster. The rest 10 to 20% are only achieved by sophisticated optimizations of the code, e.g., using the right data types, shortening loops, etc. I want to say the major part is more on the combinatorics side than on the coding expertise.

Considering me, i first want to get the right idea to approach the speed of Covermaster. After this i for would also start optimization.

You website is interesting. I will definitely read some articles when i have the time.

Many greets

Michael Yang



Colin Fairbrother

unread,
Sep 4, 2013, 12:24:34 AM9/4/13
to
Calculating the coverage of a Lotto Design for whatever parameters is relatively simple and can be done in a second or two. Analysing the design for whatever number of hits, finding the next best play and optimising the coverage of a set are more complicated.

I use my own code and am able to do all the usual tasks that people interested in this field of interest do. I finished basically what I set out to do but not without spending thousands of hours both in reading and writing code.

There are many articles and theses to be read for someone to be able to do the usual tasks in this area of interest. Can this be acquired by short cuts in a day or two - I doubt it. You haven't clearly stated your objectives which is why I am wary - for all I know you may hold nutcase numerology beliefs.

If you look at the La Jolla site there are listings of various construction methods and although I haven't looked some code as well.

A good starting point if you are serious is a free pdf thesis -

Search and Enumeration Techniques for Incidence Structures
http://www.cs.auckland.ac.nz/research/groups/CDMTCS//researchreports/085denny.pdf

by kiwi Paul C. Denny written in May 1998.

Colin Fairbrother
http://www.ColinFairbrother.com

Yang Michael

unread,
Sep 4, 2013, 1:06:01 AM9/4/13
to
As i said the coverage for 3if3 to 3if6 is fast and easy. The partial coverages 3if4, etc. are not easy due to the intersections of the subsets. Forget what i wrote in the previous post about the 3if4 coverage using Michaels code. It doesn't work that way due to the pairwise intersections of the subsets. That's also the reason why John "criticised" the approach of Michael and because he said that this only allows the evaluation of a single line. I am not sure whether you and Michael understand yet what John intended to tell you with his comments or not. John definitely has a much better overview about the whole problematics.

If you should use any kind of (maybe shortened) brute-force method to calculate the partial coverages, then i don't believe that you can calculate all partial coverages within a time-span of 2 seconds if the wheel is big (49-pool, 6-pick, 100 or more lines). We don't talk about tiny wheels. For tiny wheels even the full Brute-force method provides instantaneously the results.

At present my objective is to evaluate all coverages for a fixed given wheel. I don't care about designing wheels yet. If i can evaluate the coverages of a single wheel in a fast way then the rest is a minor task. Your aim is much different as you construct wheels from the beginning and you also put already constraints into the wheel by the way you construct it. For this case the whole calculation of the coverages can simplify enormously. For example, as you choose the numbers you already have information about the intersections. Did you ever calculate all coverages for a given wheel that was not constructed by yourself?

Concerning my "nutcase numerology believes". I hold a phd in physics and had computer science throughout the studies. You can believe me that my knowledge about math, probabilities, algorithms and programming is not the worst.

Thanks for the thesis, i will have a look at it.

Michael Yang

Colin Fairbrother

unread,
Sep 4, 2013, 1:28:08 AM9/4/13
to
I have published what I am interested in which you admit to not reading.

Some, including me, find it very annoying to have someone guess about what one has done, what one can do and what one is interested in when it is all there for the effort in viewing.

http://lottoposter.com/forum_posts.asp?TID=583&FID=47&PR=3

Colin Fairbrother

Yang Michael

unread,
Sep 4, 2013, 2:04:55 AM9/4/13
to
Sorry, but what should i do but guessing if all of your answers circle around my questions?

I am talking about the principle and problematics of coverage calculations and you just refer me to your self-created wheels and corresponding coverage statistics. How about answers like:

*) [yes]/[no] i [can]/[cannot] calculate all partial coverages for big wheels within 2 seconds even if i did not create them by myself
*) [yes]/[no] i [use]/[don't use] a kind of brute-force related approach

Since you celebrated the cascaded loop of Michaels first code like a Nobel prize i worry more about your programming and numerics expertise. Anyway, your specialized interest and your implementations seem to be far away from the general coverage calculation issues.

Thanks anyway,

Michael









Yang Michael

unread,
Sep 4, 2013, 2:20:11 AM9/4/13
to
Ok, i decided to disassemle Covermaster with a Debugger. Should be a rather simple task...

Colin Fairbrother

unread,
Sep 4, 2013, 3:56:50 AM9/4/13
to
On Wednesday, September 4, 2013 4:20:11 PM UTC+10, Yang Michael wrote:
> Ok, i decided to disassemle Covermaster with a Debugger. Should be a rather simple task...

That statement plus the others you made tells me that you're all blowhard and I have serious doubts about your coding ability. Opening C++ compiled code in a debugger - oh yeah. If you manage to decompile Covermaster I'll be the first to congratulate you. "... a rather simple task ...", oh yeah.

If you looked closer you would see I go beyond Covermaster when required for a Wheel Analyzer and give a full breakdown rather than summarize the other wins between say 0 and 5. I emphasized that in this newsgroup. Regarding Michael he lives in Sydney and I note that being a little tongue in cheek is not always recognized by some.

Seems to me the Ying is not in balance with the Yang. Maybe we should be looking at your published articles - but where are they?

Colin Fairbrother
http://www.ColinFairbrother.com

Yang Michael

unread,
Sep 4, 2013, 5:20:17 AM9/4/13
to
I am already checking his functions. Just because YOU cannot handle PCs doesn't mean that others cannot either...

You are going beyond Covermaster? You just created a big laugh in this room. You are working on a specialized subset of what Covermaster does. And honestly, one does not need to have a high IQ to realize that uniques 3's in a wheel will increase the coverage of 3's in a wheel. Your Hokus-Pokus would have worked in Middle Age but not in this century.

Don't worry my Ying is still balanced with my Yang.

I don't want to talk about Michael since i don't know him...

You do not intend to tell me that postings in newsgroups and forums can be called "publications", do you? Any honk on this planet can publish some crap in these media...

Yang Michael

unread,
Sep 4, 2013, 6:10:17 AM9/4/13
to
What do you want to know? How many Variables he defines when you press the "Quick report" button in the menu? Here is your answer with corresponding types:

int v1;
int v2;
int v3;
int result;
int v5;
signed int v6;
unsigned int i;
int v8;
int v9;
int v10;
int v11;
int v12;
char v13;
int v14;
int v15;
int v16;
int v17;
signed int v18;
int v19;
int v20;
int v21;
int v22;

Most are integers and one is of type char...

Colin Fairbrother

unread,
Sep 4, 2013, 7:04:17 AM9/4/13
to
It's a long way to the top if you want to rock 'n' roll.

Big difference between the names for a few variables and gleening or in your case stealing workable code.

If you wonder why I don't respond to most of the postulations you make it is because they are self-evidently false or based on wrong assumptions.

Keeping the paying sub-sets unique, using all the integers and not going overboard on coverage in order to get a better yield in Lotto is still not accepted by the likes of Professor Iliya Bluskov and was quite novel when I introduced it around 2005. Was it around in the middle ages? I doubt it.

It appears you couldn't work out that for a Wheel Analysis if I go beyond giving a range for winning subsets then I must have my own code to produce such data as it is not available from CoverMaster. See -

http://lottoposter.com/forum_posts.asp?TID=623&FID=46&PR=3

I maintain three websites -

http://www.LottoPoster.com
http://www.ColinFairbrother.com
http://www.LottoToWin.com

Where is your website?

Colin Fairbrother

Yang Michael

unread,
Sep 4, 2013, 7:42:42 AM9/4/13
to
That's because you not even know a dime about the matter i am trying to tell you. Your horizon is simply too short. The assumptions are correct and the 4-Matrix contains all covered 4-combinations. I said for given set of lines, i.e., for a given wheel i create a list of all unique 3's. I didn't say that i don't want to extend the wheel later. It's for the initial task to evaluate the current state of a wheel. Consequently it has nothing to do with being wrong or right according to the opinions of some professors.

I for sure can create wheels, and i am also sure that i can create functions to get the coverages for arbitrary wheels with a speed approaching Covermaster to about 80%. The thing is that Covermaster is AMAZINGLY fast, and right now i am just curious how John did it. I will not publish his idea anyway and only use the knowledge for my private program. So what's so bad about this?

If you don't believe that i can disassemble it, i can right now post you some meaningless little subfunctions and John can confirm you that they are part of his source-code. He didn't lie when he said that it is "very hardcoded". The most difficult part will be to decipher the meaning of all hardcoded numbers...

And by the way, you are from the top of "rock and roll" as far away as earth from the origin of big bang. Widen your horizon and try to understand the statements of other people.

Colin Fairbrother

unread,
Sep 4, 2013, 7:00:46 PM9/4/13
to
Some would find it odd that Yang Michael or Michal Yang with his wayward English syntax would seek to lecture me on English expression and comprehension. Some would find also his knowledge about the use of Covers or Wheels in Lotto woefully inadequate to the extent that it is pretty well impossible to take him seriously and to meaningfully discourse with him.

Re-reading his first post I see more flags that should have made me more than wary and rather alerted me to him being just another Lotto nutcase. eg "Coverages for a given set of draws" which is the same as Coverages for a given set of random combinations.

Over the years I've had a few communications with John Rawson and to the best of my knowledge he would not have a high regard for a would be thief of his code and while I'll admit his tolerance for Lotto nutcases is higher than mine I doubt whether he would be interested in having anything to do with such a Lotto ignoramus as Mr Michael Yang with his gross over familiarity.

Some would also note that his boast of "a simple task" to de-compile Covermaster is turning out to be not so simple.

I leave the last word to Mr Michael Yang as I will have no further truck with this nutcase.

Colin Fairbrother
http://www.ColinFairbrother.com


Yang Michael

unread,
Sep 5, 2013, 4:55:46 AM9/5/13
to
Stop crying and inform yourself about the possibilities and performances of today's disassemblers. Then you will notice that some of them can even produce a quite good readable C pseudo-code which is already close to the original code. Further they allow reverse engineering by identifaction of objects, structures, procedures, etc. However, based on your knowledge i would strongly advice you to stay with your Visual Basic stuff. -> PC nutcase

As you criticised my "list of unique 3's" used as a basis for the calculation of the 3if4 coverage, it seems clear to me that you have no clue about the real definition of coverage. Or you just ignore the definition to calculate your "best yield" stuff. I wouldn't trust any of the coverage calculations you did. -> Lottery nutcase

Why the hell do i waste my time to talk with a narrow-sighted man, who thinks that he is the lotto-god. Again, don't critizise things if you don't understand them.

Yang Michael

unread,
Sep 6, 2013, 4:14:12 PM9/6/13
to
To John Rawson,

Hello John, I continued the development of the "matrix method". Please see my original post above for the basic idea. The method works very well and fast for all kind of coverages and has some good advantages as compared to manyfold cascaded for-loops:

1) The transitions from 3-Matrix to 4-Matrix to 5-Matrix to 6-Matrix automatically provide all relevant supersets without having to make any comparisons with uncovered supersets. The complexities of the algorithms for the matrix transformations are very low.

2) No hard-coding needed. The source-code is simple readable and can be easily modified. Just one cascaded {for i {for j}} loop required (2D Arrays) for each Matrix transformation. No need for plenty GOTOS, breaks, and "case of" definitions.

2) Each Matrix contains the number of covered supersets and all the combinations can be extracted from the scratch from the matrix. Actually, if done in a clever way, a single matrix can represent the information of several matrices. For example the coverages of 3if4 and 3if5 can be extracted from the 3if5 matrix only (a little hint for you to find the matrices :)).

3) After creation of each Matrix the amount of lines can be significantly reduced as some lines are completely covered by others.

4) Once the matrices are created, new lines can be easily added to the wheel and the line information appended to each matrix. Only the parts added to the matrix have to be recalculated during the coverage calculations. This should give a big performance boost for the calculation of the partial coverages (3if4, 3if5, etc.). I didn't implement full wheel creation yet, but i assume that the speed for it will be quite close or even faster than the speed of 3if3, 4if4, ... calculations.

Feel free to give it a try, you just need to develop the matrix operations.

To prevent stupid comments from Colin: all calculated coverages have been crosschecked with the results of Covermaster for several small and large wheels. And no, you cannot have the source-code. And yes, you have to wait until John is ready with the calculations.

"Only two things are infinite, the universe and human stupidity, and I'm not sure about the former." (Albert Einstein)

Michael Yang

Colin Fairbrother

unread,
Sep 9, 2013, 1:24:54 AM9/9/13
to
Previous threads on this topic in this newsgroup with actual code are:

Coverage Calculation Speed in VBA, VB, C# and C++
Colin Fairbrother
https://groups.google.com/forum/#!topic/rec.gambling.lottery/OWyS57-aAkI/pDTBUiLmKlEJ

100 Random Lines Coverage
Michael Harrington
https://groups.google.com/forum/#!topic/rec.gambling.lottery/DGCv57Fn0tI/cQzUIqgmSIkJ

The Need for Speed
Michael Harrington
https://groups.google.com/forum/#!topic/rec.gambling.lottery/QdebsUcCZwI/vSgONQgsjTYJ

Colin Fairbrother
http://ColinFairbrother.com

Parpaluck

unread,
Sep 11, 2013, 1:15:06 PM9/11/13
to
On Monday, September 9, 2013 1:24:54 AM UTC-4, Colin Fartbrothel wrote:
> Previous threads on this topic in this newsgroup with actual code are:
>
> http://ColinFartbrothel.sCum

“Psycholin, Psycholin,
Urlatorul din maslin.”
(The screamer in the olive tree)

“The cuckoo was standing up in the olive tree and shouting:
“I want a woman!”

Very similarly, this psycho here, F-coli (Psycholin) climbed a cyber-tree and keeps shouting:
“I want a lotto wheel!””

Now, that’s the best in lotto wheels, lotto designs, coverage, etc.:

https://groups.google.com/forum/#!searchin/rec.gambling.lottery/colin$20olive$20tree$20amarcord/rec.gambling.lottery/G9xa__J-MfM/wuMSCUR0mJ0J

We even created a free lotto wheeling program — CoveredPsycholin.EXE (source code readable). More FREE lotto wheeling software and FREE lotto wheels can be downloaded here:

http://saliu.com/freeware/

or here:

http://www.filefishstick.com/61475/details-lottery-wheeling-software.html

Best of luck, axiomatics!



0 new messages