opera-AN IMPACT OF IMPROVEMENT-EXCHANGE HEURISTICS TO QUALITY OF PROBABILISTIC TSP SOLUTION AN IMPACT OF IMPROVEMENT-EXCHANGE HEURISTICS TO QUALITY OF PROBABILISTIC TSP SOLUTION

embedded sum goes over all subsets I of the set N and it means that 2 n items have to be processed. This complicated objective function evaluation constitutes a serious problem when an opera-AN This paper deals with a probabilistic travelling salesman problem (PTSP), which differs from a travelling salesman problem (TSP) [6] in the demand for a customer visit. In PTSP is each customer visited with a given probability only. An objective function for PTSP is in general hard to enumerate and it is even harder to estimate an influence of a local change of a PTSP solution on the final value of the objective function of the resulting solution. This hardiness complicates construction of an efficient heuristic for this problem. In this contribution we have focused on research of a relation between type of local change operation and the resulting objective function improvement. We have constrained here ourselves to improvement-exchange heuristics only, whereas inserting heuristics were broadly studied in the previous works [3], [5]. In this work we have tried to suggest several types of feasible solution changes (operations) including estimation of their impact on the objective function value. These operations have been embedded into the best admissible strategy and implemented as a part of software system, which enables exact or approximate evaluation of a PTSP route depending on the problem size. Using this system we have performed a sequence of numerical experiments to reveal relation between complexity of the used heuristics operations and final improvement of the resulting objective function value. This numerical result and associated conclusions are reported in the concluding part of this contribution.


Introduction
The probabilistic travelling salesman problem (PTSP) is a generalization of a well-known travelling salesman problem (TSP). Each node in PTSP has to be visited with some probability and visit necessities of all these nodes are stochastically independent. This problem was first introduced by Jaillet [2].
Let us denote the probability of the visit at node i by p i . An actual visit of the node i is represented by a random binary variable N i ʦ {0, 1}, for which the value 1 that appears with probability p i , means a visit of node and the value 0 (with (1Ϫp i ) probability) means that the node is not to be visited. The distance between the nodes i, j is denoted by d ij .
As we can see, the original TSP is just a special case of the problem presented above, where visit necessity probabilities of all nodes are set to 1. This difference makes a PTSP more difficult to solve, as it is ineffective to find a route every day according to the current set of customers (all nodes i with the current value N i ϭ 1). Thus, we need to find a solution for TSP that respects probabilities of all customers and an expected route length of, which, after skipping inactive customers, will be minimal. The main problem is to find the mentioned solution, which is called an a priori route.
In accordance with the above-mentioned problem we denote {1, 2, … n} set of customers, which should be visited whenever they are active (when their random variable value is 1). Each customer j raises his demand for visiting with probability p j . Our goal is to determine such a sequence of all customers so that the expected length of the tour be minimal. An instance of the tour arises by skipping customers that are not active in the given instance from the sequence.
When we fix the position of one customer in the considered sequence, then the sequence { j(1), j (2), … j(n)} is uniquely determined by the solution.
The evaluation of objective function constitutes a key problem of PTSP modelling. As we mentioned in the first part of this contribution, the constants d ij represent distances between customers. Let us denote I ϭ {i(1), i (2), … i(|I|)} as increasing-way ordered set of indexes of all active customers from the sequence. The probability of the sequence given by the sequence I is: The corresponding length of the route is then: From (1) and (2), we can write the expected value of route length for general sequence j(1), j (2), … j(n) as: The expression (3) is very hard to enumerate because the embedded sum goes over all subsets I of the set N and it means that 2 n items have to be processed. This complicated objective function evaluation constitutes a serious problem when an opera- This paper deals with a probabilistic travelling salesman problem (PTSP), which differs from a travelling salesman problem (TSP) [6] in the demand for a customer visit. In PTSP is each customer visited with a given probability only. An objective function for PTSP is in general hard to enumerate and it is even harder to estimate an influence of a local change of a PTSP solution on the final value of the objective function of the resulting solution. This hardiness complicates construction of an efficient heuristic for this problem. In this contribution we have focused on research of a relation between type of local change operation and the resulting objective function improvement. We have constrained here ourselves to improvement-exchange heuristics only, whereas inserting heuristics were broadly studied in the previous works [3], [5]. In this work we have tried to suggest several types of feasible solution changes (operations) including estimation of their impact on the objective function value. These operations have been embedded into the best admissible strategy and implemented as a part of software system, which enables exact or approximate evaluation of a PTSP route depending on the problem size. Using this system we have performed a sequence of numerical experiments to reveal relation between complexity of the used heuristics operations and final improvement of the resulting objective function value. This numerical result and associated conclusions are reported in the concluding part of this contribution.
tion changing a given solution is suggested and the associated change of the objective function should be estimated. This problem, as concerned heuristics starting with a feasible solution, does not arise, when a classical TSP is solved.

Improvement-exchange operations for TSP
The improvement-exchange operations for the probabilistic travelling salesman problem were derived from the basic improvement-exchange operations for the classical travelling salesman problem. We have considered two types of the operations and both of them will process so called chains of a current TSP route.
The TSP route will be given by sequence J ϭ Ͻ J(1), J(2), …, J(n), J(1)Ͼ of n network nodes, which should be visited in the given order. A chain of this route is an arbitrary subsequence of the sequence J. Let us assume that only such chains will be taken into consideration, which do not contain the node J(1). Then a chain may be determined by index i p of its predecessor P ϭ J(i p ) and by index i s of its successor S ϭ J(i s ). The very chain is formed by the following sequence of the nodes J(i p ϩ 1), J(i p ϩ 2), J(i p ϩ 3), …, J(i s Ϫ 1). The first node B ϭ J(i p ϩ 1) and the last one E ϭ J(i s Ϫ 1) of the chain are referred as the beginning and the end of the chain respectively. If P and S are neighbouring nodes, then the associated chain is said to be empty what means that it has no node. The number of nodes of the chain is referred to as length of the chain. Then the chain can be determined by index i p if the chain predecessor and by chain length L. In this case, the following equalities hold: P ϭ J(i p ), S ϭ J(i p ϩ L ϩ 1),. i s ϭ i p ϩ L ϩ 1 and under assumption L Ͼ 0, the additional equalities hold B ϭ J(i p ϩ 1), i b ϭ i p ϩ1, E ϭ J(i p Ϫ L), i e ϭ i p ϩ ϩ L ϭ i s Ϫ 1.
The first type of the suggested operations is a unary operation defined on a set of chains of J, the length of which is greater or equal to 2. This unary operation is called inversion and consists of taking the chain off the sequence J and inserting it back at the same position in the reversed order. If the current solution is given by the sequence J ϭ ϽJ(1), The improvement of the classical travelling salesman problem provided by this operation can be expressed by the following difference of the arc lengths If a symmetrical network is considered, where d ij ϭ d ji holds for arbitrary pair of indices i, j, then the last term of (4) is zero and the improvement is The second type of the suggested operations is a binary operation defined on pairs of disjoint chains of J. Two chains of J are said to be disjoint, if they do not share any node nor the predecessor or successor of the other chain. It is only allowed that the successor of one chain is the predecessor of the other one. The further described binary operation is called mutual exchange of two chains and consists of removing both chains from their positions and of inserting them at the opposite positions.
We shall distinguish two cases of chain exchanging operations. In the first case one of these chains is considered to be empty and in the second case the lengths of both chains are greater than zero.
Taking into account the first case, let us study the situation, when the inserted chain must follow its original direction of the travelling salesman route. We denote i p1 , i b1 , ie1 and i s1 the indices of the first non-empty chain and i p2 , i s2 the indices of the second empty chain predecessor and successor. If the current solution J has the form of J ϭ ϽJ(1), The possible improvement can be described by where

Fig. 2: Improvement of TSP via binary operation
If the non-empty chain is inserted at its new position in the reversed order and the distance matrix is symmetrical, then the associated improvement is Considering the second case for a symmetrical distance matrix, we have to distinguish in general four possibilities, how to insert the exchanged chains at their new positions.
The basic possibility is, to let both newly inserted chains follow their former directions from the original route. Then we obtain from the original sequence J ϭ ϽJ(1), Further possibility is to make inversion of the first chain and to let the second chain follow its former orientation. Then we obtain from the original sequence J the new sequence J ϭ ϽJ(1), The third possibility lets the first chain follow its former orientation and makes inversion of the second. This exchange leads The last possibility consists of inversion of both chains and of exchange of their positions. This way the following result is obtained Considering the above-mentioned operations for the classical travelling salesman problem, the change of the objective function value caused by the particular operation is immediately known.
Unfortunately, we can hardly estimate the impact of the individual improvement to the resulting objective function value. In fact, such a situation can occur that application of the most advantageous operation will prevent the algorithm from following some sequence of less advantageous operations, which could reach a very good solution.

Strategies for PTSP Heuristics
Considering the classical travelling salesman problem, at least the local impact of an improvement-exchange operation on the objective function value of the improved solution can be enumerated exactly and fast enough. The similar approach to probabilistic TSP is almost impossible due complexity of the objective function. We can do here some conditioned assumptions and study the particular strategy impact on the total improvement of the objective function of the tested problems. The problem originates from the fact that the shortening of the TSP route need not bring any saving in the expected value of PTSP route length. Nevertheless we can judge that the improvement described in the previous section could take part on the PTSP objective function improvement proportionally to the probability, with which the employed nodes occur in the PTSP route.
The classical strategies of combinatorial heuristics differ in the way in which a so-called neighbourhood of a current solution is processed. The neighbourhood of some solution is defined as the set of solutions, which can be reached from the current one using only one operation from a set of permitted operations. There are two basic strategies how to process a current solution neighbourhood. They are the first and best admissible strategies. The strategy "First Admissible" (FA) tests the permitted operations on the current solution in a given order and whenever it finds the operation with positive improvement (admissible operation or move), it performs the associated move to the better solution and updates the current solution. This process is repeated until such a current solution is met where no admissible operation exists. The strategy "Best Admissible" (BA) searches through the whole neighbourhood and updates the best admissible operation, i.e. the operation with the greatest positive improvement. After the neighbourhood searching is completed, the best admissible operation is performed and the current solution is updated. This cycle is repeated until no admissible operation on the current solution is found.
To design PTSP strategy, we refused the first admissible one, because it does not allow us to employ the probabilities of the nodes associated with the given operation. The first admissible strategy performs the first admissible move without comparing it to the others.
That is why we decided to use the best admissible strategy which tests all permitted operations on the current solution and computes the associated improvement as shown in the previous section. To employ the visit probabilities of the nodes which are associated with the considered operation, we expressed the probability that the substantial nodes occur in the necessary configuration.
For example, if the inversion of the chain with predecessor P, beginning B, end E and successor S should be performed, it is necessary for them to be visited in the given instance. The probability that all the nodes will be visited simultaneously is p in ϭ ϭ p P * p B * p E * p S .
The best admissible strategy enables to weigh each improvement associated with operation by the associated probability of the node configuration and to select the best expected improvement and the associated operation. In the suggested improvementexchange heuristic, we assigned to operation of inversion the above-mentioned probability p in ϭ p P * p B * p E * p S .
When chain exchanges are considered, then if the first chain has its length equal to one and the second one has its length equal to zero, then p ex ϭ p P1 * p B1 * p S1 * p P2 * p S2 .
If the first chain has the length greater than one, then p ex ϭ ϭ p P1 * p B1 * p E1 * p S1 * p P2 * p S2 . If the both chains have their lengths equal to one, then p ex ϭ p P1 * p B1 * p S1 * p P2 * p B2 * p S2 and if both chains have their lengths greater than one, then p ex ϭ ϭ p P1 * p B1 * p E1 * p S1 * p P2 * p B2 * p E2 * p S2 .

Numerical Experiments
To verify and evaluate our improvement-exchange heuristics, we have decided to study their behaviour on the set of sixty PTSP problems, which were derived from the problems referred in [1]. This set of benchmark problems consists of six subsets, where each subset contains ten problems of the same size. In the subsets, problem sizes of 20, 30, 50, 100, 150 and 250 nodes were considered. The associated subsets were denoted by M020, M030, M050, M100, M150 and M200 respectively. As the improvement-exchange heuristic needs a starting solution and quality of this solution may influence the contribution of the tested heuristic, we used two different dual heuristics to obtain various starting solutions. The improvement phase was performed with each of these solutions. The dual heuristics used to obtain the starting solution were described and studied in [3] and [4]. This set of dual heuristics contains the so-called Pelikan's algorithm [5] and Repeated Nearest Neighbour algorithm [3], which are denoted in the following tables as "Pelikan" and "RNN" respectively. As we have decided to explore the dependence of solution quality and time consumption on the complexity of the algorithm, which searches over current solution neighbourhood, we defined the order of improvement-exchange heuristic for this purpose. This order equals to the maximal length of chains, which is processed by the particular heuristic.
This way, the above mentioned algorithm performing only inversions of chains of length equal to two is denoted as heuristic of order o ϭ 2. If an inversion heuristic of order three is considered, then each inversion of chain the length of which equals to two or three, must be inspected to process neighbourhood of a current solution. If the chain exchange algorithm is considered, then heuristic of order two must evaluate each pair of chains, the lengths of which are one -zero, two -zero, one -one, two -one, two -two, to select the best move, which should be accomplished to leave the current solution.
To evaluate the objective function value (expected length according to expression (3)), we employed two approaches, enumeration and simulation [3], [4]. For the problems of a smaller size, we suggested and implemented a straightforward enumeration algorithm. This algorithm is based on a last-in-first-out structure and the enumeration scheme for the probability and length of an instance enumeration, which resembles a complete depth-searching process in a branching tree. In the enumeration process we start with an instance in that all customers are active, then the instance is processed in which all customers but the last are active, further the instance with only last but one active customer comes, and as the next case, the instance will be studied with two last inactive customers etc.
A faster way how to estimate the expected length of the route is the use of simulation technique. This method consists of a performed random generation of individual instances and their probabilistic evaluation. As we have found [3] that the enumeration process has exponential time consumption depending on a problem size, the simulation was the only method, which can settle with objective function of solutions containing more than thirty nodes.
In the following tables the average time consumption of improvement exchange heuristic is given in seconds for the particular subset of problems. The numerical experiments were performed on PC P4 1400 MHz, 128 MB RAM.
The solution quality is described by the average value of starting solutions and of the average improvement. This improvement is given once more in the tables in percentage, where the average starting solution is taken as a base (100 %).       As can be seen in the Tables 1-4 in the column "Average starting value", the results obtained by simulation and enumeration processes are almost identical. It supports our hypothesis that the simulation process can be used for evaluation of results in the cases, when the enumeration process fails due to time complexity.
From the comparison of the results obtained by a two-phase procedure Pelikan -improvement exchange and the results obtained by Nearest-Neighbour -improvement exchange, it can be found that the Pelikan's dual heuristic provides very good results which can not be improved by the studied primal heuristics. It can be noticed that this improvement exchange heuristic may deteriorate the input solution to some small extent. On the contrary to the procedure Pelikan -improvement exchange, the improvement exchange heuristic approved its use when a less quality input solution produced by the Nearest-Neighbour algorithm is used as a starting solution.
As regards of larger size from 100 to 250 customers (Tables  6-8), a small improvement from 1 to 2 % can be found even when improvement -exchange heuristic is used to Pelikan's resulting solution. Comparing it with the results obtained in the experiments with the Repeated Nearest-Neighbour procedure, it can be seen that the improvement ranges from 2 to 30 % in these cases.

Conclusions
The improvement -exchange heuristic, whose advantage was tested in the above mentioned experiments, turned out to be very useful when a good solution of the probabilistic travelling salesman problem is sought. Especially in the larger instances when the starting solution is obtained by common dual heuristic, there is employment of an improvement -exchange heuristic unavoidable. Furthermore, the experiments showed a considerable increase of the obtained improvement connected with raising order of the heuristic, especially when chain exchange is performed instead of simple inversion.
Similar to our previous results [3], [4], the Pelikan's heuristic proved to be able to provide excellent solutions which are hard to improve and which seem to be a local minima with respect to the used exchange operations. We think that it is caused by the fact that our exchange -improvement heuristic took into consideration only probability of the inspected improvement, which is evaluated using only the edges between neighbouring nodes in a current route. This approach does not explore the mutual positions of the customers with higher probability, which are separated by customers with lower probability in the current route.
In contradiction to this insufficiency the Pelikan's heuristic inserts customers to a route in accordance to their decreasing probability and at each step it locates a current customer into the current route, in which each customer has greater probability than the current one. We can suggest the study of improvementexchange heuristic overcoming above-mentioned insufficiency for a future research.