efficient local search
play

Efficient Local Search Application Examples Graph Coloring - PowerPoint PPT Presentation

Outline DM811 HEURISTICS AND LOCAL SEARCH ALGORITHMS FOR COMBINATORIAL OPTIMZATION Lecture 8 1. Efficient Local Search Efficiency vs Effectiveness Efficient Local Search Application Examples Graph Coloring Traveling Salesman Problem


  1. Outline DM811 HEURISTICS AND LOCAL SEARCH ALGORITHMS FOR COMBINATORIAL OPTIMZATION Lecture 8 1. Efficient Local Search Efficiency vs Effectiveness Efficient Local Search Application Examples Graph Coloring Traveling Salesman Problem Single Machine Total Weighted Tardiness Problem Marco Chiarandini Bin Packing slides in part based on http://www.sls-book.net/ H. Hoos and T. Stützle, 2005 2 Steiner Tree Outline 1. Efficient Local Search Efficiency vs Effectiveness Input: A graph G = ( V, E ) , a weight function ω : E � → N , and a subset Application Examples U ⊆ V . Graph Coloring Task: Find a Steiner tree, that is, a subtree T = ( V T , E T ) of G that includes Traveling Salesman Problem all the vertices of U and such that the sum of the weights of the edges in the Single Machine Total Weighted Tardiness Problem subtree is minimal. Bin Packing 3 4

  2. Efficiency vs Effectiveness Note: ◮ Local minima depend on g and neighborhood function N . ◮ Larger neighborhoods N induce ◮ neighborhood graphs with smaller diameter; The performance of local search is determined by: ◮ fewer local minima. 1. quality of local optima (effectiveness) Ideal case: exact neighborhood, i.e. , neighborhood function for which any local optimum is also guaranteed to be 2. time to reach local optima (efficiency): a global optimum. A. time to move from one solution to the next ◮ Typically, exact neighborhoods are too large to be searched effectively (exponential in size of problem instance). B. number of solutions to reach local optima ◮ But: exceptions exist, e.g. , polynomially searchable neighborhood in Simplex Algorithm for linear programming. 6 7 Speedups in Neighborhood Examination Trade-off (to be assessed experimentally): ◮ Using larger neighborhoods 1) Incremental updates (aka delta evaluations) can improve performance of II (and other LS methods). ◮ But: time required for determining improving search steps ◮ Key idea: calculate effects of differences between increases with neighborhood size. current search position s and neighbors s ′ on evaluation function value. Speedups Techniques for Efficient Neighborhood Search ◮ Evaluation function values often consist of independent contributions of solution components; 1) Incremental updates hence, f ( s ) can be efficiently calculated from f ( s ′ ) by differences between s and s ′ in terms of solution components. 2) Neighborhood pruning ◮ Typically crucial for the efficient implementation of II algorithms (and other LS techniques). 8 9

  3. 2) Neighborhood Pruning Example: Incremental updates for TSP ◮ Idea: Reduce size of neighborhoods by excluding neighbors that are likely (or guaranteed) not to yield improvements in f . ◮ Note: Crucial for large neighborhoods, but can be also very useful for ◮ solution components = edges of given graph G small neighborhoods ( e.g. , linear in instance size). ◮ standard 2-exchange neighborhood, i.e. , neighboring round trips p , p ′ differ in two edges Example: Heuristic candidate lists for the TSP ◮ w ( p ′ ) := w ( p ) − edges in p but not in p ′ + edges in p ′ but not in p ◮ Intuition: High-quality solutions likely include short edges. ◮ Candidate list of vertex v : list of v ’s nearest neighbors (limited number), sorted according to increasing edge weights. Note: Constant time (4 arithmetic operations), compared to ◮ Search steps ( e.g. , 2-exchange moves) always involve edges to elements linear time ( n arithmetic operations for graph with n vertices) of candidate lists. for computing w ( p ′ ) from scratch. ◮ Significant impact on performance of LS algorithms for the TSP. 10 11 Graph Coloring Local Search for the Traveling Salesman Problem Example: Iterative Improvement for k -col ◮ k -exchange heuristics ◮ 2-opt ◮ search space S : set of all k -colorings of G ◮ 2.5-opt ( solution set S ′ : set of all proper k -coloring of F ) ◮ Or-opt ◮ neighborhood function N : 1-exchange neighborhood ◮ 3-opt ◮ complex neighborhoods ◮ memory: not used, i.e. , M := { 0 } ◮ Lin-Kernighan ◮ initialization: uniform random choice from S , i.e. , init { ∅ , ϕ ′ } := 1/ | S | ◮ Helsgaun’s Lin-Kernighan for all colorings ϕ ′ ◮ Dynasearch ◮ step function : ◮ ejection chains approach ◮ evaluation function: g ( ϕ ) := number of edges in G Implementations exploit speed-up techniques whose ending vertices are assigned the same color under assignment ϕ 1. neighborhood pruning: fixed radius nearest neighborhood search ( Note: g ( ϕ ) = 0 iff ϕ is a proper coloring of G .) 2. neighborhood lists: restrict exchanges to most interesting candidates ◮ move mechanism: uniform random choice from improving neighbors, i.e. , step { ϕ, ϕ ′ } := 1/ | I ( ϕ ) | if s ′ ∈ I ( ϕ ) , 3. don’t look bits: focus perturbative search to “interesting” part and 0 otherwise, where I ( ϕ ) := { ϕ ′ | N ( ϕ, ϕ ′ ) ∧ g ( ϕ ′ ) < g ( ϕ ) } 4. sophisticated data structures ◮ termination : when no improving neighbor is available 13 14

  4. Look at implementation of local search for TSP by T. Stützle: (from http://www.sls-book.net/implementations.html ) File: http: //www.imada.sdu.dk/~marco/Teaching/Fall2008/DM811/Lab/ls.c two_opt_b(tour); two_opt_f(tour); two_opt_best(tour); two_opt_first(tour); three_opt_first(tour); LKH Helsgaun’s implementation http://www.akira.ruc.dk/~keld/research/LKH/ (99 pages report) [Appelgate Bixby, Chvátal, Cook, 2006] 15 16 The Lin-Kernighan (LK) Algorithm for the TSP (1) ◮ Complex search steps correspond to sequences of 2-exchange steps and are constructed from sequences of Hamiltonian paths ◮ δ -path: Hamiltonian path p + 1 edge connecting one end of p to interior node of p u v a) u w v b) 17 18

  5. Basic LK exchange step: ◮ Start with Hamiltonian path ( u, . . . , v ) : Construction of complex LK steps: u v 1. start with current candidate solution (Hamiltonian cycle) s ; set t ∗ := s ; a) set p := s ◮ Obtain δ -path by adding an edge ( v, w ) : 2. obtain δ -path p ′ by replacing one edge in p u v w 3. consider Hamiltonian cycle t obtained from p by b) (uniquely) defined edge exchange ◮ Break cycle by removing edge ( w, v ′ ) : 4. if w ( t ) < w ( t ∗ ) then set t ∗ := t ; p := p ′ ; go to step 2 5. else accept t ∗ as new current candidate solution s u w v' v c) ◮ Note: Hamiltonian path can be completed Note: This can be interpreted as sequence of 1-exchange steps that alternate into Hamiltonian cycle by adding edge ( v ′ , u ) : between δ -paths and Hamiltonian cycles. u w v' v c) 19 20 TSP data structures Additional mechanisms used by LK algorithm: Tour representation: ◮ reverse ( a, b ) ◮ Pruning exact rule: If a sequence of numbers has a positive sum, there is ◮ succ a cyclic permutation of these numbers such that every partial sum is ◮ prec positive. ◮ sequence(a,b,c) – check whether b is within a and b ⇒ need to consider only gains whose partial sum remains positive Possible choices: ◮ Tabu restriction: Any edge that has been added cannot be removed and any edge that has been removed cannot be added in the same LK step. ◮ | V | < 1.000 array for π and π − 1 Note: This limits the number of simple steps in a complex LK step. ◮ | V | < 1.000.000 two level tree ◮ Limited form of backtracking ensures that local minimum found by the ◮ | V | > 1.000.000 splay tree algorithm is optimal w.r.t. standard 3-exchange neighborhood Moreover static data structure: ◮ (For further details, see original article) ◮ priority lists ◮ k-d trees 21 22

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend