<?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://www.eaglefantasy.com/archives/tag/%e7%a8%8b%e5%ba%8f/feed" rel="self" type="application/rss+xml" />
	<link>http://www.eaglefantasy.com</link>
	<description>细推物理须行乐 何用浮名绊此身</description>
	<lastBuildDate>Mon, 30 Jan 2012 13:21:16 +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://www.eaglefantasy.com/archives/1001</link>
		<comments>http://www.eaglefantasy.com/archives/1001#comments</comments>
		<pubDate>Wed, 09 Feb 2011 06:53:04 +0000</pubDate>
		<dc:creator>Eagle Fantasy</dc:creator>
				<category><![CDATA[Ideas]]></category>
		<category><![CDATA[程序]]></category>
		<category><![CDATA[计算机]]></category>
		<category><![CDATA[the matrix]]></category>
		<category><![CDATA[大脑]]></category>
		<category><![CDATA[实验]]></category>
		<category><![CDATA[思想]]></category>
		<category><![CDATA[梦]]></category>

		<guid isPermaLink="false">http://www.eaglefantasy.com/?p=1001</guid>
		<description><![CDATA[试着想象这样一个情景：在一个精妙设计的培养皿中，长着一个大脑，这个大脑并没有和其他肉体的器官相连，但是培养皿中的营养物质能够保证这个大脑仍然能完成它的生理功能。最关键的一点是，这个大脑的输入输出端并没有像普通的大脑那样接到了眼睛鼻子嘴什么的感受器官之上，而是靠一台超级计算机，精妙的控制着刺激神经元的电流。随着生物科学的发展，将来总会有一天弄清楚神经传递的电信号和我们平时的感觉之间的关系，因此，这台超级计算机完全有可能完全模拟了现实生活能给他的一切刺激。这样，培养皿中的大脑就也会以为自己接收到了视觉信号、听觉信号等等，现在的问题是：他有办法辨别自己是生活在现实中，还是生活在靠超级计算机给他输入信号的虚幻世界中吗？ 这个问题就是著名的“缸中之脑”思想实验，是哲学界的一个著名难题。其思想最早可以追溯到传说中的唯心主义者笛卡尔，他在《哲学第一沉思集》中第一次提出了类似的思想，之后就有无数的哲学家思考过这个问题。著名科幻电影《黑客帝国》（The Matrix）系列，就是在这个思想实验的影响下创作而成的，把这样一个深奥的哲学问题推向了平民大众... 仔细想想自认为活在现实中的我们和这个缸中之脑的区别。我们伸出自己的手朝自己的脸打一巴掌，马上脸和手就会感觉到痛感，并且还能听到一声清脆的响声~。但是，我们的超级计算机拥有强大的计算能力，它通过你对控制手的那条神经发出的电信号，计算出来了你的手在任何一个时刻的位置，所以计算出来了你的手什么时候会碰到脸，在这一瞬间给你的脸和手发出一个表示痛感的信号，同时也发出一个pia的一声的听觉信号，至此，缸中之脑也感觉到了和我们同样地一个过程。事实上，这个问题的结论是： 你没有任何办法辨别自己是在现实中，还是只是个缸中之脑！（只要那台超级计算机给你的刺激是符合我们日常感受的。） 其实，这个问题实际上就是上一篇文章《如何辨别自己在现实还是梦中》的加强版。在做梦时，我们的大脑同缸中之脑一样，也是切断了真实的输入与输出。只不过在做梦时，大脑直接在脑中构建起了一幅幅场景，创造出了一个个情节，而不需要外界超级计算机的输入输出。 那为什么我们可以区分梦境，却不可以辨别出自己是否为缸中之脑？其实这主要还是源于梦这个东西不够完善。我们在《如何辨别自己在现实还是梦中》中提供的三种辨别梦境的方法，都属于利用了梦的bug...之所以能通过回忆怎么来到那个场景的来辨别梦境，是因为梦是突然开始的，我们大脑本身不会完整的设计出来前因后果；但是和缸中之脑连接的超级计算机就能实现让你连续地生活在一个一个的场景中，不会有突然的变化。之所以能通过GRE红宝书和唐诗宋词集来辨别梦境，是因为我们大脑本身的本领有限，有些东西只能欣赏不能创作；但是超级计算机里面可以存储各种什么单词啦诗词啦，让你的各种方法失效。所以，只要计算机足够强大，能够模拟生活的每一个细节，缸中之脑就完全无法辨别了。 这就对我们的世界观提出了挑战：别觉得你是生活在现实中的~！ 进一步往下想，我们还可以想象更深一步的虚拟世界：连你的大脑都不是什么真实存在的，我们的整个宇宙都是一台超级计算机模拟出来的！它模拟了从夸克到黑洞的整个宇宙，包括我们大脑的思考过程涉及到的量子过程，全部都是有计算机给算出来的。我们不再是一个个实体的人，而只是庞大程序中的一个个数据集合。我们能说自己的宇宙一定是“真实的”吗？还是不能！只要这台计算机模拟用的那一套物理定律是完备的并且无矛盾的，那我们就没有任何办法辨别，甚至那台计算机所在的那个“真实的”世界的物理定律和我们的完全不同都有可能！我们渺小的人类竭尽自己的思考去试图解读上帝的神谕（也就是物理定律），但实际上也可能只是程序中的一行行数据在猜测源代码大概是什么样子。。。那么，还有所谓的“真实世界”存在吗？我无法回答。 最后来看一个很有意思的漫画吧，《石客帝国》（A Bunch of Rocks），转自科学松鼠会，原版在xkcd。<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">我猜您也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F158&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F1001">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">量子计算机探幽</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F102&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F1001">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">The Halting Problem停机问题</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F744&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F1001">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">佛说…</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F999&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F1001">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">如何辨别自己在现实还是梦中</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F1157&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F1001">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">我的宇宙观</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>试着想象这样一个情景：在一个精妙设计的培养皿中，长着一个大脑，这个大脑并没有和其他肉体的器官相连，但是培养皿中的营养物质能够保证这个大脑仍然能完成它的生理功能。最关键的一点是，这个大脑的输入输出端并没有像普通的大脑那样接到了眼睛鼻子嘴什么的感受器官之上，而是靠一台超级计算机，精妙的控制着刺激神经元的电流。随着生物科学的发展，将来总会有一天弄清楚神经传递的电信号和我们平时的感觉之间的关系，因此，这台超级计算机完全有可能完全模拟了现实生活能给他的一切刺激。这样，培养皿中的大脑就也会以为自己接收到了视觉信号、听觉信号等等，现在的问题是：他有办法辨别自己是生活在现实中，还是生活在靠超级计算机给他输入信号的虚幻世界中吗？</p>
<p>这个问题就是著名的“缸中之脑”思想实验，是哲学界的一个著名难题。其思想最早可以追溯到传说中的唯心主义者笛卡尔，他在《哲学第一沉思集》中第一次提出了类似的思想，之后就有无数的哲学家思考过这个问题。著名科幻电影《黑客帝国》（The Matrix）系列，就是在这个思想实验的影响下创作而成的，把这样一个深奥的哲学问题推向了平民大众...</p>
<p>仔细想想自认为活在现实中的我们和这个缸中之脑的区别。我们伸出自己的手朝自己的脸打一巴掌，马上脸和手就会感觉到痛感，并且还能听到一声清脆的响声~。但是，我们的超级计算机拥有强大的计算能力，它通过你对控制手的那条神经发出的电信号，计算出来了你的手在任何一个时刻的位置，所以计算出来了你的手什么时候会碰到脸，在这一瞬间给你的脸和手发出一个表示痛感的信号，同时也发出一个pia的一声的听觉信号，至此，缸中之脑也感觉到了和我们同样地一个过程。事实上，这个问题的结论是：</p>
<p><strong>你没有任何办法辨别自己是在现实中，还是只是个缸中之脑！</strong>（只要那台超级计算机给你的刺激是符合我们日常感受的。）</p>
<p><span id="more-1001"></span>其实，这个问题实际上就是上一篇文章<a title="如何辨别自己在现实还是梦中" href="http://www.eaglefantasy.com/archives/999" target="_blank">《如何辨别自己在现实还是梦中》</a>的加强版。在做梦时，我们的大脑同缸中之脑一样，也是切断了真实的输入与输出。只不过在做梦时，大脑直接在脑中构建起了一幅幅场景，创造出了一个个情节，而不需要外界超级计算机的输入输出。</p>
<p>那为什么我们可以区分梦境，却不可以辨别出自己是否为缸中之脑？其实这主要还是源于梦这个东西不够完善。我们在<a title="如何辨别自己在现实还是梦中" href="http://www.eaglefantasy.com/archives/999" target="_blank">《如何辨别自己在现实还是梦中》</a>中提供的三种辨别梦境的方法，都属于利用了梦的bug...之所以能通过回忆怎么来到那个场景的来辨别梦境，是因为梦是突然开始的，我们大脑本身不会完整的设计出来前因后果；但是和缸中之脑连接的超级计算机就能实现让你连续地生活在一个一个的场景中，不会有突然的变化。之所以能通过GRE红宝书和唐诗宋词集来辨别梦境，是因为我们大脑本身的本领有限，有些东西只能欣赏不能创作；但是超级计算机里面可以存储各种什么单词啦诗词啦，让你的各种方法失效。所以，只要计算机足够强大，能够模拟生活的每一个细节，缸中之脑就完全无法辨别了。</p>
<p>这就对我们的世界观提出了挑战：别觉得你是生活在现实中的~！</p>
<p>进一步往下想，我们还可以想象更深一步的虚拟世界：连你的大脑都不是什么真实存在的，我们的整个宇宙都是一台超级计算机模拟出来的！它模拟了从夸克到黑洞的整个宇宙，包括我们大脑的思考过程涉及到的量子过程，全部都是有计算机给算出来的。我们不再是一个个实体的人，而只是庞大程序中的一个个数据集合。我们能说自己的宇宙一定是“真实的”吗？还是不能！只要这台计算机模拟用的那一套物理定律是完备的并且无矛盾的，那我们就没有任何办法辨别，甚至那台计算机所在的那个“真实的”世界的物理定律和我们的完全不同都有可能！我们渺小的人类竭尽自己的思考去试图解读上帝的神谕（也就是物理定律），但实际上也可能只是程序中的一行行数据在猜测源代码大概是什么样子。。。那么，还有所谓的“真实世界”存在吗？我无法回答。</p>
<p>最后来看一个很有意思的漫画吧，《石客帝国》（A Bunch of Rocks），转自<a title="石客帝国" href="http://songshuhui.net/archives/41066" target="_blank">科学松鼠会</a>，原版在<a title="A Bunch of Rocks" href="http://xkcd.com/505/" target="_blank">xkcd</a>。</p>
<p><a href="http://www.eaglefantasy.com/wp-content/uploads/a_bunch_of_rockschi_thumb.png"><img class="alignnone size-full wp-image-1329" title="a_bunch_of_rockschi_thumb" src="http://www.eaglefantasy.com/wp-content/uploads/a_bunch_of_rockschi_thumb.png" alt="" width="679" height="1607" /></a></p>
<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">我猜您也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F158&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F1001">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">量子计算机探幽</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F102&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F1001">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">The Halting Problem停机问题</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F744&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F1001">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">佛说…</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F999&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F1001">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">如何辨别自己在现实还是梦中</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F1157&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F1001">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">我的宇宙观</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://www.eaglefantasy.com/archives/1001/feed</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>佛说…</title>
		<link>http://www.eaglefantasy.com/archives/744</link>
		<comments>http://www.eaglefantasy.com/archives/744#comments</comments>
		<pubDate>Sat, 20 Mar 2010 02:39:28 +0000</pubDate>
		<dc:creator>Eagle Fantasy</dc:creator>
				<category><![CDATA[Ideas]]></category>
		<category><![CDATA[程序]]></category>
		<category><![CDATA[计算机]]></category>
		<category><![CDATA[搞笑]]></category>
		<category><![CDATA[佛]]></category>

		<guid isPermaLink="false">http://www.eaglefantasy.com/?p=744</guid>
		<description><![CDATA[/*本文为刘冰雁原创~~现有了专门的页面http://taskmobile1.appspot.com/ */ 人问“程序有佛性么？”…………大师说“你没看到所有的NULL都是0么？” 程序员说“程序的改进什么时候是终点？”大师说“也许运行就是终点，也许死亡才是终点。就如现在是禅，千年之后也是禅……、” 大师说：“编译器是通人性的，你如果顺着他，他就顺着你，你如果逆着她胡来，他就给你造反。常常给他一些好的程序让他去编译，就如同经常给狗好的骨头。如果连好的骨头都吃不下，那你已经虐待他生病了，这就该让他休息，让他清心。” 佛说：“0个错不是全对，Compile Error 也不是失败” 佛说“你们不用讨论我存不存在，每当你编译运行时，那我就是存在的” 佛说“要平衡，如热二，如牛一…” 佛说“凝结，固化，升华…不变的是物质，损失的是负熵…” 人问佛当年的情事。佛说“我爱过，但没恋爱过” 佛说“我不需要别的祭祀，编译器是最好的祭坛…” 佛说“莫傲，一斑与全豹之间，有热二和混沌的巨壑” 佛说“莫去卧佛寺，卧佛即是我佛” 佛说“程序的美不在于执行，在于编写…因为执行，是禅的事情。” 人问“什么是云计算？”佛说“我的身形，云中最能显现。” 人问“什么是禅？”佛说“站在电容器的角度，一切都是电容。” 人问佛“你为什么能如此淡然？”佛说“咀嚼完了一生的数据，留给程序的便是寂静与寂寞” 佛说“我不求你们让我无处不在，只要让无线网络无处不在就可以了” 人问“天冷，您为何穿的还如此单薄？”佛说“维持一个危险的势，不如让其增加那么一点熵” 人问“C++和Python，哪个好用？”佛说“大地是一切的基础，然而一旦在云中，蟒就会化为龙” 人问佛“你哭过么？”佛说“当我看到我当年写的第一个程序时，我哭了。输出的不是HelloWorld，而是一个名字…” 人问“那有什么办法翻译婴儿的哭声？”佛说“HelloWorld？” 佛说 佛说“上一条是不小心按的…手指头太大，这键盘不行…做佛就是麻烦…” 人问“你是不是很喜欢吃啊？”佛说“能充满整个禅的输入数据…才是真正的饕餮…” (未完待续~~)<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">我猜您也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F158&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F744">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">量子计算机探幽</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F811&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F744">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">xkcd上的一些搞笑geek漫画</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F102&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F744">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">The Halting Problem停机问题</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F1291&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F744">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">论邓文迪的战斗力</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F1001&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F744">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">如何辨别自己在现实还是虚拟世界</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>/*本文为刘冰雁原创~~现有了专门的页面<a href="http://taskmobile1.appspot.com/" target="_blank">http://taskmobile1.appspot.com/</a> */</p>
<p>人问“程序有佛性么？”…………大师说“你没看到所有的NULL都是0么？”</p>
<p>程序员说“程序的改进什么时候是终点？”大师说“也许运行就是终点，也许死亡才是终点。就如现在是禅，千年之后也是禅……、”</p>
<p>大师说：“编译器是通人性的，你如果顺着他，他就顺着你，你如果逆着她胡来，他就给你造反。常常给他一些好的程序让他去编译，就如同经常给狗好的骨头。如果连好的骨头都吃不下，那你已经虐待他生病了，这就该让他休息，让他清心。”</p>
<p>佛说：“0个错不是全对，Compile Error 也不是失败”</p>
<p>佛说“你们不用讨论我存不存在，每当你编译运行时，那我就是存在的”</p>
<p>佛说“要平衡，如热二，如牛一…”</p>
<p>佛说“凝结，固化，升华…不变的是物质，损失的是负熵…”</p>
<p>人问佛当年的情事。佛说“我爱过，但没恋爱过”</p>
<p>佛说“我不需要别的祭祀，编译器是最好的祭坛…”</p>
<p>佛说“莫傲，一斑与全豹之间，有热二和混沌的巨壑”</p>
<p>佛说“莫去卧佛寺，卧佛即是我佛”</p>
<p>佛说“程序的美不在于执行，在于编写…因为执行，是禅的事情。”</p>
<p><span id="more-744"></span>人问“什么是云计算？”佛说“我的身形，云中最能显现。”</p>
<p>人问“什么是禅？”佛说“站在电容器的角度，一切都是电容。”</p>
<p>人问佛“你为什么能如此淡然？”佛说“咀嚼完了一生的数据，留给程序的便是寂静与寂寞”</p>
<p>佛说“我不求你们让我无处不在，只要让无线网络无处不在就可以了”</p>
<p>人问“天冷，您为何穿的还如此单薄？”佛说“维持一个危险的势，不如让其增加那么一点熵”</p>
<p>人问“C++和Python，哪个好用？”佛说“大地是一切的基础，然而一旦在云中，蟒就会化为龙”</p>
<p>人问佛“你哭过么？”佛说“当我看到我当年写的第一个程序时，我哭了。输出的不是HelloWorld，而是一个名字…”</p>
<p>人问“那有什么办法翻译婴儿的哭声？”佛说“HelloWorld？”</p>
<p>佛说</p>
<p>佛说“上一条是不小心按的…手指头太大，这键盘不行…做佛就是麻烦…”</p>
<p>人问“你是不是很喜欢吃啊？”佛说“能充满整个禅的输入数据…才是真正的饕餮…”</p>
<p>(未完待续~~)</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">我猜您也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F158&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F744">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">量子计算机探幽</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F811&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F744">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">xkcd上的一些搞笑geek漫画</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F102&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F744">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">The Halting Problem停机问题</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F1291&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F744">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">论邓文迪的战斗力</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F1001&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F744">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">如何辨别自己在现实还是虚拟世界</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://www.eaglefantasy.com/archives/744/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>解魔方的小程序</title>
		<link>http://www.eaglefantasy.com/archives/581</link>
		<comments>http://www.eaglefantasy.com/archives/581#comments</comments>
		<pubDate>Fri, 11 Dec 2009 12:38:59 +0000</pubDate>
		<dc:creator>Eagle Fantasy</dc:creator>
				<category><![CDATA[My Life]]></category>
		<category><![CDATA[程序]]></category>
		<category><![CDATA[魔方]]></category>

		<guid isPermaLink="false">http://www.eaglefantasy.cn/?p=581</guid>
		<description><![CDATA[抱歉我好长时间不更新了 最近什么也没干 比较颓废.. 近期我们计算概论课有个小课题，我们几个人写了一个3D的解魔方的程序，挂在这里供大家下载吧。这里的算法就是最基本的初级算法，主要供初学者跟着学用的。最优解我也想过一段时间，基本没有思路所以就没写。如果有什么改进建议请留言告诉我～～谢谢～～ 下载链接（两个版本 速度稍有不同）： Setup(quick).exe Setup(slow).exe （Update:经检测，在Windows 7\Windows vista\Windows XP SP1 SP2下均可顺利运行，但是Windows XP SP3下会产生诡异的我们暂时无法解决的错误...这是个悲剧...） 下面是readme文件： /************************************************/ made by 刘冰雁 范翔 吴昊天 北京大学物理学院 /************************************************/ 用我们的软件可以用来还原你手上的一个魔方。 双击shabby cube.exe，在空白处右击开始。 选择create a new cube，可以产生一个空白的魔方，用户可以通过右击选择颜色的办法把手头上的一个魔方输入到我们的程序中。 选择create randomly，可以让程序随机的产生一个魔方。 在输入了一个魔方之后，单击左键可以让他开始按照我们的算法旋转。之后的任何一个时刻，你都可以通过单击左键让过程暂停/继续。 在输入了魔方之后的任何一个时刻，都可以按住中键不放晃动鼠标来转动观看角度。 缩放窗口可以调节速度。（这个功能可能在某些系统上不行...） 如果您输入了一个魔方之后魔方爆炸了，那说明您的魔方是错误的不可解的，请您检查一下您是否输入时点错了，或者直接把魔方拆掉在重新装起来...<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">我猜您也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F473&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F581">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">关于魔方的几个证明</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F158&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F581">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">量子计算机探幽</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F1001&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F581">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">如何辨别自己在现实还是虚拟世界</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F744&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F581">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">佛说…</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F102&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F581">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">The Halting Problem停机问题</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>抱歉我好长时间不更新了 最近什么也没干 比较颓废..<br />
近期我们计算概论课有个小课题，我们几个人写了一个3D的解魔方的程序，挂在这里供大家下载吧。这里的算法就是最基本的初级算法，主要供初学者跟着学用的。最优解我也想过一段时间，基本没有思路所以就没写。如果有什么改进建议请留言告诉我～～谢谢～～<br />
下载链接（两个版本 速度稍有不同）：</p>
<p><a href="/wp-content/uploads/Setup(quick).exe" target="_blank">Setup(quick).exe</a></p>
<p><a href="/wp-content/uploads/Setup(slow).exe" target="_blank">Setup(slow).exe</a></p>
<p><span style="color: #ff0000;">（Update:经检测，在Windows 7\Windows vista\Windows XP SP1 SP2下均可顺利运行，但是Windows XP SP3下会产生诡异的我们暂时无法解决的错误...这是个悲剧...）</span></p>
<p>下面是readme文件：<br />
/************************************************/<br />
made by 刘冰雁 范翔 吴昊天 北京大学物理学院<br />
/************************************************/<br />
用我们的软件可以用来还原你手上的一个魔方。<br />
双击shabby cube.exe，在空白处右击开始。<br />
选择create a new cube，可以产生一个空白的魔方，用户可以通过右击选择颜色的办法把手头上的一个魔方输入到我们的程序中。<br />
选择create randomly，可以让程序随机的产生一个魔方。<br />
在输入了一个魔方之后，单击左键可以让他开始按照我们的算法旋转。之后的任何一个时刻，你都可以通过单击左键让过程暂停/继续。<br />
在输入了魔方之后的任何一个时刻，都可以按住中键不放晃动鼠标来转动观看角度。<br />
缩放窗口可以调节速度。（这个功能可能在某些系统上不行...）<br />
如果您输入了一个魔方之后魔方爆炸了，那说明您的魔方是错误的不可解的，请您检查一下您是否输入时点错了，或者直接把魔方拆掉在重新装起来...</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">我猜您也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F473&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F581">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">关于魔方的几个证明</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F158&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F581">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">量子计算机探幽</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F1001&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F581">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">如何辨别自己在现实还是虚拟世界</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F744&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F581">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">佛说…</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F102&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F581">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">The Halting Problem停机问题</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://www.eaglefantasy.com/archives/581/feed</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>拈游戏</title>
		<link>http://www.eaglefantasy.com/archives/547</link>
		<comments>http://www.eaglefantasy.com/archives/547#comments</comments>
		<pubDate>Wed, 21 Oct 2009 11:46:33 +0000</pubDate>
		<dc:creator>Eagle Fantasy</dc:creator>
				<category><![CDATA[Interesting Maths]]></category>
		<category><![CDATA[程序]]></category>
		<category><![CDATA[趣题]]></category>
		<category><![CDATA[游戏]]></category>

		<guid isPermaLink="false">http://www.eaglefantasy.cn/?p=547</guid>
		<description><![CDATA[所谓拈游戏的规则是这样的：（在看了沙发的评论之后我才知道其标准名字应该是Nim游戏...） 桌面上有三行硬币，每一行中分别有a1、a2、a3个硬币，其中a1、a2、a3是可以任意指定的正整数。两个人轮流拿走硬币，每一次只能从某一行中拿走任意多个硬币，谁拿走最后一枚硬币谁就赢了。 比如说a1=1,a2=2,a3=3的情况吧，这时如果轮到我拿了，我可以从第三行拿走2枚硬币，或者可以把第三行的三枚硬币全都拿走，等等；但是我不能同时从第一行和第三行里各拿走1枚硬币。这个简单的情况，可以枚举所有可能性得出结论：先拿的必输。 当a1、a2、a3是任意给定的，在什么情况下先拿的必输呢？必胜策略是怎样的呢？这是一个相当有意思的问题，答案可绝不是显而易见一目了然的。而当我当年看到这个策略长什么模样之后，完全的叹服了。今天我就先不写必胜策略了，大家可以先自己想想，如果下周或者什么时候有时间了再来写。前一阵子我为了熟悉C++自己写了一个拈游戏的人机对弈程序，大家可以点击下面的链接下载。其中包含了必胜策略，所以只要你一步走错就一定会输。 拈游戏.rar 其实拈游戏不仅仅局限于三行硬币，其实最初的问题是N行的，而且神奇的是其必胜策略对于任何N都是一样的。其实这个拈游戏是我上小学的时候奥数老师跟我玩的游戏，最近才发现这个经典的有意思的游戏还有好多人没有玩过，故写此文...<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">我猜您也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F563&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F547">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">Nim游戏的必胜策略和Xor运算的神奇应用</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F196&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F547">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">几道有意思的小数学题</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F191&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F547">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">趣题：空间四边形外切于给定球，求证四切点共面</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F445&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F547">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">趣题：求两圆柱相交部分的体积</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F197&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F547">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">两个好玩的数学游戏</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>所谓拈游戏的规则是这样的：（在看了沙发的评论之后我才知道其标准名字应该是Nim游戏...）</p>
<p>桌面上有三行硬币，每一行中分别有a1、a2、a3个硬币，其中a1、a2、a3是可以任意指定的正整数。两个人轮流拿走硬币，每一次只能从某一行中拿走任意多个硬币，谁拿走最后一枚硬币谁就赢了。</p>
<p>比如说a1=1,a2=2,a3=3的情况吧，这时如果轮到我拿了，我可以从第三行拿走2枚硬币，或者可以把第三行的三枚硬币全都拿走，等等；但是我不能同时从第一行和第三行里各拿走1枚硬币。这个简单的情况，可以枚举所有可能性得出结论：先拿的必输。</p>
<p>当a1、a2、a3是任意给定的，在什么情况下先拿的必输呢？必胜策略是怎样的呢？这是一个相当有意思的问题，答案可绝不是显而易见一目了然的。而当我当年看到这个策略长什么模样之后，完全的叹服了。今天我就先不写必胜策略了，大家可以先自己想想，如果下周或者什么时候有时间了再来写。前一阵子我为了熟悉C++自己写了一个拈游戏的人机对弈程序，大家可以点击下面的链接下载。其中包含了必胜策略，所以只要你一步走错就一定会输。</p>
<p><a href="/wp-content/files/game1.rar" target="_blank">拈游戏.rar</a></p>
<p>其实拈游戏不仅仅局限于三行硬币，其实最初的问题是N行的，而且神奇的是其必胜策略对于任何N都是一样的。其实这个拈游戏是我上小学的时候奥数老师跟我玩的游戏，最近才发现这个经典的有意思的游戏还有好多人没有玩过，故写此文...</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">我猜您也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F563&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F547">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">Nim游戏的必胜策略和Xor运算的神奇应用</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F196&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F547">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">几道有意思的小数学题</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F191&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F547">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">趣题：空间四边形外切于给定球，求证四切点共面</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F445&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F547">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">趣题：求两圆柱相交部分的体积</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F197&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F547">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">两个好玩的数学游戏</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://www.eaglefantasy.com/archives/547/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>量子计算机探幽</title>
		<link>http://www.eaglefantasy.com/archives/158</link>
		<comments>http://www.eaglefantasy.com/archives/158#comments</comments>
		<pubDate>Thu, 01 May 2008 12:42:26 +0000</pubDate>
		<dc:creator>Eagle Fantasy</dc:creator>
				<category><![CDATA[Magical Physics]]></category>
		<category><![CDATA[程序]]></category>
		<category><![CDATA[量子]]></category>
		<category><![CDATA[量子计算机]]></category>
		<category><![CDATA[计算]]></category>
		<category><![CDATA[计算机]]></category>

		<guid isPermaLink="false">http://www.eaglefantasy.cn/?p=158</guid>
		<description><![CDATA[量子计算机是一个令人神往的东西，虽然目前还没有实际制成量子计算机，但是他却成了我一直翘首以待的产品。量子计算机可以算是不同于我们现在的普通计算机的下一代计算机，它可以解决许多传统计算机没法有效解决的问题。 量子计算的概念，最早是由费恩曼提出的，从那以后计算机科学家们已经在这个领域里有了不小的进展。量子计算机是一类遵循量子力学规律进行高速数学和逻辑运算、存储及处理量子信息的物理装置。量子计算机的基本特征之一，就是它使用的信息单元不是比特，而是量子比特（qubit）。量子比特可以是电子那样的粒子。可以让自旋向上代表1，自旋向下代表0。与传统计算机不同的是，电子可以处于自旋向上和向下的叠加态，即1和0的叠加态。处于叠加态的少量粒子可以携带大量信息。假如我们可以控制仅仅1000个量子比特，那我们也可以用之表示出从1到2^1000的所有数字，并且可以同时对所有数字进行操作，也就是所谓的并行计算。虽然当我们最终读取量子状态时，只能从2^1000个状态中随机的读取其中的一个，而其他的状态都会消失，但是我们可以通过对粒子进行巧妙的处理，用量子计算机求解一些普通计算机没法有效求解的问题，例如对大数分解质因数。用现有的计算机需要花10亿年才能算出来的题，可能用量子计算机花不到一年的就能成功解决。 正是因为用量子计算机可以非常有效的解决对大数分解质因数的问题，现在的密码安全将在不久的将来量子计算机问世的时候轰然瓦解。现在最常用的加密方法当属RSA公钥算法，这个算法就是基于“把两个大质数相乘极为简单，但是要把这个乘积分解为这两个大质数则几乎无法做到”这一事实，具体的算法可以参见《算法导论》有关章节。有了量子计算机的话，我们就不得不重新设计一种量子计算机也无法完成的运算了。 很多人对量子计算机有所误解，认为它可以解决一切困难的数学问题。事实不是如此，量子计算机能解决的问题，也仅仅是一小部分特殊问题。计算机科学家已经证明了，传统计算机能够有效解决的所有问题，用量子计算机同样能够有效解决。但是，对于计算机科学领域里的一类非常重要的问题——NPC问题，量子计算机和普通计算机一样是无能为力的。生活和生产中有很多极为重要的问题不幸属于NPC类。虽然我们还没有真正证明量子计算机不能胜任，正如我们还无法证明P到底等不等于NP一样，但是无数失败的尝试表明，量子计算机在这类问题上比普通计算机好不到哪里去。（如果你第一次听说P、NP、NPC，那么我建议你看一看Matrix67的这篇文章，那里有比较详细系统的介绍。简单来说：P是多项式级时间复杂度能找到解的问题，即所说的普通计算机能够“有效解决”的问题；NP是多项式时间复杂度内可以验证解的正确性的问题，但不一定能在多项式级时间复杂度内找到解；所有的NP问题都可以归约到NPC问题，即一旦解决了一个NPC问题则所有NP问题随之解决）。我们称量子计算机能够有效解决的问题为BQP类问题，这几类问题之间的关系如下图： 量子计算机似乎代表着人类计算能力的极限，除非有全新的物理定律在将来被发现。有趣的是，通过量子计算机不能有效解决NPC问题，有人甚至类比于超光速通讯不可能实现和热力学第二定律，说NPC问题无法有效解决是一条基本的不可逾越的物理定律！ 尽管量子计算机不像人们期盼的那样属于万能计算机，尽管他也有很多力不从心的时候，但量子计算机依然是一个很有前途的研究方向。用量子计算机，我们可以击毁敌国的安全系统，可以模拟量子物理系统，可以为芯片的研究提供重要价值，可以更深刻的理解量子理论，或许还有很多我们未曾期待的应用（正如当时建造第一个计算机时没人想得到现在繁荣的信息化社会）…… 实际在建造量子计算机的过程中，遇到的困难是难以想象的。甚至曾经有很多人以为这是不可能完成的事情。但是，经过无数科学家、工程师的努力，目前的进展还是可喜的。虽然目前还没有一台计算机算是严格意义上的量子计算机，但是，IBM公司2001年构建了可以操作7个量子比特的“量子计算机”，2008年D-Wave公司的首席技术官Geordie Rose在他的blog上宣布他们将展示一个具有16个qubit的量子计算机。道路是曲折的，但前途是光明的！ 真希望等我长大的时候，家家都有量子计算机，OIer们学的全都是量子算法。 主要参考资料：《Scientific American》March.2008：《The Limit Of Quantum Computer》<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">我猜您也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F121&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F158">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">希望大家参加LHC@HOME</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F99&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F158">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">关于意识</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F1001&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F158">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">如何辨别自己在现实还是虚拟世界</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F855&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F158">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">量子永生</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F102&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F158">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">The Halting Problem停机问题</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>量子计算机是一个令人神往的东西，虽然目前还没有实际制成量子计算机，但是他却成了我一直翘首以待的产品。量子计算机可以算是不同于我们现在的普通计算机的下一代计算机，它可以解决许多传统计算机没法有效解决的问题。</p>
<p>量子计算的概念，最早是由费恩曼提出的，从那以后计算机科学家们已经在这个领域里有了不小的进展。量子计算机是一类遵循量子力学规律进行高速数学和逻辑运算、存储及处理量子信息的物理装置。量子计算机的基本特征之一，就是它使用的信息单元不是比特，而是量子比特（qubit）。量子比特可以是电子那样的粒子。可以让自旋向上代表1，自旋向下代表0。与传统计算机不同的是，电子可以处于自旋向上和向下的叠加态，即1和0的叠加态。处于叠加态的少量粒子可以携带大量信息。假如我们可以控制仅仅1000个量子比特，那我们也可以用之表示出从1到2^1000的所有数字，并且可以同时对所有数字进行操作，也就是所谓的并行计算。虽然当我们最终读取量子状态时，只能从2^1000个状态中随机的读取其中的一个，而其他的状态都会消失，但是我们可以通过对粒子进行巧妙的处理，用量子计算机求解一些普通计算机没法有效求解的问题，例如对大数分解质因数。用现有的计算机需要花10亿年才能算出来的题，可能用量子计算机花不到一年的就能成功解决。<span id="more-158"></span></p>
<p>正是因为用量子计算机可以非常有效的解决对大数分解质因数的问题，现在的密码安全将在不久的将来量子计算机问世的时候轰然瓦解。现在最常用的加密方法当属RSA公钥算法，这个算法就是基于“把两个大质数相乘极为简单，但是要把这个乘积分解为这两个大质数则几乎无法做到”这一事实，具体的算法可以参见《算法导论》有关章节。有了量子计算机的话，我们就不得不重新设计一种量子计算机也无法完成的运算了。</p>
<p>很多人对量子计算机有所误解，认为它可以解决一切困难的数学问题。事实不是如此，量子计算机能解决的问题，也仅仅是一小部分特殊问题。计算机科学家已经证明了，传统计算机能够有效解决的所有问题，用量子计算机同样能够有效解决。但是，对于计算机科学领域里的一类非常重要的问题——NPC问题，量子计算机和普通计算机一样是无能为力的。生活和生产中有很多极为重要的问题不幸属于NPC类。虽然我们还没有真正证明量子计算机不能胜任，正如我们还无法证明P到底等不等于NP一样，但是无数失败的尝试表明，量子计算机在这类问题上比普通计算机好不到哪里去。（如果你第一次听说P、NP、NPC，那么我建议你看一看Matrix67的<a href="http://www.matrix67.com/blog/archives/105" target="_blank">这篇文章</a>，那里有比较详细系统的介绍。简单来说：P是多项式级时间复杂度能找到解的问题，即所说的普通计算机能够“有效解决”的问题；NP是多项式时间复杂度内可以验证解的正确性的问题，但不一定能在多项式级时间复杂度内找到解；所有的NP问题都可以归约到NPC问题，即一旦解决了一个NPC问题则所有NP问题随之解决）。我们称量子计算机能够有效解决的问题为BQP类问题，这几类问题之间的关系如下图：</p>
<p><img style="float: none;" src="http://www.eaglefantasy.com/images/bqp.JPG" alt="" /><br />
量子计算机似乎代表着人类计算能力的极限，除非有全新的物理定律在将来被发现。有趣的是，通过量子计算机不能有效解决NPC问题，有人甚至类比于超光速通讯不可能实现和热力学第二定律，说NPC问题无法有效解决是一条基本的不可逾越的物理定律！</p>
<p>尽管量子计算机不像人们期盼的那样属于万能计算机，尽管他也有很多力不从心的时候，但量子计算机依然是一个很有前途的研究方向。用量子计算机，我们可以击毁敌国的安全系统，可以模拟量子物理系统，可以为芯片的研究提供重要价值，可以更深刻的理解量子理论，或许还有很多我们未曾期待的应用（正如当时建造第一个计算机时没人想得到现在繁荣的信息化社会）……</p>
<p>实际在建造量子计算机的过程中，遇到的困难是难以想象的。甚至曾经有很多人以为这是不可能完成的事情。但是，经过无数科学家、工程师的努力，目前的进展还是可喜的。虽然目前还没有一台计算机算是严格意义上的量子计算机，但是，IBM公司2001年构建了可以操作7个量子比特的“量子计算机”，2008年D-Wave公司的首席技术官Geordie Rose在他的blog上宣布他们将展示一个具有16个qubit的量子计算机。道路是曲折的，但前途是光明的！</p>
<p>真希望等我长大的时候，家家都有量子计算机，OIer们学的全都是量子算法。</p>
<p><img src="http://www.eaglefantasy.com/images/quantumcomputer1.JPG" alt="" /></p>
<p><img src="http://www.eaglefantasy.com/images/quantumcomputer2.JPG" alt="" /></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span style="font-size: small;"><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman';">主要参考资料：《</span><span lang="EN-US"><span style="font-family: Times New Roman;">Scientific American</span></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman';">》</span><span lang="EN-US"><span style="font-family: Times New Roman;">March.2008</span></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman';">：《</span><span lang="EN-US"><span style="font-family: Times New Roman;">The Limit Of Quantum Computer</span></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman';">》</span></span></p>
<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">我猜您也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F121&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F158">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">希望大家参加LHC@HOME</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F99&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F158">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">关于意识</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F1001&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F158">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">如何辨别自己在现实还是虚拟世界</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F855&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F158">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">量子永生</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F102&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F158">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">The Halting Problem停机问题</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://www.eaglefantasy.com/archives/158/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>The Halting Problem停机问题</title>
		<link>http://www.eaglefantasy.com/archives/102</link>
		<comments>http://www.eaglefantasy.com/archives/102#comments</comments>
		<pubDate>Tue, 08 May 2007 17:50:06 +0000</pubDate>
		<dc:creator>Eagle Fantasy</dc:creator>
				<category><![CDATA[Interesting Maths]]></category>
		<category><![CDATA[程序]]></category>
		<category><![CDATA[计算机]]></category>
		<category><![CDATA[证明]]></category>

		<guid isPermaLink="false">http://eagle.cuitianyi.com/wordpress/?p=102</guid>
		<description><![CDATA[//我在《皇帝新脑》中看到这个问题，死活看不懂。。。可是自从看了matrix67的这个讲解，居然2分钟就恍然大悟，真是太强了！ The Halting Problem是问，输入一段程序代码和一个针对此程序的输入，能否编程判断运行这个程序后程序是否会终止。 这个问题的答案是否定的。也就是说，不可能有一种算法可以正确判断一个指定的程序运行后，给予指定的输入，程序最后出不出得来。换句话说，The Halting Problem是一个不可解问题。 虽然这感觉似乎不可能，但在严格的证明下谁也无法发言反对。 证明过程非常简单，假设The Halting Problem是有解的，并且已经用程序实现了，那么我们只需要再编写一个程序Program Bug，就会发现存在矛盾。 反证：既然解决The Halting Problem的算法已经实现了，那么我们一定能定义一个函数 Function Halting(a,b:input_type):boolean; 其中，a是读入的程序源码，b是输入数据。这个函数的功能就是返回对于指定的程序源码和输入数据，程序是否能顺利退出。 下面编写一个程序： Program Bug; var code:input_type; begin get(code); //读入code if halting(code,code) then repeat until false else halt; end. 好，现在运行Bug这个程序，并且输入Bug这个程序本身的代码。这样，halting(code,code)其实质就是在判断这个Bug程序本身了。如果The Halting Problem认为Bug程序会正常退出，那么就让程序进入一个死循环，否则立即退出程序。矛盾产生。<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">我猜您也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F158&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F102">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">量子计算机探幽</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F1001&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F102">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">如何辨别自己在现实还是虚拟世界</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F1466&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F102">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">盘点数学里十大不需要语言的证明</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F98&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F102">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">证明：三角形的质心是三条中线交点</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F201&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F102">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">棋盘覆盖问题</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>//我在《皇帝新脑》中看到这个问题，死活看不懂。。。可是自从看了matrix67的这个讲解，居然2分钟就恍然大悟，真是太强了！</p>
<p>The Halting Problem是问，输入一段程序代码和一个针对此程序的输入，能否编程判断运行这个程序后程序是否会终止。</p>
<p>这个问题的答案是否定的。也就是说，不可能有一种算法可以正确判断一个指定的程序运行后，给予指定的输入，程序最后出不出得来。换句话说，The Halting Problem是一个不可解问题。</p>
<p>虽然这感觉似乎不可能，但在严格的证明下谁也无法发言反对。</p>
<p>证明过程非常简单，假设The Halting Problem是有解的，并且已经用程序实现了，那么我们只需要再编写一个程序Program Bug，就会发现存在矛盾。<span id="more-102"></span></p>
<blockquote><p>反证：既然解决The Halting Problem的算法已经实现了，那么我们一定能定义一个函数<br />
Function Halting(a,b:input_type):boolean;</p>
<p>其中，a是读入的程序源码，b是输入数据。这个函数的功能就是返回对于指定的程序源码和输入数据，程序是否能顺利退出。</p>
<p>下面编写一个程序：</p>
<p><code>Program Bug;<br />
var code:input_type;<br />
begin<br />
get(code); //读入code<br />
if halting(code,code) then repeat until false<br />
else halt;<br />
end.</code></p>
<p>好，现在运行Bug这个程序，并且输入Bug这个程序本身的代码。这样，halting(code,code)其实质就是在判断这个Bug程序本身了。如果The Halting Problem认为Bug程序会正常退出，那么就让程序进入一个死循环，否则立即退出程序。矛盾产生。</p></blockquote>
<p style="margin:0;padding:0;height:1px;overflow:hidden;">
    <script type="text/javascript"><!--
        var wumiiSitePrefix = "http://www.eaglefantasy.com";
        var wumiiEnableCustomPos = false;
        var wumiiParams = "&#038;num=10&#038;mode=3&#038;displayInFeed=1&#038;version=1.0.5.5&#038;pf=WordPress3.3.1";
    //--></script><script type="text/javascript" src="http://widget.wumii.com/ext/relatedItemsWidget.htm"></script><a href="http://www.wumii.com/widget/relatedItems.htm" style="border:0;"><img src="http://static.wumii.com/images/pixel.png" alt="无觅相关文章插件，快速提升流量" style="border:0;padding:0;margin:0;" /></a></p>
<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">我猜您也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F158&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F102">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">量子计算机探幽</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F1001&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F102">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">如何辨别自己在现实还是虚拟世界</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F1466&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F102">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">盘点数学里十大不需要语言的证明</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F98&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F102">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">证明：三角形的质心是三条中线交点</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F201&from=http%3A%2F%2Fwww.eaglefantasy.com%2Farchives%2F102">
                        <font size="-1"  style="line-height: 1.65em; font-size: 12px !important;">棋盘覆盖问题</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://www.eaglefantasy.com/archives/102/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

