We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
Linear Programming
Summary
We look at what it means to solve a Linear Programming problem and look at example algorithms like Simplex.
Contents
Max Flow as LP
Input: Directed graph G=(V,E)
LP: m variables,
Objective function:
- max sum of every edge out of source vertex
Subject to:
Simple Example
Company makes A and B
How many of each to maximize profit?
- Each unit of A makes $1 profit
- Each unit of B makes $6 profit
Demand:
- at most 300 units of A
- at most 200 units of B
Supply:
- Max of 700 hours of work per day
- 1 A takes 1 hour
- 1 B takes 3 hour
Variables:
- Let x = # of units of A to produce
- Let y = # of units of B to produce
Objective function:
Constraints:
Key Issues
- Optimum may be non-integer
- Keeps it in P
- Integer-only LP is NP-Complete
- Keeps it in P
- Feasibility space is convex
- Optimum point lays at a vertex, except when LP is
infeasible
orunbounded
How do I find a vertex?
- Satisfy two inequalities, then find if it matches the other inequalities?
- i.e. Set the lines equal to each other and solve for x,y
LP Algorithms
Polynomial time:
- Ellipsoid
- Interior point methods
Simplex
Simplex
Worst-case is exponential time, still widely-used
Output is guaranteed to be optimal
Works efficiently on huge LPs
Steps:
- Start at x = 0
- Look for neighbor with higher objective value
- if found, move there and repeat
- else, return x