For questions about the functionality related to permutations in Mathematica.

learn more… | top users | synonyms

1
vote
1answer
232 views

How can I permute a multiset?

I have a multiset {1, 3, 3, 1, 2} and would like to randomly permute the classes like so: {2, 1, 1, 2, 3} or {3, 2, 2, 3, 1}, what is the simplest and most efficient way to do this? In reality the ...
8
votes
1answer
414 views

Mathematica function/package for shuffle permutations

Does anyone knows a way to compute a list of all (p,q)-shuffles in mathematica? For a definition of the shuffle permutations see for example http://ncatlab.org/nlab/show/shuffle I'm dreaming of a ...
2
votes
1answer
486 views

Adding rules to permutations

How can I calculate only those permutations of Range[n], that satisfy certain rules? I don't want to filter the result after calculating all the permutations but ...
9
votes
4answers
973 views

How to remove repeated permutations?

I want to get the Permutations on the elements of a list. Then I'm doing this: ...
10
votes
1answer
937 views

How to apply a permutation to a symmetric square matrix?

Given a symmetric square matrix, how can I apply a permutation to the rows and columns (i.e. the same permutation to both the rows and the columns) such a way that the new structure of the matrix ...
10
votes
3answers
240 views

Efficient way to turn a subset into a permutation

For an input vector $\{a_1,a_2,\ldots,a_n,b_{1},b_2,\ldots,b_{m}\}$ and a list of ordered positions $\{k_1,k_2,\ldots, k_n\}$, such that $1\leqslant k_1 < k_2 < \ldots < k_n \leqslant ...