You are on page 1of 3

TC6544

Assignment 7

1. Tabu Search Algorithm


The traveling salesman problem (TSP) can be represented as a fully connected graph in
Figure 1, with six nodes as six cities. The edge between nodes represents a distance between
cities.

Figure 1

Trace the tabu search algorithm (to minimize the total distance traveled) for ten iterations.
Note that:
• the tabu size is set to 2.
• neighbor solutions are all possible routes that can be obtained through adjacent
pairwise interchanges.
• The aspiration criterion allows a move, even if it is tabu, resulting in an objective
value better than the current best solution.
2. Genetic Algorithm
a) Explain the effect of selection, crossover and mutation in evolutionary computation.
How is the population affected by the use of each one of these operators? What happens
if you use a relatively high rate of mutation? What is a possible problem that might
occur in an algorithm that uses elitism?

b) Let the fitness f of bit string x with length L=4 to be the integer represented by the
binary number x (e.g. f(0011) = 3, f(1111) = 15). Assume that the current population
is:
1010
1000
0100
0110
1100

i. Is it possible for a GA to generate an individual with the maximum fitness without


using mutation, but only single point crossover? If so, give an example.

ii. If mutation has a rate other than 0, could the GA possibly generate the fittest
individual? Give an example.

c) Consider the following fitness function:

f(<bitstring>) = number of 1’s in the bitstring where both adjacent bits are 0’s

For example, f(010110100) = 2, f(100011011) = 0, and f(010101010) = 4.


(Notice that 1's in the first or last position in the string are not counted in the fitness
function, even if adjacent to a 0.)

Assume the design of our genetic algorithm is:


i. Create an initial population containing 4 random 9-bit strings.
ii. Discard the 2 least-fit ones.
iii. Do a cross-over using the 2 most fit. The 2 children that result and their parents
constitute the next generation.
iv. Randomly mutate 1 bit in 1 string in the population.
v. Go to step (ii)

Start with the initial population below and show what the next two generations might
look like. Briefly explain your reasoning.

Initial Population
011110110
011001011
101101110
000010101
d) Consider a function maximization application of a GA. Suppose the 5 chromosomes at
a given generation have fitness values listed below.

f(x1) = 55
f(x2) = 24
f(x3) = 8
f(x4) = 19
f(x5) = 42

Construct the “roulette wheel” for selection of parents for crossover.

You might also like