佚名 发表于 2005-10-12 20:34:49

魔方转动的二进制描述法

<BR>
<P ><FONT face="Times New Roman">                                               </FONT>魔方转动的二进制描述法<p></p></P>
<P ><FONT face="Times New Roman">                                                                                                     </FONT>作者:</P>
<P ><FONT face="Times New Roman"><p></p></FONT></P>
<P >最近,大家为魔方转动的描述争论不休,现在我来提一种绝对无争议的描述法,就是二进制描述法。即完全用<FONT face="Times New Roman">1</FONT>和<FONT face="Times New Roman">0</FONT>来描述魔方的转动。</P>
<P >我就以三阶为例吧。三阶魔方三个方向上共有九个不同的转层,于是我就给这九个转层按一定的顺序分配<FONT face="Times New Roman">9</FONT>个数位。我定义的顺序为“先从后往前(<FONT face="Times New Roman">X</FONT>正方向)数,再从左往右(<FONT face="Times New Roman">Y</FONT>正方向)数,末从下往上(<FONT face="Times New Roman">Z</FONT>正方向)数”。这就是我定义的<FONT face="Times New Roman">9</FONT>个转层的转动顺序。它决定占位的顺序。</P>
<P >然后依照该顺序审查这九个转层的转动情况。如果某个转层没转动就记为<FONT face="Times New Roman">0</FONT>。以该层转动轴的正方向为轴,以右手法则转动单个<FONT face="Times New Roman">90</FONT>度,这样的转动就记为<FONT face="Times New Roman">1</FONT>。如果该层转动<FONT face="Times New Roman">180</FONT>度,就相当于将该层转动<FONT face="Times New Roman">90</FONT>度的过程再重复一次,共两次。如果逆转动<FONT face="Times New Roman">90</FONT>度,就看成是正转动<FONT face="Times New Roman">270</FONT>度,就相当于将该层转动<FONT face="Times New Roman">90</FONT>度的过程再重复两次,共三次。所以这里转<FONT face="Times New Roman">180</FONT>,<FONT face="Times New Roman">270</FONT>度是要分解为多个<FONT face="Times New Roman">90</FONT>度来考虑的。就这样九个层一轮一轮地审查,直到里历遍所有的转动过程。</P>
<P >干说无益,还是举几个例子,画几个图吧。(有的图片及描述是摘自邱志红的帖子里的。)</P>
<P ><v:shapetype><v:stroke joinstyle="miter"></v:stroke><v:formulas><v:f eqn="if lineDrawn pixelLineWidth 0"></v:f><v:f eqn="sum @0 1 0"></v:f><v:f eqn="sum 0 0 @1"></v:f><v:f eqn="prod @2 1 2"></v:f><v:f eqn="prod @3 21600 pixelWidth"></v:f><v:f eqn="prod @3 21600 pixelHeight"></v:f><v:f eqn="sum @0 0 1"></v:f><v:f eqn="prod @6 1 2"></v:f><v:f eqn="prod @7 21600 pixelWidth"></v:f><v:f eqn="sum @8 21600 0"></v:f><v:f eqn="prod @7 21600 pixelHeight"></v:f><v:f eqn="sum @10 21600 0"></v:f></v:formulas><v:path gradientshapeok="t" connecttype="rect" extrusionok="f"></v:path><lock v:ext="edit" aspectratio="t"></lock></v:shapetype></P>
<P ><FONT face="Times New Roman"> </FONT>图<FONT face="Times New Roman">1</FONT>,<FONT face="Times New Roman">2</FONT>,<FONT face="Times New Roman">3</FONT>分别指明我定义的九个层转动的顺序。图<FONT face="Times New Roman">4</FONT>就是这里的<FONT face="Times New Roman">X</FONT>,<FONT face="Times New Roman">Y</FONT>,<FONT face="Times New Roman">Z</FONT>的方向取向。图<FONT face="Times New Roman">5</FONT>就是右手螺旋法则以确旋转的正方向,具体的确定方法见邱志红的《一式解万方》。</P>
<P >举一个具体的转动吧。右<FONT face="Times New Roman">+ </FONT>上<FONT face="Times New Roman">- </FONT>左<FONT face="Times New Roman">- </FONT>上<FONT face="Times New Roman">+ </FONT>右<FONT face="Times New Roman">- </FONT>。上标不好处理,大家将就着看吧。开始审查了。</P>
<P >第一轮:第<FONT face="Times New Roman">1</FONT>个层没有转,记为<FONT face="Times New Roman">0</FONT>,第<FONT face="Times New Roman">2</FONT>个层没有转,记为<FONT face="Times New Roman">0</FONT>,第<FONT face="Times New Roman">3</FONT>个层没有转,记为<FONT face="Times New Roman">0</FONT>,第<FONT face="Times New Roman">4</FONT>个层没有转,记为<FONT face="Times New Roman">0</FONT>,第<FONT face="Times New Roman">5</FONT>个层没有转,记为<FONT face="Times New Roman">0</FONT>,第六个层转了逆转<FONT face="Times New Roman">90</FONT>度,相当于正转<FONT face="Times New Roman">270</FONT>,但在一轮里面只能正转<FONT face="Times New Roman">90</FONT>,然后继续,第<FONT face="Times New Roman">7</FONT>,<FONT face="Times New Roman">8</FONT>,<FONT face="Times New Roman">9</FONT>层都没有转,都依次记为<FONT face="Times New Roman">0</FONT>。那么第一轮的结果是:<FONT face="Times New Roman">000001000</FONT></P>
<P >第二轮:其实还是将第<FONT face="Times New Roman">6</FONT>个层在继续正转<FONT face="Times New Roman">90</FONT>度。其他的都不转,都为<FONT face="Times New Roman">0</FONT>。那么第一轮的结果也是:<FONT face="Times New Roman">000001000</FONT></P>
<P >第三轮:将第<FONT face="Times New Roman">6</FONT>个层在继续正转<FONT face="Times New Roman">90</FONT>度,至此第一个转动操作“右<FONT face="Times New Roman">+</FONT>”终于完了,但这一轮还没有完,继续审查第<FONT face="Times New Roman">7</FONT>,<FONT face="Times New Roman">8</FONT>,<FONT face="Times New Roman">9</FONT>个层的转动情况,第<FONT face="Times New Roman">7</FONT>,<FONT face="Times New Roman">8</FONT>个层没有转,第九个层转动了<FONT face="Times New Roman">90</FONT>度,还好是正转,就记为<FONT face="Times New Roman">1</FONT>。第二转动操作“上<FONT face="Times New Roman">-</FONT>”也完了,第三轮也结束了。第三轮的结果是:<FONT face="Times New Roman">000001001</FONT></P>
<P >第四轮:开始进行第三个转动“左<FONT face="Times New Roman">-</FONT>”描述了。第<FONT face="Times New Roman">1</FONT>,<FONT face="Times New Roman">2</FONT>,<FONT face="Times New Roman">3</FONT>层没有转,第<FONT face="Times New Roman">4</FONT>个层正转<FONT face="Times New Roman">270</FONT>,转动<FONT face="Times New Roman">90</FONT>度先,然后后面的层都没有转,都为<FONT face="Times New Roman">0</FONT>。第四轮的结果为:<FONT face="Times New Roman">000100000</FONT></P>
<P >第五轮:再将上面的第<FONT face="Times New Roman">4</FONT>个层转动<FONT face="Times New Roman">90</FONT>,其他不转,第五轮的结果为:<FONT face="Times New Roman">000100000</FONT></P>
<P >第六轮:再将上面的第<FONT face="Times New Roman">4</FONT>个层转动<FONT face="Times New Roman">90</FONT>,第三个转动操作“左<FONT face="Times New Roman">-</FONT>”也完了,继续描述第四个转动操作“上<FONT face="Times New Roman">+</FONT>”,也继续本轮的历遍,第<FONT face="Times New Roman">7</FONT>,<FONT face="Times New Roman">8</FONT>个层没有转,第九个层转动<FONT face="Times New Roman">270</FONT>度,转动<FONT face="Times New Roman">90</FONT>度先,本轮结束。结果为:<FONT face="Times New Roman">000100001</FONT></P>
<P >第七轮:继续历遍“上<FONT face="Times New Roman">+</FONT>”,再使第九个层转动<FONT face="Times New Roman">90</FONT>度,本轮的结果为:<FONT face="Times New Roman">0000000001</FONT></P>
<P >第八轮:继续历遍“上<FONT face="Times New Roman">+</FONT>”,再使第九个层转动<FONT face="Times New Roman">90</FONT>度,本轮结束,并且第四个转动操作<FONT face="Times New Roman"> </FONT>“上<FONT face="Times New Roman">+</FONT>”<FONT face="Times New Roman"> </FONT>历遍完。开始历遍第四个转动操作<FONT face="Times New Roman"> </FONT>“右<FONT face="Times New Roman">-</FONT>”,本轮的结果为:<FONT face="Times New Roman">0000000001</FONT></P>
<P >第九轮:继续以上的历遍方法,得<FONT face="Times New Roman">000001000</FONT></P>
<P >至此所有的操作都历遍了,终于结束了。</P>
<P >经过<FONT face="Times New Roman">9</FONT>轮的历遍。最后的总结果为:</P>
<P ><FONT face="Times New Roman">000001000</FONT>,<FONT face="Times New Roman">000001000</FONT>,<FONT face="Times New Roman">000001001</FONT>,<FONT face="Times New Roman">000100000</FONT>,<FONT face="Times New Roman">000100000</FONT>,<FONT face="Times New Roman">000100001</FONT>,<FONT face="Times New Roman">0000000001</FONT>,<FONT face="Times New Roman">0000000001</FONT>,<FONT face="Times New Roman">000001000</FONT></P>
<P >中间有逗号是为了将每一轮间隔开,可以省去。那么结果为:<FONT face="Times New Roman">000001000000001000</FONT>,<FONT face="Times New Roman">00000100100010000000010000000010000100000000010000000001000001000</FONT></P>
<P >这就是我的二进制描述法在三阶魔方中的应用举例。</P>
<P ><FONT face="Times New Roman">n</FONT>阶魔方中的操作也可以这样历遍,只不过,每个方向有<FONT face="Times New Roman">n</FONT>个层,每一轮的长度为<FONT face="Times New Roman">3n</FONT>。<FONT face="Times New Roman">3n</FONT>个层的编排顺序也是按“先从后往前(<FONT face="Times New Roman">X</FONT>正方向)数,再从左往右(<FONT face="Times New Roman">Y</FONT>正方向)数,末从下往上(<FONT face="Times New Roman">Z</FONT>正方向)数”的规则排列。历遍及转动的规则也一样。</P>
<P >广而言之,任何形态的魔方都可以这样历遍。魔方总是有很多个转层组成的,我们可以人为地给它们的转动排个序。假如总共有<FONT face="Times New Roman">P</FONT>个转层,那么就对着转动操作按照顺序依次历遍就可以了。注意:所有转层的转动都是单方向进行的(视具体规定而定),比如三阶魔方中逆转<FONT face="Times New Roman">90</FONT>度要看作正转<FONT face="Times New Roman">270</FONT>度。还有所有的转动操作都要分解为最小的转动来历遍,就像三阶魔方一个层转动<FONT face="Times New Roman">270</FONT>度一样,要看成是在三轮里面每次转动<FONT face="Times New Roman">90</FONT>。最后在某一轮里面历遍完一个转动操作,还要注意本轮可能还没有完,要接着开始历遍下一个转动操作。</P>
<P >这样,所有种类的魔方的转动都可以统一用二进制来描述,大家也不用为了转动符号而争来争去。只不过对人来说这个历遍过程很烦琐,不大现实,但计算机最喜欢处理二进制的问题了。</P>
<P >我只是在这里提一下这种方法。说明该方法的可行性。</P>
<P >啊,有消息来了,离开一下………………………</P>      

乌木 发表于 2005-10-12 22:05:37

接下来颜色如何编码?其变化如何处理?愿闻下文。

[ 本帖最后由 乌木 于 2010-12-5 09:44 编辑 ]

佚名 发表于 2005-10-13 10:41:46

<DIV class=quote><B>以下是引用<I>乌木</I>在2005-10-12 22:05:37的发言:</B><BR>接下来颜色如何编码?其变化如何处理?原闻下文。</DIV>
<P>
<P>哦,哦。我仅仅只是对转动操作进行了二进制转化。我要说的文中都说完了。不知乌木先生理解了那种历遍的方法没有?</P>
<P>接下来颜色如何编码?其变化如何处理?这些问题我还没有考虑。因为我写本贴的目的很明确了:对转动操作进行了二进制转化。    可能标题出了问题,范围有点大,让乌木先生误解了。我会想办法改的。</P>

魔鱼儿 发表于 2009-8-24 15:10:58

好深奥哦,在百度上找到的,来顶

lylylyly 发表于 2010-4-2 08:28:29

原帖由 佚名 于 2005-10-13 10:41 发表 http://bbs.mf8-china.com/images/common/back.gif
以下是引用乌木在2005-10-12 22:05:37的发言:接下来颜色如何编码?其变化如何处理?原闻下文。

哦,哦。我仅仅只是对转动操作进行了二进制转化。
编码的目的在于解决问题,如此才有意义,才能获得推广应用.期等下文

袁野 发表于 2010-12-25 23:39:46

太多了看着有点发晕呐,占着以后研究
页: [1]
查看完整版本: 魔方转动的二进制描述法