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

In problem set 2 i have having a difficulty understanding the part about: Given that it is possible to buy sets of 50, 51, 52, 53, 54 or 55 McNuggets by combinations of 6, 9 and 20 packs, show that it is possible to buy 56, 57: I have already written a code to solve and print the answers, I am just not sure what this question is asking or how to go about proving it

OpenStudy (anonymous):

also I dont understand this theorem: Theorem: If it is possible to buy x, x+1,…, x+5 sets of McNuggets, for some x, then it is possible to buy any number of McNuggets >= x, given that McNuggets come in 6, 9 and 20 packs. Problem

OpenStudy (anonymous):

Im stuck on set 2 as well but what i got out of the first problem is that since you can by 50 the if take the comp of 6,9,20 that you made it with and add 6 to it then you have 56

OpenStudy (anonymous):

i cant figure out problem 3

OpenStudy (anonymous):

For problem 1, you have to show that if you can create sets of 50-55 you can also create sets of 56-65 by adding/subtracting packs from the combinations you used to make the 50-55 sets. In order to prove the theorem you use induction. Hint: Can you find an x where you can find combinations for x, x+1, ..., x+5? Can you find combinations for x+6, ... x+15 (using combinations you found for x, ..., x+5)? What happens if you repeat that process for y = x+10?

OpenStudy (anonymous):

In problem set 2 question 1, typing the code is not compulsary. the purpose of this question is to be used to solve the next questions. To prove it, you need to find the a, b,c for equation 6a+9b+20c=x+d, for every d>5, assuming you know the a,b,c for each of the equation 61+9b+20c=x+p, for every 0 =< p =< 5. you might not need to present a explicitly (numerically).

OpenStudy (anonymous):

i think i got it now....in other words....if u can get 50 mcnuggets, 56 is just simply adding one more 6 pack....if u can get 51 mcnuggets, just add 1 more 6 pack to get 57 and on and on

OpenStudy (anonymous):

but how do we get 51 or 52 nuggets ?

OpenStudy (anonymous):

51 = 9 * 5 + 6 52 = 20 * 2 + 6 * 2

OpenStudy (anonymous):

oh!! thought that you have include 6 9 and 20 packages .... such a dummy l: thanks

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!