2

I am trying to prove the frobenius coin problem which requires me to prove the following lemma:

If $n$ and $m$ are relatively prime and $b$ is any integer, then the set of all possible values of $$nb \text{ (mod m)} \text{ will be } \{0, 1, 2, \dots, (m-1)\}$$


I have so far that the set of all values of $b \text{ (mod m)}$ for any $b$ will be $\{0, \dots, (m-1)\}$, and that

$$nb \text{ (mod m)} = [n \text{ (mod m)}\cdot b \text{ (mod m)]}\text{ (mod m)}$$

Let $n \text{ (mod m)} = p$. Then I need to prove that when the elements of the set $\{0, p, 2p, 3p, \dots, (m-1)p\}$ are reduced modulo $m$, then the result is just $$\{0, 1, 2, \dots, (m-1)\}$$ However, I am unsure how to do this. Can someone give me a hint?

1110101001
  • 4,188

5 Answers5

2

So here $n$ and $m$ are fixed relatively prime integers. We will show that as $b$ ranges from $0$ to $m-1$, the numbers $bn\bmod m$ range over all the integers from $0$ to $m-1$.

The key is that if $0\le x\lt y\le m-1$, then $xn\bmod m$ and $yn\bmod m$ are different.

Suppose to the contrary that $xn\bmod m=yn\bmod m$. Then $m$ divides $yn-xn$, that is, $m$ divides $(y-x)m$, But since $m$ and $n$ are relatively prime, we must have $m$ divides $y-x$. This is impossible, since $1\le y-x\le m-1$.

Since the values taken on by $bn\bmod m$ as $b$ ranges over the numbers from $0$ to $m-1$ are all different, and all between $0$ and $m-1$, they must be all the numbers from $0$ to $m-1$.

André Nicolas
  • 507,029
1

Because $(n,m)=1$ we know by the Euclidean algorithm that there exist integers $x,y$ such that $mx+ny=1$

But then if we look at the set of residue classes modulo $m$, $R_m=\{[0],[1],[2],\ldots, [m-1]\}$ more commonly denoted $\{0,1,2,\ldots, m-1\}$, we see that

$$\begin{cases} f: R_m\to R_m \\ s\mapsto ns\pmod m\end{cases}$$

is a function.

The function

$$\begin{cases} g:R_m\to R_m \\ s\mapsto ys\pmod m\end{cases}$$

is verified to be the inverse function to $f$, since $ny\equiv 1\mod m$, hence $f$ is a permutation of the residue classes by definition. But a permutation is a bijection, that is a $1$-$1$ and onto function, so that the image is all of $R_m$, i.e. the set of values of $[ns]$ (which is the image of the function by definition of $f$) is all of $R_m$.

Adam Hughes
  • 36,777
  • I don't quite understand... could you please break down the mathematical notation into words? – 1110101001 Jul 17 '14 at 22:01
  • Can you specify which parts you don't understand? – Adam Hughes Jul 17 '14 at 22:02
  • I got that $f$ and $g$ are inverse functions but how does that prove that elements in $f$ are a permutation of those in $g$? – 1110101001 Jul 17 '14 at 22:18
  • @user2612743 see the last paragraph in my answer again. I've edited it to make it more explicit. Also, it's not that $f$ is a permutation of $g$, it is a permutation of the set $R_m$. – Adam Hughes Jul 17 '14 at 22:20
1

Consider the ring $\mathbb{Z}_m$, then as hcf$(n,m) = 1$, $n$ is invertible and in particular the map

$$ f: \mathbb{Z}_m \to \mathbb{Z}_m $$ given by $$ f(b) = nb $$ is an invertible ring homomorphism, so ker$f = 0$ and so im$f = \mathbb{Z}_m$ by counting the size of the domain and range of $f$.

So the set of all possible values of $nb$ (mod $m$) will be ${0,1,2,…,(m−1)}$

0

Suppose that the result is not true - so that $$\{nb \mod m : b\in \{0,\ldots m-1\}\}\ne\{0,\ldots m-1\}$$Then in particular we must have $b_1\ne b_2 \in \{0,\ldots m-1\}$ such that $$nb_1 \equiv nb_2 \mod m$$

Can you use this to get a contradiction?

Mathmo123
  • 23,018
0

By Euclid, $\,(m,n)=1,\ m\mid nx\,\Rightarrow\, m\mid x,\,$ i.e. $\,nx\equiv 0\,\Rightarrow x\equiv 0\,$ in $\,\Bbb Z/m,$

i.e. the linear map $\,x\mapsto nx\,$ has trivial kernel, thus it is $\,\color{#c00}1$-$\color{#c00}1\,$ on $\,\Bbb Z/m.$

But $\,\Bbb Z/m\,$ is finite, thus, by $\rm\color{#c00}{pigeonhole}$, the map is $\color{#c00}{\rm onto}$, proving the claim.

Bill Dubuque
  • 272,048