Lecture on 3-19 to 3-26 1 SA305 Spring 2014 Canonical Form To construct the simplex method we need to put our linear programs all in a similar form so that the algorithm is standardized and can use the mechanics of the extreme points. Definition 1.1. A linear program with n variables is in canonical form if it is of the following form max ~c>~x A~x = ~b ~x ≥ 0 where A = (aij ) is a m × n matrix, m ≤ n, and the rows of A are linearly independent. Can every linear program be put in canonical form? First let’s look at an example. Example 1.2. Let x + 2y ≤ 1 2x + y ≥ 1 x, y ≥ 0 be the constraints of a LP. For each constraint where there might be slack or surplus you add or subtract a slack or surplus variable to amke the constraint equality and then append the LP with the nonnegativity of these new variables. So our new constraints look like x + 2y + s1 2x + y x, y, s1 , s2 ≥ 0. −s2 Now let’s put this in matrix form. Let x y ~x = s1 s2 A= 1 2 1 0 2 1 0 −1 and 1 =1 =1 ~b = 1 1 . Then we can view the constraints as A~x = ~b ~x ≥ 0. This might seem ridiculous but actually this setting makes it much easier to deal with basic feasible solutions. 2 Basic Variables How do we find basic feasible solutions? This is one of the main questions in designing our algorithm because the fundamental theorem says that we should only focus on these extreme points. With our linear program in canonical form it makes the job a lot easier. Let’s first look at this example. Example 2.1. Have constraints A~x = ~b ~x ≥ 0 where x y ~x = s1 s2 1 2 1 0 A= 2 1 0 −1 and ~b = 1 1 . Since the number of variables n = 4 and the number of rows of A is m = 2 this means that for a solution ~x0 to be a basic feasible solution it must have n − m = 4 − 2 of the non-negativity constraints be active. For example we can choose x = 0 and y = 0. Then solve for s1 and s2 and we get that s1 = 1 and s2 = −1. So a basic feasible solution is ~x0 = [0, 0, 1, −1]. Then we can list all the other basic feasible solutions in this way: 2 basic solution not active non-neg. constraint active non-negativity constraint [0, 0, 1, −1]NOT feasible s1 , s2 x, y y, s2 x, s1 [0, 1/2, 0, −3/2]NOT feasible [0, 1, −1, 0]NOT feasible s1 , y x, s2 x, s2 y, s1 [1, 0, 0, 1] [1/2, 0, 1/2, 0] s1 , x y, s2 [1/3, 1/3, 0, 0] x, y s1 , s2 Now we note that this happens in general. Theorem 2.2. Suppose that ~x = [x1 , . . . , xn ] is a basic feasible solution to an LP in canonical form. Then there exists m indices i1 , . . . im (or variables xi1 , . . . , xim ) such that (1) The columns i1 , . . . , im of A are linearly independent. (2) The other variables are zero xj = 0 for j 6= i1 , . . . , im . Because of the conclusion (1) and (2) in the Theorem since there are m non-zero variables that must satisfy m linearly independent conditions we can find a unique solution that satisfies these conditions. Because of this decomposition we create explicit notation for these indices. Definition 2.3. Let ~x be a basic feasible solution to an LP in canonical form. • A variable xk is basic for ~x if k is one of the indices in the above theorem (equivalently that coordinatein ~x is not zero). • A variable xk is nonbasic for ~x if it is not basic (equivalently that coordinate in vecx is zero). • The set of basic variables for ~x is called the basis for ~x. Using this notation we can rename our previous table in the exmaple. Example 2.4. basic variables nonbasic variables basic solution [0, 0, 1, −1]NOT feasible s1 , s2 x, y [0, 1/2, 0, −3/2]NOT feasible y, s2 x, s1 [0, 1, −1, 0]NOT feasible s1 , y x, s2 x, s2 y, s1 [1, 0, 0, 1] [1/2, 0, 1/2, 0] s1 , x y, s2 [1/3, 1/3, 0, 0] x, y s1 , s2 3