Random Numbers, true random?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • TheCotMan
    *****Retired *****
    • May 2004
    • 8857

    #16
    Originally posted by bascule
    Okay, here's my definitive answer: no, I don't believe there are truly random numbers.
    ...
    If you have the algorithm and enough of the state, you can figure out the causation behind the generation of any "random" number.
    If I understand you correctly, you write that it is possible for for any "random number" to be predicted if you are able to know enough about the state of the system.

    So, now I ask, is it possible to know enough about the state of the system to predict a "random number" with 100% certainty?

    Consider a system (from your world) where we desire to know both the position and momentum of a particle. If we base random number generation on the results of both of these together, where both are known after the fact, to predict the "random number" both would need to be known. Would that mean it would be possible to know both the position and momentum of any particle?

    Are you writing that quantum mechanics is not about probability but is deterministic?

    Now we get to a more interesting place. Let us assume that time travel is possible. At the time you make a prediction based on the evidence at hand, there is a delay in time between the time you recognize a "pattern" and the time you announce your prediction. Time travel would suggest that someone could influence the chain of events during the delay between recognition and annoucement to alter the future outcome and invalidate your prediction. Would this suggest time travel is impossible, or would you just choose to include time travel and future decisions of people as part of the state of the system? If you claim knowledge of future actions by people as part of a requirement for knowing the state of the system, then aren't you using a logical statement like this?

    If I know the future, then I know the future.

    That is not proof, it is re-statement of premise.

    I think you are still travelling right now, or may be just arriving in LV. Hope you have and had a safe trip.

    Comment

    • King_Knut
      Member
      • Dec 2014
      • 5

      #17
      Re: Random Numbers, true random?

      Originally posted by FunkyChicken
      Hi there,

      I'm trying to understand how a computer generates a random number, i cannot simply think of any mathematical calculation that would give a TRUE random number.

      Because the computer is a contained machine i cannot understand how the number can be random? If i ran a random number generator for say 24 hours and logged the results would i start to notice some strange outputs, i.e. some numbers appearing not at all, some alot more than others?

      For a true random number would the computer need to have some kind of input from the "real" world? By this i mean something physical/biological that we can grasp, this would then allow for true measurement (but only to the degree of accuracy of the measuring device).

      Im really stumped by this, its driving me nuts, last nyt i was awake in bed trying to figure this out, no luck.

      So, my question is, can a computer give me a real honest random number? If so how?
      Random numbers are not as random at all - even those used to draw in the lottery.
      This is pure mathematics, application of an ancient theorem that the Indians knew 2000 years ago.
      Consider all numbers in the world, and just for the sake of argument, consider that the number of numbers is a prime - P1. Well then there is always another prime, P2 bigger than P1. Now take any number N1 less than P2 - multiply this with P1, and make that modulo P2, and you get a new number N2. Do to N2 the same, and you will get P2-1 unique numbers - "generate the group P2". Now there are indefinite number of primes, and all primes belong to a group of numbers we call "primitive roots", and every primitive root can generate a dense ring.

      So the "rnd()" function has a "seed" - that is used to generate P1 and P2. Use the same seed, and the function shall generate the exact same sequence over and over again. What we do if no "seed" is provided is to sample the clock or some other bit setting that changes fast and is apparently random.

      We need these to generate encryption algorithms, that can include an arbitrary number of primitive root - multiply two numbers will always yield the same result. But we also use this to avoid clustering - that all "Tim" ends up in the same place, that all disk pages are located in one place, forcing linear search for a hit.

      Sorry mates - "Random" is not philosophy or clinking dices.

      A final word: many consider the strength of encryption in the number of digits in the primes used, which is WRONG. Well, a large number generates a larger ring, and safer. But consider what I said above about the number of keys: you can have "k" keys, each over a body of Pk and multiply the result, and that is difficult to decipher. The next is to make the encryption keys change at apparent random intervals - say P less than 2000, and that make it military quality encryption. The lesson is free NSA!
      The random sample in a playlist is generated according to this, and flavoured with what you have listened to, so to avoid the tracks, and make it more probable that you get music that is similar to what you have listened to. Nokia had an excellent playlist generator.
      ------
      Don´t believe what you claim, - know!

      Comment

      • King_Knut
        Member
        • Dec 2014
        • 5

        #18
        Re: Random Numbers, true random?

        Originally posted by TheCotMan
        If I understand you correctly, you write that it is possible for for any "random number" to be predicted if you are able to know enough about the state of the system.

        So, now I ask, is it possible to know enough about the state of the system to predict a "random number" with 100% certainty?

        Consider a system (from your world) where we desire to know both the position and momentum of a particle...

        Are you writing that quantum mechanics is not about probability but is deterministic?

        Now we get to a more interesting place. ...

        If I know the future, then I know the future.

        That is not proof, it is re-statement of premise.
        The function in the C-library is what I describe, will map the entire space uniformly, go through every song in your collection before repeating. It will traverse the entire universe of particle space and speed and time before repeating so collisions will never happen. To simulate a clustered space, you need to reduce the space, and use multiple seeds, so you get multiple paths, each with a probability of collision. This is how the statistical functions are defined.

        It is strange to work with "perfect randomness", where repetition is not allowed, but you need this for certain things that demand absolute uniformity. The lottery is not one of these, here someone enters the seed, creating a probability that the same numbers can re-appear: Instead of drawing 1:1 million, you draw 6 decimal digits, in the order of most significant to least - left to right. Now for each digit, the draw is stochastic - you have 6 seeds so there is a probability of getting all "0". There is also a probability of drawing exactly the same number as last week.

        The simple way of achieving other distributions: clusters will demand a Poisson distribution, which is common when you simulate shortages ("My queue always move slower than all the others"). Well, create a dependency or create a distribution space, map into this the integral, and if it misses the curve discharge the result. Usually a 10 x 10 matrix gives a good resolution, but those that work with physics will demand to control this. But the rule is the same: do the test over again with exactly the same numbers, and the particles in the simulator will take exactly the same path, and the final collision will happen at the same place at the same time.

        I apologise for killing illusions and dreams, they have a place too - but not in math and science. :)
        ------
        Don´t believe what you claim, - know!

        Comment

        • Deviant Ollam
          Semi-Professional Swearer
          • May 2003
          • 3417

          #19
          Re: Random Numbers, true random?

          two pretty awesome educational YouTube videos on this topic come from two of my favorite channels: VSauce and Veritasum.

          "What is random"
          https://www.youtube.com/watch?v=9rIy0xY99a0

          "What is NOT random"
          https://www.youtube.com/watch?v=sMb00lz-IfE

          Essentially, the best random number generation methods involve sources outside of the computer itself. the famous random.org engine uses atmospheric background noise. i've heard of similar methods (sometimes like tuning a radio to a dead station while inside of a near-perfect faraday cage) to capture and utilize as close to perfectly "random" data as possible.

          In purely digital systems, the best sources of randomness are analog.
          "I'll admit I had an OiNK account and frequented it quite often… What made OiNK a great place was that it was like the world's greatest record store… iTunes kind of feels like Sam Goody to me. I don't feel cool when I go there. I'm tired of seeing John Mayer's face pop up. I feel like I'm being hustled when I visit there, and I don't think their product is that great. DRM, low bit rate, etc... OiNK it existed because it filled a void of what people want."
          - Trent Reznor

          Comment

          • TheCotMan
            *****Retired *****
            • May 2004
            • 8857

            #20
            Re: Random Numbers, true random?

            Comments from those claiming random numbers are not random seem to be consistently citing PRNG, not hardware-based systems that use sources that are in unknown states until asked, such as those involving radioactiive decay, Quantum Mechanics with position or state of particles.

            Math we rely upon to make crypto work is based on basic and fundamental concepts that (to the best understanding of now(); ) are "hard" to solve through reversing (consider hashing) and "difficult" (time consuming) to solve with key-space searches. Advances in Mathematics that show us how things we once thought were hard are no longer hard, or advances in computing to decimate work required, can each degrade ciphers and hashes we hold as strong, reducing them in value.

            PRNG work on this same principle. (I recognize a need for non-repeating pseudo random number generator for some applications, but for a keyspace that is finite, certainty in predictability of "next" random number slowly approaches "100%" if all previous "draws" are recorded by the attacker.)

            Advances in Physics seem slower. Base a RNG upon looking at a particle position and direction, or choose other spaces where the uncertainty principle applies, or in spaces where an answer is always in two states, (or between depending on your camp) until it is queried and it settles during check, returning to an unknown state after, and we have a non-repeatable (as far as we know) string of bits, which can be used to build a number of whatever size we wish.

            Certainly, such a system is at the same risk of any digital devices in the realm of "tempest machines" and systems that look for RF data, or EM fluctuations to estimate circuit activity and guess what a processor of circuit is doing at any time, but in the space of randomness (the point of this discussion) in order to make random number generation based on principles of Physics predictable, would require the attacker to actually make headway into solving the hard problems in Physics.

            It is an arms race. CAPTCHA was like this. There was a "hard" problem in CS: "recognize a squiggle as a specific character with reliability"
            As solutions were found, squiggle-generators made even more complicated squiggles, until computer systems were better at guessing the intended mapping of squiggle-to-char than humans. How long was that? Less than 5 years? Then every month another attack on CAPTCHA showed weakness.

            How long did MD2 last? MD4? MD5? SHA1? Another arms race.

            Even ciphers have risks, as do the systems of exchange. Do we have any ciphers combined with protocol for key exchange that remain "Strong" and "Best Practice" for 30 the last years? The last 20 years? The last 10 years?

            How quickly would all present forms of *common* PKI and key exchange last if very fast methods of factoring integers to primes were found?

            I see a long history of advances in Math, which quickly degrade or weaken hashing systems, or crypto system, and this assumes implementation of these is perfect, without mistakes. (Is there enough time to build a bug-free implementation of a cipher and make that implementation mature before the cipher is degraded from "strong"?)

            Those people like Bascule, who accept "The Singularity" as as almost certainty in the future of humans might point out that acceleration in advances in Math and Physics mat lay waste to any systems we consider "hard" to solve and all will fail in the long term, at increasingly shorter intervals. (I accept the Singularity may be possible, but is unlikely. He and I have argued about this in the past. :-)

            But then there are people like me that think advances in understanding just lower the cost to increasingly more powerful tools (which can be used for constructive or destructive purposes) which will make the cost of "doomsday weapons" cheaper and cheaper, risking construction and use of them on purpose or by accident, increasingly more likely. (He has counter-argued that methods to defeat doomsday weapons could be produced nearly as fast as the doomsday weapons are created, but then I counter with a latency issue: is the delta in time between weapons fabrication and defeating the weapon great enough to allow the weapon to destroy all humans before the solution is applied?)

            Also, people like me that find strong correlation between advances in understanding with "cheap energy" mean the "expectation" for singularity to be exponential is actually just the leading steepness of an "S" curve, or worse, something which looks more like a "bubble" in economics (consider the crash of the Roman Empire, and the "Dark Ages" that followed, or the many large empires that grew, expended the local resources and fuel (or what they could pillage from their neighbors) until they fail: Mayan, many old trading centers in North African and middle-eastern city-states, and ancient abandoned cities in Italy or Greece.)

            Back to topic:

            Do any of you in the camp of "predictable random numbers" claim that random numbers based on the state of a particle, are predictable?

            It is also possible to leave such a random number's size, open-ended, to be as large of a number-space as we want: why settle on "what is fast" for the CPU with 32-bit or 64-bit integers. Employ arbitrary precision, and move up to 1k-bit ints. If time/space are not issues, a trillion bits... Think about how long it would take to setup an encryption session with primes up to 1 trillion bits in size, and then perform a key-exchange, and then consider how long it would take to try a key-space attack.)

            A point is this:

            Relying on physics in the above way, does the number of bits used to limit the domain/range of possible numbers weaken the system to generate random numbers, and make them more predictable? Does running the RNG longer, keeping track of previous results (repeats are possible) make it easier to predict the next random number?

            Can the same be said for any PRNG? In your opinion, which will last the test of time longer? A PRNG, or RNG based on things like the uncertainty principle?

            Many crypto cards, and some TPM (though slower) have better sources of random numbers than totally software PRNG. Some vendors have historically claimed "quantum crypto" as methods to generate random numbers, though these have been contested and some claims are dubious. Even if some of these products are snake oil (PRNG systems only using sources of entropy in hardware) there will be products that actually do rely on things like the uncertainty principle physics for good and fast random number generation.

            I'm not suggesting we move all RNG over to principles in physics. Whether relying on "hard" problems in Math or "hard" problems in Physics (or other realms) all have similar risks: any significant advancement that makes "hard" problems less hard risks degrading the RNG system; diversity allows fall-back if one is degraded and made less strong than the other. I just think these problems in Physics have gone longer without answer or being weakened than in Math or CS. A weakness? If a problem is found, software patches are unlikely to fix hardware.


            Originally posted by Deviant Ollam
            [chop]Essentially, the best random number generation methods involve sources outside of the computer itself. the famous random.org engine uses atmospheric background noise. i've heard of similar methods (sometimes like tuning a radio to a dead station while inside of a near-perfect faraday cage) to capture and utilize as close to perfectly "random" data as possible.

            In purely digital systems, the best sources of randomness are analog.
            A problem with some of these systems, is many still reduce to PRNG and seed (or source entropy) from a collection of data outside the machine as well as inside the machine (Interrupts, disk use, memory use, IO.) Though this is an improvement over PRNG that seed with "time", patterns can still emerge when collecting enough random numbers from simple PRNG even if they use "good" sources of entropy. Many people have found clever ways to graph supposedly random numbers, and show patterns emerge. This can include crypto cards that rely on radioactive decay, or sampling of RF noise or other sources.

            Even if you use really good sources of entropy, a bad PRNG, or bad implementation of a PRNG will result in less than random, random numbers.
            Last edited by TheCotMan; December 31, 2014, 03:46.

            Comment

            • King_Knut
              Member
              • Dec 2014
              • 5

              #21
              Re: Random Numbers, true random?

              Please leave philosophy to those that has studied philosophy. The first to understand the physicists want to find relationships and why things happen. In real life, we do not have a perfect sample space, where every possible permutation will be selected before we start over again. That is the reason for "treating" the result. You have to understand that in real life things are related, virtually always. But then it is this meaning of "virtual" that is interesting - "as if", or "for all practical purpose". It is when you place to bets you demand perfection: in two races, the outcome of the second is not related to the outcome of the first. When the result in one ball game is related to another game we call that "cheating" and changing the odds, and here the police gets involved. They will use computers to identify irregularities, and they will demand that the events are just as related as two calls to the "rnd()" function. The notion of identifying events to be related is so important in statistics and science in general, that it is mandatory here. You can call these other sites and functions to obtain a seed that is unique. But the question was if the random numbers were "related". The answer to this is that they are very much related and usually, the relationship is simple - but the number "7" will appear in 12334 seconds, and will then reappear in 1234 seconds and then in every 1234 subsequent seconds. There is no variance, no deviation. If you want that you need two seeds, add the result and count the time between the sum is 7. If you multiply the seeds you risk never getting 7, since the two permutations that gives this result is 1,7 and 7,1 - and 1234 seconds multiplied by 1234 seconds is years.
              ------
              Don´t believe what you claim, - know!

              Comment

              • TheCotMan
                *****Retired *****
                • May 2004
                • 8857

                #22
                Re: Random Numbers, true random?

                Originally posted by King_Knut
                Please leave philosophy to those that has studied philosophy. The first to understand the physicists want to find relationships and why things happen. In real life, we do not have a perfect sample space, where every possible permutation will be selected before we start over again. That is the reason for "treating" the result. You have to understand that in real life things are related, virtually always. But then it is this meaning of "virtual" that is interesting - "as if", or "for all practical purpose". It is when you place to bets you demand perfection: in two races, the outcome of the second is not related to the outcome of the first. When the result in one ball game is related to another game we call that "cheating" and changing the odds, and here the police gets involved. They will use computers to identify irregularities, and they will demand that the events are just as related as two calls to the "rnd()" function. The notion of identifying events to be related is so important in statistics and science in general, that it is mandatory here. You can call these other sites and functions to obtain a seed that is unique. But the question was if the random numbers were "related". The answer to this is that they are very much related and usually, the relationship is simple - but the number "7" will appear in 12334 seconds, and will then reappear in 1234 seconds and then in every 1234 subsequent seconds. There is no variance, no deviation. If you want that you need two seeds, add the result and count the time between the sum is 7. If you multiply the seeds you risk never getting 7, since the two permutations that gives this result is 1,7 and 7,1 - and 1234 seconds multiplied by 1234 seconds is years.
                The original question in this thread was not about random numbers being related:

                Originally posted by FunkyChicken
                Hi there,

                I'm trying to understand how a computer generates a random number, i cannot simply think of any mathematical calculation that would give a TRUE random number.

                Because the computer is a contained machine i cannot understand how the number can be random? If i ran a random number generator for say 24 hours and logged the results would i start to notice some strange outputs, i.e. some numbers appearing not at all, some alot more than others?

                For a true random number would the computer need to have some kind of input from the "real" world? By this i mean something physical/biological that we can grasp, this would then allow for true measurement (but only to the degree of accuracy of the measuring device).

                Im really stumped by this, its driving me nuts, last nyt i was awake in bed trying to figure this out, no luck.

                So, my question is, can a computer give me a real honest random number? If so how?

                Cheers in advanced guys
                Nothing about "related".

                Is your view that elements of quantum mechanics are NOT a good source of random numbers?

                Is your view that there is no good source of random numbers?

                Comment

                • King_Knut
                  Member
                  • Dec 2014
                  • 5

                  #23
                  Re: Random Numbers, true random?

                  Originally posted by TheCotMan
                  The original question in this thread was not about random numbers being related:

                  Nothing about "related".

                  Is your view that elements of quantum mechanics are NOT a good source of random numbers?

                  Is your view that there is no good source of random numbers?
                  The quantum mechanics has noting to do with being"random". I have described for you the way apparent random numbers are generated by a computer and the relationships between the numbers. In the real world, there is alway a probability that the same number will be drawn twice, but in the computer, that will not happen until all the other numbers have been selected.

                  BUT if you want a probability of 1/n that a number k is selected twice, that is fully possible.
                  The random numbers selected are related and must be related. There is no God inside a computer, if you need theology, go ahead and code "God" and "The Devil" and it all to make the games complete.

                  We have been provided mathematics, and Indians mathematicians described how thee numbers are related a long time ago.

                  If you study Abstract Algebra, a bit beyond the initial course, look for "Group and Ring Theory" and you will find it here. The computer is a finite automata and all numbers it can hold is in one such "Ring", and then you describe the valid operations allowed. To those that have studied this, I know it is simple to understand, it is the way the universe is made. I also know it is not that simple to those that do not know of this branch of mathematics. Well, it is just to start reading, follow the reasoning to Niels Henrik Abel, Fermat, Gauchy and the old Arab masters. Then it is to make this "your own" and apply these theories. The first domain is encryption and pseudo-random numbers. The next I looked at is how to generate code for multiprocessor, scheduling algorithms - and how to identified pieces of code that can run in parallel. Another application is avoiding clustering in database system indexing schemes - and all indexing schemes. Then it is to look at complex situation, operating systems and device drivers and scheduling. I proved the finiteness of Chris Date´s Fifth Normal Form with this theory and the reasoning here is not that far from the young Abel. But it shows the terms that must be in place, and then that there are no more ways of normalising a database. I understand that you and others do not see this, but challenge you to investigate and learn and understand. Well, this is connected to what we call "stochastic events" in statistics, and you have to understand this concept.

                  Then you can understand the shortcomings of the math, compared to the real world. To those that make games, their games should be as realistic as possible, and that includes that the same thing can happen twice. But a collision of particles happens once and will then destruct, or enter into some new form.
                  ------
                  Don´t believe what you claim, - know!

                  Comment

                  • REAL
                    Reality Hacker(nottheone)
                    • Jan 2015
                    • 7

                    #24
                    Re: Random Numbers, true random?

                    The more random subfunctions there are in THE ultimate random function, the more random the "number" will be.

                    Random, as defined by me right now, means "unpredictable"

                    If one uses a single quantum randomseed, it's not as "unpredictable" as; Quantum RandomSeed * prime number millisecond * temperature in [randomseed{randomcycle(randomGPS)}] * non-prime pixel marker of cursor * [randomX{randomY{random Decimal Selection of Pi}}] * 56 * Quantum RandomSeed - Original Quantum RandomSeed * Generated Image[HexValue of XYth Pixel]

                    How can we make something more unpredictable?
                    By making it harder to predict.

                    How can we ensure something is more random?
                    By making random more random.
                    .. / -.. --- / .. / .-.. --- ...- . / -.-. .-. -.-- _.._ _ ___
                    ';.P';.E';.O';.P';.L';.E';. /\/\S/\/\H/\/\O/\/\U/\/\L/\/\D =-T=-Y=-P=-E ...T...H...I...S...
                    []M[]O[]R[]E[] +*++*--+O+-*+-*+*F+-*+-*T+-*+-*+*E+*-+-*+*-N+-*+*-

                    Comment

                    • King_Knut
                      Member
                      • Dec 2014
                      • 5

                      #25
                      Re: Random Numbers, true random?

                      Originally posted by REAL
                      The more random subfunctions there are in THE ultimate random function, the more random the "number" will be.

                      Random, as defined by me right now, means "unpredictable"

                      If one uses a single quantum randomseed, it's not as "unpredictable" as; Quantum RandomSeed * prime number millisecond * temperature in [randomseed{randomcycle(randomGPS)}] * non-prime pixel marker of cursor * [randomX{randomY{random Decimal Selection of Pi}}] * 56 * Quantum RandomSeed - Original Quantum RandomSeed * Generated Image[HexValue of XYth Pixel]

                      How can we make something more unpredictable?
                      By making it harder to predict.

                      How can we ensure something is more random?
                      By making random more random.
                      None of the other domains you mention, GPS, time in milliseconds, cursor position, decimal in a calculation of Pi, a sequence in an image, is anywhere close to as unpredictable. Well, the one property you introduce is the possibility that the same number can be selected twice.

                      You want things more random? simply done by multiplying and adding more random numbers, thus increasing the number of possible result. a 32 bit number can result in anything up to 10 decimal digits. Multiply with another, to make a 64 bit number, and you get it random within 20 digits. Multiply the two 64 bit numbers and be random with 40 digits. Multiplication is safe, as long as you are certain that none of the numbers can be 0 - zero.

                      The number zero will kill everything and the result will be 0, regardless of all the other numbers. So we do not want that number - but it is a valid position on the screen, it is a valid colour code in a picture. If you need a pixel to be white (0,0,0) - you have to make this by subtracting 1. If you need a string, pick a number, use one part of this as length of the string, and other parts as index in an array of permitted character, say from "A" to "Z" and place a space between words. But if you want apparent sensible text - use text in a document that includes spaces, and see the difference.

                      Write some code that use random numbers, and after that, explain what kind of unpredictable number you want. Multiplying random numbers increase the "space" between results - but the result is fully predictable. You can go back and say that given that this number is N7, then N8 should be, and N6 is one of...
                      ------
                      Don´t believe what you claim, - know!

                      Comment

                      • Deviant Ollam
                        Semi-Professional Swearer
                        • May 2003
                        • 3417

                        #26
                        Re: Random Numbers, true random?

                        Originally posted by TheCotMan
                        Even if you use really good sources of entropy, a bad PRNG, or bad implementation of a PRNG will result in less than random, random numbers.
                        quite right. and a good point to make.
                        "I'll admit I had an OiNK account and frequented it quite often… What made OiNK a great place was that it was like the world's greatest record store… iTunes kind of feels like Sam Goody to me. I don't feel cool when I go there. I'm tired of seeing John Mayer's face pop up. I feel like I'm being hustled when I visit there, and I don't think their product is that great. DRM, low bit rate, etc... OiNK it existed because it filled a void of what people want."
                        - Trent Reznor

                        Comment

                        Working...