Notices
Results 1 to 10 of 10

Thread: How do Computers pick Random?

  1. #1 How do Computers pick Random? 
    Forum Bachelors Degree 15uliane's Avatar
    Join Date
    Feb 2011
    Location
    depends...
    Posts
    425
    I don't want specifics, just theory on how computers, the solid, fact machines pick random numbers.
    Thanks!


    Reply With Quote  
     

  2.  
     

  3. #2  
    Forum Junior c186282's Avatar
    Join Date
    Dec 2008
    Posts
    208
    They don't make real random numbers and that causes problems sometimes.

    Computers can make Pseudo-random numbers which for most uses are good enough. Computer random number generators require a seed which is a number to start the computer going on a random sequence. If you give another computer, using the same pseudo-random number generator the same seed it will create the same sequence of "random" numbers. But if I were to give you that sequence it would look very random.

    There are statistical tests to evaluate if a sequence is random. For example the Pearson's chi-square test


    Reply With Quote  
     

  4. #3  
    Forum Freshman
    Join Date
    Oct 2010
    Posts
    98
    Actually computers can produce really random numbers. Consider Linux's /dev/random as an example. It accumulated information from low level events (thread interaction, network and so on), hashes it all at an entropy pool and releases to programs of demand. WinAPI has similar capabilities.
    Reply With Quote  
     

  5. #4  
    Forum Junior c186282's Avatar
    Join Date
    Dec 2008
    Posts
    208
    Say "BlasW" I did not know about /dev/random and I run Linux exclusively. I have abstracted myself too far from core. I normally just use high level programs like Mathematica, IDL etc.

    Thanks.
    Reply With Quote  
     

  6. #5  
    Forum Radioactive Isotope MagiMaster's Avatar
    Join Date
    Jul 2006
    Posts
    3,440
    Generally speaking, those two methods are the only two ways computers generate random numbers (either pulled from a source of entropy, or made algorithmically, which only makes pseudo-random numbers).
    Reply With Quote  
     

  7. #6  
    Forum Bachelors Degree 15uliane's Avatar
    Join Date
    Feb 2011
    Location
    depends...
    Posts
    425
    Thanks!
    I though that computers could get true random numbers just from non-physical sources.
    Reply With Quote  
     

  8. #7  
    Forum Freshman
    Join Date
    Apr 2011
    Posts
    9
    You can make pseudo random numbers using methods such as the logistic difference equation. Truely random sequences are however impossible as far as I know. You can make random numbers that are random enough even for most scientific studies, but at the core it is still a deterministic algorithm and the sequence can be predicted if you know the initial state of the generative system.
    Reply With Quote  
     

  9. #8  
    Forum Radioactive Isotope MagiMaster's Avatar
    Join Date
    Jul 2006
    Posts
    3,440
    You can make true random numbers if you have a source of entropy. The user or users can sometimes provide that.

    On the other hand, a purely algorithmic random number generator can't produce true random numbers (just pseudo-random).

    The logistic equation isn't usually used to produce random numbers though. The simplest generators are called linear congruential generators and take the seed (all pseudo-random number generators need a seed), multiply it by something, add something and finally take the remainder modulo some third number, and return that as the next number. They use the same number as the next seed.

    For example, let's take the multiply as 31, the add as 8, then the mod as 225, and the seed as 111. When you go to get the next number, you'll get
    (31 * 111 + 8) mod 225 = 74
    then
    (31 * 74 + 8) mod 225 = 52
    then
    45, 53, 76, 114, 167, 10, 93, 191, 79, 207, 125, 58, ... (eventually giving each of the numbers from 0 to 224)

    Which looks fairly random at a glance, but it really isn't. LCGs are typically considered very bad generators. There are several other common algorithms that are still fast and give better quality output.
    Reply With Quote  
     

  10. #9  
    Forum Freshman
    Join Date
    Apr 2011
    Posts
    9
    Reply With Quote  
     

  11. #10  
    Forum Radioactive Isotope MagiMaster's Avatar
    Join Date
    Jul 2006
    Posts
    3,440
    Neat idea. Chaos isn't often used so directly. (It doesn't use the logistic map though.)
    Reply With Quote  
     

Bookmarks
Bookmarks
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •