Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the problem of finding the shortest route through several cities, such that each city is visited only once and in the end return to

image text in transcribed

Consider the problem of finding the shortest route through several cities, such that each city is visited only once and in the end return to the starting city (the Travelling Salesman problem). Suppose that there 8 cites and there is a direct route between each two cities, the position of cities in the map are as fallow. 1.8 8.5 3.2 City City#1 City#2 City#3 City#4 City#5 City#6 City#7 City#8 1.9 10.8 11.6 9.7 4.1 Y 5.6 8.1 12.6 10.9 2.9 4.8 4.2 7.6 Based on this position the distance between each two city can simplify calculated based on Euclidean distance. For example the distance of City#1 and City#3 is: Distance(City#1, City #3) = (xcity#1 Xcity#3) + (Ycity#1 Ycity#s)? (1.8 - 3.2)2 + (5.6 - 12.6)2 = 7.138 Use genetic algorithm in order to solve this problem, in which genes represent route between pairs of cities (not the city index). So you have labeled each route and use that label as genes value, as there is 8 city and all of cities connected to each other there is 28 route and so lower bound of genes value become 1 and the upper bound become 28. Implement the solution for this problem, and describe the fallowing items: a) Is this a permutation problem? If so, which type of crossover and mutation operator you used b) How you define the fitness function, is there any penalty in fitness function definition. c) If an unfeasible chromosome generated (a chromosome which represent a traveling path in which it cannot be the problem solution), how you handle that chromosomes. Submit: . Implemented code The plot of genetic algorithm run (average and best fitness value over generations) Best achieved result (the path and overall distance) The description of mentioned items

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

Recommended Textbook for

Graph Database Modeling With Neo4j

Authors: Ajit Singh

2nd Edition

B0BDWT2XLR, 979-8351798783

More Books

Students also viewed these Databases questions