Lotteries and math: A sort-of-winning formula
How many tickets does it take to guarantee a win? Two British mathematicians have an answer. It does come with riders, but it works.
You are four times more likely to be struck by lightning than to win the lottery, but mathematicians have now worked out a way to even those odds out, at least a little.

A minimum of 27 tickets will guarantee a win at the UK National Lottery’s flagship game, the Lotto, two British mathematicians have calculated.
This trick will not secure you the jackpot (which was £15 million in December), or even cover the cost of the tickets, but it will get you at least two winning numbers of the total six. (The prize for two winning numbers, is a free ticket.)
Before you rush out to take your own gamble, keep in mind that the twice-weekly Lotto is an unusual format. It’s more like Bingo or Housie than a traditional lottery. The six winning numbers are all picked from the same set of one and two-digit figures — the numbers 1 to 59.
Each ticket costs £2 (about ₹211) and features six numbers, all between 1 and 59. Prizes are awarded, twice a week, to the holders of tickets featuring two or more of the numbers picked.
The odds against winning the jackpot (a ticket with all six of the selected numbers) have been calculated as being 45 million to one.
But, in a paper published in July in arXiv, Cornell University’s repository of scholarly findings, mathematicians David Cushing and David Stewart of the University of Manchester used finite geometry to arrive at their figure of 27.
Finite geometry is a branch of math typically used to crack combinations in areas such as coding theory and cryptography. It does this by plotting sets of finite data (numbers, or letters) across projective planes — which are symmetrical shapes made up of strategically placed dots and lines — and looking for overlaps.
Cushing and Stewart found that, in every set of 27 combinations (27 being the lowest such number), at least one ticket would overlap with at least two of any six numbers picked at random from the set of 1 to 59.
The researchers tested their hypothesis on July 1. Of their 27 tickets, three did each have two of the winning numbers. They had expected no larger wins, and came away with none. They don’t plan to buy any more lottery tickets, they have said.
Math professor Peter Rowlett of Sheffield Hallam University, meanwhile, ran the numbers to calculate the odds of turning a profit, and with 27 tickets, he says, in his blog The Aperiodical, there is about a 5% chance of winning more than one spent.
Is it possible to actually hack a lottery with math? Many have tried. In the 1980s, Stefan Mandel, a Romanian-Australian economist, won 14 times, using an algorithm that calculated every possible combination of a particular draw. He then roped in over 2,000 people as investors, and aimed for and won jackpots as large as $27 million (at the Virginia lottery in 1992), which he distributed among them. He eventually quit and retired to Vanuatu, as the game went digital, the rules changed, and the odds became harder to calculate.
More recent attempts have involved machine learning and artificial intelligence. But the foundational truth of the lottery has so far held: it is so completely random that it is still impossible to tell exactly where the big bolts of luck will strike.