Download The Devil`s Dartboard - Canadian Mathematical Society

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Ethnomathematics wikipedia , lookup

Addition wikipedia , lookup

Algorithm wikipedia , lookup

Elementary mathematics wikipedia , lookup

Factorization of polynomials over finite fields wikipedia , lookup

Halting problem wikipedia , lookup

Transcript
215
The Devil's Dartboard
Trevor Lipscombe and Arturo Sangalli
Abstract
To produce the most-dicult dartboard possible, we devise a
polynomial-time algorithm. The problem, and the algorithm, are shown
to be closely related to the Travelling Salesman Problem.
AMS Subject Classication: 68Q25 (Analysis of algorithms and
problem complexity), 05A99 (Classical combinatorial problems, and
00A08 (Recreational mathematics).
Introduction
Students of mathematics can often be found playing darts in bars. The
reason, no doubt, is their love of the subject. For example, recent analyses
such as [1] and [2] have shown that the mathematically adept, yet physically
inept, darts players should aim at the bull's eye in order to maximize their
potential score. This raises the question: what could dartboard manufacturers do to overcome this strategy? The answer could be to renumber the
board completely. One mathematician to consider the benets and strategies
of possible renumbering was Ivars Peterson, in a popular article [3].
The numbers in a dartboard are (sort of) arranged so that there is a
penalty for error. For instance, the number 20 at the top of the board is
sandwiched between the far smaller numbers 1 and 5. Aim at the 20 with
three darts and, if you are not very good, you risk a score of 20 + 5 + 1 = 26.
Likewise, 19 is anked by 3 and 7 (for a possible score of 29), and the 17 has
a 2 and 3 on either side (= 22).
There are more than 1:2 1017 circular arrangements of the numbers
1, 2, : : : , 20 | the exact number being 19! (that is, factorial 19). The challenge is to nd the one arrangement among them that gives the least reward for throwing error. More mathematically, what is the arrangement for
which the standard deviation of the three-sums (that is, the sums of three
consecutive numbers) is the smallest? We call this arrangement \The Devil's
Dartboard."
We shall consider n{number dartboards (n > 3) and ask: Is there a
polynomial-time[4] algorithm that will generate the Devil's Dartboard for
each n? A Devil's Dartboard Problem (DDP) consists of nding such an algorithm or proving that it does not exist. For the record, the actual dartboard, found in drinking establishments across the globe, is the permutation:
20, 1, 18, 4, 13, 6, 10, 15, 2, 17, 3, 19, 7, 16, 8, 11, 14, 9, 12, 5.
Copyright c 2000 Canadian Mathematical Society
216
A Decent Algorithm
Here is a polynomial-time algorithm that, if it does not always produce
a Devil's Dartboard, seems to come pretty close, especially for large n.
The permutation p is dened by induction. Choose p(k + 1) such that
the 3{sum p(k ; 1) + p(k) + p(k + 1) is as close as possible to the mean
m = 3(n + 1)=2 of the 3{sums. In the case of a tie, select p(k + 1) so that
consecutive 3{sums (dierent from m) fall on opposite sides of m, beginning
with a 3{sum greater than m. To get the induction started, set p(1) = n and
p(2) = 1.
For example, if n = 6, we have m = 3(6 + 1)=2 = 10:5. The algorithm
then produces the Devil's Dartboard 6, 1, 4, 5, 2, 3. The sequence of 3{sums
is 11, 10, 11, 10, 11, 10, and the standard deviation = 0:5, clearly the
smallest one possible. It is not, however, the only Devil's Dartboard for 6
numbers. Every Devil's Dartboard has its `opposite'; that is, the permutation obtained by reading the numbers right to left, which is another Devil's
Dartboard. These two permutations correspond to the two ways of writing
the numbers on a circular board: clockwise or counterclockwise.
For n = 20, the algorithm generates the permutation 20, 1, 11, 19,
2, 10, 18, 4, 9, 17, 6, 8, 16, 7, 12, 13, 5, 14, 15, 3, having = 2:54. It is
not a Devil's Dartboard, though, because the permutation that ends : : : , 3,
15, 14, 5 | and coincides with the previous permutation elsewhere | has
= 2:52.
Devil's Dartboards and Travelling Salesmen
The Devil's Dartboard Problem, which concerns permutations and minimization, is reminiscent of a famous optimization puzzle, the so-called Travelling Salesman Problem (TSP) [5]: Given a set f1, 2, : : : , ng of n \cities"
and the set of distances d(i;j ) between cities i and j , nd an ordering of
cities | that is, a tour | of minimum length (the length of a tour is the sum
of the distances between consecutive cities.) The \cities" may be arbitrary
objects, and the \distances" d(i; j ) any non-negative real-valued function.
The so-called NP problems (for Nondeterministic Polynomial Time
Veriable) [6] are, roughly speaking, those problems whose solutions might
be dicult to nd but are easy to check. For example, it is straightforward
to verify whether a given tour of the cities in a TSP has length less than, say,
1; 000. The TSP is therefore an NP problem, but it is actually more than that:
it has the property that any other NP problem may be transformed into an
instance of the TSP in polynomial time. In other words, the TSP is \as hard
as" any other NP problem. This implies that any polynomial-time algorithm
for the TSP could be used to solve every other NP problem also in polynomial
time. Problems that have this property are known as NP complete. In practical terms, it is considered highly unlikely that NP-complete problems could
217
be \eciently" solved | that is, within polynomial time | although strictly
speaking the question is still open. Strategies to nd near-optimal tours
rather than exact solutions are known as heuristics. The nearest-neighbour
heuristic for the TSP is the common-sense rule of travelling to the nearest
city not yet called upon, with the initial city being chosen at random. In other
words, a tour p is constructed step by step such that each new city p(k + 1)
adds the minimal length to the partial tour p(1), p(2), : : : , p(k).
Consider a generalized travelling salesman problem (GTSP): There is a
(reasonably simple) function L which assigns to every permutation p of the n
cities and to each k (= 1, 2, : : : , n), a non-negative real number Lp (k). Find
the permutation p of the cities for which the sum Lp (1)+ Lp (2) + : : : + Lp (n)
is a minimum.
The standard TSP is obtained by taking Lp (k) = d(p(k);p(k + 1)); the
Devil's Dartboard Problem results from taking Lp (k) = (p(k) + p(k + 1) +
p(k + 2) ; 3(n + 1)=2)2. Moreover, in this general setting, our algorithm is
the equivalent of the nearest-neighbour heuristic.
Mathematically sophisticated salespersons, therefore, will be able to
spend more time in the bar, and less on the road, and be far better at darts
than their colleagues.
References
1.
2.
3.
4.
David Percy, Mathematics Today 35, p. 54.
Robert Matthews, `Go For It' New Scientist 17, April 1999, p. 16.
Ivars Peterson, Ivars Peterson's MathLand, May 19, 1997.
Arturo Sangalli, The Importance of Being Fuzzy, Princeton University
Press, Princeton, 1998.
5. E.L. Lawler et al. (eds), The Travelling Salesman Problem, John Wiley &
Sons, New York, 1985.
6. M.R. Garey and D.S. Johnson, Computers and Intractability: A Guide to
the Theory of NP Completeness, W.H. Freeman, San Francisco, 1979.
Trevor Lipscombe
Princeton University Press
41 William Street
Princeton
NJ 08540, USA.
Arturo Sangalli
Department of Mathematics
Champlain Regional College
Lennoxville Campus
PO Box 5003 Lennoxville
QC, Canada J1M 2A1.