Download presentation
1
NP-困難な組合せ最適化問題に対する近似解法 -巡回セールスマン問題を例として-
Traveling Salesman Problem Approximate Algorithm Implementation Experimental Analysis Metaheuristics for Combinatorial Optimization Problems
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
Icosian Game (Origin of Hamiltonian Circuit) Invented by W. R. Hamilton
5
Icosian Game (1) 1 2 4 3 20
6
Icosian Game (2) 1 2 7 6 5 4 3 20
7
Icosian Game (3) 1 2 7 6 5 4 3 9 8 20
8
Icosian Game (4) 1 2 7 6 5 4 3 9 8 14 13 12 11 10 20
9
Icosian Game (5) 1 2 7 6 5 4 3 19 9 8 18 17 16 15 14 13 12 11 10 20
10
Knight Tour
11
Knight Tour (by Leonhard Euler)
12
Applications of TSP 基盤配線 配送計画 タンパク質構造解析
13
10 P Applications clustering a data array circuit board assembly
2 circuit board assembly computer wiring 3 circuit board drilling vehicle routing 4 protein conformations x-ray crystallography 5 VLSI Scan Chain Optimization 6 VLSI fabrication 7
14
World Record of Exact Algorithm for Euclidean Benchmarks (TSPLIB95)
Dantzig, Fulkerson & Johnson cities (1954) Held & Karp cities (1971) Crowder & Padberg cities (1980) Padberg & Rinaldi cities (1987) Grotschel & Holland cities (1991) Padberg & Rinaldi cities (1991) Applegate, Bixby, Chvatal, & Cook cities (1996)
15
Theoretical Results A(I)/OPT(I) ≦ 2 p(n) Symmetric TSP △TSP
Assuming P ≠NP no polynomial-time algorithm can guarantee A(I)/OPT(I) ≦ 2 p(n) for any fixed polynomial p Symmetric TSP △TSP A(I)/OPT(I) ≦ 1+ε for an ε>0 A(I)/OPT(I) ≦1.5 (Christofides’ O(n3) algorithm) d-dimensional Euclidean TSP A(I)/OPT(I) ≦ 1+ε for an ε>0 if d is Θ(n) for any ε>0 if d is O(1) (Arora’s O(n log n/ε) algorithm)
16
Approximate Algorithms
Construction Algorithms Nearest Neighbor Greedy Christiofides’ Insertion Karp’s Bucket Improvement Algorithm 2,3,..k-opt Lin-Kernighan opt
17
適当な点から出発し、まだ訪問していない最も近い点へ移動する
Nearest Neighbor 全ての点を訪問したら出発点へもどる 適当な点から出発し、まだ訪問していない最も近い点へ移動する
18
Nearest Neighbor (Worst Case Results)
Running Time : NN(I) OPT(I) ∀I NN(I) OPT(I) ∃I
19
Greedy (Multiple Fragment)
閉路ができたり、次数が2を超えないように、枝を短い順に加えていく
20
Greedy (Worst Case Results)
Running Time : Greedy(I) OPT(I) ∀I ∃I Greedy(I) OPT(I)
21
奇数次数を持つ頂点に対して最小マッチングを求める
Christofides’ (1) 奇数次数を持つ頂点を赤く塗りつぶす 奇数次数を持つ頂点に対して最小マッチングを求める 最小木を作る
22
Christofides’ (2) 一度通過した点をスキップすることにより、順回路をえる
まだ通過していない枝をグラフ非連結にならないようにたどる
23
Christofides’ (Worst Case Results)
Running Time : Christofides(I) OPT(I) ∀I ∃I Christofides(I) OPT(I)
24
Convex Hull +Insertion
Running Time : 凸包で点を囲むように巡回路をつくる 巡回路に入っていない,最も遠い点へ移動する
25
Karp’s Partitioning Method (1)
各小領域に対する最適巡回路を求める 長方形で、p個の点が入るように分割する
26
Karp’s Partitioning Method (2)
長方体と交わる点の枝を非連結にならないようにたどる
27
Karp’s Partitioning Method Probabilisitcs Analysis
BHH Theorem (Beardwood, Halton and Hammersley, 1959) 面積Aの正方領域にランダムにばらまかれた n個の点に対する lim OPT(I) = (β≒0.7124) β= BHH (1959) too optimistic! β= Stein (1977)
28
Bucket Running Time : 決められた順序(小領域内では任意)で点を訪問する
全ての点を含む単位正方形で小領域に分割し、適当な順序をつける
29
組合せ最適化問題(概念図) 大域的最適解 目的関数 f(x) 実行可能解の集合 F
30
山頂を目指す闇夜の登山者 x 近傍 N(x)
31
2-opt,3-opt neighborhood
32
Local Search
33
闇夜の登山者(ここが山頂?) 局所最適解
34
2-opt,3-opt,k-opt (Worst Case Results)
Running Time : ∃I PLS-complete ∃I A k-opt(I) OPT(I) A 2-opt(I) A 3-opt(I) A 2,3,k-opt(I) OPT(I) ∀I
35
Implementation for solving 108 TSP within 1% of optimum
Geometric data structure Bucket Delaunay Triangulation K-d tree Tour data structure Array Two-level Tree Segment Tree Splay Tree for solving 108 TSP within 1% of optimum
36
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
37
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
38
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
39
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
40
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
41
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
42
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
43
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).
44
Nearest Neighbor Method nntour for TSP using K-d tree
Void nntour(point_set *N, int start_point, Int *tour) { tree = new kdtree(N); // O(n log n) tour[0] = start_point; tree -> Delete( tour[0] ); for ( i=1; i < n; i++){ tour[i] =tree->nn(tour[i-1]); // O(1) (average) tree-> Delete(tour[i]); // O(1) (amortized) } Average runing time: O(n log n)
45
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
46
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
47
|ab|+|cd| > |ac| + |bd|
2-opt (1) frnn(a,|ab|) b=next(a) a c d=next(c) |ab|+|cd| > |ac| + |bd|
48
2-opt (2) b=next(a) a c flip(a,b,c,d) d=next(c)
49
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)
50
Ball Search ballsearch(E, f) Each point has an associated radius
Ball Search ballsearch(E, f) Each point has an associated radius. Query asks which balls contain a given point. cutdim=X cutval= X(N) K A G J F H D E I cutdim=Y cutval=Y(B) cutdim=Y cutval=Y(F) B M C L P O N A B D E C P O N F G J K H I M L Balls that intersect the bucket A,B,D,E,F,P
51
Insertion Method using K-d tree(1)
ballsearch(a) a b=nn(a)
52
Insertion Method using K-d tree(2)
a Average running time: O(n log n)
53
Tabu Search 1 に戻らないように 一番高い地点へ移動しよう!
54
Tabu Search 2 |TL|=2
55
Tabu Search 3 |TL|=2 FIFO
56
Tabu Search 4
57
Tabu Search 5
58
Tabu Search 6
59
Tabu Search 7
60
Tabu Search 8
61
Tabu Search 9
62
Tabu Search 10
63
Lin-Kernighan opt (=3-opt + Depth-first Tabu Search using 2-opt neighborhood)
64
LK Search (Depth-first Tabu Search using 2-opt neighborhood)
65
LK Search (Depth-first Tabu Search using 2-opt neighborhood)
66
Experimental Analysis
Using random Euclidean instances with n=100 to cities. Using TSPLIB (real) instances n=48 to cities. Using random distance instances.
67
Quality for tour generation heuristics
Percent Excess over the Held-Karp Lower Bound P (# of Cities =10 ) P
68
Running times for tour generation heuristics
CPU Time in Seconds on 150Mhz SGI Challenge P (# of Cities =10 ) P
69
Quality for improvement heuristics
Percent Excess over the Held-Karp Lower Bound P (# of Cities =10 ) P
70
Running times for improvement heuristics
CPU Time in Seconds on 150Mhz SGI Challenge P (# of Cities =10 ) P
71
Undominated Algorithms
Percent Excess over OPT(I) Christofides’ Karp’s SA Insertion 30% Bucket 25% Nearest Neighbor 15% Greedy 2-opt 5% 3% 3-opt 2% Lin-Kernighan Iterated-LK 1% 0% n nlogn Running Time
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.