370 likes | 725 Views
Transition from Graphical to Algebraic Solution to LPs. Updated 10 March 2009. Example LP. 2. In our example we can identify the feasible corner points by labeling them A, B, C, D and E, as shown below. A. E. B. D. C. 3. Intersection Points.
E N D
Transition from Graphical to Algebraic Solution to LPs Updated 10 March 2009
In our example we can identify the feasible corner points by labeling them A, B, C, D and E, as shown below. A E B D C 3
Intersection Points Each corner point is the intersection of two constraints: Intersection of x + y = 4 and –2x + y = 2 Intersection of x – 2y = 2 and x + y = 4 Intersection of x – 2y = 2 and y = 0 Intersection of x = 0 and y = 0 Intersection of -2x + y = 2 and x = 0
Solution by Enumeration For each corner point (x, y) Determine which two constraints intersect at (x, y) Solve the pair of equations to find the values of x and y Evaluate the objective function at (x, y) Compare the objective function values to find optimal corner points
A Standard Form for LP Any LP can be written in the following standard form: Where bi is non-negative for i = 1, 2, …, m 7
Basic Solutions • A basic solution to a system of m linear equations with n variables (where n≥m) is found by setting (n – m) of the variables equal to zero and solving the remaining m-by-m system • An m-by-n system can have an infinite number of solutions • An m-by-m system can have at most one solution • Variables set to zero are called non-basic variables • The remaining variables are called basic variables • The number of basic solutions is given by 9
Basic Solutions to Example LP • In standard form the example LP has 5 variables and 3 equations (not counting non-negativity constraints) • Since 5 – 3 = 2 • A basic solution to the example LP has 2 non-basic variables an 3 basic variables • There are (5)(4)/2 = 10 basic solutions to the example LP 10
Example LP Feasible Region -2x+y = 2 Basic Feasible Solution Infeasible Basic Solution x-2y = 2 x x+y = 4 y
1. Non-Basic Variables = {x, y} This is corner point D in the graphical solution. 12
2. Non-Basic Variables = {x, s1} This solution is infeasible. 13
3. Non-Basic Variables = {x, s2} This solution is infeasible. 14
4. Non-Basic Variables = {x, s3 } This corner point E in the graphical solution. 15
5. Non-Basic Variables = {y, s1} This solution is infeasible. 16
6. Non-Basic Variables = {y, s2} This is corner point C in the graphical solution. 17
7. Non-Basic Variables = {y, s3} This solution is an infeasible. 18
8. Non-Basic Variables = {s1, s2} This is corner point B in the graphical solution. 19
9. Non-Basic Variables = {s1, s3} This is corner point A in the graphical solution. 20
10. Non-Basic Variables = {s2, s3} This is an infeasible solution. 21
Efficient Algebraic Procedures Since not all basic solutions are feasible, an algebraic procedure can save time by only considering the basic feasible solutions (BFSs) The Simplex Method is an algorithm for solving LPs that uses an intelligent search procedure to find an optimal solution by only investigating a fraction of the BFSs 22
George Dantzig: The Father of Linear Programming • Invented/Discovered the Simplex Method in 1947 • Head of USAF Statistical Control’s Combat Analysis Branch • Referred to supply and deployment plans as “programs” • Realized programs could be formulated as systems of linear constraints
Simplex Method For Example LP Find initial BFS max z = x + 2y BFS 1: x = 0, y = 0, z = 0 Move to adjacent BFS in direction of fastest improvement BFS 2: x = 0, y = 2, z = 4 x y
Simplex Method for Example LP Move to adjacent BFS in direction of fastest improvement max z = x + 2y BFS 3: x = 2/3, y = 10/3, z = 22/3 x y
Simplex Method for Example LP Stop when there is no improving direction max z = x + 2y x y
Keep in mind that the basic variables in BFS 1 are s1, s2, and s3, and … Simplex Method for Example LP the basic variables in BFS 2 are y, s1, and s2. Also, the basic variables in BFS 3 are x, y, and s2.
Example LP Feasible Region -2x+y = 2 Optimal solution found by inspecting only 3 of the 10 possible corner-point solutions x-2y = 2 x x+y = 4 y