Ethical Hacker

The Man Who Cracked a Lottery

Tagged Under -
Page 1 of 1
Toronto resident Mohan Srivastava figured out a way to look at a draw-of-luck ticket and tell if it was going to win

In June last year, Joan Ginther, a 63-year-old woman from Bishop, Texas, won $10 million in the Texas State Lottery. It was Ginther’s fourth win in 17 years, taking her total winnings to about $21 million. The odds of the same person winning four times in a single lottery are one in 18 septillion (1 followed by 24 zeroes).

In the aftermath of her win, much of the media hinted that Ginther had somehow discovered a key to the lottery. The evidence against her is overwhelming: she has repeatedly refused interview requests; she graduated with a PhD from Stanford University in 1976; and once taught college-level maths. Still, the Texas Lottery Commission insists that its verification system for lottery winners is thorough and has not investigated Ginther for fraud.

There have been other repeat lottery winners in the US: in 2005, Donna Goeppert won $1 million twice within a seven-month period from scratch-off tickets in the Pennsylvania State Lottery. In 2002, a California retiree named Angelo Gallina won the lottery twice the very same day. But Ginther’s case—with her refusal to speak to the media, her maths background and her large winnings—has raised the greatest suspicion.

Mohan Srivastava, a 52-year-old geo-statistician in Toronto, Canada, believes that Ginther has indeed discovered a flaw in the Texas lottery. Srivastava would know: in 2003, he cracked a tic-tac-toe lottery created by the Ontario government. Since then, Srivastava, who offers mining companies consultancy advice, has found patterns in other scratch-off lotteries that allow him to pick winning lotteries 60 per cent of the time.

In February this year, Wired, a popular American technology magazine, wrote about Srivastava’s ability to detect patterns in lotteries. The story immediately went viral and has since raised questions about the reliability of America’s $70 billion-a-year lottery industry. All lotteries in the US and Canada are created by the government and are important sources of state revenue.

Srivastava’s tryst with lotteries began in June 2003, when, while waiting for a large file to load onto his computer, he idly picked up a tic-tac-toe scratch-off lottery card. The ticket was a gag birthday gift from a squash buddy.  “I’d mentioned to my friend once that I’d never play the lottery because of the low probability of winning,” he explains. But curiosity eventually got the better of him, and he scratched the latex cover off the two tickets that he’d been gifted. One was a loser, but on the other, he won $3 (Rs 138).

Tic-tac-toe lotteries and scratch-off cards are very popular in Canada and the US. The Ontario version consists of two elements (see image on the next page). On each lottery ticket, there is a panel of eight 3x3 tic-tac-toe boxes which have numbers from 1 to 39. To the left of this panel are two columns of 12 numbers each which are hidden (each number has an X or O pasted on it). Players have to scratch off the latex and expose all the numbers. They then match it to the tic-tac-toe boxes. If any three revealed numbers form a straight line—horizontally, vertically or diagonally—in any of the boxes, the player wins a cash prize. 

Having won $3 on his second ticket, Srivastava, like so many lottery players before him, became captivated by the game. He began thinking about how the lottery tickets were created. The numbers on the cards, he figured, couldn’t be completely random because the lottery corporation needed to control the quantity of winning tickets. Since the cards were mass-produced, they would have to be created by a computer program—or an algorithm—that limited the number of winners while creating an illusion of randomness.

That day, on his way back after collecting his winnings, Srivastava—who has degrees from MIT and Stanford and has co-authored a textbook on applied geo-statistics—figured out a way to write a program for a lottery like this. “It was an intellectual exercise for me,” he says, “because I sometimes write some of my own software.” Later that night, though, as he was walking home from work, a little voice popped into his head. It told him that the computer program he’d thought of wasn’t foolproof. And if it wasn’t foolproof, then the lottery wasn’t either. “It was like my subconscious had been working away at the problem even though I thought I’d figured it out,” says Srivastava. “It told me that if the lottery corporation was using the same simple algorithm as the one I’d thought of, there was going to be a noticeable pattern on the face of tickets separating winners from losers.” Could he, then, possibly predict a win just by looking at a ticket?

The next morning, Srivastava went to a store that sold these tic-tac-toe lotteries. “I wanted to study the tickets to see if I could figure out the pattern,” he says. A few minutes and several scratched-off tickets later, he realised he’d cracked the lottery. The corporation had indeed used the same algorithm Srivastava had thought of, and there was an easy way to spot a winning ticket.

Each ticket had a total of 72 exposed numbers (eight tic-tac-toe boxes multiplied by the nine numbers each contained). Some numbers occurred on the ticket only once, while others appeared twice or thrice. Srivastava’s realisation was this: if any of the tic-tac-toe boxes had a straight line of numbers that appeared only once, then the ticket was likely to be a winner. All he had to do was look at the numbers; see which ones appeared only once. If these numbers were in a straight line, then he had a winner. It was as simple as that. (For example, consider the numbers 33, 12 and 25. If 33 appeared once, 12 once and 25 once, and if all of them were in a straight line in any of the eight tic-tac-toe boxes, then it was a winner, or at least had a 90 per cent chance of winning).

Srivastava’s immediate thought was how he could exploit the kink in the game. But unlike large-draw lotteries, like India’s PlayWin or the UK’s National Lottery, where the payouts are big sums running into millions of dollars, scratch card lotteries have smaller cash prizes. In the case of the Ontario tic-tac-toe lottery, the largest cash prize was a relatively paltry $50,000 (Rs 23 lakh). Srivastava realised that the time and resources required to find the eight top-drawer tickets among all four million tickets in circulation outweighed the eventual reward. “I make more in my day job and I actually like what I do,” he says.  

Srivastava then decided to approach the authorities. The detective sergeant he spoke to at the Ontario police’s fraud squad refused to take him seriously. The head of security at the Ontario Lottery and Gaming Corporation (OLG), the government body that controls the lotteries in Canada’s Ontario district, didn’t return his calls. Frustrated, Srivastava bought a stack of 20 tickets and sorted them into winners and losers, using his newfound card-reading ability. He then sent them un-scratched to the head of security at the OLG with an attached cover letter. A few hours later, his phone rang. It was Rob Zufelt, the head of security. Srivastava had predicted 19 of the 20 tickets correctly.

“It turns out that there is only a select group of printers and designers in the country who know how to create a lottery ticket. The OLG spoke to the designers of the tic-tac-toe lottery and they confirmed that the trick would work and that it had somehow slipped past the auditors,” says Srivastava. A few days later, the lottery was pulled from the market. The retraction was a first in the OLG’s history.

In the years that followed, Srivastava managed to discover faults in other lotteries too, but nothing matched the scale of what he’d done in 2003. He found, for example, that the Ontario trick also worked on a similar lottery in Colorado in the US, but only with 70 per cent accuracy. Srivastava believes that it’s likely that others—like Joan Ginther—have also managed to break scratch-off lotteries. “As long as corporations are selling tickets, though, they don’t need to worry about small flaws,” he says.

Still, in the days since Srivastava’s big discovery, lotteries have become more secure. Pollard Banknote, a Canadian company that produces lottery tickets for the government, has stopped producing cards with an ‘exposed’ play area. That is, all numbers on the ticket are covered by an opaque layer, thereby making it impossible to detect a pattern on the face of the card.

Experts, like Northwestern University’s Jay Koehler, believe that repeat winners are simply a result of chance rather than a ‘broken’ lottery. “When there are lots of lotteries and lots of people buying lottery tickets and many of those people are buying multiple lottery tickets in multiple games over a long period of time, chance alone dictates that we’re going to see some seemingly shocking repeats,” says Koehler.

Over the last few months, Srivastava has received an unexpected amount of media attention. His 13-year-old daughter now thinks it’s “cool” that her dad is a “numbers geek guy”. A British lord, the chair of the reserve committee of a mining company he was a consultant to, has asked him for an autograph after finding his photo on the front page of The Toronto Star. “It was a very serious meeting and a roll call had been called. When it came to my turn, the guy said, ‘Not the Mohan Srivastava,’ and slid the paper toward me. It was a rare moment of levity in those otherwise dry meetings,” says Srivastava. And at parties, friends and relatives have asked him for tips on winning games with fat payoffs. “I told them I had a really good piece of advice—just buy one of the winning tickets,” he laughs.