# Comparing elements of sets

Let $a_1, a_2, a_3, a_4$ be real numbers.

Consider the following sets

$$\mathcal{U}_1\equiv \{-a_1, a_1, -a_2, a_2, 0, \infty, -\infty\}$$ $$\mathcal{U}_2\equiv \{-a_3, a_3, -a_4, a_4, 0, \infty, -\infty\}$$ $$\mathcal{U}_3\equiv \{(a_3-a_1), (a_4-a_2), \infty, (-a_3+a_1), (-a_4+a_2), -\infty, 0\}$$ $$\mathcal{U}\equiv \mathcal{U}_1\times \mathcal{U}_2\times \mathcal{U}_3$$ where $\times$ denotes the Cartesian product. $\mathcal{U}_1, \mathcal{U}_2, \mathcal{U}_3$ have cardinality $7$.

Let $u\equiv (u_1, u_2, u_3)$ denote a generic element (triplet) of $\mathcal{U}$ with $u_1\in \mathcal{U}_1$, $u_2\in \mathcal{U}_2$, $u_3\in \mathcal{U}_3$.

Take any pair of triplets $u, u'\in \mathcal{U}$. In what follows $u\leq u'$ means that $u_{1}\leq u'_1$,$u_{2}\leq u'_2$,$u_{3}\leq u'_3$.

Take any triplet $u\in \mathcal{U}$. In what follows, $(i_{u_1}, j_{u_2}, h_{u_3})$ denote the position of $u_1, u_2, u_3$ respectively in $\mathcal{U}_1, \mathcal{U}_2, \mathcal{U}_3$ For example, suppose $u\equiv (a_1, a_4, 0)$; then, $(i_{u_1}, j_{u_2}, h_{u_3})=(2,4,7)$.

Fix $a\equiv (a_1, a_2, a_3, a_4)\in \mathbb{R}^4$. Consider the following two matrices

1) $D(a)$ listing $(i_{u_1}, j_{u_2}, h_{u_3}),(i_{u'_1}, j_{u'_2}, h_{u'_3})$ $\forall u, u'\in \mathcal{U}$ such that $u\leq u'$

1) $E(a)$ listing $(i_{u_1}, j_{u_2}, h_{u_3}),(i_{u'_1}, j_{u'_2}, h_{u'_3})$ $\forall u, u'\in \mathcal{U}$ such that $u\geq u'$.

[Remark: when $u=u'$ then $(i_{u_1}, j_{u_2}, h_{u_3}),(i_{u'_1}, j_{u'_2}, h_{u'_3})$ appear in $D(a)$ and $E(a)$]

Question: Take any $\tilde{a}\in \mathbb{R}^4$ with $a\neq \tilde{a}$. I want to find some sufficient (and possibly also necessary) conditions such that $D(a)=D(\tilde{a})$ and $E(a)=E(\tilde{a})$.

My thoughts After many attempts I realised the following: Take $a\equiv (a_1, a_2, a_3, a_4)\in \mathbb{R}^4$ and suppose $a$ is such that $$(\star) \begin{cases} -\infty< a_1= -a_2<0< a_2= -a_1<\infty\\ -\infty< -a_4< a_3<0< -a_3< a_4<\infty\\ -\infty< a_2-a_4< a_1-a_3<0< a_3-a_1< a_4-a_2<\infty\\ \end{cases}$$ Then, every $\tilde{a}\equiv (\tilde{a}_1, \tilde{a}_2, \tilde{a}_3, \tilde{a}_4)\in \mathbb{R}^4$ such that $$\begin{cases} -\infty< \tilde{a}_1= -\tilde{a}_2<0< \tilde{a}_2= -\tilde{a}_1<\infty\\ -\infty< -\tilde{a}_4< \tilde{a}_3<0< -\tilde{a}_3< \tilde{a}_4<\infty\\ -\infty< \tilde{a}_2-\tilde{a}_4< \tilde{a}_1-\tilde{a}_3<0< \tilde{a}_3-\tilde{a}_1< \tilde{a}_4-\tilde{a}_2<\infty\\ \end{cases}$$ will have $D(a)=D(\tilde{a})$ and $E(a)=E(\tilde{a})$. This can be generalised to any ordering of $a$ in $(\star)$: if $\tilde{a}$ respects the same ordering as $a$, then $D(a)=D(\tilde{a})$ and $E(a)=E(\tilde{a})$.

Is this correct? Can you think of other sufficient conditions? Can I get some sufficient and necessary conditions?

• If $V_1,V_2,V_3$ have cardinality 7, then $V$ doesn't. – Gerry Myerson Aug 2 '18 at 12:41
• Yes, sorry, my mistake – TEX Aug 2 '18 at 12:45
• If you mean to imply that the position of the elements matter when you write down a list, then curly brackets are not appropriate and what you should consider are tuples (with brackets (...)). Also is the fact that you have an algorithm really relevant to the question? If not then you shouldn't even mention it, that's misleading. – Arnaud Mortier Aug 9 '18 at 8:31
• Thanks: 1) algorithm: deleted; 2) curly brackets: are you referring to the big curly brackets at the end? Those are just to highlight that all the inequalities should hold at the same time – TEX Aug 9 '18 at 14:58