<?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/%e8%a7%a3%e6%b3%95/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/mathmatics-in-rubik-cube-and-algorithm.html</link>
		<comments>http://zhiqiang.org/blog/science/mathmatics-in-rubik-cube-and-algorithm.html#comments</comments>
		<pubDate>Wed, 26 Sep 2007 12:26:48 +0000</pubDate>
		<dc:creator>zhiqiang</dc:creator>
				<category><![CDATA[自然科学]]></category>
		<category><![CDATA[Rubik's Cube]]></category>
		<category><![CDATA[图论]]></category>
		<category><![CDATA[洗牌]]></category>
		<category><![CDATA[算法]]></category>
		<category><![CDATA[解法]]></category>
		<category><![CDATA[魔方]]></category>

		<guid isPermaLink="false">http://zhiqiang.org/blog/posts/mathmatics-in-rubik-cube-and-algorithm-2.html</guid>
		<description><![CDATA[博客 » 自然科学 » 算法 » 今天香港中文大学的Prof. Cai给我们上graph algorithm。第一节课上教我们玩魔方，先给每人发了一个。我喜欢这样的教学方法 。 魔方的解法，在网上已经有无数了，基本上的思路都是几个定式，玩的时候记住这些定式即可。课上Cai给我们演示了一个他自创的定式，很可惜，我目前为止只学会弄出一面来。 OK，这篇文章的主要目的是讲魔方里的数学，对...]]></description>
			<content:encoded><![CDATA[<p id="breadcrumb" class="breadcrumb"><a href="http://zhiqiang.org/blog/">博客</a> » <a href="http://zhiqiang.org/blog/category/science">自然科学</a> » <a href='http://zhiqiang.org/blog/tag/%e7%ae%97%e6%b3%95'>算法</a>  » </p><p><a href="http://zhiqiang.org/blog/wp-content/uploads/2fd8c30091e6_11914/d6f5f80ad070.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="240" alt="魔方" src="http://zhiqiang.org/blog/wp-content/uploads/2fd8c30091e6_11914/_thumb.jpg" width="233" align="right" border="0"/></a>今天香港中文大学的<a title="CAI, Leizhen" href="http://www.cse.cuhk.edu.hk/~lcai/" target="_blank">Prof. Cai</a>给我们上graph algorithm。第一节课上教我们玩魔方，先给每人发了一个。我喜欢这样的教学方法 <img src='http://zhiqiang.org/blog/wp-includes/images/smilies/smile.gif' alt=':)' class='wp-smiley' /> 。 </p>
<p>魔方的解法，在网上已经有<a title="在Google里搜索 魔方 玩法" href="http://www.google.com.hk/search?hl=en&amp;newwindow=1&amp;q=%E9%AD%94%E6%96%B9%E3%80%80%E7%8E%A9%E6%B3%95" target="_blank">无数</a>了，基本上的思路都是几个定式，玩的时候记住这些定式即可。课上Cai给我们演示了一个他自创的定式，很可惜，我目前为止只学会弄出一面来。</p>
<p>OK，这篇文章的主要目的是讲魔方里的数学，对魔方的群结构研究网上也已经有很多，这里不谈了。魔方总共有(8! × 3<sup>8−1</sup>) × (12! × 2<sup>12−1</sup>)/2 = 43252003274489856000=4.3× 10<sup>19</sup>个不同的状态。每个状态看作图上的一个点，则解魔方问题可以视作求一个超大图上的路径问题。这个图是如此之大，使得看上去求最短路这么简单的问题都变得非常困难，事实上，用计算机也不可能直接算。</p>
<p>虽然这个图是如此之大，而且边很少（每个顶点只引出12条边），但这个图的直径却非常小。可以证明，任何一种魔方的状态，都<font color="#ff0000">可以在26步之内复原</font>。（见<a href="http://en.wikipedia.org/wiki/Optimal_solutions_for_Rubik's_Cube" target="_blank">Optimal solutions for Rubik's Cube</a>)</p>
<p>这样的图与以前提到过的<a href="http://zhiqiang.org/blog/science/the-perfect-number-of-shuffling-7-times.html" target="_blank">洗牌模型</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/a-open-graph-problem.html">一个图论题</a></li><li><a href="http://zhiqiang.org/blog/science/computer-science/preliminary-computer-theory-algorithms-and-calculation-model.html">理论计算机初步：算法和计算模型</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/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/3-color-a-simple-graph.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>, 2007. | <a href="http://zhiqiang.org/blog/science/mathmatics-in-rubik-cube-and-algorithm.html">&#38142;&#25509;</a> | <a href="http://zhiqiang.org/blog/science/mathmatics-in-rubik-cube-and-algorithm.html#comments">23 &#26465;&#35780;&#35770;</a></p>]]></content:encoded>
			<wfw:commentRss>http://zhiqiang.org/blog/science/mathmatics-in-rubik-cube-and-algorithm.html/feed</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
	</channel>
</rss>

