# Questions tagged [permutation]

For questions about the functionality related to permutations in Mathematica.

171 questions
Filter by
Sorted by
Tagged with
0answers
36 views

### “PermutationReplace[1,#1] cannot be used as a part specification” [on hold]

I am looking for all permutations of the standard coordinates on $\mathbb{R}^7$ that leave the 3-form $\varphi=dx_1 \wedge dx_2 \wedge dx_3 + \dots$ (this is a form with stabiliser $G_2$) unchanged. ...
3answers
79 views

### Replacement rule with all possible permutations

I have a list with expressions like {1,3,5,a,c,b,3,d} I want to generate all outputs with permutations of {a,b,c,d}, so for example a rule like ...
1answer
35 views

### Independent permutation symmetry of a tensor [Using TensorSymmetry command]

Suppose I have this tensor $A_{ijkl} = \epsilon_{ik} \epsilon_{jl}+\epsilon_{il} \epsilon_{jk}$. Now I want to find all the independent permutation symmetries of the indices of this tensor. The answer ...
3answers
65 views

### More general permutation of lists

For some arbitrary $N$, I would like to construct all permutations of lists of length $n \leq N$ such that the sum of each permutation list adds to a value less than or equal to $N$. Specifically, ...
1answer
31 views

### $2+2+\dots+2$ cycle conjugation classes of the symmetric group $S_n$

Command GroupElements[SymmetricGroup] gives me all cycles of all conjugation classes. But I'm only interested in the 2+2 class ($2+2$ being one of the integer ...
2answers
206 views

### Find permutation with highest organization number (OEIS A047838)

EDIT: It turns out I misunderstood the definition of "organization number", so the below is incorrect. However, for every permutation I create with my definition of "organization number", I can show ...
1answer
51 views

### How to generate all the combinations with repetition?

I have $K$ variables. Each variable can take any value form a set with $N$ elements. We have $N^K$ possible solutions (permutations with repetition, when at each time slot we can choose among $N$ ...
1answer
40 views

2answers
327 views

### Terse Method to Swap Lowest for Highest?

I have built a solution to swap the lowest values with the highest values in a list. With ...
0answers
39 views

### Permute using symmetric vs alternating groups

Why does this happen? Permute[{0, 0, 0}, SymmetricGroup] (* {{0, 0, 0}} *) Permute[{0, 0, 0}, AlternatingGroup] (* {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}} *)
1answer
48 views

2answers
332 views

### How to represent a product of cycles in matrix form?

I have a permutation a in a product of disjoint cycles form as follows $a = {{(1,9,3,7)(2,11,6)(4,8,5,10)}}$ I want to represent it in a matrix form ...
1answer
47 views

### Generating a new list according to the values of the elements of a list

I want to use the command Permute to arrange the rows of a matrix. What I am looking to do is given a list I want to generate a new list which gives me the positions of the elements of the first list ...
0answers
143 views

### Sum over multiindex

I would like to calculate a sum over some multi-indices, that follow a specific pattern. $$\sum\limits_{1\le i_1<i_2<...<i_k\le N} A(k,i_1, i_2, ..., i_k).$$ $A$ is a fix expression of the ...
0answers
334 views

### How do I iterate through all permutations of a list? [closed]

I need to generate all permutation of a list of integers, but doing so (the list has around 60 elements, is not practical. Is there a way to iterate through all permutations of a list, without first ...
1answer
55 views

### Given a data set, how to do the following

Please help in executing the following problem in Mathematica: I have the following set:$A=\{1, 2,3,4,5,6,7,8,9,10\}$ (my actual data has more than 10 points). I need to do the following three steps: ...
1answer
48 views

0answers
63 views

### Permutations of times that an element appear in a list [duplicate]

I have a list: lis={{a,b},{b,b},{a,a}} This could be a list of types of something, 3 types: the type {a,b}, the type {b,b} and the type {a,a}.Then, I have ten ...
1answer
55 views

### Permute a list of elements given a pattern

I have this function f and a pattern pattern = f[h[x]]f[h[y]] where h is a generic ...
1answer
170 views