Can we generate random numbers using irrational numbers like π and e?












6












$begingroup$


Irrational numbers like $pi$, $e$ and $sqrt{2}$ have a unique and non-repeating sequence after the decimal point. If we extract the $n$-th digit from such numbers (where $n$ is the number of times the method is called) and make a number with the digits as it is, should we not get a perfect random number generator? For example, if we're using $sqrt{2}$, $e$ and $pi$, the first number is 123, second one is 471, the next one is 184 and so on.










share|cite|improve this question









New contributor




Abhradeep Sarkar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$












  • $begingroup$
    Related: mathoverflow.net/questions/26942/…
    $endgroup$
    – BurnsBA
    10 hours ago






  • 9




    $begingroup$
    You have a strange definition of "random" in your head. "Random" means "unpredictable". How is your sequence unpredictable? What definition of "random" do you have in mind? Perhaps what you are calling "random" has another name.
    $endgroup$
    – Eric Lippert
    9 hours ago












  • $begingroup$
    Essentially the same question was asked here: cs.stackexchange.com/q/65078/755. (Community votes requested -- should these be merged? Should one be closed as a dup of the other?)
    $endgroup$
    – D.W.
    9 hours ago












  • $begingroup$
    Note the spigot algorithm can be used to generate any hex digit in pi, without having to generate prior digits.
    $endgroup$
    – rcgldr
    3 hours ago
















6












$begingroup$


Irrational numbers like $pi$, $e$ and $sqrt{2}$ have a unique and non-repeating sequence after the decimal point. If we extract the $n$-th digit from such numbers (where $n$ is the number of times the method is called) and make a number with the digits as it is, should we not get a perfect random number generator? For example, if we're using $sqrt{2}$, $e$ and $pi$, the first number is 123, second one is 471, the next one is 184 and so on.










share|cite|improve this question









New contributor




Abhradeep Sarkar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$












  • $begingroup$
    Related: mathoverflow.net/questions/26942/…
    $endgroup$
    – BurnsBA
    10 hours ago






  • 9




    $begingroup$
    You have a strange definition of "random" in your head. "Random" means "unpredictable". How is your sequence unpredictable? What definition of "random" do you have in mind? Perhaps what you are calling "random" has another name.
    $endgroup$
    – Eric Lippert
    9 hours ago












  • $begingroup$
    Essentially the same question was asked here: cs.stackexchange.com/q/65078/755. (Community votes requested -- should these be merged? Should one be closed as a dup of the other?)
    $endgroup$
    – D.W.
    9 hours ago












  • $begingroup$
    Note the spigot algorithm can be used to generate any hex digit in pi, without having to generate prior digits.
    $endgroup$
    – rcgldr
    3 hours ago














6












6








6





$begingroup$


Irrational numbers like $pi$, $e$ and $sqrt{2}$ have a unique and non-repeating sequence after the decimal point. If we extract the $n$-th digit from such numbers (where $n$ is the number of times the method is called) and make a number with the digits as it is, should we not get a perfect random number generator? For example, if we're using $sqrt{2}$, $e$ and $pi$, the first number is 123, second one is 471, the next one is 184 and so on.










share|cite|improve this question









New contributor




Abhradeep Sarkar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$




Irrational numbers like $pi$, $e$ and $sqrt{2}$ have a unique and non-repeating sequence after the decimal point. If we extract the $n$-th digit from such numbers (where $n$ is the number of times the method is called) and make a number with the digits as it is, should we not get a perfect random number generator? For example, if we're using $sqrt{2}$, $e$ and $pi$, the first number is 123, second one is 471, the next one is 184 and so on.







randomized-algorithms randomness random-number-generator






share|cite|improve this question









New contributor




Abhradeep Sarkar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|cite|improve this question









New contributor




Abhradeep Sarkar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|cite|improve this question




share|cite|improve this question








edited 14 hours ago









dkaeae

2,3421922




2,3421922






New contributor




Abhradeep Sarkar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 14 hours ago









Abhradeep SarkarAbhradeep Sarkar

312




312




New contributor




Abhradeep Sarkar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Abhradeep Sarkar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Abhradeep Sarkar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












  • $begingroup$
    Related: mathoverflow.net/questions/26942/…
    $endgroup$
    – BurnsBA
    10 hours ago






  • 9




    $begingroup$
    You have a strange definition of "random" in your head. "Random" means "unpredictable". How is your sequence unpredictable? What definition of "random" do you have in mind? Perhaps what you are calling "random" has another name.
    $endgroup$
    – Eric Lippert
    9 hours ago












  • $begingroup$
    Essentially the same question was asked here: cs.stackexchange.com/q/65078/755. (Community votes requested -- should these be merged? Should one be closed as a dup of the other?)
    $endgroup$
    – D.W.
    9 hours ago












  • $begingroup$
    Note the spigot algorithm can be used to generate any hex digit in pi, without having to generate prior digits.
    $endgroup$
    – rcgldr
    3 hours ago


















  • $begingroup$
    Related: mathoverflow.net/questions/26942/…
    $endgroup$
    – BurnsBA
    10 hours ago






  • 9




    $begingroup$
    You have a strange definition of "random" in your head. "Random" means "unpredictable". How is your sequence unpredictable? What definition of "random" do you have in mind? Perhaps what you are calling "random" has another name.
    $endgroup$
    – Eric Lippert
    9 hours ago












  • $begingroup$
    Essentially the same question was asked here: cs.stackexchange.com/q/65078/755. (Community votes requested -- should these be merged? Should one be closed as a dup of the other?)
    $endgroup$
    – D.W.
    9 hours ago












  • $begingroup$
    Note the spigot algorithm can be used to generate any hex digit in pi, without having to generate prior digits.
    $endgroup$
    – rcgldr
    3 hours ago
















$begingroup$
Related: mathoverflow.net/questions/26942/…
$endgroup$
– BurnsBA
10 hours ago




$begingroup$
Related: mathoverflow.net/questions/26942/…
$endgroup$
– BurnsBA
10 hours ago




9




9




$begingroup$
You have a strange definition of "random" in your head. "Random" means "unpredictable". How is your sequence unpredictable? What definition of "random" do you have in mind? Perhaps what you are calling "random" has another name.
$endgroup$
– Eric Lippert
9 hours ago






$begingroup$
You have a strange definition of "random" in your head. "Random" means "unpredictable". How is your sequence unpredictable? What definition of "random" do you have in mind? Perhaps what you are calling "random" has another name.
$endgroup$
– Eric Lippert
9 hours ago














$begingroup$
Essentially the same question was asked here: cs.stackexchange.com/q/65078/755. (Community votes requested -- should these be merged? Should one be closed as a dup of the other?)
$endgroup$
– D.W.
9 hours ago






$begingroup$
Essentially the same question was asked here: cs.stackexchange.com/q/65078/755. (Community votes requested -- should these be merged? Should one be closed as a dup of the other?)
$endgroup$
– D.W.
9 hours ago














$begingroup$
Note the spigot algorithm can be used to generate any hex digit in pi, without having to generate prior digits.
$endgroup$
– rcgldr
3 hours ago




$begingroup$
Note the spigot algorithm can be used to generate any hex digit in pi, without having to generate prior digits.
$endgroup$
– rcgldr
3 hours ago










4 Answers
4






active

oldest

votes


















18












$begingroup$

It is cryptographically useless because an adversary can predict every single digit. It is also very time consuming.






share|cite|improve this answer









$endgroup$









  • 7




    $begingroup$
    OP never mentions cryptography...
    $endgroup$
    – AnoE
    11 hours ago






  • 3




    $begingroup$
    @AnoE So? That this process would be cryptographically useless is still relevant because crypto is an avid user of randomness. If you bring up the devices /dev/random and /dev/urandom someone will invariably bring up cryptography.
    $endgroup$
    – Greg Schmit
    11 hours ago






  • 2




    $begingroup$
    You would be amazed at how useless cryptographic security is in real time PRNG generation. irrational numbers are often used in GPU PRNGs. There are a lot of applications where how "secure" your PRNG is simply irrelevant. What matters in something like coherent noise generation is the quality of distribution and how often your period repeats, and correlation effects due to adjacent seeds (which would require avalanche mixers to fix). Quite honestly your answer is wrong, doesn't belong here, and should probably be deleted.
    $endgroup$
    – opa
    10 hours ago








  • 3




    $begingroup$
    This is anot an answer to the question. Note the OP of the linked question uses random numbers for seeding a monte carlo analysis. An update to address the question asked should be considered. mathoverflow.net/questions/26942/…
    $endgroup$
    – CramerTV
    10 hours ago












  • $begingroup$
    Mersenne Twister isn't cryptographically secure either, but it's one of the most common PRNGs out there, so I wouldn't say that's grounds to call it useless. I do agree that it would be unreasonably time consuming, though.
    $endgroup$
    – DarthFennec
    8 hours ago



















16












$begingroup$

For any reasonable definition of perfect, the mechanism you describe is not a perfect random number generator.




  • Non-repeating isn't enough. The decimal number $0.10100100010001dots$ is non-repeating but it's a terrible generator of random digits, since the answer is "always" zero, occasionally one, and never anything else.


  • We don't actually know if every digit occurs equally often in the decimal expansion of $pi$ or $mathrm{e}$ (though we suspect they do).


  • In many situations, we require random numbers to be unpredictable (indeed, if you asked a random person what "random" means, they'd probably say something about unpredictability). The digits of well-known constants are totally predictable.


  • We usually want to generate random numbers reasonably quickly, but generating successive digits of mathematical constants tends to be quite expensive.


  • It is, however, true that the digits of $pi$ and $mathrm{e}$ look statistically random, in the sense that every possible sequence of digits seems to occur about as often as it should. So, for example, each digit does occur very close to one time in ten; each two-digit sequence very close to one in a hundred, and so on.







share|cite|improve this answer









$endgroup$









  • 2




    $begingroup$
    For the third point, there must be some sort of 'secret' input to your generation process for it to be unpredictable (the generation process itself should be deterministic if we don't want to rely on yet another random number generator.). This extra input is often called a seed.
    $endgroup$
    – Discrete lizard
    13 hours ago






  • 1




    $begingroup$
    @Discretelizard This is true but there's not much scope for seeding beyond "return successive digits starting with position $s$." By the time you've seen $2log s$ digits, that sequence occurs only a few times within the first $s^2$ digits of $pi$, so it's unique within the first $s$ digits with high probability and you know the seed.
    $endgroup$
    – David Richerby
    11 hours ago












  • $begingroup$
    I was not suggesting to try seeding with this approach. However, now that you mention it, would it help to not look at successive digits, but at the $scdot n$'th digit? I guess that would probably be too expensive to compute, but I don't directly see any other problems.
    $endgroup$
    – Discrete lizard
    11 hours ago










  • $begingroup$
    Computing digits of irrational numbers is expensive, but hasn't that work already been done? We can just download or access a copy of all the digits. A class time-space tradeoff.
    $endgroup$
    – Barmar
    5 hours ago










  • $begingroup$
    @Barmar: At that point you have to ask whether this technique is really more performant (and more space-efficient) than a "standard" PRNG would be.
    $endgroup$
    – Kevin
    2 hours ago





















3












$begingroup$

Duplicate, but nice question. It was already answered https://math.stackexchange.com/questions/51829/distribution-of-the-digits-of-pi:




...it is believed that $pi$ is a normal number (~uniform distribution of every digits sequence).




For digit distribution data, see e.g. http://www.eveandersson.com/pi/precalculated-frequencies or https://thestarman.pcministry.com/math/pi/RandPI.html (first 1000 digits):



enter image description here



At mathoverflow, there are also nice answers at:




  • What is the state of our ignorance about the normality of pi?

  • Does pi contain 1000 consecutive zeroes?






share|cite|improve this answer











$endgroup$









  • 1




    $begingroup$
    If you believe the question is a duplicate, then why are you answering it? You should simply flag it, not reinforce undesired posting behavior.
    $endgroup$
    – dkaeae
    11 hours ago






  • 3




    $begingroup$
    @dkaeae There is no support for duplicates of questions on other sites. Furthermore, the same question on different sites can get different answers. In this case, a site such as Mathematics might not give much consideration to security concerns. See also this answer. Do note that we discourage asking the same question on multiple sites at the same time, since this tends to lead to wasted efforts. But the same question by different persons at different times on different sites is usually ok.
    $endgroup$
    – Discrete lizard
    10 hours ago






  • 3




    $begingroup$
    Unfortunately, just because a number is normal doesn't mean that outputting its digits gives you a good RNG. The outputs of such a RNG are still entirely predictable. Whether that's acceptable might depend on the application. So, I don't think it's quite as simple as saying "pi is normal, case closed".
    $endgroup$
    – D.W.
    9 hours ago





















0












$begingroup$

In general, this approach does not work: "randomness" does not mean that you get a lot of different digits, but there are other aspects as well. For example, a classic test is to see if all two-digit, or three-digit etc. combinations occur with the same frequency. This would be a very simple test, which can rule out obvious non-random results, but is still by far too simplistic to check for really random behaviour.



See the Wikipedia page about Randomness Tests as a collection of links to primary sources regarding this. They do mention a good amount of quite complicated-sounding concepts; it is it not so important to go into deep detail about this - but it is clear that it is not intuitively possible to declare a specific number to be a good source for such digits.



On a positive note: For a specific irrational number, you are of course free to just try it; i.e., calculate the number to a sufficiantly large degree of digits, and run it through all known tests (there are tools for that, see above link). If the measure is good enough for your use case, and if you are aware that this is obviously useless for cryptographical applications, and always get the same numbers if you should start over, and that the quality might degrade if you get past the n you picked for testing the randomness, you could use those numbers. But it will be far better to use a dedicated (pseudo-)random number generator; and nothing beats a good physical source of randomness.






share|cite|improve this answer









$endgroup$









  • 1




    $begingroup$
    OK but $pi$ and $mathrm{e}$ have the property that all the 2, 3, 4, ... digit sequences do empirically turn up with the right frequency. Nobody's managed to prove it but it seem to be true.
    $endgroup$
    – David Richerby
    11 hours ago










  • $begingroup$
    Ayrat's answer links to other sites where mathematicians have done these tests. They believe, but haven't proved, that π meets the statistical tests.
    $endgroup$
    – Barmar
    5 hours ago












Your Answer





StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "419"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});






Abhradeep Sarkar is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcs.stackexchange.com%2fquestions%2f106774%2fcan-we-generate-random-numbers-using-irrational-numbers-like-%25cf%2580-and-e%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























4 Answers
4






active

oldest

votes








4 Answers
4






active

oldest

votes









active

oldest

votes






active

oldest

votes









18












$begingroup$

It is cryptographically useless because an adversary can predict every single digit. It is also very time consuming.






share|cite|improve this answer









$endgroup$









  • 7




    $begingroup$
    OP never mentions cryptography...
    $endgroup$
    – AnoE
    11 hours ago






  • 3




    $begingroup$
    @AnoE So? That this process would be cryptographically useless is still relevant because crypto is an avid user of randomness. If you bring up the devices /dev/random and /dev/urandom someone will invariably bring up cryptography.
    $endgroup$
    – Greg Schmit
    11 hours ago






  • 2




    $begingroup$
    You would be amazed at how useless cryptographic security is in real time PRNG generation. irrational numbers are often used in GPU PRNGs. There are a lot of applications where how "secure" your PRNG is simply irrelevant. What matters in something like coherent noise generation is the quality of distribution and how often your period repeats, and correlation effects due to adjacent seeds (which would require avalanche mixers to fix). Quite honestly your answer is wrong, doesn't belong here, and should probably be deleted.
    $endgroup$
    – opa
    10 hours ago








  • 3




    $begingroup$
    This is anot an answer to the question. Note the OP of the linked question uses random numbers for seeding a monte carlo analysis. An update to address the question asked should be considered. mathoverflow.net/questions/26942/…
    $endgroup$
    – CramerTV
    10 hours ago












  • $begingroup$
    Mersenne Twister isn't cryptographically secure either, but it's one of the most common PRNGs out there, so I wouldn't say that's grounds to call it useless. I do agree that it would be unreasonably time consuming, though.
    $endgroup$
    – DarthFennec
    8 hours ago
















18












$begingroup$

It is cryptographically useless because an adversary can predict every single digit. It is also very time consuming.






share|cite|improve this answer









$endgroup$









  • 7




    $begingroup$
    OP never mentions cryptography...
    $endgroup$
    – AnoE
    11 hours ago






  • 3




    $begingroup$
    @AnoE So? That this process would be cryptographically useless is still relevant because crypto is an avid user of randomness. If you bring up the devices /dev/random and /dev/urandom someone will invariably bring up cryptography.
    $endgroup$
    – Greg Schmit
    11 hours ago






  • 2




    $begingroup$
    You would be amazed at how useless cryptographic security is in real time PRNG generation. irrational numbers are often used in GPU PRNGs. There are a lot of applications where how "secure" your PRNG is simply irrelevant. What matters in something like coherent noise generation is the quality of distribution and how often your period repeats, and correlation effects due to adjacent seeds (which would require avalanche mixers to fix). Quite honestly your answer is wrong, doesn't belong here, and should probably be deleted.
    $endgroup$
    – opa
    10 hours ago








  • 3




    $begingroup$
    This is anot an answer to the question. Note the OP of the linked question uses random numbers for seeding a monte carlo analysis. An update to address the question asked should be considered. mathoverflow.net/questions/26942/…
    $endgroup$
    – CramerTV
    10 hours ago












  • $begingroup$
    Mersenne Twister isn't cryptographically secure either, but it's one of the most common PRNGs out there, so I wouldn't say that's grounds to call it useless. I do agree that it would be unreasonably time consuming, though.
    $endgroup$
    – DarthFennec
    8 hours ago














18












18








18





$begingroup$

It is cryptographically useless because an adversary can predict every single digit. It is also very time consuming.






share|cite|improve this answer









$endgroup$



It is cryptographically useless because an adversary can predict every single digit. It is also very time consuming.







share|cite|improve this answer












share|cite|improve this answer



share|cite|improve this answer










answered 14 hours ago









gnasher729gnasher729

11.8k1218




11.8k1218








  • 7




    $begingroup$
    OP never mentions cryptography...
    $endgroup$
    – AnoE
    11 hours ago






  • 3




    $begingroup$
    @AnoE So? That this process would be cryptographically useless is still relevant because crypto is an avid user of randomness. If you bring up the devices /dev/random and /dev/urandom someone will invariably bring up cryptography.
    $endgroup$
    – Greg Schmit
    11 hours ago






  • 2




    $begingroup$
    You would be amazed at how useless cryptographic security is in real time PRNG generation. irrational numbers are often used in GPU PRNGs. There are a lot of applications where how "secure" your PRNG is simply irrelevant. What matters in something like coherent noise generation is the quality of distribution and how often your period repeats, and correlation effects due to adjacent seeds (which would require avalanche mixers to fix). Quite honestly your answer is wrong, doesn't belong here, and should probably be deleted.
    $endgroup$
    – opa
    10 hours ago








  • 3




    $begingroup$
    This is anot an answer to the question. Note the OP of the linked question uses random numbers for seeding a monte carlo analysis. An update to address the question asked should be considered. mathoverflow.net/questions/26942/…
    $endgroup$
    – CramerTV
    10 hours ago












  • $begingroup$
    Mersenne Twister isn't cryptographically secure either, but it's one of the most common PRNGs out there, so I wouldn't say that's grounds to call it useless. I do agree that it would be unreasonably time consuming, though.
    $endgroup$
    – DarthFennec
    8 hours ago














  • 7




    $begingroup$
    OP never mentions cryptography...
    $endgroup$
    – AnoE
    11 hours ago






  • 3




    $begingroup$
    @AnoE So? That this process would be cryptographically useless is still relevant because crypto is an avid user of randomness. If you bring up the devices /dev/random and /dev/urandom someone will invariably bring up cryptography.
    $endgroup$
    – Greg Schmit
    11 hours ago






  • 2




    $begingroup$
    You would be amazed at how useless cryptographic security is in real time PRNG generation. irrational numbers are often used in GPU PRNGs. There are a lot of applications where how "secure" your PRNG is simply irrelevant. What matters in something like coherent noise generation is the quality of distribution and how often your period repeats, and correlation effects due to adjacent seeds (which would require avalanche mixers to fix). Quite honestly your answer is wrong, doesn't belong here, and should probably be deleted.
    $endgroup$
    – opa
    10 hours ago








  • 3




    $begingroup$
    This is anot an answer to the question. Note the OP of the linked question uses random numbers for seeding a monte carlo analysis. An update to address the question asked should be considered. mathoverflow.net/questions/26942/…
    $endgroup$
    – CramerTV
    10 hours ago












  • $begingroup$
    Mersenne Twister isn't cryptographically secure either, but it's one of the most common PRNGs out there, so I wouldn't say that's grounds to call it useless. I do agree that it would be unreasonably time consuming, though.
    $endgroup$
    – DarthFennec
    8 hours ago








7




7




$begingroup$
OP never mentions cryptography...
$endgroup$
– AnoE
11 hours ago




$begingroup$
OP never mentions cryptography...
$endgroup$
– AnoE
11 hours ago




3




3




$begingroup$
@AnoE So? That this process would be cryptographically useless is still relevant because crypto is an avid user of randomness. If you bring up the devices /dev/random and /dev/urandom someone will invariably bring up cryptography.
$endgroup$
– Greg Schmit
11 hours ago




$begingroup$
@AnoE So? That this process would be cryptographically useless is still relevant because crypto is an avid user of randomness. If you bring up the devices /dev/random and /dev/urandom someone will invariably bring up cryptography.
$endgroup$
– Greg Schmit
11 hours ago




2




2




$begingroup$
You would be amazed at how useless cryptographic security is in real time PRNG generation. irrational numbers are often used in GPU PRNGs. There are a lot of applications where how "secure" your PRNG is simply irrelevant. What matters in something like coherent noise generation is the quality of distribution and how often your period repeats, and correlation effects due to adjacent seeds (which would require avalanche mixers to fix). Quite honestly your answer is wrong, doesn't belong here, and should probably be deleted.
$endgroup$
– opa
10 hours ago






$begingroup$
You would be amazed at how useless cryptographic security is in real time PRNG generation. irrational numbers are often used in GPU PRNGs. There are a lot of applications where how "secure" your PRNG is simply irrelevant. What matters in something like coherent noise generation is the quality of distribution and how often your period repeats, and correlation effects due to adjacent seeds (which would require avalanche mixers to fix). Quite honestly your answer is wrong, doesn't belong here, and should probably be deleted.
$endgroup$
– opa
10 hours ago






3




3




$begingroup$
This is anot an answer to the question. Note the OP of the linked question uses random numbers for seeding a monte carlo analysis. An update to address the question asked should be considered. mathoverflow.net/questions/26942/…
$endgroup$
– CramerTV
10 hours ago






$begingroup$
This is anot an answer to the question. Note the OP of the linked question uses random numbers for seeding a monte carlo analysis. An update to address the question asked should be considered. mathoverflow.net/questions/26942/…
$endgroup$
– CramerTV
10 hours ago














$begingroup$
Mersenne Twister isn't cryptographically secure either, but it's one of the most common PRNGs out there, so I wouldn't say that's grounds to call it useless. I do agree that it would be unreasonably time consuming, though.
$endgroup$
– DarthFennec
8 hours ago




$begingroup$
Mersenne Twister isn't cryptographically secure either, but it's one of the most common PRNGs out there, so I wouldn't say that's grounds to call it useless. I do agree that it would be unreasonably time consuming, though.
$endgroup$
– DarthFennec
8 hours ago











16












$begingroup$

For any reasonable definition of perfect, the mechanism you describe is not a perfect random number generator.




  • Non-repeating isn't enough. The decimal number $0.10100100010001dots$ is non-repeating but it's a terrible generator of random digits, since the answer is "always" zero, occasionally one, and never anything else.


  • We don't actually know if every digit occurs equally often in the decimal expansion of $pi$ or $mathrm{e}$ (though we suspect they do).


  • In many situations, we require random numbers to be unpredictable (indeed, if you asked a random person what "random" means, they'd probably say something about unpredictability). The digits of well-known constants are totally predictable.


  • We usually want to generate random numbers reasonably quickly, but generating successive digits of mathematical constants tends to be quite expensive.


  • It is, however, true that the digits of $pi$ and $mathrm{e}$ look statistically random, in the sense that every possible sequence of digits seems to occur about as often as it should. So, for example, each digit does occur very close to one time in ten; each two-digit sequence very close to one in a hundred, and so on.







share|cite|improve this answer









$endgroup$









  • 2




    $begingroup$
    For the third point, there must be some sort of 'secret' input to your generation process for it to be unpredictable (the generation process itself should be deterministic if we don't want to rely on yet another random number generator.). This extra input is often called a seed.
    $endgroup$
    – Discrete lizard
    13 hours ago






  • 1




    $begingroup$
    @Discretelizard This is true but there's not much scope for seeding beyond "return successive digits starting with position $s$." By the time you've seen $2log s$ digits, that sequence occurs only a few times within the first $s^2$ digits of $pi$, so it's unique within the first $s$ digits with high probability and you know the seed.
    $endgroup$
    – David Richerby
    11 hours ago












  • $begingroup$
    I was not suggesting to try seeding with this approach. However, now that you mention it, would it help to not look at successive digits, but at the $scdot n$'th digit? I guess that would probably be too expensive to compute, but I don't directly see any other problems.
    $endgroup$
    – Discrete lizard
    11 hours ago










  • $begingroup$
    Computing digits of irrational numbers is expensive, but hasn't that work already been done? We can just download or access a copy of all the digits. A class time-space tradeoff.
    $endgroup$
    – Barmar
    5 hours ago










  • $begingroup$
    @Barmar: At that point you have to ask whether this technique is really more performant (and more space-efficient) than a "standard" PRNG would be.
    $endgroup$
    – Kevin
    2 hours ago


















16












$begingroup$

For any reasonable definition of perfect, the mechanism you describe is not a perfect random number generator.




  • Non-repeating isn't enough. The decimal number $0.10100100010001dots$ is non-repeating but it's a terrible generator of random digits, since the answer is "always" zero, occasionally one, and never anything else.


  • We don't actually know if every digit occurs equally often in the decimal expansion of $pi$ or $mathrm{e}$ (though we suspect they do).


  • In many situations, we require random numbers to be unpredictable (indeed, if you asked a random person what "random" means, they'd probably say something about unpredictability). The digits of well-known constants are totally predictable.


  • We usually want to generate random numbers reasonably quickly, but generating successive digits of mathematical constants tends to be quite expensive.


  • It is, however, true that the digits of $pi$ and $mathrm{e}$ look statistically random, in the sense that every possible sequence of digits seems to occur about as often as it should. So, for example, each digit does occur very close to one time in ten; each two-digit sequence very close to one in a hundred, and so on.







share|cite|improve this answer









$endgroup$









  • 2




    $begingroup$
    For the third point, there must be some sort of 'secret' input to your generation process for it to be unpredictable (the generation process itself should be deterministic if we don't want to rely on yet another random number generator.). This extra input is often called a seed.
    $endgroup$
    – Discrete lizard
    13 hours ago






  • 1




    $begingroup$
    @Discretelizard This is true but there's not much scope for seeding beyond "return successive digits starting with position $s$." By the time you've seen $2log s$ digits, that sequence occurs only a few times within the first $s^2$ digits of $pi$, so it's unique within the first $s$ digits with high probability and you know the seed.
    $endgroup$
    – David Richerby
    11 hours ago












  • $begingroup$
    I was not suggesting to try seeding with this approach. However, now that you mention it, would it help to not look at successive digits, but at the $scdot n$'th digit? I guess that would probably be too expensive to compute, but I don't directly see any other problems.
    $endgroup$
    – Discrete lizard
    11 hours ago










  • $begingroup$
    Computing digits of irrational numbers is expensive, but hasn't that work already been done? We can just download or access a copy of all the digits. A class time-space tradeoff.
    $endgroup$
    – Barmar
    5 hours ago










  • $begingroup$
    @Barmar: At that point you have to ask whether this technique is really more performant (and more space-efficient) than a "standard" PRNG would be.
    $endgroup$
    – Kevin
    2 hours ago
















16












16








16





$begingroup$

For any reasonable definition of perfect, the mechanism you describe is not a perfect random number generator.




  • Non-repeating isn't enough. The decimal number $0.10100100010001dots$ is non-repeating but it's a terrible generator of random digits, since the answer is "always" zero, occasionally one, and never anything else.


  • We don't actually know if every digit occurs equally often in the decimal expansion of $pi$ or $mathrm{e}$ (though we suspect they do).


  • In many situations, we require random numbers to be unpredictable (indeed, if you asked a random person what "random" means, they'd probably say something about unpredictability). The digits of well-known constants are totally predictable.


  • We usually want to generate random numbers reasonably quickly, but generating successive digits of mathematical constants tends to be quite expensive.


  • It is, however, true that the digits of $pi$ and $mathrm{e}$ look statistically random, in the sense that every possible sequence of digits seems to occur about as often as it should. So, for example, each digit does occur very close to one time in ten; each two-digit sequence very close to one in a hundred, and so on.







share|cite|improve this answer









$endgroup$



For any reasonable definition of perfect, the mechanism you describe is not a perfect random number generator.




  • Non-repeating isn't enough. The decimal number $0.10100100010001dots$ is non-repeating but it's a terrible generator of random digits, since the answer is "always" zero, occasionally one, and never anything else.


  • We don't actually know if every digit occurs equally often in the decimal expansion of $pi$ or $mathrm{e}$ (though we suspect they do).


  • In many situations, we require random numbers to be unpredictable (indeed, if you asked a random person what "random" means, they'd probably say something about unpredictability). The digits of well-known constants are totally predictable.


  • We usually want to generate random numbers reasonably quickly, but generating successive digits of mathematical constants tends to be quite expensive.


  • It is, however, true that the digits of $pi$ and $mathrm{e}$ look statistically random, in the sense that every possible sequence of digits seems to occur about as often as it should. So, for example, each digit does occur very close to one time in ten; each two-digit sequence very close to one in a hundred, and so on.








share|cite|improve this answer












share|cite|improve this answer



share|cite|improve this answer










answered 14 hours ago









David RicherbyDavid Richerby

70k15106196




70k15106196








  • 2




    $begingroup$
    For the third point, there must be some sort of 'secret' input to your generation process for it to be unpredictable (the generation process itself should be deterministic if we don't want to rely on yet another random number generator.). This extra input is often called a seed.
    $endgroup$
    – Discrete lizard
    13 hours ago






  • 1




    $begingroup$
    @Discretelizard This is true but there's not much scope for seeding beyond "return successive digits starting with position $s$." By the time you've seen $2log s$ digits, that sequence occurs only a few times within the first $s^2$ digits of $pi$, so it's unique within the first $s$ digits with high probability and you know the seed.
    $endgroup$
    – David Richerby
    11 hours ago












  • $begingroup$
    I was not suggesting to try seeding with this approach. However, now that you mention it, would it help to not look at successive digits, but at the $scdot n$'th digit? I guess that would probably be too expensive to compute, but I don't directly see any other problems.
    $endgroup$
    – Discrete lizard
    11 hours ago










  • $begingroup$
    Computing digits of irrational numbers is expensive, but hasn't that work already been done? We can just download or access a copy of all the digits. A class time-space tradeoff.
    $endgroup$
    – Barmar
    5 hours ago










  • $begingroup$
    @Barmar: At that point you have to ask whether this technique is really more performant (and more space-efficient) than a "standard" PRNG would be.
    $endgroup$
    – Kevin
    2 hours ago
















  • 2




    $begingroup$
    For the third point, there must be some sort of 'secret' input to your generation process for it to be unpredictable (the generation process itself should be deterministic if we don't want to rely on yet another random number generator.). This extra input is often called a seed.
    $endgroup$
    – Discrete lizard
    13 hours ago






  • 1




    $begingroup$
    @Discretelizard This is true but there's not much scope for seeding beyond "return successive digits starting with position $s$." By the time you've seen $2log s$ digits, that sequence occurs only a few times within the first $s^2$ digits of $pi$, so it's unique within the first $s$ digits with high probability and you know the seed.
    $endgroup$
    – David Richerby
    11 hours ago












  • $begingroup$
    I was not suggesting to try seeding with this approach. However, now that you mention it, would it help to not look at successive digits, but at the $scdot n$'th digit? I guess that would probably be too expensive to compute, but I don't directly see any other problems.
    $endgroup$
    – Discrete lizard
    11 hours ago










  • $begingroup$
    Computing digits of irrational numbers is expensive, but hasn't that work already been done? We can just download or access a copy of all the digits. A class time-space tradeoff.
    $endgroup$
    – Barmar
    5 hours ago










  • $begingroup$
    @Barmar: At that point you have to ask whether this technique is really more performant (and more space-efficient) than a "standard" PRNG would be.
    $endgroup$
    – Kevin
    2 hours ago










2




2




$begingroup$
For the third point, there must be some sort of 'secret' input to your generation process for it to be unpredictable (the generation process itself should be deterministic if we don't want to rely on yet another random number generator.). This extra input is often called a seed.
$endgroup$
– Discrete lizard
13 hours ago




$begingroup$
For the third point, there must be some sort of 'secret' input to your generation process for it to be unpredictable (the generation process itself should be deterministic if we don't want to rely on yet another random number generator.). This extra input is often called a seed.
$endgroup$
– Discrete lizard
13 hours ago




1




1




$begingroup$
@Discretelizard This is true but there's not much scope for seeding beyond "return successive digits starting with position $s$." By the time you've seen $2log s$ digits, that sequence occurs only a few times within the first $s^2$ digits of $pi$, so it's unique within the first $s$ digits with high probability and you know the seed.
$endgroup$
– David Richerby
11 hours ago






$begingroup$
@Discretelizard This is true but there's not much scope for seeding beyond "return successive digits starting with position $s$." By the time you've seen $2log s$ digits, that sequence occurs only a few times within the first $s^2$ digits of $pi$, so it's unique within the first $s$ digits with high probability and you know the seed.
$endgroup$
– David Richerby
11 hours ago














$begingroup$
I was not suggesting to try seeding with this approach. However, now that you mention it, would it help to not look at successive digits, but at the $scdot n$'th digit? I guess that would probably be too expensive to compute, but I don't directly see any other problems.
$endgroup$
– Discrete lizard
11 hours ago




$begingroup$
I was not suggesting to try seeding with this approach. However, now that you mention it, would it help to not look at successive digits, but at the $scdot n$'th digit? I guess that would probably be too expensive to compute, but I don't directly see any other problems.
$endgroup$
– Discrete lizard
11 hours ago












$begingroup$
Computing digits of irrational numbers is expensive, but hasn't that work already been done? We can just download or access a copy of all the digits. A class time-space tradeoff.
$endgroup$
– Barmar
5 hours ago




$begingroup$
Computing digits of irrational numbers is expensive, but hasn't that work already been done? We can just download or access a copy of all the digits. A class time-space tradeoff.
$endgroup$
– Barmar
5 hours ago












$begingroup$
@Barmar: At that point you have to ask whether this technique is really more performant (and more space-efficient) than a "standard" PRNG would be.
$endgroup$
– Kevin
2 hours ago






$begingroup$
@Barmar: At that point you have to ask whether this technique is really more performant (and more space-efficient) than a "standard" PRNG would be.
$endgroup$
– Kevin
2 hours ago













3












$begingroup$

Duplicate, but nice question. It was already answered https://math.stackexchange.com/questions/51829/distribution-of-the-digits-of-pi:




...it is believed that $pi$ is a normal number (~uniform distribution of every digits sequence).




For digit distribution data, see e.g. http://www.eveandersson.com/pi/precalculated-frequencies or https://thestarman.pcministry.com/math/pi/RandPI.html (first 1000 digits):



enter image description here



At mathoverflow, there are also nice answers at:




  • What is the state of our ignorance about the normality of pi?

  • Does pi contain 1000 consecutive zeroes?






share|cite|improve this answer











$endgroup$









  • 1




    $begingroup$
    If you believe the question is a duplicate, then why are you answering it? You should simply flag it, not reinforce undesired posting behavior.
    $endgroup$
    – dkaeae
    11 hours ago






  • 3




    $begingroup$
    @dkaeae There is no support for duplicates of questions on other sites. Furthermore, the same question on different sites can get different answers. In this case, a site such as Mathematics might not give much consideration to security concerns. See also this answer. Do note that we discourage asking the same question on multiple sites at the same time, since this tends to lead to wasted efforts. But the same question by different persons at different times on different sites is usually ok.
    $endgroup$
    – Discrete lizard
    10 hours ago






  • 3




    $begingroup$
    Unfortunately, just because a number is normal doesn't mean that outputting its digits gives you a good RNG. The outputs of such a RNG are still entirely predictable. Whether that's acceptable might depend on the application. So, I don't think it's quite as simple as saying "pi is normal, case closed".
    $endgroup$
    – D.W.
    9 hours ago


















3












$begingroup$

Duplicate, but nice question. It was already answered https://math.stackexchange.com/questions/51829/distribution-of-the-digits-of-pi:




...it is believed that $pi$ is a normal number (~uniform distribution of every digits sequence).




For digit distribution data, see e.g. http://www.eveandersson.com/pi/precalculated-frequencies or https://thestarman.pcministry.com/math/pi/RandPI.html (first 1000 digits):



enter image description here



At mathoverflow, there are also nice answers at:




  • What is the state of our ignorance about the normality of pi?

  • Does pi contain 1000 consecutive zeroes?






share|cite|improve this answer











$endgroup$









  • 1




    $begingroup$
    If you believe the question is a duplicate, then why are you answering it? You should simply flag it, not reinforce undesired posting behavior.
    $endgroup$
    – dkaeae
    11 hours ago






  • 3




    $begingroup$
    @dkaeae There is no support for duplicates of questions on other sites. Furthermore, the same question on different sites can get different answers. In this case, a site such as Mathematics might not give much consideration to security concerns. See also this answer. Do note that we discourage asking the same question on multiple sites at the same time, since this tends to lead to wasted efforts. But the same question by different persons at different times on different sites is usually ok.
    $endgroup$
    – Discrete lizard
    10 hours ago






  • 3




    $begingroup$
    Unfortunately, just because a number is normal doesn't mean that outputting its digits gives you a good RNG. The outputs of such a RNG are still entirely predictable. Whether that's acceptable might depend on the application. So, I don't think it's quite as simple as saying "pi is normal, case closed".
    $endgroup$
    – D.W.
    9 hours ago
















3












3








3





$begingroup$

Duplicate, but nice question. It was already answered https://math.stackexchange.com/questions/51829/distribution-of-the-digits-of-pi:




...it is believed that $pi$ is a normal number (~uniform distribution of every digits sequence).




For digit distribution data, see e.g. http://www.eveandersson.com/pi/precalculated-frequencies or https://thestarman.pcministry.com/math/pi/RandPI.html (first 1000 digits):



enter image description here



At mathoverflow, there are also nice answers at:




  • What is the state of our ignorance about the normality of pi?

  • Does pi contain 1000 consecutive zeroes?






share|cite|improve this answer











$endgroup$



Duplicate, but nice question. It was already answered https://math.stackexchange.com/questions/51829/distribution-of-the-digits-of-pi:




...it is believed that $pi$ is a normal number (~uniform distribution of every digits sequence).




For digit distribution data, see e.g. http://www.eveandersson.com/pi/precalculated-frequencies or https://thestarman.pcministry.com/math/pi/RandPI.html (first 1000 digits):



enter image description here



At mathoverflow, there are also nice answers at:




  • What is the state of our ignorance about the normality of pi?

  • Does pi contain 1000 consecutive zeroes?







share|cite|improve this answer














share|cite|improve this answer



share|cite|improve this answer








edited 13 hours ago









Discrete lizard

4,45011538




4,45011538










answered 14 hours ago









AyratAyrat

4781419




4781419








  • 1




    $begingroup$
    If you believe the question is a duplicate, then why are you answering it? You should simply flag it, not reinforce undesired posting behavior.
    $endgroup$
    – dkaeae
    11 hours ago






  • 3




    $begingroup$
    @dkaeae There is no support for duplicates of questions on other sites. Furthermore, the same question on different sites can get different answers. In this case, a site such as Mathematics might not give much consideration to security concerns. See also this answer. Do note that we discourage asking the same question on multiple sites at the same time, since this tends to lead to wasted efforts. But the same question by different persons at different times on different sites is usually ok.
    $endgroup$
    – Discrete lizard
    10 hours ago






  • 3




    $begingroup$
    Unfortunately, just because a number is normal doesn't mean that outputting its digits gives you a good RNG. The outputs of such a RNG are still entirely predictable. Whether that's acceptable might depend on the application. So, I don't think it's quite as simple as saying "pi is normal, case closed".
    $endgroup$
    – D.W.
    9 hours ago
















  • 1




    $begingroup$
    If you believe the question is a duplicate, then why are you answering it? You should simply flag it, not reinforce undesired posting behavior.
    $endgroup$
    – dkaeae
    11 hours ago






  • 3




    $begingroup$
    @dkaeae There is no support for duplicates of questions on other sites. Furthermore, the same question on different sites can get different answers. In this case, a site such as Mathematics might not give much consideration to security concerns. See also this answer. Do note that we discourage asking the same question on multiple sites at the same time, since this tends to lead to wasted efforts. But the same question by different persons at different times on different sites is usually ok.
    $endgroup$
    – Discrete lizard
    10 hours ago






  • 3




    $begingroup$
    Unfortunately, just because a number is normal doesn't mean that outputting its digits gives you a good RNG. The outputs of such a RNG are still entirely predictable. Whether that's acceptable might depend on the application. So, I don't think it's quite as simple as saying "pi is normal, case closed".
    $endgroup$
    – D.W.
    9 hours ago










1




1




$begingroup$
If you believe the question is a duplicate, then why are you answering it? You should simply flag it, not reinforce undesired posting behavior.
$endgroup$
– dkaeae
11 hours ago




$begingroup$
If you believe the question is a duplicate, then why are you answering it? You should simply flag it, not reinforce undesired posting behavior.
$endgroup$
– dkaeae
11 hours ago




3




3




$begingroup$
@dkaeae There is no support for duplicates of questions on other sites. Furthermore, the same question on different sites can get different answers. In this case, a site such as Mathematics might not give much consideration to security concerns. See also this answer. Do note that we discourage asking the same question on multiple sites at the same time, since this tends to lead to wasted efforts. But the same question by different persons at different times on different sites is usually ok.
$endgroup$
– Discrete lizard
10 hours ago




$begingroup$
@dkaeae There is no support for duplicates of questions on other sites. Furthermore, the same question on different sites can get different answers. In this case, a site such as Mathematics might not give much consideration to security concerns. See also this answer. Do note that we discourage asking the same question on multiple sites at the same time, since this tends to lead to wasted efforts. But the same question by different persons at different times on different sites is usually ok.
$endgroup$
– Discrete lizard
10 hours ago




3




3




$begingroup$
Unfortunately, just because a number is normal doesn't mean that outputting its digits gives you a good RNG. The outputs of such a RNG are still entirely predictable. Whether that's acceptable might depend on the application. So, I don't think it's quite as simple as saying "pi is normal, case closed".
$endgroup$
– D.W.
9 hours ago






$begingroup$
Unfortunately, just because a number is normal doesn't mean that outputting its digits gives you a good RNG. The outputs of such a RNG are still entirely predictable. Whether that's acceptable might depend on the application. So, I don't think it's quite as simple as saying "pi is normal, case closed".
$endgroup$
– D.W.
9 hours ago













0












$begingroup$

In general, this approach does not work: "randomness" does not mean that you get a lot of different digits, but there are other aspects as well. For example, a classic test is to see if all two-digit, or three-digit etc. combinations occur with the same frequency. This would be a very simple test, which can rule out obvious non-random results, but is still by far too simplistic to check for really random behaviour.



See the Wikipedia page about Randomness Tests as a collection of links to primary sources regarding this. They do mention a good amount of quite complicated-sounding concepts; it is it not so important to go into deep detail about this - but it is clear that it is not intuitively possible to declare a specific number to be a good source for such digits.



On a positive note: For a specific irrational number, you are of course free to just try it; i.e., calculate the number to a sufficiantly large degree of digits, and run it through all known tests (there are tools for that, see above link). If the measure is good enough for your use case, and if you are aware that this is obviously useless for cryptographical applications, and always get the same numbers if you should start over, and that the quality might degrade if you get past the n you picked for testing the randomness, you could use those numbers. But it will be far better to use a dedicated (pseudo-)random number generator; and nothing beats a good physical source of randomness.






share|cite|improve this answer









$endgroup$









  • 1




    $begingroup$
    OK but $pi$ and $mathrm{e}$ have the property that all the 2, 3, 4, ... digit sequences do empirically turn up with the right frequency. Nobody's managed to prove it but it seem to be true.
    $endgroup$
    – David Richerby
    11 hours ago










  • $begingroup$
    Ayrat's answer links to other sites where mathematicians have done these tests. They believe, but haven't proved, that π meets the statistical tests.
    $endgroup$
    – Barmar
    5 hours ago
















0












$begingroup$

In general, this approach does not work: "randomness" does not mean that you get a lot of different digits, but there are other aspects as well. For example, a classic test is to see if all two-digit, or three-digit etc. combinations occur with the same frequency. This would be a very simple test, which can rule out obvious non-random results, but is still by far too simplistic to check for really random behaviour.



See the Wikipedia page about Randomness Tests as a collection of links to primary sources regarding this. They do mention a good amount of quite complicated-sounding concepts; it is it not so important to go into deep detail about this - but it is clear that it is not intuitively possible to declare a specific number to be a good source for such digits.



On a positive note: For a specific irrational number, you are of course free to just try it; i.e., calculate the number to a sufficiantly large degree of digits, and run it through all known tests (there are tools for that, see above link). If the measure is good enough for your use case, and if you are aware that this is obviously useless for cryptographical applications, and always get the same numbers if you should start over, and that the quality might degrade if you get past the n you picked for testing the randomness, you could use those numbers. But it will be far better to use a dedicated (pseudo-)random number generator; and nothing beats a good physical source of randomness.






share|cite|improve this answer









$endgroup$









  • 1




    $begingroup$
    OK but $pi$ and $mathrm{e}$ have the property that all the 2, 3, 4, ... digit sequences do empirically turn up with the right frequency. Nobody's managed to prove it but it seem to be true.
    $endgroup$
    – David Richerby
    11 hours ago










  • $begingroup$
    Ayrat's answer links to other sites where mathematicians have done these tests. They believe, but haven't proved, that π meets the statistical tests.
    $endgroup$
    – Barmar
    5 hours ago














0












0








0





$begingroup$

In general, this approach does not work: "randomness" does not mean that you get a lot of different digits, but there are other aspects as well. For example, a classic test is to see if all two-digit, or three-digit etc. combinations occur with the same frequency. This would be a very simple test, which can rule out obvious non-random results, but is still by far too simplistic to check for really random behaviour.



See the Wikipedia page about Randomness Tests as a collection of links to primary sources regarding this. They do mention a good amount of quite complicated-sounding concepts; it is it not so important to go into deep detail about this - but it is clear that it is not intuitively possible to declare a specific number to be a good source for such digits.



On a positive note: For a specific irrational number, you are of course free to just try it; i.e., calculate the number to a sufficiantly large degree of digits, and run it through all known tests (there are tools for that, see above link). If the measure is good enough for your use case, and if you are aware that this is obviously useless for cryptographical applications, and always get the same numbers if you should start over, and that the quality might degrade if you get past the n you picked for testing the randomness, you could use those numbers. But it will be far better to use a dedicated (pseudo-)random number generator; and nothing beats a good physical source of randomness.






share|cite|improve this answer









$endgroup$



In general, this approach does not work: "randomness" does not mean that you get a lot of different digits, but there are other aspects as well. For example, a classic test is to see if all two-digit, or three-digit etc. combinations occur with the same frequency. This would be a very simple test, which can rule out obvious non-random results, but is still by far too simplistic to check for really random behaviour.



See the Wikipedia page about Randomness Tests as a collection of links to primary sources regarding this. They do mention a good amount of quite complicated-sounding concepts; it is it not so important to go into deep detail about this - but it is clear that it is not intuitively possible to declare a specific number to be a good source for such digits.



On a positive note: For a specific irrational number, you are of course free to just try it; i.e., calculate the number to a sufficiantly large degree of digits, and run it through all known tests (there are tools for that, see above link). If the measure is good enough for your use case, and if you are aware that this is obviously useless for cryptographical applications, and always get the same numbers if you should start over, and that the quality might degrade if you get past the n you picked for testing the randomness, you could use those numbers. But it will be far better to use a dedicated (pseudo-)random number generator; and nothing beats a good physical source of randomness.







share|cite|improve this answer












share|cite|improve this answer



share|cite|improve this answer










answered 11 hours ago









AnoEAnoE

1,02749




1,02749








  • 1




    $begingroup$
    OK but $pi$ and $mathrm{e}$ have the property that all the 2, 3, 4, ... digit sequences do empirically turn up with the right frequency. Nobody's managed to prove it but it seem to be true.
    $endgroup$
    – David Richerby
    11 hours ago










  • $begingroup$
    Ayrat's answer links to other sites where mathematicians have done these tests. They believe, but haven't proved, that π meets the statistical tests.
    $endgroup$
    – Barmar
    5 hours ago














  • 1




    $begingroup$
    OK but $pi$ and $mathrm{e}$ have the property that all the 2, 3, 4, ... digit sequences do empirically turn up with the right frequency. Nobody's managed to prove it but it seem to be true.
    $endgroup$
    – David Richerby
    11 hours ago










  • $begingroup$
    Ayrat's answer links to other sites where mathematicians have done these tests. They believe, but haven't proved, that π meets the statistical tests.
    $endgroup$
    – Barmar
    5 hours ago








1




1




$begingroup$
OK but $pi$ and $mathrm{e}$ have the property that all the 2, 3, 4, ... digit sequences do empirically turn up with the right frequency. Nobody's managed to prove it but it seem to be true.
$endgroup$
– David Richerby
11 hours ago




$begingroup$
OK but $pi$ and $mathrm{e}$ have the property that all the 2, 3, 4, ... digit sequences do empirically turn up with the right frequency. Nobody's managed to prove it but it seem to be true.
$endgroup$
– David Richerby
11 hours ago












$begingroup$
Ayrat's answer links to other sites where mathematicians have done these tests. They believe, but haven't proved, that π meets the statistical tests.
$endgroup$
– Barmar
5 hours ago




$begingroup$
Ayrat's answer links to other sites where mathematicians have done these tests. They believe, but haven't proved, that π meets the statistical tests.
$endgroup$
– Barmar
5 hours ago










Abhradeep Sarkar is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















Abhradeep Sarkar is a new contributor. Be nice, and check out our Code of Conduct.













Abhradeep Sarkar is a new contributor. Be nice, and check out our Code of Conduct.












Abhradeep Sarkar is a new contributor. Be nice, and check out our Code of Conduct.
















Thanks for contributing an answer to Computer Science Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


Use MathJax to format equations. MathJax reference.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcs.stackexchange.com%2fquestions%2f106774%2fcan-we-generate-random-numbers-using-irrational-numbers-like-%25cf%2580-and-e%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Bruad Bilen | Luke uk diar | NawigatsjuunCommonskategorii: BruadCommonskategorii: RunstükenWikiquote: Bruad

What is the offset in a seaplane's hull?

Slayer Innehåll Historia | Stil, komposition och lyrik | Bandets betydelse och framgångar | Sidoprojekt och samarbeten | Kontroverser | Medlemmar | Utmärkelser och nomineringar | Turnéer och festivaler | Diskografi | Referenser | Externa länkar | Navigeringsmenywww.slayer.net”Metal Massacre vol. 1””Metal Massacre vol. 3””Metal Massacre Volume III””Show No Mercy””Haunting the Chapel””Live Undead””Hell Awaits””Reign in Blood””Reign in Blood””Gold & Platinum – Reign in Blood””Golden Gods Awards Winners”originalet”Kerrang! Hall Of Fame””Slayer Looks Back On 37-Year Career In New Video Series: Part Two””South of Heaven””Gold & Platinum – South of Heaven””Seasons in the Abyss””Gold & Platinum - Seasons in the Abyss””Divine Intervention””Divine Intervention - Release group by Slayer””Gold & Platinum - Divine Intervention””Live Intrusion””Undisputed Attitude””Abolish Government/Superficial Love””Release “Slatanic Slaughter: A Tribute to Slayer” by Various Artists””Diabolus in Musica””Soundtrack to the Apocalypse””God Hates Us All””Systematic - Relationships””War at the Warfield””Gold & Platinum - War at the Warfield””Soundtrack to the Apocalypse””Gold & Platinum - Still Reigning””Metallica, Slayer, Iron Mauden Among Winners At Metal Hammer Awards””Eternal Pyre””Eternal Pyre - Slayer release group””Eternal Pyre””Metal Storm Awards 2006””Kerrang! Hall Of Fame””Slayer Wins 'Best Metal' Grammy Award””Slayer Guitarist Jeff Hanneman Dies””Bullet-For My Valentine booed at Metal Hammer Golden Gods Awards””Unholy Aliance””The End Of Slayer?””Slayer: We Could Thrash Out Two More Albums If We're Fast Enough...””'The Unholy Alliance: Chapter III' UK Dates Added”originalet”Megadeth And Slayer To Co-Headline 'Canadian Carnage' Trek”originalet”World Painted Blood””Release “World Painted Blood” by Slayer””Metallica Heading To Cinemas””Slayer, Megadeth To Join Forces For 'European Carnage' Tour - Dec. 18, 2010”originalet”Slayer's Hanneman Contracts Acute Infection; Band To Bring In Guest Guitarist””Cannibal Corpse's Pat O'Brien Will Step In As Slayer's Guest Guitarist”originalet”Slayer’s Jeff Hanneman Dead at 49””Dave Lombardo Says He Made Only $67,000 In 2011 While Touring With Slayer””Slayer: We Do Not Agree With Dave Lombardo's Substance Or Timeline Of Events””Slayer Welcomes Drummer Paul Bostaph Back To The Fold””Slayer Hope to Unveil Never-Before-Heard Jeff Hanneman Material on Next Album””Slayer Debut New Song 'Implode' During Surprise Golden Gods Appearance””Release group Repentless by Slayer””Repentless - Slayer - Credits””Slayer””Metal Storm Awards 2015””Slayer - to release comic book "Repentless #1"””Slayer To Release 'Repentless' 6.66" Vinyl Box Set””BREAKING NEWS: Slayer Announce Farewell Tour””Slayer Recruit Lamb of God, Anthrax, Behemoth + Testament for Final Tour””Slayer lägger ner efter 37 år””Slayer Announces Second North American Leg Of 'Final' Tour””Final World Tour””Slayer Announces Final European Tour With Lamb of God, Anthrax And Obituary””Slayer To Tour Europe With Lamb of God, Anthrax And Obituary””Slayer To Play 'Last French Show Ever' At Next Year's Hellfst””Slayer's Final World Tour Will Extend Into 2019””Death Angel's Rob Cavestany On Slayer's 'Farewell' Tour: 'Some Of Us Could See This Coming'””Testament Has No Plans To Retire Anytime Soon, Says Chuck Billy””Anthrax's Scott Ian On Slayer's 'Farewell' Tour Plans: 'I Was Surprised And I Wasn't Surprised'””Slayer””Slayer's Morbid Schlock””Review/Rock; For Slayer, the Mania Is the Message””Slayer - Biography””Slayer - Reign In Blood”originalet”Dave Lombardo””An exclusive oral history of Slayer”originalet”Exclusive! Interview With Slayer Guitarist Jeff Hanneman”originalet”Thinking Out Loud: Slayer's Kerry King on hair metal, Satan and being polite””Slayer Lyrics””Slayer - Biography””Most influential artists for extreme metal music””Slayer - Reign in Blood””Slayer guitarist Jeff Hanneman dies aged 49””Slatanic Slaughter: A Tribute to Slayer””Gateway to Hell: A Tribute to Slayer””Covered In Blood””Slayer: The Origins of Thrash in San Francisco, CA.””Why They Rule - #6 Slayer”originalet”Guitar World's 100 Greatest Heavy Metal Guitarists Of All Time”originalet”The fans have spoken: Slayer comes out on top in readers' polls”originalet”Tribute to Jeff Hanneman (1964-2013)””Lamb Of God Frontman: We Sound Like A Slayer Rip-Off””BEHEMOTH Frontman Pays Tribute To SLAYER's JEFF HANNEMAN””Slayer, Hatebreed Doing Double Duty On This Year's Ozzfest””System of a Down””Lacuna Coil’s Andrea Ferro Talks Influences, Skateboarding, Band Origins + More””Slayer - Reign in Blood””Into The Lungs of Hell””Slayer rules - en utställning om fans””Slayer and Their Fans Slashed Through a No-Holds-Barred Night at Gas Monkey””Home””Slayer””Gold & Platinum - The Big 4 Live from Sofia, Bulgaria””Exclusive! Interview With Slayer Guitarist Kerry King””2008-02-23: Wiltern, Los Angeles, CA, USA””Slayer's Kerry King To Perform With Megadeth Tonight! - Oct. 21, 2010”originalet”Dave Lombardo - Biography”Slayer Case DismissedArkiveradUltimate Classic Rock: Slayer guitarist Jeff Hanneman dead at 49.”Slayer: "We could never do any thing like Some Kind Of Monster..."””Cannibal Corpse'S Pat O'Brien Will Step In As Slayer'S Guest Guitarist | The Official Slayer Site”originalet”Slayer Wins 'Best Metal' Grammy Award””Slayer Guitarist Jeff Hanneman Dies””Kerrang! Awards 2006 Blog: Kerrang! Hall Of Fame””Kerrang! Awards 2013: Kerrang! Legend”originalet”Metallica, Slayer, Iron Maien Among Winners At Metal Hammer Awards””Metal Hammer Golden Gods Awards””Bullet For My Valentine Booed At Metal Hammer Golden Gods Awards””Metal Storm Awards 2006””Metal Storm Awards 2015””Slayer's Concert History””Slayer - Relationships””Slayer - Releases”Slayers officiella webbplatsSlayer på MusicBrainzOfficiell webbplatsSlayerSlayerr1373445760000 0001 1540 47353068615-5086262726cb13906545x(data)6033143kn20030215029