r/AskProgramming • • Nov 02 '20

Does randomness really exist in computers, where everything has to be an output of a logical calculation at the core of a computer's hardware? Is it really a random result that a random number picker out of a set of numbers gives you?

Thank you

53 Upvotes

65 comments sorted by

View all comments

6

u/[deleted] Nov 03 '20 edited Nov 03 '20

Does randomness really exist in computers, where everything has to be an output of a logical calculation at the core of a computer's hardware?

Yes.

There's nothing in theory, as far as I know, that prevents somebody from attaching an interferometer up to a computer, so I assume somebody has done it. If you want a more specific answer, you'd have to be more specific about which computers. However, the simplest parsing of "does randomness exist in computers" is, "among all computers, is there one which contains randomness," the answer would have to be most probably yes.

Is it really a random result that a random number picker out of a set of numbers gives you?

I mean, for all you know maybe I plugged an interferometer into my computer and, generated some random bits, and used them to seed my RNG. You don't know, and I'm not telling!

2

u/AGI_69 Nov 03 '20

By computer, we usually mean Universal Turing machine, which is completely deterministic and therefore can never produce true randomness.

4

u/YMK1234 Nov 03 '20

No we don't. Just because your understanding of computer is limited by software don't drag others down to that level. A computer is quite clearly a physical object that exists in the "real" world.

1

u/AGI_69 Nov 03 '20

Universal Turing machine is what computer really is, it shares the same powers and constraints and what matters to question of randomness. In Computer Science, we are not talking about your Toshiba Handibook, we are talking about "the computer" as the principal functionality, that is shared across all computers of all kinds (calculators, washing machines etc etc). Finally, sure, you can attach device and count the hair on programmers ass and call it true randomness, but calling the hair counter + computer, just a computer is just odd.

3

u/YMK1234 Nov 03 '20

No it absolutely isn't. A computer is much more than just a universal turing machine. As in, you are literally ignoring all the parts that make the thing interesting. Or make it work the way it actually does. A UTM is a useful abstraction for some scenarios in the theoretical field, but that's about it.

Also this is not /r/askcomputerscience, and op specifically said "computer" and not "universal turing machine".

1

u/AGI_69 Nov 03 '20

What parts make it interesting ? The mouse ? The printer ? If you are talking about RAM or GPU, those things do not extend computers beyond Turing machine. They are there only for speed up and therefore, they are irrelevant for discussion of whether computer can generate random numbers or not. It cant, because Turing machine cannot. I have never seen definition of "computer" as something that is capable of measuring quantum randomness.

3

u/YMK1234 Nov 03 '20

Any interaction with the real world, really.

I have never seen definition of "computer" as something that is capable of measuring quantum randomness.

I've never seen a definition that excludes it, and any modern one can do it.