jm + permutation   3

Sattolo's algorithm
produces a randomized permutation of a list, with exactly one cycle (which guarantees that we will reach every element of the list even though we’re traversing it in random order)
algorithms  lists  permutation  random  randomization  cycles 
5 weeks ago by jm
algorithm - Generating shuffled range using a PRNG rather than shuffling - Stack Overflow
some reasonably good answers on using an LFSR or LCG to generate a full-cycle permutation with no repeats
lfsr  lcg  algorithms  permutation  shuffling 
december 2011 by jm
Using a Feistel Network for full-cycle permutation
nice algorithm. requires that the permuted set's size be a power of 2 however - although for smaller sets you can just skip to the next output value, since they're not going to repeat
feistel-network  full-cycle  permutation  shuffling  algorithms 
december 2011 by jm

Copy this bookmark: