Questions tagged [permutation]
For questions about the functionality related to permutations in Mathematica.
272
questions
1
vote
1
answer
93
views
Can I improve my code to extract permutation cycles from a (n,2) matrix?
I've written a routine to extract permutation cycles from a (n,2) matrix, each row giving the format $a\to b$ which represents the first two elements in some $k$ cycle. If $a\to a$, it's a $1$-cycle. ...
5
votes
1
answer
159
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....
2
votes
1
answer
93
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 ...
1
vote
2
answers
118
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 ...
3
votes
4
answers
175
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:
...
2
votes
1
answer
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 ...
0
votes
1
answer
62
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$?...
7
votes
9
answers
613
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 ...
9
votes
9
answers
928
views
Shuffling two lists into each other
Given a subset s of Range[n] and two lists a and b, with ...
1
vote
1
answer
84
views
Value of a function over permutations of two lists
I want to do the sum (in Ising lattice gauge theory)
...
3
votes
2
answers
177
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, ...
3
votes
1
answer
279
views
Thermodynamics of the 2D Ising model
I want to study the thermodynamics of the 2D Nearest Neighbour Ising model (calculate the average energy, susceptibility, etc.). I have the Hamiltonian
$$\mathcal{H} = J\sum_{\langle i j \rangle} s_i ...
4
votes
4
answers
259
views
How to confirm two sets contain the same vectors in any order?
Say if I have two sets of vectors, for example:
$$v_{1}=((0,0,0),(0,1,0),(0,0,1),(1,1,1))$$
$$v_{2}=((0,1,0),(1,1,1),(0,0,0),(0,0,1))$$
I want to find a way of verifying that both $v_{1}$ and $v_{2}$ ...
1
vote
1
answer
93
views
Elements of a group that send one element to another
If I have a permutation group, say $S_{10}$, how do I get all the permutations that send the set {1, 2, 3} to {5, 6, 7}? I know ...
4
votes
3
answers
210
views
How to list all subgroups of symmetry group S_6?
I learned from https://oeis.org/A005432 that $S_6$ has $1455$ subgroups, how can I list them all in mathematica?
As the comment says, the direct approach cannot solve the problem.