Is there a function
permute(size, seed, i) -> j that runs in constant time that computes a pseudorandom permutation? In other words,
[permute(size, seed, 0), permute(size, seed, 1), ..., permute(size, seed, size - 1)] should be a pseudorandom shuffle of the numbers
[0, 1, ..., size - 1] A linear congruential generator is close to workable (I don't need strong randomness guarantees for my application), but I want an algorithm that works for any size, and there needs to be a way to incorporate the seed.