Source: Dueling Generators
Part 1: Create a pair of generators
A
andB
where:
- A_n = 16807 A_{n-1} \mod 2147483647
- B_n = 48271 B_{n-1} \mod 2147483647
How many of the first 40 million values have matching values for the low 16 bits of each generator?
Part 1: Create a pair of generators
A
andB
where:
- A_n = 16807 A_{n-1} \mod 2147483647
- B_n = 48271 B_{n-1} \mod 2147483647
How many of the first 40 million values have matching values for the low 16 bits of each generator?