Gz G.

asked • 08/06/15

Hot dogs are 1.25, pizzas are 3.50 and ice cream is 1.75. Come up with two different orders that would cost 10.50.

Problem solving

2 Answers By Expert Tutors

By:

David W. answered • 08/06/15

Tutor
4.7 (90)

Experienced Prof

Andrew M.

Your P for pizza must be ≤ 10.5/3.5 or P≤3
Report

08/06/15

David W.

Yes, the alternatives of 9, 4 and 7 mean ranges of 0-8, 0-3. and 0-6 for the quantities.
Also, continuous improvement is a wonderful process!
Report

08/06/15

Andrew M. answered • 08/06/15

Tutor
New to Wyzant

Mathematics - Algebra a Specialty / F.I.T. Grad - B.S. w/Honors

Andrew M.

You can also sell 6 ice cream....  6I = 6(1.75) = $10.50
Report

08/06/15

David W.

And, how many total possible orders are there?  (note: with the original dollar amounts this is tough, but with possible costs expressed in quarters, I can so it while I'm sleepy.)
Report

08/06/15

David W.

Sleepy means that the 's' is next to the 'd' and both pass the spell check.
Report

08/06/15

Andrew M.

I hear you.  Nothing like late night math to fry the brain... lol
Report

08/06/15

David W.

O.K., the process is called "exhaustive enumeration" and it is one of my favorite computer algorithm types because computers operate at gigahertz (billions of operations per second) and are very, very accurate (and don't get sleepy).
 
The simple program looks like this:
  For H goes from 0 to 40 in steps of 5
    For P goes from 0 tp 42 in steps of 14
      For I goes from 0 to 42 in steps of 7
        If (H+P+I)=42 then print H,P,I
      Next I
    Next P
  Next H
 
The output is:
 0   0   42
 0  14  28
 0  28  14
 0  42   0
 35  0   7
 
One reason that I like this method is that I'm absolutely positive that these are all the possibilities (that's what 'exhaustive' means).
 
Report

08/06/15

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.