Captain_CoCo's blog

By Captain_CoCo, 12 years ago, In English

giving n positive integers a1,a2,...,an. gcd(a1,a2,...,an)=1. define f(x1,x2,...,xn)=a1*x1+a2*x2+a3*x3+...+an*xn(xi>=0). what is the maximum number b that can not be expressed by f(x1,x2,...,xn)? x1,x2,...,xn are all non-negative integers.

I already know the answer for n=2, it's equal to a1*a2-a1-a2. but when n>2,I can't get it. can anyone give me some hints?

  • Vote: I like it
  • +19
  • Vote: I do not like it

»
12 years ago, # |
  Vote: I like it 0 Vote: I do not like it

It seems that if gcd(a1,a2...,an)=1 then you can express every number, don't you?

  • »
    »
    12 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    No. For example, min(a1,a2,...,an)-1 can't be expressed.

    • »
      »
      »
      12 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Oh, now I see that all values xi must be non-negative, you're right.

»
12 years ago, # |
  Vote: I like it +9 Vote: I do not like it

No polynomial solution is known for this problem. Read this Wikipedia page for more information.

  • »
    »
    12 years ago, # ^ |
      Vote: I like it +1 Vote: I do not like it

    thanks, I first known this problem in the book "A Friendly Introduction to Number Theory", it ask you to solve with the situation n=2. When I work it out and try to solve with n=3, I find it's quite another one. That's really a pity that this problem can't be described by a beautiful formula or algorithm.