Linked Questions
10 questions linked to/from Finding the n-th lexicographic permutation of a string
2
votes
1
answer
2k
views
Finding position of specific permutation in alphabetically ordered list of permutations on elements {1,2, ... , k} [duplicate]
I have to create two algorithms (but I think it is more of a combinatorics question).
Let there be list of permutations on elements $\{1,2,...,k\}, k \in N$ and this list is alphabetically ordered (...
1
vote
1
answer
97
views
Converting a number to base-N string. [duplicate]
I'm not sure if the title is the correct description.
What I want to do is basically like this:
For example, if I have a binary sequence of 3-bits, I can have the following permutations:
1 -> [0,0,0]
...
0
votes
0
answers
20
views
Given all permutations of a set with n elements and the mth permutation, find m [duplicate]
For example, if I have a set of all permutations of the set {1, 2, 3, 4} and the permutation 1, 4, 3, 2 how do i calculate which element of the set it is without calculating all the permutations?
5
votes
2
answers
574
views
Computing the $n^{\textrm{th}}$ permutation of bits.
I've seen this post about the $n^{\textrm{th}}$ permutation of a set but that is not what I need. If you have a bit string (ones and zeros only) there are algorithms to quickly permute the NEXT ...
3
votes
1
answer
834
views
Finding nth permutation in dictionary order with repeats
Given a set of symbols (e.g. $(A, A, B, B, B, C, D, D)$), calculate the nth permutation sorted in alphabetical order. I know how to do this with a set of symbols containing no repeats, but I can't ...
2
votes
1
answer
338
views
Fastest way to find the i-th element of the n-th permutation of a sequence
Let say I have a sequence [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] and I want to retrieve the 4th element of the 1,000,000th permutation of this list.
I know how to compute the 1,000,000th permutation of the ...
1
vote
1
answer
498
views
Nth pemutation of Lexicographic String
Can someone please explain the logic behind the mathematical equation, that for finding the Nth Lexicographic rank of a string the Leading Entry is $a_q$ if $k=q\cdot (n!)+r.$
The link to the problem ...
6
votes
1
answer
108
views
Combinatorics and ID
I am working on a project and this is a mathematical issue I have encountered. Combinatorics is not my strong point so some help would be most welcome.
The idea is you have 81 elements to pick from ...
0
votes
0
answers
207
views
Find n-th permutation in reverse order
Problem:
If we have a set of letter: {A,D,E,I,K,M,O,T}. Problem is to find which permutation is "METODIKA". alphabetically (lexicographic order)
Solution is to see that if we write first letter A we ...
0
votes
1
answer
123
views
Figuring out a sequence/pattern of numbers
Let's assume that we have a number sequence which starts as
1# -1 2 3 4 5 6 7 8 9
2# -1 2 3 4 5 6 7 9 8
3# -1 2 3 4 5 6 8 7 9
n# -9 8 7 6 5 4 3 2 1
There could ...