710 likes | 967 Views
Chapter 7. Linear Programming. Instructor: Nguyen Ngoc Trung nguyenngoctrung.dhsp@gmail.com. Contents. Graphing Linear Inequalities in two variables Linear Programming: The graphical Method Applications of Linear Programming The Simplex Method: Maximization Maximization applications
E N D
Chapter 7 Linear Programming Instructor: Nguyen Ngoc Trung nguyenngoctrung.dhsp@gmail.com
Contents • Graphing Linear Inequalities in two variables • Linear Programming: The graphical Method • Applications of Linear Programming • The Simplex Method: Maximization • Maximization applications • The Simplex Method: Duality and Minimization • The Simplex Method: Nonstandard Problems Finite Maths
Section 7.1 Graphing Linear Inequalities in two Variables Instructor: Nguyen Ngoc Trung nguyenngoctrung.dhsp@gmail.com
Linear inequalities • Example: • A solution of a linear inequality is an ordered pair that satisfies the inequality. • Example: (1,1) is a solution of the inequality x+2y<4 • An linear inequality has an infinite number of solution • Solutions of a inequality is showed by the graph of it. Finite Maths
Linear Inequalities (cont) • Example: Graph the inequality: 3x-2y ≤ 6 We have: Solution region Finite Maths
The line is not in solution area!!! Linear Inequalities (cont) • Example: Graph the inequality: x+4y<4 We have: Solution region Finite Maths
Linear inequalities (cont) • Example: Graph the inequality: 4y-2x > 6 Graphing: • The boundary line: 4y - 2x = 6 • X-intercept: y = 0 x = -3 • Y-intercept: x = 0 y = 1.5 Identify solution area: • The solution is either aboveor below the boundary line • Consider the point (0,0) • Let x=0 and y=0: • Therefore (0,0) is not in the solution area. • The solution area is above the boundary line. Solution Region Finite Maths
Linear Inequalities (cont) • Example: Graph following inequalities and identify the solution region. Finite Maths
System of Inequalities • System of inequalities: a set of at least 2 inequalities • Example: • Solve each inequalities for y: Feasible Region Finite Maths
System of inequalities (cont) • Example: Feasible Region Finite Maths
System of inequalities (cont) • Example: Feasible Region Finite Maths
Application • See example 8. (p.373, textbook) • System of inequalities Feasible Region Finite Maths
Section 7.2 Linear Programming:The Graphical Method Instructor: Nguyen Ngoc Trung nguyenngoctrung.dhsp@gmail.com
Example • Consider again example 8: z • Price: • 2$ per unit of plates • 3$ per a unit of cups • Profit function: • z = 2x + 3y • Maximum profit = maximum of z Finite Maths
Linear Programming • Constraints: linear inequalities that must be satisfied. • Objective function: linear function to be optimized • Example: Find the maximum and minimum values of the objective function: z = 2x+5y Finite Maths
Linear Programming (cont) • Constraints: z z = 20 • Objective function: z = 2x + 5y • zmin=??? • zmax=??? zmax = ? z = 10 zmin = ? z = 5 z = 0 Finite Maths
Corner points A B C E D Finite Maths
Corner point theorem • If the feasible region is bounded, the objective function has both a maximum and a minimum value and each occurs at one or more corner points. • If the feasible region is unbounded, the objective function may not have a maximum or minimum. But if a maximum or minimum value exists, it will occurs at one or more corner points. • Maximum value occurs at a corner point • Minimum value occurs at a corner point • Maximum value occurs at 2 corner points • Minimum value occurs at a corner point • No maximum value • Minimum value occurs at a corner point Finite Maths
Solving a linear programming problem • Write the objective function and all necessary contraints • Graph the feasible region • Determine the coordinates of each of the corner points • Find the value of the objective function at each corner point • Using corner point theorem to find maximum and minimum values Finite Maths
Example Objective function: z = 5x+2y Finite Maths
Section 7.3 Application of linear programming Instructor: Nguyen Ngoc Trung nguyenngoctrung.dhsp@gmail.com
Example 1. • See example 1. (page 384, textbook) • Objective function: z = 7x + 20y • Constraints: Finite Maths
Example 1 (cont) Finite Maths
Example 2. • See example 2. (page 385, textbook) • Objective function: z = 8x + 12y • Constraints: Finite Maths
Example 2 (cont) Finite Maths
Example 3. • See example 3. (page 387, textbook) • Objective function: z = 0.18x + 0.12y • Constraints: Finite Maths
Example 3 (cont) Finite Maths
Section 7.4 The Simplex Method:Maximization Instructor: Nguyen Ngoc Trung nguyenngoctrung.dhsp@gmail.com
Introduction • The method was developed by G.B.Danzig in 1947 • Variables: x1 , x2 , … instead of x, y, z • Constraints: a1x1 + a2x2 + … + anxn ≤ b Finite Maths
Standard Maximum Form • The objective function is to be maximized • All variables are nonnegative (xi ≥ 0, i = 1, 2, 3 …) • All constraints involve ≤ • The constants on the right side in the constraints are all nonnegative (b ≥ 0) Finite Maths
Slack variables Standard Maximum Form (cont) • Example: Finite Maths
x1 x2 x3 x4 x5 x6 z Constraint 1 Constraint 2 Constraint 3 Objective Function Indicators Standard Maximum Form (cont) Finite Maths
Smallest Most negative indicator x1 x1 x2 x2 x3 x3 x4 x4 x5 x5 x6 x6 z z Selecting the Pivot Quotients Finite Maths
x1 x1 x2 x2 x3 x3 x4 x4 x5 x5 x6 x6 z z Pivoting R1 = R1 – R2 R3 = R3 – 2*R2 R4 = R4 + 3*R2 Finite Maths
Pivotrow Smallest x1 x1 x2 x2 x3 x3 x4 x4 x5 x5 x6 x6 z z Most negative indicator: Pivot column Selecting the new Pivot Quotients Finite Maths
x1 x1 x2 x2 x3 x3 x4 x4 x5 x5 x6 x6 z z No negative indicator: Stop!!!!! Pivoting again R2 = R2 – 0.5*R1 R3 = R3 – 2*R1 R4 = R4 + 0.5*R2 The final simplex tableau Finite Maths
Non-basic variables Basic variables Maximize value of z x1 x2 x3 x4 x5 x6 z Reading solution Solution: The maximum value of z is 250,where x1=50, x2=50 and x3=0 Finite Maths
Simplex Method • Determine the objective function • Write all necessary constraints • Convert each constraint into an equation by adding slack variables • Set up the initial simplex tableau • Locate the most negative indicator. If there are two such indicators, choose one. This indicator determines the pivot column • Use the positive entries in the pivot column to form the quotients necessary for determining the pivot. If there are no positive entries in the pivot column, no maximum solution exists. If two quotients are equally the smallest, let either determine the pivot Finite Maths
Simplex Method (cont) • Multiply every entry in the pivot row by the reciprocal of the pivot to change the pivot to 1. Then use row operations to change all other entries in the pivot column to 0 by adding suitable multiples of the pivot row to the other rows • If the indicators are all positive or 0, you have found the final tableau. If not, go back to step 5 and repeat the process until a tableau with no negative indicators is obtained. • In the final tableau, the basic variables correspond to the columns that have one entry 1 and the rest 0. The non-basic variables correspond to the other columns. Set each non-basic variable equal to 0 and solve the system for the basic variables. The maximum value of the objective function is the number in the low right-hand corner of the final tableau. Finite Maths
Section 7.5 Maximization Applications Instructor: Nguyen Ngoc Trung nguyenngoctrung.dhsp@gmail.com
See example 1, 2, 3 (page 405 – 408, textbook) Finite Maths
Section 7.6 Simplex Method:Duality and Minimization Instructor: Nguyen Ngoc Trung nguyenngoctrung.dhsp@gmail.com
Transpose of a matrix • A transpose of matrix A is the matrix obtained by interchanging the rows and columns of A Finite Maths
Minimization • The objective function is to be minimized • All coefficients of the objective function are nonnegative • All constraints involve ≥ • All variables are nonnegative • Note: • We y1, y2,… as variable and denote the objective function by w Finite Maths
Minimization (cont) • Any solution of a maximizing problem produces the solution of an associated minimizing problem. • The associated problem is called the dual of the other. • Duals enable us to solve minimization problems of the type just described by the simplex method Finite Maths
Objective function Duality • Construct the dual of this problem: get solution back transpose Finite Maths
Duality (cont) duals duals Finite Maths
Duality (cont) duals Finite Maths
Duality (cont) Finite Maths
Duality (cont) • Theorem of Duality: “The objective function w of a minimizing linear programming problem takes on a minimum value if and only if the objective function z of the corresponding dual maximizing problem takes on a maximum value. The maximum value of z equals the minimum value of w” Finite Maths