I was running a training session for new maths teachers last week and over lunch someone mentioned the weekend’s huge lottery draw, with the largest jackpot in UK lottery history of £66m, shared by two winners. I remember when the National Lottery started, one of my first thoughts about it being, “if someone had enough money they could buy up every combination and guarantee the jackpot”. We talked about this over our jacket potatoes with chilli and I started to consider the practicalities. And, of course, the maths. So here are my musings…

Let’s begin with the old system. The lottery numbers went from 1 to 49, from which you chose 6 distinct numbers and paid £1. The number of possible combinations of six numbers out of 49 is 13,983,816. This is calculated using the rather nice formula:

where the ! is read “factorial” and 49! = 49×48×47×…×1 or multiply 49 by every other integer down to 1. It’s surprisingly hard to find a good explanation of why this is the formula, I might do one myself one day, but not now.

The theory goes that you could buy 13,983,816 lottery tickets and be a guaranteed winner, so as long as the jackpot was more than £14m you’d make a profit. How long would it take you to buy that many tickets? Assuming you had a really sympathetic newsagent and *very* strong muscles in your hand you might be able to fill out one set of numbers and put it through the machine every 10 seconds. That’s 139,838,160 seconds of ticket buying, or just short of 1618½ days.

Wow! Even if you were *allowed* to buy your tickets 4½ years in advance, that’s not worth it for any amount of money. So, my mind continued, what about if you were also a competent programmer and could write a script to buy your tickets online? A cursory look at the lottery website shows me that you can buy up to 70 sets of numbers in one go, so your script has to run through all the combinations, buying them in clusters of 70. Now I’m guessing that, provided you’re already logged in and there are no captcha or anti-bot systems running on the website (there probably are and this whole endeavour is rendered pointless, but hey-ho, I’m enjoying the numbers, let’s continue), the time to enter 70 sets of 6 numbers is minuscule and the limitation is only the website’s server speed in paying and loading pages. Let’s go with 10 seconds per set of 70: that’s 1/70th of the time we came up with for buying in the newsagent’s, 1997688 seconds (I love that 70 is a factor of this massive number, but think about it – if 49 was a factor of our starting number, then so was 7, and it was also a multiple of 10), or just over 23 days. Much more reasonable but still against the rules (you can only buy up to a week in advance).

Unfortunately for our hypothetical millionaire gambler, in 2015 Camelot changed the lottery. The numbers now go from 1-59, giving us 45,057,474 possible combinations. So we’d need over fourteen years at the newsagent’s, and our computer will take 74½ days. Plus, each ticket costs £2, so unless the jackpot stands at over £90m you can forget the whole shebang. Not to mention how annoyed you’d be if someone else shared the jackpot with you, especially if they’d only bought one ticket!

The moral of the story: if you fancy your chances with the lottery, don’t go outside ever. Your chances of being hit by lightning are far greater, and you are clearly happy with taking a gamble on *more than extremely unlikely* events.*

* Apparently around 30 to 60 people are hit by lightning in the UK every year. With a population of 63 million, that’s a chance of anywhere between 1 in 1.05 million and 1 in 2.1 million.

January 20, 2016 at 12:31 am

Slight typo – 7 not 70.

LikeLike

January 20, 2016 at 7:57 am

Oops! That’ll teach me to do this late. I’ll amend it now!

LikeLike

February 11, 2016 at 6:38 am

For the first number you have 49 numbers you could choose. Once you choose a number, you have 48 left to choose, then 47, 46, 45, and 44. If this were diagrammed, you could write 1 – 49 for the first number, then branching off of each of those numbers there would be 48 numbers, and the next branching 47, 46, 45, and 44. This means there are 49*48*47*46*45*44 number of ways to pick 6 numbers from a pool of 49 numbers. However, this is too many because there will be many duplicates in that list. For example, that list will contain 123456, 132456, 134256, and so on. Specifically, there will be 6*5*4*3*2*1 because this is the number of ways to choose these 6 numbers from a pool of 6 numbers. Each branch in the diagram illustrating 49*48*47*46*45*44 will have exactly 6*5*4*3*2*1 duplicates. Which means that the total number of ways to choose 49 numbers 6 at a time is (49*48*47*46*45*44)/(6*5*4*3*2*1 )

Well, it looked much cooler in my head. Fun musings.

LikeLike

June 9, 2016 at 9:32 am

I’ve read it. I get it. I still play it.

LikeLike