3 ms·
While reading, I was thinking about LFSR [0] with suitable properties and period. Not strictly random, although LFSRs are commonly used for generating "random"
by vardump 7y ago
While reading, I was thinking about LFSR [0] with suitable properties and period. Not strictly random, although LFSRs are commonly used for generating "random" numbers.
[0]: https://en.wikipedia.org/wiki/Linear-feedback_shift_register https://en.wikipedia.org/wiki/Linear-feedback_shift_register
- panic 7y agoWolfenstein 3D's FizzleFade uses an LFSR to visit each screen pixel exactly once in a pseudorandom order: http://fabiensanglard.net/fizzlefade/index.php http://fabiensanglard.net/fizzlefade/index.php There's an alternative FizzleFade implementation using Feistel networks: http://antirez.com/news/113 http://antirez.com/news/113 -- I think the same technique could be used here to randomly permute the index space.
- theandrewbailey 7y agoI was thinking the same. Depends on what "random" actually means. If you want to "pick one of these that you haven't already", a LFSR is great. Less so if you want truly random, or if anyone will start looking closely.
- altmind 7y agoExactly my thoughts - its wolfenstein fizzlefade or LSFR that you learn in crypto 101 that can pick all the numbers in the range randomly. "Algorithm No One Knows About" is such a condescending title...
- tripzilch 7y agoEspecially if you don't actually explain the algorithm and seemingly fail to understand its single most important requirement is that the output is in order. Not something to shuffle later, because the only advantage of this algorithm is that the output remains in order. Otherwise you use a permutation function, such as an LSFR or preferably a family of functions.