Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re^2: Random 1-1 mapping

by tomazos (Deacon)
on May 28, 2006 at 19:06 UTC ( #552206=note: print w/replies, xml ) Need Help??

in reply to Re: Random 1-1 mapping
in thread Random 1-1 mapping

I've possibly been confusing with the use of the word iterate. The list is actually directly accessible. I can access element x cheaply and statelessly - the records are fixed sized and contiguous.

I just want to walk this list in a well-defined, reproducible, random-order.

I think multiplying by a prime and then dividing by the maximum has something to do with producing the 1-1 mapping (was it RSA or abstract algebra / group/ring theory - I'm too old for this sh*t).


Replies are listed 'Best First'.
Re^3: Random 1-1 mapping
by QM (Parson) on May 28, 2006 at 19:56 UTC
    1) Did this code/idea help you?

    2) You need an offset if zero is involved.

    3) Yes, multiplying by a prime mod some other prime will do what you want. There are probably several other configurations that will do the same, and some will be better than what I've given. There are numerous approaches, rules, tests, and other info that you can dig up. I'd start with Mathworld or Wikipedia.

    Quantum Mechanics: The dreams stuff is made of

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://552206]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (2)
As of 2023-06-10 07:46 GMT
Find Nodes?
    Voting Booth?
    How often do you go to conferences?

    Results (37 votes). Check out past polls.