Skip to main content

All Questions

Tagged with
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}$ ...
am567's user avatar
  • 627
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] ...
Albercoc's user avatar
  • 998
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 \...
matrix42's user avatar
  • 7,138
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, ...
Roman's user avatar
  • 48.8k
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 ...
Edmund's user avatar
  • 42.4k
0 votes
2 answers
177 views

Select ordered sublists of Permutations[{p1, p2, p3, p4}, {2}]

Given: ...
Lorenz H Menke's user avatar
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: ...
Andrej's user avatar
  • 15