Prob 15
Prob 15
Genetic Algorithms
Roman Belavkin
Middlesex University
Question 1
Question 2
Question 3
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 in order to solve this
problem we use a genetic algorithm, in which genes represent links between
pairs of cities. For example, a link between London and Paris is represented
by a single gene ‘LP ’. Let also assume that the direction in which we travel
is not important, so that LP = P L.
Question 4
f (x) = (a + b) − (c + d) + (e + f ) − (g + h) ,
1
BIS3226 2
and let the initial population consist of four individuals with the following
chromosomes:
x1 = 6 5 4 1 3 5 3 2
x2 = 8 7 1 2 6 6 0 1
x3 = 2 3 9 2 1 2 8 5
x4 = 4 1 8 5 2 0 9 4
a) Evaluate the fitness of each individual, showing all your workings, and
arrange them in order with the fittest first and the least fit last.
b) Perform the following crossover operations:
i) Cross the fittest two individuals using one–point crossover at the
middle point.
ii) Cross the second and third fittest individuals using a two–point
crossover (points b and f ).
iii) Cross the first and third fittest individuals (ranked 1st and 3rd)
using a uniform crossover.
c) Suppose the new population consists of the six offspring individuals
received by the crossover operations in the above question. Evaluate
the fitness of the new population, showing all your workings. Has the
overall fitness improved?
d) By looking at the fitness function and considering that genes can only
be digits between 0 and 9 find the chromosome representing the opti-
mal solution (i.e. with the maximum fitness). Find the value of the
maximum fitness.
e) By looking at the initial population of the algorithm can you say
whether it will be able to reach the optimal solution without the mu-
tation operator?
Question 5
Question 6
A budget ariline company operates 3 plains and employs 5 cabin crews. Only
one crew can operate on any plain on a single day, and each crew cannot
work for more than two days in a row. The company uses all planes every
day. A Genetic Algorithm is used to work out the best combination of crews
on any particular day.
BIS3226 3