I'm curious if anyone has any background that could help me out.
I'm looking to construct a function, either some kind of simple polynomial, or throw it into an extension, that would cover a very simple function.
Given a range [0....N], by the max N, and the current value Z, it could be integer or irrational for my purposes, where 0 <= X <= N, and then a seed value S, you could take F(N,S,Z), which would return some chaotic mapping to another value of 0....N, one to one. Each value would map to another one, either coming full circle eventually (if it was integers) or just spiralling off, where the probability distribution was average across the map. Importantly, unlike a hash function, I need it to be reversible and deterministic. If you know Z, you should be able to calculate both F⁻¹(N,S,Z), and F(N,S,Z). Given the seed value, the mappings should be completely different from value to value. Of course, that seed could be accomplished by the same function as F(N,Z), so maybe its redundant. I also would like something that doesn't have simple cycles like "Z * 5 mod N". I'd prefer something guaranteed to map to each integer in scrambled order, or return a chaotic pattern or whatever in irrational numbers.
Maybe I'm having a brain fart here, but is there some kind of polynomial class or sinwave or something that would do this well? Or maybe I could use one of the RNG extensions, setting the seed each time. But eh, I don't think those would be one-to-one.
In simpler english, what I'm looking for is something like random(Z), where using it the first time maps to the same value the second time, and if you know the value of the second time can be used to figure out the value of the first time. So if you went F(15,1,5) = 12, F(15,1,12) = 7, F(15,1,7) = 3 , you could also by similar token just as easily go F⁻¹(15,1,3) = 7, F⁻¹(15,1,7) = 12, F⁻¹(15,1,12) = 5