# Tagged Questions

For questions about the functionality related to permutations in Mathematica.

689 views

### How to represent a list as a cycle

I want to select distinct cycles (represented by List). The cycle {a, b, c, d} must be the same as {b, c, d, a} or ...
877 views

### Permutations[Range[12]] produces an error instead of a list

This input: Permutations[Range[12]] Results in this (error) output: ...
2k views

### How to remove repeated permutations?

I want to get the Permutations on the elements of a list. Then I'm doing this: ...
440 views

### Find all permutations with a condition

How can I find all the permutations of {a, b, c} where a + b + c = n? For instance: if n = 3...
218 views

### Set conditions at a permutation

I need to find all permutations of 3 elements from {a,b,c,d,e} with this condition: These must include element d maximum once, ...
461 views

I would like to find a permutation of $\quad S=\{\frac{1}{10}, \frac{1}{2}, \frac{4}{7}, \frac{3}{5}, \frac{2}{3} \}\quad$ that maximizes the sum of theses elements raised to unique powers: $\;\{0,1,2,... 3answers 214 views ### Permutations on elements a>b && b>c A={1, 2, 3, 4, 5} Permutations[A, {3}] I need to print all permutations where the first number is bigger than the second and the second number is bigger than the ... 2answers 554 views ### What is the fastest way to get the nth distinct permutation of a list? What is the fastest way to write a function nthPermutation[xs_List, n_Integer] which is equivalent to Permutations[xs][[n]] but ... 3answers 390 views ### Reduce the output from tuples by including symmetry? I need all the possible 3x3 binary tensors, but I'd like to have this account for symmetries. I've started by using the Tuples command. Tuples[{1, 0}, {3, 3}] ... 1answer 309 views ### Using Compile to speed up Function with PermutationProduct [closed] I have the following fairly simple routine dot involving PermutationProduct that I wish to speed up using ... 1answer 92 views ### A few tuples at a time? I want to generate$n$by$n$binary arrays, and then reduce the output from those arrays by performing a number of permutations and eliminating duplicates. The problem is that the number of arrays ... 1answer 2k views ### How to apply a permutation to a symmetric square matrix? Given a symmetric square matrix, how can I apply a permutation to the rows and columns (i.e. the same permutation to both the rows and the columns) such a way that the new structure of the matrix ... 4answers 232 views ### Sort two lists at the same time, based on another I am new to using Mathematica and I can not find a solution to what I am wanting to do. I want to take a list such as: x = {1,2,3,4,5,6,7,8} and a second list (... 4answers 600 views ### How can I generate permutations of bit strings with repetition? How can I write a function which has two parameters and it should generate combination of arbitrary range bits, for example: function[n, k], with ... 2answers 249 views ### How to define even permutations correctly? I define even permutations as following, but there may be some error. I use it in two different way and get different output. ... 3answers 201 views ### Permutation count for sets with multiplicities I am able to do a permutation counr for the set {a, a, b} which gives me 3 groups. I am happy with that result. However, if the set is ... 2answers 165 views ### Generating a permutation of elements in chunks Is there a way for me to generate a list of permutations in "chunks" such that I needn't store everything on RAM all at once? Consider that (WARNING: DO NOT RUN! --- Will generate a list with 13! = ... 4answers 410 views ### Equivalent Nested Loop Structure Consider the following examples: ... 2answers 96 views ### How the solve the parameter of the conjugate permutations As we know the definition of conjugate permutations is: $$\exists p \quad p^{-1} \alpha p=\beta$$ When I have an alpha=Cycles[{{1,4},{2,5,6,3}}] and a ... 2answers 541 views ### Need to create a function to generate all permutations of Range[$n\$] [duplicate]

Basically I need a function that takes a list and gives all the possible permutations of it. The reason I can't use Permutations is that I have to apply another ...
104 views

### How to get all permutation of k-partition

If I want to get the list of k-partition, and the rule are below: here are k partitions all elements of partition are in the range of 1 to 30. the total of ...