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

CS 312: Algorithm Analysis

  • Upload
    loring

  • View
    33

  • Download
    0

Embed Size (px)

DESCRIPTION

This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License . CS 312: Algorithm Analysis. Lecture # 31: Linear Programming: the Simplex Algorithm, part 2. Slides by: Eric Ringger, with contributions from Mike Jones and Eric Mercer. Announcements. - PowerPoint PPT Presentation

Citation preview

Page 1: CS 312:  Algorithm Analysis

CS 312: Algorithm Analysis

Lecture #31: Linear Programming: the Simplex Algorithm, part 2

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

Page 2: CS 312:  Algorithm Analysis

Announcements Homework #22

Due now

Project #6: Linear Programming Key for Part 1 was distributed on Monday – did you

get it? Use C# Early day: Friday Due: Monday Verification suggestion: use another LP solver

Page 3: CS 312:  Algorithm Analysis

Objectives

Understand the Simplex method Discuss and own the pseudo-code

Page 4: CS 312:  Algorithm Analysis

Comparison

What is the relationship between the MaxFlow algorithm and the Simplex algorithm?

Page 5: CS 312:  Algorithm Analysis

Summary: Example from Last Time

Why did the algorithm terminate?

Page 6: CS 312:  Algorithm Analysis

Interpreting the Answer

Original Problem:

Final Problem:

Page 7: CS 312:  Algorithm Analysis

Observations At the beginning of every round of Simplex,

The space for the transformed problem is spanned by unit vectors in the directions of the non-basic variables

The value of each non-basic variable in the current solution is 0. i.e., 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

Page 8: CS 312:  Algorithm Analysis

Algebra: Check Ratios

Page 9: CS 312:  Algorithm Analysis

Simplex

Page 10: CS 312:  Algorithm Analysis

Simplex

Page 11: CS 312:  Algorithm Analysis

Simplex

Page 12: CS 312:  Algorithm Analysis

Simplex

Page 13: CS 312:  Algorithm Analysis

Algebra: PivotAssume we’ve identified the leaving and entering variables, and , and

we’ve updated our solution (moved our current point of focusin the feasible region).

Page 14: CS 312:  Algorithm Analysis

Pivot Algorithm

Page 15: CS 312:  Algorithm Analysis

Algebra: Obj. Function Update

Similarly: for each of the constraints …

Page 16: CS 312:  Algorithm Analysis

Assignment

Finish Project #6 now

Assignment: HW #22.5