Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Community > MacNN Lounge > Winning the Lottery

Winning the Lottery
Thread Tools
budster101
Baninated
Join Date: Dec 2004
Location: Illinois might be cold and flat, but at least it's ugly.
Status: Offline
Reply With Quote
Aug 11, 2005, 11:45 PM
 
My wife had mentioned that 4 men won the lottery today... and it made me think about how I used my commodore 64 to write a random number generator to play the lottery some years ago... I used to win $50 on occasion per every 20 games played, as per my experiment over 4 weeks time, but in the end I ended up only $10 or so ahead.

Does anyone think they have an idea on how to reproduce the random action for the drawings?
     
saddino
Mac Enthusiast
Join Date: Nov 2003
Status: Offline
Reply With Quote
Aug 12, 2005, 12:06 AM
 
Originally Posted by budster101
My wife had mentioned that 4 men won the lottery today... and it made me think about how I used my commodore 64 to write a random number generator to play the lottery some years ago... I used to win $50 on occasion per every 20 games played, as per my experiment over 4 weeks time, but in the end I ended up only $10 or so ahead.

Does anyone think they have an idea on how to reproduce the random action for the drawings?
That's impossible. One random event (and the source of its generation) has no "connection" with another, unrelated random event. You can't reproduce randomness.

Easy to prove: write a program that generates 1,000,000 lottery numbers and writes them into a file. These will simulate 19 thousands years of Powerball weekly drawings.

Now, on another computer, write a program that "guesses" lottery numbers and feed it as data, your file of 1,000,000 numbers. See how many "hits" you get. My guess: 0

Okay, so Powerball's a tough game. Rewrite your programs. Generate a "daily lotto" of three digits. One million of them (2700 years worth). Now see how many hits you get. My guess: somewhere around 1000.

Then, see how many times the number 777 won. My guess: somewhere around 1000.

In fact, just about every combination of three digits will have won about the same number of times. That's how randomness and probability work.

There's no pattern in randomness. If there is a pattern, then it's not random. And if it's not random, then it's deviation from random is probably minimal.
     
budster101  (op)
Baninated
Join Date: Dec 2004
Location: Illinois might be cold and flat, but at least it's ugly.
Status: Offline
Reply With Quote
Aug 12, 2005, 12:13 AM
 
I was thinking more in the way of fuzzy logic:

Tie into the algorithm the ambient temperature of the room where the lottery drawing is, as well as the surface of the balls, their reaction to each other (the physics), the size of the machine, etc... as well as the randomness...

Is this idiotic to those more versed in math and physics than me? (99 percent of these boards)...
     
saddino
Mac Enthusiast
Join Date: Nov 2003
Status: Offline
Reply With Quote
Aug 12, 2005, 12:26 AM
 
Originally Posted by budster101
I was thinking more in the way of fuzzy logic:

Tie into the algorithm the ambient temperature of the room where the lottery drawing is, as well as the surface of the balls, their reaction to each other (the physics), the size of the machine, etc... as well as the randomness...

Is this idiotic to those more versed in math and physics than me? (99 percent of these boards)...
Ah, yes this is different. The problem is this: if every ball is in fact perfectly identical to the other, than you can't simulate it worth any measurable edge. The motion of the balls in many lotteries is due to fluid dynamics (the air blowing around the balls) and it would take a supercomputer an eternity just to figure out how ONE ball would accurately blow around in there (simulation is one thing, prediction is entriely another), given perfect measurements of all the variables.

In the lottery it's just too hard of a problem.

People have tried to do this though: with roulette wheels, the reason being that the "dealer" typically gets into the habit of giving the wheel the exact same push each time. If you measure enough results from the same dealer (given the dealer is prone to this) and can get a decent glimpse at the location in the wheel the ball went in, then you can in fact give yourself a slight edge in the game.
     
parallax
Admin Emeritus
Join Date: Oct 2000
Location: Boston, MA
Status: Offline
Reply With Quote
Aug 12, 2005, 12:27 AM
 
If you could simulate all of the balls and you did know every detail about their initial state, sure, you could probably figure out which numbers will be drawn. The physics are macroscopic enough that I don't think you'd run into any theoretical limitations.

Is it feasible? Absolutely not.
"Against stupidity, the gods themselves contend in vain" (Schiller)
     
budster101  (op)
Baninated
Join Date: Dec 2004
Location: Illinois might be cold and flat, but at least it's ugly.
Status: Offline
Reply With Quote
Aug 12, 2005, 12:31 AM
 
Looks like I'll have to resort to my alternative theory.

Wife's Birthday & Mine
Our Anniversary
The Day we met
Dog's Birthday
...

     
TubaMuffins
Senior User
Join Date: Oct 2003
Location: Minneapolis
Status: Offline
Reply With Quote
Aug 12, 2005, 01:27 AM
 
I'll let you guys in on a little secret. All odds are 50/50. Everything.
     
JustAnOl'Broad
Mac Enthusiast
Join Date: Feb 2005
Location: The Nut Ranch
Status: Offline
Reply With Quote
Aug 12, 2005, 01:51 AM
 
Originally Posted by saddino
In the lottery it's just too hard of a problem.
Actually, a bunch of guys solved this in Pennsylvania years ago;
don't remember the exact details - but they used a hypodermic
needle to inject several balls (with a substance), then bet heavily.
It was a big scandal, back in the day. Payout was huge, and
they were caught pretty quickly.
If memory serves they were Lottery employees and Officials.
Think they can be reached via the PA Dept of Corrections.
     
tavilach
Mac Elite
Join Date: Jan 2004
Location: Berkeley, CA
Status: Offline
Reply With Quote
Aug 12, 2005, 01:52 AM
 
Originally Posted by TubaMuffins
I'll let you guys in on a little secret. All odds are 50/50. Everything.
I have a 50/50 chance of taking a crap in my pantst at this very moment?

I take it I'm misunderstanding .
"Give me a lever long enough and a fulcrum on which to place it, and I shall move the world." -Archimedes
     
Ghoser777
Professional Poster
Join Date: Dec 2000
Location: Chicago, Illinois
Status: Offline
Reply With Quote
Aug 12, 2005, 01:58 AM
 
Which version of lottery are you planning on playing? I'll use some fancy math to show how you lose money on average.
     
SSharon
Professional Poster
Join Date: Jan 2003
Location: Teaneck, NJ
Status: Offline
Reply With Quote
Aug 12, 2005, 02:24 AM
 
Originally Posted by saddino
People have tried to do this though: with roulette wheels, the reason being that the "dealer" typically gets into the habit of giving the wheel the exact same push each time. If you measure enough results from the same dealer (given the dealer is prone to this) and can get a decent glimpse at the location in the wheel the ball went in, then you can in fact give yourself a slight edge in the game.
I watched a history channel show on this and the way these guys cheated was by using a computer to time one revolution of the ball and one revolution of the wheel and then compute which 8th it would fall in giving them something around 144% return.
AT&T iPhone 5S and 6; 13" MBP; MDD G4.
     
TubaMuffins
Senior User
Join Date: Oct 2003
Location: Minneapolis
Status: Offline
Reply With Quote
Aug 12, 2005, 03:05 PM
 
Originally Posted by tavilach
I have a 50/50 chance of taking a crap in my pantst at this very moment?

I take it I'm misunderstanding .

nope, you've got the grasp of it. you either will crap your pants, or you want, to use your example. Everything "is" or "isn't", thus 50/50.
     
loki74
Mac Elite
Join Date: Apr 2005
Location: Las Vegas, NV
Status: Offline
Reply With Quote
Aug 12, 2005, 03:41 PM
 
Originally Posted by TubaMuffins
nope, you've got the grasp of it. you either will crap your pants, or you want, to use your example. Everything "is" or "isn't", thus 50/50.
nonononono. Wouldn't 50/50 chance (50 crap, 50 no crap) means that out of 100 times he sits there, 50 times he will crap in his pants, and 50 times he will not? Oh well.

Anyway, about it taking a supercomputer to calculate the fluid dynamics of the ball... can't most 3D animation apps do this on normal computers today? I know there is very good cloth simulation out there as well as very good solid and rigid body dynamics. Not sure about fluid dynamics though... hmm.

Of course, if you were calculation to an incredible amount of accuracy, it may need a supercomputer. The essential thing once you have all the constant data is the original position of the balls.

"In a world without walls or fences, what need have we for windows or gates?"
     
RAILhead
Addicted to MacNN
Join Date: Mar 2001
Location: USA
Status: Offline
Reply With Quote
Aug 12, 2005, 03:55 PM
 


You said "position of the balls"
"Everything's so clear to me now: I'm the keeper of the cheese and you're the lemon merchant. Get it? And he knows it.
That's why he's gonna kill us. So we got to beat it. Yeah. Before he let's loose the marmosets on us."
my bandmy web sitemy guitar effectsmy photosfacebookbrightpoint
     
SimpleLife
Mac Elite
Join Date: Nov 2004
Status: Offline
Reply With Quote
Aug 12, 2005, 03:59 PM
 
Originally Posted by budster101
I was thinking more in the way of fuzzy logic:

Tie into the algorithm the ambient temperature of the room where the lottery drawing is, as well as the surface of the balls, their reaction to each other (the physics), the size of the machine, etc... as well as the randomness...

Is this idiotic to those more versed in math and physics than me? (99 percent of these boards)...
Try to use some formulas from Quantum Mechanics.

It will reflect the complexity but you still get stuck with a set of probabilistic results.
     
saddino
Mac Enthusiast
Join Date: Nov 2003
Status: Offline
Reply With Quote
Aug 12, 2005, 04:04 PM
 
Originally Posted by loki74
Anyway, about it taking a supercomputer to calculate the fluid dynamics of the ball... can't most 3D animation apps do this on normal computers today? I know there is very good cloth simulation out there as well as very good solid and rigid body dynamics. Not sure about fluid dynamics though... hmm.

Of course, if you were calculation to an incredible amount of accuracy, it may need a supercomputer. The essential thing once you have all the constant data is the original position of the balls.
3D animation is just simulation, and thus approximation. You want to simulate balls bouncing around? No problem.

The "real world" problem of knowing exactly what will happen is quite different. The first problem is the insane variation in the initial conditions inside the lottery blower. One would need to know the precise temperature and humidity inside the chamber, the precise mass of each ball (and the temperature and humidity of air trapped in each ball), the precise fluctuation from spherical perfection of each ball (which would change every time you ran the machine, as balls would dent a bit here and there), the precise orientation of each ball at the outset, any variation in coffecient of friction due to the imperfect surface of each ball, the exact coeffecient of friction of the blower chamber, etc., etc., etc.

That alone is enough to make the problem impossible.

But, assume we could know all of these inital conditions perfectly (that is, so that any margin of error in each measurment would not disturb the outcome) and reduced the problem to just one ball bouncing around in the chamber.

The equation that describes the movement of air over that ball are Bernoulli's Equation.

This set of equations are so complex, that modern methods for solving them (and a source of research papers) are clever ways to approximate them so that they yield results that are accurate depending on the exact problem at hand. Even with approximations, these equations are solved using supercomputers, and even in those cases it is an extremely difficult task.

Calculating the flow of superheated air due to friction over a fighter jet is extremely hard, but a number of approximations can be made because the goal (not letting the plane fly apart) is one that doesn't require to know exactly how the air moves over the surfaces on a micro scale.

But with a little, almost weightless ping pong ball, you're going to need to be a level of precision that is not acheivable using today's computing power. The mathematics involved that describe how a turbulent airflow moves over a ping pong ball that precisely mimics a real world condition is out of the question.
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 07:12 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,