340 likes | 347 Views
This example demonstrates how to solve the Traveling Salesman Problem (TSP) using a branch-and-bound algorithm with assignment relaxation. It shows how to find optimal assignments and minimum-cost 1-trees, which are relaxations of the TSP.
E N D
EMIS 8373: Integer Programming Branch-and-Bound: Combinatorial Relaxations Revised 11 April 2005
Assignment Problem 1 -1 1 1’ 3 3 2 1 2’ -1 5 7 5 6 1 -1 3 3’ 7 7 6 5 10 7 4 1 4’ -1
Mapping Tour 1234 to an Assignment assignment cost = 3 + 6 +7 + 5 = 21. cost of tour 1 2 3 4 1 = 21. 1 -1 1 1’ 3 2 1 2’ -1 6 1 -1 3 3’ 7 5 4 1 4’ -1
Optimal Assignment 1 -1 1 1’ 3 3 2 1 2’ -1 1 -1 3 3’ 7 7 4 1 4’ -1
Assignment Relaxation of TSP • Every TSP tour solution corresponds to a feasible assignment with the same objective function value: • Tour 1 2 3 4 1 x12 = x23 = x34 = x41 = 1 • Tour 1 3 2 4 1 x13 = x32 = x24 = x41 = 1 • Some assignments do not map back to tours • Assignment x12 = x21 = x34 = x41 = 1 gives sub-tours 1 2 1 and 3 4 3 • Since every TSP tour is a feasible assignment and the cost of the tour = cost of the assignment, the assignment problem is a relaxation of TSP.
ZU(S) = ZL(S) = 20 S12 S13 S14 Branch-and-Bound with Assignment Relaxation Solve assignment problems to get lower bound. S Visit city 2 first. Visit city 4 first. Visit city 3 first. Branch on the next city in the tour.
Assignment Problem for S12 1 -1 1 1’ 3 2 1 2’ -1 5 5 6 1 -1 3 3’ 7 7 6 5 10 7 4 1 4’ -1
Optimal Assignment for S12 1 -1 1 1’ 3 2 1 2’ -1 6 1 -1 3 3’ 7 5 10 4 1 4’ -1
ZU(S) = 21 ZU(S) = 21 ZL(S) = 20 ZL(S) = 21 S12 S13 S14 Branch-and-Bound with Assignment Relaxation Solve assignment problems to get lower bound. S
Assignment Problem for S13 1 -1 1 1’ 3 2 1 2’ -1 7 5 6 1 -1 3 3’ 7 7 6 5 7 4 1 4’ -1
Optimal assignment for S13 1 -1 1 1’ 3 2 1 2’ -1 7 1 -1 3 3’ 7 6 4 1 4’ -1
ZU(S) = 21 ZL(S) = 20 S12 S13 S14 Branch-and-Bound with Assignment Relaxation Solve assignment problems to get lower bound. S ZU(S12) = 21 ZU(S13) = 23 ZL(S13) = 23 ZL(S12) = 21 1234 1342
Assignment Problem for S14 1 -1 1 1’ 3 2 1 2’ -1 5 5 6 1 -1 3 3’ 7 7 6 10 7 4 1 4’ -1
Optimal assignment for S14 1 -1 1 1’ 3 2 1 2’ -1 5 1 -1 3 3’ 10 7 4 1 4’ -1
ZU(S) = 21 ZL(S) = 21 S12 S13 S14 Branch-and-Bound with Assignment Relaxation Solve assignment problems to get lower bound. S ZU(S12) = 21 ZU(S13) = 23 ZU(S13) = 25 ZL(S13) = 23 ZL(S12) = 21 ZL(S13) = 25 1234 1342 1432 1234 is an optimal tour.
Example 2: Symmetric TSP tij Table Graph Representation 9 3 2 10 5 2 6 1 4 1 3 6 5 4 2
The 1-Tree Relaxation • Given an graph G=(V, E) • Let E1 be the set of edges adjacent to node 1. • Let E2 = E \ E1 be the set of edges not adjacent 1. • Let H =(V\{1}, E2) be the subgraph induced by E2. • A 1-tree is subgraph T=(V,F) of G where F consists of a spanning tree of H and two edges from E1.
1-Trees 9 G • T1 is TSP tour of G • T2 is not a TSP tour of G • All tours of G are 1-trees • Not all 1-trees are tours • 1-tree is a relaxation of TSP 3 2 10 5 2 6 1 4 1 3 6 5 4 2 9 3 3 2 2 10 10 2 6 6 T1 T2 1 1 6 5 5 4 4 2 2
9 3 2 10 5 2 6 1 4 1 3 6 5 4 2 5 2 1 4 2 Finding a Minimum-Cost 1-Tree 1. Find MST in H=(V\{1}, E\E1) 2. Add shortest two edges in E1 3 2 Cost = 14 1 5 4
ZU(S) = ZL(S) = 0 S{{1,3}} S{{1,4}} S{{2,5}} S{{3,5}} S{{4,5}} Branch-and-Bound Tree S Branching rule: Let S{F} be the set of solutions that do not use edges in the set F.
2 1 1 4 2 2 1-Trees for S{{1,3}} and S{{1,4}} 3 2 3 2 5 5 1 1 6 6 5 4 5 4 Cost = 18 Cost = 16
5 2 4 3 2 Optimal 1-Tree for S{{2,5}} 1. Find MST in H=(V\{1}, E\E1) 9 3 2 10 2. Add shortest two edges in E1 5 2 6 4 1 3 6 5 4 2 3 2 Cost = 16 1 5 4
2 1 6 4 2 Optimal 1-Tree for S{{3,5}} 1. Find MST in H=(V\{1}, E\E1) 9 3 2 10 2. Add shortest two edges in E1 2 6 1 4 1 3 6 5 4 2 3 2 Cost = 15 1 5 4
5 2 1 4 3 Optimal 1-Tree for S{{4,5}} 1. Find MST in H=(V\{1}, E\E1) 9 3 2 10 2. Add shortest two edges in E1 5 2 6 1 4 1 3 6 5 4 3 2 Cost = 15 1 5 4
ZU(S) = ZL(S) = 0 S{{1,3}} S{{1,4}} S{{2,5}} S{{3,5}} S{{4,5}} Branch-and-Bound Tree 15 S 15 ZL(S{{1,3}}) = 18 ZL(S{{2,5}}) = 16 ZL(S{{4,5}}) = 15 ZU(S{{4,5}}) = 15 ZL(S{{1,4}}) = 16 ZL(S{{3,5}}) = 15 Optimal TSP tour found at node S{{4,5}}.
Example 3: Symmetric TSP tij Table Graph Representation 9 3 2 10 6 2 5 1 4 1 3 6 5 4 2
9 3 2 10 6 2 5 1 4 1 3 6 5 4 2 2 1 4 2 Finding a Minimum-Cost 1-Tree 1. Find MST in (V\{1}, E\E1) 2. Add shortest two edges in E1 3 2 5 Cost = 14 1 5 4
ZU(S) = ZL(S) = 14 S{{1,3}} S{{1,4}} S{{2,5}} S{{3,4}} S{{4,5}} Branch-and-Bound Tree S Branching rule: Let S{F} be the set of solutions that do not use edges in the set F.
2 1 1 4 2 2 1-Trees for S{{1,3}} and S{{1,4}} 3 2 3 2 1 5 5 1 6 6 5 4 5 4 Cost = 18 Cost = 16
2 4 2 1-Tree for S{{2,5}} • Let F = E \ (E1 {2,5}) • Find MST in (V\{1}, F) 9 3 2 10 6 2 3. Add shortest two edges in E1 5 4 1 3 6 5 4 2 3 2 Cost = 16 5 1 3 5 4
2 4 2 1-Tree for S{{3,4}} • Let F = E \ (E1 {3,5}) • Find MST in (V\{1}, F) 9 3 2 10 6 2 3. Add shortest two edges in E1 1 4 1 3 6 5 4 2 3 2 6 Cost = 15 1 1 5 4
2 4 1-Tree for S{{4,5}} • Let F = E \ (E1 {4,5}) • Find MST in (V\{1}, F) 9 3 2 10 6 2 3. Add shortest two edges in E1 5 1 4 1 3 6 5 4 3 2 5 Cost = 15 1 1 3 5 4
ZU(S) = ZL(S) = 14 S{{1,3}} S{{1,4}} S{{2,5}} S{{3,4}} S{{4,5}} Branch-and-Bound Tree S 15 ZL(S{{1,3}}) = 18 ZL(S{{2,5}}) = 16 ZL(S{{4,5}}) = 15 ZL(S{{1,4}}) = 16 ZL(S{{3,4}}) = 15 We must continue branching since we don’t have an upper (primal) bound. Try a depth-first strategy.