Gauss-Jordan Elimination for Solving Linear Equations Example: 1. Solve the following equations: (3)

Similar documents
ECE 307 Techniques for Engineering Decisions

Standard Form An LP is in standard form when: All variables are non-negativenegative All constraints are equalities Putting an LP formulation into sta

Simplex Method for LP (II)

Chap6 Duality Theory and Sensitivity Analysis

Systems Analysis in Construction

Summary of the simplex method

TIM 206 Lecture 3: The Simplex Method

Special cases of linear programming

OPRE 6201 : 3. Special Cases

A = Chapter 6. Linear Programming: The Simplex Method. + 21x 3 x x 2. C = 16x 1. + x x x 1. + x 3. 16,x 2.

UNIT-4 Chapter6 Linear Programming

CPS 616 ITERATIVE IMPROVEMENTS 10-1

In Chapters 3 and 4 we introduced linear programming

February 17, Simplex Method Continued

Review Solutions, Exam 2, Operations Research

Week_4: simplex method II

The Simplex Method for Solving a Linear Program Prof. Stephen Graves

Dr. Maddah ENMG 500 Engineering Management I 10/21/07

Introduction to the Simplex Algorithm Active Learning Module 3

MATH2070 Optimisation

Dr. S. Bourazza Math-473 Jazan University Department of Mathematics

21. Solve the LP given in Exercise 19 using the big-m method discussed in Exercise 20.

Prelude to the Simplex Algorithm. The Algebraic Approach The search for extreme point solutions.

AM 121: Intro to Optimization Models and Methods Fall 2018

Simplex Algorithm Using Canonical Tableaus

AM 121: Intro to Optimization

9.5 THE SIMPLEX METHOD: MIXED CONSTRAINTS

IE 400: Principles of Engineering Management. Simplex Method Continued

Metode Kuantitatif Bisnis. Week 4 Linear Programming Simplex Method - Minimize

Chapter 4 The Simplex Algorithm Part II

Lesson 27 Linear Programming; The Simplex Method

MATH 445/545 Homework 2: Due March 3rd, 2016

min 4x 1 5x 2 + 3x 3 s.t. x 1 + 2x 2 + x 3 = 10 x 1 x 2 6 x 1 + 3x 2 + x 3 14

Lecture 5 Simplex Method. September 2, 2009

Introduction. Very efficient solution procedure: simplex method.

OPERATIONS RESEARCH. Linear Programming Problem

1. Algebraic and geometric treatments Consider an LP problem in the standard form. x 0. Solutions to the system of linear equations

Summary of the simplex method

The augmented form of this LP is the following linear system of equations:

IE 400 Principles of Engineering Management. The Simplex Algorithm-I: Set 3

IE 5531: Engineering Optimization I

Linear Programming, Lecture 4

Ω R n is called the constraint set or feasible set. x 1

THE UNIVERSITY OF HONG KONG DEPARTMENT OF MATHEMATICS. Operations Research I

9.1 Linear Programs in canonical form

Water Resources Systems: Modeling Techniques and Analysis

Math 273a: Optimization The Simplex method

OPERATIONS RESEARCH. Michał Kulej. Business Information Systems

Math Models of OR: Some Definitions

Yinyu Ye, MS&E, Stanford MS&E310 Lecture Note #06. The Simplex Method

Distributed Real-Time Control Systems. Lecture Distributed Control Linear Programming

Linear Programming. Linear Programming I. Lecture 1. Linear Programming. Linear Programming

Chapter 4 The Simplex Algorithm Part I

LINEAR PROGRAMMING I. a refreshing example standard form fundamental questions geometry linear algebra simplex algorithm

Linear Programming and the Simplex method

Linear Programming for Planning Applications

Lecture slides by Kevin Wayne

Week 3: Simplex Method I

Linear & Integer programming

The Simplex Algorithm and Goal Programming

Section 6.2 Larger Systems of Linear Equations

M.SC. MATHEMATICS - II YEAR

Gauss-Jordan Row Reduction and Reduced Row Echelon Form


The Transform and Conquer Algorithm Design Technique

The Big M Method. Modify the LP

Ann-Brith Strömberg. Lecture 4 Linear and Integer Optimization with Applications 1/10

56:171 Operations Research Midterm Exam--15 October 2002

Part 1. The Review of Linear Programming

Non-Standard Constraints. Setting up Phase 1 Phase 2

The Simplex Algorithm

Slack Variable. Max Z= 3x 1 + 4x 2 + 5X 3. Subject to: X 1 + X 2 + X x 1 + 4x 2 + X X 1 + X 2 + 4X 3 10 X 1 0, X 2 0, X 3 0

The Simplex Method. Lecture 5 Standard and Canonical Forms and Setting up the Tableau. Lecture 5 Slide 1. FOMGT 353 Introduction to Management Science

Lecture 2: The Simplex method

Lecture 4: Algebra, Geometry, and Complexity of the Simplex Method. Reading: Sections 2.6.4, 3.5,

Slide 1 Math 1520, Lecture 10

Introduction to Operations Research Prof. G. Srinivasan Department of Management Studies Indian Institute of Technology, Madras

Contents. 4.5 The(Primal)SimplexMethod NumericalExamplesoftheSimplexMethod

MATH 445/545 Test 1 Spring 2016

Chapter 5 Linear Programming (LP)

2. Linear Programming Problem

Farkas Lemma, Dual Simplex and Sensitivity Analysis

Paper Name: Linear Programming & Theory of Games. Lesson Name: Duality in Linear Programing Problem

The simplex algorithm

Finite Mathematics MAT 141: Chapter 4 Notes

The Dual Simplex Algorithm

GETTING STARTED INITIALIZATION

Theory of Linear Programming

The Simplex Method of Linear Programming

Chapter 3, Operations Research (OR)

LINEAR PROGRAMMING 2. In many business and policy making situations the following type of problem is encountered:

Civil Engineering Systems Analysis Lecture XII. Instructor: Prof. Naveen Eluru Department of Civil Engineering and Applied Mechanics

Part 1. The Review of Linear Programming

Example. 1 Rows 1,..., m of the simplex tableau remain lexicographically positive

"SYMMETRIC" PRIMAL-DUAL PAIR

The Graphical Method & Algebraic Technique for Solving LP s. Métodos Cuantitativos M. En C. Eduardo Bustos Farías 1

Math 1324 Review 2(answers) x y 2z R R R

The Simplex Algorithm

LINEAR PROGRAMMING. Introduction

1 Review Session. 1.1 Lecture 2

Transcription:

The Simple Method Gauss-Jordan Elimination for Solving Linear Equations Eample: Gauss-Jordan Elimination Solve the following equations: + + + + = 4 = = () () () - In the first step of the procedure, we use the first equation to eliminate from the other two equations.

Gauss-Jordan Elimination - Such steps are called elementary row operations 5 + + + = 4 = 5 = () () () - In the second step of the procedure, we divide the second equation by -5 to make the coefficient of equal to. - Then, we use this equation to eliminate from equations and. This yields the following new system of equations: Gauss-Jordan Elimination + 7 / 5 / 5 / 5 = = = 0 () () () Finally, in he last step of the procedure, we use equation to eliminate in equations and. = = = 0 () () ()

Gauss-Jordan Elimination - linear systems of equations do not always have a unique solution and it is important to identify such situations. Eample Solve the following equations: + + = 4 + + = + + = - First we eliminate from equations and + + = 4 + + = = 6 () () () () () () Gauss-Jordan Elimination - Then we eliminate from equations and. 0 + = = = () () () - Equation shows that the linear system has no solution.

Eample + + Gauss-Jordan Elimination + + + Solve the following equations: = = + - Doing the same as above, we end up with: 0 + = = = 0 4 = 5 () () () () () () Gauss-Jordan Elimination - Now equation is an obvious equality. It can be discarded to obtain: = () = - The system has infinitely many solutions. + () It is generally true that a system of m linear equations in n variables has either: (a) No solution, (b) A unique solution, (c) Infinitely many solutions. 4

The Simple Method Simple method for solving linear programming is based fundamentally on the idea that the optimum solution is always associated with a corner point of the solution space. The simple method always starts at a feasible corner point of the feasible region, and always passes through an adjacent feasible corner point, checking each point for optimality before moving to a new one. Basically, this method gives a systematic way of moving from one corner to another one in the feasible region in such a way that the value of the objective function increases until an optimum value is reached or it is discovered that no solution eists. The Essence of The Simple Method - The four corner points are called corner-point feasible solutions. - The other five corner points are called corner-point infeasible solutions. 5

The Essence of The Simple Method Properties of the CPF solutions - If there is eactly one optimal solution, then it must be a CPF solution. - If there are multiple optimal solutions, then at least two must be adjacent CPF feasible solutions. - There are only a finite number of CPF solutions. - If a CPF solution has no adjacent CPF solution that are better as measured by the objective function, then there are no better CPF solutions anywhere; i.e., it is optimal. The Essence of The Simple Method The general structure of a simple method is as follow: 6

Setting Up The Simple Method The standard form to solve the simple method: - Where the objective is maimized, the constraints are equalities and the variables are all nonnegative. Setting Up The Simple Method If the problem is not in the standard form: - If the problem is min Z, convert it to ma - Z. - If a constraint is a i + a i +. + a in n b i, convert it into an equality constraint by adding a nonnegative slack variable s i. The resulting constraint is: a i + a i +. + a in n + s i = b i, where s i 0. - If a constraint is a i + a i +. + a in n b i, convert it into an equality constraint by subtracting a nonnegative surplus variable s i. The resulting constraint is: a i + a i +. + a in n - s i = b i, where s i 0. 7

If the problem is not in the standard form: If some variable j is unrestricted in sign, replace it everywhere in the formulation by j j, where j 0 and j 0. Eample Setting Up The Simple Method Transform the following linear program into standard form Minimize - + - + - + is unrestricted; 0; 0 Setting Up The Simple Method - Let us first turn the objective into a ma and the constraints into equalities. Maimize - - + + s = - + s = is unrestricted; 0; 0; s 0; s 0 - The last step is to convert the unrestricted variable into two nonnegative variables; where: =. 8

Setting Up The Simple Method - Then, the system of equations is transferred as follow: Maimize - - - - + + s = - + + - s = 0; 0; 0; 0; s 0; s 0 This form is called the augmented form Solution Using The Simple Method - Eample: Ma + (0) + 4 () + () 0; 0 Standard format: Ma + (0) + + s = 4 () + + s = () 0; 0 s 0; s 0 9

Solution Using The Simple Method - The augmented form: z - - = 0 Row ( 0) + + s = 4 Row () + + s = Row () The variables (other than the special variable z) which appear in only one equation are called basic variables. We solve these equation for the basic variables while assuming values for the non-basic variables (variables appeared in all equations). Initial basic feasible solutions: = = 0; s = 4; s = ; z = 0 Solution Using The Simple Method F E Z = 7/ D A B C Z = Z = 0 0

Solution Using The Simple Method - Optimality test - Rule : If all variables have a nonnegative coefficient in Row 0, the current basic feasible solution is optimal. Otherwise, pick a variable with a negative coefficient in Row 0. - Identify the entering basic variable (highest negative coefficient) - Identify where to stop - Leaving basic variable Solution Using The Simple Method - z - - = 0 - Entering Basic variable - So, setting = 0, yields the following solution = 0 s = 4 - s = - - Thus, can be increased just to, at which point s dropped to zero - s Leaving Basic variable

Solution Using The Simple Method - Solving for the new basic feasible solution - Increasing = 0 to = moves us from the initial basic feasible solution on the left to the new basic feasible solution on the right Initial New Non-basic variables: = 0, = 0 = 0, s = 0 Basic variable: s = 4, s = =, s =? Solution Using The Simple Method - Then, solve these equations for the basic variables and s z - - = 0 Row 0 + + s = 4 Row + + s = Row These yields z - ½ + ½s = Row 0 + ½ + ½s = Row / ½s + s = Row - With basic solution = s = 0; = ; s = ; z =

Solution Using The Simple Method F E Z = 7/ D A B C Z = Z = 0 Solution Using The Simple Method - Rule : For each Row i, i, where there is a strictly positive entering variable coefficient", compute the ratio of the Right Hand Side to the entering variable coefficient". Choose the pivot row as being the one with Minimum ratio - Optimality test - z - ½ + ½s = - Choose as entering basic variable, apply minimum ratio test: /(/) = 4 (row ); /(/) = / (row ), then s is the leaving variable

Solution Using The Simple Method - z - ½ + ½s = Row 0 + ½ + ½s = Row / ½s + s = Row - Thus yields; z + /s + /s = 7/ Row 0 + /s - /s = 5/ Row - /s + /s = / Row - With basic solution s = s = 0; = 5/; = /; z = 7/ The Simple Method in Tabular Format z - - = 0 + + s = 4 + + s = Coefficient of z s s z - - 0 0 0 Basic variables s 0 s 0 0 0 Right-hand side (solution) 4; 4/= ; /= 4

The Simple Method in Tabular Format New row = old row (pivot column coefficient new pivot row) Old row (z) ( - - 0 0 0) Pivot column coefficient - (0 ½ ½ 0 ) New row ( 0 -/ ½ 0 ) Basic variables Coefficient of Right-hand side z s s (solution) z - - 0 0 0 s s 0 0 0 0 4 z 0 -/ / 0 0 s 0 0 ½ / ½ -/ 0 ; /(/) = 4 ; /(/) = / The Simple Method in Tabular Format - All these calculation could be arranged as follow: 5

Eample on The Simple Method - A farmer owns a 00-acre farm and plans to plant at most three crops. The seed for crops A, B, and C costs LE 40, LE 0, and LE 0 per each acre, respectively. A maimum of LE 00 can be spent on seed. Crops A, B, and C require,, and work days per acre, respectively, and there are a maimum of 60 workdays available. If the farmer can make a profit LE 00 per acre on crop A, LE 00 per acre on crop B and LE 00 per acre on crop C, how many acres of each crop should be planted to maimize profit. Eample on The Simple Method Solution: - Decision Variables: - Let = number of acres of crop A. - Let = number of acres of crop B. - Let = number of acres of crop C. - Objective function: Maimize : Z= 00 + 00 + 00 6

Eample on The Simple Method - Subject to the constraints: + + 00 40 + 0 + 0 00 + + 60 0 ; 0 ; 0 Eample on The Simple Method The standard form: Z 00 00 00 = 0 + + + s = 00 40 + 0 + 0 + s = 00 + + + s = 60 0 ; 0 ; 0 ; s 0 ; s 0 ; s 0 7

The Simple Tableau Basic Variables Coefficient of Z s s s R.H.S Ratio Z -00-00 -00 0 0 0 0 R0 (objective) s 0 0 0 00 00 / = 00 R (constraint ) s 0 40 0 0 0 0 00 00 / 0 = 60 R (constraint ) s 0 0 0 60 60 / = 80 R (constraint ) Rn 0 0.5 0.5 0 0 0.5 80 The Simple Tableau Basic Variables Coefficient of Z s s s R.H.S Ratio Z 50 0-50 0 0 50 4000 R0n = (R0+00Rn) s 0 0.5 0 0.5 0-0.5 0 0 / 0.5 = 40 Rn = (R-Rn) s 0 0 0 0 0-0 600 600 / 0 = 80 Rn = (R-0Rn) 0 0.5 0.5 0 0 0.5 80 80 / 0.5 = 60 Rn = (0.5R) Rn 0 0 0-40 8

The Simple Tableau Basic Variables Coefficient of Z s s s R.H.S Z 00 0 0 00 0 00 6000 R0 = (R0n+50R) 0 0 0-40 R = (Rn) s 0 0 0 0-40 0 800 R = (Rn-0R) 0 0 0-0 60 R = (Rn-0.5R) = 0, = 60, = 40, s = 0, s = 800, s = 0, Z = LE 6000 Special Cases - Tie for the Entering Basic Variables : Maimize + 0 ; 0 + 4 + Standard form z - - = 0 + + s = 4 + + s = 0 ; 0 ; s 0 ; s 0 9

Special Cases - Tie for the Entering Basic Variables : - Start solution with any of or Special Cases - Alternate Optimal Solutions: Maimize + / + 4 + 0 ; 0 Standard form z - - / = 0 + + s = 4 + + s = 0 ; 0 ; s 0 ; s 0 0

Special Cases - Alternate Optimal Solutions: It is noted that the solution is finished but it may to get other optimal solution as follows: Special Cases - Alternate Optimal Solutions:

Special Cases - Degeneracy (Tie for the Leaving Basic Variable): Maimize + + 6-0 ; 0 Standard form z - = 0 + + s = 6 - + s = + s = 0 ; 0 ; s 0 ; s 0 ; s 0 Special Cases - Degeneracy (Tie for the Leaving Basic Variable): - Basic variables with a value of zero are called degenerate, and the same term is applied to same corresponding feasible solution

Special Cases - Degeneracy (Tie for the Leaving Basic Variable): Special Cases 4- Unbounded Optimum (No leaving basic variable): Maimize + - + 0 ; 0 Standard form z - = 0 - + + s = + s = 0 ; 0 ; s 0 ; s 0 ; s 0

Special Cases 4- Unbounded Optimum (No leaving basic variable): Special Cases 5- Infeasible solution: Maimize + + 4 + 0 ; 0 4

Special Cases 5- Infeasible solution: - It can be seen that infeasible solutions are characterized by the presence of at least one negative valued variable. Accordingly, any solution to a linear program is infeasible if any variable in the augmented form of a given problem is negative at that solution. Special Cases 6- Equality Constraints: Any equality can be substituted by two inequality constraints. For eample: a + a +.. + a n n = b is equivalent to: a + a +.. + a n n b and a + a +.. + a n n b Dealing with equality constraints will be discussed on the following eample. 5

Special Cases 6- Equality Constraints: Maimize + 5 4 + = 8 0 ; 0 The augmented form becomes z 5 = 0 + s = 4 + s = + = 8 0 ; 0 ; s 0 ; s 0 Special Cases 6- Equality Constraints: Equation does not have a basic variable. Accordingly, a nonnegative artificial variable is introduced as slack variable for Eq. (). Then, Eq. () becomes: + + s = 8 6

Special Cases 6- Equality Constraints: To bring s to zero, a huge number is multiplied by s and then subtracted from the objective function. Thus the objective function becomes: z = + 5 M s The added value "M" is called "the big M method". Then, maimum z occurs only when s = 0. When forming the simple tableau, it looks as follow: Special Cases 6- Equality Constraints: Equation (0) has two basic variables z and s. So, each basic variable should be eliminated from Eq. (0) ecept the "z". z ( + M) - (5 + M) = -8 M 7

6- Equality Constraints: Special Cases Special Cases 7- The Inequality Constraints Minimize Z = 0.4 + 0.5 Subject to 0. + 0..7 0.5 + 0.5 = 6 0.6 + 0.4 6 0 ; 0 0.6 + 0.4 6 Change to: 0.6 + 0.4 - s = 6 ( s 0 ) Then: 0.6 + 0.4 - s + s 4 = 6 ( s 0, s 4 0 ) 8

Special Cases 7- The Inequality Constraints Maimize - Z = - 0.4-0.5 Subject to 0. + 0. + s =.7 0.5 + 0.5 = 6 0.6 + 0.4 - s = 6 0 ; 0; s 0 ; s 0. Maimize - Z + 0.4 + 0.5 + M s + M s 4 = 0 Subject to 0. + 0. + s =.7 0.5 + 0.5 + s = 6 0.6 + 0.4 - s + s 4 = 6 0 ; 0; s 0 ; s 0; s 4 0. Special Cases 7- The Inequality Constraints Equation (0) has three basic variables z, s, and s 4. So, each basic variable should be eliminated from Eq. (0) ecept the "z". To eliminate s and s 4 from Eq. (0), subtract M times Eqs. () and () from Eq. (0), thus yields: -Z + (0.4. M) + (0.5 0.9 M) + M s = - M 9

Special Cases 7- The Inequality Constraints Then, the resulting initial simple tableau as follow: Then, applying the simple method as usual as presented: Special Cases 7- The Inequality Constraints 0

Sensitivity Analysis - The sensitivity analysis measures how sensitive is the optimal solution to the change in the resources values (right hand side of the constraints), i.e., by changing the resource limits, would the optimal solution be changed and to what limit. This is called right hand side sensitivity analysis. Also, it measures the sensitivity of an optimal solution to changes in the values of the coefficients that multiply the decision variables in the objective function. This is called objective function sensitivity analysis. Sensitivity Analysis Right-Hand Side Sensitivity Maimize Z = 40 + 60 Subject to: + 4 8 5 + 5 50 8 6 0 ; 0

Sensitivity Analysis Right-Hand Side Sensitivity Sensitivity Analysis Objective Function Sensitivity