LP - I Lecture

download LP - I Lecture

of 48

Transcript of LP - I Lecture

  • 7/30/2019 LP - I Lecture

    1/48

    Linear Programming(An Optimization Technique)

    General Optimization Problem I nvolves :

    1. Decision Variables

    2. Objective Criterion (Max/Min)

    3. Constraints: (i) Equality (ii) Inequality

    L inear Programming(LP) : It is one of the important Optimization

    Techniques. Most Versatile, powerful & useful technique. Developed in 1947 by George B. Dantzig during

    World War II to solve military problems, whileworking with US AirForce.

  • 7/30/2019 LP - I Lecture

    2/48

    (1)xcMin.)Zor(Max.Optimizen

    1j

    jj

    The word Linear in LP indicates -relationship among variables both in objectivefunction and constraints.

    while Programming means - SystematicMathematical technique.

    General Linear Programming Problem (LPP)

    with n variables and m constraints can be statedas follows:

    )2(...2,1;),,(1

    mibxa i

    n

    j

    jij

    )3(...2,1;0 njxj

  • 7/30/2019 LP - I Lecture

    3/48

    Types of Variables Decision Variables : xj are decision variables

    Slack Variables

    mibwxa in

    j

    ijij ...2,1;1

    +

    bxan

    jijij

    1

    wi are slack variables.

  • 7/30/2019 LP - I Lecture

    4/48

    Artificial Variables :Required for solution methodology

    Surplus Variables

    bxa

    n

    jijij

    1

    mibsxa in

    jijij ...2,1;

    1

    -

    si are surplus variables

  • 7/30/2019 LP - I Lecture

    5/48

    Components of LPP :

    The three important components of LPP

    are as follows:

    (a) Decision Variables

    (b) Objective Function - Max. or Min.

    (c) Constraints-limitations.

  • 7/30/2019 LP - I Lecture

    6/48

    1. Certainty:cj, aij, bi are known & constants.

    2. Divisibility: Values of decision variable

    can be integer or fractional.

    3. Additivity: Total contribution = Sum of

    contribution of all variables4. Linearity:Relationship among variables both

    in objective function & constraints.

    Assumptions of LP

  • 7/30/2019 LP - I Lecture

    7/48

    Formulation of LPP :

    Steps to be followed.

    1.To decide (define) decision variables.

    2. To formulate objective function.

    3. To formulate constraints.

  • 7/30/2019 LP - I Lecture

    8/48

    CASE - 1 Data for LP Formulation.

    Factory: Two products P1 & P2

    Profit/piece of P1 = Rs.3/-

    Profit/piece of P2 = Rs.5/-

    Time Constraint:

    Time required/piece of P1 = 3 hrs.

    Time required/piece of P2 = 2 hrs.

    Max. time available = 18 hrs.

    Material Constraint:

    Max. Material available for P1 = 4 pieces.

    Max. Material available for P2 = 6 pieces.

  • 7/30/2019 LP - I Lecture

    9/48

    CASE - 1 Formulation of LPP :

    Let decision variable x1 = no of pieces of P1

    x2 = no of pieces of P2

    Max. Z = 3x1 + 5x2 Objective Equation

    ConstraintTimeIxx )(182213 -+

    ConstraintMaterialIIx )(41 -

    ConditionsnegativityNonxx - 02,1

    ConstraintMaterialIIIx )(62 -

  • 7/30/2019 LP - I Lecture

    10/48

    CASE - 2

    If Time Constraint is modified to:

    Time available is not less than 18 hours.

    Max. Z = 3x1 + 5x2 Objective Equation

    ConstraintTimeIxx )(182213 -+

    ConstraintMaterialIIx )(41 -

    ConditionsnegativityNonxx - 02,1

    ConstraintMaterialIIIx )(62 -

  • 7/30/2019 LP - I Lecture

    11/48

    CASE - 3

    If Time Constraint is modified to:

    Time available is exactly 18 hours.

    Max. Z = 3x1 + 5x2 Objective Equation

    ConstraintTimeIxx )(182213 -+

    ConstraintMaterialIIx )(41 -

    ConditionsnegativityNonxx - 02,1

    ConstraintMaterialIIIx )(62 -

  • 7/30/2019 LP - I Lecture

    12/48

    1. Feasible Solution: Solution with values of

    decision variables(xj) which satisfy allConstrints & Non-negativity condition.

    2. Basic Solution: For a set of m equations

    in n variables (n>m), basic solution is a

    solution obtained by setting (n-m)

    variables equal to zero and solving for

    remaining m equations in m variables.

    Types of Solution

    No. of possible Basic solutions = nCm

    = n!/(m!.(n-m)!)

  • 7/30/2019 LP - I Lecture

    13/48

    (i) Basic Variables : Having values > 0.

    (ii) Non-basic Variables :Having values = 0.

    3. Basic Feasible Solution : It is a BasicSolution which satisfies (3).

    4. Non-degenerate/degenerate B.F.S

    5. Optimal Basic Feasible Solution : It is a

    Basic Feasible Solution which optimizes

    objective function.

    6. Unbounded Solution :

    7. Infeasible Solution :

    8. Unique/Alternative Optimal Solutions :

  • 7/30/2019 LP - I Lecture

    14/48

    Methods to solve LPP :

    1.Graphical Method - for only two variables.2. Simplex Method - Universal method.

    3. Assignment Method - Special method.4. Transportation Method - Special method.

    Note :Methods (2),(3) and (4) are iterative

    methods.

  • 7/30/2019 LP - I Lecture

    15/48

    (1) Graphical Method

    ( for only two variables)

  • 7/30/2019 LP - I Lecture

    16/48

    3

    6

    9

    2 4 6 x1

    F.R.

    Opt. Pt. (2,6)

    Z=0.

    Z=15.

    Zopt = 36.

    III

    I

    II

    02,1

    )(62)(41

    )(182213/

    2513

    --

    -+

    +

    xx

    IIIxIIx

    Ixxts

    xxZMaxGraphical Method

    Case 1.

  • 7/30/2019 LP - I Lecture

    17/48

    3

    6

    9

    2 4 6 x1

    F.R.

    Opt. Pt.(4,6)

    Z=15.

    Zopt = 42

    III

    I

    II02,1

    )(62

    )(41

    )(182213/

    2513

    -

    -

    -+

    +

    xxIIIx

    IIx

    Ixxts

    xxZMaxGraphical Method

    Case 2.

  • 7/30/2019 LP - I Lecture

    18/48

    3

    6

    9

    2 4 6 x1

    F.L.

    Opt. Pt.(2,6)

    Z=15.

    Zopt = 36

    III

    I

    II

    02,1

    )(62)(41

    )(182213/

    2513

    -

    -

    -+

    +

    xx

    IIIxIIx

    Ixxts

    xxZMaxGraphical Method

    Case 3.

  • 7/30/2019 LP - I Lecture

    19/48

    3

    6

    9

    2 4 6 x1

    F.R.

    III

    I

    II

    Graphical Method

    Special Case.

    Alternative OptimalSolutions

  • 7/30/2019 LP - I Lecture

    20/48

    3

    6

    9

    2 4 6 x1

    F.R.(Unbounded)

    Opt. Pt.

    (Min.)

    III

    II

    I

    GraphicalMethod

    Special Case.

    Z line

    Opt. Sol. (Max)

    (Unbounded)

  • 7/30/2019 LP - I Lecture

    21/48

    3

    6

    9

    2 4 6 x1

    F.R.Not

    possible

    InfeasibleSolution

    GraphicalMethod

    Special Case.

  • 7/30/2019 LP - I Lecture

    22/48

    4

    5

    4 5 x1

    x2

    20-2-3

    2

    -1

    -1

    -2

    -3

    -4

    III

    III

    F.R.

    Z=6

    Opt. Pt. (0.5,

    4.5)

    Zopt = 12.5

    02,1

    )(521

    )(3213

    )(4212/

    2312

    -+

    -+-

    --

    +-

    xx

    IIIxx

    IIxx

    Ixxts

    xxZMax

    GraphicalMethod

    Special Case.

  • 7/30/2019 LP - I Lecture

    23/48

    Graphical Methodtodiscuss typical constraints

    to identify regions of

    constraints.

    Typical Case ?62213 +l ttH

  • 7/30/2019 LP - I Lecture

    24/48

    4 5 x1

    x2

    0-2-3 -1

    -1

    -3

    -2

    1

    2

    3

    21 3

    Typical Case ?62213 -+ xxplottoHow

    62213 -+ xx

    ),Point(xxWhen 022102 --

    )Point(xxWhen 3,03201 --

    Typical Case ?62213 l ttH

  • 7/30/2019 LP - I Lecture

    25/48

    2

    3

    4 5 x1

    x2

    10-2-3

    1

    -1

    -1

    -2

    -3

    2 3

    Typical Case ?62213 - xxplottoHow

    62213 - xx

    ),Point(xxWhen 022102

    )Point(xxWhen 3,03201 --

    Typical Case ?021 +l ttH

  • 7/30/2019 LP - I Lecture

    26/48

    4 5 x1

    x2

    0-2-3 -1

    -1

    -3

    -2

    1

    2

    3

    21 3

    Typical Case ?021 + xxplottoHow

    021 +xx

    21 xx - )Point(xxWhen 1,11211 --arrowFor

    0102 xx

  • 7/30/2019 LP - I Lecture

    27/48

    Recapitulate

    What is LPP ? Types of variables.

    Components of LPP.

    Assumptions of LP. Formulation of LPP.

    Types of solutions.

    Graphical Method.

    Unique & Alternative Optimal Solution,

    Unbounded FR, Infeasible solution.

  • 7/30/2019 LP - I Lecture

    28/48

    (2) Simplex Method

    (Universal method)

  • 7/30/2019 LP - I Lecture

    29/48

    Simplex Method to solve

    Max. Problem with All constraints.

  • 7/30/2019 LP - I Lecture

    30/48

    02,1

    )(62

    )(41

    )(182213/

    2513

    -

    -

    -+

    +

    xx

    IIIx

    IIx

    Ixxts

    xxZMax

    Standard Form:

    Max Z = 3x1+5x2+0w1+0w2+0w3

    3x1+2x2+w1+0w2+0w3 = 18

    x1+0x2+0w1+w2+0w3 = 4

    0x1+x2+0w1+0w2+w3 = 6

    Simplex Method

    Case 1.

    To

    prepare initial Tableau:

  • 7/30/2019 LP - I Lecture

    31/48

    ci xi bi x1 x2 w1 w2 w3

    Ij 3 5 0 0 0

    Ij = (cj -Ej) = Cj- (

    aij.ci)

    cJ 3 5 0 0 0

    Toprepare initial Tableau:

    Tableau - I

    0 w1 18 3 2 1 0 0

    0 w2 4 1 0 0 1 0

    0 w3 6 0 1 0 0 1

    Z = bi

    .ci

    = 0

    Ej 0 0 0 0 0

    Tableau I

  • 7/30/2019 LP - I Lecture

    32/48

    ci xi bi x1 x2 w1 w2 w3

    Ij Z = 0 3 5 0 0 0

    cj 3 5 0 0 0

    Tableau - I

    0 w1 18 3 2 1 0 0

    0 w2 4 1 0 0 1 0

    0 w3 6 0 1 0 0 1

    Ratio18/2 = 9

    4/0 =

    6/1 = 6

    Key Column Max +ve Ij Key Row Min positive ratio.

  • 7/30/2019 LP - I Lecture

    33/48

    How to get next tableau ?

    Leaving variable : w3

    Entering variable : x2

    If the key element is 1, then key row remain same inthe new simplex tableau

    If the key element is other than 1, then divide eachelement in the key row (including b value) by the keyelement to find new values of that row

    Make the other elements in the key column equal to0 by performning elementary row operations withnew key row obtained as above.

    T bl I

  • 7/30/2019 LP - I Lecture

    34/48

    ci xi bi x1 x2 w1 w2 w30 w1 18 3 2 1 0 0

    0 w2 4 1 0 0 1 0

    0 w3 6 0 1 0 0 1

    Ij Z = 0 -3 -5 0 0 0

    Ratio18/2 = 9

    4/0 =

    6/1 = 6

    cj 3 5 0 0 0Tableau - I

    18 18 - (6*2)/1 = 6

    R1 2R3 gives

    2 2-2(1) = 0 , 3 3- 2(0) = 3 and 1 12(0) = 1

    T bl I I

  • 7/30/2019 LP - I Lecture

    35/48

    0 w1 6 3 0 1 0 -2

    0 w2 4 1 0 0 1 0

    Ij Z = 30 3 0 0 0 -5

    Ratio6/3 = 2

    4/1 = 4

    6/0 =

    cj 3 5 0 0 0

    Key Column Max +ve Ij

    Key Row Min positive ratio.

    Tableau - I I

    5 x2 6 0 1 0 0 1

    ci xi bi x1 x2 w1 w2 w3

    Tableau I I I

  • 7/30/2019 LP - I Lecture

    36/48

    3 x1 2 1 0 1/3 0 -2/3

    Ij Z = 36 0 0 - 1 0 - 3

    cj 3 5 0 0 0Tableau - I I I

    5 x2 6 0 1 0 0 1

    This is the final Tableau.

    The Optimal Solution is x1 = 2, x2 = 6

    giving Z = 36

    ci xi bi x1 x2 w1 w2 w3

    0 w2 2 0 0 -1/3 1 2/3

  • 7/30/2019 LP - I Lecture

    37/48

    Interpretation of

    Simplex Method through

    Graphical method.

    I nterpretation of Simplex Method

  • 7/30/2019 LP - I Lecture

    38/48

    3

    6

    9

    2 4 6 x1

    F.R.

    Opt. Pt. (2,6)

    Z=15.

    Zopt = 36.

    III

    I

    II

    02,1

    )(62

    )(41

    )(182213/

    2513

    -

    -

    -+

    +

    xx

    IIIx

    IIx

    Ixxts

    xxZMax

    I nterpretation of Simplex Method

    Through Graphical Method

    T1

    T3

    T2

    GATE 2002

  • 7/30/2019 LP - I Lecture

    39/48

    GATE - 2002(1) A furniture manufacture produces Chairs & Tables.

    The wood working department is capable of producing

    200 chairs or 100 tables or any proportionatecombinations of these per week. The weekly demand

    for chairs and tables is limited to 150 and 80 units

    respectively.The profit from a chair is Rs. 100 and that

    from a table is Rs. 300.

    Set up the problem as a Linear Program.

    Determine optimal product mix and optimal valueof objective function.

    If a profit of each table drops to Rs. 200 per unit,

    what is the product mix and profit ?

    (a)

    (b)

    (c)

    GATE 2002

  • 7/30/2019 LP - I Lecture

    40/48

    GATE - 2002

    MaxZ = 100x1+ 300x2

    S/t1

    100

    2

    200

    1+

    xx

    x1 150

    x2 80

    x1,x2 0

    Formulation(a)

    (b) Optimal Solution

  • 7/30/2019 LP - I Lecture

    41/48

    (40, 80) Z = 28000

    Z = 15000

    100

    200

    150

    50

    80

    x2

    x1

    (b) Optimal Solution

    (c) Multiple Optimal Solutions

  • 7/30/2019 LP - I Lecture

    42/48

    (40, 80) Z = 20000

    Z = 15000

    100

    200

    150

    50

    80

    x2

    x1

    75 Opt. Line

    (c) Multiple Optimal Solutions

    GATE 2003

  • 7/30/2019 LP - I Lecture

    43/48

    GATE - 2003(1) A manufacture produces two types of products, 1 and

    2, at production levels of x1 and x2 respectively. The

    profit is given 2x1 + 5x2. The production constraints

    are :

    The maximum profit which can meet the constraint is

    (A) (D)(C)(B)29 38 44 75

    x1 + 3x2 40

    3x1 + x2 24

    x1 + x2 10

    x1 0, x2 0

  • 7/30/2019 LP - I Lecture

    44/48

    40

    x2

    x1

    10

    10

    20

    Z = 50

    Opt. Pt. (0,10) Z = 50

    Ans. = (C) 44

    25

    GATE 2000

  • 7/30/2019 LP - I Lecture

    45/48

    GATE - 2000

    Max Z = 4x1+ 6x2 + x3

    S/t

    x1, x2, x3 0

    2x1+ x2 + 3x3 5

    Solve :

    If x2 2 is added then what will be the

    solution ?

    GATE 2000

  • 7/30/2019 LP - I Lecture

    46/48

    GATE - 2000

    Solution :

    x1 = 0, x2 = 5, x3 = 0 giving z = 30

    Through Simplex Method, in

    two iterations the solution ofbasic problem is :

    If x2 2 is added then the solution through

    Simplex Method, in three iterations will be :

    x1

    = 3/2, x2

    = 2, x3

    = 0 giving z = 18

    GATE - 2008

  • 7/30/2019 LP - I Lecture

    47/48

    GATE 2008Max Z = 4x1

    + 6x2

    x1, x2 0

    3x1+ 2x2 6

    2x1+ 3x2 6

    Q.1 After introducing slack variables w1 and w2, the initial

    feasible solution is represented by the tableau below.

    ci xi bi x1 x2 w1 w2

    Ij 0 -4 -6 0 0

    cj 4 6 0 0

    0 w1 6 3 2 1 0

    0 w2 6 2 3 0 1

    GATE - 2008

  • 7/30/2019 LP - I Lecture

    48/48

    GATE 2008

    After some Simplex interactions, the following tableau is obtained.

    ci xi bi x1 x2 w1 w2

    Ij 12 0 0 0 2

    cj 4 6 0 0

    0 w1

    2 5/3 0 1 -1/3

    6 x2 2 2/3 1 0 1/3