dimanche 26 février 2017

Given a Set of Random Numbers, Can You Determine the Random Seed? [duplicate]

This question already has an answer here:

Java's Random class has a constructor which can initialize a random object with a long seed parameter. After, using the Random.nextInt() method, one can generate a list of pseudorandom numbers that are always the same given the same seed. If I have a list of pseudorandom numbers with a size of 10 or more, is there enough information to go backwards and determine what seed or seeds caused this output? Assuming the list of values is in order and starts with the first integer produced by the nextInt() method, can I find out the seed that generated these random numbers?




Aucun commentaire:

Enregistrer un commentaire