how do random numbers on computers work?

1.47K views

For example, is there a formula for a random number?

In: 47

75 Answers

Anonymous 0 Comments

You can definitely create true random numbers. [Wiki link](https://en.wikipedia.org/wiki/Hardware_random_number_generator). It requires special hardware that measure quantum states or the thermal states related to quantum objects.

It’s time consuming and only used for cryptography . But it does exist and it’s truly random. It *has* to be.

As for your average computer program, as everyone else has said, it’s pseudo-randomness. Imagine shuffling a deck of cards until it is random. But one person in the room looks at the order, doesn’t tell anyone and leaves. Is the deck random? It is for everyone in the room. But technically, someone somewhere knows the order so it can’t be true random. That’s how psudo-random works. It’s effectively random, but you could determine the results by calling up that one person.

Anonymous 0 Comments

Yes there are formulas for (pseudo)random numbers. Simplest example is https://en.m.wikipedia.org/wiki/Logistic_map

Anonymous 0 Comments

You can definitely create true random numbers. [Wiki link](https://en.wikipedia.org/wiki/Hardware_random_number_generator). It requires special hardware that measure quantum states or the thermal states related to quantum objects.

It’s time consuming and only used for cryptography . But it does exist and it’s truly random. It *has* to be.

As for your average computer program, as everyone else has said, it’s pseudo-randomness. Imagine shuffling a deck of cards until it is random. But one person in the room looks at the order, doesn’t tell anyone and leaves. Is the deck random? It is for everyone in the room. But technically, someone somewhere knows the order so it can’t be true random. That’s how psudo-random works. It’s effectively random, but you could determine the results by calling up that one person.

Anonymous 0 Comments

Yes there are formulas for (pseudo)random numbers. Simplest example is https://en.m.wikipedia.org/wiki/Logistic_map

Anonymous 0 Comments

Computers are incapable of true random, but they can fake it really well for casual purposes.

For example, you can make a “random seeming” number 0-9 number by getting the current date in milliseconds, which looks like this “1578567991011”, and grabbing the last number “1”

It’s not actually random, but it changes so fast that for human purposes (like running forecasts in excel) it replicates random well enough.

However if you need the computer to generate 1000s of random numbers at a time, patterns will emerge.

You can make it more “random” by performing further calculations. For example, you can multiply the date by the current speed of the processor, then reduce that to a single number.

The more complicated and the more data sources, the less likely that patterns emerge, preserving the randomness

Anonymous 0 Comments

You can definitely create true random numbers. [Wiki link](https://en.wikipedia.org/wiki/Hardware_random_number_generator). It requires special hardware that measure quantum states or the thermal states related to quantum objects.

It’s time consuming and only used for cryptography . But it does exist and it’s truly random. It *has* to be.

As for your average computer program, as everyone else has said, it’s pseudo-randomness. Imagine shuffling a deck of cards until it is random. But one person in the room looks at the order, doesn’t tell anyone and leaves. Is the deck random? It is for everyone in the room. But technically, someone somewhere knows the order so it can’t be true random. That’s how psudo-random works. It’s effectively random, but you could determine the results by calling up that one person.

Anonymous 0 Comments

Computers are incapable of true random, but they can fake it really well for casual purposes.

For example, you can make a “random seeming” number 0-9 number by getting the current date in milliseconds, which looks like this “1578567991011”, and grabbing the last number “1”

It’s not actually random, but it changes so fast that for human purposes (like running forecasts in excel) it replicates random well enough.

However if you need the computer to generate 1000s of random numbers at a time, patterns will emerge.

You can make it more “random” by performing further calculations. For example, you can multiply the date by the current speed of the processor, then reduce that to a single number.

The more complicated and the more data sources, the less likely that patterns emerge, preserving the randomness

Anonymous 0 Comments

Computers are incapable of true random, but they can fake it really well for casual purposes.

For example, you can make a “random seeming” number 0-9 number by getting the current date in milliseconds, which looks like this “1578567991011”, and grabbing the last number “1”

It’s not actually random, but it changes so fast that for human purposes (like running forecasts in excel) it replicates random well enough.

However if you need the computer to generate 1000s of random numbers at a time, patterns will emerge.

You can make it more “random” by performing further calculations. For example, you can multiply the date by the current speed of the processor, then reduce that to a single number.

The more complicated and the more data sources, the less likely that patterns emerge, preserving the randomness

Anonymous 0 Comments

[deleted]

Anonymous 0 Comments

[deleted]