Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 2 COMPUTER TASK The travelling salesman problem asks the following question: Given a list of cities and the distances between each pair of cities,

Question 2 COMPUTER TASK
The travelling salesman problem asks the following question: "Given a list of cities and the distances between each pair of cities, what is the shortest possible route that visits each city exactly once and returns to the origin city?
Apply Genetic Algorithm to Travelling Salesman Problem (TSP) for the following Table. The table below shows the distances between each city in kilometres.
A fitness function calculates the total distance between each city in the chromosome's permutation.
\table[[,Brighton,Bristol,Cambridge,Glasgow,Liverpool,London,Manchester,Oxford],[Brighton,0,172,145,607,329,72,312,120],[Bristol,172,0,192,494,209,158,216,92],[Cambridge,145,192,0,490,237,75,205,100],[Glasgow,607,494,490,0,286,545,296,489],[Liverpool,329,209,237,286,0,421,49,208],[London,72,158,75,545,421,0,249,75],[Manchester,312,216,205,296,49,249,9,194],[Oxford,120,92,100,489,208,75,194,0]]( please give me correct code )
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions