# Questions tagged [permutation]

For questions about the functionality related to permutations in Mathematica.

235 questions
Filter by
Sorted by
Tagged with
93 views

### How to convert a PermutationGroup to a named group

We can convert any built-in named group into PermutationGroup by this code(such as AlternatingGroup): ...
1 vote
65 views

### Find Max Instance Over Permutations

I would like to find the maximum of some objective function over all possible permutations ...
307 views

### Is there a function to generate “subsets” allowing duplicates?

I allow them to be chosen more than once (e.g. allow {1,1}). (A subset means every element is chosen once or less) Also I neglect the order (e.g. ...
89 views

### How to find the cycle type vector of a random permutation

Given a random permutation $\pi$ of {1,2,...,n}, I want to produce a list {a1,a2,...,an} of nonnegative integers so that ai is the number of cycles in $\pi$ of length i for each i=1,2,...,n. For ...
52 views

### Range permutations, treating given runs of consecutive element as they were identical

Given a positive integer $n$ and a list of disjoint intervals in the form $\{\{i_1,i_1+1,i_1+2,\ldots,i_1+n_1\},\{i_2,i_2+1,i_2+2,\ldots i_2+n_2\},\ldots\}$ all contained in $[1,n]$, I want to ...
230 views

1 vote
52 views

### How do I generate a random permutation of a (long [millions-length]) list of symbols? [closed]

I have a list of length twelve: p = {t[1, 1], t[1, 2], t[1, 3], t[1, 4], t[2, 2], t[2, 3], t[2, 4], t[1, 5], t[3, 3], t[3, 4], t[1, 6], t[4, 4]} and a set of ...
99 views

### How to get the complete list of subsets the pairwise intersections of which are empty

Given the list Range. I want to get the sublists of length 2 where each element has length 2 and the pairwise intersections are empty. So I am looking for: ...
55 views

### Unknown statistical function - groupings of permutations

Please bear with the vagueness of this question's title, as my question itself has to deal with the fact that I don't know what to call the operation I'm looking for. I have a statistical operation ...
100 views

### Permuting elements in a nested list according to another nested list?

I have two lists (value and label). With the function Permute, I can permute the positions ...
131 views

### Fast enumeration of all perfect matchings in complete graph

I have a code that generates the list with all possible Perfect Matchings (PM) of a fully connected graph. Each edge of the graph is mono or bi-colored with up to ...
334 views