An Example: The Diet Problem • A student is trying to decide on lowest cost diet that provides sufficient amount of protein, with two choices: – steak: 2 units of protein/pound, $3/pound – peanut butter: 1 unit of protein/pound, $2/pound • In proper diet, need 4 units protein/day. Let x = # pounds peanut butter/day in the diet. Let y = # pounds steak/day in the diet. Goal: minimize 2x + 3y (total cost) subject to constraints: x + 2y ³ 4 x ³ 0, y ³ 0
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)