primal and dual relationship

Upload: madhu-sudan-ks-reddy

Post on 06-Apr-2018

247 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/3/2019 primal and dual relationship

    1/45

    7(1).1

    Chapter 7Chapter 7

    Duality TheoryDuality Theory

    Chapter 7Chapter 7

    Duality TheoryDuality TheoryThe theory of duality is a very elegant

    and important concept within thefield of operations research. Thistheory was first developed in relationto linear programming, but it hasmany applications, and perhaps even

    a more natural and intuitiveinterpretation, in several relatedareas such as nonlinearprogramming, networks and game

    theory.

  • 8/3/2019 primal and dual relationship

    2/45

    7(1).2

    The notion of duality within linearThe notion of duality within linear

    programming asserts that every linearprogramming asserts that every linearprogram has associated with it a relatedprogram has associated with it a related

    linear program called itslinear program called its dual. The original. The original

    problem in relation to its dual is termed theproblem in relation to its dual is termed theprimal..

    it is theit is the relationshipbetween the primalbetween the primal

    and its dual, both on a mathematical andand its dual, both on a mathematical and

    economic level, that is truly the essence ofeconomic level, that is truly the essence of

    duality theory.duality theory.

  • 8/3/2019 primal and dual relationship

    3/45

    7(1).3

    7.1 Examples7.1 Examples

    7.1 Examples7.1 Examples

    There is a small company in Melbourne which hasThere is a small company in Melbourne which has

    recently become engaged in the production of officerecently become engaged in the production of office

    furniture. The company manufactures tables, desksfurniture. The company manufactures tables, desks

    and chairs. The production of a table requires 8 kgsand chairs. The production of a table requires 8 kgsof wood and 5 kgs of metal and is sold for $80; a deskof wood and 5 kgs of metal and is sold for $80; a desk

    uses 6 kgs of wood and 4 kgs of metal and is sold foruses 6 kgs of wood and 4 kgs of metal and is sold for

    $60; and a chair requires 4 kgs of both metal and$60; and a chair requires 4 kgs of both metal and

    wood and is sold for $50. We would like to determinewood and is sold for $50. We would like to determinethe revenue maximizing strategy for this company,the revenue maximizing strategy for this company,

    given that their resources are limited to 100 kgs ofgiven that their resources are limited to 100 kgs of

    wood and 60 kgs of metalwood and 60 kgs of metal..

  • 8/3/2019 primal and dual relationship

    4/45

    7(1).4

    Problem P1Problem P1

    Problem P1Problem P1

    max

    x

    Z x x x! 80 60 501 2 3

    8 6 4 100

    5 4 4 60

    0

    1 2 3

    1 2 3

    1 2 3

    x x x

    x x x

    x x x

    e

    e

    u, ,

  • 8/3/2019 primal and dual relationship

    5/45

    7(1).5

    Now consider that there is a much biggerNow consider that there is a much bigger

    company in Melbourne which has been thecompany in Melbourne which has been thelone producer of this type of furniture forlone producer of this type of furniture for

    many years. They don't appreciate themany years. They don't appreciate the

    competition from this new company; socompetition from this new company; so

    they have decided to tender an offer to buythey have decided to tender an offer to buy

    all of their competitor's resources andall of their competitor's resources and

    therefore put them out of business.therefore put them out of business.

  • 8/3/2019 primal and dual relationship

    6/45

    7(1).6

    The challenge for this large company then isThe challenge for this large company then is

    to develop a linear program which willto develop a linear program which willdetermine the appropriate amount of moneydetermine the appropriate amount of money

    that should be offered for a unit of each typethat should be offered for a unit of each type

    of resource, such that the offer will beof resource, such that the offer will be

    acceptable to the smaller company whileacceptable to the smaller company while

    minimizing the expenditures of the largerminimizing the expenditures of the larger

    company.company.

  • 8/3/2019 primal and dual relationship

    7/45

    7(1).7

    Problem D1Problem D1Problem D1Problem D1

    8 5 80

    6 4 60

    4 4 50

    0

    1 2

    1 2

    1 2

    1 2

    y y

    y y

    y y

    y y

    u

    u

    u

    u,

    min

    y

    w y y! 100 601 2

  • 8/3/2019 primal and dual relationship

    8/45

    7(1).8

    A Diet ProblemA Diet ProblemA Diet ProblemA Diet Problem An individual has a choice of two types of food to eat,An individual has a choice of two types of food to eat,

    meat and potatoes, each offering varying degrees ofmeat and potatoes, each offering varying degrees of

    nutritional benefit. He has been warned by his doctornutritional benefit. He has been warned by his doctor

    that he must receive at least 400 units of protein, 200that he must receive at least 400 units of protein, 200

    units of carbohydrates and 100 units of fat from hisunits of carbohydrates and 100 units of fat from hisdaily diet. Given that a kg of steak costs $10 anddaily diet. Given that a kg of steak costs $10 and

    provides 80 units of protein, 20 units of carbohydratesprovides 80 units of protein, 20 units of carbohydrates

    and 30 units of fat, and that a kg of potatoes costs $2and 30 units of fat, and that a kg of potatoes costs $2

    and provides 40 units of protein, 50 units ofand provides 40 units of protein, 50 units ofcarbohydrates and 20 units of fat, he would like to findcarbohydrates and 20 units of fat, he would like to find

    the minimum cost diet which satisfies his nutritionalthe minimum cost diet which satisfies his nutritional

    requirementsrequirements

  • 8/3/2019 primal and dual relationship

    9/45

    7(1).9

    Problem P2Problem P2Problem P2Problem P2

    80 40 400

    20 50 200

    30 20 100

    0

    1 2

    1 2

    1 2

    1 2

    x x

    x x

    x x

    x x

    u

    u

    u

    u,

    minx

    Z x x! 10 21 2

  • 8/3/2019 primal and dual relationship

    10/45

    7(1).10

    Now consider a chemical company whichNow consider a chemical company which

    hopes to attract this individual away fromhopes to attract this individual away from

    his present diet by offering him synthetichis present diet by offering him synthetic

    nutrients in the form of pills. This companynutrients in the form of pills. This company

    would like determine prices per unit forwould like determine prices per unit for

    their synthetic nutrients which will bringtheir synthetic nutrients which will bringthem the highest possible revenue while stillthem the highest possible revenue while still

    providing an acceptable dietary alternativeproviding an acceptable dietary alternative

    to the individual.to the individual.

  • 8/3/2019 primal and dual relationship

    11/45

    7(1).11

    Problem D2Problem D2Problem D2Problem D2

    max

    y

    w y y y! 400 200 1001 2 3

    80 20 30 101 2 3 y y y e

    40 50 20 21 2 3 y y y e

    y y y1 2 3 0, , u

  • 8/3/2019 primal and dual relationship

    12/45

    7(1).12

    CommentsCommentsCommentsComments

    Each of the two examples describes someEach of the two examples describes some

    kind ofkind ofcompetitionbetween two decisionbetween two decision

    makers.makers.

    We shall investigate the notion ofWe shall investigate the notion of

    competition more formally in 618competition more formally in 618--261261

    under the heading under the heading Game Theory..

    We shall investigate the economicWe shall investigate the economic

    interpretation of the primal/dual relationshipinterpretation of the primal/dual relationship

    later in this chapter.later in this chapter.

  • 8/3/2019 primal and dual relationship

    13/45

    7(1).13

    7.2 FINDING THE DUAL7.2 FINDING THE DUAL

    OF A STANDARD LINEAROF A STANDARD LINEARPROGRAMPROGRAM

    7.2 FINDING THE DUAL7.2 FINDING THE DUAL

    OF A STANDARD LINEAROF A STANDARD LINEARPROGRAMPROGRAM

    In this section we formalise the intuitiveIn this section we formalise the intuitive

    feelings we have with regard to the thefeelings we have with regard to the therelationship between the primal and dualrelationship between the primal and dual

    versions of the two illustrative examples weversions of the two illustrative examples we

    examined in Section 7.1examined in Section 7.1

    The important thing to observe is that theThe important thing to observe is that the

    relationshiprelationship -- for the standard formfor the standard form -- isis

    given as agiven as a definition..

  • 8/3/2019 primal and dual relationship

    14/45

    7(1).14

    Standard form of the PrimalStandard form of the Primal

    ProblemProblem

    Standard form of the PrimalStandard form of the Primal

    ProblemProblem

    ax

    ax

    ax b

    a x a x a x b

    a x a x a x b

    x x x

    n n

    n n

    m m mn n m

    n

    11 1 12 2 1 1

    21 1 22 2 2 2

    1 1 2 2

    1 2 0

    e

    e

    e

    u

    . . .. ..

    . .. .. . . . . .. .

    . .. .. . . . . .. .. ..

    , , .. .,

    maxx

    j jj

    n Z c x!

    !1

  • 8/3/2019 primal and dual relationship

    15/45

    7(1).15

    Standard form of the DualStandard form of the Dual

    ProblemProblem

    Standard form of the DualStandard form of the Dual

    ProblemProblem

    a y a y a y c

    a y a y a y c

    a y a y a y c

    y y y

    m m

    m m

    n n mn m n

    m

    11 1 21 2 1 1

    12 1 22 2 2 2

    1 1 2 2

    1 2 0

    u

    u

    u

    u

    .. .

    . . .

    . .. .. . . . . .. .

    . .. .. . . . . .. .

    . ..

    , ,.. . ,

    miny

    ii

    m

    iw b y! !1

  • 8/3/2019 primal and dual relationship

    16/45

    7(1).16

    7.2.1 Definition7.2.1 Definition7.2.1 Definition7.2.1 Definition

    z Z cx

    s t

    Ax bx

    x*: max

    . .

    ! !

    eu 0

    w* :! minx w ! yb

    s.t.

    yA u c

    y u 0

    Primal Problem Dual Problem

    b is not assumed to be non-negative

  • 8/3/2019 primal and dual relationship

    17/45

    7(1).17

    7.2.2 Example7.2.2 Example7.2.2 Example7.2.2 Example

    3 8 9 15 20

    18 5 8 4 12 30

    0

    1 2 4 5

    1 2 3 4 5

    1 2 3 4 5

    x x x x

    x x x x x

    x x x x x

    e

    e

    u, , , ,

    maxx Z x x x x x! 5 3 8 0 121 2 3 4 5

    Primal

  • 8/3/2019 primal and dual relationship

    18/45

    7(1).18

    miny

    w y y! 20 301 2

    3 18 5

    8 5 3

    8 8

    9 4 0

    15 12 12

    0

    1 2

    1 2

    2

    1 2

    1 2

    1 2

    y y

    y y

    y

    y y

    y y

    y y

    u

    u

    u

    u

    u

    u,

    Dual

  • 8/3/2019 primal and dual relationship

    19/45

    7(1).19

    Table 7.1: PrimalTable 7.1: Primal--DualDual

    relationshiprelationship

    Table 7.1: PrimalTable 7.1: Primal--DualDual

    relationshiprelationship

    x1 0u x2 0u xn u 0 w=

    y1 0u a11 a12 a n1 e b1

    Dual y2 0u a21 a22 a n2 e b2(minw) ... ... ... ... ...

    ym u 0 am1 am2 amn e bnu u u

    Z= c1 c2 cn

  • 8/3/2019 primal and dual relationship

    20/45

    7(1).20

    7.2.3 Example7.2.3 Example7.2.3 Example7.2.3 Example

    5 18 5 158 12 8 8

    12 4 8 10

    2 5 5

    0

    1 2 3

    1 2 3

    1 2 3

    1 3

    1 2 3

    x x x

    x x x

    x x x

    x x

    x x x

    e

    e

    e

    e

    u, ,

    maxx

    Z x x x! 4 10 91 2 3

  • 8/3/2019 primal and dual relationship

    21/45

    7(1).21

    x1 0u x2 0u x3 0u w=

    y1 0u 5 - 18 5 e 15Dual y2 0u 8 12 0 e 8

    (min w) y3 0u12

    - 48

    e10

    y4 0u 2 0 - 5 e 5

    u u uZ= 4 10 - 9

  • 8/3/2019 primal and dual relationship

    22/45

    7(1).22

    DualDualDualDual

    5 8 12 2 4

    18 12 4 10

    5 8 5 90

    1 2 3 4

    1 2 3

    1 3 4

    1 2 3 4

    y y y y

    y y y

    y y yy y y y

    u

    u

    u

    u, , ,

    miny

    w y y y y! 15 8 10 51 2 3 4

  • 8/3/2019 primal and dual relationship

    23/45

    7(1).23

    7.3 FINDING THE DUAL7.3 FINDING THE DUAL

    OF NONSTANDARDOF NONSTANDARDLINEAR PROGRAMSLINEAR PROGRAMS

    7.3 FINDING THE DUAL7.3 FINDING THE DUAL

    OF NONSTANDARDOF NONSTANDARDLINEAR PROGRAMSLINEAR PROGRAMS

    The approach here is similar to the one weThe approach here is similar to the one we

    used in Section 5.6 when we dealt with nonused in Section 5.6 when we dealt with non--standard formulations in the context of thestandard formulations in the context of the

    simplex method.simplex method.

    There is one exception:There is one exception: we do not add

    artificial variables. We handle =We handle =

    constraints by writing them as

  • 8/3/2019 primal and dual relationship

    24/45

    7(1).24

    This is possible here because we doThis is possible here because we do notnot

    require here that the RHS isrequire here that the RHS is nonnon--negative.negative.

  • 8/3/2019 primal and dual relationship

    25/45

    7(1).25

    dx eii

    k

    i!!

    1

    d x e

    d x e

    ii

    k

    i

    ii

    k

    i

    !

    !

    e

    u

    1

    1

    d

    x e

    dx e

    ii

    k

    i

    ii

    k

    i

    !

    !

    e

    e

    1

    1

    Standard form!

  • 8/3/2019 primal and dual relationship

    26/45

    7(1).26

    7.3.1 Example7.3.1 Example7.3.1 Example7.3.1 Example

    2 4

    3 4 5

    2 3

    0

    2 3

    1 2 3

    1 2

    1 2 3

    x x

    x x x

    x x

    x x x

    u

    !

    e

    u, ; urs:= unrestricted sign

    maxx

    Z x x x! 1 2 3

  • 8/3/2019 primal and dual relationship

    27/45

    7(1).27

    ConversionConversionConversionConversion

    Multiply through the greaterMultiply through the greater--thanthan--oror--equalequal--

    to inequality constraint byto inequality constraint by --11 Use the approach described above toUse the approach described above to

    convert the equality constraint toconvert the equality constraint to a pair of

    inequality constraints.

    Replace the variable unrestricted in sign, ,Replace the variable unrestricted in sign, ,

    by theby the difference of two nonnegativeof two nonnegative

    variables.variables.

  • 8/3/2019 primal and dual relationship

    28/45

    7(1).28

    e

    e

    e

    e

    u

    2 4

    3 4 4 5

    3 4 4 5

    2 3

    0

    2 3 3

    1 2 3 3

    1 2 3 3

    1 2

    1 2 3 3

    x x x

    x x x x

    x x x x

    x x

    x x x x

    , ,,

    , ,,

    , ,,

    , ,,, , ,

    max , ,,

    x Z x x x x!

    1 2 3 3

  • 8/3/2019 primal and dual relationship

    29/45

    7(1).29

    DualDualDualDual

    y2

    y3 y4 u 12y13y2 3y3 2y4 u 1

    y1 4y2 4y3 u 1

    y1 4y2 4y3 u 1

    y1,y2,y3,y4 u 0

    miny

    w y y y y! 4 5 5 31 2 3 4

  • 8/3/2019 primal and dual relationship

    30/45

    7(1).30

    Streamlining the conversion ...Streamlining the conversion ...Streamlining the conversion ...Streamlining the conversion ...

    An equality constraint in the primalconstraint in the primal

    generates a dual variable that isgenerates a dual variable that is

    unrestricted in sign.

    An unrestricted in sign variable in thein sign variable in the

    primal generates anprimal generates an equality constraint inin

    the dual.the dual.

    Read the discussion in the lecture notesRead the discussion in the lecture notes

    Good material for a question in the final

    exam!

  • 8/3/2019 primal and dual relationship

    31/45

    7(1).31

    Example 7.3.1 (Continued)Example 7.3.1 (Continued)Example 7.3.1 (Continued)Example 7.3.1 (Continued)min

    yw y y y y! 4 5 5 31 2 3 4

    y2

    y3 y4 u 12y13y2 3y3 2y4 u 1

    y1 4y2 4y3 u 1

    y1 4y2 4y3 u 1

    y1,y2,y3,y4 u 0

  • 8/3/2019 primal and dual relationship

    32/45

    7(1).32

    y y

    y y y

    y y

    y y y

    2 3

    1 2 3

    1 2

    1 3 2

    1

    2 3 2 1

    4 1

    0

    , ,

    , , ,

    , ,

    , , ,, ;

    u

    u

    !

    u urs

    min,

    , , ,y

    w y y y!

    4 5 31 2 3

    ++

    +

    correction

  • 8/3/2019 primal and dual relationship

    33/45

    7(1).33

    Table 7.2: PrimalTable 7.2: Primal--DualDual

    relationshiprelationship

    Table 7.2: PrimalTable 7.2: Primal--DualDual

    relationshiprelationship

    Primal Problem

    opt=max

    Constraint i :

    = 0

    xj urs

    opt=min

    Dual Problem

    Variable i :

    yi >= 0

    yi urs

    Constraint j:

    >= form

    = form

  • 8/3/2019 primal and dual relationship

    34/45

    7(1).34

    7.3.3 Example7.3.3 Example7.3.3 Example7.3.3 Example

    3 8 66 5

    8 100

    1 2

    1 2

    1

    2 1

    x xx x

    xx x

    u

    !

    !u ; urs

    maxx

    Z x x! 5 41 2

  • 8/3/2019 primal and dual relationship

    35/45

    7(1).35

    equivalent nonequivalent non--standard formstandard formequivalent nonequivalent non--standard formstandard form

    e

    !

    !

    u

    3 8 6

    6 5

    8 10

    0

    1 2

    1 2

    1

    2 1

    x x

    x x

    x

    x x; urs

    maxx

    Z x x! 5 41 2

  • 8/3/2019 primal and dual relationship

    36/45

    7(1).36

    Dual from the recipeDual from the recipeDual from the recipeDual from the recipe

    !

    u

    u

    3 8 5

    8 6 4

    0

    1 2 3

    1 21 2 3

    y y y

    y y

    y y y; , urs

    miny

    w y y y! 6 5 101 2 3

  • 8/3/2019 primal and dual relationship

    37/45

    7(1).37

    What about opt=min ?What about opt=min ?What about opt=min ?What about opt=min ?

    Can use the usual trick of multiplying theCan use the usual trick of multiplying the

    objective function byobjective function by --1 (remembering to1 (remembering toundo this when the dual is constructed.)undo this when the dual is constructed.)

    It is instructive to use this method toIt is instructive to use this method to

    construct the dual of the dual of theconstruct the dual of the dual of the

    standard form.standard form.

    i.e, what is the dual of the dual of thei.e, what is the dual of the dual of the

    standard primal problem?standard primal problem?

  • 8/3/2019 primal and dual relationship

    38/45

    7(1).38

    What is the dual ofWhat is the dual ofWhat is the dual ofWhat is the dual of

    w* :!minxw ! yb

    s.t.

    yA u c

    y u 0

  • 8/3/2019 primal and dual relationship

    39/45

    7(1).39

    maxy

    w ! yb

    s.t.

    yA u c

    y u 0

    maxy

    w ! yb

    s.t.

    yA e c

    y u 0

  • 8/3/2019 primal and dual relationship

    40/45

    7(1).40

    min

    . .

    x Z cx

    s t Ax b

    x

    !

    u

    u 0

    max

    . .

    x Z cx

    s t Ax b

    x

    !

    e

    u 0

  • 8/3/2019 primal and dual relationship

    41/45

    7(1).41

    Important ObservationImportant ObservationImportant ObservationImportant Observation

    FOR ANY PRIMAL LINEARFOR ANY PRIMAL LINEAR

    PROGRAM, THE DUAL OF THEPROGRAM, THE DUAL OF THEDUAL IS THE PRIMALDUAL IS THE PRIMAL

  • 8/3/2019 primal and dual relationship

    42/45

    7(1).42

    Table 7.3: PrimalTable 7.3: Primal--DualDual

    RelationshipRelationship

    Table 7.3: PrimalTable 7.3: Primal--DualDual

    RelationshipRelationship

    Primal or Dual

    opt=max opt=min

    Dual orPrimal

    Variable i :

    yi >= 0

    yi urs

    Constraint j:

    >= form

    = form

    Constraint i :

    = 0

    xj urs

  • 8/3/2019 primal and dual relationship

    43/45

    7(1).43

    Example 7.3.4Example 7.3.4Example 7.3.4Example 7.3.4

    3 5 122 8

    5 100

    1 2

    1 2

    1 2

    1 1

    x xx x

    x xx x

    u

    !

    e

    u,

    minx

    Z x x! 6 41 2

  • 8/3/2019 primal and dual relationship

    44/45

    7(1).44

    equivalent formequivalent formequivalent formequivalent form

    minx

    Z x x! 6 41 2

    3 5 122 8

    5 100

    1 2

    1 2

    1 2

    1 2

    x xx x

    x xx x

    u

    !

    u

    u,

  • 8/3/2019 primal and dual relationship

    45/45

    7(1).45

    DualDualDualDual

    3 5 6

    5 2 4

    0

    1 2 3

    1 2 31 3 2

    y y y

    y y y

    y y y

    e

    e

    u, ; urs

    max

    y

    w y y y! 12 8 101 2 3