<?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>oscarbonilla.com &#187; rants</title>
	<atom:link href="http://oscarbonilla.com/category/rants/feed/" rel="self" type="application/rss+xml" />
	<link>http://oscarbonilla.com</link>
	<description></description>
	<lastBuildDate>Thu, 15 Dec 2011 18:43:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>iPhone killer? Again?</title>
		<link>http://oscarbonilla.com/2010/05/iphone-killer-again/</link>
		<comments>http://oscarbonilla.com/2010/05/iphone-killer-again/#comments</comments>
		<pubDate>Mon, 24 May 2010 19:04:59 +0000</pubDate>
		<dc:creator>ob</dc:creator>
				<category><![CDATA[rants]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Palm]]></category>
		<category><![CDATA[Rant]]></category>

		<guid isPermaLink="false">http://oscarbonilla.com/?p=752</guid>
		<description><![CDATA[Here is a mistake that I&#8217;ve seen companies competing with the iPhone make more than once. Comparing the currently shipping version of the iPhone with their not-quite-shipping-yet phone. Palm did it. They put out a kick-ass product that would&#8217;ve blown the original iPhone out of the water or at least given it a run for [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a mistake that I&#8217;ve seen companies competing with the iPhone make more than once. Comparing the currently shipping version of the iPhone with their not-quite-shipping-yet phone.</p>
<p>Palm did it. They put out a kick-ass product that would&#8217;ve blown the original iPhone out of the water or at least given it a run for its money. Unfortunately they did it about a year and a half too late. The world had moved on and the reaction was &#8220;meh&#8221;. Then they ran out of money.</p>
<p>Google is doing it right now. They announced Froyo running on the Nexus One and it kicks the iPhone 3GS sorry little ass. Except the 3GS has been shipping for over a year. Do they think Apple has spent a year doing nothing? Of course not, we&#8217;ve seen the leaks of the new iPhone. The new iPhone will be based on the A4 CPU and my prediction is that it will be faster than the Nexus One.</p>
<p>If you want to compete with Apple, don&#8217;t copy last years products. Look AHEAD, to what&#8217;s coming.</p>
<p>P.S. I&#8217;m no longer reading any articles that have the phrase &#8220;iPhone Killer&#8221; in them (including this one ;)</p>
]]></content:encoded>
			<wfw:commentRss>http://oscarbonilla.com/2010/05/iphone-killer-again/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple Guide to Complexity Theory</title>
		<link>http://oscarbonilla.com/2008/11/simple-guide-to-complexity-theory/</link>
		<comments>http://oscarbonilla.com/2008/11/simple-guide-to-complexity-theory/#comments</comments>
		<pubDate>Wed, 26 Nov 2008 05:09:55 +0000</pubDate>
		<dc:creator>ob</dc:creator>
				<category><![CDATA[Math]]></category>
		<category><![CDATA[rants]]></category>

		<guid isPermaLink="false">http://blog.oscarbonilla.com/?p=76</guid>
		<description><![CDATA[After reading Jeff&#8217;s terribly misguided post about NP-completeness I thought to myself: &#8220;If Jeff, who seems to be completely clueless about complexity theory, can write a blog post about it then so can I.&#8221; So without further ado, here&#8217;s ob&#8217;s complex guide to simplifying complexity theory. First of all let&#8217;s get the definitions out of [...]]]></description>
			<content:encoded><![CDATA[<p>After reading <a href="http://www.codinghorror.com/blog/archives/001187.html">Jeff&#8217;s terribly misguided post about NP-completeness</a> I thought to myself: &#8220;If Jeff, who seems to be completely clueless about complexity theory, can write a blog post about it then so can I.&#8221;</p>
<p>So without further ado, here&#8217;s ob&#8217;s complex guide to simplifying <a title="complexity theory" href="http://en.wikipedia.org/wiki/Computational_complexity_theory" target="_blank">complexity theory</a>.</p>
<p>First of all let&#8217;s get the definitions out of the way.</p>
<p><strong>Turing machine:</strong> An idealized computer, with infinite memor<span style="text-decoration: line-through;">y, <span style="text-decoration: line-through;">an infinitely fast cpu, and unlimited bandwidth</span></span>. It&#8217;s a mathematical model of computer so it can kick your Core 2 Duo&#8217;s sorry little ass faster than you can say <em>Pentium</em>. <em>(</em><strong><em>update:</em></strong><em> I originally wanted to make the point that bandwidth and cpu speed are irrelevant, but it seems to have confused more than clarified.)</em></p>
<p><strong>Problem:</strong> In complexity theory, a problem is really a decision problem. It has a simple yes/no answer. <span style="text-decoration: line-through;">You don&#8217;t ask &#8220;take this list and sort it and print the last ten items&#8221; that&#8217;s not a decision problem. You do ask &#8220;does this program, given this input, produce the last ten items of the sorted input?&#8221;.</span></p>
<p><em>(<strong>update:</strong> Although the sort problem as outlined here would be a valid decision problem, it is confusing since just changing my &#8220;last ten items&#8221; to &#8220;last C items&#8221; where C is a function of n would make it not be a decision problem. Better to use some other example, like &#8220;<a href="http://en.wikipedia.org/wiki/Primality_testing">is the number given prime?</a>&#8220;)</em></p>
<p><strong><em>n</em>:</strong> Size of the input for the turing machine. E.g. if your turing machine is sorting strings, like in the example above, <em>n</em> is the number of symbols that it takes as input.</p>
<p><strong>T(<em>n</em>):</strong> Number of steps (i.e. instructions) that a turing machine must execute to solve a problem with input of size <em>n</em>.</p>
<p><strong>Polynomial Time:</strong> When T(<em>n</em>) can be expressed as an equation of <em>n</em>, and possibly some constants, using only addition, subtraction, multiplication, and constant non-negative whole number exponents. E.g. n² is a polynomial while 2ⁿ is not.</p>
<p><strong>Non-deterministic turing machine:</strong> A turing machine that can, at every branch point, take all possible branches in parallel. We call this <em>guessing</em> the optimal answer because, since the turing machine takes all branches, it must take the optimal branch too. If any of the parallel turing machines finds an answer, the non-deterministic turing machine stops and gives that answer (this means that it&#8217;s ok for some branches to never end).</p>
<p>So take your already idealized computer from above and make it able to reproduce itself on every branch point. I.e. it can follow all possible decisions in parallel.</p>
<p><strong>P:</strong> The class of problems that can be solved by a turing machine in polynomial time.</p>
<p><strong>NP:</strong> The class of problems that can be solved by a non-deterministic turing machine in polynomial time.</p>
<p><strong>Reducing a problem to another:</strong> Imagine you have two problems, <em>P1</em> and <em>P2</em>. You know something about <em>P1</em> (e.g. that it belongs to <strong>NP</strong>). Now you want to prove some property of <em>P2</em>, for instance, that it belongs to <strong>NP</strong> as well.</p>
<p><span style="text-decoration: line-through;">One technique is to show that if we could solve </span><em><span style="text-decoration: line-through;">P2</span></em><span style="text-decoration: line-through;"> in polynomial time (i.e. </span><em><span style="text-decoration: line-through;">P2</span></em><span style="text-decoration: line-through;"> belongs to </span><strong><span style="text-decoration: line-through;">P</span></strong><span style="text-decoration: line-through;">), we could use that answer to solve </span><em><span style="text-decoration: line-through;">P1</span></em><span style="text-decoration: line-through;"> in polynomial time. This would mean that </span><em><span style="text-decoration: line-through;">P1</span></em><span style="text-decoration: line-through;"> belongs to </span><strong><span style="text-decoration: line-through;">P</span></strong><span style="text-decoration: line-through;"> which is a contradiction. This technique is called </span><em><span style="text-decoration: line-through;">reductio ad absurdum</span></em><span style="text-decoration: line-through;">.</span> <em>(<strong>update: </strong>I completely botched this and commenter Bibi correctly called me on it. Here&#8217;s an attempt to clarify a reduction: if you want to solve an instance of P2, you convert it to an instance of P1, and then solve P1 to get an answer. Thus, you&#8217;ve reduced P2 to P1. How&#8217;s that?)</em></p>
<p><strong>NP-complete:</strong> We say a problem is NP-complete if it satisfies two properties: 1) it belongs to <strong>NP</strong>, and 2) every other problem that belogs to <strong>NP</strong> can be reduced, in polynomial time, to it.</p>
<p>This means that if we come up with a solution for an NP-complete problem that runs in polynomial time in a deterministic turing machine (i.e. belongs to <strong>P</strong>), any other problem in <strong>NP</strong> can be solved in polynomial time by first reducing it (again, in polynomial time) to this problem, and using our solution. We would have proved that <strong>P = NP</strong> and we would have also won (pinky to corner of mouth) <a href="http://www.claymath.org/millennium/P_vs_NP/">one million dollars</a>.</p>
<p><strong>NP-hard:</strong> A problem <em>P1</em>, that is so hard, that even though we can prove number two above, we can&#8217;t prove number one. This means we know <em>P1</em> to be just as hard as anything in <strong>NP</strong> and possibly harder, but <em>we don&#8217;t know</em> if <em>P1</em> is in <strong>NP</strong> or not. <em>P1</em> is very likely to require exponential time.</p>
<p><strong><em>(update: <span style="font-weight: normal;">I stand by my definition of NP-hard. Although not being able to prove #1 is a sufficient condition, it is not necessary. All problems in P are in NP, and yet we call them P, not NP. Thus, even if all problems that are NP-complete are also NP-hard, it&#8217;s uninteresting to call an NP-complete problem NP-hard. The point of calling a problem NP-hard is that, it&#8217;s really hard! Even if it turned out that P = NP, an NP-hard problem might still be hard!)</span></em></strong></p>
<p>So there you have it, go impress your friends. I hear that &#8220;hey, baby! your love is NP-hard to get&#8221; is a very successful pickup line at pubs around M.I.T.</p>
]]></content:encoded>
			<wfw:commentRss>http://oscarbonilla.com/2008/11/simple-guide-to-complexity-theory/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>

