Can a computer give TRUE random numbers?

Page 2 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.

dullard

Elite Member
May 21, 2001
25,214
3,632
126
It's easier just to deny that random numbers can ever be selected with a computer and the best method is drawing numbered ping pong balls out of a bucket.
Hook up the ping pong balls to a digital scanner. Now have a computer choosing random numbers.

You are correct that algorithms are never truly random, but they can be random enough for many purposes. However, your claim that a computer can not select random numbers is disproved by your own statement. You just need some non-algorithm hardware based method.
 

dullard

Elite Member
May 21, 2001
25,214
3,632
126
For whatever reason "true" random is often assumed to be best, when pseudo-random is actually more useful in practice because it's possible to replicate. Also in practice the random numbers generated by computers using some clock method are more than good enough with only specific exceptions, typical where said replication is a security risk.
I agree. When developing a program, I give my pseudo-random numbers the same seed each time. That way I can test the software. If it were truly random, then I would have no really good way to test software changes in development. Was the result change due to the random number change or due to the software change?

Then before using it for real applications, I give it a time-based seed (milliseconds since midnight). Not perfect, but good enough for my non-security uses since it is highly unlikely that I'd run the program twice at the exact same number of milliseconds since midnight.
 

Scarpozzi

Lifer
Jun 13, 2000
26,389
1,778
126
Hook up the ping pong balls to a digital scanner. Now have a computer choosing random numbers.

You are correct that algorithms are never truly random, but they can be random enough for many purposes. However, your claim that a computer can not select random numbers is disproved by your own statement. You just need some non-algorithm hardware based method.
You're right....but I was talking algorithms... I doubt non-algorithm methods would be feasible because mechanical means typically aren't timely enough. I would hate to have a computer program go into a sleep cycle waiting on a ping pong ball....what if one got jammed. I can picture the computer error now: "Random Nuclear Missile Coordinates Generator ERROR: PING PONG BALL JAMMED"

Random-enough is good enough for most everything. I'm pretty certain most people who need random numbers are just using them later in a case statement to pick the funny quote of the day. This is strictly conversation.
 

dullard

Elite Member
May 21, 2001
25,214
3,632
126
You're right....but I was talking algorithms... I doubt non-algorithm methods would be feasible because mechanical means typically aren't timely enough. I would hate to have a computer program go into a sleep cycle waiting on a ping pong ball....what if one got jammed. I can picture the computer error now: "Random Nuclear Missile Coordinates Generator ERROR: PING PONG BALL JAMMED"

Random-enough is good enough for most everything. I'm pretty certain most people who need random numbers are just using them later in a case statement to pick the funny quote of the day. This is strictly conversation.
I sure hope our administration doesn't need random missile coordinates!

You are correct that hardware based methods are failure prone and slower. But, they aren't quite as bad as you make it out to be. A simple white noise reading from a radio channel (that has no nearby active radio station) as a seed to an algorithm is fast, cheap, and about as true as most people will need. You just need another algorithm to keep testing that the radio channel does not have an active station using it nearby. Combine several simple and fast hardware-based methods to keep making it more likely to be truly random.
 

slayer202

Lifer
Nov 27, 2005
13,682
119
106
I sure hope our administration doesn't need random missile coordinates!

You are correct that hardware based methods are failure prone and slower. But, they aren't quite as bad as you make it out to be. A simple white noise reading from a radio channel (that has no nearby active radio station) as a seed to an algorithm is fast, cheap, and about as true as most people will need. You just need another algorithm to keep testing that the radio channel does not have an active station using it nearby. Combine several simple and fast hardware-based methods to keep making it more likely to be truly random.

you're hired
 

SaltyNuts

Platinum Member
May 1, 2001
2,399
275
126
Thanks guys. So it sounds like computers can generate what appear to be random numbers, but they aren't truly random in the non-deterministic sense? I.E., if you could know with precision all the inputs/factors that went into generating the numbers, you could calculate the number? Thanks!
 

SaltyNuts

Platinum Member
May 1, 2001
2,399
275
126
Thank you for your troll contribution to this thread, slayer202. If you would like to make an actual substantive comment regarding the nature of this thread, it would be greatly appreciated.
 

SaltyNuts

Platinum Member
May 1, 2001
2,399
275
126
Thank you for your troll contribution to this thread, nakedfrog. If you would like to make an actual substantive comment regarding the nature of this thread, it would be greatly appreciated.
 

Arcadio

Diamond Member
Jun 5, 2007
5,637
24
81
The latest Intel Processors generate random numbers based on temperature noise inside the actual processor. That's as random as it gets for all intents and purposes.
 

Scarpozzi

Lifer
Jun 13, 2000
26,389
1,778
126
Thanks guys. So it sounds like computers can generate what appear to be random numbers, but they aren't truly random in the non-deterministic sense? I.E., if you could know with precision all the inputs/factors that went into generating the numbers, you could calculate the number? Thanks!
Yeah....if you know exact what the inputs were, you could reverse engineer it. I've seen a lot of random number generators that simply take a moving number such as the system clock's date/time convert/encode it to a 10 digit string number format and then use a substring function to select a particular digit (like a millisecond or fast changing digit), feed that to a case statement that then selects another particular digit in the string. Simply re-run that process for as many digits as you need and stitch them together. The point is that the clock tick is what drives the calculation and it's not random....it's sequential. The only thing that makes it random is that you can filter it through a series of case statements to pick different outcomes and if you choose an input value that changes fast enough, the likelyhood of getting the same result frequently would be very limited in likelihood.

I've seen other processes that convert between number bases to simplify calculations before building out the end results.

It's actually fun building those kinds of systems, but can be challenging when you are trying to do it efficiently using those methods...it's easier just going with canned random number generator functions and trusting that they're probably good enough.
 

nakedfrog

No Lifer
Apr 3, 2001
58,570
12,874
136
Thank you for your troll contribution to this thread, nakedfrog. If you would like to make an actual substantive comment regarding the nature of this thread, it would be greatly appreciated.
Nope, I have no interest in doing so, I'd rather just take a steaming shit on the floor kthxbai
 
Reactions: slayer202

agent00f

Lifer
Jun 9, 2016
12,203
1,242
86
I dont think so. I asked the same question to someone much much smarter than me, and he said the only true random sequence of numbers can be derived from radioactive decay.

This is largely predicated on how "random" is defined, since it can encapsulate some range of process types. The wavefunction collapse though does fit how most understand the ultimate expression of that term, far as anyone can demonstrate.
 

Mayne

Diamond Member
Apr 13, 2014
8,836
1,373
126
Saltynuts I posted your thread on another forum. It's almost 7 pages long now. It's actually a pretty cool thread.
 

Red Squirrel

No Lifer
May 24, 2003
67,935
12,384
126
www.anyf.ca
This thread made me want to build a hardware RNG just for fun now. I'm thinking a microcontroller with an antenna hooked up to an analog input and impliment a crude RNG in software using the data from the analog input, then stream it on a UART. You plug the whole thing into USB with a long wire antenna. To use it you just have the program connect to the COM port and read the data.

Physical stuff does not necessarily need to be super fast either as you can just store the random data. So you could in theory use something like a bingo ball machine where the balls have QR codes and it just scans them at random while they're being grabbed by the system then recycled back in the tumbler. Put multiple codes on each ball so the orientation of a given ball even can provide various results.
 

John Connor

Lifer
Nov 30, 2012
22,840
617
121
This thread made me want to build a hardware RNG just for fun now. I'm thinking a microcontroller with an antenna hooked up to an analog input and impliment a crude RNG in software using the data from the analog input, then stream it on a UART. You plug the whole thing into USB with a long wire antenna. To use it you just have the program connect to the COM port and read the data.

Physical stuff does not necessarily need to be super fast either as you can just store the random data. So you could in theory use something like a bingo ball machine where the balls have QR codes and it just scans them at random while they're being grabbed by the system then recycled back in the tumbler. Put multiple codes on each ball so the orientation of a given ball even can provide various results.


Lotto balls are indeed pretty damn random. But what if you could make it even more random? Like the balls were electronic where depending on the surface it touches as it stops going down the tube will generate a unique number. I'm thinking in terms of the surface of the ball being electrosensitive at the 15 nano meter level or so.
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |