How to compare number strings in terms of both sequential order of elements and rank order of values

57 Views Asked by At

I have a problem about the order of numbers in strings. It’s hard to wrap my mind around, because it combines two different types of “order”: the position of a number in the string (first, second…last) and the rank order of a number’s value (smallest, second-smallest…largest):

Let $X$ and $Y$ be real number strings of finite length $n$: $X = x_1, x_2 ... x_j ... x_n$, $Y = y_1, y_2 ... y_j ... y_n$. Let $x_{jk}$ indicate a number in $X$ that is in position $j$ has the $k$-smallest value in $X$. That is, the first index gives the relative position of $x$ in $X$, and the second index gives the ascending rank order of $x$ in $X$. For example, if $X = (44, 5, 8)$, then $x_{13} = 44, x_{21} = 5,$ and $x_{32} = 8$.

Now, let us constrain values in $X$ and $Y$ so that $x_{j*} – x_{*j} = y_{j*} – y_{*j}$. That is, for $j = 1$, the difference between the first value in $X$ and the smallest value in $X$ equals the difference between the first value in $Y$ and the smallest value in $Y$. Likewise, for $j = 2$, the difference between the second value in $X$ and the second-smallest value in $X$, is equal to the difference between the second value in $Y$ and the second-smallest value in $Y$. And so on, up to $j = n$. It is simple to construct an example where the spacing between consecutive values is identical in $X$ and $Y$, diff$(X) = $diff$(Y)$.

My question is, given this constraint on the relationship between $X$ and $Y$, what other constraints are implied? For example, does the constraint imply diff$(X) = $diff$(Y)$ in all cases? (No: see note below.) In short, what can we deduce about such paired strings?

Note: I have found a counterexample to the example question, in which spacings differ but the constraint still applies: $X = (x_{11} = 11, x_{23} = 21, x_{32} = 14, x_{44} = 62)$ and $Y = (y_{11} = 14, y_{23} = 25, y_{32} = 18, y_{44} = 68)$; diff$(X) = (10, -7, 48),$ diff$(Y) = (11, -7, 50)$. But my approach was ad hoc.