0

I came across this question and I was able to solve this question with the help of the options provided in the question and the answer turned out to be $15$. But it intrigued me to find a general statement for the solutions for these kind of problems.

How can we approach a general problem like "The largest positive integer which cannot be written in the form $Am + Bn$ where $m$ and $n$ are positive integers and $A$ and $B$ are positive integers too is?" Is there a general solution statement for this problem.

I looked up on the web and stumbled upon this statement from Frobenius:

Suppose that $gcd(a,b)=1$ . Then the largest integer $k$ for which $am+bn=k$ has no non-negative integer solution $(m,n)$ occurs when $k=ab−a−b$ .

The problem is when I apply this statement into my problem where $a=5$ and $b=3$ then it gives me the answer as $7$ which is less than what I got as answer.

Can someone please clarify this for me and give an idea to approach these kind of problems?

Thanks in advance !!!

PS : Just now I noticed that my answer 15 is basically $5*3$. So can we say that for our general problem statement i.e. "The largest positive integer which cannot be written in the form $Am + Bn$ where $m$ and $n$ are positive integers and $A$ and $B$ are positive integers too is?", the answer will be $A*B$.

Mathmo123
  • 23,018
Ganit
  • 1,689
  • 3
    One difference is whether you want "positive" solutions or "non-negative" solutions. You probably want $A$ and $B$ to be relatively prime. – B. Goddard Apr 12 '21 at 10:45
  • umm...we can go for "positive" solutions and I am not sure of the conditions for $A$ and $B$. In my question they are relatively prime, but it would be interesting to know what if they are not. But for now we can stick with the relative prime condition. – Ganit Apr 12 '21 at 10:49
  • Note than $n$ can be written as a linear combination of $3$ and $5$ with nonnegative integer coefficients if and only if $n+8$ can be written as a linear combination of $3$ and $5$ with positive integer coefficients. So, if $7$ is the answer to the one problem, then $15$ is the answer to the other problem. – bof Apr 12 '21 at 12:15
  • 1
    Sounds like the coin problem. This brings back memories of an old Numberphile video. – user3733558 Apr 12 '21 at 12:55
  • @bof : I did not get you here " So, if 7 is the answer to the one problem, then 15 is the answer to the other problem." Can you please tell me for what part the answer will be 7 and 15? – Ganit Apr 12 '21 at 16:20
  • This answer in the dupe explains how to shift the solution for $,,m,n\ge 1,$ to $,m,n\ge c,,$ for any $c\ \ $ – Bill Dubuque Apr 12 '21 at 19:29
  • @Ganit The answers $15$ and $7$ are from the first and third paragraphs of your question. – bof Apr 12 '21 at 23:58

1 Answers1

1

Essentially repeating the comments:

Let $S(m, n)$ be the set of all $am + bn$ with $a, b \geq 0$. Let $S_+(m, n)$ be the set of all $am + bn$ with $a, b > 0$. Then there is a bijection $S(m, n) \to S_+(m, n)$ defined by $x \mapsto x+m+n$, since $(am + bn) + m + n = (a + 1)m + (b + 1)n$ and $a, b \geq 0$ iff $a+1, b+1 > 0$. Therefore $\max S_+(m, n)^c = \max S(m, n)^c + m + n$, and, by Frobenius, this is $mn$ provided $\gcd(m,n) = 1$.

Actually, the statement $\max S_+(m, n)^c = mn$ is a little more memorable than the usual statement $\max S(m, n)^c = mn - m - n$.

Sean Eberhard
  • 11,182
  • Can you please clarify one doubt for me? In which case the answer will turn out to be 7 and in which case the answer will be 15 as it came for porblem? I am getting confused here with two formulae $mn$ and $mn-m-n$. – Ganit Apr 12 '21 at 17:20
  • please correct me if I am wrong , I went through this wikipedia page on coin problem and studied it and as I am not a full time mathematics student I might have understood it wrong but what i inferred that for the condition where m and n are non-negative integers, then in this scenario we have the formula of $\max S(m, n)^c = mn - m - n$ and when m and n are positive integers then we have $\max S_+(m, n)^c = mn$. – Ganit Apr 12 '21 at 17:34
  • 1
    Yes $\max S(m, n)^c = mn - m - n$ and $S_+(m, n)^c = mn$. – Sean Eberhard Apr 13 '21 at 09:34