ALGORITHM CHEAPEST INSERTION

Similar documents
Algorithms and Experimental Study for the Traveling Salesman Problem of Second Order. Gerold Jäger

Optimal tour along pubs in the UK

Tolerance based Greedy Heuristics for the Asymmetric TSP. Gerold Jäger Martin Luther University Halle-Wittenberg

Assignment 3b: The traveling salesman problem

Polynomial time approximation algorithms

Travelling Salesman Problem. Algorithms and Networks 2015/2016 Hans L. Bodlaender Johan M. M. van Rooij

6 ROUTING PROBLEMS VEHICLE ROUTING PROBLEMS. Vehicle Routing Problem, VRP:

Last topic: Summary; Heuristics and Approximation Algorithms Topics we studied so far:

Construction Heuristics and Local Search Methods for VRP/VRPTW

to the Traveling Salesman Problem 1 Susanne Timsj Applied Optimization and Modeling Group (TOM) Department of Mathematics and Physics

TSP! Find a tour (hamiltonian circuit) that visits! every city exactly once and is of minimal cost.!

Traveling Salesman Problem (TSP) Input: undirected graph G=(V,E), c: E R + Goal: find a tour (Hamiltonian cycle) of minimum cost

(Refer Slide Time: 01:00)

Traveling Salesman Problem. Algorithms and Networks 2014/2015 Hans L. Bodlaender Johan M. M. van Rooij

Amanur Rahman Saiyed (Indiana State University) THE TRAVELING SALESMAN PROBLEM November 22, / 21

Methods and Models for Combinatorial Optimization Exact methods for the Traveling Salesman Problem

MVE165/MMG630, Applied Optimization Lecture 8 Integer linear programming algorithms. Ann-Brith Strömberg

Outline. Construction Heuristics for CVRP. Outline DMP204 SCHEDULING, TIMETABLING AND ROUTING

56:272 Integer Programming & Network Flows Final Exam -- December 16, 1997

Seismic Vessel Problem

To appear in ALENEX 2001 Proceedings, Springer Lecture Notes in Computer Science

LEAST COST ROUTING ALGORITHM WITH THE STATE SPACE RELAXATION IN A CENTRALIZED NETWORK

An O(log n/ log log n)-approximation Algorithm for the Asymmetric Traveling Salesman Problem

1 The Traveling Salesperson Problem (TSP)

Constructive and destructive algorithms

SLS Methods: An Overview

A constant-factor approximation algorithm for the asymmetric travelling salesman problem

A NEW HEURISTIC ALGORITHM FOR MULTIPLE TRAVELING SALESMAN PROBLEM

Construction heuristics for the asymmetric TSP

ON THE SOLUTION OF TRAVELING SALESMAN UNDER CONDITIONS OF SPARSENESS A THESIS. Presented. The Faculty of the Division of Graduate

LOCAL SEARCH FOR THE MINIMUM FUNDAMENTAL CYCLE BASIS PROBLEM

The Traveling Salesman Problem: State of the Art

A SAT Based Effective Algorithm for the Directed Hamiltonian Cycle Problem

EXACT METHODS FOR THE ASYMMETRIC TRAVELING SALESMAN PROBLEM

Mathematical Tools for Engineering and Management

Travelling Salesman Problems

Assignment 5: Solutions

Effective Local and Guided Variable Neighbourhood Search Methods for the Asymmetric Travelling Salesman Problem

Lagrangian Relaxation in CP


Research Interests Optimization:

Combinatorial Optimization - Lecture 14 - TSP EPFL

Introduction to Approximation Algorithms

Evolutionary tree reconstruction (Chapter 10)

An ILS Algorithm for the Team Orienteering Problem with Variable Profit

1 The Traveling Salesman Problem

DESIGN AND ANALYSIS OF ALGORITHMS GREEDY METHOD

Integer Programming. Xi Chen. Department of Management Science and Engineering International Business School Beijing Foreign Studies University

Construction of Minimum-Weight Spanners Mikkel Sigurd Martin Zachariasen

Outline. Optimales Recycling - Tourenplanung in der Altglasentsorgung

Two new variants of Christofides heuristic for the Static TSP and a computational study of a nearest neighbor approach for the Dynamic TSP

Minimum-Cost Spanning Tree. Example

Vladimir Dimitrijevic, Milan Milosavljevic, Milan Markovic. as: nd a minimum cost cycle which includes exactly one vertex from each

Example. Minimum-Cost Spanning Tree. Edge Selection Greedy Strategies. Edge Selection Greedy Strategies

A Computational Study of Bi-directional Dynamic Programming for the Traveling Salesman Problem with Time Windows

Solutions to Assignment# 4

Two models of the capacitated vehicle routing problem

Approximation Algorithms

A Steady-State Genetic Algorithm for Traveling Salesman Problem with Pickup and Delivery

MOTION PLANNING FOR UNMANNED AERIAL VEHICLES WITH RESOURCE CONSTRAINTS. A Thesis KAARTHIK SUNDAR

Match twice and stitch:a new TSP tour construction heuristic

A Note on the Separation of Subtour Elimination Constraints in Asymmetric Routing Problems

Lecture 3: Totally Unimodularity and Network Flows

7KH9HKLFOH5RXWLQJSUREOHP

Traveling Salesperson Problem (TSP)

Design and Analysis of Algorithms

56:272 Integer Programming & Network Flows Final Examination -- December 14, 1998

Branch-and-bound: an example

THE Traveling Salesman problem (TSP) and the Vehicle

Improved approximation ratios for traveling salesperson tours and paths in directed graphs

Outline. CS38 Introduction to Algorithms. Approximation Algorithms. Optimization Problems. Set Cover. Set cover 5/29/2014. coping with intractibility

HEURISTIC ALGORITHMS FOR THE GENERALIZED MINIMUM SPANNING TREE PROBLEM

Algorithms for the travelling salesman problem

IE 102 Spring Routing Through Networks - 1

Sample Solutions to Homework #4

NP Completeness. Andreas Klappenecker [partially based on slides by Jennifer Welch]

Traveling Salesman Problems With Profits

Adaptive Large Neighborhood Search

An Effective Implementation of the Lin-Kernighan Traveling Salesman Heuristic

Approximation Algorithms

CS 580: Algorithm Design and Analysis. Jeremiah Blocki Purdue University Spring 2018

Fall CS598CC: Approximation Algorithms. Chandra Chekuri

Machine Learning (BSMC-GA 4439) Wenke Liu

Design and Analysis of Algorithms

The Vehicle Routing Problem with Time Windows

Discrete (and Continuous) Optimization WI4 131

Heuristic Approaches to Solve Traveling Salesman Problem

Slides on Approximation algorithms, part 2: Basic approximation algorithms

CSE 417 Branch & Bound (pt 4) Branch & Bound

Solving small VRPTWs with Constraint Programming Based Column Generation

3 INTEGER LINEAR PROGRAMMING

Improvement heuristics for the Sparse Travelling Salesman Problem

Approximation Algorithms

Multiple Depot Vehicle Routing Problems on Clustering Algorithms

Depth-First Branch-and-Bound versus Local Search: A Case Study

The metric travelling salesman problem: pareto-optimal heuristic algorithms

Chapter 9. Greedy Technique. Copyright 2007 Pearson Addison-Wesley. All rights reserved.

Solving the Euclidean Steiner Tree Problem in n-space

Improving the Held and Karp Approach with Constraint Programming

15.082J and 6.855J. Lagrangian Relaxation 2 Algorithms Application to LPs

Transcription:

Version for STSP ALGORITHM CHEAPEST INSERTION. Choose the two furthest vertices i and k as initial subtour (c ik = max {c hj : (h, j) A}); set V := V \ {i} \ {k} (set of the unvisited vertices).. For each unvisited vertex j (j V ) determine the best insertion of j in the current subtour (i. e., determine the arc (i j, h j ) of the current subtour such that e j := c ij,j + c j,h j c ij,h j is minimum): i. Determine the unvisited vertex k (k V ) such that e k is minimum (e k = min {e j : j V }); insert vertex k between vertices i k and h k ; V := V \ {k}. If V then return to STEP. Else STOP. j h j j

ALGORITHM CHEAPEST INSERTION () v Time complexity: O(n ). v Good results if the triangle inequality holds. * Version for ATSP? * Is Cheapest Insertion a greedy algorithm?

Example Algorithm Cheapest Insertion Opt = Solution cost: (optimal) (, ) (,, ) (,,, ) (,,,, ) (,,,,, )

Example Opt = Algorithm Cheapest Insertion (, ) (,, ) (,,, ) (,,,, ) (,,,,, ) Solution cost:

GREEDY ALGORITHM MULTI-PATH (Bentley, 0) Version for STSP. Order the arcs of the graph according to non-decreasing values of the associated costs (c ij ).. If the insertion of the next arc (i, j) into the current solution (given by a family of paths) is feasible, i.e. the current degrees of vertices i and j are and arc (i, j) forms no subtour (i. e. there is no path from j to i whose number of arcs is less than n - ), then select arc (i, j).. If the number of the selected arcs is less than n then return to STEP. Else STOP. v v Time RANDOMIZED complexity: VARIANT O(n log n ) (the algorithm is similar to the Kruskal At algorithm STEP, for consider the Shortest the next Spanning feasible Tree) arcs: select the next arc with probability /, select the following arc with probability /.

Example Opt = Algorithm Multi-Path Solution cost: (optimal) Ordered arcs: (, ) (, ) (, ) (, ) (, ) (, ) (, ) (, ) (, ) (, ) OK OK OK NO OK NO NO OK OK STOP

Example Opt = Algorithm Multi-Path Solution cost: Ordered arcs: (, ) (, ) (, ) (, ) (, ) (, ) (, ) (, ) (, ) (, ) (, ) (, ) OK OK NO NO OK OK NO NO NO OK NO OK STOP

ALGORITHM SAVINGS (Clark-Wright, ; VRP) (version for STSP, good results if the triangle inequality holds) v v Choose any vertex k as the depot. Set V := V \ {k}. For each arc (i, j) A such that i V and j V compute the score ( saving ): s ij := c ik + c kj - c ij i j i j k k saving corresponding to the direct connection of vertex i with vertex j bypassing the depot k. s ij := (c ki + c ik + c kj + c jk ) (c ki + c ij + c jk )

ALGORITHM SAVINGS. For each vertex i V define the subtour (k, i, k); order the arcs (i, j) A (with i V, j V ) according to non-increasing values of the corresponding savings s ij.. If the insertion of the next arc (i, j) into the current solution (given by a family of subtours passing through k) is feasible, i.e. the current degrees (w.r.t. vertices belonging to V ) of vertices i and j are and arc (i, j) forms no subtour containing only vertices belonging to V, then remove arcs (i, k) and (k, j) and insert arc (i, j).. If the number of the inserted arcs is less than n then return to STEP. Else STOP. v Time complexity: O(n log n ) v Version for ATSP?

Example Algorithm Savings Opt = depot k =. Savings: S, = S, = S, = S, = S, = 0 S, = 0 S, = S, = S, = 0 S, = 0 Ordered arcs (, ) (, ) (, ) (, ) (, ) (, ) (, ) (, ) (, ) (, ) 0

Example Algorithm Savings () Opt = k =. Ordered arcs: depot (, ) (, ) (, ) (, ) (, ) (, ) (, ) (, ) (, ) (, ) OK OK OK NO OK NO NO OK OK STOP

Example Algorithm Savings () Opt = k =. Selected arcs: depot (, ) (, ) (, ) (, ) (, ) (, ) Solution cost: Complete the tour with arcs (, ) and (, )

LOCAL SEARCH ALGORITHMS v Sequence of feasible exchanges of r arcs belonging to the current tour with r arcs not belonging to the current tour (an exchange is feasible iff it leads to a new tour). v If a feasible exchange reduces the global cost of the tour then the exchange is performed. v Two versions:. update the current tour as soon as an improving exchange is found;. determine the best exchange (corresponding to the maximum improvement) and perform it. v r-optimal algorithms (Lin, ).

STSP v r = (-optimal exchange) i k i k l j l j v Time complexity O(n ) (for each iteration). v Cost variation = (c ij + c kl ) - (c ik + c jl ) v For each exchange: time complexity O(k)

Example (-optimal exchange) Initial solution found by algorithm Nearest Neighbour with Initial Vertex = with arcs (, ) and (, ) (cost = 0) Exchange arcs (, ) and (, ) (cost = ) Initial cost = Final cost =

ATSP v r = (-optimal exchange) i k b i k b l j a l j a v Cost variation: (c ij + c ja + + c bk + c kl ) - (c ik + c kb + + c aj + c jl ) v Both directions can be considered: clockwise, anti clockwise.

STSP v r = (-optimal exchange) i k j i k j n m n m l l v Time complexity O(n ) (for each iteration). v Cost variation = (c ij + c kl + c mn ) - (c ik + c jm + c ln ) time complexity O(k)

Example (-optimal exchange) Initial solution found by algorithm Cheapest Insertion Initial cost = Final cost = Exchange arcs (, ), (, ) and (, ) (cost = ) with arcs (, ), (, ) and (, ) (cost = )

STSP v r = (-optimal exchange) : by removing arcs from the current tour, different feasible tours can be obtained: v v v v v v v v z z z z u u z u u z u u z u u z (a) (b) (c) (d) v v v v v v v v z z z z u u z u u z u u z u u z (e) (f) (g) (h)

ATSP v r = (-optimal exchange) : different feasible tours (both directions can be considered) v v v v v v v v z z z z u u z u z u z u u u u z (a) (b) (c) (d) v v v v v v v v z z z z u z u z u z u (e) (f) (g) (h) z 0

COMPUTATIONAL RESULTS Symmetric TSP (undirected graphs). Two classes of randomly generated instances (n is given): ) Random Euclidean instances For each vertex i (i =,, n): generate a random point (x i, y i ) in a square 00 x 00: x i := uniform random value in (0, 00), y i := uniform random value in (0, 00). For each vertex pair (i, j) (i =,, n; j =,, n): c ij := (x i - x j ) + (y i - y j ) (symmetric cost matrix, the triangle inequality holds)

COMPUTATIONAL RESULTS FOR STSP ) Random Distance instances For each vertex pair (i, j) (i =,, n-; j = i+,, n) c ij := uniform random number in (, 00); c ji := c ij (symmetric cost matrix, the triangle inequality does not hold) v n = 00, 000, 0000, 00000. v 0 instances for each class and for each value of n. v Percentage gap between the solution cost found by the heuristic algorithm and the Lower Bound proposed by Held- Karp 0 (-SST Relaxation with subgradient optimization procedure). v CPU times in seconds of a 0 MHz SGI Challenge.

STSP - RANDOM EUCLIDEAN INSTANCES Algorithm n = 0 n = 0 n = 0 n = 0 N. Neighbour. (0.00).0 (0.0). (0.). () Multi-Path. (0.00).0 (0.0). (.). () Savings. (0.00). (0.). (.). () -Opt. (0.0). (.0).0 (.). () -Opt. (0.0). (.).0 (.).0 () % gap (CPU times in seconds) procedures -opt and -opt with initial solution found by the Randomized Multi-Path algorithm

STSP RANDOM DISTANCE INSTANCES Algorithm n = 0 n = 0 n = 0 N. Neighbour 0 (0.0) 0 (0.) 0 () Multi-Path 00 (0.0) 0 (0.) 0 (0) Savings 0 (0.0) 0 (.) 00 () -Opt (0.0) 0 (.) () -Opt 0 (0.0) (.) () % gap (CPU times in seconds) procedures -opt and -opt with initial solution found by the Randomized Multi-Path algorithm

HEURISTIC ALGORITHMS FOR THE ATSP (in addition to the modifications of the previously described algorithms) ALGORITHM PATCH (Karp-Steele, ). Solve the Assignment Problem (AP) corresponding to the cost matrix (c ij ).. If the current AP solution is a tour then STOP.. Consider the subtour S having the maximum number of vertices. Expand S by combining ( patching ) it, through a arc exchange, with a different subtour S so as to minimize the variation of the global cost of the two subtours S and S. Return to STEP.

Example: Given subtour S and a different subtour S (for all subtours S ) i l S S j k exchange arcs (i, j) and (k, l) with arcs (i, l) and (k, j) so as to minimize: (c il + c kj ) - (c ij + c kl ) with respect to all the possible arc exchanges between subtours S and S

Example A Opt = Final cost = (optimal solution) AP solution = (Lower Bound) Patch the two subtours by exchanging arcs (, ) and (, ) with arcs (, ) and (, )

v Variant of Algorithm Patch v ALGORITHM CONTRACT OR PATCH (Glover-Gutin-Yeo-Zverovich, 00) After STEP ( if the current AP solution is a tour then STOP ) add the steps: a. if the current solution contains at least a subtour R with less than t vertices then: remove the maximum cost arc (h, k) of R and contract the resulting path (from k to h) into a single supervertex r. R h k r c hj c ik j i solve the AP corresponding to the current graph, and return to STEP a. b. re-expand, in a recursive way, the supervertices so as to obtain an AP solution corresponding to the original graph.

ALGORITHM TRUNCATED BRANCH-AND-BOUND v Modification of the branch-and-bound algorithm based on the AP relaxation and the subtour elimination branching scheme. v At each level of the branching tree: consider only the descendent node corresponding to the minimum value of the associated Lower Bound (cost of the corresponding AP relaxation), by removing all the other descendent nodes.

ALGORITHM TRUNCATED BRANCH-AND-BOUND () AP solution level level arc (, ) imposed X, =... V(AP(k))= X, = 0 X, = 0 X, = 0 X, = X, = k X, = 0, X, = X, = X, = X, =... k k k k V(AP(k))= v(ap(k)= v(ap(k))= v(ap(k))= V(AP(k,))= k, k, k, v(ap(k,)= v(ap(k,))= 0... 0

COMPUTATIONAL RESULTS FOR ATSP classes of randomly generated instances. different values of n: 00,, 000, 0 instances for n = 00, ( for n = 000, for n = ) HK = Held-Karp lower bound corresponding to the -Shortest Spanning Arborescence Relaxation with Subgradient Optimization procedure. -OPT with starting solution found by the Nearest Neighbour Algorithm CPU times in seconds of a 0 MHz SGI Challenge Percent above HK MULTI - PATH Time in Seconds Class 00 000 00 000 tmat..0...0.. 0 amat.0....0.. shop..0...0.. 0 disk. 0....0.. super.0.0...0.. crane..0.0.0.0.. coin.....0.. 0 stilt 0.....0.. rtilt 0. 0. 0. 0..0..0

NEAREST NEIGHBOUR Percent above HK Time in Seconds Class 00 000 00 000 tmat.0.0...0.. 0 amat....0.0.. shop.....0.. 0 disk. 0....0.. super... 0..0.. crane 0.....0.. coin.0..0.0.0.. 0 stilt 0. 0....0.0. rtilt....0.0.. - OPT Percent above HK Time in Seconds Class 00 000 00 000 tmat....0... 0 amat....0... shop.0. 0. 0.... disk.. 0..... super..0.0.... crane.. 0. 0.... coin.0...... 0 stilt......0. rtilt 0.0.0.00...0.

PATCH Percent above HK Time in Seconds Class 00 000 00 000 tmat....00.0.. amat 0..0...0.. shop.....0.. 0 disk.0...0.0.. super.....0.. crane.0 0....0.. coin....0.0.. stilt.....0.. rtilt.0....0.. CONTRACT OR PATCH Percent above HK Time in Seconds Class 00 000 00 000 tmat....00.0.. amat....0.0.. shop....0.0.. disk.00....0.. super.0.0..0.0.. crane 0..0...0.. coin....0.0.0. stilt...0.0.0.. 0 rtilt.. 0. 0..0..

TRUNCATED BRANCH AND BOUND Percent above HK Time in Seconds Class 00 000 00 000 tmat.0.0.00.00.0.. 0 amat...0.0.0.. shop.0.0.0.0.0.0. 0 disk...0.0.0.. 0 super.....0. 0. crane...0.0.0.. coin.0.0...0.. 0 stilt 0....... rtilt..0.....0