permutation function

Sequence permutation according to several different models