Skip

So this is why I never win.
February 1, 2011 10:40 AM   Subscribe

Cracking the Scratchie. With cheating and money laundering and statistics, this story seems like it should be about something more exciting than scratch-off lottery tickets. But it isn't.
posted by jacquilynne (92 comments total) 71 users marked this as a favorite

 
This is a really good read, thanks.
posted by Blazecock Pileon at 11:03 AM on February 1, 2011


The game can’t be truly random. Instead, it has to generate the illusion of randomness while actually being carefully determined.

The randomness is introduced by the stooges that buy those cards.
posted by three blind mice at 11:07 AM on February 1, 2011


“Once I worked out how much money I could make if this was my full-time job, I got a lot less excited,” Srivastava says. “I’d have to travel from store to store and spend 45 seconds cracking each card. I estimated that I could expect to make about $600 a day. That’s not bad. But to be honest, I make more as a consultant, and I find consulting to be a lot more interesting than scratch lottery tickets.”

I found that part really interesting as an example of what a bad deal for the player lotteries are; even if you win 90% of the time it still may not be worth your while to play.
posted by TedW at 11:27 AM on February 1, 2011 [7 favorites]


Well, you could always pick your numbers.
posted by cjorgensen at 11:30 AM on February 1, 2011 [4 favorites]


I was pretty surprised that a clerk said that buying and returning lottery tickets without
scratching them would be fine!
posted by kozad at 11:36 AM on February 1, 2011


It would seem that it's impossible for the average person to take advantage of any sort of crack, because the ticket that you receive is unknown until you receive it and therefore you can't make any inferences by what numbers are on the face of the card (as you don't have that information until after you purchase it, at which point it doesn't matter if a bought card is a known winner or loser before you scratch it - you've already paid the price for it). Organized crime can pay off convenience store owners below the margin of what they expect to make on a lot of bulk cards, which can then be parsed and scratched for winnings (laundering any dirty money you used for the bulk cards) and the unscratched losers can be given back to the store to be sold to unsuspecting customers, while the bulk of winning numbers are written off as sales.

I guess a law-abiding individual could make a bulk purchase of a cracked game, sort out probable winners, and then figure out how much they made and sell any probable losers at a discount to what they normally would be but at a high enough rate to cover their initial cost.

But that's still illegal -- I'm sure there's something in the small print about not reselling purchased tickets, and I'm sure that's something the lottery commission keeps an eye out for.

So it seems like this is something that, unless you're willing to commit further crimes to make it feasible, is something that's not really practical for the average person, but instead gives gangsters a way to launder their money at the expense of the unwitting people who buy these things legitimately with the vague hope of escaping crushing poverty.

Pretty depressing when you think about it like that, but it's always neat when an outsider cracks a black box system like the lottery that's thought to be unbeatable.
posted by codacorolla at 11:38 AM on February 1, 2011


Also, following from what TedW quoted, I found this to be one of the most interesting lines in the whole piece:

“People often assume that I must be some extremely moral person because I didn’t take advantage of the lottery,” he says. “I can assure you that that’s not the case. I’d simply done the math and concluded that beating the game wasn’t worth my time.”

I mean, not only does it say so much about the futility of the lottery, it also resists the temptation to read any sort of archetypes in to this, or to read it as a morality tale. Interesting.
posted by .kobayashi. at 11:40 AM on February 1, 2011 [3 favorites]


Wait... can you actually return unscratched cards? That seems preposterous, but if it's true then it would let legitimate players take advantage of any known cracks.
posted by codacorolla at 11:40 AM on February 1, 2011


I found that part really interesting as an example of what a bad deal for the player lotteries are; even if you win 90% of the time it still may not be worth your while to play.

Yeah, if you already make a boatload of dough. $600/day is nothing to sneeze at.
posted by kenko at 11:41 AM on February 1, 2011 [7 favorites]


So it seems like this is something that, unless you're willing to commit further crimes to make it feasible, is something that's not really practical for the average person

You're apparently allowed to return unscratched cards.
posted by valkyryn at 11:43 AM on February 1, 2011


I'll bet the versions of these tickets that exist in the US are similarly game-able (though maybe not as trivially as these are, since the word is out). The bottleneck in this guy's story is the time it takes to scan the tickets looking for singletons, and I'll bet you can reduce that to almost zero by building yourself a quick little iPhone app that solves it from a photo in half a second.

I'll also bet that there is no convenience store, anywhere, that will let you look at 20 cards, pick the 6 that you want to buy, and put the rest back.
posted by Mayor West at 11:44 AM on February 1, 2011


I found that part really interesting as an example of what a bad deal for the player lotteries are; even if you win 90% of the time it still may not be worth your while to play.

$600/day, working a measly 200 days/year = $120k/year. If I had a way where I could guarantee that kind of income...

codacorolla: His estimates were based on walking from store to store and looking for winners that were exposed. I know in most places where scratch-its are available in North America they are laid out in a way where you can see the front of the ticket, which for him is enough to spot the winners in this game. The article even goes on about how there are people who have taken in larger sums, to the order of $1-2 million over 1800+ winning tickets, that weren't part of the mob.
posted by Mister Fabulous at 11:47 AM on February 1, 2011


I'll also bet that there is no convenience store, anywhere, that will let you look at 20 cards, pick the 6 that you want to buy, and put the rest back.

Well, a big part of the problem with lottery scamming in general is that it's convenience store owners who do it, taking advantage of their natural advantages. Ontario's had a lot of problems with that.

But I'm also not so sure you wouldn't be able to get enough of a look to make a decision in some stores. Certainly when I sold lottery tickets way back in the back when, we'd let customers get a little touchy-feelie with scratchies while they decided which ones felt lucky. At a very small scale, you could go into a store, look at the lottery tickets that were shown full on and decide if they were winners and whether you wanted to buy one based on what you could see.
posted by jacquilynne at 11:50 AM on February 1, 2011 [1 favorite]


Every place I've seen that sells scratch off tickets has them on a roll. The ticket you get isn't visible to you, and uses either a dummy card as a display, or has tickets on a further part of the roll as what's being displayed. I guess you could find a probable winner and buy up to that point on the roll, but that adds a lot more overhead to each probable win.

Anyway, looking at the Maryland Lottery's scratcher site it seems like there's only one game running right now that gives you any visible number information on an unscratched card.
posted by codacorolla at 11:51 AM on February 1, 2011


I would guess that the reason you can return unscratched cards is that the items are still saleable. They can be sold on to someone else.
posted by Solomon at 11:51 AM on February 1, 2011


Excellent article. so when will the made-for-TV movie about the guy who cracked the scratch come out? i think you could go comedy or drama with this one... screenplay anyone?
posted by kevdog at 11:52 AM on February 1, 2011


In a 2006 survey, 30 percent of people without a high school degree said that playing the lottery was a wealth-building strategy.

This is the worst thing I've read today.
posted by Brainy at 11:52 AM on February 1, 2011 [22 favorites]


What I mean is that they're still in original condition. Someone else can still take the chance, as it were.
posted by Solomon at 11:53 AM on February 1, 2011


I'll also bet that there is no convenience store, anywhere, that will let you look at 20 cards, pick the 6 that you want to buy, and put the rest back.

Every single convenience store everywhere will let you do this.
posted by Jairus at 12:03 PM on February 1, 2011 [6 favorites]


(Well, at least in Canada, they will.)
posted by Jairus at 12:04 PM on February 1, 2011


This reminds me of the layouts of the card game from Super Mario Bros. 3 from Nintendo Power. That's a different type of game, of course, but it's still based on the principle that there is a relationship between what you see and what's hidden that you can exploit.
posted by demiurge at 12:06 PM on February 1, 2011 [1 favorite]


I'll just get arrested for standing at the gas station counter for a half-hour, face pressed up against the glass of the lottery display, eyebrows furrowed in deep concentration, trying to remember more than four numbers at a time, muttering things like, "wait, did I already see a 37? dammit."
posted by AzraelBrown at 12:08 PM on February 1, 2011 [7 favorites]


“Once I worked out how much money I could make if this was my full-time job, I got a lot less excited,” Srivastava says. “I’d have to travel from store to store and spend 45 seconds cracking each card. I estimated that I could expect to make about $600 a day. That’s not bad. But to be honest, I make more as a consultant, and I find consulting to be a lot more interesting than scratch lottery tickets.”

I found that part really interesting as an example of what a bad deal for the player lotteries
consultants are...
ftfy
posted by rocket88 at 12:12 PM on February 1, 2011 [4 favorites]


Good read!

But...was anyone else disappointed at how simple the answer turned out to be? The profiled statistician seems like a singularly nice guy, but it seems to me like a case of a really stupidly flawed system rather than a genius cracking an unbreakable code. I'm almost surprised that it went so long without detection, unless we're meant to assume that Srivastava was the first thoughtful guy to look at them. Although with the break-even underreporting anomalies, maybe he wasn't - and now he's got a whole bunch of people who've been gaming the system mad at him. I do like how it underlines the importance of the approach - if you believe you have a chance to win, you must believe the chance exists, that the chance is random. So you wouldn't look for a pattern anyway.

Scratch-off tickets are depressing. My parents stopped selling them at their little convenience store because, as my dad puts it, "It feels like stealing from people who don't have a whole lot to begin with."
posted by peachfuzz at 12:16 PM on February 1, 2011 [6 favorites]


Well, a big part of the problem with lottery scamming in general is that it's convenience store owners who do it, taking advantage of their natural advantages. Ontario's had a lot of problems with that.

Like the case in the news this week, in which a convenience store owner and his sister tried to fraudulently claim a 12.5-million dollar winning ticket.

Ontario Lottery and Gaming (OLG) got some expert opinions to try and dispel earlier concerns that convenience store owners were winning a disproportionate number of lottery prizes over $50,000. But it seems that they really lack the statistical data to make a conclusion either way.
posted by Kabanos at 12:22 PM on February 1, 2011


The guy who cracked --and memorized-- the Press Your Luck pattern is much more impressive to me... more theatrical...
posted by overeducated_alligator at 12:24 PM on February 1, 2011 [1 favorite]


"I found that part really interesting as an example of what a bad deal for the player lotteries are; even if you win 90% of the time it still may not be worth your while to play."

Great article. I kind of wanted more math, even if I probably could not have followed it.
posted by From Bklyn at 12:25 PM on February 1, 2011


Every single convenience store everywhere will let you do this.

I worked at a convenience store for a few years in the 90's in Colorado. We tracked our ticket inventory based on the serial numbers on the top card. If there were tickets missing in the middle, I would have had to explain that and it wouldn't have been something the management would have approved of. If someone had come in and asked to return a bunch of tickets, with tickets missing from the series, I would have laughed and pointed at the door.
posted by dhalgren at 12:26 PM on February 1, 2011


I think with a willing accomplice bodega-owner this would be an easy scam.

Buy the bodega's entire allotment of scratch-offs, give them a share of any winnings and then sell the the unscratched "losers" back to the bodega to be sold to the public.
posted by de void at 12:30 PM on February 1, 2011


I'll also bet that there is no convenience store, anywhere, that will let you look at 20 cards, pick the 6 that you want to buy, and put the rest back.

Actually, this is the norm. People pick the cards they want all the time (usually not six at once, but only because most people buy one or two at a time).

I worked in a convenience store where I let people do this, and have seen it happen dozens of times in other stores. What customers are not allowed to do, normally, is handle the the tickets extensively, mainly to prevent you from running out of the store or accidentally scratching them.
posted by Pseudoephedrine at 12:31 PM on February 1, 2011


My brother and I purchase scratch-off tickets more often than most people here, I would imagine. My brother way more than me, probably to the tune of around $100/month and me about $20/month. We are both college educated and understand statistics.

If you look at scratch-offs from a pure "utility" standpoint, of course buying lottery tickets is dumb. But that assumes they have no entertainment value. By the same logic, buying a DVD is stupid because it doesn't generate income when you play it. Some people, believe it or not, enjoy scratch-off tickets. I certainly do. Just like anything else, if it becomes an "addiction," that is, I keep playing regardless of negative consequences in my life, then I need to address that. Same with booze/pot/etc. I think its overly paternalistic to criticize poor people playing the lottery any more than their purchase of cable, cigarettes, junk food, video games and other non-essential items.
posted by gagglezoomer at 12:32 PM on February 1, 2011 [9 favorites]


I used to work as a programmer for a company who make scratchcard lottery tickets, back in the mid 90's.

This was before the sorts of games talked about in this article I think. None of the tickets we made way back then were crackable in this way as far as I can remember. The cards we produced were generally quite simple affairs, although they were getting more complex all the time.

A lottery is, of course, entirely deterministic - part of the contract with the customer who buys the lottery is the structure of the winnings: how many top prizes, how many second prizes and so forth. The pack and ticket numbers printed on the ticket under a separate silvered area can be looked up in the database to see if the ticket is a winner or not.

The existence of the database of tickets is obviously one potential avenue of attack, especially for insiders. With the database you could, theoretically, go out there and find the winning tickets. This was made much more complex by randomizing which packs go to which locations, which was done by hand in the factory. Even if you know which pack to look for, actually finding the winning ticket would be very difficult. We programmers were not allowed in the factory, just in case, although I ended up going down there a few times when there were problems with the presses.

We wrote everything pretty much from scratch and we literally controlled the heads and the movement of the presses, at least the ones that produced the changeable data. When this went wrong it could be quite spectacular, so I did go down to the factory for debugging sessions sometimes, surrounded by gruff old men covered in ink.

The process we used was that two people would both attempt, in C, to generate a datafile fitting the specification, without conferring. We would then compare our outputs, and repeat until we both got the same output. We would then hope that this was actually correct.

You might think it would be better to write a generic piece of software for producing lotteries, and I imagine they have done that by now. We discussed it a bunch of times, but every lottery had it's own peculiar requirements, and the problem of verifying that the produced lottery data was correct in a general way was really quite intractable. In a normal process you would do some sort of inspection of the finished products - but our finished product was covered in silver. A random sample could be performed, but to be useful you'd need a large sample and it could easily wreck the prize structure to pull too many packs out. In the end we were just very careful.

Other than the printers, the high-security factory was staffed almost entirely with middle-aged women. Company legend had it that this was a risk strategy - the people doing the counting and sorting had direct contact with the tickets as they came off the presses, and middle-aged women were the safest kinds of people. I have no idea if this is true.

The hardest part for us coders was once a print run was complete. The printing process we used for the most secure lotteries was a very high speed set of machines and there were a lot of errors and breakages in the giant rolls of card. This meant we needed to put many more winners in the print job than were required by the prize structure to ensure that sufficient winners would survive the process.

After a run had finished we would get a report back from the factory listing all of the surviving packs. We would then calculate and send them a list of packs to shred, which would include all of the spare winning tickets and a number of losing packs too. This was a particularly fraught piece of work, since a mistake would ruin the entire job, by destroying vital prize tickets, or we might unleash additional winners on our unsuspecting customer, costing a fortune.

Mistakes in the entire process were not unheard of - especially when the requirements were unusual. You would never know if you had succeeded until after a lottery had gone on sale, and the first few days could be a bit tense as you waited to discover if there had been any problems.

Different countries had different legal requirements for what to do if you accidentally gave away too many prizes. We once gave away a dozen too many cars in Portugal, and had to honour them. In the UK, the top prize could be shared amongst all the winners instead. The company could not get the (effectively unlimited) insurance it would need to cover the risks, so if we screwed up the money came straight off the bottom line. A couple of screw-ups would wipe out a year's profit.

We used a different printing process for cheaper, less secure, lotteries that we mostly produced for African countries, or for non-national lotteries in Europe. This used a sheet process (instead of web) and instead of the millions of random losing tickets we had with the web process, most of the losing tickets were identical.

We got a lot of attempted fraud from Africa, mostly with people cutting tickets up and rearranging the "probs" (the variable bits: "probabilities"). I can't remember anyone ever trying that one in Europe.

We also did newspaper bingo games, and these were even weirder to produce than lotteries. There aren't any specific "winning" grids, instead the winners are chosen by which numbers are printed each day in the Newspaper.

We'd provide the customer with options for the sequence of numbers, to allow them to choose when a prize would be given. The bingo games were structured so that they could award prizes at useful moments in the game: the newspapers would like to give away a car in the second week, I think, to keep people playing.

We wouldn't know which grids were in play though, since the vast majority got put in the bin by the readers, so we'd have to provide the newspaper with options: they'd print a certain set of numbers on a Monday to trigger a win, and if nobody had claimed by Wednesday they could print another set in the hope someone would win that day. Nobody winning for days on end, with repeated more and more brain-aching attempts to provide useful sets of numbers were a pretty regular occurrence.

We had only one guy who was really comfortable doing bingo games.
posted by winjer at 12:53 PM on February 1, 2011 [197 favorites]


Yeah, this reminds me of another lottery scam I heard about. Someone discovered the only true way to rig Powerball or a multi-number lottery like that. You just buy one ticket for every set possible numbers. I don't recall the exact permutations to get the total number of possible tickets that can be played, but IIRC it's something like $8 million. Now that's not an insurmountable goal, you just have to buy 8 million $1 lottery tickets, to cover all the numbers. You get a whole bunch of people to spend all day buying tickets at vendors all over the state. It might take all week, but you have to buy one of every ticket combination, and then you are guaranteed you have the winning numbers, because you have a ticket for all the numbers. This scheme would only be worthwhile if the jackpot amount vastly exceeded the investment in tickets, well more than 8 million.

Now there are a couple of weaknesses to this scheme. First, 8 million is a lot of tickets, and would take a large organization of people spreading the purchases around. And then what if you run out of time and run short and you only grab like 95% of all tickets? The grand prize could still be in the remaining 5% you didn't purchase in time. But these lotteries usually have other large prizes, and you would at least capture 95% of all the second prizes, which can be hundreds of thousands each.

Now the other weakness in the scheme is that there is nothing preventing any other person from buying the winning numbers too. Then you'd have to split the jackpot. Now the way I heard it, someone actually tried to do this, they gathered some investors to raise the stake and sent a horde of people to buy like $8m of tickets, but only got to about 95% of all tickets. But they were lucky, the winning number was one of their tickets. Unfortunately the jackpot was like $16m and someone else got the winning ticket too, so they split it and got $8m apiece. And then they won a few of the second prizes and made a few hundred thousand there too. IIRC they invested about $7.5M and won something like $8.5, But the payoff was too small for such a risk, they would have lost big if the winner was in the 5% they didn't own. And the lottery commission figured out what they were doing to, it was adjudged legal, but they set rate limiters on lottery machines so nobody could ever again buy every number set. You'd only be able to get about 50% coverage even hitting almost every ticket seller.
posted by charlie don't surf at 1:04 PM on February 1, 2011 [5 favorites]


What the hell? Am I missing a key component of this story that everyone seems to get? How can you see the numbers that are singles, doubles and triple without scratching them off? Typically on a scratch-off, you scratch two components - the winning numbers and "your" numbers. How can you game the system when you are scratching off one of the components? You can't return the ticket after it's been half "played."
posted by yeti at 1:12 PM on February 1, 2011


The point, I think, is that all of the numbers that were singles were nearly guaranteed to be in the pool of scratch-off numbers.
posted by limeonaire at 1:13 PM on February 1, 2011


Am I missing a key component of this story that everyone seems to get?

Yes. The visible numbers are visible sans scratching.
posted by found missing at 1:14 PM on February 1, 2011


Oh, and "singles," "doubles," triples," etc. refers to the number of times various numbers appear in the grid of, say, a bingo game, where numbers are visible and have to be matched to non-visible scratch-off ones. On cards where virtually all of the singles are guaranteed to be in the pool of scratch-off numbers, it's not hard to discern which cards have a pattern of numbers that only appear once, although with enough "bingo cards" on a single ticket, it can be time-consuming. I bet with practice, though, you could get to the point where you could pick the patterns out of cards like this fairly quickly.
posted by limeonaire at 1:18 PM on February 1, 2011


What the hell? Am I missing a key component of this story that everyone seems to get? How can you see the numbers that are singles, doubles and triple without scratching them off? Typically on a scratch-off, you scratch two components - the winning numbers and "your" numbers. How can you game the system when you are scratching off one of the components? You can't return the ticket after it's been half "played."

You can see all of the numbers on the tic tac toe grid without scratching anything off. the portion of the ticket you scratch off tells you which of those numbers are "played".
posted by kevdog at 1:18 PM on February 1, 2011


Typically on a scratch-off, you scratch two components - the winning numbers and "your" numbers.

Check their example picture. This game doesn't work like that for some strange reason. The tic-tac-toe boards are set, and you scratch off to find out which numbers are "yours'.
posted by milestogo at 1:21 PM on February 1, 2011


I'll also bet that there is no convenience store, anywhere, that will let you look at 20 cards, pick the 6 that you want to buy, and put the rest back.

In Massachusetts, scratchies are sold almost anywhere the commission can issue and display a license, to include anywhere from large supermarkets to unattended user-operated machines in seedy bars. Have you ever been in a seedy bar after hours? If not, then I can state as fact that all type of asshattery does occur on a weekly, if not nightly basis with plenty of time in a locked, darkened building to do it in.

Also, let us look into who exactly staffs these locations. They are not high-paying jobs with duties that must be performed within the purview of over-ambitious regulatory bodies, thus the opportunity of finding a vulnerable individual is greatly increased upon a cash incentive or block offered, so there is a low barrier for anyone with access to the ticket books/rolls and savvy enough to label those winning tickets while still on the roll and keep those aside. All of which can occur outside of regulatory scrutiny.
posted by jsavimbi at 1:28 PM on February 1, 2011


Making money isn't easy, except when it is.
posted by gagglezoomer at 1:33 PM on February 1, 2011


This is fascinating, thanks for posting!
posted by inigo2 at 1:43 PM on February 1, 2011


Y'all know that a small number of people used to make a career out of dumpster diving the OTB and then standing next to the scanner in the store and scanning thousands of tickets to find three or four accidentally discarded winners, yeah? There was one dude who made like 50k a year. He raised his family on it. So yeah 600 bucks a day ain't worth it if you're trying to replace a consultant's lifestyle, but as far as not having to sit in an office and work for the man?? I'd take it.
posted by spicynuts at 1:47 PM on February 1, 2011 [3 favorites]


Am I missing a key component of this story that everyone seems to get?

Look at the article. Image 1 shows an unscratched card. The latex to be scratched off is on the left hand side of the card under the X's and O's. The card in Image 4 has had the "winning" numbers scratched off.
posted by Daddy-O at 1:49 PM on February 1, 2011


Yeah, I see now. I didn't think they made scratch offs like that. Half the fun is scratching off your own numbers, like this, not just the winning numbers. I thought that first image was already half scratched.
posted by yeti at 2:09 PM on February 1, 2011


I think its overly paternalistic to criticize poor people playing the lottery any more than their purchase of cable, cigarettes, junk food, video games and other non-essential items.

Don't worry, there will always be some Mefite or another willing to tsk-tsk poor(er) people for purchasing cable, cigarettes, junk food, or video games.
posted by muddgirl at 2:41 PM on February 1, 2011 [1 favorite]


The lottery thing is hard to explain. I don't really care about judging other people's choices - my own certainly wouldn't stand up to the same scrutiny - but is it paternalistic or condescending to be squicked out by a system designed to exploit? Addictive additives in tobacco, junk food engineered to be as addictive as possible...and lottery tickets that deliberately bait purchasers into buying more and more? There's barely a choice there at all for many people.
posted by peachfuzz at 3:07 PM on February 1, 2011 [2 favorites]



What I find totally depressing is that after spending months and years researching a party or candidates stand on various economic issues I know that my vote will likely be offset by one of these folk.

In a 2006 survey, 30 percent of people without a high school degree said that playing the lottery was a wealth-building strategy.

posted by notreally at 3:08 PM on February 1, 2011 [1 favorite]


But isn't the lottery just a symptom of the larger disease? We can hate the symptom and even wipe it out, but something else will just come along to replace it.
posted by muddgirl at 3:10 PM on February 1, 2011


Hrm. I'm not sure I am understanding - I don't necessarily think lotteries should go away, I was just trying to explain part of why they bother me, at least (lotteries, not the people who participate in them).
posted by peachfuzz at 3:15 PM on February 1, 2011


Should we be more squicked out by the lottery than by, say, casinos?

And I think you have to recognize that a lot of Mefites absolutely do care whether or not other individuals play the lottery. notreally's recent comment is a great example. So perhaps your mild condemnation of the game becomes part of a larger pattern.
posted by muddgirl at 3:28 PM on February 1, 2011


Whoops, meant to link to the comment, not notreally's profile.
posted by muddgirl at 3:28 PM on February 1, 2011


I don't think any of the lottos are this naive, but when I was a kid I hacked a scratch off prize system this way.

Godfather's Pizza had a deal where they would give you a card -- and would usually give you four or five of them per transaction -- with eight latex covered circles. You were supposed to scratch three and only three, and if they all represented the same prize you won. This was back in the 1970's so the tickets were all pre-printed and had been randomized by hand. With twenty or thirty tickets in hand I decided to scratch off all the latexes on all the losers and see if there were any patterns.

It turned out that there were a pretty small number of card patterns for the small prizes. The largest prize so represented was a free large pizza, which ended up being about 1 in 8 cards. I subsequently always scratched those three circles, and had free pizza for six months as a result.
posted by localroger at 3:32 PM on February 1, 2011 [11 favorites]



What I find totally depressing is that after spending months and years researching a party or candidates stand on various economic issues I know that my vote will likely be offset by one of these folk.

Yee-Haw! My Vote Cancels Out Y'all's!
posted by gagglezoomer at 3:33 PM on February 1, 2011 [1 favorite]


Should we be more squicked out by the lottery than by, say, casinos?

The fact that one is run by the state, and one by private enterprise does add a small squick factor for me, yes.
posted by inigo2 at 3:36 PM on February 1, 2011


Any ideas on breaking the barcodes? I assumed they were a simple hash code, and you can't really break a SHA1 hash. The article mentions that this is a worry at the companies, the payouts verify remotely, right? If you just have a hash, there's no way of knowing what the hash contains. I guess the hash has to also be seeded, otherwise the $0 payouts would be the same. In any case, I can't imagine the barcode containing any valuable information.
posted by geoff. at 3:48 PM on February 1, 2011


Are state-run liquor stores more problematic than private liquor stores?
posted by muddgirl at 3:51 PM on February 1, 2011


charlie don't surf: they gathered some investors to raise the stake and sent a horde of people to buy like $8m of tickets

An Australian syndicate tried to buy all 7.1 million possible combinations for a $27m Virginia lottery in 1992. They managed to get 5 million of them and were the only winners.
Here are articles about the win, the controversy, and the result. I'm sure I saw a documentary about this, but Google is failing me.

Someone also attempted to buy all the combinations on the Irish Lottery in May 1992.
posted by IanMorr at 3:54 PM on February 1, 2011 [4 favorites]


In a 2006 survey, 30 percent of people without a high school degree said that playing the lottery was a wealth-building strategy.

This is the worst thing I've read today.


Maybe I'm just a shitty survey candidate, but I'd agree that playing the lottery is a wealth-building strategy. It's obviously a really shitty one, though.

Similarly, I'd agree that choosing Palin as McCain's running mate was an election strategy.
posted by ODiV at 4:01 PM on February 1, 2011 [3 favorites]


Heh, ODiV. On the other hand: "On average, households that make less than $12,400 a year spend 5 percent of their income on lotteries—a source of hope for just a few bucks a throw."

I think you may be in the minority with your reasoning there.
posted by jaduncan at 4:04 PM on February 1, 2011


I've heard that a problem for convenience store owners is that the process is really easier than that. See that barcode at the bottom? it's used to verify winners. With some scratch-off cards, the clerk simply scans the roll with the scanner looking for the winners and buys them himself. I've heard second-hand from someone who owns several stores that the main cause for terminating employees is gaming the scratch offs.

Anyone have any first hand information on that?
posted by Mcable at 4:05 PM on February 1, 2011


McCain fell on his sword. He knew Obama was the better candidate and it was in the best interest of the country to allow the more vital, intellectually superior and politically saavy candidate to prevail in the election, despite the wishes of his party. He chose Palin in order to lose. A masterful strategy and the ultimate act of patriotism.
posted by gagglezoomer at 4:06 PM on February 1, 2011 [6 favorites]


Mcable: I think that when you scan the ticket, it is invalidated on the network at that point.
posted by gagglezoomer at 4:07 PM on February 1, 2011 [1 favorite]


Michael Larson
posted by mrgrimm at 4:58 PM on February 1, 2011 [1 favorite]


charlie don't surf: Someone discovered the only true way to rig Powerball or a multi-number lottery like that. You just buy one ticket for every set possible numbers. I don't recall the exact permutations to get the total number of possible tickets that can be played, but IIRC it's something like $8 million.

For the record, Powerball has just a shade under 200 million combinations (195,249,054 to be precise). Mega Millions, the other giant multi-state lottery, is somewhat less at just over 175 million (175,711,536). In contrast, the big Canadian national lottery, the 6/49 has just under 14 million combinations (13,983,816).
posted by mhum at 5:06 PM on February 1, 2011


I can't believe this guy actually TOLD the damn lottery about this. What the hell, man?
posted by orme at 5:23 PM on February 1, 2011


I can't believe this guy actually TOLD the damn lottery about this. What the hell, man?

Once he realized he couldn't make enough money off this in the time it took, then he thought they'd hire him as a consultant instead.
posted by inigo2 at 5:41 PM on February 1, 2011


With some scratch-off cards, the clerk simply scans the roll with the scanner looking for the winners and buys them himself.

In Iowa there was a near-scandal where clerks were taking tickets from customers, scanning a known dud so the customer would see it was a loser, hand the original back to the customer and then fetch the ticket out of the trash after the customer threw it away and left the building. Then they'd scan the original to see if it was a winner or not, and pocket the prize. This must have been on drawings rather than scratch-offs though, as you'd know if you had a scratch-off winner...

It was pretty rampant to the point that large prize-winners sold at some retailers were redeemed almost exclusively by employees. The lottery had to admit there was a problem and now doesn't allow clerks to scan tickets without the customer first signing the back. I don't know how they enforce this or whether it has made a difference, but the story faded from the media shortly after the new rules were put in place.
posted by the christopher hundreds at 6:31 PM on February 1, 2011 [1 favorite]


As the old canard goes:
The lottery is a tax on those who don't know mathematics.
posted by kaibutsu at 6:33 PM on February 1, 2011 [3 favorites]


“People often assume that I must be some extremely moral person because I didn’t take advantage of the lottery,” he says. “I can assure you that that’s not the case. I’d simply done the math and concluded that beating the game wasn’t worth my time.”

Ah, but he was being moral. The shady choice is to teach the technique to someone who would see it as worthwhile. Instead, he brought it to the attention of the lottery commission.
posted by a_green_man at 6:54 PM on February 1, 2011


Someone discovered the only true way to rig Powerball or a multi-number lottery like that. You just buy one ticket for every set possible numbers. I don't recall the exact permutations to get the total number of possible tickets that can be played, but IIRC it's something like $8 million.

Syndicate buys nearly all combination of lottery numbers to hedge jackpot. This apparently occurred in 1992.

In a SINGLE-COLOR state lottery (no "red/power ball" like the Powerball has, which instantly makes this completely infeasible), there becomes a point where it may be financially advantageous to try this. Arizona's Pick lottery, for instance, has six numbers, one through 44. The odds of getting all six correct are thus 1 in 7,059,052.

Since the jackpot is progressive, those rare times it surpasses $7 million dollars, it's a nearly sure thing if you can secure all the combinations.

Some complications: The above mentioned group fell short of securing all 7 million tickets. They simply ran out of time, despite having several people burning through what I have to imagine were pre-filled ticket slips. They would also need to index them somewhat intelligently, since every ten or twenty entries is a physical slip, and that's a lot of paper to sort through to find your winner.

That said, in doing this, they only ended with 5 million of the 7 million tickets. I'm sure they were absolutely panicked, but 70% odds aren't bad... though losing $5 million is pretty rough.

The jackpot in this particular instance was $27 million, and enough profit to make it worthwhile: Imagine a $14 million jackpot hitting two winners!

The group did in fact win, and was comprised of 2,500 investors. That means for every investor's $2,000 investment, they scored $10,800. If they had bought all 7 million combinations, they would have invested $2,800 each.

The NYTimes article describes them as having worked things out with retailers in advance to coordinate such a large purchase: since you only have a limited amount of time (the three or four days from when the previous draw has completed until the next draw), it's important that the retailer be prepared, with paper stock, and willing to tie up their machine for as long as it takes. Some retailers reported 2,400 tickets sold per hour, in fact.

This could never work in Powerball or another multi-state because the 1 in 150-200 million odds are far higher than most jackpots, and it would be essentially physically impossible to coordinate a ticket-printing effort of that magnitude in just four days, in any event.
posted by disillusioned at 7:47 PM on February 1, 2011 [1 favorite]


Everybody knows that the dice are loaded.
posted by Halloween Jack at 7:58 PM on February 1, 2011 [2 favorites]


Can't remember the last time I played a lottery. As others have said, once you know the maths, it's not worth it unless you're after a cheap thrill. Interesting reading, thanks.
posted by arcticseal at 8:31 PM on February 1, 2011


This is too cool not to try. I bought some California "Bingo Boxes" scratchers. Numbers are 01-75; 96 are visible, 30 hidden.

I can post the raw data if anyone else wants to take a crack at it. Give me a day to type in all these damn numbers. So far I have entered 1260 two-digit numbers and won $7.
posted by ryanrs at 3:30 AM on February 2, 2011


Srivastava is lucky - a guy in Canada who alerted a slot machine vendor to an issue got sued to the tune of 10 million dollars for telling them about a flaw in their machines that was something like the Konami Code.
posted by winna at 6:34 AM on February 2, 2011 [1 favorite]


In a 2006 survey, 30 percent of people without a high school degree said that playing the lottery was a wealth-building strategy.

I can absolutely believe that. If you live in a poor area, or you don't know that education is open to you, it is very seductive. I don't even play the lottery, and I haven't bought a scratchcard since I was underage, but the idea of someone giving me money just for filling in a form and handing over a pound seems suddenly more likely than, say, saving up the deposit necessary to buy a house - well, people win every week, don't they? It depresses me though to see people who have very little money spending it on a ticket when they could spend it on a nice drink or a cake and will have 100% chance of enjoying that rather than 14m to 1 of winning some money.
posted by mippy at 7:14 AM on February 2, 2011


ryanrs - let us know how it goes. I am interested in trying too, as a thought experiment. Let me know if I can help
posted by I am the Walrus at 7:27 AM on February 2, 2011


As someone who is deeply risk adverse, I've never actually played any sort of lotto. However, I can see myself feeling that $600/day is worth it. That's quite a lot more money than I make currently. I wonder if the commissions blacklist people who win too often, in the same manner as casinos.
posted by stoneweaver at 10:17 AM on February 2, 2011


IanMorr: An Australian syndicate tried to buy all 7.1 million possible combinations for a $27m Virginia lottery in 1992. They managed to get 5 million of them and were the only winners.

Here are articles about the win, the controversy, and the result.


From the result:
An Australian Securities Commission official said the International Lotto Fund collected a total of $7.5 million from about 2,500 investors, or an average of $3,000 from each. If the fund charged no management fee, the average investor's share of the Virginia jackpot would be $10,800, or $540 a year through the year 2011.
Even with the idea that the fund managers paid their own way in (doubtful), it would take about 5.5 years until the $3,000 investment broke even, ignoring taxes and whatnot.

I also remember seeing a documentary on this, but I thought it was part of a "true stories" TV series, not a stand-alone film. None of the search results on Google seem to match, but some are interesting (searching for Australian lottery virginia 1992 site:wikipedia.org turns up Mark Goodson, an American television producer who specialized in game shows; Lorraine Crapp, a former Olympic swimming champion; and conscription).
posted by filthy light thief at 10:36 AM on February 2, 2011


Back in around 1985, I was a security guard posted to a convenience store in a poor area of Holyoke, MA. They sold scratch offs, of course.

The clerk I usually worked with had figured out that if loosing cards contained certain numbers, the next card was nearly always a winner. He'd offer to toss loosing cards for customers, check them and buy winners.

He didn't make much, US$5 here, US$10 there, but it did make up a little for minimum wage and no health insurance.
posted by QIbHom at 7:45 AM on February 3, 2011 [2 favorites]


Ross Dalton of Gtech Publishing said:
“Every lottery knows that it’s one scandal away from being shut down,” Dalton says. “It’s a constant race to stay ahead of the bad guys.”

What in the world is bad about it? It's a flaw in your game dammit! Fix the flaw.

In recent years, Dalton says, the printers have become increasingly worried about forensic breaking, the possibility of criminals using sophisticated imaging technology to see underneath the latex.

All the while their tickets are just plainly vulnerable to casual inspection. Ludicrous.

I'm really interested in this article because a couple of weeks ago I found myself musing along similar lines. Of course it takes some source money for tickets to build an evidence base to find flaws like this, and some time and effort to find a vulnerability that may not actually exist. I didn't know that flaws were rife in the field. Incredible.

The printers have also become concerned about the barcodes on the tickets, since the data often contains information about payouts.

WHAT
posted by JHarris at 9:53 PM on February 3, 2011 [1 favorite]


The more I think about this the madder I get.

The game in the article? Eight tic-tac-toe boards, each with randomish numbers. The scratch-off part reveals which numbers should be marked. If after revealing the numbers the marked spots show a winner, the ticket pays out.

The exploit concerns a strong correlation between the visible numbers and the chances of winning. What makes me mad is, there is no earthly reason the visible numbers have to be random! If they were just the numbers 1 through 72, arranged in order or randomly throughout the 8 game boards each with 9 numbers, the game would still be easy to implement while making this kind of exploit impossible.

To me, this points strongly that at least the people who made this game, Pollard Banknote, are design lightweights who should not be in this business at all. Considering how we're just hearing about this now three years after the exploit was found, it having made basically no ripples in the national media since then, it seems very unlikely to me that these games have been repaired in any meaningful sense. Just, wow.

Also, I have to admit I'm a little annoyed at the way this post was framed. Extremely interesting article, but I missed it four days ago because the FPP communicates nothing about why I should click through.
posted by JHarris at 5:10 PM on February 4, 2011 [1 favorite]


It's a story about cracking scratch-and-win tickets using statistics. All of which are mentioned in the framing of the story. What more did you want?
posted by jacquilynne at 5:27 PM on February 4, 2011


Well:
It's a Wired story, and not, say, a video or a blog post. Published articles tend to be more interesting than random internet finds.
It's about an endemic flaw in scratch-off lottery tickets that imperils a billion-dollar-a-year industry.
It's about a specific mathematician and a specific scratch game in a specific province, and even goes into the precise details of how the game was flawed. The post seems very non-specific.

I was a little cranky when I wrote the previous comment, sorry. I can see where one might want to take a minimalist approach to Metafilter post writing. And this one isn't exactly mystery-meat, granted. I just really wish I had spotted it closer to its initial posting date, so I could have participated in the conversation. Unfortunately I don't have the time to check into every post. I suppose my annoyance could also be taken as a symptom that my post-reading heuristics are faulty.

In any event, it is a very nice article.
posted by JHarris at 12:53 PM on February 5, 2011


JHarris: A grid of only single numbers to be uncovered makes the game less exciting for the players...
posted by sleslie at 6:02 PM on February 5, 2011


Problem: The lottery appeals primarily to those with a combination of little money and a lack of education.

Solution: Hire a consultant to create an appeal of the lottery to those with a hacker instinct, a math background, or just a higher level of education by saying that the lottery is flawed. This will entice those with more money to start buying lottery tickets.

Prediction: It will one day be revealed that Mr. Srivastava was hired by a lottery lobbyist to plant this idea into our heads.
posted by mincus at 7:45 AM on February 8, 2011


When poor people buy a lottery ticket, I think what they're really buying is the dream of escape. Enjoying that dream for the few hours it lasts is, for someone with few other options, well worth the purchase price. That's the view I take when I'm feeling charitable anyway.

National Lottery tickets here in the UK must donate part of their profits to Government-specified "Good Causes", such as sponsorship for the high-brow arts. This has led to unemployed and working-class ticket buyers subsidising the pleasures of the rich. As the comedian Linda Smith used to imagine herself saying when kept waiting with her shopping behind a queue of ticket-buyers like these: "KEEN on opera are you?!"
posted by Paul Slade at 1:07 PM on February 8, 2011 [2 favorites]


I volunteer at a charitable organization that operates a bingo hall as a fund raiser.* They do both traditional bingo, and sell scratch-off tickets. Because of the way my mind works, I've spent a fair amount of time trying to figure out whether the system is flawed.

The main event, the traditional bingo, strikes me as nearly impossible to game, at least without obvious cheating. Each game has a fixed payout ($100), and the games are played until somebody wins -- thus the house has no interest in the outcome. (The players' odds depend on the number of cards sold in each game; bingo is, essentially, a complex raffle.) The balls are drawn from a pneumatic machine, similar to those used for most lotteries. There's a video camera on it, so that players can ensure the number called is actually the ball that popped up. There are multiple sets of balls that are rotated through on different nights, and the players aren't aware which is in use, or when they're replaced. Players get preprinted cards that appear to have a random distribution of numbers on them. In truth they're not individually randomized; there are only a certain number of card layouts printed, but the number is fairly high (1000s) so that even in a big game there won't be more than 1 or 2 identical cards on the floor.

Even if you gave a player complete control over any one aspect of the game, there's still enough randomness to prevent an easy win. Even if you knew which balls were going to be called, you have no control over the numbers printed on your cards.

About the best you could do would be if there was a variant that allowed choosing your own card numbers (which we don't allow, but I think other places do); if you could do that, and studied the balls enough, maybe you could up your chances by a tiny bit. But it'd be really hard.

Contrast all of this to scratch tickets, where both the player and the house are at the mercy of the card printer. If the printer screws up and puts two $500 winners into a box of cards that's only supposed to pay out $850 total, the house ends up out. (I assume that they might try to recover from the printer, but how exactly that would work I've no idea.) If the printer doesn't put one in, then in all probability the average player will never know. The whole thing is totally opaque -- literally, you have no idea what's going to be behind the scratchy-stuff, or how it got there. Unlike in bingo, where the odds are apparent to any player based on the number of people in the room, the scratch player has no idea ... except, perhaps, by buying a whole stack of tickets and seeing how many pay out.

The striking thing to me is that the scratch tickets and traditional bingo bring in about the same amount of money on an average day. For all the effort that's put into making the bingo game transparent, players are just as willing to play one that could be massively rigged against them. It's disappointing, to say the least.

* It's a bit of an ambiguous situation for me. On one hand the organization does a lot of good with the money raised, and they have virtually zero chance of ever getting the same level of funding from direct donations or tax-funded grants, but on the other hand it's pretty clear that some of the players have no business spending the money they're spending on bingo. (Although this isn't true of all the players; some people come in and drop $30 and get three hours of socialization and entertainment out of it, which strikes me as a not-terrible deal, if you're into bingo.)
posted by Kadin2048 at 3:36 PM on February 8, 2011


A good read. It's amazing how the lottery works, even though I never paid attention to it.
posted by kopi at 10:20 AM on February 10, 2011


Here's the lotto data I promised. It includes numbers from $60 worth of California Lottery "Bingo Boxes" scratchers. The Python code does some basic validation to catch typos, then scores the tickets. Add your own code to look for interesting statistics. I people are seriously interested, they might be able to convince me to type in another ten or twenty tickets. (Maybe. It's pretty mind-numbing work.)

----------------------------
I hereby release to the public domain all rights to the following code and data. Use it as you wish.
#!/usr/bin/python
class Card(object):
    def __init__(self, name, matrix):
        self.name = name
        self.__matrix = tuple(tuple(int(x) for x in row) for row in matrix)

        assert len(self.__matrix) == 5, \
            "%s: matrix does not have 5 rows." % self.__name

        # Check some constraints (mostly to help catch data entry errors).
        for i, row in enumerate(self.__matrix):
            msg = "%s: row %i " % (self.name, i)
            assert len(row) == 5, msg + "does not have 5 numbers."

            # Each column is restricted to a subset of the full range.
            assert  1 <= row[0] <= 15, msg + "column 0 not in range 01-15."
            assert 16 <= row[1] <= 30, msg + "column 1 not in range 16-30."
            if i == 2:
                assert row[2] == 0, msg + "column 2 not wildcard (0)."
            else:
                assert 31 <= row[2] <= 45, msg + "column 2 not in range 31-45."
            assert 46 <= row[3] <= 60, msg + "column 3 not in range 46-60."
            assert 61 <= row[4] <= 75, msg + "column 4 not in range 61-75."

        # Check for duplicate numbers.
        nums = self.Numbers()
        assert len(nums) == len(set(nums)), \
            "%s: card has duplicate numbers." % self.name

    # Tuple of all 25 numbers.
    def Numbers(self):
        return sum(self.__matrix, tuple())

    # Tuple of 5 rows, each a tuple of 5 numbers.
    def Rows(self):
        return self.__matrix

    # Tuple of 5 columns, each a tuple of 5 numbers.  Transpose of rows().
    def Columns(self):
        return zip(*self.__matrix)


class Ticket(object):
    def __init__(self, name, caller, bonus, card0, card1, card2, card3):
        assert len(caller) == 25, "%s: caller does not have 25 numbers." % name
        assert len(bonus) == 5, "%s: bonus does not have 5 numbers." % name

        self.name = name
        self.caller = tuple(int(x) for x in caller)
        self.bonus = tuple(int(x) for x in bonus)

        # Caller numbers are drawn from pool of 01-75.
        for num in self.caller:
            assert 1 <= num <= 75, \
                "%s: caller number not in range 01-75." % name

        # Bonus should have one number from each subrange.
        for mmin, mmax in [(1,15), (16,30), (31,45), (46,60), (61,75)]:
            assert any(mmin <= b <= mmax for b in self.bonus), \
                "%s: no bonus number in range %02i-%02i." % (name, mmin, mmax)

        # Later tests makes these redundant, but they give more specific error
        # messages.
        assert len(self.caller) == len(set(self.caller)), \
            "%s: caller has duplicates." % name
        assert len(self.bonus) == len(set(self.bonus)), \
            "%s: bonus has duplicates." % name

        self.numberset = set(self.caller + self.bonus)
        assert len(self.caller) + len(self.bonus) == len(self.numberset), \
            "%s: duplicate number in caller and bonus." % name

        # Include 0 so the wildcard will always match.
        self.numberset.add(0)

        self.cards = (
            Card(self.name + ", Card 0", card0),
            Card(self.name + ", Card 1", card1),
            Card(self.name + ", Card 2", card2),
            Card(self.name + ", Card 3", card3))

    def Play(self):
        # Bitmasks representing positions on the 5x5 card.
        #   1<<0 is row 0, column 0 (top left)
        #   1<<2 is row 0, column 1
        #   1<<24 is row 4, column 4 (bottom right)
        diag1 = sum(1 << 6*x for x in range(5))   # top-left to bottom-right
        diag2 = sum(1 << 4*x for x in range(1,6)) # top-right to bottom-left
        horz = sum(1 << x for x in range(5))      # row 0 (top)
        vert = sum(1 << 5*x for x in range(5))    # column 0 (left)
        corners = 1<<0 | 1<<4 | 1<<20 | 1<<24     # four corners of the card
        # The pink box, different for
        # each of the four cards.
        box = [
            1<<18 | 1<<19 | 1<<23 | 1<<24, # pink box for box 1
            1<<2 |1<<3 | 1<<7 | 1<<8,      # pink box for box 2
            1<<0 | 1<<1 | 1<<5 | 1<<6,     # etc.
            1<<15 | 1<<16 | 1<<20 | 1<<21 ]
        dollars = 0
        results = []
        for card_i, card in enumerate(self.cards):
            # Bitmask records which card positions have matching numbers.
            bitmask = sum(1<<i for i, n in enumerate(card.Numbers())
                                if n in self.numberset)
            def win(pattern):
                return bitmask & pattern == pattern

            if win(diag1 + diag2):
                results.append("%s: win X" % card.name)
                dollars += [100, 500, 1000, 20000][card_i]
            elif win(diag1):
                results.append("%s: win line (diag1 [\\])" % card.name)
                dollars += [3, 4, 5, 10][card_i]
            elif win(diag2):
                results.append("%s: win line (diag2 [/])" % card.name)
                dollars += [3, 4, 5, 10][card_i]

            if win(box[card_i]):
                results.append("%s: win box" % card.name)
                dollars += [50, 100, 500, 1000][card_i]

            if win(corners):
                results.append("%s: win corners" % card.name)
                dollars += [5, 10, 20, 50][card_i]

            for i in range(5):
                if win(horz << 5*i):
                    results.append("%s: win line (horz %i)" % (card.name, i))
                    dollars += [3, 4, 5, 10][card_i]
                if win(vert << i):
                    results.append("%s: win line (vert %i)" % (card.name, i))
                    dollars += [3, 4, 5, 10][card_i]
        return (dollars, results)



# California Lottery scratcher game 682 "Bingo Boxes"
# Introduced February 2011.  Price is $3.
# For photos of ticket and odds, see:
# http://www.calottery.com/Games/Scratchers/3ScratcherGallery/682-BingoBoxes.htm
#
#    +-------------------------------------------------+
#    | $3                 B I N G O                    |
#    |                    B O X E S                    |
#    |=================================================|  \
#    |    [2D-bar-code]        |    [13-digit-number]  |   |
#    |_________________________|                       |   |
#    |                                      |   BONUS  |   |-- hidden under
#    |  CALLER  10  62  40  44  09  08  33  |    57    |   |   opaque coating
#    |  17  12  42  20  38  54  02  05  60  |  67  16  |   |
#    |  56  28  58  72  73  23  64  27  18  |  03  36  |  /
#    |=================================================|
#    |                                                 |  \
#    |          CARD 0                 CARD 1          |   |
#    |    06  23  31  47  61     04  24 [40][54] 62    |   |
#    |    09  28  33  59  74     12  17 [45][59] 64    |   |
#    |    01  27  **  58  63     15  16  **  47  72    |   |
#    |    08  16  40 [57][65]    03  26  31  56  69    |   |-- always visible
#    |    14  29  44 [51][69]    13  20  36  60  74    |   |
#    |                                                 |   |
#    |          CARD 2                 CARD 3          |   |
#    |   [10][19] 42  57  67     14  16  45  56  73    |   |
#    |   [14][18] 31  56  69     05  29  38  48  74    |   |
#    |    09  16  **  54  63     02  19 (**) 50  64    |   |
#    |    02  26  43  59  62    [08][28] 35\ 47  61    |   |
#    |    13  24  32  51  73    [06][26] 36 \57  72    |   |
#    |                             ^         \         |   |
#    | [serial-number]             |          \        |  /
#    +--|--------------------------|-----------\-------+
#       |                          |            \--"FREE" (entered as zero)
#       |--also printed on back    |
#          as a bar code           |--pink box, does not vary between tickets
#
# Notes:
# - Of course the "Cards" are actually numbered 1-4, but screw that.  We use
#   zero-based indexes throughout.
# - I believe this game is printed by Pollard Banknote.
# - Customer-accessible Lotto terminals can identify winning tickets by the
#   2D bar code above the Caller numbers.  The bar code appears to be a
#   non-standard PDF417 variant.  It is hidden under the same opaque latex
#   that covers the secret numbers.  It might just be another serial number,
#   though.  Lotto terminals use modems to talk to the servers at Lotto HQ.
#
# Scoring:
# - There is no apparent distinction between the 25 Caller numbers and the
#   5 Bonus numbers.  Treat it as a unified pool of 30 numbers.
# - The four cards are completely independent with regard to play and payout.
# - For each number on the Caller and Bonus lists, mark all matching numbers
#   on the four cards.  Also mark the "FREE" square in the center of each card.
# - Cards with the following patterns win:
#   - Line: horizontal, vertical, or diagonal.
#   - Corners: the four corners of a card.
#   - Box: the four numbers in the pink box.
#   - X: both diagonals.
# - Payout varies by pattern and by card:
#                 Card 0   Card 1    Card 2    Card 3
#      Line    (free ticket)   $4        $5       $10
#      Corners         5       10        20        50
#      Box            50      100       500     1,000
#      X             100      500     1,000    20,000
# - Published odds suggest it is not possible to win multiple patterns on the
#   same card (e.g. horizontal line AND the four corners of Card 0).  Either
#   they avoid printing those combinations or only the higher paying pattern is
#   is paid out.
# - Winning multiple prizes on different cards of the same ticket is fine.  See
#   Ticket 5.  The payout is the sum of the prizes won.
#
#
#
# Ticket("Ticket Name",
#     [Caller numbers], [Bonus numbers],
#     [[Card 0 row 0], [Card 0 row 1], [Card 0 row 2], [Card 0 row 3], [Card 0 row 4]],
#     [[Card 1 row 0], [Card 1 row 1], [Card 1 row 2], [Card 1 row 3], [Card 1 row 4]],
#     [[Card 2 row 0], [Card 2 row 1], [Card 2 row 2], [Card 2 row 3], [Card 2 row 4]],
#     [[Card 3 row 0], [Card 3 row 1], [Card 3 row 2], [Card 3 row 3], [Card 3 row 4]])
#
#
Tickets = [
    Ticket("Ticket 0", # This data matches the numbers in the ascii art ticket.
        [10,62,40,44,9,8,33,17,12,42,20,38,54,2,5,60,56,28,58,72,73,23,64,27,18],[57,67,16,3,36],
        [[ 6,23,31,47,61],[ 9,28,33,59,74],[ 1,27, 0,58,63],[ 8,16,40,57,65],[14,29,44,51,69]],
        [[ 4,24,40,54,62],[12,17,45,59,64],[15,16, 0,47,72],[ 3,26,31,56,69],[13,20,36,60,74]],
        [[10,19,42,57,67],[14,18,31,56,69],[ 9,16, 0,54,63],[ 2,26,43,59,62],[13,24,32,51,73]],
        [[14,16,45,56,73],[ 5,29,38,48,74],[ 2,19, 0,50,64],[ 8,28,35,47,61],[ 6,26,36,57,72]]),
    Ticket("Ticket 1",
        [13,39,34,42,61,27,54,46,26,23,1,30,59,9,10,32,4,64,41,17,48,35,71,65,56],[45,28,5,58,66],
        [[ 2,24,42,47,71],[10,27,31,46,70],[11,20, 0,54,64],[ 5,29,34,51,67],[ 6,30,33,48,66]],
        [[11,23,39,54,65],[15,17,35,51,64],[ 5,19, 0,56,71],[14,28,44,60,61],[10,26,43,49,70]],
        [[ 1,24,45,46,62],[ 4,19,37,51,66],[15,28, 0,59,74],[10,29,43,48,61],[11,18,32,60,70]],
        [[ 1,26,41,49,67],[ 2,20,43,46,70],[13,19, 0,58,64],[ 4,27,37,47,73],[ 9,24,31,50,66]]),
    Ticket("Ticket 2",
        [ 53,45,41,67,31,21,11,63,39,51,12,8,20,25,26,74,32,27,71,55,3,58,54,16,43],[15,64,35,19,57],
        [[ 1,16,45,55,70],[ 2,21,34,48,63],[11,18,0,52,74],[13,19,31,54,62],[ 8,24,44,53,68]],
        [[14,16,32,56,68],[11,23,34,48,64],[ 3,20,0,51,72],[ 1,24,41,60,70],[ 4,26,40,53,73]],
        [[ 3,23,35,52,71],[12,17,34,60,74],[ 2,21,0,58,73],[14,25,38,51,67],[ 1,27,39,56,68]],
        [[ 2,18,44,57,74],[11,30,37,52,68],[ 6,20,0,60,67],[15,26,43,55,70],[ 4,23,34,56,71]]),
    Ticket("Ticket 3",
        [ 24,61,3,30,48,35,8,43,72,16,13,69,38,33,55,42,12,49,5,75,73,62,47,27,58],[31,6,22,66,51],
        [[11,24,45,60,65],[12,16,36,54,74],[ 6,22,0,53,67],[ 3,30,31,47,68],[15,23,34,51,64]],
        [[ 8,30,34,55,75],[15,27,45,58,64],[ 5,16,0,49,67],[11,19,41,47,66],[ 3,24,38,59,70]],
        [[ 9,24,31,48,69],[11,17,36,59,71],[ 1,30,0,54,61],[ 6,28,42,55,72],[15,16,45,53,73]],
        [[ 5,21,35,49,75],[15,16,33,54,65],[12,18,0,58,62],[ 8,24,43,59,69],[13,17,36,51,64]]),
    Ticket("Ticket 4",
        [ 18,75,45,15,59,47,8,54,14,5,25,52,34,4,67,42,60,61,40,29,66,64,51,16,65],[ 7,30,72,50,39],
        [[15,16,33,46,72],[12,23,40,50,74],[ 5,25,0,58,68],[14,22,44,48,61],[11,18,34,52,63]],
        [[12,25,42,58,67],[ 3,16,39,51,72],[ 2,21,0,48,65],[ 8,27,36,57,74],[ 6,30,31,46,75]],
        [[ 8,17,33,59,72],[ 2,30,43,52,66],[11,25,0,54,71],[ 7,21,39,57,64],[ 6,29,45,58,68]],
        [[14,29,36,46,63],[ 1,18,39,60,75],[12,16,0,47,66],[ 7,23,35,54,64],[ 4,25,33,59,74]]),
    Ticket("Ticket 5",
        [ 39,71,43,58,50,11,19,32,61,68,9,47,26,25,49,38,7,28,52,6,75,31,64,63,59],[17,57,62,33,1],
        [[ 5,24,41,50,75],[ 1,18,36,46,64],[11,22,0,52,68],[ 4,27,32,58,69],[ 8,30,31,53,65]],
        [[ 5,17,36,54,62],[ 8,27,41,59,67],[11,25,0,58,71],[ 1,20,43,52,70],[ 2,18,37,60,72]],
        [[ 1,19,33,57,61],[ 2,20,35,50,72],[ 5,18,0,51,67],[ 4,24,44,49,70],[ 9,26,37,53,69]],
        [[ 9,19,38,49,69],[11,20,39,53,63],[ 6,26,0,47,67],[ 7,28,44,46,65],[ 4,24,41,57,62]]),
    Ticket("Ticket 6",
        [ 43,13,31,41,47,61,66,37,69,35,52,57,53,24,56,12,21,65,11,48,9,27,7,19,28],[44,14,50,17,75],
        [[ 2,28,41,53,75],[ 9,24,43,58,68],[ 3,26,0,57,70],[ 6,27,45,55,66],[15,19,40,46,63]],
        [[14,21,44,50,61],[ 7,26,45,56,62],[11,17,0,48,63],[12,23,34,54,70],[ 2,30,32,47,69]],
        [[ 2,19,40,60,69],[11,28,35,58,70],[ 6,26,0,52,62],[ 7,30,42,49,63],[ 4,18,31,46,67]],
        [[ 9,18,44,52,65],[12,26,40,60,70],[13,30,0,49,63],[ 7,17,37,46,62],[15,23,35,55,69]]),
    Ticket("Ticket 7",
        [ 2,8,20,29,1,15,50,46,31,52,36,26,54,74,40,67,72,30,42,59,13,25,55,35,69],[56,16,61,45,10],
        [[13,16,32,47,72],[ 9,21,35,55,65],[ 7,28,0,58,73],[ 1,27,37,57,66],[14,26,33,56,68]],
        [[11,28,31,46,73],[13,21,34,53,69],[15,16,0,55,68],[ 2,22,33,50,61],[ 7,27,40,54,66]],
        [[ 8,16,36,46,68],[ 5,30,39,54,66],[ 9,20,0,52,67],[15,22,38,60,69],[ 7,27,45,49,74]],
        [[ 5,28,31,47,67],[10,21,42,57,74],[ 7,27,0,59,68],[11,25,36,60,69],[ 8,29,38,56,72]]),
    Ticket("Ticket 8",
        [ 75,30,33,49,28,6,74,15,29,58,19,69,16,10,2,45,13,47,36,71,52,8,56,39,46],[53,61,7,23,40],
        [[15,30,36,48,73],[ 1,21,40,53,61],[10,26,0,57,69],[ 8,25,33,60,72],[13,18,42,51,65]],
        [[ 9,24,45,57,75],[ 2,23,43,55,71],[ 1,29,0,56,73],[ 6,28,38,60,70],[ 4,25,40,58,74]],
        [[12,16,45,57,61],[ 7,21,39,55,74],[ 9,19,0,52,65],[ 4,24,41,51,68],[ 1,23,43,47,69]],
        [[ 1,23,34,49,69],[15,25,40,57,61],[ 9,18,0,53,73],[ 7,26,33,46,67],[ 4,29,42,55,71]]),
    Ticket("Ticket 9",
        [ 11,63,46,50,14,21,3,24,39,1,61,4,23,34,73,64,59,70,75,12,44,36,29,47,60],[13,16,71,52,38],
        [[ 4,22,34,50,64],[ 8,16,44,54,72],[ 7,27,0,55,61],[15,24,40,46,67],[ 3,25,35,59,62]],
        [[ 2,16,35,46,67],[12,27,45,60,71],[ 8,29,0,49,75],[ 4,21,36,51,65],[15,18,38,52,70]],
        [[ 2,25,41,55,67],[13,22,39,47,63],[ 7,21,0,51,70],[ 4,27,45,52,68],[12,23,36,49,73]],
        [[15,21,37,58,65],[14,27,45,49,67],[ 3,29,0,54,72],[ 1,25,35,48,64],[11,24,40,52,74]]),
    Ticket("Ticket 10",
        [ 41,12,62,1,25,59,14,20,50,8,39,38,75,26,31,73,63,9,55,52,68,13,47,67,29],[34,65,6,46,27],
        [[ 8,20,34,57,63],[ 7,21,41,49,65],[ 1,18,0,46,72],[14,19,38,52,66],[ 2,17,33,47,62]],
        [[ 1,30,35,55,67],[10,27,39,48,75],[ 3,20,0,46,61],[12,16,37,60,68],[ 2,26,34,50,70]],
        [[13,27,40,53,61],[ 6,24,33,49,74],[ 9,29,0,60,66],[ 8,18,34,55,70],[ 2,19,37,50,65]],
        [[ 1,30,40,48,67],[13,29,35,59,73],[ 9,20,0,49,62],[12,25,31,53,74],[ 2,26,34,57,68]]),
    Ticket("Ticket 11",
        [ 21,35,73,4,34,62,63,60,13,40,10,20,75,28,46,71,23,55,38,6,30,22,66,53,3],[37,14,51,72,24],
        [[12,26,41,58,66],[ 4,22,34,48,63],[10,17,0,57,68],[13,19,37,54,74],[ 3,27,40,46,72]],
        [[ 6,17,32,58,73],[13,30,35,60,70],[12,23,0,53,71],[15,28,37,54,66],[11,19,40,55,75]],
        [[12,16,34,48,71],[14,19,36,51,65],[ 1,24,0,57,62],[11,26,40,54,64],[ 5,20,31,47,73]],
        [[ 4,24,41,51,63],[11,21,38,46,73],[ 5,17,0,57,68],[10,27,35,53,69],[13,16,34,47,64]]),
    Ticket("Ticket 12",
        [ 30,69,60,24,54,2,62,14,44,21,32,67,28,5,55,52,31,34,29,46,8,41,25,57,65],[15,74,59,16,39],
        [[ 4,18,44,52,69],[14,26,43,51,72],[ 2,16,0,53,68],[ 3,17,40,48,66],[ 8,29,31,50,73]],
        [[ 9,26,39,55,67],[15,20,37,54,68],[11,16,0,46,69],[12,21,43,60,72],[ 4,17,38,59,66]],
        [[ 2,30,36,56,67],[ 6,18,39,54,69],[ 8,28,0,51,72],[15,26,34,57,68],[ 3,25,43,55,66]],
        [[ 2,24,40,56,74],[ 3,17,37,54,62],[ 8,18,0,50,65],[ 5,20,32,59,73],[11,29,41,60,64]]),
    Ticket("Ticket 13",
        [ 22,34,14,59,44,48,57,3,61,65,10,75,37,39,47,52,20,68,64,28,31,12,58,21,74],[26,60,35,63,13],
        [[15,29,44,48,63],[10,20,38,49,61],[ 6,26,0,46,64],[12,27,43,58,69],[14,30,31,57,62]],
        [[ 8,20,35,60,62],[10,27,41,53,65],[15,22,0,52,73],[14,30,43,49,69],[12,16,34,55,72]],
        [[ 8,23,37,48,73],[10,30,43,60,72],[13,17,0,49,66],[14,16,42,53,63],[ 3,27,39,51,68]],
        [[ 1,28,37,49,72],[13,17,42,48,75],[ 6,24,0,59,65],[15,21,31,55,66],[ 8,26,43,47,74]]),
    Ticket("Ticket 14",
        [ 65,23,25,57,3,52,69,11,49,36,9,47,8,59,74,38,13,2,53,41,66,21,68,42,19],[34,48,20,4,63],
        [[14,24,32,55,66],[15,21,34,48,72],[12,30,0,51,74],[11,23,42,53,73],[ 7,29,41,47,65]],
        [[ 3,29,36,51,68],[13,30,41,58,69],[15,24,0,57,65],[ 4,17,37,50,72],[10,20,32,52,61]],
        [[ 3,19,38,49,68],[12,23,32,46,66],[10,25,0,48,63],[ 9,17,33,51,74],[ 8,21,45,56,73]],
        [[12,25,45,57,73],[10,23,42,56,69],[ 6,21,0,59,67],[ 2,17,33,60,66],[ 4,30,36,51,65]]),
    Ticket("Ticket 15",
        [ 40,13,50,37,74,61,41,25,1,45,55,23,53,75,56,11,67,27,5,19,9,62,30,58,7],[14,29,36,51,63],
        [[10,16,35,56,67],[ 1,19,33,53,65],[ 9,21,0,49,68],[ 3,17,32,58,62],[14,23,37,52,75]],
        [[12,21,33,56,64],[11,23,39,55,68],[ 3,25,0,50,73],[15,30,41,60,69],[14,27,35,59,63]],
        [[ 6,16,40,50,63],[ 5,29,33,54,74],[13,18,0,53,64],[11,21,39,56,62],[10,27,45,59,65]],
        [[13,21,40,51,64],[ 3,16,33,54,63],[ 5,28,0,49,61],[ 7,25,36,60,75],[10,26,45,52,67]]),
    Ticket("Ticket 16",
        [ 74,25,64,16,35,22,71,47,63,56,41,57,40,13,34,14,48,1,38,68,43,5,51,23,11],[ 9,18,70,59,32],
        [[ 2,16,42,48,62],[10,24,36,47,64],[11,22,0,60,72],[ 5,23,39,53,67],[ 4,28,32,59,74]],
        [[12,23,36,56,74],[ 2,29,37,58,64],[11,24,0,51,71],[13,19,44,57,63],[14,18,39,46,70]],
        [[14,19,38,47,68],[ 5,28,42,46,75],[ 2,22,0,60,74],[11,25,34,50,70],[12,16,35,59,71]],
        [[13,23,43,48,75],[ 4,22,37,53,68],[ 9,19,0,46,63],[ 1,16,41,60,74],[11,28,40,51,64]]),
    Ticket("Ticket 17",
        [ 37,49,20,10,33,56,28,4,61,40,8,19,52,66,55,74,6,73,67,41,34,59,22,14,15],[68,7,25,53,43],
        [[ 3,29,42,56,69],[ 7,19,45,55,75],[11,20,0,57,68],[12,25,34,53,66],[ 2,22,33,47,63]],
        [[11,19,36,57,67],[ 8,22,37,54,63],[ 7,25,0,53,74],[ 3,16,34,50,70],[15,20,43,52,65]],
        [[ 2,25,42,54,67],[ 3,24,35,53,74],[10,30,0,50,66],[ 4,29,40,49,62],[ 6,28,43,57,73]],
        [[12,25,42,55,68],[ 7,30,31,53,61],[14,22,0,46,75],[15,16,41,59,69],[11,20,33,57,66]]),
    Ticket("Ticket 18",
        [ 48,15,5,52,59,37,73,10,25,33,54,50,22,65,74,71,41,14,23,7,16,61,43,20,39],[51,30,32,8,72],
        [[10,28,41,51,71],[ 8,26,31,48,70],[ 9,19,0,50,63],[ 4,17,43,46,75],[14,18,32,54,69]],
        [[ 4,30,40,50,61],[ 8,28,34,56,65],[ 6,22,0,51,63],[ 9,18,43,59,73],[ 7,16,33,47,70]],
        [[ 9,22,38,48,72],[ 5,17,32,57,74],[ 8,23,0,49,75],[15,26,37,50,70],[ 1,30,36,59,63]],
        [[ 2,25,32,51,71],[ 7,16,39,56,68],[ 6,17,0,52,65],[ 1,20,43,47,75],[ 8,18,34,59,72]]),
    Ticket("Ticket 19",
        [ 17,70,15,51,75,53,23,73,52,27,30,6,46,69,12,2,1,43,29,40,56,31,34,32,71],[24,59,72,38,14],
        [[12,26,31,60,63],[ 9,29,40,56,69],[13,17,0,51,70],[15,27,43,49,72],[ 1,18,32,59,71]],
        [[12,16,41,59,69],[15,19,40,49,73],[ 2,23,0,47,64],[ 7,24,43,57,75],[ 4,30,35,46,65]],
        [[ 4,18,41,50,71],[ 6,29,35,52,74],[ 9,26,0,46,72],[ 3,20,38,57,73],[ 5,19,44,56,63]],
        [[ 5,29,41,57,73],[ 3,23,38,51,69],[ 4,27,0,46,63],[14,17,34,53,74],[13,28,39,50,65]])
]

def main():
    total_dollars = 0
    for ticket in Tickets:
        dollars, results = ticket.Play()
        if dollars:
            print "%s:" % ticket.name
            for line in results:
                print "    %s" % line
            print "    $%i" % dollars
            total_dollars += dollars
    print
    print "total $%i" % total_dollars

if __name__ == "__main__":
    main()

posted by ryanrs at 12:10 PM on February 14, 2011 [1 favorite]


Pretend I am dumb. What does the above tell me?
posted by cjorgensen at 12:45 PM on February 14, 2011


That I won $30 plus a free ticket? It's just numbers off some lottery tickets. Raw data if someone wants to look for vulnerabilities.
posted by ryanrs at 2:12 PM on February 14, 2011


« Older "The nurses are on roller skates."   |   The Economist asks economists who is THE economist Newer »


This thread has been archived and is closed to new comments



Post