I'm stuck on problem 1 of assignment 2 Diophantine equations, what's the solution ?
MIT 6.00 Intro Computer Science (OCW)
Stacey Warren - Expert brainly.com
Hey! We 've verified this expert answer for you, click below to unlock the details :)
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga.
Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus.
Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
Well, you have the equation \[6a + 9b + 20c = n\] and you have to find values of a,b and c while n is from 50 to 55. You can solve this in your head - try to divide n first by the greatest number - 20, check how many 20's you can have. Then check 9 similarly and then 6. You have to experiment a little bit.
6a + 9b + 20c = n.
50 isn't divisible by 3, and both 6 & 9 are, so you'll need at least 1 20. That leaves you with 30, which is 5*6, so a=5, b=0, c=1 is a solution for 50.
51 is divisible by 3; Trying 9s, you can see 9*6 = 54 is 3 past your target, so reduce the number of 9s by one and include a 6. a=1, b=5, c=0 is a solution for 51.
Similar fiddling will get you the others.
You could also write a program to try values of a, b, and c, and store combinations that get numbers in the range you want.