Say I want the first N numbers generated by PRNG to be some list [n1, n2, n3, n1, nx...]
. Is there any way to accomplish this (basically find the appropriate seed for the PRNG?) in some efficient manor, short of bruteforcing it?
1 Answer
$\begingroup$
$\endgroup$
What's the point? If you have a random number generator g
, you can write your own random number generator h
that returns n1,n2,...
for the first N
calls and thereafter returns the same as g
.
But to answer your question: if the PRNG is any good, then you will have to brute-force it, which will be impractical if N
is more than about four or five.