hardware random number generator
there is now true random number generator (RNG), a usb device. TrueRNG V3 - USB Hardware Random Number Generator is there a review by cryptology mathematicians?
problems of hardware based RNG
however, note that hardware based RNG is prone to silent failure of degrading. i.e. you won't know over time its random numbers are still fair.
pseudorandom number algorithm
the pseudorandom number in programing language is quite interesting. how it possible to do it algorithmically, and what's the nature of the generated numbers. Wikipedia has details, i read for an hour yesterday, haven't finished yet.
Wikipedia has a article on lottery machine, but not much detail.
There is a lottery cheating incident. They swapped in weighted balls, and successfully got a 666. (draw of 3 balls out of 10 balls labeled 0 to 9) but they got caught after the fact, not due to the tampering, but greed.
lottery machine fraud
The 1980 Pennsylvania Lottery scandal, colloquially known as the Triple Six Fix, was a plot to rig The Daily Number, a three-digit game of the Pennsylvania Lottery. All of the balls in the three machines, except those numbered 4 and 6, were weighted, meaning that the drawing was almost sure to be a combination of those digits. The scheme was successful in that 666 (one of the eight combinations of 4s and 6s that the "fixers" were hoping for) was drawn on April 24, 1980; however, the unusual betting patterns alerted authorities to the crime. The chief conspirators were sent to prison, and most of the fraudulently acquired winnings were never paid out.
2018-12-24 1980 Pennsylvania Lottery scandal
toy lottery machine
i bought a toy lottery machine in 90s. I always thought, it's a necessary tool for a great programer mathematician. lol.
There are high quality ones you can buy. This one is $100.
If you have a question, put $5 at patreon and message me.