advanced operations research techniques ie316 quiz 1 review

34
Advanced Operations Research Techniques IE316 Quiz 1 Review Dr. Ted Ralphs

Upload: tranmien

Post on 02-Jan-2017

218 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Advanced Operations Research Techniques IE316 Quiz 1 Review

Advanced Operations Research TechniquesIE316

Quiz 1 Review

Dr. Ted Ralphs

Page 2: Advanced Operations Research Techniques IE316 Quiz 1 Review

IE316 Quiz 1 Review 1

Reading for The Quiz

• Material covered in detail in lecture.

– 1.1, 1.4, 2.1-2.6, 3.1-3.3, 3.5

• Background material you should know.

– 1.2, 1.3, 1.5

• Material you should read and be familiar with.

– 1.6, 2.7, 3.7

• Optional material that may help your comprehension.

– 2.8, 3.6

1

Page 3: Advanced Operations Research Techniques IE316 Quiz 1 Review

IE316 Quiz 1 Review 2

How to Study for The Quiz

• You should have done all the reading and understand the theorems andproofs in the sections we covered in detail.

• Review and understand the homework solutions.

• Review the lecture slides and make sure you can answer the questionsthat are posed.

• Go through the review slides and make sure you understand the flow ofideas and the connections among them.

• Ask questions if something is not clear.

2

Page 4: Advanced Operations Research Techniques IE316 Quiz 1 Review

IE316 Quiz 1 Review 3

Math Programming Models

• A mathematical model consists of:

– Decision variables– Constraints– Objective Function– Parameters and Data

The general form of a math programming model is:

min or max f(x1, . . . , xn)

s.t. gi(x1, . . . , xn)

≤=≥

bi

We might also want the values of the variables to belong to discrete set X.

3

Page 5: Advanced Operations Research Techniques IE316 Quiz 1 Review

IE316 Quiz 1 Review 4

Linear Functions

• A linear function f : Rn → R is a weighted sum, written as

f(x1, . . . , xn) =n∑

i=1

cixi

for given coefficients c1, . . . , cn.

• We can write x1, . . . , xn and c1, . . . , cn as vectors x, c ∈ Rn to obtain:

f(x) = cTx

• In this way, a linear function can be represented simply as a vector.

4

Page 6: Advanced Operations Research Techniques IE316 Quiz 1 Review

IE316 Quiz 1 Review 5

Linear Programs

• A linear program is a math program that can be written in the followingform:

minimize cTx

s.t. aTi x≥ bi ∀i ∈ M1

aTi x≤ bi ∀i ∈ M2

aTi x = bi ∀i ∈ M3

xj ≥ 0 ∀j ∈ N1

xj ≤ 0 ∀j ∈ N2

• This in turn can be written equivalently as

minimize cTx

s.t. Ax≥ b

5

Page 7: Advanced Operations Research Techniques IE316 Quiz 1 Review

IE316 Quiz 1 Review 6

Standard Form

• To solve a linear program, we must put it in the following standard form:

min cTx

s.t. Ax = b

x≥ 0

• Eliminate free variables: Replace xj with x+j − x−j , where x+

j , x−j ≥ 0.

• Eliminate inequality constraints: Given an inequality aTi x ≥ bi, we can

rewrite it as:

aTi x− si = bi

si ≥ 0

6

Page 8: Advanced Operations Research Techniques IE316 Quiz 1 Review

IE316 Quiz 1 Review 7

A Little Linear Algebra Review

Definition 1. A finite collection of vectors x1, . . . , xk ∈ Rn is linearlydependent if ∃λ ∈ Rk such that

∑ki=1 λix

i = 0. Otherwise, the vectors arelinearly independent.

Let A be a square matrix. Then, the following statements are equivalent:

• The matrix A is invertible.

• The matrix AT is invertible.

• The determinant of A is nonzero.

• The rows of A are linearly independent.

• The columns of A are linearly independent.

• For every vector b, the system Ax = b has a unique solution.

• There exists some vector b for which the system Ax = b has a uniquesolution.

7

Page 9: Advanced Operations Research Techniques IE316 Quiz 1 Review

IE316 Quiz 1 Review 8

A Little More Linear Algebra Review

Definition 2. A nonempty subset S ⊆ Rn is called a subspace if αx+γy ∈S ∀x, y ∈ S and ∀α, γ ∈ R.

Definition 3. A linear combination of a collection of vectors x1, . . . xk ∈Rn is any vector y ∈ Rn such that y =

∑ki=1 λix

i for some λ ∈ Rk.

Definition 4. The span of a collection of vectors x1, . . . xk ∈ Rn is theset of all linear combinations of those vectors.

Definition 5. Given a subspace S ⊆ Rn, a collection of linearlyindependent vectors whose span is S is called a basis of S. The number ofvectors in the basis is the dimension of the subspace.

8

Page 10: Advanced Operations Research Techniques IE316 Quiz 1 Review

IE316 Quiz 1 Review 9

Subspaces and Bases

• A given subspace has an infinite number of bases.

• Each basis has the same number of vectors in it.

• If S and T are subspaces such that S ⊂ T ⊂ Rn, then a basis of S canbe extended to a basis of T .

• The span of the columns of a matrix A is a subspace called the columnspace or the range, denoted range(A).

• The span of the rows of a matrix A is a subspace called the row space.

• The dimensions of the column space and row space are always equal.We call this number rank(A).

• Clearly, rank(A) ≤ min{m,n}. If rank(A) = min{m,n}, then A issaid have full rank.

• The set {x ∈ Rn|Ax = 0} is called the null space of A (denotednull(A)) and has dimension n− rank(A).

9

Page 11: Advanced Operations Research Techniques IE316 Quiz 1 Review

IE316 Quiz 1 Review 10

Polyhedra

Definition 6. A polyhedron is a set of the form {x ∈ Rn|Ax ≥ b}, whereA ∈ Rm×n and b ∈ Rm.

Definition 7. A set S ⊂ Rn is bounded if there exists a constant K suchthat |xi| < K ∀x ∈ S, ∀i ∈ [1, n].

Definition 8. Let a ∈ Rn and b ∈ R be given.

• The set {x ∈ Rn|aTx = b} is called a hyperplane.

• The set {x ∈ Rn|aTx ≥ b} is called a half-space.

Notes:

• A given hyperplane forms the boundary of a corresponding half-space.

• A vector a ∈ Rn is orthogonal to the hyperplane defined by a.

• A polyhedron is the intersection of a finite number of half-spaces.

10

Page 12: Advanced Operations Research Techniques IE316 Quiz 1 Review

IE316 Quiz 1 Review 11

Convex Sets

Definition 9. A set S ⊆ Rn is convex if ∀x, y ∈ S, λ ∈ [0, 1], we haveλx + (1− λ)y ∈ S.

Definition 10. Let x1, . . . , xk ∈ Rn and λ ∈ Rk be given such thatλT1 = 1.

• The vector∑k

i=1 λixi is said to be a convex combination of x1, . . . , xk.

• The convex hull of x1, . . . , xk is the set of all convex combinations ofthese vectors.

Notes:

• The convex hull of two points is a line segment.

• A set is convex if and only if for any two points in the set, the linesegment joining those two points lies entirely in the set.

11

Page 13: Advanced Operations Research Techniques IE316 Quiz 1 Review

IE316 Quiz 1 Review 12

Extreme Points and Vertices

Let P ⊆ Rn be a given polyhedron.

Definition 11. A vector x ∈ P is an extreme point of P if 6 ∃y, z ∈ P, λ ∈(0, 1) such that x = λy + (1− λ)z.

Definition 12. A vector x ∈ P is an vertex of P if ∃c ∈ Rn such thatcTx < cTy ∀y ∈ P, x 6= y.

Notes:

• These definitions are purely geometric and easy to work with.

• However, to do anything algorithmic, we need an algebraiccharacterization.

• Thus, we will consider the matrix defining the polyhedron (not unique!).

12

Page 14: Advanced Operations Research Techniques IE316 Quiz 1 Review

IE316 Quiz 1 Review 13

Binding Constraints

Consider a polyhedron P = {x ∈ Rn|Ax ≥ b}.Definition 13. If a vector x̂ satisfies aT

i x̂ = bi, then we say thecorresponding constraint is binding.

Theorem 1. Let x̂ ∈ Rn be given and let I = {i | aTi x̂ = bi} represent the

set of constraints that are binding at x̂. Then the following are equivalent:

• There exist n vectors in the set {ai | i ∈ I} that are linearly independent.

• The span of the vectors {ai | i ∈ I} is Rn.

• The system of equations aTi x̂ = bi, i ∈ I has the unique solution x̂.

If the vectors {aj | j ∈ J} for some J ⊆ [1,m] is linearly independent, wewill say that the corresponding constraints are also linearly independent.

13

Page 15: Advanced Operations Research Techniques IE316 Quiz 1 Review

IE316 Quiz 1 Review 14

Basic Solutions

Consider a polyhedron P = {x ∈ Rn|Ax ≥ b} and let x̂ ∈ Rn be given.

Definition 14. The vector x̂ is a basic solution if there exist n linearlyindependent, binding constraints at x̂.

Definition 15. If x̂ is a basic solution and x̂ ∈ P, then x̂ is basic feasiblesolution.

Theorem 2. If P is nonempty and x̂ ∈ P, then the following areequivalent:

• x̂ is a vertex.

• x̂ is an extreme point.

• x̂ is a basic feasible solution.

14

Page 16: Advanced Operations Research Techniques IE316 Quiz 1 Review

IE316 Quiz 1 Review 15

Basic Feasible Solutions in Standard Form

• To obtain a basic solution, we must set n−m of the variables to zero.

• We must also obtain a set of linearly independent constraints.

• Therefore, the variables we pick cannot be arbitrary.

Theorem 3. A vector x̂ ∈ Rn is a basic solution if and only if Ax̂ = band there exist indices B(1), . . . , B(m) such that:

• The columns AB(1), . . . , AB(m) are linearly independent, and

• If i 6= B(1), . . . , B(m), then x̂i = 0.

15

Page 17: Advanced Operations Research Techniques IE316 Quiz 1 Review

IE316 Quiz 1 Review 16

Some Terminology

• If x̂ is a basic solution, then x̂B(1), . . . , x̂B(m) are the basic variables.

• The columns AB(1), . . . , AB(m) are called the basic columns.

• Since they are linearly independent, these columns form a basis for Rm.

• A set of basic columns form a basis matrix, denoted B. So we have,

B =[AB(1) AB(2) · · ·AB(m)

], xB =

xB(1)...

xB(m)

16

Page 18: Advanced Operations Research Techniques IE316 Quiz 1 Review

IE316 Quiz 1 Review 17

The Full Row Rank Assumption

Theorem 4. Let P = {x ∈ Rn|Ax ≥ b, x ≥ 0} for some A ∈ Rm×n withrank(A) = k. If rows aT

i1, aT

i2, . . . , aT

ikare linearly independent, then

P = {x ∈ Rn | aTi1x = bi1, a

Ti2x = bi2, . . . , a

Tik

x = bik, x ≥ 0}.

Notes:

• This tells us we can eliminate any row we like from A, as long as weleave k linearly independent rows.

• This allows us to always assume A has full row rank.

17

Page 19: Advanced Operations Research Techniques IE316 Quiz 1 Review

IE316 Quiz 1 Review 18

Degeneracy

Definition 16. A basic solution x̂ is called degenerate if more than n ofthe constraints are binding at x̂.

Notes:

• In a standard form polyhedron, the vector x̂ is degenerate if more thann−m of its components are zero.

• Note that degeneracy is not independent of representation.

• Degeneracy is important because it can cause problems in somealgorithms for linear programming.

• This also gives us a glimpse of the importance of formulation in linearprogramming.

18

Page 20: Advanced Operations Research Techniques IE316 Quiz 1 Review

IE316 Quiz 1 Review 19

Optimality in Linear Programming

• For linear optimization, a finite optimal cost is equivalent to the existenceof an optimal solution.

• Since any linear programming problem can be written in standard form,we can derive the following result:

Theorem 5. Consider the linear programming problem of minimizing cTxover a nonempty polyhedron. Then, either the optimal cost is −∞ or thereexists an optimal solution which is an extreme point.

19

Page 21: Advanced Operations Research Techniques IE316 Quiz 1 Review

IE316 Quiz 1 Review 20

Representation of Polyhedra

Theorem 6. A nonempty, bounded polyhedron is the convex hull of itsextreme points.

Theorem 7. The convex hull of a finite set of vectors is a polyhedron.

Notes:

• Graphically, these results may seem obvious, but it takes some work toprove them.

• These results are fundamental to the theory of linear optimization.

20

Page 22: Advanced Operations Research Techniques IE316 Quiz 1 Review

IE316 Quiz 1 Review 21

Feasible and Improving Directions

Definition 17. Let x̂ be an element of a polyhedron P. A vector d ∈ Rn

is said to be a feasible direction if there exists θ ∈ R+ such that x̂+θd ∈ P .

Definition 18. Consider a polyhedron P and the associated linear programminx∈P cTx for c ∈ Rn. A vector d ∈ Rn is said to be an improvingdirection if cTd < 0.

Notes:

• Once we find a feasible, improving direction, we want to move along thatdirection as far as possible.

• Recall that we are interested in extreme points.

• The simplex method moves between adjacent extreme points usingimproving directions.

21

Page 23: Advanced Operations Research Techniques IE316 Quiz 1 Review

IE316 Quiz 1 Review 22

Constructing Feasible Search Directions

• Consider a BFS x̂, so that x̂N = 0.

• Any feasible direction must increase the value of at least one of thenonbasic variables.

• We will consider the basic directions that increase the value of exactlyone of the nonbasic variables, say variable j. This means

dj = 1

di = 0 for every nonbasic index i 6= j

• In order to remain feasible, we must also have Ad = 0, which means

0 = Ad =n∑

i=1

Aidi =m∑

i=1

AB(i)dB(i)+Aj = BdB+Aj ⇒ dB = −B−1Aj

22

Page 24: Advanced Operations Research Techniques IE316 Quiz 1 Review

IE316 Quiz 1 Review 23

Constructing Improving Search Directions

• Now we know how to construct feasible search directions.

• In order to ensure they are improving, we must have cTd < 0.

Definition 19. Let x̂ be a basic solution, let B be an associated basismatrix, and let cB be the vector of costs of the basic variables. For eachj, we define the reduced cost c̄j of variable j by

c̄j = cj − cTBB−1Aj.

• The reduced cost is the amount of change in the objective function perunit increase in the corresponding variable.

• The basic direction associated with variable j is improving if and only ifc̄j < 0.

23

Page 25: Advanced Operations Research Techniques IE316 Quiz 1 Review

IE316 Quiz 1 Review 24

Optimality Conditions

Theorem 8. Consider a basic feasible solution x̂ associated with a basismatrix B and let c̄ be the corresponding vector of reduced costs.

• If c̄ ≥ 0, then x̂ is optimal.

• If x̂ is optimal and nondegenerate, then c̄ ≥ 0.

Notes:

• The condition c̄ ≥ 0 implies there are no feasible improving directions.

• However, c̄j < 0 does not ensure the existence of an improving, feasibledirection unless the current BFS is nondegenerate

.

24

Page 26: Advanced Operations Research Techniques IE316 Quiz 1 Review

IE316 Quiz 1 Review 25

The Step Length

• The distance we can move without becoming infeasible is the step length.

• We can move until one of the nonnegativity constraints is violated.

• If d ≥ 0, then the step length is ∞ and the linear program is unbounded.

• if di < 0, then x̂i + θdi ≥ 0 ⇒ θ ≥ −x̂idi

.

• Therefore, we can compute the step length explicitly as

θ∗ = min{i|di<0}

−x̂i

di

• Note that we need only consider the basic variables in this computation.

25

Page 27: Advanced Operations Research Techniques IE316 Quiz 1 Review

IE316 Quiz 1 Review 26

The Tableau Method

• This is the standard method for solving LPs by hand.

• We update the matrix B−1[b|A] as we go.

• To do this, we use elementary row operations.

• In addition, we also keep track of the reduced costs in row “zero”.

• This gives us all the data we need at each iteration.

26

Page 28: Advanced Operations Research Techniques IE316 Quiz 1 Review

IE316 Quiz 1 Review 27

What the Tableau Looks Like

• The tableau looks like this

−cTBB−1b cT − cT

BB−1AB−1b B−1A

• In more detail, this is

−cTBxB c̄1 · · · c̄n

xB(1)... B−1A1 · · · B−1An

xB(m)

27

Page 29: Advanced Operations Research Techniques IE316 Quiz 1 Review

IE316 Quiz 1 Review 28

Implementing the Tableau Method

1. Start with the tableau associated with a specified BFS and associatedbasis B.

2. Examine the reduced costs in row zero and select a pivot column withc̄j < 0 if there is one. Otherwise, the current BFS is optimal.

3. Consider u = b−1Aj, the jth column of the tableau. If no component ofu is positive, then the LP is unbounded.

4. Otherwise, compute the step size using the minimum ratio rule anddetermine the pivot row.

5. Scale the pivot row so that the pivot element becomes zero.

6. Add a constant multiple of the pivot row to each other row of the tableauso that all other elements of the pivot column become zero.

7. Go to Step 2.

28

Page 30: Advanced Operations Research Techniques IE316 Quiz 1 Review

IE316 Quiz 1 Review 29

The Revised Simplex Method

The revised simplex method is used in practice and is almost identical tothe tableau method except that we only update B−1.

1. Start with a specified BFS x̂ and the associated basis inverse B−1.

2. Compute pT = cTBB−1 and the reduced costs c̄j = cj − pTAj.

3. If c̄ ≥ 0, then the current solution is optimal.

4. Select the entering variable j and compute u = B−1Aj.

5. If u ≤ 0, then the LP is unbounded.

6. Determine the step size θ∗ = min{i|ui>0}x̂iui

.

7. Determine the new solution and the leaving variable i.

8. Update B−1.

9. Go to Step 1.

29

Page 31: Advanced Operations Research Techniques IE316 Quiz 1 Review

IE316 Quiz 1 Review 30

Pivot Selection

• The process of removing one variable and replacing from the basis andreplacing it with another is called pivoting.

• We have the freedom to choose the leaving variable from among a listof candidates.

• How do we make this choice?

• The reduced cost tells us the cost in the objective function for each unitof change in the given variable.

• Intuitively, cj is the cost for the change in the variable itself and−cT

BB−1Aj is the cost of the compensating change in the other variables.

• This leads to the following possible rules:

– Choose the column with the most negative reduced cost.– Choose the column for which θ∗|c̄j| is largest.

30

Page 32: Advanced Operations Research Techniques IE316 Quiz 1 Review

IE316 Quiz 1 Review 31

Obtaining an Initial Basic Feasible Solution

• If the origin is feasible, then finding an initial BFS is easy.

• Suppose we are given an LP min{cTX|Ax = b, x ≥ 0} already instandard form where the origin is not feasible.

• To obtain an initial BFS, solve the following auxiliary LP.

min

m∑

i=1

yi

s.t. Ax + y = b

x≥ 0

y≥ 0

• If the optimal value for this problem is zero, then we obtain a feasiblesolution.

• Otherwise, the original problem was infeasible.

• This is usually called the Phase I LP.

31

Page 33: Advanced Operations Research Techniques IE316 Quiz 1 Review

IE316 Quiz 1 Review 32

Two-phase Simplex and the Big M method

• In the above method, we first solve the Phase I LP to obtain a BFS.

• Using that BFS, we start Phase II, which is solving the original problem.

• Another approach is to combine Phase I and Phase II.

• In this approach, we add the artificial variables and then change theobjective function to

n∑

j=1

cjxj + Mm∑

i=1

yi

• M has to be large enough to force the artificial variables to zero.

• If the optimal solution has any artificial variables at nonzero level, thenthe original problem was infeasible.

• Otherwise, we obtain an optimal solution.

• In practice, two-phase simplex is usually used.

32

Page 34: Advanced Operations Research Techniques IE316 Quiz 1 Review

IE316 Quiz 1 Review 33

Computational Efficiency of the Simplex Method

• The efficiency of the method depends on the number of iterations.

• The number of iterations depends on how many extreme points arevisited.

• It is easy to construct an example where there are 2n extreme points andall of them are visited.

• This means in the worst case, the simplex method requires an exponentialnumber of iterations.

• No matter how well the method performs in practice, we are limited bythe diameter of the polyhedron.

• Not much is known about the diameter of complex polyhedra.

• All things considered, the simplex method performs very well in practice.

33