4
$\begingroup$

Since computers work off formulas, without greater knowledge one would assume that it would come up with the same answer for a set formula. However, you're able to tell it to generate a random number. IE: php rand(). What's the formula that's used to get a random number? How can there be anything "random" in an algebraic expression?

Been wondering for a while, hopefully it's not blatantly obvious.

  • 0
    If you have a formula for randomness, how is it random? Who decides what is random? BTW - I know the answers to these questions.2013-09-13

4 Answers 4

7

There is a discussion in Wikipedia and many books on the subject. The numbers are deterministic but scattered. You hope that in the ways you use them, they "act like" they are truly random.

  • 3
    A more useful and direct link maybe the [article on PRNGs](http://en.wikipedia.org/wiki/Pseudorandom_number_generator).2011-01-19
0

There are also hardware circuits that can produce random numbers.

0

Random doesn't exist if two things are done the same way in the same circumstances only the same results can be observed

0

On some computer programs, you are able to select a range. then the computer selects a number between 1 and 9. the computer then adds that number to the start of your range. ( for the first number)Then it repeats that again only it adds 7 to the number(because 7 doesen't have any factors. (second number) it keeps doing this as it will keep cycling around your range.(well, as many times as you ask for a number)

  • 0
    @Glorfindel: But he is correct. This does happen. It isn't random, but may appear random to the user, which is good enough for most applications.2017-01-26