Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Can we produce random numbers(nos. which cannot be predicted)?

0
10 Posted

Can we produce random numbers(nos. which cannot be predicted)?

0
10

You are right, a computer cannot produce a truly random number, because if you run the function again with the same starting conditions you will always get the same number out. Computers create pseudo-random numbers, which have an apparently random distribution but actually are predictable. One way to get around this is to use a time-dependant variable as the seed for the random number generator function. You could use the computer’s millisecond counter for instance. If the program is started by a human, then the output will effectively be random since humans are pretty random. The only way to get true randomness is to tap into a truly random process. A convenient one is noise in electronic circuits, such as the noise created by current flowing across a semiconductor junction. It comes from events occurring at the quantum level, which are genuinely random.

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123