Advertisement

Abstract

Consider the following problem. You are to visit all the cities, towns, and villages of, say, Sweden and then return to your starting point. This might take a while (there are 24 978 locations to visit, after all), so you want to minimize your route. You plan on visiting each location exactly once, following the shortest route possible. As a programmer, you certainly don’t want to plot the route by hand. Rather, you try to write some code that will plan your trip for you. For some reason, however, you can’t seem to get it right. A straightforward program works well for a smaller number of towns and cities but seems to run forever on the actual problem, and improving the program turns out to be surprisingly hard. How come?

Keywords

Short Path Problem Short Route Quadratic Growth Algorithmic Problem Debit Card 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Applegate, D., Bixby, R., Chvátal, V., Cook, W., and Helsgaun, K. Optimal tour of Sweden. http://www.tsp.gatech.edu/sweden. Accessed September 12, 2010.
  2. Cormen, T. H., Leiserson, C. E., Rivest, R. L., and Stein, C. (2009). Introduction to Algorithms, second edition. MIT Press.Google Scholar
  3. Dasgupta, S., Papadimitriou, C., and Vazirani, U. (2006). Algorithms. McGraw-Hill.Google Scholar
  4. Goodrich, M. T. and Tamassia, R. (2001). Algorithm Design: Foundations, Analysis, and Internet Examples. John Wiley & Sons, Ltd.Google Scholar
  5. Hetland, M. L. (2008). Beginning Python: From Novice to Professional, second edition. Apress.Google Scholar
  6. Kleinberg, J. and Tardos, E. (2005). Algorithm Design. Addison-Wesley Longman Publishing Co., Inc.Google Scholar
  7. Knuth, D. E. (1968). Fundamental Algorithms, volume 1 of The Art of Computer Programming. Addison-Wesley.Google Scholar
  8. Knuth, D. E. (1969). Seminumerical Algorithms, volume 2 of The Art of Computer Programming. Addison-Wesley.Google Scholar
  9. Knuth, D. E. (1973). Sorting and Searching, volume 3 of The Art of Computer Programming. Addison-Wesley.Google Scholar
  10. Knuth, D. E. (2005a). Generating All Combinations and Partitions, volume 4, fascicle 3 of The Art of Computer Programming. Addison-Wesley.Google Scholar
  11. Knuth, D. E. (2005b). Generating All Tuples and Permutations, volume 4, fascicle 2 of The Art of Computer Programming. Addison-Wesley.Google Scholar
  12. Knuth, D. E. (2006). Generating All Trees; History of Combinatorial Generation, volume 4, fascicle 4 of The Art of Computer Programming. Addison-Wesley.Google Scholar
  13. Knuth, D. E. (2008). Introduction to Combinatorial Algorithms and Boolean Functions, volume 4, fascicle 0 of The Art of Computer Programming. Addison-Wesley.Google Scholar
  14. Miller, B. N. and Ranum, D. L. (2005). Problem Solving With Algorithms and Data Structures Using Python. Franklin Beedle & Associates.Google Scholar

Copyright information

© by Magnus Lie Hetland 2010

Authors and Affiliations

  • Magnus Lie Hetland

There are no affiliations available

Personalised recommendations