CS 312: Algorithm Analysis
This lecture covers the fundamentals of Linear Programming (LP) and introduces the Simplex Algorithm. Key topics include various forms of LP problems (English, algebraic, standard, geometric, matrix-vector), along with a detailed walkthrough of the Simplex method, including pseudo-code and examples. Important announcements include due dates for homework assignments and project guidelines. Understanding the pivot operation and basic solutions are crucial for effectively applying the Simplex Algorithm in optimization problems.
CS 312: Algorithm Analysis
E N D
Presentation Transcript
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 • 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 Problem • English form • Algebraic form • Standard form up to step #1 • also algebraic
Forms of an LP Problem • English form • Algebraic form • Standard form up to step #1 • also algebraic • Geometric / graphical form • Only if 2-D, maybe 3-D • Matrix-vector form • Read off directly from standard form up to step #1
Forms of an LP Problem • English form • Algebraic form • Standard form up to step #1 • also algebraic • Geometric / graphical form • Only if 2-D, maybe 3-D • Matrix-vector form • Read off directly from standard form up to step #1 • 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 Problem • English form • Algebraic form • Standard form up to step #1 • also algebraic • Geometric / graphical form • Only if 2-D, maybe 3-D • Matrix-vector form • Read off directly from standard form up to step #1 • Padded matrix-vector form • Adapted directly from matrix-vector form • Reflects the participation of slack variables • Standard form up to step #2 (aka “slack form”) • Also algebraic
Sketch of Simplex Algorithm Start with Basic solution (the origin of the feasible region) • Pick a non-basic variable • Raise its value as high as we can • Pick a basic variable • Algebraically pivot • Repeat at #1 until we cannot raise the value of any non-basic variables
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