The Travelling Salesperson Problem A salesperson needs to visit London, Nottingham, Manchester and Leeds, he lives in Birmingham. Find the shortest route.

Slides:



Advertisements
Similar presentations
Decision Maths Networks Kruskals Algorithm Wiltshire Networks A Network is a weighted graph, which just means there is a number associated with each.
Advertisements

Decision Maths Dijkstra’s Algorithm.
Networks Prim’s Algorithm
Discrete Maths Chapter 3: Minimum Connector Problems Lesson 1: Prim’s and Kruskal.
VEHICLE ROUTING PROBLEM
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley. All rights reserved.
Chapter 4 sec. 2.  A famous and difficult problem to solve in graph theory.
Management Science 461 Lecture 2b – Shortest Paths September 16, 2008.
Graph Algorithms: Minimum Spanning Tree We are given a weighted, undirected graph G = (V, E), with weight function w:
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.
Minimum Spanning Trees. Subgraph A graph G is a subgraph of graph H if –The vertices of G are a subset of the vertices of H, and –The edges of G are a.
Chapter 4: Finding the Shortest Path Lesson 1: Dijkstra’s Algorithm
Problem Solving with Networks 18/08/2012 Jamie Sneddon
Graph Theory Hamilton Paths and Hamilton Circuits.
Networks.
CS440 Computer Science Seminar Introduction to Evolutionary Computing.
COSC 2007 Data Structures II Chapter 14 Graphs III.
Which of these can be drawn without taking your pencil off the paper and without going over the same line twice? If we can find a path that goes over all.
Chinese postman problem
Can you connect the dots as shown without taking your pen off the page or drawing the same line twice.
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.
Spring 2015 Mathematics in Management Science Traveling Salesman Problem Approximate solutions for TSP NNA, RNN, SEA Greedy Heuristic Algorithms.
Copyright © 2014, 2010, 2007 Pearson Education, Inc. Section 4.2, Slide 1 4 Graph Theory (Networks) The Mathematics of Relationships 4.
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.
TSP – Upper Bounds and Lower Bounds Initial problem : Upper Bound A salesman based in Stockton needs to visit shops based in Darlington, Billingham, Middlesbrough,
Graphs A ‘Graph’ is a diagram that shows how things are connected together. It makes no attempt to draw actual paths or routes and scale is generally inconsequential.
CIRCUITS, PATHS, AND SCHEDULES Euler and Königsberg.
Decision Maths 1 Shortest path algorithm Dijkstra’s Algorithm A V Ali :
The Problem A gallant and brave knight must traverse the lands to rescue the princess and claim his rightful place in the kingdom A Knight on a board.
Chapter 14 Section 3 - Slide 1 Copyright © 2009 Pearson Education, Inc. AND.
Unit 2 Hamiltonian Circuits. Hamiltonian Circuit: A tour that starts at a vertex of a graph and visits each vertex once and only once, returning to where.
Mathematical modeling To describe or represent a real-world situation quantitatively, in mathematical language.
1 Minimum Spanning Tree: Solving TSP for Metric Graphs using MST Heuristic Soheil Shafiee Shabnam Aboughadareh.
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.
1 1 Slide © 2005 Thomson/South-Western Chapter 9 Network Models n Shortest-Route Problem n Minimal Spanning Tree Problem n Maximal Flow Problem.
MAT 110 Workshop Created by Michael Brown, Haden McDonald & Myra Bentley for use by the Center for Academic Support.
Limitation of Computation Power – P, NP, and NP-complete
Hamilton Paths and Hamilton Circuits
D1 Discrete Mathematics
Weighted Graphs and traveling Salesperson problem
Routing Through Networks - 1
Shortest Path from G to C Using Dijkstra’s Algorithm
Network Flow Problems – Shortest Path Problem
Chapter 2: Business Efficiency Lesson Plan
Chapter 12 Network Models 12-1
Chapter 2: Business Efficiency Lesson Plan
Graph Algorithm.
* Hamiltonian Circuits introduction
The Travelling Salesperson problem
Graph Theory.
D1 Discrete Mathematics
Genome Assembly.
Decision Maths Dijkstra’s Algorithm.
Graphs Chapter 11 Objectives Upon completion you will be able to:
Shortest Path.
Shortest Path.
A path that uses every vertex of the graph exactly once.
Chapter 4: Finding the Shortest Path Lesson 1: Dijkstra’s Algorithm
The travelling salesman problem
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.
Classwork Worksheet Homework (day 67) worksheet
Networks Prim’s Algorithm
Euler circuit Theorem 1 If a graph G has an Eulerian path, then it must have exactly two odd vertices. Theorem 2 If a graph G has an Eulerian circuit,
The travelling salesman problem
Shortest Route Problems
Presentation transcript:

The Travelling Salesperson Problem A salesperson needs to visit London, Nottingham, Manchester and Leeds, he lives in Birmingham. Find the shortest route he can travel to visit all the cities and get home again. Le M N B Lo 43m 194m 72m 117m 87m 121m 52m 130m

The Travelling Salesperson Problem Aim: to be able to… find a Hamiltonian cycle by using the Nearest Neighbour algorithm to find a solution to the problem.

Aim: to be able to… find a Hamiltonian cycle by using the Nearest Neighbour algorithm to find a solution to the problem. A Hamiltonian cycle is defined to be a tour that visits every node precisely once. For example, we can easily find all the possible Hamiltonian cycles in the following diagram. (Start and finish at A) A 4 4 B D C

Aim: to be able to… find a Hamiltonian cycle by using the Nearest Neighbour algorithm to find a solution to the problem. A Hamiltonian cycle is defined to be a tour that visits every node precisely once. There are 3 essentially different Hamiltonian cycles: ACBDA has weight 16 A 4 4 B D C

Aim: to be able to… find a Hamiltonian cycle by using the Nearest Neighbour algorithm to find a solution to the problem. A Hamiltonian cycle is defined to be a tour that visits every node precisely once. There are 3 essentially different Hamiltonian cycles: ACBDA has weight 16 A 4 4 B D C

Aim: to be able to… find a Hamiltonian cycle by using the Nearest Neighbour algorithm to find a solution to the problem. A Hamiltonian cycle is defined to be a tour that visits every node precisely once. There are 3 essentially different Hamiltonian cycles: ABCDA has weight 17 A 4 4 B D C

Aim: to be able to… find a Hamiltonian cycle by using the Nearest Neighbour algorithm to find a solution to the problem. A Hamiltonian cycle is defined to be a tour that visits every node precisely once. There are 3 essentially different Hamiltonian cycles: ABCDA has weight 17 A 4 4 B D C

Aim: to be able to… find a Hamiltonian cycle by using the Nearest Neighbour algorithm to find a solution to the problem. A Hamiltonian cycle is defined to be a tour that visits every node precisely once. There are 3 essentially different Hamiltonian cycles: ABDCA has weight 17 A 4 4 B D C

Aim: to be able to… find a Hamiltonian cycle by using the Nearest Neighbour algorithm to find a solution to the problem. A Hamiltonian cycle is defined to be a tour that visits every node precisely once. There are 3 essentially different Hamiltonian cycles: ABDCA has weight 17 A 4 4 B D C

Aim: to be able to… find a Hamiltonian cycle by using the Nearest Neighbour algorithm to find a solution to the problem. Not all graphs have a Hamiltonian cycle We can replace this network by the complete network of shortest distances. A B DC The shortest route from A to B is 35

Aim: to be able to… find a Hamiltonian cycle by using the Nearest Neighbour algorithm to find a solution to the problem. The Nearest Neighbour algorithm Step 1Choose any starting node The Nearest Neighbour algorithm Step 1Choose any starting node

Aim: to be able to… find a Hamiltonian cycle by using the Nearest Neighbour algorithm to find a solution to the problem. The Nearest Neighbour algorithm Step 1Choose any starting node Step 2Consider the arcs which join the previously chosen nodes. From these arcs pick one that has minimum weight. Choose this arc, and the new node on the end of it, to join the cycle. The Nearest Neighbour algorithm Step 1Choose any starting node Step 2Consider the arcs which join the previously chosen nodes. From these arcs pick one that has minimum weight. Choose this arc, and the new node on the end of it, to join the cycle.

Aim: to be able to… find a Hamiltonian cycle by using the Nearest Neighbour algorithm to find a solution to the problem. The Nearest Neighbour algorithm Step 1Choose any starting node Step 2Consider the arcs which join the previously chosen nodes. From these arcs pick one that has minimum weight. Choose this arc, and the new node on the end of it, to join the cycle. Step 3Repeat Step 2 until all the nodes have been chosen. The Nearest Neighbour algorithm Step 1Choose any starting node Step 2Consider the arcs which join the previously chosen nodes. From these arcs pick one that has minimum weight. Choose this arc, and the new node on the end of it, to join the cycle. Step 3Repeat Step 2 until all the nodes have been chosen.

Aim: to be able to… find a Hamiltonian cycle by using the Nearest Neighbour algorithm to find a solution to the problem. The Nearest Neighbour algorithm Step 1Choose any starting node Step 2Consider the arcs which join the previously chosen nodes. From these arcs pick one that has minimum weight. Choose this arc, and the new node on the end of it, to join the cycle. Step 3Repeat Step 2 until all the nodes have been chosen. Step 4Then add the arc that joins the last-chosen node to the first-chosen node. The Nearest Neighbour algorithm Step 1Choose any starting node Step 2Consider the arcs which join the previously chosen nodes. From these arcs pick one that has minimum weight. Choose this arc, and the new node on the end of it, to join the cycle. Step 3Repeat Step 2 until all the nodes have been chosen. Step 4Then add the arc that joins the last-chosen node to the first-chosen node.

Aim: to be able to… find a Hamiltonian cycle by using the Nearest Neighbour algorithm to find a solution to the problem.

Le M N B Lo 43m 194m 72m 117m 87m 121m 52m 130m Use the Nearest Neighbour algorithm to solve the problem we considered earlier. Starting from Birmingham.