FZ Zahra
FZ Zahra
Exercise N1:
By applying the simulated annealing method to a certain optimization problem for a function f, we
arrived at a temperature T and the current solution x0 such that f(x0) = 50.
This solution has 2 neighbors x1 and x2, f(x1) = 52 and f(x2) = 49. For each of these solutions, we
propose to determine the probability that it will be chosen as the next current solution (P(x0←x1) and
P(x0←x2) to replace x0).
1) Assume T= 1000:
a) Calculate these probabilities for a maximization problem.
b) Same question for a minimization problem.
2) Suppose T= 5 :
c) Calculate these probabilities for a maximization problem.
d) Same question for a minimization problem.
3) What can we deduce?
4) Knowing that the step is k and that the rate of temperature reduction is . Express as a function of k
and the number of calls to the neighborhood function between T= 1000 and T= 5.
Exercise N 2 (TSP):
Traveling Salesman Problem can be explained as a NP complete and a combinatorial optimization
problem where from the starting node, it should visit every other node only once to cover a minimum
distance. The travelling salesman problem was defined by the Irish mathematician W. R. Hamilton and
by the British mathematician Thomas Kirkman. The major objective of TSP is to find the shortest tour
through a set of N vertices so that each vertex is visited exactly once.
1. Write the mathematical formulation of this optimisation problem, specifying the search space
and the constraints.
2. Solve the problem using Simulated Annealing (SN) metaheuristic.
Exercise N 2 (KSP):
Given N items where each item has some weight and profit associated with it and also given a bag
with capacity W, (i.e., the bag can hold at most W weight in it). The task is to put the items into the
bag such that the sum of profits associated with them is the maximum possible. The constraint here is
we can either put an item completely into the bag or cannot put it at all (It is not possible to put a part
of an item into the bag).
1. Write the mathematical formulation of this optimisation problem, specifying the search space
and the constraints.
2. Solve the problem using Simulated Annealing metaheuristic.
FZ.Zahra