All Questions
Tagged with permutation algorithm
6
questions
4
votes
3
answers
343
views
Find all sets whose index is divisible by the elements
Suppose I have such a set $S=\{3,4,5,...n+2\}, n\in \mathbb{Z}_{>\, 0} $, $a_n$ is any permutation of $S$ such that $n|a_n$, I want to know how many such $a_n$. The easy but inefficient way to do ...
3
votes
5
answers
830
views
Finding all Latin Squares of order 5
A Latin Square is a square of size n × n containing numbers 1 to n inclusive. Each number occurs once in each row and column.
An example of a 3 × 3 Latin Square is:
$$
\left(
\begin{array}{ccc}
1 &...
6
votes
4
answers
261
views
Faster way to find longest chain of inequalities
I have a list of algebraic expression, all variables are positive, some of them have a specific size relationship.
Such as:
$\frac{(a b+a c+b c)^2}{a+b+c}\leq \frac{1}{3} (a+b+c) (a b+a c+b c)\leq \...
2
votes
0
answers
60
views
How to iterate over Orbit of PermutationGroup?
Another day, another permutation group question.
I'm given a g=PermutationGroup[...], and a list l={1, 3, 3, 2, ...}. I know I ...
2
votes
1
answer
165
views
Calculating partial binary `Permutations`
I would like MMA to only calculate some of the permutations of a set. I am currently doing something along the lines of
...
1
vote
1
answer
251
views
Print all permutations containing exactly k elements
In Wolfram Mathematica, writing:
Permutations[{a, b, c, d}]
or writing:
Permutations[{a, b, c, d}, {4}]
I get:
...