Polynomial TSP Solution

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

An Optical Solution For The Traveling

Salesman Problem
Tobias Haist and Wolfgang Osten
Institut für Technische Optik, Universität Stuttgart
Pfaffenwalring 9, 70569 Stuttgart, Germany
haist@ito.uni-stuttgart.de

Abstract: We introduce an optical method based on white light in-


terferometry in order to solve the well-known NP–complete traveling
salesman problem. To our knowledge it is the first time that a method for
the reduction of non–polynomial time to quadratic time has been proposed.
We will show that this achievement is limited by the number of available
photons for solving the problem. It will turn out that this number of photons
is proportional to N N for a traveling salesman problem with N cities and
that for large numbers of cities the method in practice therefore is limited
by the signal–to–noise ratio. The proposed method is meant purely as a
gedankenexperiment.
© 2007 Optical Society of America
OCIS codes: 120.3180 200.0200 200.4740 260.3160

References and links


1. G. Laporte, A. Asef-Vaziri, and C. Sriskandarajah, “Some applications of the generalized travelling salesman
problem,” J. Oper. Res. Soc. 47, 1461-1467 (1996).
2. T. H. Cormen, C. E. Leiserson, R. L. Rivest, and C. Stein, Introduction to algorithms, (MIT Press, 2001).
3. C. Vourdouris and E. Tsang, “Guided local search and its application to the traveling salesman problem,” Eur. J.
Oper. Res. 113, 80-110 (1998).
4. C. Kirkpatrick, “Optimization by simulated annealing: Quantitative studies,” J. Stat. Phys. 34, 975-986 (1984).
5. J. J. Hopfield and D. W. Tank, “Neural’ computation of decisions in optimization problems,” Biol. Cybern. 52,
381-384 (1985).
6. F. Glover, E. Taillard, and D. de Werra, “A user’s guide to tabu search,” Ann. Oper. Res. 41, 3-28 (1993).
7. S. Lin and W. Kernighan, “An effective heuristic algorithm for the traveling salesman problem,’ Oper. Res. 21,
498-516, (1973).
8. J. Edmonds, “Matroids and the greedy algorithm,” Math. Program. 1, 127-136 (1971).
9. S. Arora, “Polynomial time approximation schemes for euclidean traveling salesman and other geometric prob-
lems,” J. ACM 45, 753-7872 (1998).
10. D. S. Johnson, and L. A. McGeoch, “The traveling salesman problem: a case study in local optimization,” in Local
Search in Combinatorial Optimization,” E. Aarts and J. K. Lenstra, eds., (Princton University Press, 2003).
11. T. Hogg and D. Portnov, “Quantum optimization,” Inf. Sci. 128, 181-197 (2000).
12. S. Y. Shin, B. T. Zhang, B.T., and S. S. Jun, “Solving traveling salesman problems using molecular program-
ming,” in Proceedings of the Congress on Evolutionary Computation , P. Angeline, Z. Michalewicz, M. Schoe-
nauer, X. Yao, and A. Zalzala, eds., (IEEE Press, 1999), pp 994-1000.
13. N. T. Shaked, S. Messika, S. Dolev, and J. Rosen, “Optical solution for bounded NP-complete problems,” Appl.
Opt. 46, 711-724 (2007).
14. G. S. Kino and S. C. Chi, “Mirau correlation microscope,” Appl. Opt. 29, 3775-3783 (1990).
15. V. A. Kozlov, J. Hernandez-Codero, and T. F. Morse, “All-fiber coherent beam combining of fiber lasers,” Opt.
Lett. 24, 1814-1816 (1999).
16. B. E. A. Saleh and M. C. Teich, Fundamentals of Photonics, (Wiley, 1991).
17. A. F. Fercher, W. Drexler, C. K. Hitzenberger, and T. Lasser: “Optical coherence tomography — principles and
applications,” Reports on Progress in Physics 66, 239-303 (2003).

#83676 - $15.00 USD Received 5 Jun 2007; revised 3 Jul 2007; accepted 3 Jul 2007; published 3 Aug 2007
(C) 2007 OSA 6 August 2007 / Vol. 15, No. 16 / OPTICS EXPRESS 10473
1. Introduction
The traveling salesman problem (TSP) is one of the most important unsolved problems in com-
puter science. Apart from practical applications like transportation, plotting, chip fabrication,
record balancing or routing (see e.g. Ref. [1] for an overview), the importance stems from the
fact that it belongs to the class of so called NP–complete problems. “NP–complete” more or
less means that for such problems the runtime for finding the optimum solution increases faster
than polynomial with the problem size N. It can be shown that once a solution to one NP–
complete problem is found it will be possible to map that result (in polynomial time) to any
other NP–complete problem[2]. Therefore fast optimum solutions to the TSP are of consider-
able importance for all NP–complete problems.
Figure 1 depicts the TSP: A salesman wants to visit a set of N cities. The task is to find the
shortest tour length through all the cities with the additional constraint to visit each city exactly
once. In the classical TSP the trip should end at the same city where it has started. That means
we have a round–trip. It is easy to see that for N cities there are (N − 1)!/2 possible tours.
So even for a moderate number of cities one would have to check an astronomical number of
possible tours (e.g. 30 cities lead to 4.4x1030 tours) in order to find the shortest one. For 60
cities we would have more tours than there are atoms in the universe.
It has been proven[2], that no polynomial time heuristic can guarantee the solution of the
TSP of a given size (assuming the widely believed conjecture P 6= NP). So the global optimum
for large problems in general cannot be found. But a lot of methods, e.g. based on local opti-
mization (e.g. 3-opt[3]) or global optimization and heuristics (e.g. simulated annealing[4], neu-
ral networks[5], tabu search[6], Lin–Kernighan algorithm[7], greedy-Algorithm[8]), for find-
ing good approximate solution have been used in the past. Even for large numbers of cities
(N > 100) very good solutions can be found today in reasonable time using conventional
computers[9]. Ref. [10] gives a good overview. Polynomial time algorithms are available if
one is satisfied with obtaining good solutions where one can even set upper bounds for the de-
viation from global optimality[9]. For large practical problem sizes typically solutions which
differ only by about 1-2 % from optimality can be found[10] because — compared to other
NP–complete problems - the TSP is somewhat of good nature for real life examples. Also
unconventional strategies like using quantum computers[11], DNA-computing[12], or optical
hardware[13] have been proposed in the last years. Shaked et al recently proposed an all optical

Fig. 1. The traveling salesman problem: Find the shortest round-trip through N cities.

method for solving the TSP[13]. Their approach doesn’t reduce the complexity of the problem
but rather introduces a fast method for solving the TSP by a parallel matrix–vector multiplica-
tion based on optical correlation.
Apart from all these advances finding the global solution for pathologically posed TSPs with

#83676 - $15.00 USD Received 5 Jun 2007; revised 3 Jul 2007; accepted 3 Jul 2007; published 3 Aug 2007
(C) 2007 OSA 6 August 2007 / Vol. 15, No. 16 / OPTICS EXPRESS 10474
large N is still not possible by conventional computing[9]. In this paper we will propose the
first — to our knowledge — method that finds the global optimum of the TSP by reducing the
NP complexity of the problem to N 2 complexity. We achieve this by using white light interfer-
ometry (WLI)[14]. From the mathematical point of view we unfortunately haven’t disapproved
the commonly believed conjecture that NP 6= P (the Clay mathematics institute set out a price
of 1.000.000 US-$ for doing that) but we apparently reduced the complexity by a trick, namely
replacing operations by photons (and the physics of interference).
In section 2 we introduce the method as a gedankenexperiment. After that we explain in
section 3 in more detail how we avoid wrong interferences and in section 4 we show that the
practical implementation will be unrealistic for large problem sizes due to the low signal to
noise ratio. Finally we will state our opinion about the question whether the proposed method
should be regarded to be a quantum computer.

2. Basic idea
The proposed system (as shown in Fig. 2) is mainly a white light interferometer with a compli-
cated signal path. A wave-packet with limited temporal extension (due to the short coherence
length) entering the signal tour will travel through the network of N connected cities and finally
might exit at the final (=initial) city. If the optical path length through the network corresponds
to the reference path length, interference at the detector will be observed.

(a) Step A: Finding the minimum tour length (b) Step B: Finding the tour

Fig. 2. Optical solution for the TSP by white light interferometry

The cities are connected by input and output fibers with a length corresponding to their
distance in reality. We denote the fiber length between city i and city j by di j . It should be
noted that by using fibers we can implement an arbitrary distance metric as well as asymmetric
connections between the cities (so called asymmetric TSP). The input signals from other cities
to the exit(=initial) city are connected directly to the white light interferometer.
Figure 3 shows the structure of one city. It has N input and N output channels. A photon
entering one of the input channels will travel through a fiber optical delay line before enter-
ing a fan–out element that outputs the photon to one of the output channels. In the quantum
mechanical particle model the choice of the output port is given purely randomly. In the wave-
optical model of course we have a splitting of the wave to the N output channels. Different
methods (e.g. Y-couplers[15]) can be used for a practical implementation and by using direc-
tional couplers we can circumvent that light leaks back to the input channels. To make the cities

#83676 - $15.00 USD Received 5 Jun 2007; revised 3 Jul 2007; accepted 3 Jul 2007; published 3 Aug 2007
(C) 2007 OSA 6 August 2007 / Vol. 15, No. 16 / OPTICS EXPRESS 10475
Fig. 3. Assembly of one city: N input and N output ports (for the asymmetrical TSP) are
connected by a delay line of variable length. The overall delay for photons in city i is
given by Di (see Eq. 1). Fan-in and Fan–out elements (e.g. star-couplers) can be used for a
practical implementation.

distinguishable we use additional delay lines of different length within the cities.
The overall idea for globally solving the TSP is to perform the following four steps:

1. Setup of the scenario.

2. Computation of a lower bound for the overall optical path length for a correct solution.

3. Increasing the reference path length of the WLI, starting from the lower bound while
checking for correct interference to obtain the global minimum of the tour length.

4. Finding the corresponding tour.

The most critical step is to check for correct interferences (step 3). To this end a careful
choice of the delays within the cities is mandatory. For the TSP we chose (other choices are
possible) for city number i the length Di of the delay line

Di = α 2i + d (1)

with i = 0, 1, ..., N − 1 and with a small d in the range of tens of microns. The reason for this
choice will become clear in section 3. The constant α is chosen such that it is considerably
larger than N times the largest distance max(di j ) between two cities.

α >> N max(di j ) (2)

1) Setup of the scenario


The main work for setting up the experiment is to connect the cities. With N cities this setup
time will be proportional to
N−1
N2 − N
Ntotal = (N − 1) + (N − 2) + ...1 = ∑ i= 2
(3)
i=1

which corresponds to a complexity of N 2 .

#83676 - $15.00 USD Received 5 Jun 2007; revised 3 Jul 2007; accepted 3 Jul 2007; published 3 Aug 2007
(C) 2007 OSA 6 August 2007 / Vol. 15, No. 16 / OPTICS EXPRESS 10476
2) Computation of a lower bound for the overall optical path length for a correct solu-
tion
We first connect the white light source and the interferometer to one of the cities (Fig. 2 (a)).
For searching the global solution it doesn’t matter which city we chose as the starting city of
the trip because it is anyway a round–trip.
According to Eq. 1 visiting all the cities means that the overall path length L is at least
N−1
L = Nd+ ∑ α 2i + P (4)
i=0
> N d + α (2N − 1) (5)

with P being the overall path length traveled between the cities:
N
P = ∑ dPath i (6)
i=1

P is the function to be minimized by the TSP.


We start by setting the reference path length of the WLI to α (2N − 1) + N d which is the sum
of all delay lines in the cities.

3) Increasing the reference path length of the WLI, starting from the lower bound while
checking for correct interference to obtain the global minimum of the tour length.
Now we continue to increase the reference path length until we detect interference. The first
interference signal will occur if the shortest tour is approached. This detection of interference is
a little bit more complicated as in a conventional white light interferometer because we have to
check for additional interferences due to wrong tours within our network of cities, e.g. if not all
cities were visited exactly once. We will describe the interference detection in detail in section
3.
If we have found the first position of interference we have completed step A and the path
length of the reference arm minus α (2N − 1) + N d exactly equals the minimum path length
that the salesman has to travel during his trip.
It should be pointed out that this was the hard part of the problem and itself corresponds to
a NP–complete problem. We continue by finding also the correct tour through the network of
cities.

4) Finding the corresponding tour


We now connect the interferometer input to all of the possible N − 1 remaining cities (see
Fig. 2 (b)). For city i we have to reduce the length of the reference arm by

∆Li = Li + di j (7)

with j being the index of the exit city. Of course we will also disconnect the input connections
to the final city.
If we still have a correct interference pattern (see section 3), city i is the correct last but
one city. We now regard this city as the exit city and continue the same way, now with N − 2
remaining cities.
Therefore we have to do less than
N−1
N2 − N
Nmax = (N − 1) + (N − 2) + ...2 = ∑ i= 2
−1 (8)
i=2

#83676 - $15.00 USD Received 5 Jun 2007; revised 3 Jul 2007; accepted 3 Jul 2007; published 3 Aug 2007
(C) 2007 OSA 6 August 2007 / Vol. 15, No. 16 / OPTICS EXPRESS 10477
tests to completely find the optimum tour for the salesman. The complexity is the same as for
setting up the experiment and proportional to N 2 . Therefore we have reduced the NP–complete
problem to a problem with cost proportional N 2 . For the example at the beginning with N=30 we
have to perform 900 comparisons which is negligible compared to the original cost proportional
to 1030 .

3. Filtering out the correct interference


Apart from the wanted interference of the reference wave packet with the wave packet running
through all the cities exactly once in optimum time we unfortunately might have a lot of other
interferences at the detector. In the following we will analyze these spurious interferences and
explain how to detect the optimum tour.
We denote the reference wave packet by R and the wave packet that corresponds to the
correct solution by C. We have to keep in mind, that there might be multiple global solutions
Ci present at the same time (see also below), therefore we have to use ∑#Ci Ci for the analysis of
the interference. #C denotes the number of global solutions.
We also might have interference of the reference and the Ci with wave packets that have the
same overall path length L but might not traveled through all the cities exactly once. We denote
these wave packets by WC j and the number of these wave packets by #W .
Additionally we might have a lot of interference due to the superposition of wave packets
having the same overall path length among each other where this path length differs from the
reference path length L. If we have #K different superpositions each with #Hk wave packets we
#Hk
might denote this term by ∑#K k=0 | ∑h=0 Wkh | .
2

The overall intensity at the detector therefore will be given by


2 2
#C #W #K #Hk
I1 = I0 + ∑ Ci + R + ∑ WC j + ∑ ∑ Wkh

(9)

1 1
k=1 h=1

#H
I0 + ∑#K
k=0 | ∑h=0 Wkh | is the (very strong) background intensity due to the light not interfering
k 2

with the reference. One might use heterodyne detection in order to get rid of this background
signal but we have to look at the signal–to–noise problem which leads to the practical limit for
the method more closely in section 4.
We eliminate the last double sum for example by making a second measurement with the
reference blocked:
2 2
#C #W #K #Hk
I2 = I0 + ∑ Ci + ∑ WC j + ∑ ∑ Wkh

(10)

1 1
k=1 h=1

The difference I1 − I2 therefore is
2 2
#C #W #C #W
I1 − I2 = ∑ Ci + R + ∑ WC j − ∑ Ci + ∑ WC j

(11)

1 1
1 1

In the following it will become clear why we have chosen the delays in the cities according
to Eq. 1. We will show that by this choice we can effectively remove the WC j .
When connecting all the the cities by fibers we chose inter-city fiber lengths di j as well as
α (see Eq. 1) in multiples of 1 mm. Consequently, it follows that P then is also a multiple of 1
mm:
P = G x 1 mm (12)
with a positive integer G.

#83676 - $15.00 USD Received 5 Jun 2007; revised 3 Jul 2007; accepted 3 Jul 2007; published 3 Aug 2007
(C) 2007 OSA 6 August 2007 / Vol. 15, No. 16 / OPTICS EXPRESS 10478
For a practical problem we might chose max(di j ) = 1 m. That means the resolution of our
problem is 1:1000 (e.g. 1 km for a trip with maximum inter city distances of 1000 km) which
is enough for non-artificial problems for finding the best trip but of course other choices —
with a better resolution — are possible. The computational cost does not depend on the chosen
resolution.
d is chosen larger than twice the coherence length of the light source. E.g. we might chose
d = 10 µ m.

1 mm < P < N max(di j ) = N x 1 m (13)


for N ≥ 2.
We distinguish between three cases in order to prove the non–existence of any WC j for the
chosen delays.

Case A: Is it possible that we have a WC j with exactly N cities?


No, because that would imply that at least one city of our normal list of the N cities would
be replaced by another one. But that would mean that the overall delay within the cities is
changed by at least α . Since α > P we can’t cancel that change by a different way through the
cities because any change would be too strong. Therefore we will not achieve interference with
the reference.

Case B: Is it possible that we have a WC j with less than N cities?


Two reasons lead to a contradiction: If we would have less than N cities we again would have
to cancel the loss of one (or more) cities by visiting one city with a large delay multiple times.
This is also not possible with the chosen Delays Di .
The second reason uses the term N d within the delay. Due to Eq. 12 we can only visit very
special numbers N ′ of cities in order to achieve this delay, namely
1 mm
N′ = N + k (14)
d
with integer k.
For the chosen values (d=10 µ m and e.g. N = 10) this would lead to N ′ = 10, 110, 210, 310.
In practice only the first possible value of N ′ , which corresponds to case A, is detectable at all.
The ratio between the intensities of the two first possible solution for N = 10, namely N ′ =10
and N ′ =110 is 1010 /10110 = 10100 which is definitely far beyond any possibility for detection
(compare section 4).

Even if one doesn’t like such an argument based on the probability of detection one could
detect such a wrong tour by continuing with step B (finding the corresponding tour). In this
case the worst case computational complexity would be increased and more complicated to
calculate.

Case C: Is it possible that we have a WC j with more than N cities?


Here, the same argument as in case B shows that such a situation can’t lead to interference
with the reference: Only N ′ cities according to Eq. 14 are possible. And again the extreme
difference in intensities leads to the situation that the probability of getting only one wrong
photon is beyond any practical limit.
We therefore can conclude that there are no WC j disturbing any measurement if we chose
the setup as described above.

#83676 - $15.00 USD Received 5 Jun 2007; revised 3 Jul 2007; accepted 3 Jul 2007; published 3 Aug 2007
(C) 2007 OSA 6 August 2007 / Vol. 15, No. 16 / OPTICS EXPRESS 10479
One might also check for the very unlikely case that ∑ Ci = 0 by randomly increasing some
(randomly chosen) distances between cities by a very small amount (e.g. λ /5) that is perform-
ing phase shifting.
Additional note: Since both directions of a tour are equally valid we always will have at least
two solutions. These two solutions lead to positive interference due to the equal path length of
both ways.
In conclusion we have shown that by detecting a modulation in the difference equation 11
while scanning (using the conventional axial shift of the white light interferometer) we detect
a possible solution of the TSP. If we start scanning from the lower bound α (2N − 1) + N d the
first solution that we will find is the global solution to the TSP.

4. Signal-to-Noise Ratio
For a TSP with N cities we have to use fan–out elements with N connections. That means that
the intensity of a wave packet entering the network will be attenuated by a factor of (1/N)N
before being detected by the interferometer.
Since we always have two possible solutions this results in an amplitude of 2 (1/N)N/2 and
the interference with the reference (which should have a large amplitude, we take here 2) leads
to an interference of 2
I = 2 + 2 N −N/2 eiφ ≈ 4 + 8 N −N/2 cos(φ ) (15)

with a peak-to-valley modulation of 16 N −N/2 .

1e+25

1e+20
necessary energy for 1 measurement [J]

1e+15

1e+10

100000

1e-05

1e-10

1e-15

1e-20
1 10 100
number of cities

Fig. 4. Necessary energy per measurement (at λ = 1 µ m)) for solving the TSP.

In principle photon noise (due to the Poisson distribution for coherent light) will set the
lower bound for the number of necessary photons in order to achieve detection. For the Poisson
distribution[16] the standard deviation sdev of the photonp
number is directly proportional to the
square root of the total photon number Ng , that is sdev = Ng .
If we claim that the standard deviation of the overall photon number (on the detector) is at
least larger than the expected signal we have to claim that
Ng < M16 N −N/2
p
(16)

#83676 - $15.00 USD Received 5 Jun 2007; revised 3 Jul 2007; accepted 3 Jul 2007; published 3 Aug 2007
(C) 2007 OSA 6 August 2007 / Vol. 15, No. 16 / OPTICS EXPRESS 10480
where we denoted the total number of photons coming out of the network with M and the total
number of photons (dominated by the reference light) by Ng .
Therefore we can conclude that

Ng ≈ 4M < M 2 162 (N −N/2 )2 . (17)


1 N
M ≈ N (18)
64
So in total we will need
5 N
Ng ≈ (4 + 1)M = N (19)
64
photons.
For photons with a wavelength of 1 µ m the energy per photon is E = hν ≈ 2x10−19 J. With
a 1 W light source we therefore would achieve 5x1018 photons per second and we should be
able to solve problems with about 16 cities (detector integration 1 s). Using millimeter waves
(λ = 1 mm) and waveguides we gain a factor of 1000 but even together with raising the power
to 1 kW this would lead only to a small improvement concerning the maximum number of
cities to about 20 (see Fig. 4).
Of course we completely neglected practical issues like the limited signal–to–noise ratio of
real detectors as well as unavoidable loss of photons. In practice sensitivities of 1011 have been
reported (see the detailed discussion in [17]).

5. Is this a quantum computer?


A single photon running through the network of cities will simultaneously run through all the
possible paths. Just like in Young’s double slit interference experiment we have the superpo-
sition of all possible tours. Only by the detection through interference we select one of these
tours and the wavefunction collapses. The connection with the wave-optical description that we
used in section 2 and 3 of this article is well known. The amplitudes of the electromagnetic
waves correspond to the wavefunction describing the probability of detection.
For the basic principle of the method nevertheless we don’t need quanta or particles. Ordi-
nary (spatially limited because of the short coherence length) waves together with quadratic
detection of interference is sufficient.
According to the free encyclopedia Wikipedia a quantum computer “is any device for com-
putation that makes direct use of distinctively quantum mechanical phenomena, such as su-
perposition and entanglement, to perform operations on data.” Conventionally in a quantum
computer we have the entanglement of qbits, e.g. realized by photons or atoms.
Here it is different. Definitely we are using the superposition of all possible solutions in order
to find the optimum. But we are not using conventional entanglement. Instead of describing the
parameters (in our case the tour sequence) by entangled qbits we introduced them here by
the superposition of different optical path lengths. Therefore we would describe this sort of
computing, which can be used not only for the traveling salesman problem but as well for other
problems, as “wave-optical computation”.

6. Conclusions
We have shown that the complexity of the traveling salesman problem can be dramatically
reduced from N! to N 2 by optical means. To this end we employed white light interferometry
and a fiber optic model of the network of cities that the salesman should travel through.
The maximum number of cities N (problem size) is fundamentally limited by the number
of photons. Problems with N = 20 cities can be solved if 1 kW of power is available (1 s

#83676 - $15.00 USD Received 5 Jun 2007; revised 3 Jul 2007; accepted 3 Jul 2007; published 3 Aug 2007
(C) 2007 OSA 6 August 2007 / Vol. 15, No. 16 / OPTICS EXPRESS 10481
integration time per individual measurement). Since for practical (non-pathological) problems
by purely electronic means very good solutions to even large size problems can be found, our
proposed method is not meant to solve real–world traveling salesman problems but rather as a
gedankenexperiment to show how photons and the laws of physics can considerably reduce the
computational complexity of difficult mathematical problems.
We want to thank Thomas Schuster, Christof Pruss, and Martin Schönleber for fruitful dis-
cussions on this topic.

#83676 - $15.00 USD Received 5 Jun 2007; revised 3 Jul 2007; accepted 3 Jul 2007; published 3 Aug 2007
(C) 2007 OSA 6 August 2007 / Vol. 15, No. 16 / OPTICS EXPRESS 10482

You might also like