All Questions
Tagged with permutation sorting
7
questions
4
votes
4
answers
261
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}$ ...
2
votes
1
answer
94
views
Cycle symmetric Sort for arguments of a function. Put trace in canonical order
I need a new Sort for the arguments of TR that maintains cyclicity, TR[a,b,c] = TR[b,c,a] = TR[c,a,b]
cyclicSort[TR[b,a,c]]
TR[a,c,b]
...
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 \...
16
votes
1
answer
527
views
ls Ordering[Ordering[list]] optimal?
Given a list list with unique elements, the task is to replace each element by its position in Sort[list]. For example,
...
14
votes
3
answers
386
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
...
0
votes
2
answers
177
views
1
vote
1
answer
180
views
Descending order of Permutations using Select[Tuples[{5, 4, 3, 2, 1}, {3}], OrderedQ]
I was wondering if there is a possible way to still use OrderedQ and get a descending order of permutations:
This is Ascending order:
...