Michælmas 2012 Operations Research III/IV 1

Similar documents
Lecture 2: The Simplex method

MATH2070 Optimisation

TIM 206 Lecture 3: The Simplex Method

Review Solutions, Exam 2, Operations Research

Simplex Method for LP (II)

Yinyu Ye, MS&E, Stanford MS&E310 Lecture Note #06. The Simplex Method

3 The Simplex Method. 3.1 Basic Solutions

Ω R n is called the constraint set or feasible set. x 1

OPTIMISATION 3: NOTES ON THE SIMPLEX ALGORITHM

AM 121: Intro to Optimization

Chapter 5 Linear Programming (LP)

Today s class. Constrained optimization Linear programming. Prof. Jinbo Bi CSE, UConn. Numerical Methods, Fall 2011 Lecture 12

Linear Programming and the Simplex method

Optimization 4. GAME THEORY

1. Algebraic and geometric treatments Consider an LP problem in the standard form. x 0. Solutions to the system of linear equations

AM 121: Intro to Optimization Models and Methods

1 Review Session. 1.1 Lecture 2

In Chapters 3 and 4 we introduced linear programming

Prelude to the Simplex Algorithm. The Algebraic Approach The search for extreme point solutions.

Simplex Algorithm Using Canonical Tableaus

A Review of Linear Programming

2. Linear Programming Problem

Dr. Maddah ENMG 500 Engineering Management I 10/21/07

OPTIMISATION /09 EXAM PREPARATION GUIDELINES

Farkas Lemma, Dual Simplex and Sensitivity Analysis

9.1 Linear Programs in canonical form

OPERATIONS RESEARCH. Linear Programming Problem

Linear Programming: Simplex

Linear programs Optimization Geoff Gordon Ryan Tibshirani

IE 5531: Engineering Optimization I

Chap6 Duality Theory and Sensitivity Analysis

Gauss-Jordan Elimination for Solving Linear Equations Example: 1. Solve the following equations: (3)

The Simplex Method for Solving a Linear Program Prof. Stephen Graves

Distributed Real-Time Control Systems. Lecture Distributed Control Linear Programming

CO350 Linear Programming Chapter 6: The Simplex Method

3. THE SIMPLEX ALGORITHM

Linear programming. Saad Mneimneh. maximize x 1 + x 2 subject to 4x 1 x 2 8 2x 1 + x x 1 2x 2 2

Lecture 11 Linear programming : The Revised Simplex Method

UNIVERSITY OF CALICUT SCHOOL OF DISTANCE EDUCATION B Sc. Mathematics (2011 Admission Onwards) II SEMESTER Complementary Course

The Simplex Algorithm

Introduction to the Simplex Algorithm Active Learning Module 3

Graphical and Computer Methods

Lesson 27 Linear Programming; The Simplex Method

February 22, Introduction to the Simplex Algorithm

OPTIMISATION 2007/8 EXAM PREPARATION GUIDELINES

Another max flow application: baseball

Part 1. The Review of Linear Programming

min 4x 1 5x 2 + 3x 3 s.t. x 1 + 2x 2 + x 3 = 10 x 1 x 2 6 x 1 + 3x 2 + x 3 14

Math 273a: Optimization The Simplex method

x 1 + x 2 2 x 1 x 2 1 x 2 2 min 3x 1 + 2x 2

x 4 = 40 +2x 5 +6x x 6 x 1 = 10 2x x 6 x 3 = 20 +x 5 x x 6 z = 540 3x 5 x 2 3x 6 x 4 x 5 x 6 x x

AM 121: Intro to Optimization Models and Methods Fall 2018

Introduction to Operations Research Prof. G. Srinivasan Department of Management Studies Indian Institute of Technology, Madras

Chapter 4 The Simplex Algorithm Part I

Optimization - Examples Sheet 1

Introduction to Mathematical Programming IE406. Lecture 13. Dr. Ted Ralphs

Linear Programming for Planning Applications

UNIVERSITY of LIMERICK

Math Models of OR: Extreme Points and Basic Feasible Solutions

Dr. S. Bourazza Math-473 Jazan University Department of Mathematics

Week 2. The Simplex method was developed by Dantzig in the late 40-ties.

LINEAR PROGRAMMING 2. In many business and policy making situations the following type of problem is encountered:

Linear Programming, Lecture 4

ORF 522. Linear Programming and Convex Analysis

CS 6820 Fall 2014 Lectures, October 3-20, 2014

Spring 2017 CO 250 Course Notes TABLE OF CONTENTS. richardwu.ca. CO 250 Course Notes. Introduction to Optimization

MAT016: Optimization

IE 5531: Engineering Optimization I

Note 3: LP Duality. If the primal problem (P) in the canonical form is min Z = n (1) then the dual problem (D) in the canonical form is max W = m (2)

II. Analysis of Linear Programming Solutions

February 17, Simplex Method Continued

15-780: LinearProgramming

Lecture 4: Algebra, Geometry, and Complexity of the Simplex Method. Reading: Sections 2.6.4, 3.5,

The Simplex Algorithm and Goal Programming

Math Models of OR: Some Definitions

1 Overview. 2 Extreme Points. AM 221: Advanced Optimization Spring 2016

Example: 2x y + 3z = 1 5y 6z = 0 x + 4z = 7. Definition: Elementary Row Operations. Example: Type I swap rows 1 and 3

...(iii), x 2 Example 7: Geetha Perfume Company produces both perfumes and body spray from two flower extracts F 1. The following data is provided:

IE 400: Principles of Engineering Management. Simplex Method Continued

Today: Linear Programming (con t.)

The Simplex Algorithm

OPRE 6201 : 3. Special Cases

Advanced Operations Research Prof. G. Srinivasan Department of Management Studies Indian Institute of Technology, Madras

Algebraic Simplex Active Learning Module 4

Introduction. Very efficient solution procedure: simplex method.

Motivating examples Introduction to algorithms Simplex algorithm. On a particular example General algorithm. Duality An application to game theory

Fundamentals of Operations Research. Prof. G. Srinivasan. Indian Institute of Technology Madras. Lecture No. # 15

1 Seidel s LP algorithm

56:270 Final Exam - May

4. Duality and Sensitivity

Introduction to linear programming using LEGO.

December 2014 MATH 340 Name Page 2 of 10 pages

3E4: Modelling Choice. Introduction to nonlinear programming. Announcements

Section Notes 9. IP: Cutting Planes. Applied Math 121. Week of April 12, 2010

Slack Variable. Max Z= 3x 1 + 4x 2 + 5X 3. Subject to: X 1 + X 2 + X x 1 + 4x 2 + X X 1 + X 2 + 4X 3 10 X 1 0, X 2 0, X 3 0

MVE165/MMG631 Linear and integer optimization with applications Lecture 5 Linear programming duality and sensitivity analysis

ECE 307 Techniques for Engineering Decisions

Optimisation and Operations Research

Optimisation. 3/10/2010 Tibor Illés Optimisation

MATH 445/545 Test 1 Spring 2016

Transcription:

Michælmas 2012 Operations Research III/IV 1 An inventory example A company makes windsurfing boards and has orders for 40, 60, 75 and 25 boards respectively over the next four production quarters. All boards ordered must be available by the end of the relevant quarter and there are initially 10 boards in stock. Using regular labour, 40 boards can be made in a quarter at a cost of 200 per board. Additional boards can be made using overtime labour at a cost of 250 per board. At the end of each quarter a storage cost of 20 per board is incurred for all boards left in stock. What should the production schedule be for the next four quarters? The decision variables must include x t = the number of boards made in regular work time in quarter t and y t = the number of boards made in overtime production in quarter t as these must be specified in the production schedule. It isn t immediately obvious but it also turns out to be very useful to include a collection of inventory variables to count boards left in stock at the ends of quarters i.e. i t = the number of boards in stock at the end of quarter t. The cost of production in terms of these variables is simply 200(x 1 + x 2 + x 3 + x 4 ) + 250(y 1 + y 2 + y 3 + y 4 ) + 20(i 1 + i 2 + i 3 + i 4 ) which we will want to minimise subject to the variables satisfying all the production constraints. The simplest of these are that regular time production is limited and that negative items cannot be produced i.e. 0 x t 40 and y t 0 for each t. The only other constraints involve keeping track of the inventory. Let d t denote the number of orders for quarter t. The inventory variables must satisfy i t = i t 1 + (x t + y t ) d t, t = 1,..., 4 since the difference in inventory between the end and start of a quarter equals the difference between what is produced and what is sold. The requirement that all orders are met is equivalent to the constraints i t 0 for each t. To put this into canonical form introduce slack variables into the upper x i constraints to get x i +s i = 40 so now there are 16 non-negative variables and 8 equality constraints. The problem can now be solved by an entirely routine application of the simplex algorithm. Doing it we find the minimal cost schedule has x T = (40, 40, 40, 25), y T = (0, 10, 35, 0) and i T = (10, 0, 0, 0) for a total cost of 40, 450. The model here is not realistic but does give a flavour of how linear programming problems occur in many practical settings. Solution using the Excel Solver add-on In this little section I assume you have used Excel before. The cells on a spreadsheet usually are used like variable names but can also contain formulas. Choose a block of cells to represent the 12 variables (Excel can sort out slack variables and artificial variables for itself!) e.g B2 to E4 with B2:E2 representing the x i (and put some descriptive text in B1). Now enter the objective function formula into a cell e.g. A2 by typing in =300*SUM($B$2:$E$2) + 350*SUM($B$3:$E$3) + 20*SUM($B$4:$E$4) (the same expression without the $ signs will work I think). Similarly enter the LHS formulas for the four inventory constraints into cells A4 to A7 say. Now click the Solver... item from the Tools menu (the package may have to be installed). This should pop up a window for setting up the LP problem. Start by setting the target cell (clicking on the cell you have chosen to contain the objective fn will do it) and then the Min radio button. Set the Changing Cells to those you chose to contain the variables. Now set the constraints by clicking on the Add button. This pops up another window and in Cell Reference enter the cell containing a constraint formula with the

Michælmas 2012 Operations Research III/IV 2 matching constant in the Constraint window (don t forget the constraints x i 40). Add all eight constraints in this way and select Close. Check you have the right constraints set up and now choose Options and check the linear model and non-negative variable boxes, click OK and then Solve. Excel will offer you reports on the answer, sensitivity and limits. You can read the Help to see what these are about but we will cover the background theory in the lectures on postoptimal analysis. To make Excel s reports intelligible it is also helpful to learn about naming ranges of cells and other ways of setting up the constraints. I have actually set up an Excel worksheet called Pivot.xls that you can save to your own filespace from a link just below this one on the main page. It contains sheets setup for the above inventory example and also Question 9 on the problem sheet. I have also written a simple pivoting macro which you can access with the button on the first few worksheets (you may have to switch security to medium level). To use this, type in the coefficients of your problem (in canonical form), select the cell where you want to pivot (i.e. click on it) and then press the Pivot button. The first three sheets have coefficients of simple examples for you to try. Enjoy! Solution using Maple If you prefer to use Maple then it has many facilities that are useful for linear programming. Start by looking in Help for simplex. I will add more notes here when I have time. Hillier & Lieberman Chapters 1 and 3 discuss applications of operations research techniques and describe some real world examples. Chapter 3 provides a detailed yet elementary introduction into linear optimisation problems with several good examples.

Michælmas 2012 Operations Research III/IV 3 Lectures on the Simplex Algorithm Defn Linear programming problem: max or min the linear function c T x subject to linear constraints. The objective function has no stationary points! Geometry suggests the optimum will occur at a corner point (we will prove this later). Introductory example livestock on a farm. Let x 1 denote the number of cows kept and x 2 the number of sheep. We need to solve the following linear programming problem: maximise 250x 1 + 45x 2 subject to x 1 50 (cows) x 2 200 (sheep) x 1 + 1 5 x 2 72 (pasture) 150x 1 + 25x 2 10, 000 (labour) with of course x 1, x 2 N 0. Graphical method shows that the maximum occurs at the intersection of the boundary lines of the last two constraints. We can use slack variables (and other tricks) to change the form but not the content of LP problems. Canonical form i.e. max z = c T x where Ax = b, x 0 suits algebraic treatment. We can write down the introductory example in canonical form by introducing into each of the inequality constraints a non-negative variable to take up the slack i.e. maximise 250x 1 + 45x 2 subject to x 1 + s 1 = 50 x 2 + s 2 = 200 5x 1 + x 2 + s 3 = 360 6x 1 + x 2 + s 4 = 400 with the sign constraints x 1, x 2, s 1, s 2, s 3, s 4 0. Defn Corner points have algebraic description as basic feasible solutions. A basis is a set B of m of the x i with linearly independent columns A i and any variable in B is basic. The solution to Ax = b where the n m non-basic variables are 0 is the basic solution for B. When the basic variables have non-negative values we have a basic feasible solution (bfs). For any chosen basis we can manipulate Ax = b into the form x B = B 1 b B 1 Nx N (1.1a) where B = [A i ], x i B. This expresses the feasible set using the non-basic variables x N. Substitution into the objective function gives us the reduced costs c T c T N ct B B 1 N and these enable assessment of relative worths of adjacent corner points via Consider the equation z + (c T N ct B B 1 N)x N = c T B B 1 b. (1.1b) z + γx = c, γ < 0 and c are constants. As x increases so does z so in (1.1b) if any of the reduced costs are negative then, by increasing the relevant components of x N, we can move from the bfs to points in the feasible set where z is larger. When all the reduced costs for a given bfs are non-negative, that bfs is a global maximum to the problem. The example has at most ( 6 4) = 15 basic solutions (and by sketching the feasible set we see that in fact there are only 6 bfs s). Equations (1.1a) and (1.1b) with the basis {x 1, x 2, s 1, s 2 } can be written out in detail as follows. The parameters are B = 1 0 1 0 0 1 0 1 5 1 0 0 6 1 0 0, N = 0 0 0 0 1 0 0 1, b = 50 200 360 400,

Michælmas 2012 Operations Research III/IV 4 with c T B = (250, 45, 0, 0) and ct N = (0, 0). We now use row operations (or Maple) to find B 1 from which we can calculate B 1 b, B 1 N and hence c T B B 1 b and c T B B 1 N. Doing all this we find that equation (1.1a) says x 1 40 1 1 [ ] x B = x 2 s 1 = 160 10 6 5 s3 1 1 s 4 s 2 40 6 5 while equation (1.1b) says z + 20s 3 + 25s 4 = 17, 200 and we see that this basic solution is both feasible and optimal. Finding a better basis Any negative reduced cost implies there is an adjacent bfs (corner point) which is better! The problem is to find one and then re-express the problem. To do this we use a table containing all the parameters, specifically [ 1 0 T c T B B 1 N c T N 0 I B 1 N ] z x B x N = [ c T B B 1 b B 1 b ] (1.1c) where the top row contains (1.1b). We choose a variable to enter the basis, one to push out and then pivot (use row operations) to describe the problem from the new bfs (corner). Select pivot column (incoming var x l say) with neg reduced cost (most neg. is usual); with pivot column a (the x l col of B 1 N), if a i > 0 then x i = 0 when x l = (B 1 b) i /a i > 0 a i = 0 then x i = (B 1 b) i 0 for all x l a i < 0 then x i = (B 1 b) i a i x l > 0 (1.2a) (1.2b) (1.2c) so only basic vars x i with a i > 0 can be pushed out and we select the pivot row (outgoing var x i ) using the minimum ratio rule i.e. min i (B 1 b) i /a i over rows i with a i > 0 (1.2a); Gauss elimination normalise pivot row and use row operations to make all other elements of the pivot column equal zero. Example 1.2 (on the worksheet) We start with T 0 z x 1 x 2 s 1 s 2 s 3 z 1 3 1 0 0 0 0 s 1 0 2 1 1 0 0 4 s 2 0 1 2 0 1 0 2 s 3 0 1 1 0 0 1 5 Initial basis is (s 1, s 2, s 3 ) giving bfs (x T, s T ) = (0, 0, 4, 2, 5) with value 0. x 1 has reduced cost 3 so this bfs is not optimal. To bring x 1 in consider the ratios 4/2 = 2, 2/1 = 2 and 5/1 = 5. Both s 1 and s 2 reach 0 at x 1 = 2. Choose (at random there is no good rule for breaking such ties) s 2 to leave the basis i.e. the s 2 row is the pivot row. Row operations lead to

Michælmas 2012 Operations Research III/IV 5 T 1 z x 1 x 2 s 1 s 2 s 3 z 1 0 5 0 3 0 6 s 1 0 0 3 1 2 0 0 x 1 0 1 2 0 1 0 2 s 3 0 0 3 0 1 1 3 Again not optimal as x 2 has reduced cost 5! We continue just as above. Ratios from x 2 col are 0/3 and 3/3 (we don t use row 2 here as a 2 = 2 < 0) so s 1 leaves. Another pivot leads to T 2 z x 1 x 2 s 1 s 2 s 3 z 1 0 0 5/3 1/3 0 6 x 2 0 0 1 1/3 2/3 0 0 x 1 0 1 0 2/3 1/3 0 2 s 3 0 0 0 1 1 1 3 This is a different bfs but the same corner point and again not optimal. Bring s 2 into the basis. Only a 3 from that column is positive so s 3 leaves. Another pivot... T 3 z x 1 x 2 s 1 s 2 s 3 z 1 0 0 4/3 0 1/3 7 x 2 0 0 1 1/3 0 2/3 2 x 1 0 1 0 1/3 0 1/3 3 s 2 0 0 0 1 1 1 3 This table shows the unique optimal solution as both non-basic variables have strictly positive reduced costs. Question what if rc j < 0 and all the corresponding a i 0? From equation (1.2c) the nonbasic variable x j can be increased indefinitely and from equation (1.1b) i.e. the problem has an unbounded maximum. c T x = c T BB 1 b rc j x j as x j Finding an initial bfs In large problems there are too many bases for guessing to be an acceptable procedure (it s OK for small problems). We use the big M method to deal with this. Assume the problem has been pushed into canonical form (which is always possible). Any constraints which have the form (i) A j x + s j = b j 0, with s j 0 we use as they are and put s i into the starting basis. All others i.e. those in the forms (ii) A j x = b j 0, (iii) A j x s j = b j 0, with s j 0 we modify by including a non-negative artificial variable e.g. we change A j x = b j to A j x+w j = b j, w j 0. Note that the modified constraint is not equivalent to the original one! We also modify the objective function by including in it a term Mw j where M represents a huge positive value. Now we apply our algorithm, the idea being that this enormous penalty will lead us to force w j out of the basis i.e. make it zero so the original constraint is not modified after all. If we find a maximum where no artificial variables appear then that is the maximum for the original problem. If we don t then the original problem has no feasible solutions. Example 1.3 Consider the LP problem minimise 4x 1 + x 2 + x 3 where 2x 1 + x 2 + 2x 3 4, 3x 1 + 3x 2 + x 3 = 3, x 1 + x 2 + x 3 5, with x i 0.

Michælmas 2012 Operations Research III/IV 6 To swap to maximisation change the sign of the objective function. To make the problem canonical put slack vars into the first and third constraints. We can use s 2 in a starting basis but not s 1. We could easily guess a feasible basis but let s use the big M method. Put w 1 and w 2 into the first two constraints to get 2x 1 + x 2 + 2x 3 s 1 + w 1 = 4, 3x 1 + 3x 2 + x 3 + w 2 = 3, with w i 0. Clearly {w 1, w 2, s 2 } forms a feasible starting basis for this modified problem. The objective function now contains terms Mw 1 Mw 2 which we must substitute for with non-basic variables (basic vars have zero reduced costs!). Doing that we get so we start with z + (4 5M)x 1 + (1 4M)x 2 + (1 3M)x 3 + Ms 1 = 7M T 0 x 1 x 2 x 3 s 1 s 2 w 1 w 2 z 4 5M 1 4M 1 3M M 0 0 0 7M w 1 2 1 2 1 0 1 0 4 w 2 3 3 1 0 0 0 1 3 s 2 1 1 1 0 1 0 0 5 (the z column is hidden as it never affects any of our pivot calculations). Bring x 2 into the basis (as 1 4M is extremely negative) to replace w 2 (use the ratio rule) T 1 x 1 x 2 x 3 s 1 s 2 w 1 w 2 z 3 M 0 (2 5M)/3 M 0 0 (4M 1)/3 3M 1 w 1 1 0 5/3 1 0 1 1/3 3 x 2 1 1 1/3 0 0 0 1/3 1 s 2 0 0 2/3 0 1 0 1/3 4 and then (next pivot) bring in x 3 to replace w 1 to find that the basis {x 2, x 3, s 2 } is optimal with objective function value 11/5 obtained at x T = (0, 2/5, 9/5) with s T = (0, 14/5). The reduced costs for x 1 and s 1 are 13/5 and 2/5 respectively and so this is the unique optimum. Notice that we can either substitute a large number in for M or handle it algebraically (this is easy enough to program and avoids rounding error problems). It would be more usual to bring in x 1 at the first pivot but bringing in x 2 gets to the optimum with fewer pivots a general rule is to choose the most negative reduced cost. The primal simplex algorithm is the method we have developed for numerically solving LP problems. Step 0 Put the problem into canonical form, introducing artificial variables if necessary. Step 1 Check whether any of the reduced costs are negative. If any column of the table has reduced cost rc j < 0 and all a i 0 then the LP has an unbounded maximum, so stop; if any column of the table has rc j < 0 and at least one a i > 0 then go to step 2; otherwise go to step 3. Step 2 Choose a column with negative reduced cost, a row according to the the minimum ratio rule and pivot. Return to step 1. Step 3 An optimal bfs has been reached. If artificial variables are present in the basis the original LP is not feasible; if not, an optimal bfs has been found for the original LP problem. If any non-basic variables have reduced cost zero the optimum is not unique.

Michælmas 2012 Operations Research III/IV 7 On corner points and bases Two earlier claims remain to be established (i) if there are any feasible points then there is an optimal corner point and (ii) basic feasible solutions are corner points. Geometrically, corner points are defined by never lying on the line segment between any other pair of feasible points. We ll assume that A is m n of rank m below. Theorem 1.1 Corners are basic feasible solutions x is a corner point of P = {x R n : Ax = b, x 0} if and only if the columns of A for which x i > 0 are linearly independent. Proof: We use the equation Ax = n 1 x ia i where A i denotes the i th column of A and assume that P has a feasible point x. Let I = {i : x i > 0}. Then i I x ia i = n 1 x ia i = A x = b. [ ] Suppose that columns A i for i I are not linearly independent. This means there must exist constants y i (not all zero) such that i I y ia i = 0. Choose µ > 0 small enough that µ y i < x i for each i I and set y j = 0 for each j / I. Now we consider the points x + = x + µy and x = x µy. Both are members of P. To see this for x + note that x + i = x i + µy i x i µ y i > 0 for each i I, x + j = 0 for j / I and Ax + = A x + µay = A x = b. The argument for x is similar. Obviously 1 ( x + + x ) = 1 ) ( x + µy + x µy = x 2 2 so x is midway between x + and x and so cannot be a corner point of P. [ ] Suppose the A i for i I are linearly independent and that x = αv + (1 α)w for some v, w P and α (0, 1). Clearly I has not more than m members and for i / I we must have v i = w i = 0 as neither can be positive. Hence i I v ia i = i I w ia i = b which implies i I (v i w i )A i = 0 and as these columns are linearly independent v = w = x i.e. x is a corner point. This result shows that basic feasible solutions are corner points and vice versa. The same geometric idea is used to show that if there are any feasible points then corner points must exist and that one of them is optimal if there are any optimal points. Theorem 1.2 Fundamental Theorem of Linear Programming For a LP problem in canonical form (i) if there is a feasible solution then there is a basic feasible solution; (ii) if there is an optimal solution then there is an optimal bfs. Proof: (i) Suppose x is an element of the feasible set P = {x R n : Ax = b, x 0}. We have A x = n 1 x ia i = b where the A i are the columns of A. Suppose that p of the x i are non-zero (the first p say). If p m there is nothing to do as x is a basic feasible solution. If p > m then A 1,..., A p are linearly dependent so we can find y 1,..., y p, at least one of which is strictly positive, such that p 1 y ia i = 0. Let y = (y 1,..., y p, 0,..., 0). Then A( x ɛy) = b for any ɛ and picking ɛ = min { x i /y i where y i > 0} we see that x ɛy P and has at most p 1 positive components. We can repeat this process until we have a feasible point which is also basic. (ii) Assume x is actually an optimal point of P. The value of any point x ɛy is simply c T x ɛc T y and for small enough ɛ (positive or negative) x ɛy is feasible so we must have c T y = 0 to maintain optimality of x e.g. if c T y < 0 then choose ɛ < 0 to get a point more valuable than x! Hence the new point found in part (i) is also optimal.

Michælmas 2012 Operations Research III/IV 8 Game theory example Two people repeatedly play a game (something akin to paper/rock/scissors). Player R has a choice of 2 actions while C has 3. If R plays i and C plays j then R pays C the amount a ij as shown in the table: a ij 1 2 3 1 2 1 0 2 3 1 1 The players choose actions with probabilities u i and v j but R has no control over the v j. A common conservative strategy is called minimax find u i to minimise the maximum expected loss (the worst over all possible v j ). R wishes to minimise ) max i {f i (u)} = max ( 2u 1 + 3u 2, u 1 u 2, u 2 where the minimum is taken over u 0 such that u 1 + u 2 = 1. This objective function is not linear in the u i but there is a trick that enables us to find an equivalent LP problem. What we do is introduce a new variable r and note that in (u 1, u 2, r) space the LP problem, minimise r subject to u 1 + u 2 = 1, f i (u) r and u i 0 for each i provides the solution to R s minimax problem. At any ū the minimal r equals max i f i (ū) and the rest of the problem is to look for the best value of u. To numerically solve an example we must deal with the free variable r. We can do this by substituting r = x 1 x 2 where the x i 0 and then R s problem is to minimise x 1 x 2 subject to u 1 + u 2 = 1 x 1 + x 2 2u 1 + 3u 2 0 x 1 + x 2 + u 1 u 2 0 x 1 + x 2 u 2 0 with x i, u i 0. Applying the simplex algorithm we find the optimal basis is {x 1, u 1, u 2, s 3 } which gives a bfs (1/7, 4/7, 3/7, 4/7) and so R pays C no more than 1/7 per round on average when playing action 1 on 4/7 of the rounds and action 2 in the other rounds. The reduced costs for s 1, s 2 and s 2 are 2/7, 5/7 and 0 respectively. By similar reasoning C s maximin strategy solves the LP problem maximise s subject to v 1 + v 2 + v 3 = 1 s + 2v 1 v 2 0 s 3v 1 + v 2 + v 3 0 with u j 0 and s free. Confirm that the optimal solution is s = 1/7 when v 1 = 2/7, v 2 = 5/7 (and hence v 3 = 0) with reduced costs 4/7 for the first slack variable and 3/7 for the second. The fact that the best strategy for each player equals the other player s reduced costs at optimum is no coincidence. Hillier & Liebermann Chapter 4 is a long and careful description of how to run the simplex algorithm with all the important issues illustrated with examples. Chapter 5 uses matrix notation to explain why the algorithm works and how to implement it efficiently with a computer. The lectures so far have covered it all except sections 4.7 and 5.3 which we will treat next (along with Chap. 6) and sections 4.8 and 4.9 which we will not consider.