<?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>阅微堂 &#187; NP-complete</title>
	<atom:link href="http://zhiqiang.org/blog/tag/np-complete/feed" rel="self" type="application/rss+xml" />
	<link>http://zhiqiang.org/blog</link>
	<description>理工科背景的证券从业人员</description>
	<lastBuildDate>Sun, 05 Feb 2012 03:59:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>TCS：NP-hard</title>
		<link>http://zhiqiang.org/blog/science/computer-science/np-hard.html</link>
		<comments>http://zhiqiang.org/blog/science/computer-science/np-hard.html#comments</comments>
		<pubDate>Wed, 28 Nov 2007 15:32:05 +0000</pubDate>
		<dc:creator>zhiqiang</dc:creator>
				<category><![CDATA[计算机科学]]></category>
		<category><![CDATA[NP hard]]></category>
		<category><![CDATA[NP vs P]]></category>
		<category><![CDATA[NP-complete]]></category>
		<category><![CDATA[NP完全]]></category>
		<category><![CDATA[NP难]]></category>
		<category><![CDATA[复杂性理论]]></category>

		<guid isPermaLink="false">http://zhiqiang.org/blog/posts/np-hard.html</guid>
		<description><![CDATA[博客 » 计算机科学 » NP hard » 好久没有写我的理论计算机初步系列了，其实复杂性这一块，虽然平时经常遇到，但由于问题都过于本质和困难，想这方面问题的时间反而不多。Ko教授就跟我说也许NP verse P这个题并不难，只不过大家认为它很难，结果就没有多少人去做了，大家一遇到这个问题都远远得绕开。话虽如此，我还是不敢去碰的。 很多人一看到NP-hard，就从字面上理解...]]></description>
			<content:encoded><![CDATA[<p id="breadcrumb" class="breadcrumb"><a href="http://zhiqiang.org/blog/">博客</a> » <a href="http://zhiqiang.org/blog/category/science/computer-science">计算机科学</a> » <a href='http://zhiqiang.org/blog/tag/np-hard'>NP hard</a>  » </p><p style="font-size: 90%; color: #888">好久没有写我的<a href="http://zhiqiang.org/blog/science/computer-science/preliminary-computer-theory-preface.html" target="_blank">理论计算机初步系列</a>了，其实复杂性这一块，虽然平时经常遇到，但由于问题都过于本质和困难，想这方面问题的时间反而不多。Ko教授就跟我说也许<a href="http://zhiqiang.org/blog/science/computer-science/preliminary-computer-theory-p-vs-np-an-overview-of-the-problem.html" target="_blank">NP verse P</a>这个题并不难，只不过大家认为它很难，结果就没有多少人去做了，大家一遇到这个问题都远远得绕开。话虽如此，我还是不敢去碰的。</p>
<p>很多人一看到NP-hard，就从字面上理解成为比NP还难的问题。但如果这里的&#x201C;更难&#x201D;指得是解决问题所花费时间更长的话，这个论断是不正确的。从算法角度来看，NP-hard问题的确比NP难，但比NP还难（指花费时间更多）的问题却不见得是NP-hard的。</p>
<p>仔细检查NP-hard的定义：一个问题(语言)L是NP-Hard的，当且仅当3SAT问题可以在多项式时间规约到L，即存在一个可多项式时间计算函数f，使得<span class='MathJax_Preview'><img src='http://zhiqiang.org/blog/wp-content/plugins/latex/cache/tex_aa59c24b96493c18724674a6f3ed56a6.gif' style='vertical-align: middle; border: none; ' class='tex' alt="\phi\in 3SAT" /></span><script type='math/tex'>\phi\in 3SAT</script>当且仅当<span class='MathJax_Preview'><img src='http://zhiqiang.org/blog/wp-content/plugins/latex/cache/tex_5fac70eddb0fc7542567d210c8908c01.gif' style='vertical-align: middle; border: none; ' class='tex' alt="f(\phi)\in L" /></span><script type='math/tex'>f(\phi)\in L</script>。</p>
<p>注意NP-hard的概念只有在NP!=P的时候才有意义，因为在NP=P的时候，除了空集和全集语言外，所有问题都是NP-hard的。</p>
<p>但在NP!=P的时候，NP-hard问题的分布呈什么状态呢？</p>
<p>定理1：所有unary语言都不可能是NP-hard的(除非NP=P)。语言L是unary的，指L里的任一元素都是1<sup>n</sup>的形式。</p>
<p>根据此定理，如果我们能找到一个NP-hard的unary的undecidable问题，就证明NP=P了 <img src='http://zhiqiang.org/blog/wp-includes/images/smilies/smile.gif' alt=':)' class='wp-smiley' /> 。 </p>
<p>定理2：Turing机停机问题是NP-hard<sup>(by Dr. Sun)</sup>。</p>
<p>这个定理有点出人意料，但仔细想想也不难证明。而且这个问题不难转成unary的形式，可惜这个转化过程不是多项式时间的，所以转化过后就不一定是NP-hard的了。</p>
<p>思考1：NEXP里有问题不是NP-Hard吗？</p>
<p>思考2：为什么NP-complete用多项式时间规约，PSPACE-complete也用多项式时间归约，而不是多项式空间规约？</p>
<div><h4>相关文章</h4><ul><li><a href="http://zhiqiang.org/blog/science/computer-science/what-if-p-np.html">What if P = NP?</a></li><li><a href="http://zhiqiang.org/blog/science/computer-science/preliminary-computer-theory-p-vs-np-an-overview-of-the-problem.html">理论计算机初步：P vs NP - 问题概述</a></li><li><a href="http://zhiqiang.org/blog/science/computer-science/preliminary-computer-theory-p-vs-np-past-present-and-future.html">理论计算机初步：P vs NP - 历史，现状和未来</a></li><li><a href="http://zhiqiang.org/blog/science/quantum-history-uncertainty-principle.html">测不准原理还是不确定性原理 - 谈量子物理史话一</a></li><li><a href="http://zhiqiang.org/blog/science/computer-science/minesweeper-is-np-complete.html">扫雷是NP完全问题</a></li><li><a href="http://zhiqiang.org/blog/science/computer-science/most-windows-game-are-np-complete.html">Windows游戏中的NP完全问题</a></li><li><a href="http://zhiqiang.org/blog/science/computer-science/introduce-probabilistic-checkable-proof.html">PCP - Probabilistic Checkable Proof</a></li><li><a href="http://zhiqiang.org/blog/science/computer-science/database-query-is-np-hard.html">数据库查询是NP-Hard问题</a></li></ul></div>    <p></p>
    <hr noshade style="margin:0;height:1px" />
    <p>&copy; zhiqiang for <a href="http://zhiqiang.org/blog">阅微堂</a>, 2007. | <a href="http://zhiqiang.org/blog/science/computer-science/np-hard.html">&#38142;&#25509;</a> | <a href="http://zhiqiang.org/blog/science/computer-science/np-hard.html#comments">3 &#26465;&#35780;&#35770;</a></p>]]></content:encoded>
			<wfw:commentRss>http://zhiqiang.org/blog/science/computer-science/np-hard.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>What if P = NP?</title>
		<link>http://zhiqiang.org/blog/science/computer-science/what-if-p-np.html</link>
		<comments>http://zhiqiang.org/blog/science/computer-science/what-if-p-np.html#comments</comments>
		<pubDate>Fri, 23 Mar 2007 13:44:03 +0000</pubDate>
		<dc:creator>zhiqiang</dc:creator>
				<category><![CDATA[计算机科学]]></category>
		<category><![CDATA[NP-complete]]></category>
		<category><![CDATA[NP完全]]></category>
		<category><![CDATA[P vs NP]]></category>
		<category><![CDATA[PNP]]></category>

		<guid isPermaLink="false">http://zhiqiang.org/blog/545.html</guid>
		<description><![CDATA[博客 » 计算机科学 » NP完全 » Princeton的Sanjeev Arora和Boaz Barak最近写了一本计算复杂性方面的书：Complexity Theory: A Modern Approach，其初稿提供下载，并承诺出版后也会继续保留——要是所有作者都这么好心就好了。 下面这段摘自于第二章NP and NP completeness，写得很有趣。为什么多数人不同意P=NP呢？因为 “if (3SAT has a O(n^2)&#160;algorithm), then this would have consequences of the greatest magnitude. T...]]></description>
			<content:encoded><![CDATA[<p id="breadcrumb" class="breadcrumb"><a href="http://zhiqiang.org/blog/">博客</a> » <a href="http://zhiqiang.org/blog/category/science/computer-science">计算机科学</a> » <a href='http://zhiqiang.org/blog/tag/np%e5%ae%8c%e5%85%a8'>NP完全</a>  » </p><p>Princeton的<a href="http://www.cs.princeton.edu/%7Earora/">Sanjeev Arora</a>和<a href="http://www.boazbarak.org/">Boaz Barak</a>最近写了一本计算复杂性方面的书：<a href="http://www.cs.princeton.edu/theory/complexity/" target="_blank">Complexity Theory: A Modern Approach</a>，其初稿提供<a href="http://www.cs.princeton.edu/theory/complexity/" target="_blank">下载</a>，并承诺出版后也会继续保留——要是所有作者都这么好心就好了。</p>
<p>下面这段摘自于第二章<a href="http://www.cs.princeton.edu/theory/complexity/NPchap.pdf">NP and NP completeness</a>，写得很有趣。为什么多数人不同意P=NP呢？因为</p>
<blockquote><p>“if (3SAT has a O(n^2)&nbsp;algorithm), then this would have consequences of the greatest magnitude. That is to say, it would clearly indicate that, despite the unsolvability of the (Hilbert) Entscheidungsproblem, the mental effort of the mathematician in the case of the yes-or-no questions would be completely replaced by machines.... (this) seems to me, however, within the realm of possibility.”</p>
<p align="right">Kurt Godel in a letter to John von Neumann, 1956</p>
</blockquote>
<p>If P = NP — specifically, if an <a href="http://zhiqiang.org/blog/science/computer-science/preliminary-computer-theory-p-vs-np-an-overview-of-the-problem.html" target="_blank">NP-complete</a> problem like 3SAT had a very efficient algorithm running in say O(n^2) time — then the world would be mostly a Utopia. <font color="#ff0000"><strong>Mathematicians could be replaced by efficient theorem-discovering programs</strong></font> (a fact pointed out in Kurt Godel’s 1956 letter and discovered three decades later). In general for every search problem whose answer can be efficiently verified (or has a short certificate of correctness), we will be able to find the correct answer or the short certificate in polynomial time. AI software would be perfect since we could easily do exhaustive searches in a large tree of possibilities. Inventors and engineers would be greatly aided by software packages that can design the perfect part or gizmo for the job at hand. VLSI designers will be able to whip up optimum circuits, with minimum power requirements. Whenever a scientist has some experimental data, she would be able to automatically obtain the simplest theory (under any reasonable measure of simplicity we choose) that best explains these measurements; by the principle of Occam’s Razor the simplest explanation is likely to be the right one. Of course, in some cases it took scientists centuries to come up with the simplest theories explaining the known data. This approach can be used to solve also non-scientific problems: one could find the simplest theory that explains, say, the list of books from the New York Times’ bestseller list. (NB: All these applications will be a consequence of our study of the Polynomial Hierarchy in Chapter 5.) </p>
<p>Somewhat intriguingly, this Utopia would have <font color="#ff0000"><strong>no need for randomness</strong></font>. As we will later see, if P = NP then randomized algorithms would buy essentially no efficiency gains over deterministic algorithms; see Chapter 7. (Philosophers should ponder this one.) </p>
<p>This Utopia would also come at one price: there would be <font color="#ff0000"><strong>no privacy in the digital domain</strong></font>. Any encryption scheme would have a trivial decoding algorithm. There would be no digital cash, no SSL, RSA or PGP (see Chapter 10). We would just have to learn to get along better without these, folks. </p>
<p>This utopian world may seem ridiculous, but the fact that we can’t rule it out shows how little we know about computation. Taking the half-full cup point of view, it shows how many wonderful things are still waiting to be discovered.</p>
<p><a href="http://zhiqiang.org/blog/science/computer-science/preliminary-computer-theory-p-vs-np-an-overview-of-the-problem.html">P vs NP问题</a>的介绍见以前的文章<a href="http://zhiqiang.org/blog/science/computer-science/preliminary-computer-theory-p-vs-np-an-overview-of-the-problem.html">问题概述</a>和<a href="http://zhiqiang.org/blog/science/computer-science/preliminary-computer-theory-p-vs-np-past-present-and-future.html">历史，现状和未来</a>。</p>
<p>[tags]P vs NP, NP完全, NP-complete, P=NP[/tags]</p>
<div><h4>相关文章</h4><ul><li><a href="http://zhiqiang.org/blog/science/computer-science/np-hard.html">TCS：NP-hard</a></li><li><a href="http://zhiqiang.org/blog/science/computer-science/preliminary-computer-theory-p-vs-np-an-overview-of-the-problem.html">理论计算机初步：P vs NP - 问题概述</a></li><li><a href="http://zhiqiang.org/blog/science/computer-science/preliminary-computer-theory-p-vs-np-past-present-and-future.html">理论计算机初步：P vs NP - 历史，现状和未来</a></li></ul></div>    <p></p>
    <hr noshade style="margin:0;height:1px" />
    <p>&copy; zhiqiang for <a href="http://zhiqiang.org/blog">阅微堂</a>, 2007. | <a href="http://zhiqiang.org/blog/science/computer-science/what-if-p-np.html">&#38142;&#25509;</a> | <a href="http://zhiqiang.org/blog/science/computer-science/what-if-p-np.html#comments">3 &#26465;&#35780;&#35770;</a></p>]]></content:encoded>
			<wfw:commentRss>http://zhiqiang.org/blog/science/computer-science/what-if-p-np.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

