Quantcast
Channel: number to unique permutation mapping of a sequence containing duplicates - Stack Overflow
Viewing all articles
Browse latest Browse all 6

Answer by Mihai8 for number to unique permutation mapping of a sequence containing duplicates

$
0
0

A very simple algorithm to mapping a number for a permutation consists of n digits is

number<-digit[0]*10^(n-1)+digit[1]*10^(n-2)+...+digit[n]*10^0

You can find plenty of resources for algorithms to generate permutations. I guess you want to use this algorithm in bioinformatics. For example you can use itertools.permutations from Python.


Viewing all articles
Browse latest Browse all 6

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>