2

The problem is from Ex.1.17 of V.2 of Shoup's "A Computational Intro to Number Theory and Algebra" book:

Let a,b,c be positive integers satisfying: $\gcd(a,b)=1$ and $c\ge(a-1)(b-1)$. Show that there exists non-negative $s,t$ such that $c=as+bt$.

$\gcd(a,b)=1 \iff \exists s,t\in \Bbb{Z}$ s.t. $as+bt=1$

Let $c=ab-a-b+p$ where $p\gt0$

I considered: $c=ab-a-b+p=ab-a-b+p(as+bt)$

I also tried: $c=ab-a-b+p=(ab-a-b+p)(as+bt)$

and perhaps by some clever factoring into a $(aS + bT)$ form it can be shown that $S,T$ can be both non-negative for some $s,t$ satisfying $as+bt=1$

Perhaps this is not the right approach... Could any one help?


In the search for a solution online, I've found a homework+solution file reposing a similar exercise from V.1 of Shoup's book with a relaxed lower bound for $c$:

For positive integers $a,b$ s.t. $\gcd(a,b)=1$, any $c\ge ab$ could be expressed as $c=as+bt$ for some non-negative integers $s, t$. (Basically $ab$ instead of $(a-1)(b-1)$ as a lower bound for $c$)

The given solution in that pdf file is not very clear to me. It uses the smallest positive $s_1$ that satisfies $as_1 + bt=1$ (for some corresponding $t$) to construct a $c$: $c=as_1+bt_1$ and shows that $t_1\gt 0$. I don't understand how one fixed $s_1$ can be used to construct all integers $\ge ab$.

What did I miss?

KCd
  • 55,662

2 Answers2

5

With John Omielan's pointer, I've learnt that the problem is just a rephrasing of the $n=2$ case of Frobenius Coin Problem. However, I personally feel that the proof for the n=2 case described in that Wikipedia page is not too straightforward. From other more in-depth articles on the subject, I have put together a, hopefully, clearer proof:

Since $\gcd(a,b)=1$, any $c\in \Bbb{Z}$ can be expressed as $c=as+bt$ for some $s,t \in \Bbb{Z}$.

Rewrite $t$ in terms of $a$ as a division by $a$: $\quad t=ka+r\quad $ s.t. $\quad 0\le r \le (a-1)$

Sub back in: $\quad c= as + b(ka + r) = a(s+kb) + br$

Therefore any $c \in \Bbb{Z}$ can be written as $c = ax + br$ for some $x$ and $0\le r \le (a-1)$. Since both $a$ and $b$ are positive, the max value of $c$ that can be written this way with $x<0$ is: $\quad c=-a + b(a-1) = ab -a -b\quad$ ($x=-1$ and $r=a-1$)

Therefore any $c \ge ab-a-b + 1 = (a-1)(b-1)$ cannot have $x<0$.

Therefore any $c \ge (a-1)(b-1)$ can be written as $c= ax + br \quad$ for some $x\ge0$ and $0\le r\le(a-1)$.

  • Nice to see you picked it up really fast! +1 – fleablood Sep 20 '21 at 01:33
  • @fleablood: Thanks! I've also noticed that the n=2 case of Frobenius Coin Problem is actually slightly harder than this rephrased question. The Coin Problem is about finding the max integer m that CANNOT be rewritten as: m=as+bt with non-neg s, t. But the proof requested here is to show that all integers m>=(a-1)(b-1) CAN be written as m=as+bt. I believe my simple proof is only ok for the latter case. – Nibikibaba Sep 20 '21 at 02:12
1

You may refer exercise 1.16 before. It says $\{0,1,...,b-1\} \times \{0,1,...,a-1\} \to Z_{ab}$ is a bijection provided that $a,b$ are coprime. So for each $m \in Z_{ab}$, the inverse of $m$ is a unique pair $(s,t)$ such that either $sa + tb = m$ or $sa + tb = m + ab$ for positives $a,b$ and $m < ab$. If it's the left case we are done, else if $sa + tb = m + ab \geq (a-1)(b-1) + ab $ $= (b-1)a + (a-1)b + 1$, which is impossible since $s \leq b-1$ and $t \leq a - 1$.

bobi
  • 11