Linear Programming Flashcards

1
Q

What is the main method of solving linear programs?

A

The simplex algorithm. Begin at a random vertex, repeatedly look for an adjacent vertex connected by an edge of the feasible region of better value. A local optimum is guaranteed to be the global optimum.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What runtime is solving an ILP?

A

NP-Hard

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What runtime is solving an LP?

A

Polynomial

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the cases where you can’t solve a linear program?

A
  1. Infeasible. Constraints can’t be simultaneously satisfied.
  2. Unbounded. You can shoot endlessly for a higher number to maximize the objective.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the mathematical form of an LP (Primal)?

A

n variables, m constraints
max c^T x
Ax <= b
x >= 0

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What’s the difference between LP and ILP?

A

Aside from runtime, ILPs are constrained by x must be integers.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How do solutions to LP and ILP relate?

A

ILP solutions are always a subset of LP solutions, but are not guaranteed to be optimal LP solutions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How do you solve an ILP (approximation)?

A
  1. Take a problem and convert it into an ILP
  2. Remove the integer constraints of ILP to get an LP problem
  3. Solve the LP problem as you would normally using Simplex
  4. Take the optimal solution for the LP, and convert it to a feasible point for the ILP
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Given a primal LP, how do you write the dual LP?

A
  1. Convert the Primal to Standard Form
  2. Dual LP is minimize
  3. Move terms around
    a. Gather RHS of Primal as Dual minimization terms
    b. Gather Primal x1 and put them as coefficients on the first row of Dual constraints, x2 as coefficients on the second row, etc.
    c. Gather coefficients of Primal maximization as Dual RHS
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the mathematical form of the Dual LP?

A

m variables, n constraints
min b^T y
A^T y >= c
y >= 0

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How do you check if an LP has a solution?

A

Validate that it’s feasible and bounded by checking that the Primal and Dual LPs are feasible.

  • If the Primal LP is not feasible, then there is no feasible solution.
  • If the Dual LP is not feasible, then the problem is unbounded.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How do you check if an LP is feasible?

A

Add a new variable z and maximize it to see if it is positive.

max z
Ax + z <= b
x >= 0

If z >= 0, the LP is feasible. If z < 0, infeasible.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the weak duality theorem?

A

Feasible x for Primal LP <= Feasible y for Dual LP

c^T x <= b^T y

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the strong duality theorem?

A

Primal LP is feasible and bounded iff Dual LP is feasible and bounded

Primal LP has an optimal x iff Dual LP has an optimal y

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

If the Primal LP is unbounded, what does that tell you about the Dual LP?

A

Infeasible

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

If the Dual LP is unbounded, what does that tell you about the Primal LP?

A

Infeasible

17
Q

If the Primal LP is infeasible, what does that tell you about the Dual LP?

A

Irrelevant because the problem can’t be solved

18
Q

If the Primal LP is feasible, what does that tell you about the Dual LP?

A

Nothing/bounded

19
Q

If the Primal LP is feasible, what does that tell you about its boundedness?

A

Nothing without evaluating the Dual LP

20
Q

If the Primal LP is feasible and the Dual LP is infeasible, what does that tell you about the Primal LP?

A

Unbounded

21
Q

How do you write the Linear Program for a problem?

A
  1. Determine the variables
  2. Determine objective function (min/max)
  3. Determine constraints (supply, demand), usually non-negative
  4. Write in Standard Form
22
Q

How do you write a Linear Program in Standard Form?

A
  1. Convert objective function to maximize (negative it if it’s a min)
  2. Convert equalities to two inequalities
  3. Change constraints to form LHS <= RHS by negating them
  4. Constrain all variables to >= 0