Brined PRNG State Cycles for Parallel Statistical Independence
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing pseudorandom number generators, such as Java's SplittableRandom, have limitations including a small state space, limited period, and statistical weaknesses, which can lead to undesirable correlations between parallelly generated sequences, especially when used in multi-threaded environments or with shared resources.
Innovation Solution
The proposed solution combines a linear congruential generator with an xorshift generator and a mixing function, using a novel approach to ensure distinct state cycles by employing a 'brine' value that combines a unique index and pseudorandom salt, thereby guaranteeing statistical independence across multiple generators.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If multiple pseudorandom number generators are run in parallel using existing algorithms, then productivity is improved, but statistical independence deteriorates due to correlations between sequences
Solution Approach 1:
The patent segments the state space of the pseudorandom number generator into multiple distinct cycles by using different additive parameters for different generators. Each generator operates on its own segment of the state space, ensuring that parallel generators do not interfere with each other's statistical properties while maintaining high generation speed.
Solution Approach 2:
The patent changes the additive parameter of the linear congruential generator based on a brine value that is specific to each generator instance. This parameter change ensures that each parallel generator operates with distinct parameters, guaranteeing statistical independence while allowing all generators to run at full speed simultaneously.
2Reliability
If the state space of pseudorandom number generators is increased, then statistical properties are improved, but device complexity increases
Solution Approach 1:
The patent uses a universal mixing function (such as MurmurHash3 or Stafford variants) that can effectively process various input state configurations. This mixing function serves multiple purposes: it combines the outputs of different generator components, ensures good statistical properties, and works efficiently across different state space sizes, thereby reducing the need for excessively large state spaces.
Solution Approach 2:
The patent combines multiple simpler generator components (linear congruential generator with xorshift generator) to create a composite pseudorandom number generator. This composite structure achieves superior statistical properties without requiring a single large state space, as each component contributes to the overall quality while maintaining manageable individual state requirements.
3Reliability
If distinct additive parameters are used for linear congruential generators, then statistical independence is improved, but manufacturing precision requirements increase
Solution Approach 1:
The patent introduces a brine value as an intermediary that determines the additive parameter. Instead of directly selecting complex additive parameters, the system uses a simpler brine value (which can be derived from a seed or index) to compute the additive parameter through a deterministic process. This intermediary simplifies the parameter selection process while ensuring distinctness across different generator instances.
Data Source
Figure 1
Figure 2
Figure 3
AI summary
Embodiments comprise construction of a collection of pseudorandom number generators (PRNGs), with either a known or unknown cardinality, using unique brine values that comprise a salt value for the collection and also different index values for each PRNG for the collection. The additive parameters of such PRNGs are based on the respective brine values of the PRNGs, thereby ensuring that the PRNGs in the collection have different state cycles. Embodiments make it likely that PRNGs from different collections have distinct additive parameters by choosing a pseudorandom salt value for each collection. According to embodiments, a stream of generators in a collection is created by a spliterator that carries a salt value for the collection and combines the salt value with index values for the generators to produce brined additive parameters for the PRNGs in the stream. According to embodiments, such a stream may be executed by multiple threads in parallel.