mardi 9 juillet 2019

Random sequence generator with full coverage of interval

Can somebody suggest me a random (integer) number generation algorithm such that given an interval, it is absolutely guaranteed to cover all the given interval (i.e. o numbers are missing)? No other constraints, e.g. no uniqueness of numbers, no hypotheses on distribution etc...

The idea is the following:

myRandom(1, 4)

Outputs a sequence like:

1, 4, 3, 3, 1, 3, 1, 4, 1, 3, 2




Aucun commentaire:

Enregistrer un commentaire