Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS 312: Algorithm Analysis Lecture #30: Linear Programming: Intro. to the Simplex Algorithm This work is licensed under a Creative Commons Attribution-Share.

Similar presentations


Presentation on theme: "CS 312: Algorithm Analysis Lecture #30: Linear Programming: Intro. to the Simplex Algorithm This work is licensed under a Creative Commons Attribution-Share."— Presentation transcript:

1 CS 312: Algorithm Analysis Lecture #30: Linear Programming: Intro. to the Simplex Algorithm This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License.Creative Commons Attribution-Share Alike 3.0 Unported License Slides by: Eric Ringger, with contributions from Mike Jones and Eric Mercer

2 Announcements  Homework #21 (Project 6, Part 1)  Due online today by 5pm  No late submissions accepted (just like any homework asst.)  Key available online after 5pm  Important: LP Notes available on the schedule  Works through the ideas up through the Simplex algorithm  Includes the pseudo-code for Simplex (and Pivot)  Project #6: Linear Programming (Part 2)  Early day: Friday  Due: next Monday  Verification suggestion: use another LP solver

3 Objectives  Review various forms for representing an LP problem  Understand the Simplex method algebraically  Introduce the concept of a Pivot  Walk through an example to completion

4 Forms of an LP Problem 1.English form 2.Algebraic form 3.Standard form up to step #1  also algebraic

5 Example: Standard Form (up to step #1)

6 Forms of an LP Problem 1.English form 2.Algebraic form 3.Standard form up to step #1  also algebraic 4.Geometric / graphical form  Only if 2-D, maybe 3-D 5.Matrix-vector form  Read off directly from standard form up to step #1

7 Example: Matrix-Vector Form

8 Forms of an LP Problem 1.English form 2.Algebraic form 3.Standard form up to step #1  also algebraic 4.Geometric / graphical form  Only if 2-D, maybe 3-D 5.Matrix-vector form  Read off directly from standard form up to step #1 6.Padded matrix-vector form  Adapted directly from matrix-vector form  Reflects the participation of slack variables

9 Example: Padded Matrix-Vector form Purposes: for input to the Simplex algorithm for computation in the Simplex algorithm

10 Forms of an LP Problem 1.English form 2.Algebraic form 3.Standard form up to step #1  also algebraic 4.Geometric / graphical form  Only if 2-D, maybe 3-D 5.Matrix-vector form  Read off directly from standard form up to step #1 6.Padded matrix-vector form  Adapted directly from matrix-vector form  Reflects the participation of slack variables 7.Standard form up to step #2 (aka “slack form”)  Also algebraic

11 Standard Form (step #2)

12 Step #2 to Standard Form

13 Sketch of Simplex Algorithm Start with Basic solution (the origin of the feasible region) 1.Pick a non-basic variable 2.Raise its value as high as we can 3.Pick a basic variable 4.Algebraically pivot 5.Repeat at #1 until we cannot raise the value of any non-basic variables

14 Basic Solution

15

16 Identify a Non-Basic Variable

17

18 Select a Basic Variable

19

20 Solve for the Non-Basic Variable: “Pivot”

21

22 Pivot: Rewrite the Other Equations

23

24 After the Pivot: Objective Values

25

26 Repeat

27

28 Repeat Again (Third time)

29

30 What next?

31 Observations  At the beginning of every round of Simplex,  The value of each non-basic variable in the current solution is 0.  The space for the transformed problem is spanned by unit vectors in the directions of the non-basic variables  The current solution is at the origin of that space  The new feasible region is defined in that space  Pivot is designed to keep our attention focused on the origin of each successive space

32 Assignments  Project #6  Now re-read the Simplex and Pivot pseudo- code to see how these algebraic steps are performed in the code  HW #22


Download ppt "CS 312: Algorithm Analysis Lecture #30: Linear Programming: Intro. to the Simplex Algorithm This work is licensed under a Creative Commons Attribution-Share."

Similar presentations


Ads by Google