A Pseudorandom Number Generator Based on a Suggestion by John von Neumann

CSEF · 2007 Mathematics & Software

Overview

Objectives/Goals The object of my project was to test John Von Neumann#s idea for a pseudo random number generator and try to modify it to improve the pseudo random number generator. Methods/Materials Von Neumann#s idea was written into a computer program (Visual Basic 2005) and tested using the Monte Carlo method. I used a computer (PC) with the program Visual Basic 2005, several Visual Basic reference books, and The Art of Computer Programming by Donald Knuth. I wrote two different computer programs to test two properties of random numbers. Those properties are: I) A uniform distribution among the number sequence that was generated. II) The independence of numbers from other numbers (preceding numbers) in the sequence. Results The random number generator turned out to be very dependent on the initial starting seed, which often led to unevenly distributed sequences. A big problem was the pseudo random number generator#s inability to recover from the appearance of zero in the sequence. I was able to contribute to John Von Neumann#s pseudo random number generator by reducing the program#s dependence on the initial starting seed and fixing the program#s inability to recover from zero. My final program was able to calculate a good first four digits of pi (through the Monte Carlo Method). Conclusions/Discussion The Von Neumann Algorithm was able to generate relatively uniformly distributed random number sequences. But the algorithm wasn#t completely random because numbers within the sequence were dependent on preceding numbers within the sequence. The Von Neumann pseudo random number generator worked, but definitely had some flaws and I was able to fix some of those flaws.

Summary statement

To test John von Neumann's idea for a pseudo random number generator and modify it improve it.

Help received

Dad taught computer program commands, Cousin helped arrange board, Mom proofread abstract

Competition history

  • CSEF 2007 Mathematics & Software · Entry J1308

Resources

Related projects

Closest projects by meaning, across every fair and year in the corpus.

Browse more like this

Source: California Science & Engineering Fair public projects

Save projects to your library

Sign in with Google to keep track of projects you find interesting, organized into folders. An account also raises your daily allowance for “Has this been done?”, and lets you create a key for the MCP server with a much higher limit than anonymous use. Browsing stays public.

Continue with Google