|go ahead... be a heretic|
Re^2: Random 1-1 mappingby tomazos (Deacon)
|on May 28, 2006 at 18:54 UTC ( #552204=note: print w/replies, xml )||Need Help??|
Update: Your solution is cool but $max is not guaranteed to be a power of 2. In fact, it almost certainly isn't.
I just scribbled this on a piece of paper, I think I heard something about it to do with the RSA encryption algorithm once...
Example for $max = 10, $prime_number = 7 and $seed = 5..
So that works for 7 and 10. Does it work for any $max and any $prime_number? If not what conditions will it work for? I am no good with proofs.
Andrew Tomazos | email@example.com | www.tomazos.com
In Section Seekers of Perl Wisdom