home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!vtserf!creatures!csgrad.cs.vt.edu!lavinus
- From: lavinus@csgrad.cs.vt.edu (Joseph Lavinus)
- Newsgroups: comp.programming
- Subject: Re: Any simple Random Number generators?
- Message-ID: <3283@creatures.cs.vt.edu>
- Date: 14 Aug 92 14:28:43 GMT
- References: <13AUG199218224504@judy.uh.edu> <1992Aug14.104121.29374@corax.udac.uu.se>
- Sender: usenet@creatures.cs.vt.edu
- Organization: VPI&SU Computer Science Department, Blacksburg, VA
- Lines: 29
-
- In article <1992Aug14.104121.29374@corax.udac.uu.se> pem@Minsk.DoCS.UU.SE (Per-Erik Martin) writes:
- >In article <13AUG199218224504@judy.uh.edu> cscc13@judy.uh.edu (NAVEED IQBAL) writes:
- >>I want to know how random numbers are generated.
-
- >"Random number generators: Good ones are hard to find" by Stephen K. Park
- >and Keith W. Miller in Communications of the ACM October 1988 (v31n10).
- >This article also contains a proposed "minimal standard" generator which
- >is simple but yet quite good.
-
- The article "Random Numbers for Simulation" by Pierre L'Ecuyer, from the
- October 1991 CACM (v33, page 85--97). It contains some generators that
- are allegedly better than the minimal standard, and is a good article in
- general.
-
- >>I want to get a "new" random number everytime I run the program.
-
- >You simply "seed" the generator with the system clock when the program
- >is started.
-
- Alternatively, each time the program finishes, generate one more random
- number and write it to a file. Then, seed the generator with that number
- next time you run.
-
- Joe
- --
- ______________________________________________________________________________
- Joseph W. Lavinus (2816), Virginia Tech email: lavinus@cs.vt.edu
- "Few NP-hard problems remain difficult when restricted, say,
- to the class of 1-vertex graphs." --- David S. Johnson
-