# Questions tagged [permutation]

For questions about the functionality related to permutations in Mathematica.

271 questions
Filter by
Sorted by
Tagged with
148 views

### Find permutation that satisfies conditions

Suppose you what to find a permutation of integers {1, 2, ..., 13} that satisfy some rules. Rules can be found in variable rules....
• 18.7k
86 views

### Pattern Matching and Permutations

I am working with some math students on some problems involving permutations. My Mathematica knowledge is limited and I'm hoping to get some help. Two sample problems: a)how many ways can the ...
• 3,780
1 vote
117 views

### How to determine if two colorings of a graph are the same?

A coloring of a graph $G$ with vertex set $V$ is the partitioning of $V$ into so-called color classes so that no two vertices of the same class are adjacent. A $k$-coloring contains exactly $k$ color ...
• 2,039
172 views

### Replacing the heads of an expression in left to right order

I would like to replace the occurrences of the head f in an expression. The expression only contains two possible heads: f and g. These heads are applied to exactly two arguments. Example: ...
• 1,688
81 views

### Problem with permutations

For a given binary array like {0, 1, 1, 0,..}, I need to find the shortest permutation, sorting it in standard order ...
• 1,699
58 views

### Permute subsystems of a matrix?

Suppose I have a matrix $M$ acts on the space $\mathbb C^4\otimes \mathbb C^2\otimes \mathbb C^4\otimes \mathbb C^3$. Is there a method to permute the 2nd subsystem of $M$ and the 4th subsystem of $M$?...
• 381
611 views

### Rearrange triple sublists

Given a set of triple lists (all contain element 9!) tripel = {{5, 10, 9}, {4, 9, 3}, {3, 9, 8}, {4, 5, 9}, {9, 10, 8}} I would ...
• 54.1k
919 views

### Shuffling two lists into each other

Given a subset s of Range[n] and two lists a and b, with ...
• 2,066
1 vote
82 views

### Value of a function over permutations of two lists

I want to do the sum (in Ising lattice gauge theory) ...
• 421
176 views

### Select a subset in the bit-strings with even 1s overlapped - thank you

Model 1 Consider the permutation list of 4-bit-strings: list = Permutations[{0, 0, 1, 1}, {4}] which outputs: {{0, 0, 1, 1}, {0, 1, 0, 1}, {0, 1, 1, 0}, {1, 0, 0, ...
• 923
261 views

• 381
1 vote
207 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$ ...
• 5,652
1 vote
127 views

• 777
150 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 ...
• 867
244 views

### Permutations with Repetition

I am working with a function of type F[a,b,c,d,e,f] that obeys the following symmetries: ...
• 151
224 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 ...
• 2,469
490 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, ...
• 451
122 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 ...
• 229