assign3sols

Upload: avik-mukherjee

Post on 25-Feb-2018

212 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/25/2019 assign3sols

    1/4

    Math 3300 Assignment #3 Solutions

    Problem 1(2 marks)Use the simplex algorithm to find the optimal solution to the following LP.

    min z= x1 x2s.t. x1 x2 1

    x1+x2 2

    x1, x2 0

    Solution

    First convert LP to standard form:

    min z = x1 x2

    s.t. x1 x2+s1= 1

    x1+x2+s2= 2

    x1, x2, s1, s2 0

    The initial tableau is the following:

    z x1 x2 s1 s2 rhs BV

    1 1 1 0 0 0 z= 00 1 1 1 0 1 s1= 1

    0 1 1 0 1 2 s2= 2

    The coefficients for x1 and x2 are equal, so we can pick either one to enter the basis. Choosing x1we get the following simplex tableaus:

    z x1 x2 s1 s2 rhs BV Ratio

    1 1 1 0 0 0 z= 0

    0

    1 1 1 0 1 s1= 1 1

    0 1 1 0 1 2 s2= 2 2

    z x1 x2 s1 s2 rhs BV Ratio1 0 2 1 0 1 z= 1

    0 1 1 1 0 1 x1= 1

    0 0

    2 1 1 1 s2= 1

    1

    2

    z x1 x2 s1 s2 rhs BV

    1 0 0 0 1 2 z= 2

    0 1 0 12

    1

    2

    3

    2 x1=

    3

    2

    0 0 1 12

    1

    2

    1

    2 x2=

    1

    2

    This tableau is optimal (there are no positive coefficients in row 0). Thus, the optimal solution isz = 2,x1=

    3

    2, x2=

    1

    2,s1= 0, and s2= 0.

    If we had initially chosen x2 to enter the basis at the first step, we would have gotten the followingsequence of tableaus:

    z x1 x2 s1 s2 rhs BV Ratio

    1 1 1 0 0 0 z= 0

    0 1 1 1 0 1 s1= 1

    0 1

    1 0 1 2 s2= 2 2

    1

  • 7/25/2019 assign3sols

    2/4

    Math 3300 Assignment #3 Solutions

    z x1 x2 s1 s2 rhs BV

    1 0 0 0 1 2 z= 2

    0 2 0 1 1 3 s1 = 3

    0 1 1 0 1 2 x2= 2

    This tableau is optimal (there are no positive coefficients in row 0). Thus, the optimal solution isz = 2,x1= 0, x2= 2, s1 = 3, and s2= 0.

    Hence, there are multiple optimal solutions to this problem. (Note that a nonbasic variable has a0 coefficient in row 0 of each optimal tableau.)

    Problem 2(5 marks)Use the simplex algorithm to find two optimal solutions to the following LP. Find a third optimalsolution withoutusing the simplex algorithm.

    max z= 5x1+ 3x2+x3

    s.t. x1+x2+ 3x3 6

    5x1+ 3x2+ 6x3 15

    x1, x2, x3 0

    Solution

    Applying the simplex algorithm we obtain the following sequence of tableaus:

    z x1 x2 x3 s1 s2 rhs BV Ratio

    1 5 3 1 0 0 0 z= 0

    0 1 1 3 1 0 6 s1= 6 6

    0

    5 3 6 0 1 15 s2= 15 3

    z x1 x2 x3 s1 s2 rhs BV

    1 0 0 5 0 1 15 z= 15

    0 0 25

    9

    5 1 1

    5 3 s1= 3

    0 1 35

    6

    5 0 1

    5 3 x1= 3

    This tableau is optimal; the solution is z = 15, x1 = 3, x2 = 0, and x3 = 0. (We also have s1 = 3and s2= 0.)

    To find a second optimal solution, note that in the optimal tableau above the nonbasic variable x2has a coefficient of 0 in row 0. So we pivot x2 into the basis.

    z x1 x2 x3 s1 s2 rhs BV Ratio

    1 0 0 5 0 1 15 z = 15

    0 0

    2

    5

    9

    5 1 1

    5 3 s1

    = 3 60 1

    3

    5

    6

    5 0 1

    5 3 x1 = 3 3

    z x1 x2 x3 s1 s2 rhs BV

    1 0 0 5 0 1 15 z= 15

    0 25

    0 1 1 13

    1 s1= 1

    0 53

    1 2 0 13

    5 x2= 5

    2

  • 7/25/2019 assign3sols

    3/4

    Math 3300 Assignment #3 Solutions

    All nonbasic variables have positive coefficients in row 0 of this tableau. Thus, the second optimalsolution is z= 15, x1 = 0,x2= 5, and x3 = 0. (Also, s1= 1 and s2= 0.)

    To find a third solution, let xand x represent the two solutions found above, where

    x=

    3

    0

    0

    , x=

    0

    5

    0

    .

    Then for any 0 1, x+ (1)x is also a solution. If we take = 0.5, then a third solutionis

    0.5

    3

    0

    0

    + 0.5

    0

    5

    0

    =

    3

    2

    5

    2

    0

    That is, a third solution is x1= 3

    2, x2 =

    5

    2, and x3= 0.

    Problem 3(8 marks)Suppose we have obtained the tableau in the table below for a maximization problem. State the

    conditions on a1,a2, a3,b, c1, and c2 that are required to make the following statements true:

    (a) The current solution is optimal, and there are alternative optimal solutions.(b) The current basic solution is not a basic feasible solution.(c) The current basic solution is feasible, but the LP is unbounded.(d) The current basic solution is feasible, but the objective function value can be improved by

    replacingx6 as a basic variable with x1.

    z x1 x2 x3 x4 x5 x6 rhs

    1 c1 c2 0 0 0 0 10

    0 4 a1 1 0 a2 0 b

    0 1 5 0 1 1 0 20 a3 3 0 0 4 1 3

    Solution

    (a) b 0 is necessary for the solution to be feasible. Ifc1 = 0 and c2 0, we can pivot in x1 toobtain an alternative optimum. Likewise, ifc2= 0,c1 0, anda1 > 0, we can pivot in x2to obtainan alternative optimum. And lastly, ifc1 0, c2 0, and a2 > 0, we can pivot in x5 to obtain analternative optimum.

    (b) The current basic solution is not feasible ifb

  • 7/25/2019 assign3sols

    4/4

    Math 3300 Assignment #3 Solutions

    Problem 4(10 marks)During each 6-hour period of the day, the Bloomington Police Department needs at least the numberof policemen shown in the table below. Policemen can be hired to work either 12 consecutive hoursor 18 consecutive hours. Policemen are paid $4 per hour for each of the first 12 hours a day theywork and are paid $6 per hour for each of the next 6 hours they work in a day. Formulate an LPthat can be used to minimize the cost of meeting Bloomingtons daily police requirements.

    Number of PolicemenTime Period Required

    12am 6am 12

    6am 12pm 8

    12pm 6pm 6

    6pm 12am 15

    Solution

    We denote the time period 12am 6am as shift 1, 6am 12pm as shift 2, 12pm 6pm as shift 3,and 6pm 12am as shift 4. Letxi = the number of policemen who work for 12 hours and beginduring shifti, yi = the number of policemen who work for 18 hours and begin during shifti.

    Bloomingtons objective is to minimize cost. The policemen who work for 12 hours get paid

    $4/hr12 hr = $48,

    while those who work for 18 hours get paid

    $48 + $6/hr6 hr = $84.

    The total number of policemen who work 12 hours during a day is x1 + x2 + x3 +x4, whiley1+y2+y3+y4 policemen work for 18 hours. Thus, the total cost involved is

    48(x1+x2+x3+x4) + 84(y1+y2+y3+y4)

    The policemen who work during shift 1 obviously includes those who start work during that shift(x1and y1), but it also includes those who start during shift 4 and work for 12 hours (x4), and thosewho start during shifts 3 and 4 and work for 18 hours (y3 andy4). Therefore, to meet requirement1 we must have

    x1+x4+y1+y3+y4 12.

    Applying similar reasoning to the other shifts gives the remaining constraints.

    Hence, the LP is:

    min z= 48(x1+x2+x3+x4) + 84(y1+y2+y3+y4)

    s.t. x1+x4+y1+y3+y4 12

    x1+x2+y1+y2+y4 8

    x2+x3+y1+y2+y3 6

    x3+x4+y2+y3+y4 15

    x1, x2, x3, x4, y1, y2, y3, y4 0

    4