Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!gem.mps.ohio-state.edu!ginosko!uunet!munnari.oz.au!csc!ccadfa!usage!basser!metro!pta!teti!teslab!andrew From: andrew@teslab.lab.OZ (Andrew Phillips 289 8712) Newsgroups: comp.sys.amiga.tech Subject: Re: Random #s (was Re: ARexx pseudo-random number generator) Summary: Excellent article on PRNG's and their testing in Amiga Transactor Keywords: random numbers Message-ID: <194@teslab.lab.OZ> Date: 27 Sep 89 08:18:28 GMT References: <19504@unix.cis.pitt.edu> <1989Sep13.032352.10321@agate.berkeley.edu> <60483@tut.cis.ohio-state.edu> Reply-To: andrew@testlab.lab.OZ Organization: Technology Evaluation Section, L.A.B., Sydney Lines: 31 There was an very well written article by David Wood on pseudo random number generators and the sorts of statistical tests that can be applied to test them in the June 1988 Amiga Transactor magazine (Vol. 1, Number 2, page 38). The disk for that issue also contained C code that implemented the tests mentioned - written for Lattice C but I have used it under Xenix with only very minor changes. The author emphasized that the more tests you can perform on the PRNG the more confident you can be that it is "good". FYI the tests were: - Frequency test / Equi-distribution test - Serial correlation - between digits - Serial correlation - between every Nth digit - Poker test - Gap test - Runs up/down test - Runs above/below mean test - Kolmogorov-Smirnov test If anyone is interested Mr Wood also gave a network address through which he might possibly be contacted: !ihnp4!killer!pollux!wood Another interesting idea that I saw in sci.crypt recently is to test a PRNG by drawing pixels on a screen. A good one will make something that looks like snow on a TV. The eye can very easily detect some patterns which are caused by a poor PRNG. BTW there was also some C source code for a "good" PRNG posted recently to sci.crypt. -- Andrew Phillips (andrew@teslab.lab.oz{.au}) Ph. +61 (Aust) 2 (Sydney) 289 8712