10.07.2015 Views

Discrete (and Continuous) Optimization Solutions of Exercises 7 WI4 ...

Discrete (and Continuous) Optimization Solutions of Exercises 7 WI4 ...

Discrete (and Continuous) Optimization Solutions of Exercises 7 WI4 ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Discrete</strong> (<strong>and</strong> <strong>Continuous</strong>) <strong>Optimization</strong><strong>Solutions</strong> <strong>of</strong> <strong>Exercises</strong> 7<strong>WI4</strong> 131Kees RoosTechnische Universiteit DelftFaculteit Electrotechniek, Wiskunde en InformaticaAfdeling Informatie, Systemen en Algoritmieke-mail: C.Roos@ewi.tudelft.nlURL: http://www.isa.ewi.tudelft.nl/˜roosNovember – December, A.D. 2003


Course Schedule1. Formulations (18 pages)2. Optimality, Relaxation, <strong>and</strong> Bounds (10 pages)3. Well-solved Problems (13 pages)4. Matching <strong>and</strong> Assigments (10 pages)5. Dynamic Programming (11 pages)6. Complexity <strong>and</strong> Problem Reduction (8 pages)7. Branch <strong>and</strong> Bound (17 pages)8. Cutting Plane Algorithms (21 pages)9. Strong Valid Inequalities (22 pages)10. Lagrangian Duality (14 pages)11. Column Generation Algorithms (16 pages)12. Heuristic Algorithms (15 pages)13. From Theory to <strong>Solutions</strong> (20 pages)<strong>Optimization</strong> Group 1


Exercise 7.8.1Consider the enumeration tree for a minimization problem, as shown left below.1. Give tightest possible lower <strong>and</strong> upper bounds on the optimal value z.2. Which nodes can be pruned <strong>and</strong> which must be explored further?Solution: Starting at the lower nodes we tighten the bounds as indicated: in each node thenew bound is the minimum <strong>of</strong> the corresponding bound for its immediate successors. Theresult is as indicated in the tree at the right below. The nodes that can be pruned are 8 (byinfeasibility), 7 (by optimality), 4 (by optimality), 6 (by bound). Nodes 3 <strong>and</strong> 5 need furtherinvestigation.∞31328127317314300258infeasible52732226635∞3283112831731314310278infeasible<strong>Optimization</strong> Group 2∞52732227635


Exercise 7.8.3 (part (ii))(ii). Solve the instancez = max17x 1 + 10x 2 + 25x 3 + 17x 45x 1 + 3x 2 + 8x 3 + 7x 4 ≤ 12x ∈ {0,1} 4 .The variables are already ordered so that c ja jis nonincreasing. Hence, by part (i), the solution <strong>of</strong> the linearrelaxation is x = (1,1, 1 2 ,0) with objective value 391 2 . We branch on the variable x 3. The correspondingsubsets are:S 0 = { x ∈ {0,1} 4 : 5x 1 + 3x 2 + 7x 4 ≤ 12, x 3 = 0 }S 1 = { x ∈ {0,1} 4 : 5x 1 + 3x 2 + 7x 4 ≤ 4, x 3 = 1 } .We first explore S 1 . It is clear that the only feasible solution is x = (0,1,1,0) with objective value 35.Thus we have already the incumbent x = (0,1,1,0), <strong>and</strong> the lower bound z = 35. Node S 1 is pruned byoptimality.The solution <strong>of</strong> the linear relaxation for node S 0 is x = (1,1,0, 4 7 ) with objective value 365 . Branching on7x 4 we get the subsetsS 10 = { x ∈ {0,1} 4 : 5x 1 + 3x 2 ≤ 12, x 3 = 0, x 4 = 0 }S 11 = { x ∈ {0,1} 4 : 5x 1 + 3x 2 ≤ −3, x 3 = 0, x 4 = 1 } .Node S 11 is pruned by infeasibility. The optimal solution for the (integer) subproblem for node S 10 is x =(1,1,0,0) with objective value 27. This node can be pruned by bound, since 27 < z = 35.Since no active nodes are left, the current incumbent x = (0,1,1,0), with objective value z = 35, is theoptimal solution.<strong>Optimization</strong> Group 4


Solve the 5-city STSP instance with distance matrix⎛(c ij ) =Exercise 7.8.5 ((i))⎜⎝- 10 2 4 610 - 9 3 12 9 - 5 64 3 5 - 26 1 6 2 -To obtain a lower bound for z we first find a minimal weight 1-tree. It has weight z = 12, which is a lowerbound for z.110 24 692 31 53 64 521-tree for S16⎞⎟⎠ .S¬ {2,5}12{2,5}S 0 S 1We can also easily obtain an upper bound: it happens that the 1-tree contains a Hamilton path from node 3 tonode 2; adding edge {2,3} we get a tour <strong>of</strong> length 18; it also contains a Hamilton path from node 3 to node5; adding edge {3,5} we get a tour <strong>of</strong> length 16. So we put ¯z = 16.We choose to branch on the cheapest edge in the minimal weight 1-tree, namely edge {2,5}. Then the set S<strong>of</strong> all tours T is decomposed intoS 0 = {T ∈ S : {2,5} /∈ T } , S 1 = {T ∈ S : {2,5} ∈ T } .<strong>Optimization</strong> Group 5


Exercise 7.8.5 ((i)) (cont.)We proceed with exploring node S 0 . One may easily verify that a 1-tree <strong>of</strong> minimal weightnot containing arc {2,5} has weight z 0 = 16. Hence this node is pruned by bound.110 24 692 353 64 5216S¬ {2,5}12{2,5}S 0S 10 S 11S 016S 1¬ {4,5} {4,5}12Thus we proceed with node S 1 . We already found that a minimal weight 1-tree containingarc {2,5} has weight z = 12. At this stage we decide to branch on edge {4,5}:S 10 = {T ∈ S 0 : {4,5} /∈ T } , S 11 = {T ∈ S 0 : {4,5} ∈ T } .<strong>Optimization</strong> Group 6


Exercise 7.8.5 ((i)) (cont.)We proceed with exploring node S 10 . Now a minimal weight 1-tree has weight 15.110 24 692 31 53 64 516S¬ {2,5}12{2,5}S 10¬ {1,3} {1,3}15S 10 S100 S 101S 016S 1¬ {4,5} {4,5}12S 11At this stage we branch on edge {1,3}:S 100 = {T ∈ S 10 : {1,3} /∈ T } , S 101 = {T ∈ S 10 : {1,3} ∈ T } .<strong>Optimization</strong> Group 7


Exercise 7.8.5 ((i)) (cont.)We proceed with exploring node S 100 . Now a minimal weight 1-tree has weight 19. Sonode S 100 is pruned by bound.1104 692 31 53 64 5S 01616S¬ {2,5}12{2,5}S 10S 1¬ {4,5} {4,5}12¬ {1,3} {1,3}15S 11S 100S10019S 101<strong>Optimization</strong> Group 8


Exercise 7.8.5 ((i)) (cont.)We proceed with exploring node S 101 . Now a minimal weight 1-tree has weight 15.110 24 692 31 53 64 5S 016S 101S 1001916S¬ {2,5}12{2,5}S 10S 1¬ {4,5} {4,5}12¬ {1,3} {1,3}15S 101S 11¬ {2,4} {2,4}15S 1010 S 1011At this stage we branch on edge {2,4}:S 1010 = {T ∈ S 10 : {2,4} /∈ T } , S 1011 = {T ∈ S 10 : {2,4} ∈ T } .<strong>Optimization</strong> Group 9


Exercise 7.8.5 ((i)) (cont.)We proceed with exploring node S 1010 . Now a minimal weight 1-tree has weight 18. Thisnode is pruned by bound.110 24 692 314 556S 016S 1010S 1001916S¬ {2,5}12{2,5}S 10S 1¬ {4,5} {4,5}12¬ {1,3} {1,3}15S 101S 11¬ {2,4} {2,4}15S 1010 S 1011<strong>Optimization</strong> Group 10


Exercise 7.8.5 ((i)) (cont.)We proceed with exploring node S 1011 . The minimal weight 1-tree has weight 15.110 24 692 31 53 6S 016S 1004 519S 101116S¬ {2,5}12{2,5}S 10S 1¬ {4,5} {4,5}12¬ {1,3} {1,3}15S 101S 11¬ {2,4} {2,4}15S 1010 S 1011¬ {1,4}15{1,4}S 10110 S 10111We branch on edge {1,4}:S 10110 = {T ∈ S 1011 : {1,4} /∈ T } , S 10111 = {T ∈ S 1011 : {1,4} ∈ T } .<strong>Optimization</strong> Group 11


Exercise 7.8.5 ((i)) (cont.)We proceed with exploring node S 10110 . The minimal weight 1-tree is a tour <strong>of</strong> length 17.The node is pruned by bound.110 2692 31 53 6S 1004 519S 1011016S¬ {2,5}12{2,5}S 016S 10S 1¬ {4,5} {4,5}12¬ {1,3} {1,3}15S 101S 11¬ {2,4} {2,4}15S 1010 S 1011¬ {1,4} {1,4}15S 1011017S 10111<strong>Optimization</strong> Group 12


Exercise 7.8.5 ((i)) (cont.)We proceed with exploring node S 10111 . The minimal weight 1-tree is a tour <strong>of</strong> length 15.16¬ {2,5}S12{2,5}1¬ {4,5} {4,5}10 216 124 6S910 S2 3¬ {1,3} 11{1,3}161 5S3 6100 S¬ {2,4} 101{2,4}19 164 5S 1010 S¬ {1,4} 1011{1,4}S1610111S 0S 1S 10110 S 1011117 16The prescribed edges form a path 3 → 1 → 4 → 2 → 5 <strong>of</strong> length 10. There is only oneway to complete this path to a tour, namely by adding edge {3,5}. The tour has length 16.Thus for the current node 16 is lower bound. Hence this node can be pruned by bound.<strong>Optimization</strong> Group 13


Exercise 7.8.5 ((i)) (cont.)Node that node S 10 is now also pruned by bound. We proceed with exploring node S 11 , theonly remaining active node. The minimal weight 1-tree is a tour <strong>of</strong> length 12.110 24 692 31 53 64 52We branch on edge {1,3}:S¬ {2,5}12{2,5}S 016S 10S 11 S110 S 1111616S 1¬ {4,5} {4,5}12S 11¬ {1,3} {1,3}12S 110 = {T ∈ S 11 : {1,3} /∈ T } , S 111 = {T ∈ S 11 : {1,3} ∈ T } .<strong>Optimization</strong> Group 14


Exercise 7.8.5 ((i)) (cont.)We explore node S 110 . The minimal weight 1-tree is a tour <strong>of</strong> length 15.1104 692 31 53 64 52S 01616S¬ {2,5}12{2,5}S 1016S 110S 1010S 1¬ {4,5} {4,5}12S 110S 11¬ {1,3} {1,3}12¬ {1,4} {1,4}15S 11117S 1011infeasibleWe branch on edge {1,4}:S 1100 = {T ∈ S 110 : {1,4} /∈ T } , S 1101 = {T ∈ S 110 : {1,4} ∈ T } .One easily sees that a minimal weight 1-tree in node S 1100 has weight 17, so this node ispruned by bound.In node S 1101 the edges {2,5}, {4,5} {1,4} are prescribed. These edges form the path1 → 4 → 5 → 2. To complete a tour one has to add the edges {1,3} <strong>and</strong> {3,5}, butedge {1,3} is note present in this node. So this node is pruned by infeasibility.<strong>Optimization</strong> Group 15


Exercise 7.8.5 ((i)) (cont.)We explore node S 111 . The minimal weight 1-tree is a tour <strong>of</strong> length 12.S 11116S1¬ {2,5}12{2,5}10 24 6S 0 S 19¬ {4,5} {4,5}2 316 121 5S3 610 S 11¬ {1,3} {1,3}16 124 52S 110 S 11117¬ {1,4}12{1,4}S 1110 S 1111We branch on edge {1,4}:S 1110 = {T ∈ S 111 : {1,4} /∈ T } , S 1111 = {T ∈ S 111 : {1,4} ∈ T } .In node S 1111 the edges {2,5}, {4,5} {1,3} <strong>and</strong> {1,4} are prescribed. These edgesform the path 3 → 1 → 4 → 5 → 2. To complete a tour one has to add edge {2,3},which gives a tour <strong>of</strong> length 18. So this node can be pruned by bound.18<strong>Optimization</strong> Group 16


Solve the 4-city STSP instance with distance matrix⎛Exercise 7.8.5 ((ii))(c ij ) =⎝- 7 6 33 - 6 92 3 - 17 9 4 2ny B&B using an assignment relaxation to obtain bounds. To obtain a lower bound for z we first find a minimalweight matching in the corresponding bipartite graph. This matching is depicted below. The pro<strong>of</strong> <strong>of</strong> itsoptimality is provided by the indicated values for the dual variables u <strong>and</strong> v. It has weight z = 13, which is alower bound for z.⎞⎠211’ 210232’ 33’ 413S13044’ 1Minimal weight matching for SWe find that z = 13 is lower bound for the length <strong>of</strong> an optimal tour. It happens, however, that the assignmentis a tour: 1 → 4 → 3 → 2 → 1. This yields the upper bound ¯z = 13 for the length <strong>of</strong> an optimal tour.Since z = ¯z, the tour is optimal, <strong>and</strong> the search tree contains only one node!<strong>Optimization</strong> Group 18


Exercise 7.8.5 (extra)After the success in part (ii) we might try to solve the 5-city TSP instance with distance matrix⎛⎞- 10 2 4 610 - 9 3 1(c ij ) = ⎜⎝2 9 - 5 6 ⎟4 3 5 - 2⎠ .6 1 6 2 -also by using assignment relaxations to obtain bounds in the B&B method.The minimal weight matching in the corresponding bipartite graph is depicted below. The pro<strong>of</strong> <strong>of</strong> its optimalityis provided by the indicated values for the dual variables u <strong>and</strong> v. It has weight z = 10, which is a lower boundfor z.011’ 2122’ 1033’ 2S¬(1,3)10(1,3)244’ 2S 0 S 10 5 5’ 0Minimal weight matching for SWe branch on arc (1,3).<strong>Optimization</strong> Group 19


Exercise 7.8.5 (extra)We proceed with exploring node S 0 . A minimal weight matching not containing arc (1,3)has weight z 0 = 13.21121’ 22’ 1S¬(1,3)10(1,3)0 3 3’ 32 4 4’ 20 5 5’ 0S 2 S 3¬(4,3) (4,3)Minimal weight matching for S 0S 4 S 5S 0¬(2,5)13(2,5)S 1We branch in node S 0 on arc (2,5), <strong>and</strong> in node S 3 on arc (4,3).<strong>Optimization</strong> Group 20


Exercise 7.8.5 (extra)We proceed with exploring node S 4 . A minimal weight matching not containing arcs (1,3)<strong>and</strong> (4,3), but containing arc (2,5) has weight z 4 = 16.2101231’ 22’ 13’ 6S¬(1,3)10(1,3)S 0¬(2,5)13(2,5)S 1S 2 S 32 4 4’ 2¬(4,3) (4,3)160 55’ 0S 416Minimal weight matching for S 4S 5¬(5,4) (5,4)S 6 S 7The minimal weight matching in node S 4 is a tour: 3 → 1 → 4 → 2 → 5 → 3 <strong>of</strong> length16. Hence, z 4 = ¯z 4 = 16.We proceed by branching in node S 5 on arc (5,4).<strong>Optimization</strong> Group 21


Exercise 7.8.5 (extra)We proceed with exploring node S 6 . A minimal weight matching not containing arcs (1,3)<strong>and</strong> (5,4), but containing arcs (2,5) <strong>and</strong> (4,3) has weight z 6 =?.2101231’ 22’ 13’ 6S¬(1,3)10(1,3)S 0¬(2,5)13(2,5)S 120454’ 25’ 0S 416Minimal weight matching for S 4S 2 S 3¬(4,3) (4,3)16S 5¬(5,4) (5,4)S 6 S 7And so on! It looks like if the search tree becomes rather large again! I give up. If somebodycan show me a solution with a relatively small search tree I will be glad!<strong>Optimization</strong> Group 22

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!