
Samuel F. answered 02/13/20
Math and Science Tutor | PhD Student in Engineering
Hello Daniel!
First of all, lets call the number of cupcakes by the letter c and the number of hotdogs by the letter h. Based on the informations we have:
h + c ≥ 5
4c + 3h ≤ 36
Realize that h and c must be natural numbers (you cannot buy half cupcake or negative hotdog).
Multiplying the first expression by 3, we have
3h + 3c ≥ 15 ⇒ 3h ≥ 15 - 3c
From the second expression we have:
4c + 3h ≤ 36 ⇒ 3h ≤ 36 - 4c
Putting the two expressions together, we have:
36 - 4c ≥ 15 - 3c
c ≤ 21
However, the expression 4c + 3h ≤ 36 is more restrictive (because c and h are natural numbers), if we considers the lowest value h can admit (zero), we have:
4c ≤ 36
c ≤ 9
and, by the same reasoning, considering c equals zero, we have
3h ≤ 36
h ≤ 12
So to find the solution, we must consider all the possible values of c
if c = 0, then 12 ≥ h ≥ 5
if c = 1, then 10 ≥ h ≥ 4
if c = 2, then 12 ≥ h ≥ 3
if c = 3, then 8 ≥ h ≥ 2
if c = 4, then 6 ≥ h ≥ 1
if c = 5, then 5 ≥ h ≥ 0
if c = 6, then 4 ≥ h ≥ 0
if c = 7, then 2 ≥ h ≥ 0
if c = 8, then 1 ≥ h ≥ 0
if c = 9, then h = 0
Daniel U.
thanks02/13/20