DM841 DISCRETE OPTIMIZATION Part 2 – Heuristics
Local Search Theory
Marco Chiarandini
Department of Mathematics & Computer Science University of Southern Denmark
Local Search Theory Marco Chiarandini Department of Mathematics - - PowerPoint PPT Presentation
DM841 D ISCRETE O PTIMIZATION Part 2 Heuristics Local Search Theory Marco Chiarandini Department of Mathematics & Computer Science University of Southern Denmark Local Search Revisited Outline Metaheuristics 1. Local Search
Department of Mathematics & Computer Science University of Southern Denmark
Local Search Revisited Metaheuristics
2
Local Search Revisited Metaheuristics
3
Local Search Revisited Metaheuristics
4
Local Search Revisited Metaheuristics
◮ neighborhood (set) of candidate solution s: N(s) := {s′ ∈ S | N(s, s′)} ◮ neighborhood size is |N(s)| ◮ neighborhood is symmetric if: s′ ∈ N(s) ⇒ s ∈ N(s′) ◮ neighborhood graph of (S, N, π) is a directed graph: GNπ := (V , A)
5
Local Search Revisited Metaheuristics
◮ 1-exchange (flip) neighborhood for SAT
◮ 2-exchange neighborhood for TSP
6
Local Search Revisited Metaheuristics
◮ Local minimum: search position without improving neighbors wrt given
◮ Strict local minimum: search position s ∈ S such that
◮ Local maxima and strict local maxima: defined analogously.
7
Local Search Revisited Metaheuristics
◮ Local search implements a walk through the neighborhood graph ◮ Procedural versions of init, step and terminate implement sampling
◮ Local search algorithms can be described as Markov processes:
8
Local Search Revisited Metaheuristics
◮ Search trajectory: finite sequence of search positions s0, s1, . . . , sk such
◮ Search strategy: specified by init and step function; to some extent
◮ random ◮ based on evaluation function ◮ based on memory 9
Local Search Revisited Metaheuristics
10
Local Search Revisited Metaheuristics
◮ Permutation
◮ linear permutation: Single Machine Total Weighted Tardiness Problem ◮ circular permutation: Traveling Salesman Problem
◮ Assignment: SAT, CSP ◮ Set, Partition: Max Independent Set
11
Local Search Revisited Metaheuristics
◮ πi is the element at position i ◮ posπ(i) is the position of element i
12
Local Search Revisited Metaheuristics
S | 1 ≤ i ≤ n}
S(π1 . . . πiπi+1 . . . πn) = (π1 . . . πi+1πi . . . πn)
X | 1 ≤ i < j ≤ n}
X(π) = (π1 . . . πi−1πjπi+1 . . . πj−1πiπj+1 . . . πn)
I | 1 ≤ i ≤ n, 1 ≤ j ≤ n, j = i}
I (π) =
13
Local Search Revisited Metaheuristics
R | 1 ≤ i < j ≤ n}
R(π) = (π1 . . . πi−1πj . . . πiπj+1 . . . πn)
B | 1 ≤ i < j < k ≤ n}
B(π) = (π1 . . . πi−1πj . . . πkπi . . . πj−1πk+1 . . . πn)
SB | 1 ≤ i < j ≤ n}
SB(π) = (π1 . . . πi−1πjπj+1πj+2πi . . . πj−1πj+3 . . . πn)
14
Local Search Revisited Metaheuristics
1E | 1 ≤ i ≤ n, 1 ≤ l ≤ k}
1E
2E | 1 ≤ i < j ≤ n}
2E(σ) =
Local Search Revisited Metaheuristics
1E | v ∈ ¯
1E
1E | v ∈ C}
1E
1E | v ∈ C, u ∈ ¯
1E
16
Local Search Revisited Metaheuristics
17
Local Search Revisited Metaheuristics
φ∈Φ(s,s′) |Φ|
18
Local Search Revisited Metaheuristics
◮ Swap neighborhood operator
◮ Interchange neighborhood operator
◮ Insert neighborhood operator
19
Local Search Revisited Metaheuristics
◮ Reversal neighborhood operator
◮ Block moves neighborhood operator
20
Local Search Revisited Metaheuristics
◮ Hamming Distance ◮ An assignment can be seen as a partition of n in k mutually exclusive
j | with Si ∈ P and S′ j ∈ P′ and defined A(P, P′)
21
Local Search Revisited Metaheuristics
22
Local Search Revisited Metaheuristics
◮ Search space size = (n − 1)!/2 ◮ Insert neighborhood
◮ 2-exchange neighborhood
2
◮ 3-exchange neighborhood
3
23
Local Search Revisited Metaheuristics
24
Local Search Revisited Metaheuristics
◮ Problem instance π ◮ Search space Sπ ◮ Neighborhood function N : S ⊆ 2S ◮ Evaluation function fπ : S → R
25
Local Search Revisited Metaheuristics
26
Local Search Revisited Metaheuristics
◮ Simplified landscape
◮ Tabu Search ◮ Guided Local Search ◮ Iterated Local Search ◮ Evolutionary Alg.
27
Local Search Revisited Metaheuristics
◮ search space size |S| ◮ reachability: solution j is reachable from solution i if neighborhood
◮ strongly connected neighborhood graph ◮ weakly optimally connected neighborhood graph
◮ distance between solutions ◮ neighborhood size (ie, degree of vertices in neigh. graph) ◮ cost of fully examining the neighborhood ◮ relation between different neighborhood functions
28
Local Search Revisited Metaheuristics
29
Local Search Revisited Metaheuristics
◮ number of (optimal) solutions |S′|, solution density |S′|/|S| ◮ distribution of solutions within the neighborhood graph
30
Local Search Revisited Metaheuristics
0.2 0.4 0.6 0.8 1 3 3.5 4 4.5 5 5.5 6
#cl/#var P(sat), P(unsat)
−4 −3 −2 −1 1
P(sat) P(unsat) kcnfs mean sc (all)
log mean search cost [CPU sec]
0.2 0.4 0.6 0.8
1
3 3.5 4 4.5 5 5.5 6
#cl/#var P(sat), P(unsat)
−4 −3 −2 −1 1
kcnfs mean sc (unsat) kcnfs mean sc (all) nov+ mean sc (sat) P(sat) P(unsat)
log mean search cost [CPU sec]
31
Local Search Revisited Metaheuristics
32
Local Search Revisited Metaheuristics
◮ plateux ◮ barrier and basins B4 B3 B1 B2 l2 l1 B4 B3 B1 B2
33
Local Search Revisited Metaheuristics
34
Local Search Revisited Metaheuristics
◮ Restart: re-initialize search whenever a local optimum
◮ Non-improving steps: in local optima, allow selection of
◮ Diversify the neighborhood: multiple, variable-size, rich (while still
35
Local Search Revisited Metaheuristics
◮ Intensification: aims at greedily increasing solution quality, e.g., by
◮ Diversification: aims at preventing search stagnation, that is, the search
◮ Goal-directed and randomized components of LS strategy need to be
◮ Iterative Improvement (II): intensification strategy. ◮ Uninformed Random Walk/Picking (URW/P): diversification strategy.
36
Local Search Revisited Metaheuristics
◮ Stochastic Local Search ◮ Simulated Annealing ◮ (Guided Local Search) ◮ Tabu Search ◮ Iterated Local Search ◮ Variable Neighborhood Search ◮ Evolutionary Algorithms
37