<?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/%e6%8b%9c%e5%8d%a0%e5%ba%ad%e5%b0%86%e5%86%9b%e9%97%ae%e9%a2%98/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: 拜占庭将军问题 (The Byzantine Generals Problem)</title>
		<link>http://zhiqiang.org/blog/science/computer-science/tcs-byzantine-failure-the-byzantine-generals-problem.html</link>
		<comments>http://zhiqiang.org/blog/science/computer-science/tcs-byzantine-failure-the-byzantine-generals-problem.html#comments</comments>
		<pubDate>Fri, 22 Sep 2006 05:08:45 +0000</pubDate>
		<dc:creator>zhiqiang</dc:creator>
				<category><![CDATA[计算机科学]]></category>
		<category><![CDATA[The Byzantine Generals Problem]]></category>
		<category><![CDATA[拜占庭将军问题]]></category>
		<category><![CDATA[理论计算机笔记]]></category>

		<guid isPermaLink="false">http://zhiqiang.org/blog/449.html</guid>
		<description><![CDATA[博客 » 计算机科学 » 理论计算机笔记 » 系列：理论计算机笔记 查看该系列所有文章 这个问题在Yao的理论计算机课上整整讨论了2节课。它是一个算法设计问题，也极具趣味性。下面是它的一些介绍和解决方案([1])。 拜占庭帝国就是5～15世纪的东罗马帝国，拜占庭即现在土耳其的伊斯坦布尔。我们可以想象，拜占庭军队有许多分支，驻扎在敌人城外，每一分支由各自的将军指...]]></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%e7%ac%94%e8%ae%b0'>理论计算机笔记</a>  » </p><div class="series"><span>系列：<b>理论计算机笔记</b></span><br/>
<a href="http://zhiqiang.org/blog/tag/%e7%90%86%e8%ae%ba%e8%ae%a1%e7%ae%97%e6%9c%ba%e7%ac%94%e8%ae%b0">查看该系列所有文章</a>
<div id='series'></div>
</div>  <p>这个问题在Yao的理论计算机课上整整讨论了2节课。它是一个算法设计问题，也极具趣味性。下面是它的一些介绍和解决方案([<a href="#ref" target="_blank">1</a>])。</p>
<p>拜占庭帝国就是5～15世纪的东罗马帝国，拜占庭即现在土耳其的伊斯坦布尔。我们可以想象，拜占庭军队有许多分支，驻扎在敌人城外，每一分支由各自的将军指挥。将军们只能靠通讯员进行通讯。在观察了敌人以后，忠诚的将军们必须制订一个统一的行动计划——进攻或者撤退。然而，这些将军中有叛徒，他们不希望忠诚的将军们能达成一致，因而影响统一行动计划的制订与传播。问题是：将军们必须有一个协议，使所有忠诚的将军们能够达成一致，而且少数几个叛徒不能使忠诚的将军们做出错误的计划——使有些将军进攻而另一些将军撤退了。</p>
<p>抽象出来，可以表述成：</p>
<blockquote><p><strong>拜占庭将军问题</strong>：设计一个协议，一个司令要送一个命令给他的n-1个副官，使得<br />
IC1. 所有忠诚的副官遵守同一个命令。<br />
IC2. 假如司令是忠诚的，则每一个忠诚的副官遵守他送出的该命令。</p>
<p>约定：忠诚的将军将遵守协议，而叛徒则可能破坏协议，尽可能的干绕其它人的判断。叛徒是匿名的。而且最后不需要确定谁是叛徒。</p></blockquote>
<p>注意司令也有可能是叛徒，所以IC2与IC1是不同的。</p>
<p>递归设计协议OM(n, m)为</p>
<blockquote><p>OM(n, 0):</p>
<ol>
<li>司令发送命令给所有副官。</li>
<li>副官按照接收到的命令行事。</li>
</ol>
<p>OM(n, m):</p>
<ol>
<li>司令发送命令给所有副官，设副官i收到命令vi。</li>
<li>分为独立的n-1轮：对每个副官i，将其视为司令，使用协议A(n-1, m-1)将vi发送到所有其它副官。</li>
<li>这样每个副官都收到n-1条信息，每个副官都按照出现次数更多的命令行事（如果进攻和撤退的命令一样多，则默认取撤退）。</li>
</ol>
</blockquote>
<p>递归证明</p>
<blockquote><p>引理：当n&gt;2m+k，n个将军中至多k个叛徒，协议A(n, m)满足IC2，即司令是忠诚的，每个忠诚的副官将会执行司令的命令。</p></blockquote>
<p>进而说明：</p>
<blockquote><p>当n&gt;3m时，n个将军，且至多m个叛徒，协议A(n, m)可以同时满足IC1和IC2。</p></blockquote>
<p>更深刻的结论：</p>
<blockquote><p>当n&lt;=3m时，n个将军中的m个叛徒可以让将军们无法达成一致，也就是满足IC1和IC2的协议不可能存在。</p></blockquote>
<p>参考：</p>
<ol id="ref">
<li><a href="http://dl.acm.org/citation.cfm?id=357176" target="_blank">The Byzantine Generals Problem</a>, the first paper involved</li>
<li>可信计算VII:拜占庭将军问题</li>
<li><a href="http://en.wikipedia.org/wiki/Byzantine_failure">Byzantine failure - Wikipedia, the free encyclopedia</a></li>
</ol>
<p>PS: 标题里TCS是<a href="http://en.wikipedia.org/wiki/Theoretical_computer_science" target="_blank">Theoretical Computer Science</a>(理论计算机科学)的缩写，这篇文章同属于<a href="http://zhiqiang.org/blog/science/computer-science/preliminary-computer-theory-preface.html">理论计算机介绍系列文章</a>，算作<a href="http://zhiqiang.org/blog/search.php?q=%E7%90%86%E8%AE%BA%E8%AE%A1%E7%AE%97%E6%9C%BA">理论计算机初步系列</a>文章的补充吧。</p>
<div><h4>相关文章</h4><ul><li><a href="http://zhiqiang.org/blog/science/the-perfect-number-of-shuffling-7-times.html">&quot;完美&quot;的洗牌次数 - 7次</a></li><li><a href="http://zhiqiang.org/blog/science/tcs-classroom-notes-the-best-dating-strategy.html">最佳约会策略</a></li><li><a href="http://zhiqiang.org/blog/science/computer-science/tcs-classroom-notes-database-storage-problems.html">TCS课堂笔记：数据库存储问题</a></li><li><a href="http://zhiqiang.org/blog/science/how-n-people-divide-a-cake-fairly.html">征集3个人分蛋糕的方法</a></li><li><a href="http://zhiqiang.org/blog/science/computer-science/boxes-problem-on-static-data-structure-problems.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/tcs-byzantine-failure-the-byzantine-generals-problem.html">&#38142;&#25509;</a> | <a href="http://zhiqiang.org/blog/science/computer-science/tcs-byzantine-failure-the-byzantine-generals-problem.html#comments">5 &#26465;&#35780;&#35770;</a></p>]]></content:encoded>
			<wfw:commentRss>http://zhiqiang.org/blog/science/computer-science/tcs-byzantine-failure-the-byzantine-generals-problem.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

