<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>freakified &#187; algorithms</title>
	<atom:link href="http://www.freakified.net/tag/algorithms/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.freakified.net</link>
	<description>Now with 38% more high-fructose corn syrup!</description>
	<lastBuildDate>Sun, 31 Jan 2010 20:08:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Proof that P = NP</title>
		<link>http://www.freakified.net/computer-science/proof-that-p-np/</link>
		<comments>http://www.freakified.net/computer-science/proof-that-p-np/#comments</comments>
		<pubDate>Tue, 06 May 2008 04:01:47 +0000</pubDate>
		<dc:creator>FreakyT</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[algorithms]]></category>
		<category><![CDATA[math]]></category>
		<category><![CDATA[proof]]></category>

		<guid isPermaLink="false">http://www.freakified.net/computer-science/proof-that-p-np/</guid>
		<description><![CDATA[In computer science, the efficiency of algorithms is generally written in the form of a function indicating the maximum amount of operations that must be performed for a given input size.  For example, in the case of a linear search through a list of n items, the computational complexity would be written as O(n), meaning [...]]]></description>
			<content:encoded><![CDATA[<p>In computer science, the efficiency of algorithms is generally written in the form of a function indicating the maximum amount of operations that must be performed for a given input size.  For example, in the case of a <a href="http://en.wikipedia.org/wiki/Linear_search" target="_blank">linear search</a> through a list of <em>n</em> items, the computational complexity would be written as O(<em>n</em>), meaning that for every additional item, one more operation must be performed.</p>
<p>However, many algorithms cannot run in O(<em>n</em>) time, or even close to it.  For example, take, once again, the <a href="http://www.freakified.net/computer-science/the-traveling-salesman-problem/" target="_blank">traveling salesman problem</a>, in which the algorithm must find the optimal route between several cities without ever visiting one more than once.  The simplest solution runs in O(<em>n</em>) time, while even a better solution using <a href="http://en.wikipedia.org/wiki/Dynamic_programming" target="_blank">dynamic programming</a> still only runs in <em>O</em>(<em>n</em><sup>2</sup>2<sup><em>n</em></sup>).  Because, as far as anyone can find, this algorithm cannot be reduced to run in polynomial time (that is, O(n<sup>something</sup>)), the problem is considered to be <a href="http://en.wikipedia.org/wiki/NP-complete" target="_blank">NP-complete</a>.</p>
<p>Unlike the aforementioned problem, many problems have solutions that do indeed run in polynomial time, which are known as <a href="http://en.wikipedia.org/wiki/P_(complexity)" target="_blank">P</a>.  However, while no one has found polynomial-time solutions to NP-complete problems, this doesn&#8217;t necessarily mean that they don&#8217;t exist.  In fact, no one has yet provided a proof that, indeed, such problems cannot have polynomial-time solutions; there&#8217;s even a <a href="http://www.claymath.org/millennium/" target="_blank">$1,000,000 prize</a> out there for the first person to provide a correct proof!  As such, I have created the following infallible proof:</p>
<p>P = NP<br />
P/P = NP/P<br />
1 = N<br />
<em>Therefore,</em><br />
P = (1)P<br />
P = P<br />
<em>By the Reflexive Property of Equality, this is always true.</em></p>
<p>QED</p>
]]></content:encoded>
			<wfw:commentRss>http://www.freakified.net/computer-science/proof-that-p-np/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Traveling Salesman Problem</title>
		<link>http://www.freakified.net/computer-science/the-traveling-salesman-problem/</link>
		<comments>http://www.freakified.net/computer-science/the-traveling-salesman-problem/#comments</comments>
		<pubDate>Tue, 22 Apr 2008 01:53:39 +0000</pubDate>
		<dc:creator>FreakyT</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[algorithms]]></category>
		<category><![CDATA[counter-terrorism]]></category>
		<category><![CDATA[terrorism]]></category>

		<guid isPermaLink="false">http://www.freakified.net/computer-science/the-traveling-salesman-problem/</guid>
		<description><![CDATA[You may have already heard of the traveling salesman problem.&#160; Basically, the idea is that you are an extremely obsessive traveling salesman with a map of cities connected by roads, and your job is to determine the best path that hits every city only once and leaves you back at the starting point.&#160; Also, you&#8217;re [...]]]></description>
			<content:encoded><![CDATA[<p><img alt="image" align="right" src="http://www.freakified.net/wp-content/uploads/2008/04/image2.png" width="138" height="138" />You may have already heard of the <a href="http://en.wikipedia.org/wiki/Travelling_salesman_problem" target="_blank">traveling salesman problem</a>.&#160; Basically, the idea is that you are an extremely obsessive traveling salesman with a map of cities connected by roads, and your job is to determine the best path that hits every city only once and leaves you back at the starting point.&#160; Also, you&#8217;re a robot.</p>
<p>The easiest to write program that would solve the problem would check every possible route, and then pick the shortest one.&#160; Of course, that&#8217;d be kind of slow.&#160; Like, <em>O(n!)</em> slow.&#160; (Meaning that, for every additional city you add, it will take the total number of cities times as long to finish.)</p>
<p><img alt="image" align="left" src="http://www.freakified.net/wp-content/uploads/2008/04/image3.png" width="166" height="166" />Luckily, there are a <a href="http://members.pcug.org.au/~dakin/tsp.htm" target="_blank">variety</a> of <a href="http://www.tsp.gatech.edu/methods/dfj/index.html" target="_blank">better</a> <a href="http://iris.gmu.edu/~khoffman/papers/trav_salesman.html" target="_blank">ways</a> to do this.&#160; However, instead of dwelling on these, let us move on to what is, ostensibly, the most important factor of all: the problem&#8217;s relevance to modern society.</p>
<p>Let&#8217;s face it: traveling salesmen are a thing of the past, like record players or 1972.&#160; Therefore, I propose re-writing the narrative of the problem to the <em>traveling terrorist problem</em>, in which the salesman, now a multi-national terrorist organization, must strive to destroy each city as quickly as possible, without revisiting any, in an effort to avoid the authorities.&#160; As the programmer, it&#8217;s your job to find out what route they will take BEFORE ITS TOO LATE.</p>
<p>Think about it: which would you rather be doing&#8211;helping some salesman peddle his low quality, probably counterfeit, goods, or FIGHTING EVIL BY PREDICTING ITS OPTIMAL ROUTE? </p>
<p>That&#8217;s what I thought. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.freakified.net/computer-science/the-traveling-salesman-problem/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
