How to solve Frobneius problem for 3 integers a,b,c? Given gcd(a,b,c)=1 , a<b<c. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to solve Frobneius problem for 3 integers a,b,c? Given gcd(a,b,c)=1 , a<b<c.

Frobneius problem is to find the greatest integer that cannot be represented as linear combination of integers a,b,c,...... The problem for 2 integers a and b is solved easily. But for 3 integers, is there any formula? Or algorithm?I searched and found that it is of form bx+cy-a, but i am not able to understand how to find the solution. If algorithm exists, it would be better if implemented in c++. :)

31st Oct 2020, 3:49 PM
PIYUSH BHARAMBE
PIYUSH BHARAMBE - avatar
2 Answers
+ 3
According to wikipedia no solution is known. However, `√(abc) - a - b - c` is a lower bound and `min(a,b,c) max(a,b,c) - min(a,b,c) - max(a,b,c)` is an upper bound, so you could check all the numbers in between.
1st Nov 2020, 12:40 AM
Schindlabua
Schindlabua - avatar
0
Can you suggest a way to check those nos.? Thanks.
1st Nov 2020, 2:16 AM
PIYUSH BHARAMBE
PIYUSH BHARAMBE - avatar