1 / 31

CS 312: Algorithm Analysis

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.

ama
Télécharger la présentation

CS 312: Algorithm Analysis

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 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

  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 • English form • Algebraic form • Standard form up to step #1 • also algebraic

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

  6. 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

  7. Example: Matrix-Vector Form

  8. 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

  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 • 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

  11. Standard Form (step #2)

  12. 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

  13. Basic Solution

  14. Basic Solution

  15. Identify a Non-Basic Variable

  16. Identify a Non-Basic Variable

  17. Select a Basic Variable

  18. Select a Basic Variable

  19. Solve for the Non-Basic Variable: “Pivot”

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

  21. Pivot: Rewrite the Other Equations

  22. Pivot: Rewrite the Other Equations

  23. After the Pivot: Objective Values

  24. After the Pivot: Objective Values

  25. Repeat

  26. Repeat

  27. Repeat Again (Third time)

  28. Repeat Again (Third time)

  29. What next?

  30. 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

  31. 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

More Related