Earlier quoted context omitted.
But that's a solvable problem. OK, database geek hat on here. It's not too hard to pregenerate a set of every possible ticket combination, just lots of cross joining of numbers tables and a bit of coding of the play rules. Add in the payout rules and you can produce a total set of all possible cards along with the payout for each given card. From this set, we can select exactly the number and balance of paying and no…
I don't think you've done the math yet on how many possible ticket combinations there are. I have more reason than most people to spend time thinking about bingo math. Get out a piece of paper and run some calculations: enumerating the whole solution space is not feasible. Anyhow, the real solution is easier: checking a bingo card or lottery ticket for any feature you want is, essentially, O(1). Generating a lottery…
All this I agree won't help if your card design is as poor as the original article was, but to address the complaint of the poster before me it's perfectly possible to randomly generate tickets while controlling the number of winning tickets - you just have to have a screening function which prevents more than your controlled number of winners making it through.