<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://www.explainxkcd.com/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Tsuki</id>
		<title>explain xkcd - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://www.explainxkcd.com/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Tsuki"/>
		<link rel="alternate" type="text/html" href="https://www.explainxkcd.com/wiki/index.php/Special:Contributions/Tsuki"/>
		<updated>2026-05-02T02:59:04Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https://www.explainxkcd.com/wiki/index.php?title=399:_Travelling_Salesman_Problem&amp;diff=19438</id>
		<title>399: Travelling Salesman Problem</title>
		<link rel="alternate" type="text/html" href="https://www.explainxkcd.com/wiki/index.php?title=399:_Travelling_Salesman_Problem&amp;diff=19438"/>
				<updated>2012-11-23T17:42:49Z</updated>
		
		<summary type="html">&lt;p&gt;Tsuki: Undo revision 19346 by 212.203.83.90 (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{comic&lt;br /&gt;
| number    = 399&lt;br /&gt;
| date      = March 21, 2008&lt;br /&gt;
| title     = Travelling Salesman Problem&lt;br /&gt;
| image     = travelling_salesman_problem.png&lt;br /&gt;
| imagesize = &lt;br /&gt;
| titletext = What's the complexity class of the best linear programming cutting-plane techniques?  I couldn't find it anywhere.  Man, the Garfield guy doesn't have these problems ...&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Explanation==&lt;br /&gt;
The Traveling salesman problem is a classic problem in computer science that Given a list of cities and their pairwise distances, the task is to find the shortest possible route that visits each city exactly once and returns to the origin city. A naive solution solves the problem in order of N! time (where N is the size of the list). The best algorithms can solve the problem in (N&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;2&amp;lt;sup&amp;gt;N&amp;lt;/sup&amp;gt;) order time, which is better but still extremely slow. The joke is that the computer salesman selling on eBay does not have to worry about this problem since he does not need to travel, to which the travelling salesman angrily responds &amp;quot;shut the hell up&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Also see previous strip [[287: NP-Complete]].&lt;br /&gt;
&lt;br /&gt;
==Transcript==&lt;br /&gt;
:[There is a linked black web, with a path in red]&lt;br /&gt;
:Brute-force solution:O(n!)&lt;br /&gt;
:[The web continues in this one. A man with a hat and a case is drawing it]&lt;br /&gt;
:Dynamic programming algorithms: O(n&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;2&amp;lt;sup&amp;gt;n&amp;lt;/sup&amp;gt;)&lt;br /&gt;
:[Another man, with a hat too, is at a computer, looking back over the chair]&lt;br /&gt;
:Selling on eBay: O(1)&lt;br /&gt;
:Computer salesman: Still working on your route?&lt;br /&gt;
:Drawing salesman: Shut the hell up.&lt;br /&gt;
&lt;br /&gt;
{{comic discussion}} &lt;br /&gt;
[[Category:Comics featuring Cueball]]&lt;br /&gt;
[[Category:Comics with color]]&lt;/div&gt;</summary>
		<author><name>Tsuki</name></author>	</entry>

	</feed>