J
jason
Hello everyone,
I am looking for an algorithm that would take an incremental value and
map that to a case-inspecific alphanumeric string. However,
I don't want the string to simply step through 0000, 0001 ... ZZZZ. I
would ideally like the value to appear to jump around randomly, but
still be traced back to an incrementing value. So, for example, while a
simple standard mapping might look like:
foo(1) => 0000
foo(2) => 0001
....
foo(1679616) => ZZZZ
I would prefer a psuedo-random mapping, which might look like:
foo(1) => AF23
foo(2) => 4PQT
....
foo(1679616) => 0FZ1
But still guaranteeing that all values are iterated through uniquely,
like in the simple mapping above. The only thing that is coming to mind
to use for this to generate a predictable, psuedo-random order of the
range of integers, and step through that order as the incrementing
value? That doesn't seem like the most efficient algorithm though.
Any guidance is greatly appreciated.
jason
I am looking for an algorithm that would take an incremental value and
map that to a case-inspecific alphanumeric string. However,
I don't want the string to simply step through 0000, 0001 ... ZZZZ. I
would ideally like the value to appear to jump around randomly, but
still be traced back to an incrementing value. So, for example, while a
simple standard mapping might look like:
foo(1) => 0000
foo(2) => 0001
....
foo(1679616) => ZZZZ
I would prefer a psuedo-random mapping, which might look like:
foo(1) => AF23
foo(2) => 4PQT
....
foo(1679616) => 0FZ1
But still guaranteeing that all values are iterated through uniquely,
like in the simple mapping above. The only thing that is coming to mind
to use for this to generate a predictable, psuedo-random order of the
range of integers, and step through that order as the incrementing
value? That doesn't seem like the most efficient algorithm though.
Any guidance is greatly appreciated.
jason