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

I'm having some trouble getting my head around problem set 2, problem 2: Explain why the above theorem is true. I can see through some experimenting that it is true, but don't really see WHY it is true. Does anyone have any clues that might point me in the right direction? Thanks!

OpenStudy (anonymous):

The smallest number of mcnuggets that can be bought in the problem is 6. Thus, if a certain number, x, is solvable by the diophantine equation, then the number x + 6 must be solvable as well, since all you have to do is add 1 pack of 6 mcnuggets to the previous solution to get the new solution. Hope this helps.

OpenStudy (anonymous):

Why is the theorem true? Suppose I am able to buy x, x+1,x+2,x+3,x+4,x+5 nuggets (e.g. 50,51,52,53,54,55) with packs of 6,9, and 12. Why does it follow from that now I can buy any number of McNuggets beyond 55? The sequence after 55 is 56,57,58,59,60,61,.... I can get to 56 (i.e. buy 56 McNuggets by adding a 6 pack to 50); I can get to 57 (i.e. buy 57 McNuggets by adding a 6 pack to 51); I can get to 58 (etc....) So I can purchase the next set in the series (56,57,58,59,60,61) by adding a six pack to (50,51,....) In the same way I can reach the next six numbers in the sequence (62,63,64,65,66,67) by adding a six pack. This pattern can be repeated ad infinitum. Therefore, I can now buy any number of McNuggests greater than 50 just by adding additional six packs.

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!