home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!sdd.hp.com!usc!orion.oac.uci.edu!network.ucsd.edu!sdcc12!cs!whart
- From: whart@cs.ucsd.edu (Bill Hart)
- Newsgroups: sci.math.stat
- Subject: Generating a set of random bits
- Message-ID: <36984@sdcc12.ucsd.edu>
- Date: 18 Aug 92 22:46:06 GMT
- Sender: news@sdcc12.ucsd.edu
- Lines: 14
- Nntp-Posting-Host: roland.ucsd.edu
-
- I have an application for which I need to generate a random 'vector' of
- bits of length N. I have looked at stuff in Numerical Recipies for
- generating a random sequence of bits, but it remains unclear whether
- such a generator would be appropriate for generating a random
- vector of bits.
-
- I need/want to have the distribution of vectors remain 'random'. Right
- now I'm generating a random float in [0,1> and testing to see
- if it is less than 0.5 or not. This works, but I'm sure there is
- a better way of doing this.
-
- Any ideas or pointers?
-
- --Bill
-