cs 312: algorithm analysis
DESCRIPTION
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License . CS 312: Algorithm Analysis. Lecture #30: Linear Programming: Intro. to the Simplex Algorithm. Slides by: Eric Ringger, with contributions from Mike Jones and Eric Mercer. Announcements. - PowerPoint PPT PresentationTRANSCRIPT
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.
Slides by: Eric Ringger, with contributions from Mike Jones and Eric Mercer
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
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
Forms of an LP Problem1. English form2. Algebraic form3. Standard form up to step #1
also algebraic
Example: Standard Form (up to step #1)
Forms of an LP Problem1. English form2. Algebraic form3. Standard form up to step #1
also algebraic4. Geometric / graphical form
Only if 2-D, maybe 3-D5. Matrix-vector form
Read off directly from standard form up to step #1
Example: Matrix-Vector Form
Forms of an LP Problem1. English form2. Algebraic form3. Standard form up to step #1
also algebraic4. Geometric / graphical form
Only if 2-D, maybe 3-D5. Matrix-vector form
Read off directly from standard form up to step #16. Padded matrix-vector form
Adapted directly from matrix-vector form Reflects the participation of slack variables
Example: Padded Matrix-Vector form
Purposes:• for input to the Simplex algorithm• for computation in the Simplex algorithm
Forms of an LP Problem1. English form2. Algebraic form3. Standard form up to step #1
also algebraic4. Geometric / graphical form
Only if 2-D, maybe 3-D5. Matrix-vector form
Read off directly from standard form up to step #16. 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
Standard Form (step #2)
Sketch of Simplex Algorithm
Start with Basic solution (the origin of the feasible region)
1. Pick a non-basic variable2. Raise its value as high as we can3. Pick a basic variable4. Algebraically pivot5. Repeat at #1 until we cannot raise the value of
any non-basic variables
Basic Solution
Basic Solution
Identify a Non-Basic Variable
Identify a Non-Basic Variable
Select a Basic Variable
Select a Basic Variable
Solve for the Non-Basic Variable: “Pivot”
Solve for the Non-Basic Variable: “Pivot”
Pivot: Rewrite the Other Equations
Pivot: Rewrite the Other Equations
After the Pivot: Objective Values
After the Pivot: Objective Values
Repeat
Repeat
Repeat Again (Third time)
Repeat Again (Third time)
What next?
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
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