A nut company produces two types of mixtures, regular and deluxe. The company is donating bags of mixtures for school picnic. A bag of regular mix has 4 oz of peanuts, 1 oz of cashew, and 3 oz of almonds. A bag of deluxe mix has 3 oz of peanut, 1 oz of cashew, and 5 oz of almonds. Overall, the company promised to supply at least 27 oz of peanuts, 8 oz of cashew, and 30 oz of almonds. The regular mix costs the company 100 whereas the deluxe mix cost them 350 a bag. Determine the number of bags each type of mix the company should donate to minimize the cost?

First step: come up with a function you want to minimize. Can you describe the cost in terms of the quantities?

To determine the number of bags of each type of mix that the company should donate to minimize the cost, we can set up a linear programming problem.

Let's define:
- Let R be the number of bags of regular mix to donate.
- Let D be the number of bags of deluxe mix to donate.

Now, let's set up the constraints based on the promises made by the company:
1. Peanut constraint: The company promised to supply at least 27 oz of peanuts.
- From each bag of regular mix, 4 oz of peanuts are supplied.
- From each bag of deluxe mix, 3 oz of peanuts are supplied.
- Therefore, the peanut constraint is: 4R + 3D ≥ 27

2. Cashew constraint: The company promised to supply at least 8 oz of cashews.
- From each bag of regular mix, 1 oz of cashews are supplied.
- From each bag of deluxe mix, 1 oz of cashews are supplied.
- Therefore, the cashew constraint is: R + D ≥ 8

3. Almond constraint: The company promised to supply at least 30 oz of almonds.
- From each bag of regular mix, 3 oz of almonds are supplied.
- From each bag of deluxe mix, 5 oz of almonds are supplied.
- Therefore, the almond constraint is: 3R + 5D ≥ 30

Additionally, we have the non-negativity constraint:
4. R ≥ 0 (The number of bags of regular mix can't be negative)
5. D ≥ 0 (The number of bags of deluxe mix can't be negative)

Next, let's set up the objective function to minimize the cost:
The cost of each bag of regular mix is $100, and the cost of each bag of deluxe mix is $350.
Therefore, the objective function is: 100R + 350D.

Now, we can solve this linear programming problem using any optimization method (such as the simplex method or graphical method) to find the optimal values for R and D that minimize the cost.

Note: Since the solution involves solving linear inequalities, the optimal values for R and D may not be whole numbers.