### Video Transcript

A candy store sells bags of marshmallows for five Egyptian pounds each and cola candy for six Egyptian pounds each. A child wants to buy both types of candy and has restrictions on how many they can buy that are described by the figure shown, where π₯ represents the number of bags of marshmallows they buy and π¦ represents the number of bags of cola candy. What is the lowest price possible in this situation?

This is an example of a linear programming problem. We are given restrictions or constraints on the amount of each candy. These can be written as inequalities. These lead us to a feasible region as shown on the diagram. The optimal solution, in this case the lowest price, will be found at one of the vertices of this feasible region.

Letβs begin by finding the equations of the three lines on our diagram. The vertical line passes through the π₯-axis at four. Therefore, this line has equation π₯ equals four. As the shaded region is to the left of this and the line is solid, this corresponds to the inequality π₯ is less than or equal to four. The horizontal line passes through the π¦-axis at three. Therefore, this has equation π¦ is equal to three. The shaded region lies below this. And as the line is solid, the inequality here is π¦ is less than or equal to three.

Finally, we have a diagonal line with a negative slope. This passes through the π₯-axis and π¦-axis at six. The π₯- and π¦-coordinates of every point on this line sum to six. Therefore, the line has equation π₯ plus π¦ equals six. This is once again a solid line. However, this time, the shaded region is above the line, giving us the inequality π₯ plus π¦ is greater than or equal to six. These are the three restrictions on the number of bags of candy that the child can buy. They can buy at most four bags of marshmallows, at most three bags of cola candy, and altogether must buy six or more bags of candy.

Our next step is to find the objective function in terms of the variables π₯ and π¦. We are told that a bag of marshmallows costs five Egyptian pounds. Therefore, the total cost of marshmallows will be equal to five π₯. A bag of cola candy costs six Egyptian pounds. Therefore, the total cost of cola candy is equal to six π¦. This gives us an overall cost πΆ equal to five π₯ plus six π¦.

As already mentioned, the maximum and minimum values will occur at one of the vertices of the feasible region. In this question, these have coordinates three, three; four, two; and four, three. We can now substitute the values of π₯ and π¦ into our expression for the cost to work out the lowest price possible. At the point three, three, the cost is equal to five multiplied by three plus six multiplied by three. This is equal to 15 plus 18, which in turn is 33 Egyptian pounds. At the point four, two, we have πΆ is equal to five multiplied by four plus six multiplied by two. This is equal to 20 plus 12, which is equal to 32 Egyptian pounds. Buying four bags of marshmallows and two bags of cola candy costs 32 Egyptian pounds.

It is clear that substituting π₯ equals four and π¦ equals three will give us a higher value than this, as we are still buying four bags of marshmallows but this time three bags of cola candy. For completeness, we see that this is equal to 38 Egyptian pounds, which is six pounds more than our previous value. We are asked to find the lowest price possible. The lowest price based on the restrictions in the figure is 32 Egyptian pounds. This occurs when π₯ equals four and π¦ equals two, which means that π₯ plus π¦ is equal to six. And the child buys four bags of marshmallows, two bags of cola candy, and six bags in total.