I'm just trying to write a little algorithm. I've got nine objects, so there's 9! permutations. My question is, is there a way of turning a number from 1 to 9! into a permutation?
for example, f(1)=[1,2,3,4,5,6,7,8,9], f(2)=[1,2,3,4,5,6,7,9,8] or something similar.
Each number should have a unique ordering, and vice versa.
I know it's possible to write out everything into an array, but that's very memory taxing. Is there a simpler way of doing it?