<?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难</title>
	<atom:link href="http://zhiqiang.org/blog/tag/np%e9%9a%be/feed" rel="self" type="application/rss+xml" />
	<link>http://zhiqiang.org/blog</link>
	<description>数学、金融、计算机</description>
	<lastBuildDate>Wed, 23 May 2012 08:37:55 +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>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，NP vs P，NP-complete，NP完全，NP难，复杂性理论 » 好久没有写我的理论计算机初步系列了，其实复杂性这一块，虽然平时经常遇到，但由于问题都过于本质和困难，想这方面问题的时间反而不多。Ko教授就跟我说也许NP verse P这个题并不难，只不过大家认为它很难，结果就没有多少人去做了，大家一遇到这个问题都远远得绕开。话虽如此，我还是不敢...]]></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" rel="tag">NP hard</a>，<a href="http://zhiqiang.org/blog/tag/np-vs-p" rel="tag">NP vs P</a>，<a href="http://zhiqiang.org/blog/tag/np-complete" rel="tag">NP-complete</a>，<a href="http://zhiqiang.org/blog/tag/np%e5%ae%8c%e5%85%a8" rel="tag">NP完全</a>，<a href="http://zhiqiang.org/blog/tag/np%e9%9a%be" rel="tag">NP难</a>，<a href="http://zhiqiang.org/blog/tag/%e5%a4%8d%e6%9d%82%e6%80%a7%e7%90%86%e8%ae%ba" rel="tag">复杂性理论</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 class='currentpost'><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/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>
	</channel>
</rss>

