Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 23 Online
OpenStudy (anonymous):

I'm stuck on problem 1 of assignment 2 Diophantine equations, what's the solution ?

OpenStudy (anonymous):

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.

OpenStudy (anonymous):

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.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!