The travelling salesman problem

Slides:



Advertisements
Similar presentations
1. Find the cost of each of the following using the Nearest Neighbor Algorithm. a)Start at Vertex M.
Advertisements

Decision Maths Dijkstra’s Algorithm.
4/12/2015© 2009 Raymond P. Jefferis IIILect Internet Protocol - Continued.
Networks Prim’s Algorithm
DIJKSTRA’s Algorithm. Definition fwd search Find the shortest paths from a given SOURCE node to ALL other nodes, by developing the paths in order of increasing.
WOOD 492 MODELLING FOR DECISION SUPPORT Lecture 22 Network Problems.
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley. All rights reserved.
MINIMAL CONNECTOR PROBLEMS Problem: A cable TV company is installing a system of cables to connect all the towns in a region. The numbers in the network.
Excursions in Modern Mathematics(Tannenbaum) and Thinking Mathematically (Blitzer)
Computability and Complexity 23-1 Computability and Complexity Andrei Bulatov Search and Optimization.
1 Routing Algorithms. 2 Outline zBellaman-Ford Algorithm zDijkstra Algorithm.
The Travelling Salesman Algorithm A Salesman has to visit lots of different stores and return to the starting base On a graph this means visiting every.
NetworkModel-1 Network Optimization Models. NetworkModel-2 Network Terminology A network consists of a set of nodes and arcs. The arcs may have some flow.
Chapter 4: Finding the Shortest Path Lesson 1: Dijkstra’s Algorithm
Using Dijkstra’s Algorithm to Find a Shortest Path from a to z 1.
Shortest Path Algorithm This is called “Dijkstra’s Algorithm” …pronounced “Dirk-stra”
Shortest Path. Dijkstra’s Algorithm finds the shortest path from the start vertex to every other vertex in the network. We will find the shortest path.
Graph Theory Hamilton Paths and Hamilton Circuits.
Representing and Using Graphs
1 Excursions in Modern Mathematics Sixth Edition Peter Tannenbaum.
6.1 Hamilton Circuits and Paths: Hamilton Circuits and Paths: Hamilton Path: Travels to each vertex once and only once… Hamilton Path: Travels to each.
The travelling Salesman problem involves visiting every town (node) on a graph and returning to the start in the shortest distance. The slides will show.
Minimum spanning trees Aims: To know the terms: tree, spanning tree, minimum spanning tree. To understand that a minimum spanning tree connects a network.
Branch and bound branch and bound methods economize the search for the best trees by backing out of dead alleys.
6.4: The Brute-Force Algorithms
Bonus Round Assembly Line Scheduling Assume Assembly Line is used for multiple products 1.
Traveling Salesman Problem (TSP)
TSP – Upper Bounds and Lower Bounds Initial problem : Upper Bound A salesman based in Stockton needs to visit shops based in Darlington, Billingham, Middlesbrough,
EXCURSIONS IN MODERN MATHEMATICS SIXTH EDITION Peter Tannenbaum 1.
The Travelling Salesperson Problem A salesperson needs to visit London, Nottingham, Manchester and Leeds, he lives in Birmingham. Find the shortest route.
Euler Paths and Circuits. The original problem A resident of Konigsberg wrote to Leonard Euler saying that a popular pastime for couples was to try.
Decision Maths 1 Shortest path algorithm Dijkstra’s Algorithm A V Ali :
I can describe the differences between Hamilton and Euler circuits and find efficient Hamilton circuits in graphs. Hamilton Circuits I can compare and.
Management Science 461 Lecture 7 – Routing (TSP) October 28, 2008.
Chapter 14 Section 3 - Slide 1 Copyright © 2009 Pearson Education, Inc. AND.
Copyright © 2008 Pearson Education, Inc. Slide 13-1 Unit 13B The Traveling Salesman Problem.
Spanning Trees Dijkstra (Unit 10) SOL: DM.2 Classwork worksheet Homework (day 70) Worksheet Quiz next block.
AS Decision Maths Tips for each Topic. Kruskal and Prim What examiner’s are looking for A table of values in the order that they are added and the total.
Mathematical modeling To describe or represent a real-world situation quantitatively, in mathematical language.
The travelling salesman problem Finding an upper bound using minimum spanning trees Find a minimum spanning tree using Prim’s algorithm or Kruskal’s algorithm.
Networks Teacher’s guide. Networks 2 Problem 1 – the Link The EMTV Company needs to install a new cable system that links the six major towns in its.
Lower bound algorithm. 1 Start from A. Delete vertex A and all edges meeting at A. A B C D 4 5 E Find the length of the minimum spanning.
SHORTEST ROUTE PROBLEM A Networking Model Report for DPA 702 QUANTITATIVE METHODS OF RESEARCH By: ALONA M. SALVA Cebu Technological University.
Hamilton Paths and Hamilton Circuits
Excursions in Modern Mathematics Sixth Edition
D1 Discrete Mathematics
Nuffield Free-Standing Mathematics Activity
Shortest Path from G to C Using Dijkstra’s Algorithm
Chapter 12 Network Models 12-1
Party-by-Night Problem
Spanning Trees.
The Travelling Salesperson problem
D1 Discrete Mathematics
Genome Assembly.
Decision Maths Dijkstra’s Algorithm.
Shortest Path.
Shortest Path.
Graphs Part 2 Adjacency Matrix
Applied Combinatorics, 4th Ed. Alan Tucker
A path that uses every vertex of the graph exactly once.
Chapter 4: Finding the Shortest Path Lesson 1: Dijkstra’s Algorithm
Networks Kruskal’s Algorithm
Nearest Neighbor Repetitive Nearest Neighbor (Unit 10) SOL: DM.2
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley.
Shortest Path.
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley.
Networks Prim’s Algorithm
Shortest Path Solutions
The travelling salesman problem
Traveling Salesman Problems Nearest Neighbor Method
Presentation transcript:

The travelling salesman problem Finding a tour using the nearest neighbour algorithm The Nearest Neighbour algorithm: Choose an arbitrary starting node. Choose the smallest arc from this node to a node not yet in the tour. Repeat until all nodes are in the tour. Then add an arc back to the starting node.

The travelling salesman problem Finding a tour using the nearest neighbour algorithm Example A B C D E 3 5 4 2 6

The travelling salesman problem Finding a tour using the nearest neighbour algorithm Example 3 B A 2 4 2 5 5 5 C 4 6 6 E D Start from node A. All nodes are now in the tour, so return to the starting point. From B, the only node not yet in the tour is E. The nearest node is D. From C, the nearest node not yet in the tour is B. From D, the nearest node not yet in the tour is C. Length of tour = 2 + 4 + 2 + 5 + 5 = 18

The travelling salesman problem Finding a tour using the nearest neighbour algorithm Example 3 B A 2 4 2 5 5 5 C 4 6 6 E D Next, start from node B. The nearest node is C. However, from C, A and D are equally near. Choosing A gives the route A, D, E and then back to B. Length of tour = 2 + 4 + 2 + 6 + 5 = 19

The travelling salesman problem Finding a tour using the nearest neighbour algorithm Example 3 B A 2 4 2 5 5 5 C 4 6 6 E D Next, start from node B. The nearest node is C. However, from C, A and D are equally near. Choosing D gives the route D, A, E and then back to B. Length of tour = 2 + 4 + 2 + 5 + 5 = 18

The travelling salesman problem Finding a tour using the nearest neighbour algorithm Example 3 B A 2 4 2 5 5 5 C 4 6 6 E D Next, start from node C. This gives the route C, B, A, D, E and then back to C. Length of tour = 2 + 3 + 2 + 6 + 6 = 19

The travelling salesman problem Finding a tour using the nearest neighbour algorithm Example 3 B A 2 4 2 5 5 5 C 4 6 6 E D Next, start from node D. This gives the route D, A, B, C, E and then back to D. Length of tour = 2 + 3 + 2 + 6 + 6 = 19

The travelling salesman problem Finding a tour using the nearest neighbour algorithm Example 3 B A 2 4 2 5 5 5 C 4 6 6 E D Finally, start from node E. A and B are equally near. Choosing A gives the route E, A, D, C, B and then back to E. Length of tour = 5 + 2 + 4 + 2 + 5 = 18

The travelling salesman problem Finding a tour using the nearest neighbour algorithm Example 3 B A 2 4 2 5 5 5 C 4 6 6 E D Finally, start from node E. A and B are equally near. Choosing B gives two possible routes: either E, B, C, D, A, E Length of tour = 5 + 2 + 4 + 2 + 5 = 18

The travelling salesman problem Finding a tour using the nearest neighbour algorithm Example 3 B A 2 4 2 5 5 5 C 4 6 6 E D Finally, start from node E. A and B are equally near. Choosing B gives two possible routes: or E, B, C, A, D, E Length of tour = 5 + 2 + 4 + 2 + 6 = 19

The travelling salesman problem Finding a tour using the nearest neighbour algorithm Starting vertex Tour(s) Length A ADCBEA 18 B BCADEB BCDAEB 19 C CBADEC D DABCED E EADCBE EBCDAE EBCADE The shortest tour has length 18. Note that all the tours of length 18 are the same, starting at different points, some in reverse order.