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

Similar documents
Chapter 4 The Simplex Algorithm Part I

The Simplex Algorithm and Goal Programming

ECE 307 Techniques for Engineering Decisions

Week 3: Simplex Method I

Chapter 4 The Simplex Algorithm Part II

Math Models of OR: Some Definitions

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

TIM 206 Lecture 3: The Simplex Method

Part 1. The Review of Linear Programming

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

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

February 22, Introduction to the Simplex Algorithm

1 Review Session. 1.1 Lecture 2

Simplex Method for LP (II)

(includes both Phases I & II)

CPS 616 ITERATIVE IMPROVEMENTS 10-1

Simplex Algorithm Using Canonical Tableaus

Lesson 27 Linear Programming; The Simplex Method

Chapter 5 Linear Programming (LP)

(includes both Phases I & II)

"SYMMETRIC" PRIMAL-DUAL PAIR

9.1 Linear Programs in canonical form

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

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

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

AM 121: Intro to Optimization

Chap6 Duality Theory and Sensitivity Analysis

In Chapters 3 and 4 we introduced linear programming

AM 121: Intro to Optimization Models and Methods Fall 2018

F 1 F 2 Daily Requirement Cost N N N

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

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

Linear & Integer programming

Sensitivity Analysis

A Review of Linear Programming

3. THE SIMPLEX ALGORITHM

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

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

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

The Simplex Method. Formulate Constrained Maximization or Minimization Problem. Convert to Standard Form. Convert to Canonical Form

Linear Programming Redux

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

IE 5531: Engineering Optimization I

IE 400: Principles of Engineering Management. Simplex Method Continued

The dual simplex method with bounds

Review Solutions, Exam 2, Operations Research

CO350 Linear Programming Chapter 8: Degeneracy and Finite Termination

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

Optimization Methods in Management Science

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

Linear Programming, Lecture 4

Simplex tableau CE 377K. April 2, 2015

OPERATIONS RESEARCH. Linear Programming Problem

4. Duality and Sensitivity

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

Contents. 4.5 The(Primal)SimplexMethod NumericalExamplesoftheSimplexMethod

MAT016: Optimization

TRANSPORTATION PROBLEMS

Lecture 5 Simplex Method. September 2, 2009

The Simplex Algorithm

CO350 Linear Programming Chapter 6: The Simplex Method

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

Chapter 3, Operations Research (OR)

Introduction to the Simplex Algorithm Active Learning Module 3

MATH 4211/6211 Optimization Linear Programming

MATH2070 Optimisation

OPTIMISATION 3: NOTES ON THE SIMPLEX ALGORITHM

Fundamental Theorems of Optimization

min3x 1 + 4x 2 + 5x 3 2x 1 + 2x 2 + x 3 6 x 1 + 2x 2 + 3x 3 5 x 1, x 2, x 3 0.

OPRE 6201 : 3. Special Cases

Operations Research Lecture 2: Linear Programming Simplex Method

Systems Analysis in Construction

LP. Lecture 3. Chapter 3: degeneracy. degeneracy example cycling the lexicographic method other pivot rules the fundamental theorem of LP

Week_4: simplex method II

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

Developing an Algorithm for LP Preamble to Section 3 (Simplex Method)

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

ORF 307: Lecture 2. Linear Programming: Chapter 2 Simplex Methods

THE STEPS OF THE SIMPLEX ALGORITHM

Lecture 2: The Simplex method

ORF 522. Linear Programming and Convex Analysis

Farkas Lemma, Dual Simplex and Sensitivity Analysis

Lecture slides by Kevin Wayne

AM 121: Intro to Optimization Models and Methods

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

3 The Simplex Method. 3.1 Basic Solutions

February 17, Simplex Method Continued

Summary of the simplex method

c) Place the Coefficients from all Equations into a Simplex Tableau, labeled above with variables indicating their respective columns

IE 5531: Engineering Optimization I

Section Notes 9. IP: Cutting Planes. Applied Math 121. Week of April 12, 2010

Linear Programming: Simplex Algorithm. A function of several variables, f(x) issaidtobelinear if it satisþes the two

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

Math Models of OR: Extreme Points and Basic Feasible Solutions

Linear programs Optimization Geoff Gordon Ryan Tibshirani

Algebraic Simplex Active Learning Module 4

56:270 Final Exam - May

+ 5x 2. = x x. + x 2. Transform the original system into a system x 2 = x x 1. = x 1

Linear Programming for Planning Applications

CHAPTER 2. The Simplex Method

Transcription:

IE 4 Principles of Engineering Management The Simple Algorithm-I: Set 3

So far, we have studied how to solve two-variable LP problems graphically. However, most real life problems have more than two variables! Therefore, we need to have another method to solve LPs with more than two variables. We are going to study The Simple Algorithm which is quite useful in solving very large LP problems. Today, The Simple Algorithm is used to solve LP problems in many industrial applications that involve thousands of variables and constraints.

LP problems can have both equality and inequality constraints. LP problems can have nonnegative and urs (unrestricted in sign) variables. To use the Simple Method, LP problems should be converted to Standard Form LP.

Standard Form LP: Why? We know from 2-variables that etreme points are potential optimal solutions This will be true in higher dimensions as well We need an ALGERAIC way of characterizing etreme points. We can t draw the feasible region in higher dimensions Standard form LPs will provide an easy way to do this characterization All constraints are equalities, with constant nonnegative right-hand sides (RHS), All variables are nonnegative. Any LP can be brought into standard form!

Simple Method: Start with an etreme point Move to a neighboring etreme point in the improving direction Stop if all neighbors are no better Simple Greedy Logic How to find a feasible etreme point? How to go to a neighbor?

Converting LP into Standard Form: E: Consider the following LP problem: ma + 3 2 s.t. 2 + 3 2 + 3 5 () 4 + 2 + 2 3 = - (2) 3 + 4 2 + 2 3 8 (3), 2, 3 urs (free)

Converting LP into Standard Form: a) Define a slack variable for each of the constraint to convert the inequality constraint into an equality constraint: s = 5-2 - 3 2-3, s () So that, the first constraint becomes: 2 + 3 2 + 3 + s = 5 ()

Converting LP into Standard Form: b) Multiply the second constraint by - to get a nonnegative right hand side value, i.e. replace 4 + 2 + 2 3 = - (2) with: -4-2 - 2 3 = (2)

Converting LP into Standard Form: c) Define an ecess (surplus) variable for each of the constraints to convert the inequality constraint into an equality constraint: e 3 = 3 + 4 2 + 2 3-8, e 3 (3) So that, the third constraint becomes: 3 + 4 2 + 2 3 - e 3 = 8 (3)

Converting LP into Standard Form: d) Variable 2 has a reverse sign restriction: Replace 2 with - 2 throughout. If 2 is nonpositive then - 2 will be nonnegative

Converting LP into Standard Form: e) Variable 3 is unrestricted in sign: Replace 3 with 3-3 and force both 3 and 3 to both be nonnegative

Converting LP into Standard Form: ma + 3 2 ma z= - 3 2 s.t. 2 + 3 2 + 3 5 () s.t. 2-3 2 + 3 3 + s = 5 () 4 + 2 + 2 3 = - (2) -4 + 2-2 3 + 2 3 = (2) 3 + 4 2 + 2 3 8 (3) 3-4 2 + 2 3-2 3 - e 3 = 8 (3), 2, 3 urs, 2, 3, 3, s, e 3.

To Convert an LP into Standard Form: each inequality constraint is converted into an equality constraint by adding or subtracting nonnegative slack/ecess variables, an inequality (equality) can be multiplied by - to get nonnegative RHS, unrestricted variable can be represented as the difference of two new nonnegative variables. If i is urs, then let i = i - i where i, i. Replace every occurrence of i with restrictions i, i. i - i and add sign For sign restriction k, let k = - k and replace every occurrence of k with - k and add the sign restriction k.

Standard Form LP: Suppose that we converted an LP with m constraints into a standard form. Also assume that after the conversion, we have n variables as, 2, 3,, n.

Standard Form LP: Suppose that we converted an LP with m constraints into a standard form. Also assume that after the conversion, we have n variables as, 2, 3,, n.,2,...,n i b a a a b a a a b a a a s.t. c c c ma (min) i m mn 2 m2 m 2 2n 2 22 2 n n 2 2 n 2 2 n n n

Standard Form LP: If we define: n 2 2 mn m2 m 2n 22 2 n 2 b b b b, and a a a a a a a a a A n

Standard Form LP: If we define: n 2 2 mn m2 m 2n 22 2 n 2 b b b b, and a a a a a a a a a A n LP can be written as the system of equations : A=b

Standard Form LP: For A=b to have a solution, rank (A b)=rank (A). We also assume that all redundant constraints are removed, so rank(a)=m. i.e. + 2 2 + 3 = 4 () 2-3 = (2) 2 + 6 2 = (3)

Standard Form LP: For A=b to have a solution, rank (A b)=rank (A). We also assume that all redundant constraints are removed, so rank(a)=m. i.e. + 2 2 + 3 = 4 () 2-3 = (2) Constraint (3) can be written as a linear combination of () and (2): 2 [()+(2)] = (3) 2 + 6 2 = (3) Remove the redundant constraint

Standard Form LP: efore proceeding any further with the discussion of the simple algorithm, we should define the concept of a basic solution to a linear system. asic Solution: A solution to A=b is called a basic solution if it is obtained by setting n-m variables equal to and solving for the remaining m variables whose columns are linearly independent.

Standard Form LP: The n-m variables whose values are set to are called nonbasic variables. The remaining m variables are called basic variables.

Standard Form LP: For A=b, where A is a m n matri, rank(a)=m, b, pick m linearly independent columns from A, rearrange A such that these chosen columns are the first m columns in A.

Standard Form LP: For A=b, where A is a m n matri, rank(a)=m, b, pick m linearly independent columns from A, rearrange A such that these chosen columns are the first m columns in A. Since elementary column and row operations do not change the system of linear equations, matri A can be brought into a form A=[ m m N m (n-m) ], where m m is invertible.

Standard Form LP: Let be the corresponding partition in. N b N b N b A N N

Standard Form LP: Let be the corresponding partition in. N A b N b N b N N If we set N, then - b will be a unique solution. For every such choice, a unique solution - b.

Standard Form LP: If a basic solution - b, then iscalleda basic feasiblesolution (bfs).

asic Solutions: Consider the system of equations: + 2 + 3 = 6 2 + 4 = 3, 2, 3, 4

asic Solutions: Consider the system of equations: + 2 6 2 3, 2 (a) Converting into a standard form LP: + 2 + 3 = 6 2 + 4 = 3, 2, 3, 4 (b)

2 (,6) (,3) (3,3) 2 = 3 Feasible Region (4) (,) (6,) (3) + 2 = 6

asic Solutions: Consider the system of equations: + 2 + 3 = 6 2 + 4 = 3, 2, 3, 4 3 6 b A 4 3 2

asic Solutions:. Let us chose: 4 3 N 2 The columns are linearly independent A

asic Solutions:. Let us chose: 2 N 3 4 The columns are linearly independent Setting N and solving for : b - b

asic Solutions:. Let us chose: 4 3 N 2 The columns are linearly independent b b : for solving and Setting - N 3 3 3 6-3 6 3 6 2 2

asic Solutions: bfs. is a 3 3, 3 3 Since N 2

asic Solutions: 2. 4 2 N 3 The columns are Linearly dependent! Let us consider different ways of forming :

2. asic Solutions: Let us consider different ways of forming : 3 N 2 4 The columns are Linearly dependent! Hence the choice of 3 cannot be a basic solution.

asic Solutions: 3. Let us chose: 3 2 N 4 The columns are linearly independent

asic Solutions: 3. Let us chose: 3 2 N 4 The columns are linearly independent : and solvingfor Setting N bfs. is a 3 6 3 6 3 6 b -

asic Solutions: 4. Let us chose: 4 N 3 2 The columns are linearly independent

asic Solutions: 4. Let us chose: 4 N 3 2 The columns are linearly independent : and solvingfor Setting N bfs. is a 3 3 3 3 3 6 - b -

asic Solutions: 5. Let us chose: 3 N 4 2 The columns are linearly independent

asic Solutions: 5. Let us chose: 3 N 4 2 The columns are linearly independent : and solvingfor Setting N, 3 6 3 6 3 6 - b -

asic Solutions: 5. Let us chose: 3 N 4 2 The columns are linearly independent : and solvingfor Setting N, 3 6 3 6 3 6 - b - This basic solution is not feasible!

asic Solutions: 6. Let us chose: 2 N 4 3 The columns are linearly independent

asic Solutions: 6. Let us chose: 2 N 4 3 The columns are linearly independent : and solvingfor Setting N bfs. is a 3 6 3 6 3 6 b -

asic Feasible Solutions: So, this system of equations has 4 basic feasible solutions: 3 6, 3 3, 3 6, 3 3

(,3) 2 = 3 2 + 2 = 6 (,) =( 3, 4 ) A (6,) (,6) (3,3) Feasible Region 3 6, 3 3, 3 6, 3 3 Recall previously determined bfs: =(, 4 ) =(, 2 ) =( 2, 3 ) C D A D C

asic Feasible Solutions: The number of basic feasible solutions m n

Theorem: A point in the feasible region of an LP is an etreme point if and only if it is a basic feasible solution to the LP.

Fundamental Theorem of LP: If feasible set of an LP is non-empty, then there is at least one bfs. If an LP has an optimal solution, then there is a bfs which is optimal.

This Theorem Implies: Finding an optimal solution to an LP problem is equivalent to finding the best bfs! The number of bfs m n Therefore, we should search for the best bfs.

One way is to enumerate all bfs and choose the one that gives he best objective function value.

One way is to enumerate all bfs and choose the one that gives he best objective function value. However, enumerating all bfs can be very epensive! For eample, for n 2 and m, n m is 84756!

Simple Algorithm does this in a clever way. Usually it finds an optimal solution within 3m enumeration.

Neighboring etreme points (bfs solutions): For any LP with m constraints, two bfs are said to be adjacent if their set of basic variables have m- basic variables in common. (Intuitively, two bfs are adjacent if they both lie on the same edge of the boundary of the feasible region) Simple Algorithm goes from an etreme point to an adjacent etreme point with a better objective value.

(,3) 2 = 3 2 + 2 = 6 (,) () (3) =( 3, 4 ) A (6,) (,6) (3,3) Feasible Region =(, 4 ) =(, 2 ) =( 2, 3 ) C D A D C 3 6, 3 3, 3 6, 3 3 Recall previously determined bfs:

General Description of the Simple Algorithm:. Convert the LP problem into a standard form LP. 2. Obtain a bfs to the LP. This bfs is called the initial bfs. In general, the most recent bfs is called the current bfs. Therefore, at the beginning the initial bfs is the current bfs.

General Description of the Simple Algorithm: 3. Determine if the current bfs is an optimal solution or not. 4. If the current bfs is not optimal, then find an adjacent bfs with a better objective function value (one nonbasic variable becomes basic and one basic variable becomes nonbasic). 5. Go to Step 3.

The Simple Algorithm: To begin the simple algorithm, convert the LP into a standard form, Convert the objective function z=c +c 2 2 + + c n n to the row- format: z-c -c 2 2 - - c n n =

The Simple Algorithm: ma z= + 3 2 ma z s.t. + 2 6 () s.t. z - - 3 2 = () - + 2 2 8 (2) + 2 + s = 6 (), 2 - + 2 2 + s 2 = 8 (2), 2,s,s 2

2 (-8,) (2) (4) () (,6) (,4) (,) A (3) (4/3,4/3) C Feasible Region (6,) D (2) - + 2 2 = 8 asic feasible solutions 4 3 6 4 4,,, 6 2 3 8 4 A C D (4) (3) () + 2 = 6

The Simple Algorithm Canonical Form : Row asic Variable z - - 3 2 = + 2 + s = 6 2 - + 2 2 + s 2 = 8 RHS A system of linear equations in which each equation has a variable with a coefficient in that equation ( and a zero coefficient in all other equations) is said to be in canonical form. If the RHS of each constraint in a canonical form is nonnegative, a basic feasible solution can be obtained by inspection.

The Simple Algorithm Recall that the Simple Algorithm begins with an initial bfs and attempts to find better ones. After obtaining a canonical form, we search for the initial bfs. y inspection, if we set = 2 =, we can solve for the values of s and s 2 by setting s i equal to the RHS of row i. V={s,s 2 } and NV={, 2 }

The Simple Algorithm You may also verify the calculations for the initial basic feasible solution by: s s 2 2 N The columns are linearly independent b b : for solving and Setting - N 8 6 8 6 8 6 s s 8 6 s s 2 2

The Simple Algorithm Notice that each basic variable is associated with the row of the canonical form in which the basic variable has a coefficient of. To perform the simple algorithm, we also need a basic variable (not necessarily nonnegative!) for row. Observe that variable z appears in row with a coefficient of, and z does not appear in any other row. Therefore, we use z as basic variable for row.

The Simple Algorithm Let us denote the initial canonical form as canonical form. With this convention, the basic and nonbasic variables for the canonical form are V={z,s,s 2 } and NV={, 2 }. For this basic feasible solution, z=, s =6, s 2 =8, =, 2 =.

The Simple Algorithm In summary, the canonical form: LP has equality constraints and nonnegativity constraints, There is one basic variable for each equality constraint, The column for the basic variable for constraint i has a in constraint i and s elsewhere, The remaining variables are called nonbasic.

The Simple Algorithm Canonical Form : Row asic Variable z - - 3 2 = + 2 + s = 6 2 - + 2 2 + s 2 = 8 RHS

The Simple Algorithm Canonical Form : Row asic Variable z= z - - 3 2 = s =6 + 2 + s = 6 2 s 2 =8 - + 2 2 + s 2 = 8 RHS Is this current basic feasible solution optimal? To answer this question, we should determine whether there is any way that z can be increased by increasing some nonbasic variable from its current value of zero while holding all other nonbasic variables at their current values of zero (To reach an adjacent bfs).

The Simple Algorithm Canonical Form : Row asic Variable z= z - - 3 2 = s =6 + 2 + s = 6 2 s 2 =8 - + 2 2 + s 2 = 8 RHS

The Simple Algorithm Canonical Form : Row asic Variable z= z - - 3 2 = s =6 + 2 + s = 6 2 s 2 =8 - + 2 2 + s 2 = 8 RHS Row : z- - 3 2 = if is increased by unit, z increases by unit if 2 is increased by unit, z increases by 3 units So we choose 2 as the entering variable. If 2 is to increase from its current value of zero, it has to become a basic variable.

The Simple Algorithm For a ma. problem, the entering variable has a negative coefficient in row. Usually we choose the variable with the most negative coefficient to be the entering variable (ties may be broken in an arbitrary fashion). 2 will become basic. Therefore, one basic variable should become nonbasic. This will be the leaving variable.

The Simple Algorithm Increasing 2 may cause a basic variable to become negative. We look at how increasing 2 (while holding =) changes the values of current set of basic variables: + 2 + s = 6 = 2 + s = 6 - + 2 2 +s 2 = 8 2 2 +s 2 = 8 =

The Simple Algorithm As s, s = 6-2 2 6 As s 2, s 2 = 8-2 2 2 4 So, 2 can be at most 4 (otherwise s 2 would become negative!)

The Simple Algorithm Observe that for any row in which the entering variable has a positive coefficient, the row s basic variable becomes negative if the entering variable eceeds: Right Hand Side of row Coefficien t of entering variable in row

The Simple Algorithm Ratio Test: When entering a variable into the basis, for every row i in which the entering variable has a positive coefficient, we compute the ratio: Coefficien RHS of row i t of entering variable in row i, and determine the smallest one. The smallest ratio is the largest value of the entering variable that will keep all the current basic variables nonnegative.

The Simple Algorithm Canonical Form : Row asic Variable z= z - - 3 2 = s =6 + 2 + s = 6 2 s 2 =8 - + 2 2 + s 2 = 8 RHS If 2 =4, then s 2 = and s =2. Therefore s 2 is the leaving variable and becomes nonbasic. New basic variables = {s, 2 }; and new nonbasic variables = {,s 2 } Hence, new z = +3 2 =2.

The Simple Algorithm Canonical Form : Row asic Variable z= z - - 3 2 = s =6 + 2 + s = 6 2 s 2 =8 - + 2 2 + s 2 = 8 leaving variable entering variable Always make the entering variable a basic variable in a row that wins the ratio test (ties may be broken arbitrarily). RHS

The Simple Algorithm Canonical Form : Row asic Variable z z - - 3 2 = s =6 + 2 + s = 6 2 s 2 =8 - + 2 2 + s 2 = 8 leaving variable entering variable Always make the entering variable a basic variable in a row that wins the ratio test (ties may be broken arbitrarily). RHS

The Simple Algorithm Canonical Form : Row asic Variable z z - - 3 2 = s + 2 + s = 6 2 s 2 =8 - + 2 2 + s 2 = 8 leaving variable entering variable Always make the entering variable a basic variable in a row that wins the ratio test (ties may be broken arbitrarily). RHS

The Simple Algorithm Row asic Variable z z - - 3 2 = s + 2 + s = 6 2 - + 2 2 + s 2 = 8 RHS Always make the entering variable a basic variable in a row that wins the ratio test (ties may be broken arbitrarily).

The Simple Algorithm Row asic Variable z z - - 3 2 = s + 2 + s = 6 2 2 - + 2 2 + s 2 = 8 entering variable Always make the entering variable a basic variable in a row that wins the ratio test (ties may be broken arbitrarily). RHS

The Simple Algorithm Row asic Variable z z - - 3 2 = s + 2 + s = 6 2 2 - + 2 2 + s 2 = 8 entering variable Always make the entering variable a basic variable in a row that wins the ratio test (ties may be broken arbitrarily). To make 2 a basic variable in row 2, we use elementary row operations to make 2 has a coefficient of in row 2 and coefficient of in all other rows. RHS

The Simple Algorithm Row asic Variable z z - - 3 2 = s + 2 + s = 6 2 2 - + 2 2 + s 2 = 8 entering variable Always make the entering variable a basic variable in a row that wins the ratio test (ties may be broken arbitrarily). To make a basic variable in row 2, we use elementary row operations to make has a coefficient of in row 2 and coefficient of in all other rows. This procedure is called pivoting on row 2. RHS

The Simple Algorithm Row asic Variable z z - - 3 2 = s + 2 + s = 6 2 2 - + 2 2 + s 2 = 8 entering variable Pivoting: Purpose is to rewrite the original problem in an equivalent form where columns corresponding to basic variables form an identity matri. This allows us to determine the values of entering and leaving variables in the new solution. RHS

The Simple Algorithm Row asic Variable z z - - 3 2 = s + 2 + s = 6 2 2 - + 2 2 + s 2 = 8 RHS We may perform elementary row operations step by step, starting from the pivot row, one row at a time.

The Simple Algorithm Row asic Variable z z - - 3 2 = s + 2 + s = 6 2 2 - + 2 2 + s 2 = 8 RHS To make 2 has a coefficient of in row 2: multiply row 2 by.5

The Simple Algorithm Row asic Variable z z - - 3 2 = s + 2 + s = 6 2 2 -.5 + 2 +.5 s 2 = 4 RHS To make 2 has a coefficient of in row 2: multiply row 2 by.5

The Simple Algorithm Row asic Variable z z - - 3 2 = s + 2 + s = 6 2 2 -.5 + 2 +.5 s 2 = 4 RHS To make 2 has a coefficient of in row : replace row with row row 2

The Simple Algorithm Row asic Variable z z - - 3 2 = s.5 + s -.5 s 2 = 2 2 2 -.5 + 2 +.5 s 2 = 4 RHS To make 2 has a coefficient of in row : replace row with row row 2

The Simple Algorithm Row asic Variable z z - - 3 2 = s.5 + s -.5 s 2 = 2 2 2 -.5 + 2 +.5 s 2 = 4 RHS To make 2 has a coefficient of in row : replace row with row + 3 (row 2)

The Simple Algorithm Row asic Variable RHS z z - 2.5 +.5 s 2 = 2 s.5 + s -.5 s 2 = 2 2 2 -.5 + 2 +.5 s 2 = 4 To make 2 has a coefficient of in row : replace row with row + 3 (row 2)

The Simple Algorithm Canonical Form : Row asic Variable RHS z z - 2.5 +.5 s 2 = 2 s.5 + s -.5 s 2 = 2 2 2 -.5 + 2 +.5 s 2 = 4 Is this bfs optimal? No, increasing the nonbasic variable will increase z! So is the entering variable. Also note that is the variable with the most negative coefficient in row.

The Simple Algorithm We perform the ratio test to find the leaving variable: Since s 2 =, the system is:.5 + s = 2, and s s = 2.5 4/3 -.5 + 2 = 4, and 2 2 = 4 +.5-8 So, = 4/3 and s becomes the leaving variable

The Simple Algorithm The new bfs is: = 4/3, 2 = 4/3, s =, s 2 =, z = 46/3. Now, keep the above results in mind and let us have a look at the pivot of the simple algorithm:

The Simple Algorithm Canonical Form : Row asic Variable entering variable RHS z z - 2.5 +.5 s 2 = 2 s.5 + s -.5 s 2 = 2 2 2 -.5 + 2 +.5 s 2 = 4 leaving variable

The Simple Algorithm Row asic Variable entering variable RHS z z - 2.5 +.5 s 2 = 2.5 + s -.5 s 2 = 2 2 2 -.5 + 2 +.5 s 2 = 4 leaving variable

The Simple Algorithm Canonical Form 2: Row asic Variable RHS z z - 2.5 +.5 s 2 = 2.5 + s -.5 s 2 = 2 2 2 -.5 + 2 +.5 s 2 = 4 To make a basic variable in row, we use elementary row operations to make has a coefficient of in row and coefficient of in all other rows.

The Simple Algorithm Canonical Form 2: Row asic Variable RHS z z - 2.5 +.5 s 2 = 2.5 + s -.5 s 2 = 2 2 2 -.5 + 2 +.5 s 2 = 4 To make has a coefficient of in row : multiply row by 2/3

The Simple Algorithm Canonical Form 2: Row asic Variable RHS z z - 2.5 +.5 s 2 = 2 + 2/3 s - /3 s 2 = 4/3 2 2 -.5 + 2 +.5 s 2 = 4 To make has a coefficient of in row : multiply row by 2/3

The Simple Algorithm Canonical Form 2: Row asic Variable RHS z z - 2.5 +.5 s 2 = 2 + 2/3 s - /3 s 2 = 4/3 2 2 -.5 + 2 +.5 s 2 = 4

The Simple Algorithm Canonical Form 2: Row asic Variable RHS z z - 2.5 +.5 s 2 = 2 + 2/3 s - /3 s 2 = 4/3 2 2 -.5 + 2 +.5 s 2 = 4 To make has a coefficient of in row 2: multiply row by.5 and add to the row 2

The Simple Algorithm Canonical Form 2: Row asic Variable RHS z z - 2.5 +.5 s 2 = 2 + 2/3 s - /3 s 2 = 4/3 2 2 2 + /3 s + /3 s 2 = 4/3 To make has a coefficient of in row 2: multiply row by.5 and add to the row 2

The Simple Algorithm Canonical Form 2: Row asic Variable RHS z z - 2.5 +.5 s 2 = 2 + 2/3 s - /3 s 2 = 4/3 2 2 2 + /3 s + /3 s 2 = 4/3

The Simple Algorithm Canonical Form 2: Row asic Variable RHS z z - 2.5 +.5 s 2 = 2 + 2/3 s - /3 s 2 = 4/3 2 2 2 + /3 s + /3 s 2 = 4/3 To make has a coefficient of in row : multiply row by 2.5 and add to the row

The Simple Algorithm Canonical Form 2: Row asic Variable RHS z z + 5/3 s + 2/3 s 2 = 46/3 + 2/3 s - /3 s 2 = 4/3 2 2 2 + /3 s + /3 s 2 = 4/3 To make has a coefficient of in row : multiply row by 2.5 and add to the row

The Simple Algorithm Canonical Form 2: Row asic Variable RHS z z + 5/3 s + 2/3 s 2 = 46/3 + 2/3 s - /3 s 2 = 4/3 2 2 2 + /3 s + /3 s 2 = 4/3 This result is the same as we had calculated before!

The Simple Algorithm Previously calculated new bfs was: = 4/3, 2 = 4/3, s =, s 2 =, z = 46/3.

The Simple Algorithm Canonical Form 2: Row asic Variable RHS z z + 5/3 s + 2/3 s 2 = 46/3 + 2/3 s - /3 s 2 = 4/3 2 2 2 + /3 s + /3 s 2 = 4/3 Is this bfs optimal? YES! ecause increasing nonbasic variables s and s 2 will decrease z (Also note that there is no variable in row with a negative coefficient!)

Representing Simple Tableaus Instead of writing each variable in every constraint, we can use a shorthand display called a simple tableau.

Representing Simple Tableaus Canonical Form : Row asic Variable z= z - - 3 2 = s =6 + 2 + s = 6 2 s 2 =8 - + 2 2 + s 2 = 8 RHS For eample, canonical form could be written as Row asic Variable z 2 s s 2 RHS z= - -3 s =6 6 2 s 2 =8-2 8

Representing Simple Tableaus With this format, it is very easy to spot the basic variables. We just look for columns with a column of identity matri underneath.

2 Simple Iteration : 2 enters s 2 leaves ratio test=4, ma value for 2 (-8,) (2) (4) () (,6) (,4) (,) A (3) (4/3,4/3) C Feasible Region (6,) D (2) - + 2 2 = 8 asic feasible solutions 4 3 6 4 4,,, 6 2 3 8 4 A C D (4) (3) () + 2 = 6 Simple Iteration 2: enters 3 leaves ratio test=4/3, ma value for

Also note that, since we are in canonical form, the basic variable of a row will be equal to the RHS of that row. Representing Simple Tableaus Simple Tableau-: asic Variable z 2 s s 2 RHS z= - -3 s =6 6 s 2 =8-2 8 Note that z will always be a basic variable. Therefore, we won t be mentioning it unless it is necessary. In addition, since row corresponds to the objective function, it is indicated separately in the simple tableau.

Representing Simple Tableaus Simple Tableau-: asic Variable z 2 s s 2 RHS z= - -3 s =6 6 s 2 =8-2 8 Now let us summarize what we have done so far!

Representing Simple Tableaus Simple Tableau-: asic Variable z 2 s s 2 RHS z - -3 6-2 8 For a ma problem: We start with an initial bfs in the canonical form above (if there are m slack variables, we use them as basic variables)

Representing Simple Tableaus Simple Tableau-: asic Variable z 2 s s 2 RHS z - -3 s 6 s 2-2 8 For a ma problem: We start with an initial bfs in the canonical form above (if there are m slack variables, we use them as basic variables)

Representing Simple Tableaus Simple Tableau-: entering variable asic Variable z 2 s s 2 RHS z - -3 s 6 s 2-2 8 Entering Variable: Choose a variable with the most negative coefficient in row.

Representing Simple Tableaus Simple Tableau-: entering variable asic Variable z 2 s s 2 RHS z - -3 s 6 s 2-2 8

Representing Simple Tableaus Simple Tableau-: entering variable asic Variable z 2 s s 2 RHS z - -3 s 6 s 2-2 8 Leaving Variable: compute ratios: Coefficien RHS of row i t of entering variable in row, i The smallest positive ratio wins and the basic variable of the winning row leaves the basis.

Representing Simple Tableaus Simple Tableau-: entering variable asic Variable z 2 s s 2 RHS Ratio Test z - -3 s 6 6 s 2-2 8 4 leaving variable pivot term Leaving Variable: compute ratios: Coefficien RHS of row i t of entering variable in row, i The smallest positive ratio wins and the basic variable of the winning row leaves the basis.

Representing Simple Tableaus Simple Tableau-: entering variable asic Variable z 2 s s 2 RHS Ratio Test z - -3 s 6 6 s 2-2 8 4 leaving variable pivot term Leaving Variable: compute ratios: Coefficien RHS of row i t of entering variable in row, i The smallest positive ratio wins and the basic variable of the winning row leaves the basis.

Representing Simple Tableaus Simple Tableau-: asic Variable z 2 s s 2 RHS Ratio Test z - -3 s 6 6 2-2 8 4 pivot term Leaving Variable: compute ratios: Coefficien RHS of row i t of entering variable in row, i The smallest positive ratio wins and the basic variable of the winning row leaves the basis.

Representing Simple Tableaus Simple Tableau-: asic Variable z 2 s s 2 RHS z - -3 s 6 2-2 8 pivot term Leaving Variable: compute ratios: Coefficien RHS of row i t of entering variable in row, i The smallest positive ratio wins and the basic variable of the winning row leaves the basis.

Representing Simple Tableaus Simple Tableau-: asic Variable z 2 s s 2 RHS z - -3 s 6 2-2 8 pivot term

Representing Simple Tableaus Simple Tableau-: asic Variable z 2 s s 2 RHS z - -3 s 6 2-2 8 pivot term Pivot: Transform the tableau so that the new basic variable (entering variable) has in the row of the leaving variable (pivot row) and in other rows.

Representing Simple Tableaus Simple Tableau-: asic Variable z 2 s s 2 RHS z - -3 s 6 2 pivot term Pivot: Transform the tableau so that the new basic variable (entering variable) has in the row of the leaving variable (pivot row) and in other rows.

Representing Simple Tableaus Simple Tableau-: asic Variable z 2 s s 2 RHS z - -3 s 6 2 -/2 /2 4 pivot term Pivot: Transform the tableau so that the new basic variable (entering variable) has in the row of the leaving variable (pivot row) and in other rows.

Representing Simple Tableaus Simple Tableau-: asic Variable z 2 s s 2 RHS z - -3 s 2 -/2 /2 4 pivot term Pivot: Transform the tableau so that the new basic variable (entering variable) has in the row of the leaving variable (pivot row) and in other rows.

Representing Simple Tableaus Simple Tableau-: asic Variable z 2 s s 2 RHS z - -3 s 3/2 -/2 2 2 -/2 /2 4 pivot term Pivot: Transform the tableau so that the new basic variable (entering variable) has in the row of the leaving variable (pivot row) and in other rows.

Representing Simple Tableaus Simple Tableau-: asic Variable z z 2 s s 2 RHS s 3/2 -/2 2 2 -/2 /2 4 pivot term Pivot: Transform the tableau so that the new basic variable (entering variable) has in the row of the leaving variable (pivot row) and in other rows.

Representing Simple Tableaus Simple Tableau-: asic Variable z 2 s s 2 RHS z -5/2 3/2 2 s 3/2 -/2 2 2 -/2 /2 4 pivot term Pivot: Transform the tableau so that the new basic variable (entering variable) has in the row of the leaving variable (pivot row) and in other rows.

Representing Simple Tableaus Simple Tableau-: enter asic Variable z 2 s s 2 RHS z -5/2 3/2 2 s 3/2 -/2 2 2 -/2 /2 4

Representing Simple Tableaus leave Simple Tableau-: enter asic Variable z 2 s s 2 RHS Ratio Test z -5/2 3/2 2 s 3/2 -/2 2 4/3 2 -/2 /2 4 no ratio

Representing Simple Tableaus leave Simple Tableau-: enter asic Variable z 2 s s 2 RHS Ratio Test z -5/2 3/2 2 3/2 -/2 2 4/3 2 -/2 /2 4 no ratio

Representing Simple Tableaus Simple Tableau-: asic Variable z 2 s s 2 RHS Ratio Test z -5/2 3/2 2 3/2 -/2 2 4/3 2 -/2 /2 4 no ratio

Representing Simple Tableaus Simple Tableau-: asic Variable z 2 s s 2 RHS z -5/2 3/2 2 3/2 -/2 2 2 -/2 /2 4

Representing Simple Tableaus Simple Tableau-2: asic Variable z 2 s s 2 RHS z 5/3 2/3 46/3 2/3 -/3 4/3 2 /3 /3 4/3

Representing Simple Tableaus Simple Tableau-2: asic Variable z 2 s s 2 RHS z 5/3 2/3 46/3 2/3 -/3 4/3 2 /3 /3 4/3 Can we iterate more? No, because all row coefficients are nonnegative. We stop here. The current bfs is optimal!

Summary of the Simple Algorithm (For a ma problem) ) Convert the LP into the standard form and then obtain the canonical form 2) Find an initial bfs (if there are m slack variables, use them as basic variables). If all nonbasic variables have nonnegative coefficients in row, then the current LP is optimal. If there are any variables with a negative coefficient, then we should decide the entering variable. Entering variable: choose a variable with the most negative coefficient in row to enter the basis.

Summary of the Simple Algorithm 3) For any row in which the entering variable has a positive coefficient, compute the ratios: RHS of row i Coefficient of the entering variable in row i The smallest ratio wins (ties may be broken arbitrarily) and the basic variable of the winning row leaves the basis. 4) Pivot: Transform the tableau so that the new basic variable (entering variable) has coefficient of in the row of the leaving variable (pivot row) and coefficient of in all other rows. In the end, we get a tableau with a new canonical form.

Summary of the Simple Algorithm After the pivoting, note that: New pivot row coefficien t of variable in the the entering pivot row old pivot row new row i old coefficien t of row i - variable in the the entering pivot row new pivot row

Summary of the Simple Algorithm 5) Repeat steps,2,3, and 4 until all row coefficients becomes nonnegative. If each nonbasic variable has a nonnegative coefficient in a canonical form s row (remember that basic variables have coefficient of in row of a canonical form), then the canonical form is optimal. We stop here and the current bfs is optimal!