The question of minimizing spoilage still interests me. Today I want to consider the consequences of relaxing one of the constraints on the problem. In particular I do not assume that the two different types of fruit cost the same per unit. And I want to minimize the total amount of wasted money (i.e. the amount of spoiled fruit times the unit cost.)

Definitions:

**1.** There are two types of fruit and . The unit costs are and respectively.

**2.** We can consume units of fruit per day.

**3.** The goal is to minimize the cost of the total spoiled fruit.

**4.** The percent of fruit that spoils at the end of each day is and respectively for A and B, where , are constants and is the number of days since buying the fruit (i.e. for the first day.)

Calculations:

First, note that by minimizing the cost of spoiled fruit at the end of each day the total cost of spoiled fruit is minimized (I should prove this and I might in a future post. I think this comes from the fact that we’re solving a convex optimization problem?).

Given and units of fruit for A and B respectively.

We can consume and units of and respectively, where

The amount of spoiled fruit at the end of the day is

the cost of the spoiled fruit is

Using the cost of the spoiled fruit is Expanding we get

which reduces to

Taking the derivative with respect to we obtain

If is greater or equal to zero, then minimizes the cost of spoiled fruit; otherwise minimizes the cost of spoiled fruit.

From the above it’s clear that introducing the factor of fruit cost does not fundamentally alter the solution. But it does introduce some interesting factors, that warrant further consideration.