The Diet Problem
The diet problem is one of the first problems to be formulated as a linear programming problem. There are foods and nutrients that we need to consider.
Notation
: amount of nutrient in food .
: minimum amount of nutrient .
: cost of food .
: amount of food to buy.
Formulation
Such problem can be formulated as a linear programming problem in the following way:
The objective function is to minimize the cost of the food, which is given by .
The constraints are that the amount of nutrients in the food should be greater than or equal to the minimum amount of nutrients required, which is given by . Also, the amount of food should be nonnegative, which is given by .
Example
The costs and nutrition values for the foods are given in the table below:
The minimum and maximum nutrition requirements are given in the table below:
Last updated