Solve a Linear Programming Problem in Context
Theresa is planning her daughter’s birthday party. She plans to offer each of the guests a goodie bag with a variety of treats that may include a candy bar from a local chocolatier. She will choose from two varieties of candy bars: berry and nut. She has decided she will purchase at least 5 nut bars and that the number of nut bars she purchases will not exceed the number of berry bars purchased by more than 10. Thirty guests were invited and Theresa will prepare a goodie bag for each guest. The nut bars cost $4 each and the berry bars cost $2. She would like to minimize the money spent on this treat. How many of each type of candy bar should she purchase to minimize her cost?
first i would identify the variables # of berry bars can be B # of nut bars can be N
Then writing the constraints is where i mess up
The problem specifies that the number of nut bars will be more than 5, and also that the number of nut bars will not be more than 10 + the number of berry bars. I think these would be examples of constraints. If B is the number of berry bars and N is the number of nut bars, you could say that \[N \ge5\] and also that \[N \le B+10\] Although the problem states that 30 guests are invited and that each guest gets 1 goodie bag, I do not see any information about how many bars are included in each bag, which I think would be important to answering the question
... Unless the part that says each bag "may include *a* candy bar from a local chocolatier" implies that each bag will have exactly 1 candy bar (either Nut or Berry)... In which case, we can also say that \[B + N = 30\] And we also have the information about the cost of each bar. Nut bars cost $4 and Berry bars cost $2... Based on the constraints so far, it seems like the cheapest option would be to get the minimum number of Nut bars and the rest Berry bars, i.e. 5 Nut bars and 25 Berry bars, since Berry bars are the cheaper option. Perhaps I've misunderstood something about the problem?
i think one candy bar from each goodie bag
code?
Perhaps I misunderstood. I saw "linear programming" and I assumed there would be coding involved. If not, perhaps that is easier for us!
lol, i dont know maybe there should be one this is my first time learning about solving a Linear Programming Problem
what is tha?
oh ok then id graph these constraints and |dw:1630000137897:dw| sorry my writing is really bad Then i get the vertices of the region (0,5) 0,10) (10,20) (25,5)
correct?
the constraints N≥5 and b≥0 n≤b+10 and b+n≤30
The "constraints" I mentioned earlier n≥5 and b≥0 n≤b+10 would be more like limits on which region of the graph we should focus, not lines on the graph themselves. b+n = 30, true... but since the question is about minimizing cost, I think it might be more illustrative to graph the number of bars purchased compared to the total cost that results in. That kind of graph (bars versus cost) would clearly allow someone to see the solution. You could make a 3d graph, with nut bars on one axis, berry bars on another axis, and total cost on the third axis... but this would be overly complex, and I don't recommend it. Instead, you could graph, for example, "number of berry bars" on one axis and "total cost" on the other axis. This would require some calculations on your part, and the graph you get at the end would clearly show how many bars to buy in order to minimize cost. Even though the graph would only show "berry bars" we know that b + n = 30, so it would also imply the number of nut bars.
it equals 30
Join our real-time social learning platform and learn together with your friends!