Download presentation
Presentation is loading. Please wait.
Published byΚητώ Παπαντωνίου Modified over 6 years ago
1
Traveling Salesman Problem Basic Data Structure
巡回セールスマン問題に対する Lin-Kernighan 近傍を用いた Guided Local Search -大規模問題に対する実装法を中心として - Traveling Salesman Problem Basic Data Structure Lin-Kernighan Neighborhood Guided Local Search Implementation Experimental Analysis
2
Traveling Salesman Problem (TSP)
3
Definition Given n points (cities) and a distance function
between two points, find a minimum length Hamiltonian circuit |ab|=|ba| Symmetric TSP a b |ab|=|ba| otherwise Asymmetric TSP ΔTSP a b c |ac|≦|ab|+|bc| points are in d-dim. Euclidean space Euclidean TSP
4
10 P Applications clustering a data array circuit board assembly
2 clustering a data array p= 3 circuit board assembly computer wiring 4 vehicle routing circuit board drilling protein conformations 5 6 x-ray crystallography VLSI Scan Chain Optimization 7 VLSI fabrication
5
Implementation for solving 108 TSP within 1% of optimum
Geometric data structure Bucket Candidate Graph K-d tree Tour data structure Array Two-level Tree Segment Tree Splay Tree for solving 108 TSP within 1% of optimum
6
Semidynamic K-d tree kdtree Build K-d tree (1)
A B C D E P O N F G H I J K M L cutdim=X cutval=x(N) K A G J F H D E I B M C L P O N
7
Build K-d tree (2) K A J G F H D E I B M C L P O N cutdim=X
cutval= X(N) K A G J F H D E A B D E C P O N cutdim=Y cutval=Y(B) I B M C L P O N F G H I J K M L
8
Build K-d tree (2) K A J G F H D E I B M C L P O N cutdim=X
cutval= X(N) K A G J F H D E A B D E C P O N cutdim=Y cutval=Y(B) I B M C L P O N F G H I J K M L
9
Build K-d tree (3) : O(Kn + n log n) time
cutdim=X cutval= X(N) K A G J F H D E cutdim=Y cutval=Y(F) F G J K H I M L I cutdim=Y cutval=Y(B) B M C L P O N A B D E C P O N
10
Delete point Delete(D) (1)
φ=0 cutdim=X cutval= X(N) K A G J F D H E φ=0 φ=0 I cutdim=Y cutval=Y(B) cutdim=Y cutval=Y(F) B M C L P φ=0 O N A B D E C P O N F G J K H I M L φ=0 φ=0 φ=0 LOPT HIPT
11
Delete point Delete(D) (2)
φ=0 cutdim=X cutval= X(N) K A G J F H E φ=0 φ=0 I cutdim=Y cutval=Y(B) cutdim=Y cutval=Y(F) B M C L P φ=0 O N A B E D C P O N F G J K H I M L φ=0 φ=0 φ=0 LOPT HIPT
12
Delete (Undelete) point: O(1) amortized time
φ=0 cutdim=X cutval= X(N) φ=1 φ=0 cutdim=Y cutval=Y(B) cutdim=Y cutval=Y(F) φ=1 φ=1 A B D E C P O N F G J K H I M L φ=0 φ=0 HIPT< LOPT
13
Nearest Neighbor Search Find the nearest point of point nn(E) (1)
cutdim=X cutval= X(N) A D E cutdim=Y cutval=Y(B) B Find the nearest point in the same bucket! A B D E
14
Nearest Neighbor Search Find the nearest point of point nn(E) (2)
cutdim=X cutval= X(N) A D E cutdim=Y cutval=Y(B) B Check the points in the bucket, too! C P O N A B D E C P O N Conjecture (via experimental analysis) The expected running time is O(1).
15
Fixed-Radius Near Neighbor frnn (E, r, f) Find the point(s) f within radius r of point E (1)
cutdim=X cutval= X(N) A D E r cutdim=Y cutval=Y(B) B Check the point in the same bucket! A B D E
16
Fixed-Radius Near Neighbor frnn (E, r, f) Find the point(s) f within radius r of point E (2)
cutdim=X cutval= X(N) A D E cutdim=Y cutval=Y(B) B Check the points in the bucket, too! C P O N A B D E C P O N
17
|ab|+|cd| > |ac| + |bd|
2-opt (1) frnn(a,|ab|) b=next(a) a c d=next(c) |ab|+|cd| > |ac| + |bd|
18
2-opt (2) b=next(a) a c flip(a,b,c,d) d=next(c)
19
2-opt procedure two_opt for TSP using K-d tree
void two_opt (point_set *N, int *tour) { restart: for all a ∈unserched_list) { b = next(a); for all c ∈ frnn(a,|ab|){ d =next (c); if (|ab|+|cd|>|ac|+bd|){ flip(a,b,c,d); add b,c,d to unserched_list; goto restart; } } remove point a from unserched_list; } } Tour Database Type Array Splay Tree (amortized) O(1) O(log n) O(n) O(log n) Average runing time: O(n log n)
20
Lin-Kernighan opt (=3-opt + Depth-first Tabu Search using 2-opt neighborhood)
21
LK Search (Depth-first Tabu Search using 2-opt neighborhood)
22
LK Search (Depth-first Tabu Search using 2-opt neighborhood)
23
Combinatorial Optimization
Ground Set U c: U→Z (⊆2 U ) f(x)=Σu∈x c(u) ∀ x ∈2 U Set of Feasible Solutions F Objective Function f : F→ Z Min. f(x) sub. to x ∈ F Traveling Salesman Problem (TSP) (Find a minimum length tour of a salesman who wants to visit n customers.) U = set of edges, F = set of Hamilton circuits (HCs), c = length of edge, f= total length of edges in HC.
24
Neighborhood Search (NS)
F Neighborhood N: F →2 Move(x)= an appropriate element in N(x) NS (x) 1 while STOP ≠ TRUE do 2 x := Move(x) Local Search, (Reactive) Tabu Search (TS), Tabu Threshold, Simulated Annealing (SA), Threshold Accepting, Guided Local Search Great Deluge (Drought), Record-to-Record Travel , Neural Net, etc.
25
Local Search (LS) LS (x,f)
any x’ ∈N(x) with f(x’)<f(x) if such an x’ exists “no” otherwise Improve(x)={ LS (x,f) 1 while Improve(x) ≠ “no” do 2 x := improve (x) 3 return x
26
Snapshot of Guided Local Search (1)
27
Snapshot of Guided Local Search (2)
28
Snapshot of Guided Local Search (3)
29
Guided Local Search (GLS)
Penalty (≒long term memory) p: U → R Modified Cost Function g(x)=Σu∈x c(u) + λΣu∈x p(u) GLS (x) 1 p(u) := 0 (∀ u ∈U) 2 while STOP ≠ TRUE do x := LS (x, g) u* := arg max u∈x c(u)/(p(u)+1) p(u*) :=p(u*)+1
30
How to memorize “p” (1) Candidate Graph (Digraph)
b c d a c b d c(a,c) c(a,b) c(a,d) p(a,c) p(a,b) p(a,d) (a,b) := arg max c(i,j)/(1+p(i,j)) p(a,b) :=p(a,b)+1 Memorize p(g,c) within the candidate graph data structure (used when edge (a,b) will be added).
31
How to memorize “p” (1) Candidate Graph (Digraph)
b d c(a,c) c(a,b) c(a,d) p(a,c) p(a,b) p(a,d) a b c d a c d b c(a,c) c(a,d) c(a,b) p(a,c) p(a,d) p(a,b) Sort edges adjacent to vertex “a” so that c(a,c)+λp(a,c)≦ c(a,d)+λp(a,d) ≦ c(a,b)+λp(a,b)
32
How to memorize “p” (2) Tour Data Structure
b e f g c d c b (g,c) := arg max c(i,j)/(1+p(i,j)) p(g,c) :=p(g,c)+1 d Memorize p(g,c) within the tour data structure (used when edge (g,c) will be deleted). f g e
33
Tour Data Structure: Array
b c d 1 2 a d c b 1 2 tour p p(a,b) p(b,1) p(1,2) p(2,c) p(c,d) Flip(a,b,c,d) a c a c b d 2 1 tour 2 1 p p(2,c) p(1,2) p(b,1) d b
34
Experimental Analysis
Using random Euclidean instances with n=100 to cities. Using TSPLIB (real) instances n=48 to cities. Using random distance instances.
35
Quality for improvement heuristics
Percent Excess over the Held-Karp Lower Bound P (# of Cities =10 ) P
36
Running times for improvement heuristics
CPU Time in Seconds on 150Mhz SGI Challenge P (# of Cities =10 ) P
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.