Optimization Problems
Optimization Problems
Example
Luz is a mother who holds two part-time jobs, Job A and Job B. She cannot work more than a total of 12 hours a week. She finds that for every hour she works at Job A, she needs 2 hours of preparation time, and for every hour she works at Job B, she needs one hour of preparation time, and she cannot spend more than 16 hours for preparation. If she makes PhP400 an hour at Job A, and PhP300 an hour at Job B, how many hours should she work per week at each job to maximize her income?
Linear Programming
A typical linear programming problem consists of finding an extreme value of a linear function subject to certain constraints. We are either trying to maximize or minimize our function. That is why these linear programming problems are classified as maximization or minimization problems, or optimization problems. The function we are trying to optimize is called the objective function, and the conditions that must be satisfied are called the constraints.
Linear Programming
Luz is a mother who holds two part-time jobs, Job A and Job B. She cannot work more than a total of 12 hours a week. She finds that for every hour she works at Job A, she needs 2 hours of preparation time, and for every hour she works at Job B, she needs one hour of preparation time, and she cannot spend more than 16 hours for preparation. If she makes PhP400 an hour at Job A, and PhP300 an hour at Job B, how many hours should she work per week at each job to maximize her income?
Linear Programming
Step 1: Define your variables. Let x no. of hrs per wk Luz will work for Job A y no. of hrs per wk Luz will work for Job B Step 2: State the objective function in terms of the variables. What do you want to maximize/minimize?
If she makes PhP400 an hour at Job A, and PhP300 an hour at Job B, how many hours should she work per week at each job to maximize her income?
Linear Programming
Step 1: Define your variables. Let x no. of hrs per wk Luz will work for Job A y no. of hrs per wk Luz will work for Job B
Step 2: State the objective function in terms of the variables. Maximize Income: 400x + 300y
Linear Programming
Let x no. of hrs per wk Luz will work for Job A y no. of hrs per wk Luz will work for Job B Luz cannot work more than a total of 12 hours a week. She finds that for every hour she works at Job A, she needs 2 hours of preparation time, and for every hour she works at Job B, she needs one hour of preparation time, and she cannot spend more than 16 hours for preparation.
Problem Formulation
Let x no. of hrs per wk Luz will work for Job A y no. of hrs per wk Luz will work for Job B Maximize Income: 400x + 300y Subject to: x + y 12 2x + y 16 x 0, y 0
Solution
Find the feasible region to the system: x + y 12 2x + y 16 x 0, y 0
Every point on the feasible region satisfies the constraints, but which point will maximize the income 400x + 300y?
x + y = 12 2x + y = 16 x=0 C y=0
x + y = 12 2x + y = 16
(0,0)
Subtract 1st eqn from 2nd: x=4 Substitute in the 1st eqn: 4 + y = 12 y=8
C = (4,8)
400x + 300y (0,0): 400(0) + 300(0) = 0 (0,12):400(0) + 300(12) = 3600 (8,0): 400(8) + 300(0) = 3200 (4,8): 400(4) + 300(8) = 4000
Thus, Luz should work 4 hours in Job A and 8 hours in Job B to earn a maximum income of PhP4000 per week.
Exercise
A factory manufactures two types of gadgets, regular and premium. Each gadget requires the use of two operations, assembly and finishing, and there are at most 12 hours available for each operation. A regular gadget requires 1 hour of assembly and 2 hours of finishing, while a premium gadget needs 2 hours of assembly and 1 hour of finishing. Due to other restrictions, the company can make at most 7 gadgets a day. If a profit of PhP200 is realized for each regular gadget and PhP300 for a premium gadget, how many of each should be manufactured to maximize profit?
Example
Prof. Santos is on a low cholesterol diet. During lunch at the canteen, he always chooses between two meals, Pasta or Tofu. The table below lists the amount of protein, carbohydrates, and vitamins each meal provides along with the amount of cholesterol he is trying to minimize.
Pasta
Protein Carbohydrates 8g 60g
Tofu
16g 40g
Vitamin C
Cholesterol
2g
60g
2g
50g
Example
Prof. Santos needs at least 200 grams of protein, 960 grams of carbohydrates, and 40 grams of vitamins for lunch each month. Over this time period, how many days should he have the Pasta meal, and how many days the Tofu meal so that he gets the adequate amount of protein, carbohydrates, and vitamins and at the same time minimizes his cholesterol intake? Pasta 8g 60g 2g Tofu Needed 16g 200g 40g 2g 960g 40g
Cholesterol
60g
50g
Example
Step 1: Define your variables. Let x no. of days per month Prof. Santos will have Pasta for lunch y no. of days per month Prof. Santos will have Tofu for lunch
Step 2: State the objective function in terms of the variables. Minimize Cholesterol Intake : Min 60x + 50y
Example
Step 1: Define your variables. Let x no. of days per month Prof. Santos will have Pasta for lunch y no. of days per month Prof. Santos will have Tofu for lunch
Pasta Tofu Needed StepProtein 2: State the objective function in 200g terms 8g 16g of the variables. Carbohydrates 60g 40g 960g Minimize Cholesterol Intake : Vitamin C 2g 2g 40g Min 60x + 50y Cholesterol 60g 50g
Example
Step 3: Determine the constraints.
Cholesterol
60g
50g
Problem Formulation
Let x no. of days per month Prof. Santos will have Pasta for lunch y no. of days per month Prof. Santos will have Tofu for lunch Minimize : 60x + 50y
x + 2y 25 3x + 2y 48 x + y 20 x 0, y 0
24 20 16 12 8 4 4 8 12 16 20 24
= = = =
Thus, Prof. Santos should have Pasta for 8 days and Tofu for 12 days to meet his nutritional requirements and minimize calorie intake.
Exercise
A company produces three products, A, B, and C, at its two factories, Factory I and Factory II. Daily production of each factory for each product is listed below. Factory I Factory II Product A 10 20 Product B 20 20 Product C 20 10 The company must produce at least 1000 units of product A, 1600 units of B, and 700 units of C. If the cost of operating Factory I is PhP40,000 per day and the cost of operating Factory II is PhP50,000, how many days should each factory operate to complete the order at a minimum cost, and what is the minimum cost?