How to turn a NON-strict total order into a strict total order with $R^3$ vectors?

115 Views Asked by At

I'm currently working with colored images in the RGB color space. It's trivial to find a ordering in grayscale images (each shade of gray can be though as a value and darker shades comes before than lighter shades), but the same it's not so easy in colored images since each pixel can be viewed as a $R^3$ vector (each value corresponding to a shade of RED, GREEN and BLUE respectively). So from a metric space point of view we could set the origin at the point (0,0,0) and derive NON-strict ordering by ordering each possible vector by it's length. But since (0,0,1) and (0,1,0) both have the same length it's hard to tell which one comes first. So, there's a way to turn a NON-strict ordering in $R^3$ into a strict ordering?

1

There are 1 best solutions below

0
On BEST ANSWER

The lexicographical order produces a total order on $\mathbb{R}^3$, where this order is defined by $$(a,b,c)<(a',b',c') \text{ provided that } \begin{cases}a<a' & \text{or}\\a=a' \text{ and }b<b' & \text{or} \\ a=a' \text{ and } b=b' \text{ and } c<c'. \end{cases}$$ However, this order is not compatible with the partial order you get by taking norms. For instance, $(0,1,0)>(0,0,2)$ in the lexicographical order (I got this backward in my comment) yet $|(0,1,0)|=1<2=|(0,0,2)|$.

I assume you are only working with vectors of nonnegative integers, in which case there are only finitely many vectors of any given length. So you could create a total order compatible with the norm by first ordering vectors by norm and then by the lexicographical order for vectors with the same norm. That is, the order would be defined by $$(a,b,c)<(a',b',c') \text{ provided that } \begin{cases}|(a,b,c)|<|(a',b',c')| &\text{or} \\ |(a,b,c)|=|(a',b',c')| \text{ and } a<a' & \text{or}\\|(a,b,c)|=|(a',b',c')|,a=a', \text{ and }b<b' & \text{or} \\|(a,b,c)|=|(a',b',c')|,a=a', b=b', \text{ and } c<c'. \end{cases}$$ So your order would begin $$(0,0,0)<(0,0,1)<(0,1,0)<(1,0,0)<(0,1,1)<(1,0,1)<(1,1,0)<(1,1,1)<(0,0,2)<(0,2,0)<(2,0,0)<\cdots.$$