Local Search Stuffs In these slides, you will find: –Solution Representation –Local Move/Neighborhood Swap k-Nodes Swap k-Edges –Distance Metric For –Traveling.

Slides:



Advertisements
Similar presentations
Lists and the Collection Interface Chapter 4. Chapter Objectives To become familiar with the List interface To understand how to write an array-based.
Advertisements

Traveling Salesperson Problem
Compiler-Based Register Name Adjustment for Low-Power Embedded Processors Discussion by Garo Bournoutian.
CS6800 Advanced Theory of Computation
Query Execution, Concluded Zachary G. Ives University of Pennsylvania CIS 550 – Database & Information Systems November 18, 2003 Some slide content may.
Variable Neighborhood Search for the Orienteering Problem ISCIS’06 –The 21st International Symposium on Computer and Information Sciences F. Erdoğan SEVİLGEN.
Neural Networks for Optimization William J. Wolfe California State University Channel Islands.
Branch and Bound Similar to backtracking in generating a search tree and looking for one or more solutions Different in that the “objective” is constrained.
Evolutionary Computational Intelligence
Chapter 3 Brute Force Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
CSE 830: Design and Theory of Algorithms
EAs for Combinatorial Optimization Problems BLG 602E.
Information retrieval Finding relevant data using irrelevant keys Example: database of photographic images sorted by number, date. DBMS: Well structured.
Hypercubes and Neural Networks bill wolfe 10/23/2005.
Ant Colony Optimization Algorithms for the Traveling Salesman Problem ACO Kristie Simpson EE536: Advanced Artificial Intelligence Montana State.
Linear Programming Applications
Approximation Algorithms Motivation and Definitions TSP Vertex Cover Scheduling.
1 Integrality constraints Integrality constraints are often crucial when modeling optimizayion problems as linear programs. We have seen that if our linear.
Table of Contents Recall that to solve the linear system of equations in two variables... we needed to find the values of x and y that satisfied both equations.
Christoph F. Eick: Applying EC to TSP(n) Example: Applying EC to the TSP Problem  Given: n cities including the cost of getting from on city to the other.
Heapsort Based off slides by: David Matuszek
Genetic Algorithm.
The Traveling Salesperson Problem Algorithms and Networks.
Branch & Bound UPPER =  LOWER = 0.
Data Structures and Algorithm Analysis Hashing Lecturer: Jing Liu Homepage:
Representing and Using Graphs
Combinatorial Optimization Chapter 1. Problems and Algorithms  1.1 Two Problems (representative problems)  The Traveling Salesman Problem 47 drilling.
Design & Analysis of Algorithms Combinatory optimization SCHOOL OF COMPUTING Pasi Fränti
More on Heuristics Genetic Algorithms (GA) Terminology Chromosome –candidate solution - {x 1, x 2,...., x n } Gene –variable - x j Allele –numerical.
Theory of Algorithms: Brute Force. Outline Examples Brute-Force String Matching Closest-Pair Convex-Hull Exhaustive Search brute-force strengths and weaknesses.
Brute Force A straightforward approach, usually based directly on the problem’s statement and definitions of the concepts involved Examples: Computing.
Honors Track: Competitive Programming & Problem Solving Optimization Problems Kevin Verbeek.
1 Combinatorial Problem. 2 Graph Partition Undirected graph G=(V,E) V=V1  V2, V1  V2=  minimize the number of edges connect V1 and V2.
Metaheuristic – Threshold Acceptance (TA). 2 Outlines ▪ Measuring Computational Efficiency ▪ Construction Heuristics ▪ Local Search Algorithms ▪ Metaheuristic.
Thursday, May 9 Heuristic Search: methods for solving difficult optimization problems Handouts: Lecture Notes See the introduction to the paper.
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
The Generalized Traveling Salesman Problem: A New Genetic Algorithm Approach by John Silberholz, University of Maryland Bruce Golden, University of Maryland.
Genetic Algorithms Przemyslaw Pawluk CSE 6111 Advanced Algorithm Design and Analysis
Chapter 3 Brute Force. A straightforward approach, usually based directly on the problem’s statement and definitions of the concepts involved Examples:
CSS446 Spring 2014 Nan Wang.  To understand the implementation of linked lists and array lists  To analyze the efficiency of fundamental operations.
UNIT 5.  The related activities of sorting, searching and merging are central to many computer applications.  Sorting and merging provide us with a.
Data Structures, Algorithms & Complexity
Chapter 5 Array-Based Structures © 2006 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
Lecture 7 Jianjun Hu Department of Computer Science and Engineering University of South Carolina CSCE350 Algorithms and Data Structure.
IE 312 Review 1. The Process 2 Problem Model Conclusions Problem Formulation Analysis.
Computer Science 1620 Sorting. cases exist where we would like our data to be in ascending (descending order) binary searching printing purposes selection.
Management Science 461 Lecture 7 – Routing (TSP) October 28, 2008.
Chapter 3 Brute Force Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
Retail Distribution Inside a City or small Region.
1 Combinatorial Problem. 2 Graph Partition Undirected graph G=(V,E) V=V1  V2, V1  V2=  minimize the number of edges connect V1 and V2.
1 Minimum Spanning Tree: Solving TSP for Metric Graphs using MST Heuristic Soheil Shafiee Shabnam Aboughadareh.
Brute Force A straightforward approach, usually based directly on the problem’s statement and definitions of the concepts involved Examples: Computing.
Brute Force A straightforward approach, usually based directly on the problem’s statement and definitions of the concepts involved Examples: Computing.
SAT problem SAT – Boolean satisfiability problem
Brute Force A straightforward approach, usually based directly on the problem’s statement and definitions of the concepts involved Examples: Computing.
Chapter 3 Brute Force Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
Comparing Genetic Algorithm and Guided Local Search Methods
Chapter 3 Brute Force Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
Study Guide for ES205 Yu-Chi Ho Jonathan T. Lee Nov. 7, 2000
Heuristics Definition – a heuristic is an inexact algorithm that is based on intuitive and plausible arguments which are “likely” to lead to reasonable.
Haim Kaplan and Uri Zwick
Multi-Objective Optimization
Chapter 3 Brute Force Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
Brute Force A straightforward approach, usually based directly on the problem’s statement and definitions of the concepts involved Examples: Computing.
Design & Analysis of Algorithms Combinatorial optimization
3. Brute Force Selection sort Brute-Force string matching
3. Brute Force Selection sort Brute-Force string matching
Efficiently Estimating Travel Time
Simulated Annealing & Boltzmann Machines
3. Brute Force Selection sort Brute-Force string matching
Presentation transcript:

Local Search Stuffs In these slides, you will find: –Solution Representation –Local Move/Neighborhood Swap k-Nodes Swap k-Edges –Distance Metric For –Traveling Salesman Problem (TSP) –Knapsack Problem (KP)

TSP: Solution Representation The solution for Traveling Salesman Problem (TSP) is a tour of cities –Usually represented as a circular array A of vertices/nodes/cities. –The range of array indices is [0..n-1] –The starting city is irrelevant, but usually A[0] –A[i] is the city visited at step i –The edges of the tour are defined by (A[i], A[i+1]) for all i  [0..n-2] plus the circular edge: (A[n-1],A[0]) Here is an example of 5 cities (n=5) Index01234 City

TSP: Local Move/Neighborhood There are several ways to locally modify TSP tour We list down 2 of them: 1.Swap k-vertices/nodes/cities 2.Swap k-edges

Swap k-vertices/nodes/cities k  2, but usually k=2 Neighborhood size (respectively, the running time of the local search) grows with larger k. –There are more options for k>2 There are k! ways to permute k cities. Swapping k-vertices maintains the feasibility of TSP tour. This type of local move for TSP is not good –It usually doesn’t fix crossings in the tour –But rather add more crossings… –Therefore local neighbors’ quality is usually poorer –A bad feature for local search with gradient-descent type

Example: Swap(index 1,index 3) Index n-1 City’43102…… City40132……

Swap k-edges k  2, but usually 2 or 3 Again, neighborhood size (respectively, the running time of the local search) grows with larger k.. Swapping k-edges maintains the feasibility of TSP tour. This local move is better than swap k-vertices –Typically used in the best performing local search for TSP. The best performing heuristic for TSP: Lin-Kernighan heuristic, uses variant of this swap k-edges… –The local neighborhood induced by this move usually contain tours/solutions with improving quality (crossings fixed). –We can fix crossings using shorter steps than swap k-vertices –In circular array and for k=2, this move is implemented by reversing the content of the sub-array/sub-tour.

Example: Swap(1-3/0-2,1-2/0-3) Index n-1 City’43102…… City43012……

TSP: Distance Metric The most appropriate (natural) distance function to measure distance between two TSP tours is bond/permutation/edge distance, defined as: –The number of different edges between solution a and b. –Using appropriate data structure, this distance function can be computed in linear time O(n), where n is the number of cities. Using the previous example (A: original tour, B: example for 2-nodes swap, C: example for 2-edges swap) –BondDistance(A,B) = 2 –BondDistance(A,C) = 2 Index01234…n-1 City A43102…… City B40132…… City C43012……

KP: Solution Representation The solution for Knapsack Problem (KP) is a set of taken items –Usually represented as a bit string of n items –If b[i] = 0, it means item i is not taken –If b[i] = 1, it means item I is taken Here is an example of 5 items (n=5) Index01234 Item00101 Taken  Not 

KP: Local Move/Neighborhood There are several ways to locally modify KP solution We list down 2 of them: 1.Toggle k-bits 2.Swap k-bits

Toggle k-bits k  1, but usually k=1 Toggle bit toggles the state of b[i] –From 0 to 1 and vice versa. –Feasibility of the solution must be checked afterwards. This local move is usually not used alone –When the knapsack is full, there is no way to insert any more item (toggle b[i] == 0 to b[i] == 1) –Toggling off will decrease the solution quality, without proper escape mechanism, the local search may get stuck easily.

Example: Toggle (Bit 1) Index01234 Item00101 Taken  Not  Item01101 Taken  Not 

Swap k-Bits k  2, but usually 2 For k=2, pick 2 indices i,j such that b[i] != b[j] –One item is inside but the other is outside the knapsack. –Swap them. –Feasibility of the solution must be checked afterwards. This local move is usually used with Toggle k-Bits –This local move doesn’t degrade the solution quality as much as pure Toggle k-Bits. –But complementing this neighborhood with Toggle k-Bits neighborhood usually yield stronger local search heuristic. –Careful search strategy must be employed for dealing with boundary cases of feasibility/infeasibility.

Example: Swap (Bit 1, Bit 4) Index01234 Item00101 Taken  Not  Item01100 Taken  Not 

KP: Distance Metric The most appropriate (natural) distance function to measure distance between two KP solution is hamming/exact match distance, defined as: –The number of different bits between solution a and b. –We can determine the distance with one linear scan O(n). Using the previous example (A: original knapsack, B: example for toggle 1 bit, C: example for swap 2 bits) –HammingDistance(A,B) = 1 –HammingDistance(A,C) = 2 Index01234 Knapsack A00101 Knapsack B01101 Knapsack C01100