# Questions tagged [permutation]

For questions about the functionality related to permutations in Mathematica.

262 questions
Filter by
Sorted by
Tagged with
103 views

1 vote
97 views

### Arrange 1-n^2 in n×n grid satisfy products of rows equal to products columns

For which $n\in\mathbb{N}$ is it possible to arrange $\{1,…,n^2\}$ in an $n\times n$ grid so that the set of products of columns equals the set of products of rows? I can find solution for $3\times 3$ ...
1 vote
123 views

137 views

### A code that returns the partial permutations on {1,2,...,n}

A partial permutation is a bijective partial function. A partial function is a map from a subset of {1,2,...,n} into {1,2,...,n}. I want a list of the matrix representations of all the partial ...
222 views

### Permutations with Repetition

I am working with a function of type F[a,b,c,d,e,f] that obeys the following symmetries: ...
212 views

### Permutation avoidance function

It is common for me to see if a permutation of 1,2,...,n, avoids some fixed permutation pattern. For example, the permutation [1,4,2,3,5] contains the pattern 1,3,2, as the elements [1,4,3] appear in ...
487 views

### Generating a list of integers that sums to zero

Given a pair of integers n and k, I want to generate all lists of integers of length n, ...
111 views

### Binary permutation list code in Mathematica

Given some natural number $N$, I am interested in the set of all binary permutations of length $N$ (with the intention of storing in lists depending on how many $1$'s appear in each permutation). My ...
539 views

### Visualizing distribution of 3 balls in 3 cells

I want to generate the following Table which shows the distribution of 3 balls in 3 cells. But so far I have had no luck using Permutations, ...
1 vote
35 views

### Why is PermutationProduct not yielding anything? [closed]

When I am trying to compute some products of permutations in S_48, it is somehow not working. Here is my code: ...
1 vote
163 views

### How to get the length of cycles in a Cycles[] expression? [closed]

I am looking for a way to get {5,2} for a Cycles object, like: Cycles[{{1,2,3,4,5},{6,7}}]. ...
71 views

### Finding the first few permutations of a list

Given a list, possibly with repeated elements, I am trying to get a list that consists of a specified number of distinct permutations of the list. Essentially, I want to something that works like <...
631 views

### String permutation

I have a string "abcd". Is there any way in Mathematica such that when I apply some exchange operator $P^{ab}$ it gives me string "bacd"? Edit: After reading answers I felt like I ...
116 views

### Find transformations for two non-square matrices $A$ and $B$

Given two matrices $A$ and $B$: What transformation needs to be applied to transform matrix $A$ into matrix $B$? ...
1 vote
64 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 ...
131 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: ...
60 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 ...