 # Linear Inequalities and Linear Programming Chapter 5

## Presentation on theme: "Linear Inequalities and Linear Programming Chapter 5"— Presentation transcript:

Linear Inequalities and Linear Programming Chapter 5
Simplex method: maximization with problem constraints of the form . The procedures for the simplex method will be illustrated through an example. Be sure to read the textbook to fully understand all the concepts involved. The slides for this text are organized into chapters. This lecture covers Chapter 1. Chapter 1: Introduction to Database Systems Chapter 2: The Entity-Relationship Model Chapter 3: The Relational Model Chapter 4 (Part A): Relational Algebra Chapter 4 (Part B): Relational Calculus Chapter 5: SQL: Queries, Programming, Triggers Chapter 6: Query-by-Example (QBE) Chapter 7: Storing Data: Disks and Files Chapter 8: File Organizations and Indexing Chapter 9: Tree-Structured Indexing Chapter 10: Hash-Based Indexing Chapter 11: External Sorting Chapter 12 (Part A): Evaluation of Relational Operators Chapter 12 (Part B): Evaluation of Relational Operators: Other Techniques Chapter 13: Introduction to Query Optimization Chapter 14: A Typical Relational Optimizer Chapter 15: Schema Refinement and Normal Forms Chapter 16 (Part A): Physical Database Design Chapter 16 (Part B): Database Tuning Chapter 17: Security Chapter 18: Transaction Management Overview Chapter 19: Concurrency Control Chapter 20: Crash Recovery Chapter 21: Parallel and Distributed Databases Chapter 22: Internet Databases Chapter 23: Decision Support Chapter 24: Data Mining Chapter 25: Object-Database Systems Chapter 26: Spatial Data Management Chapter 27: Deductive Databases Chapter 28: Additional Topics Dr .Hayk Melikyan/ Department of Mathematics and CS/

Example: We will solve the same problem that was presented earlier, but this time we will use the simplex method. We wish to maximize the Profit function subject to the constraints below. The method introduced here can be used to solve larger systems that are more complicated. FM/04/Melikyan

Introduce slack variables; rewrite objective function
First step is to rewrite the system without the inequality symbols and introduce the slack variables, and FM/04/Melikyan

Represent linear system using matrix
The variable y was replaced the variable FM/04/Melikyan

Determine the pivot element
In the last row, we see the most negative element is -10. Therefore, the column containing -10 is the pivot column. To determine the pivot row, we divide the coefficients above the –10 into the numbers in the rightmost column and determine the smallest quotient. Since 160 divided by 8 is 20 and 180 divided by 12 is 15, the constant 12 becomes the pivot element. FM/04/Melikyan

Using the pivot element and elementary row operations
1.Divide row 2 by 12 to get a 1 in the position of the pivot element. 2. Obtain zeros in the other two positions of the pivot column. 3. x2 becomes the entering variable and s2 exits. FM/04/Melikyan

Find the next pivot element and repeat the process
The process must continue since the last row of the matrix contains a negative value (- 5/3) We use the same procedure to find the next pivot element. Divide 15 by 1/3 to obtain 45. Divide 7.5 by 1 to obtain 7.5. Since 7.5 is less than 45, our next pivot element is 1. The entering variable of x1replaces the exiting variable s1. x1 enters, and s1 exits FM/04/Melikyan

Obtain zeros in the remaining two entries of the pivot column:
1. Multiply row 1 by 5/3 and add the result to row 3. Replace row 3 by that sum. 2. Multiply row 1 by -1/3 and add result to row 2. Replace row 2. s FM/04/Melikyan

Find the solution Since the last row of the matrix contains no negative numbers, we can stop the procedure and find the solution. IF the slack variables are assigned a value of zero, then we have x=x1= 7.5 and y = x2=12.5. This is the same solution we obtained geometrically. FM/04/Melikyan

Simplex Method Summarized Applications
Initial System Simplex Tableau Pivot operations Simplex Method Summarized Applications FM/04/Melikyan

This system is called initial system.
We will introduce the concepts and procedures involved in the simplex method through the example Maximize P = 50x1 + 80x2 Subject to x1 + 2x2  (1) 3x1 + 4x2  84 x1 0, x20 Introducing slack variables s1 and s2 we convert inequalities into the following system of equations x1 + 2x s = (2) 3x1 + 4x s = 84 - 50x1 - 80x P = 0 x1 0, x20 s1 0, s20 This system is called initial system. FM/04/Melikyan

Basic Solutions and Basic Feasible Solutions for Initial System
The objective function variable always selected to be a basic variable. A basic solution of system (2) is also a basic solution of system (1) after P is deleted.( Such a solutions we call basic feasible solutions for system (2)). Basic feasible solution of system(2) can contain a negative number, but only if it is the value of P. THEOREM: If the optimal value of the objective function in a linear programming problem exists, then that value must occur at one (or more) of the basic feasible solutions of the initial system. FM/04/Melikyan

Simplex Tableau The augmented matrix of initial system (2) is called initial simplex tableau SELECTING BASIC AND NONBASIC VARIABLES FOR THE SIMPLEX PROCESS Given a simplex tableau. (a) Determine the number of basic and the number of nonbasic variables. These numbers do not change during the simplex process. (b) SELECTING BASIC VARIABLES: A variable can be selected as a basic variable only if it corresponds to a column in the tableau that has exactly one nonzero element (usually 1) and the nonzero element in the column is not in the same row as the nonzero element in the column of another basic variable. (This procedure always selects P as a basic variable, since the P column never changes during the simplex process.) (c) SELECTING NONBASIC VARIABLES: After the basic variables are selected in Step (b), the remaining variables are selected as the nonbasic variables. (The tableau columns under the nonbasic variables will usually contain more than one nonzero element.) FM/04/Melikyan

SELECTING THE PIVOT ELEMENT
Locate the most negative indicator in the bottom row of the tableau to the left of the P column (the negative number with the largest absolute value). The column containing this element is the PIVOT COLUMN. If there is a tie for the most negative, choose either. Divide each POSITIVE element in the pivot column above the dashed line into the corresponding element in the last column. The PIVOT ROW is the row corresponding to the smallest quotient. If there is a tie for the smallest quotient, choose either. If the pivot column above the dashed line has no positive elements, then there is no solution and we stop. (c)  The PIVOT (or PIVOT ELEMENT) is the element in the intersection of the pivot column and pivot row. [Note: The pivot element is always positive and is never in the bottom row.] FM/04/Melikyan

PERFORMING THE PIVOT OPERATION
A PIVOT OPERATION or PIVOTING consists of performing row operations as follows: (a) Multiply the pivot row by the reciprocal of the pivot element to transform the pivot element into a 1. (If the pivot element is already a 1, omit this step.) (b) Add multiples of the pivot row to other rows in the tableau to transform all other nonzero elements in the pivot column into 0's. [Note: Rows are not to be interchanged while performing a pivot operation. The only way the (positive) pivot element can be transformed into 1 (if it is not a 1 already) is for the pivot row to be multiplied by the reciprocal of the pivot element FM/04/Melikyan

SIMPLEX ALGORITHM FOR STANDARD MAXIMIZATION PROBLEMS
FM/04/Melikyan

An example To see how this method works, we will use a modified form of a previous example. Consider the linear programming problem of maximizing z under the constraints. The problem constraints involve inequalities with positive constants to the right of the inequality symbol. Optimization problems that satisfy this condition are called standard maximization problems. FM/04/Melikyan

Download ppt "Linear Inequalities and Linear Programming Chapter 5"

Similar presentations