
Is Pi a Good Random Number Generator?
Introduction
As someone who works with large combinatorial structures and relies on pseudorandom number generators (PRNGs) for simulations, I often wonder about the quality of the random numbers generated. Many commercially available PRNGs have known defects, which has led me to consider using the digits of pi as an alternative. But do the digits of pi make good random numbers? Some colleagues have expressed concerns about using pi in this way, citing an article that suggests the digits of pi are not truly random. I'd like to explore the pros and cons of using the digits of pi as a random number generator.
The Digit of Pi
The digit of pi is often referred to as the infinite, non-repeating decimal expansion of pi (π). This means that the digits of pi go on forever without repeating, making it a potentially interesting choice for a random number generator.
Known Patterns in the Digit of Pi
There are, in fact, some known patterns in the digits of pi. For example, it has been proven that the irrationality measure of pi is less than 8, which implies that there exists a finite bound on the number of consecutive bits that are all zero. However, these patterns are relatively rare and would not significantly affect the quality of the random numbers generated.
Computational Complexity
Computing additional digits of pi can become computationally expensive, especially using the spigot algorithm based on the Bailey-Borwein-Plouffe formula. However, this is not a significant issue for most practical applications, as the computational complexity of the algorithm increases quasi-linearly with the number of digits sought.
Predictability
The Bailey-Borwein-Plouffe formula, which is used to compute the digits of pi, can be seen as an indicator of predictability in the base-16 digits of pi. However, this does not necessarily imply that the digits of pi are predictable in a more general sense.