Hi, need help with Problem Set 2 (Problem2). I dont have any difficulties with programming exercises, but stuck on this one.
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
Explain, in English, why this theorem is true.
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!
Hoot! You just asked your first question! Hang tight while I find people to answer it for you. You can thank people who give you good answers by clicking the 'Good Answer' button on the right!
if you can buy x, x+1,..., x+5 then notice the sequence: 50, 51, 52, 53, 54, 55 and then notice the equation: 6*a+9*b+20*c = 50
if b = 0 and c = 0 then you have 6*a = 50 and every time you increase a by one the number of nuggets increases by 6 which means that if you can buy 50 nuggets, then you can buy 56 :-)
now, if you can buy 50, 51, 52, 53, 54 and 55... you can also buy 56 and so on... this is why there is a minimum number of nuggets you can buy and once you found this minimum you can, actually, buy any number that is bigger than the minimum :-)
hope this helps ;-)