Re: [Algorithms] Generating the ith permutation of N elements
Brought to you by:
vexxed72
From: Danny K. <dr...@we...> - 2010-06-01 19:11:18
|
> I’m looking for a way to generate the ith permutation of N elements, at > approximately O(N) cost. > > > > All algorithms I’ve seen need the (i-1)th permutation in order to derive > the ith permutation from it (e.g. they work incrementally).# > As far as I know there isn't a standard order for permutations and so there isn't such a thing as 'the' i'th permutation. Am I wrong? Or are you just looking for a consistent order rather than a standard one? Danny |