Daniel Kroening and Ofer Strichman Decision Procedures An Algorithmic Point of View Gaussian Elimination and Simplex.

Slides:



Advertisements
Similar presentations
February 14, 2002 Putting Linear Programs into standard form
Advertisements

The simplex algorithm The simplex algorithm is the classical method for solving linear programs. Its running time is not polynomial in the worst case.
Chapter 5: Linear Programming: The Simplex Method
Linear Programming (LP) (Chap.29)
Transportation Problem (TP) and Assignment Problem (AP)
Introduction to Algorithms
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2002 Lecture 8 Tuesday, 11/19/02 Linear Programming.
Copyright (c) 2003 Brooks/Cole, a division of Thomson Learning, Inc
Computational Methods for Management and Economics Carla Gomes Module 8b The transportation simplex method.
Linear Inequalities and Linear Programming Chapter 5
The Simplex Method: Standard Maximization Problems
5.4 Simplex method: maximization with problem constraints of the form
Operation Research Chapter 3 Simplex Method.
CS38 Introduction to Algorithms Lecture 15 May 20, CS38 Lecture 15.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2006 Lecture 9 Wednesday, 11/15/06 Linear Programming.
Design and Analysis of Algorithms
Linear Programming (LP)
The Simplex Method.
5.6 Maximization and Minimization with Mixed Problem Constraints
MIT and James Orlin © Chapter 3. The simplex algorithm Putting Linear Programs into standard form Introduction to Simplex Algorithm.
Daniel Kroening and Ofer Strichman Decision Procedures An Algorithmic Point of View Deciding ILPs with Branch & Bound ILP References: ‘Integer Programming’
Decision Procedures An Algorithmic Point of View
Chapter 3 Linear Programming Methods 高等作業研究 高等作業研究 ( 一 ) Chapter 3 Linear Programming Methods (II)
1. The Simplex Method.
1 Decision Procedures for Linear Arithmetic Presented By Omer Katz 01/04/14 Based on slides by Ofer Strichman.
Chapter 6 Linear Programming: The Simplex Method
8. Linear Programming (Simplex Method) Objectives: 1.Simplex Method- Standard Maximum problem 2. (i) Greedy Rule (ii) Ratio Test (iii) Pivot Operation.
Simplex method (algebraic interpretation)
Simplex Algorithm.Big M Method
ECE 556 Linear Programming Ting-Yuan Wang Electrical and Computer Engineering University of Wisconsin-Madison March
Chapter 3. Pitfalls Initialization Ambiguity in an iteration
Topic III The Simplex Method Setting up the Method Tabular Form Chapter(s): 4.
Barnett/Ziegler/Byleen Finite Mathematics 11e1 Learning Objectives for Section 6.4 The student will be able to set up and solve linear programming problems.
OR Perturbation Method (tableau form) (after two iterations, optimal solution obtained) (0+2  1 ) (0+2  2 ) (1+  3 )
1. 2 Computing the Adjoint matrix: 3 Assignment #3 is available. Due: Monday Nov. 5, beginning of class.
3.3 Implementation (1) naive implementation (2) revised simplex method
1 Simplex Method for Bounded Variables Linear programming problems with lower and upper bounds Generalizing simplex algorithm for bounded variables Reference:
Chapter 6 Linear Programming: The Simplex Method Section 4 Maximization and Minimization with Problem Constraints.
Chapter 3 Linear Programming Methods
1 THE REVISED SIMPLEX METHOD CONTENTS Linear Program in the Matrix Notation Basic Feasible Solution in Matrix Notation Revised Simplex Method in Matrix.
OR Chapter 8. General LP Problems Converting other forms to general LP problem : min c’x  - max (-c)’x   = by adding a nonnegative slack variable.
OR Simplex method (algebraic interpretation) Add slack variables( 여유변수 ) to each constraint to convert them to equations. (We may refer it as.
OR Chapter 7. The Revised Simplex Method  Recall Theorem 3.1, same basis  same dictionary Entire dictionary can be constructed as long as we.
Simplex Method Simplex: a linear-programming algorithm that can solve problems having more than two decision variables. The simplex technique involves.
Copyright © 2006 Brooks/Cole, a division of Thomson Learning, Inc. Linear Programming: An Algebraic Approach 4 The Simplex Method with Standard Maximization.
Foundations-1 The Theory of the Simplex Method. Foundations-2 The Essence Simplex method is an algebraic procedure However, its underlying concepts are.
1 Simplex algorithm. 2 The Aim of Linear Programming A Linear Programming model seeks to maximize or minimize a linear function, subject to a set of linear.
Chapter 4 The Simplex Algorithm and Goal Programming
The Simplex Method. and Maximize Subject to From a geometric viewpoint : CPF solutions (Corner-Point Feasible) : Corner-point infeasible solutions 0.
Solving Linear Program by Simplex Method The Concept
Simplex Algorithm.Big M Method
Chap 10. Sensitivity Analysis
Perturbation method, lexicographic method
Chap 9. General LP problems: Duality and Infeasibility
Chapter 6. Large Scale Optimization
Chapter 5. Sensitivity Analysis
Chap 3. The simplex method
Solving Linear Programming Problems: Asst. Prof. Dr. Nergiz Kasımbeyli
The Simplex Method The geometric method of solving linear programming problems presented before. The graphical method is useful only for problems involving.
2. Generating All Valid Inequalities
Chapter 8. General LP Problems
Chapter 8. General LP Problems
Chapter 2. Simplex method
Simplex method (algebraic interpretation)
DUALITY THEORY Reference: Chapter 6 in Bazaraa, Jarvis and Sherali.
Chapter 8. General LP Problems
Chapter 6. Large Scale Optimization
Chapter 2. Simplex method
Chapter 3. Pitfalls Initialization Ambiguity in an iteration
Presentation transcript:

Daniel Kroening and Ofer Strichman Decision Procedures An Algorithmic Point of View Gaussian Elimination and Simplex

Gaussian’s elimination Given a linear system Ax = b Manipulate A|b to an upper-triangular form A x = b

Gaussian’s elimination Then, solve backwards from the k ’s row according to:

Gaussian elimination - example And now… x 3 = -1, x 2 = 3, x 1 = 1 problem solved.

Feasibility with Simplex Simplex was originally designed for solving the optimization problem: s.t. We are only interested in the feasibility problem. Is this system optimal ? Is this system feasible ?

General simplex We will learn a variant called general simplex. Very suitable for solving the feasibility problem fast. The input:  A is a m £ n coefficient matrix  The problem variables: First step: convert the input to general form

General form General form: A combination of:  Linear equalities of the form  Lower and upper bounds on variables.

Converting to General Form A: Replace (where ) with and s 1,..., s m are called the additional variables.

Example 1 Convert to: It is common to keep the conjunctions implicit

Example 2 Convert to:

Simplex basics… Linear inequality constraints, geometrically, define a convex polyhedron. © Wikipedia

Our example from before, geometrically General Simplex begins in the origin...

Matrix form xys1s2s3xys1s2s3 Recall the general form: Due to the additional variables:  now A is an m £ ( n + m ) matrix.

The tableau The diagonal part is inherent to the general form We can instead write: xys1s2s3xys1s2s3 xyxy s1s2s3s1s2s3 This is called the tableau

The tableau The tableau changes throughout the algorithm, but maintains its m £ n structure Distinguish between basic and nonbasic variables Initially, basic variables = the additional variables. xyxy s1s2s3s1s2s3 Basic variables Nonbasic variables

The tableau Denote by  B – Basic variables  N – Nonbasic variables The tableau is simply a rewrite of the system: The basic variables are also called the dependent variables.

The general simplex algorithm Simplex maintains:  The tableau,  an assignment ® to all variables  The bounds Initially,  B = additional variables  N = problem variables  ® ( x i ) = 0 for i 2 {1,..., n + m }

Invariants Two invariants are maintained throughout: All nonbasic variables satisfy their bounds Can you see why these invariants are maintained initially ? We should check that they are indeed maintained

The general simplex algorithm The initial assignment satisfies If the bounds of all basic variables are satisfied by ®, return `Satisfiable’. Otherwise... pivot.

Pivoting Find a basic variable x i that violates its bounds.  Suppose that ® ( x i ) < l i Find a nonbasic variable x j such that  a ij > 0 and  ( x j ) < u j, or  a ij l j Why ?

Pivoting Find a basic variable x i that violates its bounds.  Suppose that ® ( x i ) < l i Find a nonbasic variable x j such that  a ij > 0 and  ( x j ) < u j, or  a ij l j Such a variable x j is called suitable. If there is no suitable variable – return ‘Unsatisfiable’  Why ?

Pivoting x i with x j Solve equation i for x j : From: To: Swap x i and x j, and update the i -th row accordingly. From To: a i1... a ij... a in - a i1 a ij... 1 a ij...- a in a ij

Pivoting x i with x j Update all other rows:  Replace x j with its equivalent obtained from row i :

Pivoting Update ® as follows: Increase ® ( x j ) by  Now x j is a basic variable: it can violate its bounds. Update ® ( x i ) accordingly  Q: What is now ® ( x i ) ? Update  for all other basic (dependent) variables.

Example Recall the tableau and constraints in our example: Initially  assigns 0 to all variables Bounds of s 1 and s 3 are violated

Example Recall the tableau and constraints in our example: We will solve s 1 x is a suitable nonbasic variable for pivoting  It has no upper bound So now we pivot s 1 with x

Example Recall the tableau and constraints in our example: Solve 1 st row for x : Replace x with s 1 in other rows:

Example The new state: Solve 1 st row for x : Replace x with s 1 in other rows:

Example The new state: What about the assignment ? We should increase x by  Hence,  ( x ) = = 2  Now s 1 is equal to its lower bound:  ( s 1 ) = 2  Update all the others

Example The new state: Now s 3 violates its lower bound Which nonbasic variable is suitable for pivoting ?  That’s right… y

Example The new state: We should increase y by

Example The final state: All constraints are now satisfied

Observations The additional variables:  Only additional variables have bounds.  These bounds are permanent.  Additional variables exit the base only on extreme points (their lower or upper bounds).  When entering the base, they shift towards the other bound and possibly cross it (violate it).

Observations Can it be that we pivot( x i, x j ) and then pivot( x j, x i ) and enter a (local) cycle ?  No.  For example, suppose that a ij > 0.  We increased  ( x j ) so now  ( x i ) = l i.  After pivoting, possibly  ( x j ) > u j  But a ij ’ = 1 / a ij > 0, hence x i is not suitable.

Observations Is termination guaranteed ? Not obvious.  Perhaps there are bigger cycles. In order to avoid circles, we use Bland’s rule:  determine a total order on the variables.  Choose the first basic variable that violates its bounds, and first nonbasic suitable variable for pivoting.  It can be proven that this guarantees that no base is repeated, which implies termination.

General-Simplex with Bland’s rule