Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!brl-tgr!tgr!jeff@ISI-VAXA.ARPA From: jeff@ISI-VAXA.ARPA (Jeffery A. Cavallaro) Newsgroups: net.unix-wizards Subject: RANDOM NUMBER GENERATORS Message-ID: <1837@brl-tgr.ARPA> Date: Tue, 1-Oct-85 17:11:04 EDT Article-I.D.: brl-tgr.1837 Posted: Tue Oct 1 17:11:04 1985 Date-Received: Thu, 3-Oct-85 06:30:18 EDT Sender: news@brl-tgr.ARPA Lines: 33 (I have never really worked on an application that required the use of a random number generator. In addition, I know little about random number generation theory. Thus, the following questions may seem a little elementary to some out there...) Upon playing with (s)random(3), I noticed that the same seed produces the same sequence. I guess this is what is meant by "pseudo-random". The following points struck me: 1. What good is a random number generator when you have to generate a random seed to begin with. Now, I realize that the seed generation is usually off of system time, or PIDs, or some such constantly increasing number, but this seems to lead to a dilemma: 2. Numbers such as PIDs repeat relatively frequently, especially on machines that tend to reboot. In the case of a "server-type" process, it may not vary at all. 3. Numbers such as system-time, which theoretically NEVER repeat may never regenerate the same sequence. Now, if one wants to try and simulate reality, such as the shuffling of a card deck, what is one to do. PIDs will repeat to often, whereas system time may not repeat at all. Not repeating at all may or may not be appropriate for various physical simulations. Are (1), (2), and (3) wrong, am I totally out to lunch, do I have a point, are there any good references??? Jeff Brought to you by Super Global Mega Corp .com