Welcome Guest
Log In | Register )
You last visited January 22, 2017, 7:16 pm
All times shown are
Eastern Time (GMT-5:00)

wheel algorithms?

Topic closed. 42 replies. Last post 4 years ago by SergeM.

Page 3 of 3
4.73
PrintE-mailLink
RL-RANDOMLOGIC's avatar - usafce

United States
Member #59354
March 13, 2008
4091 Posts
Offline
Posted: February 28, 2013, 10:18 am - IP Logged

I am interested in learning about lottery wheel algorithms, specifically for abbreviated wheels.

And I am interested in techniques for proving that the resulting wheel is "mathematically minimal" (and "balanced"?)

(What makes a wheel "well-balanced"?  Is it just some subjective concept of the "variety" or "scope" of numbers; for example, 1 2 3 4 5 might be "poorly balanced", whereas 1 12 23 34 45 might be considered "well-balanced"?  Or is there a more-rigorous definition of "balanced"?)

Please note that I am interested in algorithms, not the wheels themselves.

So pointing me to the Lottery Wheels link is not sufficient, unless I overlooked a link to algorithms per se (where?).  Also, since I am not a gold or platinum member, the links there to particular wheels are not useful to me (other than as good examples).

However, there is a reference there to a book by Iliya Bluskov.  Does that book describe wheeling algorithms in sufficient detail to implement in a computer language?  Or does the book simply provide the wheels themselves?

(Or perhaps someone here can offer an algorithm in sufficient detail.)

A Google search has turned up some implementations.  I am still looking through the links.  However, the ones that I have seen so far are implemented in C++.  Although I have a lot of experience with C, I struggle to understand C++ implementations.  An implementation in C or VBA would be helpful.

In any case, I'm not sure I will know how to prove that the results are "good", much less "mathematically minimal".

For example, the wiki lottery wheel page (as well as a link in this forum's Lottery Wheel Pick-6 page) claims that an abbreviated wheel for 4-if-4-of-8 can be covered with as few as 7 tickets for 6-draw lottery.  I can easily do that in 15 tickets.  But I have not yet been able to pare that down to 7, even manually, much less algorithmically.  (Moreover, my algorithm is not extensible to more 8 favored numbers.)

I would be grateful if someone could show me a 7-ticket wheel for 4-if-4-of-8 for a 6-draw lottery.  Then at least I know what I am shooting for.

MH

Most likely all you will find are general examples used to explain the theory.  I am sure most

would not be interested in sharing the actual code.  A good wheel has commerical value so it

would not be in the best interest of the programmer to share it.  Google "lottery wheel theory" 

and go from there.  Testing is fairly easy as you can compare against known wheels to see how

your code stacks up and to test coverage just build a pair, tray, quad, etc... generator and run

the results against the wheeled sets.   There use to be a website that listed the best of the

best for lines/coverage.  There is a free program called covermaste that I think can still be

downloaded that would be great for testing against your code.  I have never been able to build

a wheel that produced better results.

Cover master set for a pool of 8 pick-6 match-4 

results = 8 lines

1 2 3 4 5 6
1 2 3 4 7 8
1 2 5 6 7 8
3 4 5 6 7 8
1 2 3 4 5 7
1 2 3 4 5 8
1 2 3 4 6 7
1 2 3 4 6 8

here are the possible 70,  4 number matches

01 02 03 04
01 02 03 05
01 02 03 06
01 02 03 07
01 02 03 08
01 02 04 05
01 02 04 06
01 02 04 07
01 02 04 08
01 02 05 06
01 02 05 07
01 02 05 08
01 02 06 07
01 02 06 08
01 02 07 08
01 03 04 05
01 03 04 06
01 03 04 07
01 03 04 08
01 03 05 06
01 03 05 07
01 03 05 08
01 03 06 07
01 03 06 08
01 03 07 08
01 04 05 06
01 04 05 07
01 04 05 08
01 04 06 07
01 04 06 08
01 04 07 08
01 05 06 07
01 05 06 08
01 05 07 08
01 06 07 08
02 03 04 05
02 03 04 06
02 03 04 07
02 03 04 08
02 03 05 06
02 03 05 07
02 03 05 08
02 03 06 07
02 03 06 08
02 03 07 08
02 04 05 06
02 04 05 07
02 04 05 08
02 04 06 07
02 04 06 08
02 04 07 08
02 05 06 07
02 05 06 08
02 05 07 08
02 06 07 08
03 04 05 06
03 04 05 07
03 04 05 08
03 04 06 07
03 04 06 08
03 04 07 08
03 05 06 07
03 05 06 08
03 05 07 08
03 06 07 08
04 05 06 07
04 05 06 08
04 05 07 08
04 06 07 08
05 06 07 08

 

RL

Working on my Ph.D.  "University of hard Knocks"

I will consider the opinion that my winnings are a product of chance if you are willing to consider

they are not.  Many great discoveries come while searching for something else

USAF https://en.wikipedia.org/wiki/Prime_Base_Engineer_Emergency_Force

  US Flag Trump / 2016 & 2020  

    Avatar

    United States
    Member #130795
    July 25, 2012
    80 Posts
    Offline
    Posted: February 28, 2013, 12:33 pm - IP Logged

    The wheel you've generated should have the additional information as follows:

    Wheel
    - Pick 5
    - 9 Numbers
    - 5 Combinations
    - 3.968254% Coverage of 126 Combinations

    Condition
    - If 4 Drawn Numbers are in the Set of 9 Numbers,
    - Then at least 1 Combination has 3 Winning Numbers.
    ____________________________________________
    05 06 07 08 09
    01 03 04 06 09
    02 03 04 08 09
    01 02 06 07 08
    01 02 03 04 05
    ____________________________________________

    When reading the condition you should understand the second part '- Then at least 1 Combination has 3 Winning Numbers.' to mean that a line will have At Least that many or more winning numbers.

    This means if the condition is '3 Winning Numbers', then there could be a winning line with 3 or 4 winning numbers, because the other part of the condition is '4 Drawn Numbers are in the Set of 9 Numbers,".

    Also, these mean the following:

    Set - The wheel pool of numbers you are playing; typically less than the lottery pool of numbers being drawn.
    Pick - The number of balls being drawn for that lottery pool of numbers.
    Match - The quantity of drawn numbers that match your wheel pool numbers.
    Win - Guaranteed to have at least 1 line with that many matching numbers in the wheeled combination or more.

    If there is a line with 4 winning numbers, it definitely has any combination of 3 winning numbers, and thus qualifies as having 3 Winning numbers; even if there are no lines with just 3 winning numbers.

    We'd prefer the 4 winning numbers line than just 3.

    JADELottery wrote:  ``The wheel you've generated should have the additional information as follows:  [....] 3.968254% Coverage of 126 Combinations``.

    Thanks for adding your expert and practical knowledge to this discussion.  Your step-by-step description of the behavior of your algorithm in the aforementioned discussion was very clear and helpful to me.  (Thanks to Ramijami for pointing me to it.)

    Could you explain the derivation of that percentage figure?

    That particular wheel covers 25 of the possible 126 4-tuples, which is about 19.84%.

    It also covers 46 of the possible 84 3-tuples, which is about 54.76%.

    -----

    Also, it does not seem like your algorithm makes any effort to derive an "optimal" wheel -- the minimum number of tickets to play.

    How would we compute the theoretical minimum wheel for the t<m requirement?

    The computation is straight-forward for the t=m requirement like my original (8,6,4,4)=b example.  Using Excel nomenclature, it is ROUNDUP(COMBIN(8,4)/COMBIN(6,4),0) = 5.

    (Of course, I know we might not -- probably cannot -- achieve that theoretical minimum, as "lotteryarchitect" noted.  In fact, for (8,6,4,4)=b, I can demonstrate that b=7 is indeed the minimum (optimum); and there are 280 such 7-ticket wheels.)

    Likewise, for (9,5,4,4)=b, it would be ROUNDUP(COMBIN(9,4)/COMBIN(5,4),0) = 26.

    Obviously, the theoretical minimum is much smaller for (9,5,3,4)=b.  Your algorithm generated b=5 in your example.

    But I cannot predict that or a smaller theoretical minimum, if any.

      Avatar
      bgonçalves
      Brasil
      Member #92564
      June 9, 2010
      2136 Posts
      Offline
      Posted: February 28, 2013, 12:55 pm - IP Logged

      Hello, mathhead, one could also think of a new model of wheels, ie generate
        Wheels with delta values ??at each position, so instead of choosing numbers
        At each position delta values ??which can be coordinated vaores of deltas
        Value of the horizontal (the same bet delta position by position) and also
        Delta vertical line pair another hit = condition has saddled the delta of horizontal and vertical delta (the latter for the penultimate draw) the pivot is the last draw, this type of wheel has not been created in the world, wants to know how to create algorithm
        Get well,

        JADELottery's avatar - YingYangYong 01.PNG
        The Quantum Master
        West Concord, MN
        United States
        Member #21
        December 7, 2001
        3684 Posts
        Offline
        Posted: February 28, 2013, 5:24 pm - IP Logged

        JADELottery wrote:  ``The wheel you've generated should have the additional information as follows:  [....] 3.968254% Coverage of 126 Combinations``.

        Thanks for adding your expert and practical knowledge to this discussion.  Your step-by-step description of the behavior of your algorithm in the aforementioned discussion was very clear and helpful to me.  (Thanks to Ramijami for pointing me to it.)

        Could you explain the derivation of that percentage figure?

        That particular wheel covers 25 of the possible 126 4-tuples, which is about 19.84%.

        It also covers 46 of the possible 84 3-tuples, which is about 54.76%.

        -----

        Also, it does not seem like your algorithm makes any effort to derive an "optimal" wheel -- the minimum number of tickets to play.

        How would we compute the theoretical minimum wheel for the t<m requirement?

        The computation is straight-forward for the t=m requirement like my original (8,6,4,4)=b example.  Using Excel nomenclature, it is ROUNDUP(COMBIN(8,4)/COMBIN(6,4),0) = 5.

        (Of course, I know we might not -- probably cannot -- achieve that theoretical minimum, as "lotteryarchitect" noted.  In fact, for (8,6,4,4)=b, I can demonstrate that b=7 is indeed the minimum (optimum); and there are 280 such 7-ticket wheels.)

        Likewise, for (9,5,4,4)=b, it would be ROUNDUP(COMBIN(9,4)/COMBIN(5,4),0) = 26.

        Obviously, the theoretical minimum is much smaller for (9,5,3,4)=b.  Your algorithm generated b=5 in your example.

        But I cannot predict that or a smaller theoretical minimum, if any.

        Thanks for adding your expert and practical knowledge to this discussion.  Your step-by-step description of the behavior of your algorithm in the aforementioned discussion was very clear and helpful to me.  (Thanks to Ramijami for pointing me to it.)

        Could you explain the derivation of that percentage figure?

        That particular wheel covers 25 of the possible 126 4-tuples, which is about 19.84%.

        It also covers 46 of the possible 84 3-tuples, which is about 54.76%.

            5 wheel combos / 126 total possible combos of 9 numbers taken 5 at a time = 5 / 126 ≈ .03968254 or 3.968254%.

            Those other percentages you've derived are likely accurate.


        -----

        Also, it does not seem like your algorithm makes any effort to derive an "optimal" wheel -- the minimum number of tickets to play.

            Actually it does.

            However, it's based on a different definition of 'optimal'.

            'Quantumly Optimal' is the better description for what the algorithm is doing.

            You'll notice that each time you build a new wheel, it usually has a different set of combinations depending on the wheel generator settings.

            This is because the algorithm is randomly working toward a minimal set of combinations or combinatoric ground state for those wheel settings.

            For larger wheel pool sets, trying to find a minimum combination set gets very time consuming.

            We're talking geometrically, exponentially far beyond the simple total set of all possible wheel combinations.

            The algorithm works near the combinatoric ground state, giving you a wheel that is very near what you would consider 'optimal'.

         

        How would we compute the theoretical minimum wheel for the t<m requirement?

            There might be one out there, but we haven't come across any or thought of deriving any.

            We look at this as kind of like data compression.

            You want to get as much crammed in to as small a space as possible.

            That's why most compression is algorithmic, with sprinkles of mathematical computation to make that batch of goodies come out just right...  hmmm, goooddiees...  ssshhhuppp...

            Anyway, if there is one, it will be a while before it becomes known, or sooner than we think.

            This is the Quantum approach to the problem.


        The computation is straight-forward for the t=m requirement like my original (8,6,4,4)=b example.  Using Excel nomenclature, it is ROUNDUP(COMBIN(8,4)/COMBIN(6,4),0) = 5.

        (Of course, I know we might not -- probably cannot -- achieve that theoretical minimum, as "lotteryarchitect" noted.  In fact, for (8,6,4,4)=b, I can demonstrate that b=7 is indeed the minimum (optimum); and there are 280 such 7-ticket wheels.)

        Likewise, for (9,5,4,4)=b, it would be ROUNDUP(COMBIN(9,4)/COMBIN(5,4),0) = 26.

        Obviously, the theoretical minimum is much smaller for (9,5,3,4)=b.  Your algorithm generated b=5 in your example.

        But I cannot predict that or a smaller theoretical minimum, if any.

            If 5 is better than 7, hey, let's go with that.

        Presented 'AS IS' and for Entertainment Purposes Only.
        Any gain or loss is your responsibility.
        Use at your own risk.

        Order is a Subset of Chaos
        Knowledge is Beyond Belief
        Wisdom is Not Censored
        Douglas Paul Smallish
        Jehocifer

          Avatar

          United States
          Member #130795
          July 25, 2012
          80 Posts
          Offline
          Posted: February 28, 2013, 6:28 pm - IP Logged

          JADELottery wrote:  ``5 wheel combos / 126 total possible combos of 9 numbers taken 5 at a time = 5 / 126 ≈ .03968254 or 3.968254%.``

          Aha!  Thanks.

            lottoarchitect's avatar - waveform

            Greece
            Member #2815
            November 18, 2003
            502 Posts
            Offline
            Posted: March 1, 2013, 4:51 am - IP Logged

            How would we compute the theoretical minimum wheel for the t<m requirement?

             

            Check my forums at the "knowledge base" section. I have that equation for the general case posted there. It is the absolute minimum lowest bound however which assumes the wheel is a packed design which means a combination is covered by one and only one block in our wheel.

              BobP's avatar - bobp avatar.png
              Dump Water Florida
              United States
              Member #380
              June 5, 2002
              3114 Posts
              Offline
              Posted: March 1, 2013, 5:07 am - IP Logged

              Pool=v=the total balls we want to wheel
              Pick=k=the ticket size (e.g. a 6 ball game has k=6)
              Match=t=the prize division we want to guarantee a win
              Hit=m=the condition that has to be met, in order to guarantee the t prize division win; m defines the least number of balls from our v set that must be correct.
              Tickets=b=the total tickets required to play.
              Assumes wheel is 100% less show percent= 66%(49,6,3.6)=46 may be 100% for lower tier prizes.
              Match=t on some software can be set for multiple prizes x3 etc.

              lotto-logix.com/wheellinks.html

              BobP

               1  2  3  4  5  6
               1  2  7  8  9 10
               1  2 11 12 13 14
               1  2 15 16 17 18
               1  2 19 20 21 22
               1  3  7 11 15 19
               1  3  8 12 16 20
               1  3  9 13 17 21
               1  3 10 14 18 22
               1  4  7 12 17 22
               1  4  8 11 18 21
               1  4  9 14 15 20
               1  4 10 13 16 19
               1  5  7 13 18 20
               1  5  8 14 17 19
               1  5  9 11 16 22
               1  5 10 12 15 21
               1  6  7 14 16 21
               1  6  8 13 15 22
               1  6  9 12 18 19
               1  6 10 11 17 20
               2  3  7 12 18 21
               2  3  8 11 17 22
               2  3  9 14 16 19
               2  3 10 13 15 20
               2  4  7 11 16 20
               2  4  8 12 15 19
               2  4  9 13 18 22
               2  4 10 14 17 21
               2  5  7 14 15 22
               2  5  8 13 16 21
               2  5  9 12 17 20
               2  5 10 11 18 19
               2  6  7 13 17 19
               2  6  8 14 18 20
               2  6  9 11 15 21
               2  6 10 12 16 22
               3  4  7  8 13 14
               3  4  9 10 11 12
               3  4 15 16 21 22
               3  4 17 18 19 20
               3  5  7 10 16 17
               3  5  8  9 15 18
               3  5 11 14 20 21
               3  5 12 13 19 22
               3  6  7  9 20 22
               3  6  8 10 19 21
               3  6 11 13 16 18
               3  6 12 14 15 17
               4  5  7  9 19 21
               4  5  8 10 20 22
               4  5 11 13 15 17
               4  5 12 14 16 18
               4  6  7 10 15 18
               4  6  8  9 16 17
               4  6 11 14 19 22
               4  6 12 13 20 21
               5  6  7  8 11 12
               5  6  9 10 13 14
               5  6 15 16 19 20
               5  6 17 18 21 22
               7  8 15 17 20 21
               7  8 16 18 19 22
               7  9 11 14 17 18
               7  9 12 13 15 16
               7 10 11 13 21 22
               7 10 12 14 19 20
               8  9 11 13 19 20
               8  9 12 14 21 22
               8 10 11 14 15 16
               8 10 12 13 17 18
               9 10 15 17 19 22
               9 10 16 18 20 21
              11 12 15 18 20 22
              11 12 16 17 19 21
              13 14 15 18 19 21
              13 14 16 17 20 22
              (22,6,3,3)=77

                lakerben's avatar - Lottery-061.jpg
                New Mexico
                United States
                Member #86099
                January 29, 2010
                11167 Posts
                Offline
                Posted: March 1, 2013, 12:23 pm - IP Logged

                That's an ironic comment, considering the "systems" that you suggest in other discussions (e.g, click here).

                Humor aside, I want to reiterate that I am not interested in using wheels.  I am interested in understanding the algorithms for generating wheels.  It is an academic exercise for my own edification.

                So comments like yours are neither helpful nor wanted in this discussion.  In fact, they are never constructive, IMHO.

                It was not meant to funny, but some people would take it as such.  It is very helpful in the fact that the big games can be won without wheels.  Wheels are fine but an element of luck and timing are part of the winning equation. So, endless babbling about balanced wheels, and which wheel is best serves no purpose in the pursuit of winning

                 

                Bed

                US Flag

                  SergeM's avatar - slow icon.png
                  Economy class
                  Belgium
                  Member #123700
                  February 27, 2012
                  4035 Posts
                  Offline
                  Posted: March 1, 2013, 1:24 pm - IP Logged

                  I wrote my own simple wheels by myself without copying anyone. Picking the right numbers is the key. Who can afford big wheels anyway?

                    BobP's avatar - bobp avatar.png
                    Dump Water Florida
                    United States
                    Member #380
                    June 5, 2002
                    3114 Posts
                    Offline
                    Posted: March 1, 2013, 2:07 pm - IP Logged

                    It was not meant to funny, but some people would take it as such.  It is very helpful in the fact that the big games can be won without wheels.  Wheels are fine but an element of luck and timing are part of the winning equation. So, endless babbling about balanced wheels, and which wheel is best serves no purpose in the pursuit of winning

                     

                    Bed


                    In general I agree.  I am always amazed when people talk about testing wheels against a draw or history to see which would be the better wheel for future draws.

                    However, there are better wheels to use, those with multiple prize tier guarantees or better percentage of coverage for the prize desired.  Some wheels just plain blow others away.

                    Like this one with an 88% (12,6,5,6)=22 where if you have all six winning numbers among the 12 and don't win the 5# prize you are guaranteed to win 9 4# prizes plus 4 3# prizes instead.

                     1  2  3  4  9 11
                     1  2  3  6 10 12
                     1  2  4  6  7  8
                     1  2  5  7 10 11
                     1  2  5  8  9 12
                     1  3  4  5  8 10
                     1  3  5  6  7  9
                     1  3  7  8 11 12
                     1  4  5  6 11 12
                     1  4  7  9 10 12
                     1  6  8  9 10 11
                     2  3  4  5  7 12
                     2  3  5  6  8 11
                     2  3  7  8  9 10
                     2  4  5  6  9 10
                     2  4  8 10 11 12
                     2  6  7  9 11 12
                     3  4  6  7 10 11
                     3  4  6  8  9 12
                     3  5  9 10 11 12
                     4  5  7  8  9 11
                     5  6  7  8 10 12

                    A wheel is a net of numbers woven to catch a prize, quality helps toward that goal.

                    You don't need a net to catch a lottery prize any more then to catch a fish.

                    BobP

                      SergeM's avatar - slow icon.png
                      Economy class
                      Belgium
                      Member #123700
                      February 27, 2012
                      4035 Posts
                      Offline
                      Posted: March 1, 2013, 2:30 pm - IP Logged

                      I am posting a wheel under All Or Nothing, it probably guarantees a hit percentage over twenty. This is one of my own wheels.

                      <=4 and >=8, pays for this 12/24 game.

                      Yesterday's results:

                      1236781112131617186, 6, 7, 5
                      1246791112141617195, 8, 9, 5
                      12567101112151617208, 7, 7, 6
                      1346891113141618195, 7, 7, 7
                      13568101113151618208, 6, 5, 8
                      14569101114151619207, 8, 7, 8
                      2347891213141718195, 6, 7, 4
                      23578101213151718208, 5, 5, 5
                      24579101214151719207, 7, 7, 5
                      34589101314151819207, 6, 5, 7
                        Avatar
                        Krypton
                        United States
                        Member #140102
                        March 11, 2013
                        904 Posts
                        Offline
                        Posted: March 22, 2013, 1:08 am - IP Logged

                        I am posting a wheel under All Or Nothing, it probably guarantees a hit percentage over twenty. This is one of my own wheels.

                        <=4 and >=8, pays for this 12/24 game.

                        Yesterday's results:

                        1236781112131617186, 6, 7, 5
                        1246791112141617195, 8, 9, 5
                        12567101112151617208, 7, 7, 6
                        1346891113141618195, 7, 7, 7
                        13568101113151618208, 6, 5, 8
                        14569101114151619207, 8, 7, 8
                        2347891213141718195, 6, 7, 4
                        23578101213151718208, 5, 5, 5
                        24579101214151719207, 7, 7, 5
                        34589101314151819207, 6, 5, 7

                        Can you explain ths to me please?

                          SergeM's avatar - slow icon.png
                          Economy class
                          Belgium
                          Member #123700
                          February 27, 2012
                          4035 Posts
                          Offline
                          Posted: March 23, 2013, 6:33 pm - IP Logged

                          The wheel you've generated should have the additional information as follows:

                          Wheel
                          - Pick 5
                          - 9 Numbers
                          - 5 Combinations
                          - 3.968254% Coverage of 126 Combinations

                          Condition
                          - If 4 Drawn Numbers are in the Set of 9 Numbers,
                          - Then at least 1 Combination has 3 Winning Numbers.
                          ____________________________________________
                          05 06 07 08 09
                          01 03 04 06 09
                          02 03 04 08 09
                          01 02 06 07 08
                          01 02 03 04 05
                          ____________________________________________

                          When reading the condition you should understand the second part '- Then at least 1 Combination has 3 Winning Numbers.' to mean that a line will have At Least that many or more winning numbers.

                          This means if the condition is '3 Winning Numbers', then there could be a winning line with 3 or 4 winning numbers, because the other part of the condition is '4 Drawn Numbers are in the Set of 9 Numbers,".

                          Also, these mean the following:

                          Set - The wheel pool of numbers you are playing; typically less than the lottery pool of numbers being drawn.
                          Pick - The number of balls being drawn for that lottery pool of numbers.
                          Match - The quantity of drawn numbers that match your wheel pool numbers.
                          Win - Guaranteed to have at least 1 line with that many matching numbers in the wheeled combination or more.

                          If there is a line with 4 winning numbers, it definitely has any combination of 3 winning numbers, and thus qualifies as having 3 Winning numbers; even if there are no lines with just 3 winning numbers.

                          We'd prefer the 4 winning numbers line than just 3.

                          I am having a look at this wheel for keno. So for 5 euro costs I get with 4/9:

                          Payout €P()
                          2     0,26
                          4     0,42
                          5     0,10
                          6     0,12
                          7     0,08
                          9     0,02

                          I have to play by two tickets, so I must play 6 euro.
                          The expectation for the payout is 4.16 € with 4/9.

                          For 5/9: E(payout)=14.68

                          Payout €P()
                          6       0,09
                          7       0,10
                          8       0,20
                          9       0,33
                          10       0,03
                          11       0,14
                          12       0,06
                          14       0,02
                          15       0,01
                          152       0,02
                          154       0,02

                          That is guaranteed break even, on the other side 5/9 as pick 9 pays 2 for 1.

                          I let you find my conclusion.