hw 7 dmor

Upload: ashish-vishnoi

Post on 23-Feb-2018

214 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/24/2019 HW 7 DMOR

    1/6

    ESI 6314: Deterministic Methods in Operations Research

    Solutions to Homework 7

    December 11, 2015

    Chapter 8: Section 2

    Problem 5. There will be 7 nodes, Node 1 represents the beginning of year 1, and Node 7 is theend of year 6 (or beginning of year 7). Then, arc (i, j) (fori < j), corresponds to purchasing a newcar at the beginning of year i and keeping it until the beginning of year j. The costs of each arc

    could be calculated as:cij = maintenance cost incurred during years i, i+ 1,...,j 1 + cost of purchasing car at thebeginning of year i trade-in value received at the beginning of year j .

    c12= 300 + 10,000 - 7,000 = 3,300c13= (300 + 500) + 10,000 - 6,000=4,800c14= (300 + 500 + 800) + 10,000 - 4,000 = 7,600c15= (300 + 500 + 800 + 1200) + 10,000 - 3,000 = 9,800c16= (300 + 500 + 800 + 1200 + 1600) + 10,000 - 2,000 = 12,400Similarly,c17= 15,600c23= 3,300, c24= 4,800, c25= 7,600, c26= 9,800, c27= 12,400c34= 3,300, c35= 4,800, c36= 7,600, c37= 9,800c45= 3,300, c46= 4,800, c47= 7,600c56= 3,300, c57= 4,800c67= 3,300

    We begin by giving Node 1 a permanent label:

    [ ]0 3300 4800 7600 9800 12400 15600

    Next, we give Node 2 a permanent label:[ ]0 3300 4800 7600 9800 12400 15600

    1

  • 7/24/2019 HW 7 DMOR

    2/6

    Node Temporary label ( denotes next assigned permanent label)3 min {4800, 3300 + 3300} = 4800

    4 min {7600, 4800 + 3300} = 76005 min {9800, 7600 + 3300} = 98006 min {12400, 9800 + 3300} = 124007 min {15600, 12400 + 3300} = 15600

    We now make node 3s label permanent and obtain:[ ]0 3300 4800 7600 9800 12400 15600

    Node Temporary label ( denotes next assigned permanent label)4 min {7600, 4800 + 3300} = 7600

    5 min {9800, 4800 + 4800} = 96006 min {12400, 4800 + 7600} = 124007 min {15600, 4800 + 9800} = 14600

    We now make node 4s label permanent and obtain:[ ]0 3300 4800 7600 9600 12400 14600

    Node Temporary label ( denotes next assigned permanent label)5 min {9600, 7600 + 3300} = 9600

    6 min {12400, 7600 + 4800} = 124007 min {14600, 7600 + 7600} = 14600

    We next give node 5 a permanent label and obtain:[ ]0 3300 4800 7600 9600 12400 14600

    Node Temporary label (denotes next assigned permanent label)6 min {12400, 9600 + 3300} = 12400

    7 min {14600, 9600 + 4800} = 14400

    We next give node 6 a permanent label and obtain:[ ]0 3300 4800 7600 9600 12400 14400

    Node Temporary label ( denotes next assigned permanent label)7 min {14400, 12400 + 3300} = 14400

    We now make node 7s label permanent obtaining:[ ]0 3300 4800 7600 9600 12400 14400

    Since 14400 9600 = c57, 9600 4800 = c35 and 4800 0 = c13, we find the shortest path fromnode 1 to node 7 to be 1 3 5 7. Thus car should be kept for a two year period and then sold.

    Chapter 8: Review Problems

    Problem 2.

    a. Assume, City 1 =N.Y.,..., City 6 =L.A.:

    2

  • 7/24/2019 HW 7 DMOR

    3/6

    Then,

    max z x0

    s.t. x12+x13= x0 (Node 1)

    x12= x24+x25 (Node 2)x13= x34+x35 (Node 3)

    x24+x34= x46 (Node 4)

    x25+x35= x56 (Node 5)

    x46+x56= x0 (Node 6)

    x12 500, x13 400

    x24 300, x25 250

    x34 200, x35 150

    x46 400, x56 350

    All variables 0

    b. Begin by labeling sink via chain (1, 2) (2, 4) (4, 6) and add a flow of 300 to each of thesearcs. Then label sink by path (1, 3)(3, 5)(5, 6) and add a flow of 150 to each of these arcs. Thenlabel sink by chain (1, 2) (2, 5) (5, 6) and add a flow of 200 to each arc on this path. Finallylabel the sink by (1, 3) (3, 4) (4, 6) adding a flow of 100 to each arc on this path. This yieldsthe following (maximum) flow:

    Arc FlowNYChicago 500NYMemphis 250

    ChicagoDenver 300ChicagoDallas 200MemphisDenver 100MemphisDallas 150DenverLA 400DallasLA 350Into Sink 750

    3

  • 7/24/2019 HW 7 DMOR

    4/6

    Chapter 8: Section 7

    Find a minimum cost flow for the network shown in Figure 62.

    Initial bfs:

    In this bfs, x12 = 25 and x56 = 25 are non-basic variables at their upper bound, and x23 =x24= x34= 0 are non-basic variables at their lower bound. In order to check the optimality of thisbfs, we have:

    y1 = 0y1 y3= c13= 12 y3= 12y3 y5= c35= 3 y5= 15y2 y5= c25= 8 y2= 7y5 y4= c54= 5 y4= 20y4 y6= c46= 7 y6= 27

    Now, for the non-basic variables we calculate:

    c12= y1 y2 c12= 0 (7) 10 = 3< 0c56= y5 y6 c56= 15 (27) 6 = 6c23= y2 y3 c23= 7 (12) 7 = 2c24= y2 y4 c24= 7 (20) 11 = 2 > 0c34= y3 y4 c34= 12 (20) 5 = 3> 0

    4

  • 7/24/2019 HW 7 DMOR

    5/6

    x12, x24 and x34 violate the optimality conditions. We choose x12 to enter the basis:

    Since 15 + 25, we choose = 10. Then, the new bfs will be:

    In this bfs, x13 = 25 and x56 = 25 are non-basic variables at their upper bound, and x23 =x24= x34= 0 are non-basic variables at their lower bound. In order to check the optimality of this

    bfs, we have:

    y1 = 0y1 y2= c12= 10 y2= 10y2 y5= c25= 8 y5= 18y3 y5= c35= 3 y3= 15y5 y4= c54= 5 y4= 23y4 y6= c46= 7 y6= 30

    Now, for the non-basic variables we calculate:

    c13= y1 y3 c13= 0 (15) 12 = 3c56= y5 y6 c56= 18 (30) 6 = 6c23= y2 y3 c23= 10 (15) 7 = 2c24= y2 y4 c24= 10 (23) 11 = 2 > 0c34= y3 y4 c34= 15 (23) 5 = 3> 0

    We choose x34 to enter the basis:

    5

  • 7/24/2019 HW 7 DMOR

    6/6

    Since 15 0, we choose = 15. Then, the new bfs will be:

    In order to check the optimality of this bfs, we have:

    y1= 0y1 y2= c12= 10 y2= 10y2 y5= c25= 8 y5= 18y3 y5= c35= 3 y3= 15y3 y4= c34= 5 y4= 20y4 y6= c46= 7 y6= 27

    Now, for the non-basic variables we calculate:

    c13= y1 y3 c13= 0 (15) 12 = 3c56= y5 y6 c56= 18 (27) 6 = 3c23= y2 y3 c23= 10 (15) 7 = 2c24= y2 y4 c24= 10 (20) 11 = 1c54= y5 y4 c54= 18 (20) 5 = 3

    Since for all the non-basic variables at their lower bound we have cij 0 and for all the non-basic variables at their upper bound we have cij 0, this solution is an optimal solution with costequal to:z= 15 10 + 25 12 + 15 8 + 15 5 + 10 3 + 15 7 + 25 6 = 930.

    6