<?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; 理论计算机</title>
	<atom:link href="http://zhiqiang.org/blog/tag/%e7%90%86%e8%ae%ba%e8%ae%a1%e7%ae%97%e6%9c%ba/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>通讯复杂性简单介绍</title>
		<link>http://zhiqiang.org/blog/science/computer-science/introduction-communication-complexity.html</link>
		<comments>http://zhiqiang.org/blog/science/computer-science/introduction-communication-complexity.html#comments</comments>
		<pubDate>Wed, 17 Sep 2008 11:18:40 +0000</pubDate>
		<dc:creator>zhiqiang</dc:creator>
				<category><![CDATA[计算机科学]]></category>
		<category><![CDATA[理论计算机]]></category>
		<category><![CDATA[通讯复杂性]]></category>

		<guid isPermaLink="false">http://zhiqiang.org/blog/posts/introduction-communication-complexity.html</guid>
		<description><![CDATA[博客 » 计算机科学 » 理论计算机 » 英文是communication complexity，不知道该翻译成通信复杂性，还是通讯复杂性呢。这里先用通讯复杂性吧。这是一个理论计算机的子领域，在过去30年衍生了很多东西。它是我的研究的主要内容，这里简略介绍一下。 Communication Protocol 通讯协议 我们说一个通讯问题，是有两台机器Alice和Bob，它们需要计算某个函数 。但是Alice只知道输入，Bob只知...]]></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/%e7%90%86%e8%ae%ba%e8%ae%a1%e7%ae%97%e6%9c%ba'>理论计算机</a>  » </p><p>英文是communication complexity，不知道该翻译成通信复杂性，还是通讯复杂性呢。这里先用通讯复杂性吧。这是一个理论计算机的子领域，在过去30年衍生了很多东西。它是我的研究的主要内容，这里简略介绍一下。</p>
<h3>Communication Protocol 通讯协议</h3>
<p>我们说一个通讯问题，是有两台机器Alice和Bob，它们需要计算某个函数 <span class='MathJax_Preview'><img src='http://zhiqiang.org/blog/wp-content/plugins/latex/cache/tex_3baf1600ae50930a155f58ae172b51bd.gif' style='vertical-align: middle; border: none; ' class='tex' alt="f(x,y)" /></span><script type='math/tex'>f(x,y)</script>。但是Alice只知道输入<span class='MathJax_Preview'><img src='http://zhiqiang.org/blog/wp-content/plugins/latex/cache/tex_9dd4e461268c8034f5c8564e155c67a6.gif' style='vertical-align: middle; border: none; padding-bottom:2px;' class='tex' alt="x" /></span><script type='math/tex'>x</script>，Bob只知道<span class='MathJax_Preview'><img src='http://zhiqiang.org/blog/wp-content/plugins/latex/cache/tex_415290769594460e2e485922904f345d.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt="y" /></span><script type='math/tex'>y</script>。它们之间离得很远，需要通过光缆互相传递信息，把<span class='MathJax_Preview'><img src='http://zhiqiang.org/blog/wp-content/plugins/latex/cache/tex_3baf1600ae50930a155f58ae172b51bd.gif' style='vertical-align: middle; border: none; ' class='tex' alt="f(x,y)" /></span><script type='math/tex'>f(x,y)</script>计算出来。它们之间传递信息的过程称为通讯，一个有效的通讯过程称为一个协议。</p>
<p>举一个例子，比如两个数据中心，它们想知道它们的数据是否已经同步(指数据完全一样)，如果不一样的话就需要重新同步。它们之间该怎么通讯来确定这一点呢？这个问题就是通讯问题 EQ。在这个问题里，Alice和Bob分别拥有一个字符串<span class='MathJax_Preview'><img src='http://zhiqiang.org/blog/wp-content/plugins/latex/cache/tex_9dd4e461268c8034f5c8564e155c67a6.gif' style='vertical-align: middle; border: none; padding-bottom:2px;' class='tex' alt="x" /></span><script type='math/tex'>x</script>和<span class='MathJax_Preview'><img src='http://zhiqiang.org/blog/wp-content/plugins/latex/cache/tex_415290769594460e2e485922904f345d.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt="y" /></span><script type='math/tex'>y</script>，它们想计算<span class='MathJax_Preview'><img src='http://zhiqiang.org/blog/wp-content/plugins/latex/cache/tex_b654f9a25fd36bfda248a7f764011935.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt="x==y" /></span><script type='math/tex'>x==y</script>。</p>
<p>对于所有通讯问题，Alice可以通过发送它的所有输入<span class='MathJax_Preview'><img src='http://zhiqiang.org/blog/wp-content/plugins/latex/cache/tex_9dd4e461268c8034f5c8564e155c67a6.gif' style='vertical-align: middle; border: none; padding-bottom:2px;' class='tex' alt="x" /></span><script type='math/tex'>x</script>到Bob，然后Bob拥有全部输入，从而计算<span class='MathJax_Preview'><img src='http://zhiqiang.org/blog/wp-content/plugins/latex/cache/tex_3baf1600ae50930a155f58ae172b51bd.gif' style='vertical-align: middle; border: none; ' class='tex' alt="f(x,y)" /></span><script type='math/tex'>f(x,y)</script>。注意在通讯问题里面，我们只考虑通讯消耗，而不考虑本地的计算时间和空间消耗。我们能设计更好的通讯协议吗？</p>
<p>对于一个通讯问题，如果要求对于任何输入，输出结果完全精确，这种符合条件的协议称为确定型通讯协议。但在实际应用中，我们可以容忍一个足够小的出错概率。在某些时候这是有很大好处的。比如上面那个EQ通讯问题，在要求结果完全精确的情况下，Alice发送自己的<span class='MathJax_Preview'><img src='http://zhiqiang.org/blog/wp-content/plugins/latex/cache/tex_9dd4e461268c8034f5c8564e155c67a6.gif' style='vertical-align: middle; border: none; padding-bottom:2px;' class='tex' alt="x" /></span><script type='math/tex'>x</script>已经是一个最优方案了。但在实际应用中，我们有一个更简单的方法，那就是发送<a href="http://zhiqiang.org/blog/science/computer-science/preliminary-computer-theory-xiao-yun-wang-from-the-hash-function-to-crack-md5.html">hash函数</a>（比如MD5码），然后双方检验MD5码即可。<font color="#c0c0c0">当然某种意义上这个协议不够严格，更严格的应该是Alice随机选择一个合适长度的质数<span class='MathJax_Preview'><img src='http://zhiqiang.org/blog/wp-content/plugins/latex/cache/tex_83878c91171338902e0fe0fb97a8c47a.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt="p" /></span><script type='math/tex'>p</script>，然后发送<span class='MathJax_Preview'><img src='http://zhiqiang.org/blog/wp-content/plugins/latex/cache/tex_35d25b001f16c9f853d2fa6fc8bf3808.gif' style='vertical-align: middle; border: none; ' class='tex' alt="(p, x\mod p)" /></span><script type='math/tex'>(p, x\mod p)</script>。</font></p>
<h3>Communication Complexity 通讯复杂性</h3>
<p><a href="http://zhiqiang.org/blog/tag/复杂性理论">复杂性</a>的意思就是说一个问题不能以多快的速度解决。比如EQ的任何确定型通讯协议无法比发送所有输入做得更好，这说明EQ的复杂度为<span class='MathJax_Preview'><img src='http://zhiqiang.org/blog/wp-content/plugins/latex/cache/tex_7ba55e7c64a9405a0b39a1107e90ca94.gif' style='vertical-align: middle; border: none; ' class='tex' alt="O(n)" /></span><script type='math/tex'>O(n)</script>。类似于计算理论，人们发现证明一个复杂性比设计一个算法和协议更困难。</p>
<h3>量子通讯复杂性</h3>
<p>量子通讯和上面的经典通讯基本上是一样的，除了Alice和Bob是两台量子计算机，可以操纵量子比特，以及它们之间共享量子通道可以发送量子比特。我们希望能够尽可能少的发送量子比特就能解决问题。</p>
<p>就像在计算理论里，人们非常关系量子系统的引入能否大幅度提高计算的速度，人们也关心量子系统对于通讯的帮助。目前，人们发现对于partial函数(对于某些输入对<span class='MathJax_Preview'><img src='http://zhiqiang.org/blog/wp-content/plugins/latex/cache/tex_90cbc22edf225adf8a68974f51227f05.gif' style='vertical-align: middle; border: none; ' class='tex' alt="(x,y)" /></span><script type='math/tex'>(x,y)</script>，<span class='MathJax_Preview'><img src='http://zhiqiang.org/blog/wp-content/plugins/latex/cache/tex_3baf1600ae50930a155f58ae172b51bd.gif' style='vertical-align: middle; border: none; ' class='tex' alt="f(x,y)" /></span><script type='math/tex'>f(x,y)</script>可以没有定义的<span class='MathJax_Preview'><img src='http://zhiqiang.org/blog/wp-content/plugins/latex/cache/tex_8fa14cdd754f91cc6554c9e71929cce7.gif' style='vertical-align: middle; border: none; ' class='tex' alt="f" /></span><script type='math/tex'>f</script>称为partial函数)，量子系统可以指数级的缩减发送的比特数，但对于完全函数(对<span class='MathJax_Preview'><img src='http://zhiqiang.org/blog/wp-content/plugins/latex/cache/tex_913b0de2574fcf8ce0c5a025ec4c033b.gif' style='vertical-align: middle; border: none; ' class='tex' alt="\forall (x,y)" /></span><script type='math/tex'>\forall (x,y)</script>，<span class='MathJax_Preview'><img src='http://zhiqiang.org/blog/wp-content/plugins/latex/cache/tex_3baf1600ae50930a155f58ae172b51bd.gif' style='vertical-align: middle; border: none; ' class='tex' alt="f(x,y)" /></span><script type='math/tex'>f(x,y)</script>都有定义)，人们猜测量子系统是没有帮助的。</p>
<h3>通讯复杂性理论和信息论</h3>
<p>通讯复杂性理论和信息论是两个不同的领域。通讯复杂性通常研究如何发送尽可能少的比特得到计算结果，而信息论是研究通讯的过程(?)，比如如何纠错，如何利用量子纠缠等。现在的量子信息论发展非常火热，但和量子通讯复杂性是两个完全不同的概念。</p>
<h3>GT 一个更复杂的例子</h3>
<p>现在Alice和Bob分别拥有两个字符串<span class='MathJax_Preview'><img src='http://zhiqiang.org/blog/wp-content/plugins/latex/cache/tex_9dd4e461268c8034f5c8564e155c67a6.gif' style='vertical-align: middle; border: none; padding-bottom:2px;' class='tex' alt="x" /></span><script type='math/tex'>x</script>和<span class='MathJax_Preview'><img src='http://zhiqiang.org/blog/wp-content/plugins/latex/cache/tex_415290769594460e2e485922904f345d.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt="y" /></span><script type='math/tex'>y</script>，它们该如何确定谁的字符串更大(按字典序)呢？同样这里很低的错误概率是可以忍受的。</p>
<blockquote><p>思路：每次Alice和Bob先检查前一半输入是否相等（调用EQ的通讯协议），如果是，抛弃之；否则后一半可以抛弃；重复这个步骤即可。</p>
</blockquote>
<div><h4>相关文章</h4><ul><li><a href="http://zhiqiang.org/blog/science/computer-science/preliminary-computer-theory-algorithms-and-calculation-model.html">理论计算机初步：算法和计算模型</a></li></ul></div>    <p></p>
    <hr noshade style="margin:0;height:1px" />
    <p>&copy; zhiqiang for <a href="http://zhiqiang.org/blog">阅微堂</a>, 2008. | <a href="http://zhiqiang.org/blog/science/computer-science/introduction-communication-complexity.html">&#38142;&#25509;</a> | <a href="http://zhiqiang.org/blog/science/computer-science/introduction-communication-complexity.html#comments">8 &#26465;&#35780;&#35770;</a></p>]]></content:encoded>
			<wfw:commentRss>http://zhiqiang.org/blog/science/computer-science/introduction-communication-complexity.html/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>理论计算机初步：算法和计算模型</title>
		<link>http://zhiqiang.org/blog/science/computer-science/preliminary-computer-theory-algorithms-and-calculation-model.html</link>
		<comments>http://zhiqiang.org/blog/science/computer-science/preliminary-computer-theory-algorithms-and-calculation-model.html#comments</comments>
		<pubDate>Wed, 16 Aug 2006 01:27:26 +0000</pubDate>
		<dc:creator>zhiqiang</dc:creator>
				<category><![CDATA[计算机科学]]></category>
		<category><![CDATA[模型]]></category>
		<category><![CDATA[理论计算机]]></category>
		<category><![CDATA[算法]]></category>
		<category><![CDATA[算法模型初步]]></category>

		<guid isPermaLink="false">http://zhiqiang.org/blog/390.html</guid>
		<description><![CDATA[博客 » 计算机科学 » 算法 » 下面是wikipedia上算法的定义： 算法是指完成一个任务所需要的具体步骤和方法。也就是说给定初始状态或输入数据，经过计算机程序的有限次运算，能够得出所要求或期望的终止状态或输出数据。 算法常常含有重复的步骤和一些比较或逻辑判断。如果一个算法有缺陷，或不适合于某个问题，执行这个算法将不会解决这个问题。不同的算法可能用...]]></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/%e7%ae%97%e6%b3%95'>算法</a>  » </p><p dir="ltr">下面是wikipedia上<a href="http://zh.wikipedia.org/wiki/算法" target="_blank">算法的定义</a>：</p>
<blockquote dir="ltr" style="margin-right: 0px"><p>算法是指完成一个任务所需要的具体步骤和方法。也就是说给定初始状态或输入数据，经过<font color="#ff0000">计算机程序</font>的有限次运算，能够得出所要求或期望的终止状态或输出数据。</p>
<p>算法常常含有重复的步骤和一些比较或逻辑判断。如果一个算法有缺陷，或不适合于某个问题，执行这个算法将不会解决这个问题。不同的算法可能用不同的时间、空间或效率来完成同样的任务。一个算法的优劣可以用空间复杂度与时间复杂度来衡量。</p></blockquote>
<p dir="ltr" align="left">一个简单而且耳熟能详的算法的例子是求最大公约数的<strong>辗转相除法</strong>：给出两个数，要求出他们俩的最大公约数。在小学的时候，我们就知道这样做就行了：将大数除以小数，用所得余数替换大数，继续用这两个数中大者除以小者，用所得余数替换较大者，继续下去，直到所得余数为0，此时除数即为所求的最大公约数。下面是一个实例：(15, 21) = (15, 6) = (3, 6) = (3, 0) = 3。又如，要判断某个数是否为质数，只需枚举所有比它小的数，检验是否其约数即可。</p>
<p dir="ltr" align="left">算法是理论计算机的灵魂。几乎所有问题都围绕它而来。为了讨论算法的性质，在理论计算机中，算法已不限于只是上面定义中的计算机程序。或者说，这里计算机的含义被大大扩广了。</p>
<p dir="ltr" align="left">我们平时所说和所使用的计算机，基于图灵提出的<strong>确定型图灵机</strong>模型。它是最好理解的：给出固定的程式，模型按照程式和输入完全<font color="#ff0000">确定性</font>地运行。</p>
<p dir="ltr" align="left">但为了理解算法和这种确定型图灵机的能力，人们又发展了许多其它各式各样的图灵机模型。其中最为有名的是<strong>非确定型图灵机</strong>。这种计算模型，它在进行计算的时候，会自动选择最优路径进行计算。通俗地说，它<font color="#ff0000">有预测能力</font>。比如说，为了说明某个数是合数，非确定型图灵机会猜测一个数，恰好是其因子，从而证明了它不是质数。</p>
<p dir="ltr" align="left">确定型和非确定型图灵机的计算性能所引起的<strong>P vs NP</strong>问题，一直是理论计算机科学的核心问题，这点下面专文论述。</p>
<p dir="ltr" align="left">另一个引起广泛关注的计算机模型是<strong>量子计算机模型</strong>。与上面的非确定型图灵机只存在于人们的想象中不同，量子计算机在物理上是可以实现的。关于量子计算理论，以后也有单独的介绍性文章。</p>
<p dir="ltr" align="left">虽然上面的各种计算模型的效率可能不同，比如非确定性图灵机判定一个数是合数便要快得多，但是它们的计算能力是完全一样的。也就是在某个计算模型上面运行的算法，可以被其余模型模拟实现。</p>
<p dir="ltr" align="left">这些计算模型的计算能力是一样的，那是不是世界上所有问题都有算法呢？看上去这似乎是一个哲学问题，但答案早就有了，有些问题是不可能能通过算法求解的，连下面这个看上去很简单的问题都不行：给出一些分数（指12/23，18/9这样的），问是否可以从中选出若干个分数数（可以重复选取），使得按一定顺序排起来，其分母连起来和分子连起来恰好一样？</p>
<div><h4>相关文章</h4><ul><li><a href="http://zhiqiang.org/blog/science/computer-science/introduction-communication-complexity.html">通讯复杂性简单介绍</a></li><li><a href="http://zhiqiang.org/blog/science/computer-science/an-algorithm-face-interviews-question-test.html">一个算法面试题 &#038; 面试题库</a></li><li><a href="http://zhiqiang.org/blog/science/computer-science/graph-isomorphism-is-polynomial.html">图同构问题属于P？</a></li><li><a href="http://zhiqiang.org/blog/science/computer-science/programs-depend-on-date-struct-not-algorithm.html">编程的核心是数据结构，而不是算法</a></li><li><a href="http://zhiqiang.org/blog/science/computer-science/complexity-of-prime-sieve.html">素数筛法的复杂度</a></li><li><a href="http://zhiqiang.org/blog/science/computer-science/another-perfect-shuffle-algorithm.html">Perfect Shuffle的算法</a></li><li><a href="http://zhiqiang.org/blog/science/computer-science/median-algorithm-of-ordered-matrix.html">有序矩阵的中位数算法</a></li><li><a href="http://zhiqiang.org/blog/science/computer-science/download-encyclopedia-of-algorithm.html">算法百科全书 - Encyclopedia of Algorithms</a></li><li><a href="http://zhiqiang.org/blog/science/computer-science/inverse-square-root-algorithm-analysis.html">求平方根倒数的算法</a></li><li><a href="http://zhiqiang.org/blog/science/computer-science/max-drawdown-algorithm.html">最大回撤和最大短期回撤的线性算法</a></li></ul></div>    <p></p>
    <hr noshade style="margin:0;height:1px" />
    <p>&copy; zhiqiang for <a href="http://zhiqiang.org/blog">阅微堂</a>, 2006. | <a href="http://zhiqiang.org/blog/science/computer-science/preliminary-computer-theory-algorithms-and-calculation-model.html">&#38142;&#25509;</a> | <a href="http://zhiqiang.org/blog/science/computer-science/preliminary-computer-theory-algorithms-and-calculation-model.html#comments">15 &#26465;&#35780;&#35770;</a></p>]]></content:encoded>
			<wfw:commentRss>http://zhiqiang.org/blog/science/computer-science/preliminary-computer-theory-algorithms-and-calculation-model.html/feed</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
	</channel>
</rss>

