Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Is there an algorithm to generate a perfect random number? I know that most random number generating algorithms we see are for generating psuedo-random numbers. Is there any algorithm which generated nearly random numbers, like input are less or parameters are... something like that?

share|improve this question
5  
Could you define perfect random number? –  Did Feb 16 '13 at 7:40
    
tbh, i really dont know. i'm giving it a try... this is what i am looking for: a function or algorithm which spits out a number which does not depend on anything. –  tvamsisai Feb 16 '13 at 7:50
    
Let me be more specific: I have an algorithm producing integers between 1 and 100, I use it 8 times, the results are 42, 42, 42, 42, 42, 42, 42 and 42. Is my algorithm producing perfect random numbers or not? If you think it does, why? If you think it does not, why? –  Did Feb 16 '13 at 7:53
    
For those who prefer nine. –  Did Feb 16 '13 at 7:59
2  
@tvamsisai This is the problem: computers are deterministic, anything you calculate depends on something. You cannot calculate a number that does not depend on anything. On the other hand you could try to get data that depends on things which we believe that are random (even if it is weakly random, you can condense it), this the idea behind hardware random generators. If you don't have any, you can use processor temperature, networking events, human input, etc. Also see Kolmogorov complexity. –  dtldarek Feb 16 '13 at 8:18
show 11 more comments

closed as not constructive by MJD, Chris Eagle, Davide Giraudo, Andreas Caranti, rschwieb Feb 16 '13 at 13:01

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer

No, there's no such function or algorithm which generates "real" random number. There's always a bit of determinism.

share|improve this answer
    
Is that so? –  Did Feb 16 '13 at 7:56
    
@Did are you saying they use quote function or algorithm end of quote to generate those random numbers? Or maybe they just use as they claim "atmospheric noise", maybe slightly change it to fit restriction or ranges etc? If latter, then they don't generate it, they transform whatever random number they get from outside. –  Kaster Feb 16 '13 at 8:01
    
If one takes "function or algorithm" in your answer in the restricted sense you seem to advocate in your comment, then your answer becomes a tautology (and tautologies are true, mind you...). It might be more useful to draw the attention of the OP to the pitfalls and possibilities of RNGs as they are widely used today. –  Did Feb 16 '13 at 8:05
2  
It might be more useful to answer the question, about existence, or not existence I'd say, of real random number generators. –  Kaster Feb 16 '13 at 8:15
    
Well, the discussion which is happening right now on the main post seems to infirm this verdict, but if you say so... –  Did Feb 16 '13 at 8:37
show 1 more comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.