262
European Journal of Operational Research 26 (1986) 262-265 North-Holland
On the relationship of approximation algorithms for the minimum and the maximum traveling salesman problem Frank KORNER Technische Hochschule Karl-Marx-Stadt, Strasse 41, G.D.R.
Abstract: problem. problem proposed
Sektion Mathematik,
DDR-9022
Karl-Marx-Stadt,
Reichenhainer
We consider the relationship between the minimum and the maximum traveling salesman The paper is based on the idea of applying heuristics for the maximum traveling salesman to the minimum traveling salesman problem. Numerical results confirm the efficiency of the method.
Keywords: Traveling salesman problem, heuristic solution
1. Introduction
maximization problem:
The traveling salesman problem is a well-known combinatorial optimization problem. Find a closed, directed path T, (tour) which visits every town exactly once and the overall length of which is optimal (minimum or maximum). The traveling salesman problem is uniquely determined by the distance matrix C= (c~~)~,~-~,...,,. The value cij will be interpreted as the length of the path from town i to town j. The length of a tour T with respect to the distance matrix C will be denoted by v,(T). There are many heuristics for solving the minimum and the maximum traveling salesman problem. The following trivial equation describes the relationship between the minimization and the
n-$2 I/,(T)=
= - my V-,(T).
The author is indebted to the referee for the valuable suggestions and to Dr. B. Legler and Dr. B. Luderer for their valuable remarks. Received June 84; revised June 85
0)
Next, we want to apply heuristics for the maximum traveling salesman problem to construct approximate tours for the minimum traveling salesman problem (by simply changing the sign of the distance matrix).
2. On the minimization and the maximization prob lem Under the assumption (NN), (W
This paper was written while the author was visiting the Computer and Automation Institute of the Hungarian Academy of Sciences, Budapest
-mpx{-t+(T)}
cij 2 0 for all i, j, i #j
(non-negativity),
there exist for certain values of A’;y[A’;,“; E (0, l)] polynomialtime algorithms which find a tour T, with v,(K)
2 ~~X#‘““)>
where T max denotes a tour with maximal length 0377-2217/86/$3.50
0 1986, Elsevier Science Publishers B.V. (North-Holland)
F. Kbrner / Approximation algorithms for minimum and maximum TSP
(cf. [3]). For the same values of A’;,B;,we can find in polynomial time a tour T, with Vc(T,)>,XF;;Vc(TmaX)+(l
-AT;a;)V$“(C).
(2)
without the assumption (NN), where &$“(C) denotes the optimal objective function value of the minimum assignment problem with respect to the matrix C (cf. [3]). If C fulfills the assumption (TI), Cij
tw
~
Cik
+
ckj
A. (3)
(4)
(b) In the worst case the inequality (4) takes the form :
j#k
c
(c) It is not possible to improve the inequalities
(a) and (b).
then for certain values of A$$[ XT,$ > 11 there exist polynomial-time algorithms which find a tour T, with V,(T,)
Theorem. Let T, be constructed by Algorithm Then the following relations hold: (a) The parameter XFj in the inequality takes the following value:
AT’,;>,n-l-Ay$(n-2).
foralli,j,kwithi#j,iZkand (triangle inequality),
263
Proof. (a) We have from (2) V-&T,)
> A”;,a;V-c(TmaX)
+(l -XT$)V*$?(-c).
=sA’$;Vc(Tmin)
(cf. e.g. [4] and [5]). For the same values of X$, we can find in polynomial time a tour T, with
After multiplication of this inequality by -1 and consideration of equation (1) we obtain
v,tT,)
V,(C)
Q A’$v,tT”“)
+ (1 - ~$‘j)V,,(C),
(3)
for every matrix C, where VTIW
< AT$V,(T”‘“)
+ (1 - ~“;,a;)~“F(C)-
(5)
From the requirement that the inequality (5) be stronger than the inequality (3), a relation for the corresponding A-values in obtained:
:= f min { cik + ckj - cij: i, j, k distinct}. k-1 lJ
(cf. WI). or 3. On the relationship between the minimization and the maximization problem
First, we describe an algorithm for obtaining an approximation tour T, for Tmin, with respect to the matrix C. Algorithm A
SO: Calculate -C. Sl: Determine a tour T, satisfying (2), with respect to the matrix -C. S2: Use T, as an approximation tour for T”‘” with respect to the matrix C.
$‘#‘k(Tmin) >, A~;(Vc(Tti) + tvs=tc)
- V;=(C)) - G,(C)).
We
have V,,(C) G V,,(Tmin) and V,,(C) = Vc(Tmin) holds iff V,(T) = constant for all tours T (cf. [6] and [7]). Dividing by (Vc(Tmin)- V,,(C)), we can de-
rive the statement. (b) If C fulfils (TI) then V;=(C) d (n - 1) * Vc(Tmin), and this inequality is sharp (cf. [9]. Without the assumption (TI) we obtain V$=(C)
Now the following question arises: What is the best possible value of the parameter X’$$ in the inequality (3) expressed in terms of hz with respect to the tour T, constructed by Algorithm A?
- VntC))
Q (n - l)Vc(T&)>-(n
(cf. [7]). If .we estimate (n - l)Vc(T”““)
statement.
- 2)V,,(C)
V$F(C) in (a) by - (n - 2)V,,(C) then we get the
264
F. Kbrner
/Approximation
algorithms/or
(c) We define the distance matrix D as follows: dij := 1 for
i
and
dij := 0
tninitnum
50
With respect to this matrix we get: V,,(D) = 0, I/,(T*) = 1 a&l VAym(D) = n - 1. If we substitute these values in the inequality (a) then we obtain the statement. 0
TSP
Table 1 n
for i&j.
and maximum
100 150
vT,(c)
V$yC)
GYYa
- 4313.8 - 9174.1 - 14116.4
168.3 176.1 146.1
4812.6 9849.5 14848.0
Table 2
Remarks. (a) From (4) it is easy to see that the relation for the corresponding X-values remains valid if the value Vc(Tmin) is estimated from below. If we use the inequality
v*p(c)
=s V,(Trni”)
K$Yc) - C?“(C) v*I(c)-vT,(c)
50
100 150
vC(T,)
V@m’“)
351.3 391.8 428.3
230.9 307.5 320.1
(6)
then we can chose A?$ as follows: A!-z=l+
n
(1 _ Am”“) (n) *
(7)
If we use Algorithm A (with XT; = i, cf. [3]) to construct a tour T,, then we obtain for X$,7 the value 1.52
The computation of relation (7) requires O(n3) operations in the worst case. With the help of (7) one can decide whether to use Algorithm A or a direct heuristic for the minimum traveling salesman problem. The corresponding values are computed not only for the determination of (7). The computation of these values yields much information that .can be used for the construction of approximation tours. Thus, e.g., in [3] first a maximization assignment problem will be solved and then a tour T, determined. (b) Moreover the inequality (6) can be replaced by another. Only Wf V,(T&) has to hold. The value W can be the value of a minimum spanning tree or a minimum matching. As is well-known (see for example [ll]), many approximation algorithms for the construction of a tour T, are based on these two problems (determination of a minimum spanning tree or minimum matching).
4. Special examples
Several authors (e.g. in [8]) use for test purpose distance matrices whose elements Cij are chosen randomly from an interval (e.g. [O,lOO]) in uniform distribution. Table 1 contains the average value of 10 test examples each generated as described above. By putting these values in (7), we have X$=2.03
-1.03Xyt;.
as an approximation of the expected value of X$. The best constant in the estimation for asymmetric problems known at present is 1% = log,(n) (cf. [41>*
5. Numerical experiments
The matrices necessary for the tests are generated as described in Section 4. For the realization of Algorithm A we have used the method from [3]. The direct heuristics for the minimum problem are taken from [l]. In Table 2 the average values of 10 test examples are given. By Fmin we denote a tour generated by the Algorithm A and by T, a tour generated by a direct heuristic. The advantage for this case is obvious.
References [l] Adrabinski, A.A., and Syslo M.M., “Computational experiments with some approximation algorithms for the traveling salesman problem”, Zastosowania Marhemaryki 18 (1983) 91-95. [2] Burkard R.E., “Traveling salesman and assignment problems: A survey”, Annals of Discrete Mathematics 4 (1979) 193-215. [3] Fisher, M.L., Nemhauser, G.L., and Wolsuy L.A., “An. analysis of approximations for finding a maximum weight
F. Kikner
[4] [5] [6] [7]
/ Approximation
algorithms/or
Hamiltonian circuit”, Operations Research 27 (1979) 799-809. Frieze, A.M., Galbiati, G., and Maffioh F., On the worstcase performance of some algorithms for the asymmetric traveling salesman problems, Networks 12 (1982) 23-39. Golden, B., Bodin, L., Doyle, T., and Stewart W., Jr., “Approximate traveling salesman algorithms”, Operations Research 28 (1980) 694-711. jeromin, B., and Khmer F., “On the refinement of bounds of heuristic algorithms for the traveling salesman problem”, Mathematical Programming. 32 (1985) 114-117. Jeromin, B., and Komer F., “Zu Verscharfungen der Christofides-Schranke fti den Wert einer optimalen Tour
minimum
and maximum
TSP
265
des Rundreiseproblems”, MOS, Series Optimization ,13 (1982) 359-371. [8] Karp R.M., “A patching algorithm for the nonsymmetric traveling salesman problem”, SIAM Journal on Computation 8 (1979) 561-573. [9] Komer, F., “On the degree of asymmetry in the traveling salesman problem”, to appear in Zastosowania Mathemaryki.
[lo] Papadimitriou, C., and Steiglitz K., “Some examples of difficult traveling salesman problems”, Operations Research 26 (1978) 434-443. [ll] Rosenkrantz, D.J., Stems, R.E., and Lewis P.M., “An analysis of several heuristics for the traveling salesman problem”, SIAM Journal on Computing 6 (1977) 563-583.