?????????????? Lin-Kernighan ???

Document Sample

巡回セールスマン問題に対する
Lin-Kernighan 近傍を用いた Guided Local Search
-大規模問題に対する実装法を中心として -

•   Traveling Salesman Problem
•   Basic Data Structure
•   Lin-Kernighan Neighborhood
•   Guided Local Search
•   Implementation
•   Experimental Analysis
Traveling Salesman Problem (TSP)
Definition
Given n points (cities) and a distance function
between two points, find a minimum length Hamiltonian circuit
a        b
|ab|=|ba|      Symmetric TSP
|ab|=|ba|
otherwise    Asymmetric TSP

b
a         c   |ac|≦|ab|+|bc| ΔTSP

points are in d-dim. Euclidean space
Euclidean TSP
Applications
10 P

clustering a data array                 p= 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
Implementation
• Geometric data structure
– Bucket
– Candidate Graph
– K-d tree
• Tour data structure
for solving
–   Array
–   Two-level Tree
108 TSP
–   Segment Tree
within 1%
–   Splay Tree             of optimum
Semidynamic K-d tree kdtree
Build K-d tree (1)

cutdim=X
A                             K           cutval=x(N)
F GH J
D E
I
B
C                 M
P                L
O N               ABC DE PO NF G H I JK M L
Build K-d tree (2)

cutdim=X
A                           K           cutval= X(N)

F GH J
D E
I         cutdim=Y
cutval=Y(B)
B
C               M
P              L
O N               ABD E C PO N F G H I JK M L
Build K-d tree (2)

cutdim=X
A                           K           cutval= X(N)

F GH J
D E
I         cutdim=Y
cutval=Y(B)
B
C               M
P              L
O N               ABD E C PO N F G H I JK M L
Build K-d tree (3) : O(Kn + n log n) time

cutdim=X
A                               K           cutval= X(N)

F GH J
D E
I         cutdim=Y       cutdim=Y
cutval=Y(B)    cutval=Y(F)
B
C                   M
P                L
O N               ABD E C PO N FG JK H I ML
Delete point Delete(D) (1)
D
φ=0
cutdim=X
A                                 K               cutval= X(N)

D             F GH J
E                          φ=0                       φ=0
I             cutdim=Y       cutdim=Y
cutval=Y(B)    cutval=Y(F)
B
C                     M
P                 L       φ=0
O N                ABD E C PO N F G JK H I ML

φ=0 φ=0 φ=0
LOPT HIPT
Delete point Delete(D) (2)
D
φ=0
cutdim=X
A                             K               cutval= X(N)

F GH J
E                          φ=0                       φ=0
I             cutdim=Y       cutdim=Y
cutval=Y(B)    cutval=Y(F)
B
C                 M
P                 L       φ=0
O N                ABE D C PO N F G JK H I ML

φ=0 φ=0 φ=0
LOPT HIPT
Delete (Undelete) point:
O(1) amortized time
φ=0
cutdim=X
cutval= X(N)

φ=1                         φ=0
cutdim=Y       cutdim=Y
cutval=Y(B)    cutval=Y(F)

φ=1                φ=1
ABD E C PO N F G JK H I ML
φ=0    φ=0
HIPT< LOPT
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!
ABD E
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
C                                                in the bucket, too!
P
O N                ABD E C PO N

Conjecture (via experimental analysis)
The expected running time is O(1).
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       r
E
cutdim=Y
cutval=Y(B)
B
Check the point
in the same bucket!

ABD E
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
C                                            in the bucket, too!
P
O N               ABD E C PO N
2-opt (1)      frnn(a,|ab|)

b=next(a)
a
c

|ab|+|cd| > |ac| + |bd|       d=next(c)
2-opt (2)

b=next(a)
a
c
flip(a,b,c,d)

d=next(c)
2-opt procedure two_opt
for TSP using K-d tree
void two_opt (point_set *N, int *tour)       Tour Database Type
{ restart:                                   Array Splay Tree
for all a ∈unserched_list) {                      (amortized)
b = next(a);                         O(1)    O(log n)
for all c ∈ frnn(a,|ab|){
d =next (c);                     O(1)    O(log n)
if (|ab|+|cd|>|ac|+bd|){
flip(a,b,c,d);               O(n)    O(log n)
goto restart; } }
remove point a from unserched_list; } }
Average runing time: O(n log n)
Lin-Kernighan opt
(=3-opt + Depth-first Tabu Search using
2-opt neighborhood)

c
f

d
e

b
a
LK Search
(Depth-first Tabu Search using 2-opt neighborhood)

f                  c

d
e

b      a

a             d           e          b           c   f

Tabu
LK Search
(Depth-first Tabu Search using 2-opt neighborhood)

a               d     e               b       c           f

a          f              c       b               e   d

a           f                 d           e           b       c
Combinatorial Optimization

Ground Set                    U                    c: U→Z
Set of Feasible Solutions           F                  (⊆2 U )
Objective Function                 f : F→ Z            f(x)=Σu∈x c(u)
Min. f(x)                   sub. to x ∈ F                   ∀x   ∈2 U

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 circuitｓ （ＨＣs）,
c = length of edge, f= total length of edges in HC.
Neighborhood Search (NS)
F
Neighborhood N: F →2
Move(x)= an appropriate element in N(x)

NS （ｘ）
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.
Local Search (LS)
any x’ ∈N(x) with f(x’)<f(x) if such an x’ exists
Improve(x)=   { “no”                otherwise

LS （ｘ,f）
1 while Improve(x) ≠ “no” do
2 x := improve (x)
3 return x
Snapshot of Guided Local Search
(1)
Snapshot of Guided Local Search
(2)
Snapshot of Guided Local Search
(3)
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 （ｘ）
1 p(u) := 0 (∀ u ∈U)
2 while STOP ≠ TRUE do
3 x := LS (x, g)
4 u* := arg max u∈x c(u)/(p(u)+1)
5 p(u*) :=p(u*)+1
How to memorize “p” (1)
Candidate Graph (Digraph)
a
a      c      b      d
c(a,c) c(a,b) c(a,d)
b   c
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).
How to memorize “p” (1)
Candidate Graph (Digraph)
a          a     c      b      d
c(a,c) c(a,b) c(a,d)
p(a,c) p(a,b) p(a,d)
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)
How to memorize “p” (2)
Tour Data Structure
a
a        b      e       f       g      c      d

b   c
d            (g,c) := arg max c(i,j)/(1+p(i,j))
p(g,c) :=p(g,c)+1
Memorize p(g,c) within the tour data structure
f               (used when edge (g,c) will be deleted).
g
e
Tour Data Structure: Array
a   c        tour        a     b      1      2      c       d
2
p        p(a,b) p(b,1) p(1,2) p(2,c) p(c,d)
1
d   b
Flip(a,b,c,d)

a   c
2   tour        a     c      2      1      b       d
1    p          0   p(2,c) p(1,2) p(b,1)    0
d   b
Experimental Analysis
• Using random Euclidean instances with
n=100 to 1000000 cities.
• Using TSPLIB (real) instances
n=48 to 85900 cities.
• Using random distance instances.
Quality for improvement heuristics
6

Percent Excess over
the Held-Karp
5
Lower Bound

4

2-opt
3-opt
3                                                        Lin-Ker
Iterated
SA2

2

1

0
2      2.5   3   3.5   4   4.5   5   5.5     6   P
P
(# of Cities =10 )
Running times for improvement heuristics
100000
CPU Time in
Seconds on
150Mhz SGI     10000
Challenge

1000

100                                                2-opt
3-opt
Lin-Ker
Iterated
10
SA2

1
2   2.5   3   3.5   4   4.5   5   5.5   6

0.1

0.01                                                  P
P
(# of Cities =10 )

DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
 views: 15 posted: 3/29/2012 language: pages: 36
How are you planning on using Docstoc?