Jump to content

Lotto Calculations!


Recommended Posts

Hi Jordan! This is an interesting problem, because I think that the lowest number of Guaranteed tickets has never been calculated. The 163 tickets that I mentioned were found by computer, but not mathematically, just randomly. Anyone who can beat that number will probably be the first person to do it. I must go through the details once more because some of your starting figures seem a little wrong to me.

 

 

Number of balls in machine = 49

Number of balls removed from machine = 6 (Numbered 1 to 49)

 

Number of choices on your ticket = 6

 

You have to get 3 right out of 6

 

So what is the minimun number of tickets that guarantee 3 right?

 

Pincho.

 

Edit: I posted an example with 42 balls because it was the only example I could find on the net.

Link to comment
Share on other sites

  • Replies 50
  • Created
  • Last Reply

Top Posters In This Topic

I looked at Recursion, and permutations in programming but the examples were like this...

 

 

1,2,3

1,3,2

3,2,1

2,3,1...etc

 

That's not what I am trying to do. I'm trying to do this....

 

 

1,7,13,19,25,31

2,8,14,20,26,32

3,9,15,21,27,33

4,10,16,22,28,34..etc

 

to make the minimun number of lines to win £10. I believe that it would have as few repeats as possible, which is what I am aiming for.

 

Pincho.

Link to comment
Share on other sites

wouldn`t it just be 49x48x47 and that should give you every single combo?

and then you`de just have to factor out the order as they`de be irrelevent?

 

like,

1

2

3

1,1

1,2

1,3

2,1

2,2

2,3

3,1

3,2

3,3

1,2,3

1,3,2

2,1,3

2,3,1

3,2,1

3,1,2

 

oh hell I give up! :) LOL

 

Link to comment
Share on other sites

yeah, or in this case, rather than do that, any repeated number would take the place as a variable in your For Next loop, so it wouldn`t be as bulky and require masses of mem in DIM array. you could just elliminate them as they crop up :)

Link to comment
Share on other sites

nested for next loops.

you HAVE TO pick 6 on any 1 ticket always. so your outermost loop would be something like:

A= 1

DO

<insert rest of prog>

A=A+1

Until A=6

 

the <insert rest of prog> will use the internal For Next loops but using numbers already chosen in your sequence of 6.

so:

C=1

For B=C to 49

<then keep passing the numbers chosen back to C >

next B

and No, I`m not going to write it for you :)

it`s your baby, you do the rest :)

Link to comment
Share on other sites

  • 1 year later...
Guest mick_curtis

Make a table with at least 3 fields:

Sequence Number

TheValue

Yes/No tick flag

 

 

Randomly make 6 different numbers.

 

Do a query to update each record's yes/no flag IF TheValue is random number 1;

Do a query to update each record's yes/no flag IF TheValue is random number 2;

etc. up to 6

 

 

3.a. Do a query selecting ticked records;

b. ask if a sequence number occurs many times:

does it have 3 ticks or more.

If the answer is NO then the current 6 random numbers need to be added to the table:

increment the sequence number.

Insert 6 records.

 

Also, remember to clear down the tick flags.

 

Run the program to generate 6 random different numbers and you should produce 6 records all sharing sequence number 1.

 

Loop this many times and quickly the answer (sequence number count) will exceed 100 but from then on, the program needs to run for ages before the number climbs much higher.

 

Regards,

 

Mike (I made it in MS Access)

Link to comment
Share on other sites

Guest mick_curtis

I should add that I dictated the first results by manually data entering

1 1

1 2

1 3

1 4

1 5

1 6

2 7

2 8

2 9

2 10

2 11

2 12

 

and so on for about 10 sequence numbers;

I did that because I was interested to see an intuitive shape, if any, in the output.... and I have a nagging suspicion that a 'good start' may affect my total number at the end.

 

I counted the occurrence of each individual number and it is not evenly balanced; so my solution is not presented as being optimal. The program should ideally keep a note of how often each of 49 numbers has been used by me; and then, when 3 numbers are noticed unmatched, the other 3 numbers in the allocation can be chosen from the underrepresented number pool - instinctively, that seems like a good approach.

 

My sequence number count is pretty much frozen at 274 sequence numbers;

on average, over 100s of draws, I would win back about 30% of what I spend (ie. 70% loss approximately) - assuming that I never get the 5 balls and bonus, and never hit the 6 ball jackpot: just winning 10 pounds, 65 pounds or about 1500 pounds on 3/4/5 ball matches.

 

In other words, like modern roulette, this is a game which does not favour me.

 

Mike

Link to comment
Share on other sites

  • 1 month later...

If you are still looking for a solution i have been playing the UK lottery for years and now we live in New Zealand I play the NZ Lotto. The UK as you know old fruit is 49 numbers....the NZ Lotto is 40 !!!

 

I have used a system for over here and in the UK where I pick 7 numbers out of the 40 ( NZ ) and am guarunteed to cover all those 7 number combinations ( = 7 lines ), I also do it with 8 numbers, covering all combinations again ( = 28 lines ). In the UK it won me a few hundred quid but using the same perm I have won over $1500 in the las 10 months. Not brilliant but not bad either and am still in profit from this.

 

How far have you got with the programing of your lottery software?

 

I may be able to assist?

 

Cheers

 

Draco

Link to comment
Share on other sites

The only way you can be 100% sure to win the 10pound price is to buy tickets with ALL the combinations. IFF you have all the combinations for 3 out of 42 (or 49 or whatever), then there are no other combinations left, and you can collect the money (regardless of your tremendous loss). The reason is that if you don't have all the combinations, there is still some chance that the outcome can be one of the combinations you didn't pick.

 

There is some better solution because you only need three correct numbers, so you can actually put more then one combination in one ticket (I mean, if you buy a ticket, you already have some combinations covered due to the fact that there are more then three numbers on the ticket)

Link to comment
Share on other sites

I am dumber for having attempted this.

 

I think that the number of tickets is pretty small (when compaired to the number of possible tickets) to assure the win off 3 numbers. Pall park I would say 60 tickets is close.

 

I think the key to your solution is based on two concepts

 

how many unique combinations of 3 digits in the set of 49.

 

and how many unique sets of 3 can fit on one ticket

 

This is the point at which my brain exploded. I am sure that this has been done and if I had a probability text in front of me I would be golden.

 

In anycase with out a brain and considering the lack of several pints of guiness needed to put out the flames, I can go no further with this for now.

 

On a side note, BASIC be it V, Q or Old School is the wrong tool for such a programming project. I would use PERL. There are some very good Math modules that you can download and install and PERL is free.

 

Although i dont think you would need any MATH here once in side the application you just need lots and lots of array variables. Since PERL doesnt stiff you on memory usage you can even cram all of the arrays into one big giant hash for easy extraction.

Again delving to deeply into this whilst my brain is damaged would be dangerous to my health.

Link to comment
Share on other sites

  • 1 month later...

Hi,

 

I though the calculation was simply:-

 

sum a = (49/6)*(48/5)*(47/4) = 921.2

 

because you have

6 chances to match the first number

5 chances to match the second number

4 chances to match the third number

 

but I am not sure how the next bit work

 

you have six numbers on the ticket so does that mean you have to involve

 

sum b = (6/3)*(5/2)*(4/1) = 20

 

some where possibly sum a/sum b?

 

so you get 961.2/20 = 48.06

 

or does it mean you have to buy 922 tickets to guarantee a win of £10.00 with twenty chances on each ticket????

 

or

 

should it be

 

sum c (49/3)*(48/2)*(47/1) =18424

 

then 18424/20 = 921.2 ??????

 

?????????

Link to comment
Share on other sites

  • 4 weeks later...

Well, in order to guarantee a win, you need to have enough tickets to cover every set of 3. I'm using the 49 ball lotto. In order to get exactly 3 matches you need 3 balls to be among your 6 you chose and 3 from the 43 you didn't. The number of ways this can happen is C(6,3) times C(43,3). In other words 6 choose 3 times 43 choose 3. This gives 246,820 winning tickets. Since eac

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.