Chapter 3 linear programming

55
Copyright © 2014, 2010, 2007 Pearson Education, Inc. Chapter 3 Linear Programming, A Geometric Approach

Transcript of Chapter 3 linear programming

Page 1: Chapter 3   linear programming

Copyright © 2014, 2010, 2007 Pearson Education, Inc.

Chapter 3

Linear Programming,

A Geometric Approach

Page 2: Chapter 3   linear programming

Copyright © 2014, 2010, 2007 Pearson Education, Inc.

Outline

3.1 A Linear Programming Problem

3.2 Fundamental Theorem of Linear Programming

3.3 Linear Programming

Page 3: Chapter 3   linear programming

Copyright © 2014, 2010, 2007 Pearson Education, Inc.

Section 3.1

A Linear Programming

Problem

Page 4: Chapter 3   linear programming

Copyright © 2014, 2010, 2007 Pearson Education, Inc.

Outline

1. The Problem2. Tabulate Data3. Translate the Constraints4. The Objective Function5. Linear Programming

Problem6. Production Schedule7. No Waste8. Feasible Set

Page 5: Chapter 3   linear programming

Slide 5Copyright © 2014, 2010, 2007 Pearson Education, Inc.

The Problem

A furniture manufacturer makes two types of furniture - chairs and sofas. The manufacture of a chair requires 6 hours of carpentry, 1 hour of finishing, and 2 hours of upholstery. Manufacture of a sofa requires 3 hours of carpentry, 1 hour of finishing, and 6 hours of upholstery. Each day the factory has available 96 labor hours for carpentry, 18 labor-hours for finishing, and 72 labor-hours for upholstery. The profit per chair is $80 and per sofa is $70. How many chairs and sofas should be produced each day to maximize the profit?

Page 6: Chapter 3   linear programming

Slide 6Copyright © 2014, 2010, 2007 Pearson Education, Inc.

Chair Sofa Available time

Carpentry

Finishing

Upholstery

Profit

6 hours 3 hours 96 labor-hours

1 hour 1 hour 18 labor-hours

2 hours 6 hours 72 labor-hours

$80 $70

Tabulate Data

It is helpful to tabulate data given in the problem.

Page 7: Chapter 3   linear programming

Slide 7Copyright © 2014, 2010, 2007 Pearson Education, Inc.

Translate the Constraints

Translate each of the constraints (restrictions on labor-hours available) into mathematical language.

Let x be the number of chairs and y be the number of sofas manufactured each day, respectively.

Page 8: Chapter 3   linear programming

Slide 8Copyright © 2014, 2010, 2007 Pearson Education, Inc.

Translate the Constraints (2)

Carpentry: [number of labor-hours per day]

= (number of hours required per chair) (number of chairs per day) + (number of hours required per sofa) (number of sofas per day)

= 6x + 3y

[number of labor-hours per day] < [maximum available]

6x + 3y < 96

Page 9: Chapter 3   linear programming

Slide 9Copyright © 2014, 2010, 2007 Pearson Education, Inc.

Translate the Constraints (3)

Similarly,

Finishing Constraint:

x + y < 18

Upholstery Constraint :

2x + 6y < 72

Number of chairs and sofas cannot be negative:

x > 0, y > 0

Page 10: Chapter 3   linear programming

Slide 10Copyright © 2014, 2010, 2007 Pearson Education, Inc.

The Objective Function

The objective of the problem is to optimize profit. Translate the profit (objective function) into mathematical language.

[profit] = [profit from chairs] + [profit from sofas]

= [profit per chair][number of chairs] + [profit per sofa][number of

sofas]

= 80x + 70y

Page 11: Chapter 3   linear programming

Slide 11Copyright © 2014, 2010, 2007 Pearson Education, Inc.

Linear Programming Problem

The manufacturing problem can now be written as a mathematical problem.

Find x and y for which 80x + 70y is as large as possible, and for which the following hold simultaneously: 6 3 96

18

2 6 72

0, 0.

x y

x y

x y

x y

This is called a linear programming problem.

Page 12: Chapter 3   linear programming

Slide 12Copyright © 2014, 2010, 2007 Pearson Education, Inc.

Production Schedule

In the manufacturing problem, each pair of numbers (x,y) that satisfies the system of inequalities is called a production schedule.

Page 13: Chapter 3   linear programming

Slide 13Copyright © 2014, 2010, 2007 Pearson Education, Inc.

Example Production Schedule

Which of the following is a production schedule for

(11,6)? (6,11)?

6 3 96

18

2 6 72

0, 0

x y

x y

x y

x y

Yes No

Page 14: Chapter 3   linear programming

Slide 14Copyright © 2014, 2010, 2007 Pearson Education, Inc.

No Waste

It seems clear that a factory will operate most efficiently when its labor is fully utilized (no waste).

This would require x and y to satisfy the system

6 3 96

18

2 6 72.

x y

x y

x y

Page 15: Chapter 3   linear programming

Slide 15Copyright © 2014, 2010, 2007 Pearson Education, Inc.

Example No Waste

Solve6 3 96

18

2 6 72.

x y

x y

x y

According to the graph of the three equations, there is no common intersection and therefore no solution.

Page 16: Chapter 3   linear programming

Slide 16Copyright © 2014, 2010, 2007 Pearson Education, Inc.

Feasible Set

The set of solutions to the system of inequalities is called the feasible set of the system. This represents all possible production schedules.

Page 17: Chapter 3   linear programming

Slide 17Copyright © 2014, 2010, 2007 Pearson Education, Inc.

Example Feasible Set

Find the feasible set for

6 3 96

18

2 6 72

0 , 0.

x y

x y

x y

x y

Page 18: Chapter 3   linear programming

Slide 18Copyright © 2014, 2010, 2007 Pearson Education, Inc.

Example Feasible Set (2)

Notice that (0,0) satisfies all the inequalities.

Graph the boundaries:

y < -2x + 32

y < -x + 18

y < -x/3 + 12

x > 0, y > 0 Feasible Set

Page 19: Chapter 3   linear programming

Slide 19Copyright © 2014, 2010, 2007 Pearson Education, Inc.

Summary Section 3.1

A linear programming problem asks us to find the point (or points) in the feasible set of a system of linear inequalities at which the value of a linear expression involving the variables, called the objective function, is either maximized or minimized.

Page 20: Chapter 3   linear programming

Copyright © 2014, 2010, 2007 Pearson Education, Inc.

Section 3.2

Fundamental Theorem of Linear

Programming

Page 21: Chapter 3   linear programming

Copyright © 2014, 2010, 2007 Pearson Education, Inc.

Outline

1. Vertex

2. Fundamental Theorem of Linear Programming

3. Linear Programming Steps

Page 22: Chapter 3   linear programming

Slide 22Copyright © 2014, 2010, 2007 Pearson Education, Inc.

Vertex

The boundary of the feasible set is composed of line segments. The line segments intersect in points, each of which is a corner of the feasible set. Such a corner is called a vertex.

Page 23: Chapter 3   linear programming

Slide 23Copyright © 2014, 2010, 2007 Pearson Education, Inc.

Find the vertices ofy < -2x + 32

y < -x + 18

y < -x/3 + 12

x > 0, y > 0.

Example Vertex

(0,0)

(0,12) (9,9)

(14,4)

(16,0)

Find the vertices ofy < -2x + 32

y < -x + 18

y < -x/3 + 12

x > 0, y > 0.

Page 24: Chapter 3   linear programming

Slide 24Copyright © 2014, 2010, 2007 Pearson Education, Inc.

Fundamental Theorem of Linear Programming

Fundamental Theorem of Linear Programming The maximum (or minimum) value of the objective function in a linear programming problem is achieved at one of the vertices of the feasible set.

The point that yields the maximum (or minimum) value of the objective function is called an optimal point.

Page 25: Chapter 3   linear programming

Slide 25Copyright © 2014, 2010, 2007 Pearson Education, Inc.

Vertex Profit = 80x + 70y(0,0) 80(0) + 70(0) = 0

(0,12) 80(0) + 70(12) = 840(9,9) 80(9) + 70(9) = 1350

(14,4) 80(14) + 70(4) = 1400(16,0) 80(16) + 70(0) = 1280

Example Optimal Point

Find the point which maximizes Profit = 80x + 70y for the feasible set with vertices (0,0), (0,12), (9,9), (14,4) and (16,0).

Page 26: Chapter 3   linear programming

Slide 26Copyright © 2014, 2010, 2007 Pearson Education, Inc.

Linear Programming Steps - Step 1

Step 1 Translate the problem into mathematical language.A. Organize the data.B. Identify the unknown quantities and

define corresponding variables.C. Translate the restrictions into linear

inequalities.D. Form the objective function.

Page 27: Chapter 3   linear programming

Slide 27Copyright © 2014, 2010, 2007 Pearson Education, Inc.

Linear Programming Steps - Step 2

Step 2 Graph the feasible set.A. Put the inequalities in standard form.B. Graph the straight line corresponding

to each inequality.C. Determine the side of the line

belonging to the graph of each inequality. Cross out the other side. The remaining region is the feasible set.

Page 28: Chapter 3   linear programming

Slide 28Copyright © 2014, 2010, 2007 Pearson Education, Inc.

Linear Programming Steps - Steps 3 & 4

Step 3 Determine the vertices of the feasible set.

Step 4 Evaluate the objective function at each vertex. Determine the optimal point.

Page 29: Chapter 3   linear programming

Slide 29Copyright © 2014, 2010, 2007 Pearson Education, Inc.

Example Linear Programming Steps

Nutrition - PeopleRice and soybeans are to be part of a staple diet. One cup of uncooked rice costs 21 cents and contains 15 g of protein, 810 calories, and 1/9 mg of B2 (riboflavin). One cup of uncooked soybeans costs 14 cents and contains 22.5 g of protein, 270 calories, and 1/3 mg of B2. The minimum daily requirements are 90 g of protein, 1620 calories and 1 mg of B2. Design the lowest-cost diet meeting these specifications, (Find the optimal point that will minimize cost).

Page 30: Chapter 3   linear programming

Slide 30Copyright © 2014, 2010, 2007 Pearson Education, Inc.

Rice SoybeansRequired level

per day

Protein (g/cup) 15 22.5 90

Calories (per cup) 810 270 1620

B2 (mg/cup) 1/9 1/3 1

Cost (cents/cup) 21 14

Example Step 1A

Organize the data.

Page 31: Chapter 3   linear programming

Slide 31Copyright © 2014, 2010, 2007 Pearson Education, Inc.

Example Step 1B

Identify the unknown quantities and define corresponding variables.

x = number of cups of rice per day

y = number of cups of soybeans per day

Page 32: Chapter 3   linear programming

Slide 32Copyright © 2014, 2010, 2007 Pearson Education, Inc.

Example Step 1C

Translate the restrictions into linear inequalities.

Protein: 15x + 22.5y > 90

Calories: 810x + 270y > 1620

B2: (1/9)x + (1/3)y > 1

Nonnegative: x > 0, y > 0

Page 33: Chapter 3   linear programming

Slide 33Copyright © 2014, 2010, 2007 Pearson Education, Inc.

Example Step 1D

Form the objective function.

Minimize the cost in cents:

[Cost] = 21x + 14y

Page 34: Chapter 3   linear programming

Slide 34Copyright © 2014, 2010, 2007 Pearson Education, Inc.

Example Step 2A

Put the inequalities in standard form.

Protein: y > (-2/3)x + 4

Calories: y > -3x + 6

B2: y > (-1/3)x + 3

Nonnegative: x > 0

y > 0

Page 35: Chapter 3   linear programming

Slide 35Copyright © 2014, 2010, 2007 Pearson Education, Inc.

Example Step 2B

Graph the straight line corresponding to each inequality.

1. y = (-2/3)x + 4

2. y = -3x + 6

3. y = (-1/3)x + 3

4. x = 0

5. y = 0

1

2

3

4

5

Page 36: Chapter 3   linear programming

Slide 36Copyright © 2014, 2010, 2007 Pearson Education, Inc.

Example Step 2C

feasible set

Determine the side of the line.

y > (-2/3)x + 4

y > -3x + 6

y > (-1/3)x + 3

x > 0

y > 0

Page 37: Chapter 3   linear programming

Slide 37Copyright © 2014, 2010, 2007 Pearson Education, Inc.

Example Step 3

Determine the vertices of the feasible set.

x = 0 & y = -3x + 6: (0,6)

y = -3x + 6 & y = (-2/3)x + 4:

(6/7,24/7)

y = (-2/3)x + 4 & y = (-1/3)x + 3:

(3,2)

y = (-1/3)x + 3 & y = 0: (9,0)

(0,6)

(6/7,24/7)(3,2)

(9,0)

Page 38: Chapter 3   linear programming

Slide 38Copyright © 2014, 2010, 2007 Pearson Education, Inc.

Vertex Cost = 21x + 14y(0,6) 21(0) + 14(6) = 84

(6/7,24/7) 21(6/7) + 14(24/7) = 66

(3,2) 21(3) + 14(2) = 91

(9,0) 21(9) + 14(0) = 189

Example Step 4

Determine the objective function at each vertex. Determine the optimal point.

The minimum cost is 66 cents for 6/7 cups of rice and 24/7 cups of soybeans.

Page 39: Chapter 3   linear programming

Slide 39Copyright © 2014, 2010, 2007 Pearson Education, Inc.

Summary Section 3.2 - Part 1

The fundamental theorem of linear programming states that the optimal value of the objective function for a linear programming problem occurs at a vertex of the feasible set.

Page 40: Chapter 3   linear programming

Slide 40Copyright © 2014, 2010, 2007 Pearson Education, Inc.

Summary Section 3.2 - Part 2

To solve a linear programming word problem, assign variables to the unknown quantities, translate the restrictions into a system of linear inequalities involving no more than two variables, form a function for the quantity to be optimized, graph the feasible set, evaluate the objective function at each vertex, and identify the vertex that gives the optimal value.

Page 41: Chapter 3   linear programming

Copyright © 2014, 2010, 2007 Pearson Education, Inc.

Section 3.3

Linear Programming

Page 42: Chapter 3   linear programming

Copyright © 2014, 2010, 2007 Pearson Education, Inc.

Outline

1. Number of Variables2. Transportation Example

Page 43: Chapter 3   linear programming

Slide 43Copyright © 2014, 2010, 2007 Pearson Education, Inc.

Number of Variables

On the surface some problems may appear to have more than two variables. However, sometimes they can be translated into mathematical language so that only two variables are required.

Page 44: Chapter 3   linear programming

Slide 44Copyright © 2014, 2010, 2007 Pearson Education, Inc.

Example Transportation - Shipping

A TV dealer has stores in city A (Annapolis) and B (Rockville) and warehouses in cities W (College Park) and V (Baltimore). The cost of shipping a TV from W to A is $6, from V to A is $3, from W to B is $9 and from V to B is $5. Store in A orders 25 TV sets and store in B orders 30 sets. The W warehouse has a stock of 45 sets and V warehouse has 40. What is the most economical way to supply the two stores the requested TV sets?

Page 45: Chapter 3   linear programming

Slide 45Copyright © 2014, 2010, 2007 Pearson Education, Inc.

Step 1A

VStock: 40

B ANeeds: 30 Needs: 25

WStock: 45

$5

$3

$9

$6

Page 46: Chapter 3   linear programming

Slide 46Copyright © 2014, 2010, 2007 Pearson Education, Inc.

Step 1B

The number of variables can be reduced by observing that what is not shipped from the warehouse in W must be shipped from the warehouse in V.

Let x be the number of TVs shipped from the W warehouse to the store in A and y be the number of TVs shipped from W to B. Then 30 - x is going from V to A and 25 - y from V to B.

Page 47: Chapter 3   linear programming

Slide 47Copyright © 2014, 2010, 2007 Pearson Education, Inc.

Step 1A&B

VStock: 40

A BNeeds: 30 Needs: 25

WStock: 45

$5

$3

$9

$6x y

25 - y30 - x

Page 48: Chapter 3   linear programming

Slide 48Copyright © 2014, 2010, 2007 Pearson Education, Inc.

Step 1C

Warehouse W:

x + y < 45

Warehouse V:

(30 - x) + (25 - y) < 40

Nonnegative restrictions:

0 < x and 30 - x > 0

0 < y and 25 - y > 0

Page 49: Chapter 3   linear programming

Slide 49Copyright © 2014, 2010, 2007 Pearson Education, Inc.

Step 1C - Simplified

Our restriction inequalities are these:

x + y < 45

x + y > 15

x < 30

y < 25

0 < x

0 < y

Page 50: Chapter 3   linear programming

Slide 50Copyright © 2014, 2010, 2007 Pearson Education, Inc.

Step 1D The Objective Function

The cost of transporting the TVs is to be minimized.

[cost] = 3x + 6y + 5(30 - x) + 9(25 - y)

[cost] = 375 - 2x - 3y

Page 51: Chapter 3   linear programming

Slide 51Copyright © 2014, 2010, 2007 Pearson Education, Inc.

1

2 3

3

4

4

1. y < 45 - x

2. y > 15 - x

3. x < 30, 0 < x

4. y < 25, 0 < y

Step 2 Graph the System of Inequalities

Page 52: Chapter 3   linear programming

Slide 52Copyright © 2014, 2010, 2007 Pearson Education, Inc.

(0,15)

(0,25)

(30,15)

(30,0)(15,0)

(20,25)

Step 3 Determine the Vertices

y < 45 - x

y > 15 - x

x < 30

0 < x

y < 25

0 < y

Page 53: Chapter 3   linear programming

Slide 53Copyright © 2014, 2010, 2007 Pearson Education, Inc.

Vertex Cost = 375 - 2x - 3y

(0,15) 375 - 2(0) - 3(15) = 330(0,25) 375 - 2(0) - 3(25) = 300

(20,25) 375 - 2(20) - 3(25) = 260(30,15) 375 - 2(30) - 3(15) = 270(30,0) 375 - 2(30) - 3(0) = 315(15,0) 375 - 2(15) - 3(0) = 345

Step 4

Page 54: Chapter 3   linear programming

Slide 54Copyright © 2014, 2010, 2007 Pearson Education, Inc.

Step 4 - Solution

Optimum Point (20,25)V

Stock: 40

B A Needs: 30 Needs: 25

WStock: 45

$5

$3

$9

$6

20 25

010

Page 55: Chapter 3   linear programming

Slide 55Copyright © 2014, 2010, 2007 Pearson Education, Inc.

Summary Section 3.3

Sometimes it is necessary to use algebra to reduce the number of variables. Once the number of variables is reduced to two, the steps for solving a linear programming problem are followed.