Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Nonnegative Solutions

  1. Mar 23, 2008 #1
    1. The problem statement, all variables and given/known data

    I need to find the number of nonnegative integer solutions to the equation a+2b+4c=10^30

    2. Relevant equations

    3. The attempt at a solution

    I was thinking of trying to find perhaps some sort of a multinomial generating function, but am not sure how that will help me. Any suggestions? Thanks.
  2. jcsd
  3. Mar 23, 2008 #2
    Here are my thoughts:

    You can find the total number of solutions by incrementally varying parameters. Since for any solution c will be the least likely to be an integer if you choose arbitrary a and b, varying c and trying to peg possible a's and b's would be the wisest way to proceed. For example:

    If c=50, a+2b = 10^30-200. Because once again b is least likely to be an integer if we choose arbitrary a subject to a+2b=10^30-200, b would be the best to vary. Anywhere from b=(10^30-200)/2 to b=0 will have a corresponding a, so there are (10^30-200)/2+1 different solutions for the case c=50. Can you see how this result might generalize to all c?
    Last edited: Mar 24, 2008
  4. Mar 24, 2008 #3
    So for all c, there would be (10^30-4c)/2+1 corresponding to every possible c value, but that would give an infinite number of solutions wouldn't it?
  5. Mar 24, 2008 #4
    If 10^30-4c < 0, do you have any solutions for non-negative b and a? My approach is simply iteratively inspecting the sum and assuming a varying "chunk" of 10^30 is made up of 4c. The answer is definitely finite.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook