How is a minimum defined on $\mathbb{Z}_n$?

55 Views Asked by At

If I have a mapping $d(x,y) = \min\{x-y, y-x\}$ where $x$ and $y$ are elements of $\mathbb{Z}_n$, how is this defined? For example, in $\mathbb{Z}_{6}$, $d(0,2) = \min\{-2, 2\}$. Since $-2 \equiv 4 \mod6$ I feel intuitively that the minimum should be considered to be $2$, but I'm not sure is this implicit in the definition of minimum, or do I have to define minimum to mean this separately somehow?

1

There are 1 best solutions below

2
On BEST ANSWER

Think of the elements $0,1,...,n-1$ of $\mathbb{Z}_n$ as consecutive vertices of a regular $n$-gon.

Then the distance, as defined, is just the graph-theoretic distance, i.e., the least number of edges for a path between the two vertices.

In particular, in $\mathbb{Z}_6$, $d(0,2)$ equals $2$, not $4$.

The definition can be recast as $$ d(x,y)=\min\{(x-y)\;\text{mod}\;n,\;(y-x)\;\text{mod}\;n) \;\;\;\;\; $$ In particular, for $x,y\in\{0,1,...,n-1\}$, we get $$ d(x,y)= \begin{cases} 0&\text{if}\;x=y\\[4pt] \min\{(x-y),\; n-(x-y)\}&\text{if}\;x>y\\[4pt] \min\{(y-x),\; n-(y-x)\}&\text{if}\;y>x\\[4pt] \end{cases} $$