A grocer buys cases of almonds and walnuts. Almonds are packaged 20 bags per case. The grocer pays $30 per case of almonds and makes a profit of $17 per case. Walnuts are packaged 24 bags per case. The grocer pays $26 per case of walnuts and makes a profit of $15 per case. He orders no more than 300 bags of almonds and walnuts together at a maximum cost of $400.

a) Write the constraints. Use x for the number of cases almonds ordered and y for the number of cases of walnuts ordered.

b) Write the objective function for the profit.

a) Write the constraints. Use x for the number of cases almonds ordered and y for the number of cases of walnuts ordered.

a) The constraints can be determined based on the given information:

1. The number of bags of almonds ordered, denoted by x, should not exceed 300.
Therefore, the constraint for almonds is: x ≤ 300

2. The number of bags of walnuts ordered, denoted by y, should also not exceed 300.
Therefore, the constraint for walnuts is: y ≤ 300

3. The maximum cost of both almonds and walnuts combined should be $400.
The cost of almonds per case is $30, and the cost of walnuts per case is $26. Let the total number of cases of almonds and walnuts ordered be T.
The constraint for the total cost is: 30x + 26y ≤ 400

b) The objective function represents the profit earned by selling the cases of almonds and walnuts.

The profit for each case of almonds is $17, and the profit for each case of walnuts is $15. Let P represent the total profit.

The objective function for the profit is: P = 17x + 15y