The.Algorithm.Design.Manual.Springer-Verlag.1998

The.Algorithm.Design.Manual.Springer-Verlag.1998 The.Algorithm.Design.Manual.Springer-Verlag.1998

18.04.2013 Views

Simulated Annealing We provide several examples below to demonstrate how these components can lead to elegant simulated annealing algorithms for real combinatorial search problems. ● Traveling Salesman Problem ● Maximum Cut ● Independent Set ● Circuit Board Placement Next: Traveling Salesman Problem Up: Heuristic Methods Previous: Heuristic Methods Algorithms Mon Jun 2 23:33:50 EDT 1997 file:///E|/BOOK/BOOK2/NODE92.HTM (3 of 3) [19/1/2003 1:29:34]

Traveling Salesman Problem Next: Maximum Cut Up: Simulated Annealing Previous: Simulated Annealing Traveling Salesman Problem The solution space for traveling salesman consists of the set of all (n-1)! possible circular permutations of the vertices. A candidate solution can thus be represented using an array S of n-1 vertices, where defines the (i+1)st vertex on the tour starting from . The cost function evaluating a candidate solution is equally straightforward, for we can sum up the costs of the edges defined by S. Figure: Improving a TSP tour by swapping a pair of edges The most obvious transition mechanism would be to swap the current tour positions of a random pair of vertices and . This changes up to eight edges on the tour, deleting the edges currently adjacent to both and , and adding their replacements. Better would be to swap two edges on the tour with two others that replace it, as shown in Figure . Since only four edges change in the tour, the transitions can be performed and evaluated faster. Faster transitions mean that we can evaluate more positions in the given amount of time. In practice, problem-specific heuristics for TSP outperform simulated annealing, but the simulated annealing solution works admirably, considering it uses very little knowledge about the problem. Algorithms Mon Jun 2 23:33:50 EDT 1997 file:///E|/BOOK/BOOK3/NODE93.HTM [19/1/2003 1:29:34]

Traveling Salesman Problem<br />

Next: Maximum Cut Up: Simulated Annealing Previous: Simulated Annealing<br />

Traveling Salesman Problem<br />

<strong>The</strong> solution space for traveling salesman consists of the set of all (n-1)! possible circular permutations of<br />

the vertices. A candidate solution can thus be represented using an array S of n-1 vertices, where<br />

defines the (i+1)st vertex on the tour starting from . <strong>The</strong> cost function evaluating a candidate solution<br />

is equally straightforward, for we can sum up the costs of the edges defined by S.<br />

Figure: Improving a TSP tour by swapping a pair of edges<br />

<strong>The</strong> most obvious transition mechanism would be to swap the current tour positions of a random pair of<br />

vertices and . This changes up to eight edges on the tour, deleting the edges currently adjacent to<br />

both and , and adding their replacements. Better would be to swap two edges on the tour with two<br />

others that replace it, as shown in Figure . Since only four edges change in the tour, the transitions can<br />

be performed and evaluated faster. Faster transitions mean that we can evaluate more positions in the<br />

given amount of time.<br />

In practice, problem-specific heuristics for TSP outperform simulated annealing, but the simulated<br />

annealing solution works admirably, considering it uses very little knowledge about the problem.<br />

<strong>Algorithm</strong>s<br />

Mon Jun 2 23:33:50 EDT 1997<br />

file:///E|/BOOK/BOOK3/NODE93.HTM [19/1/2003 1:29:34]

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

Saved successfully!

Ooh no, something went wrong!