{"id":2312,"date":"2012-08-09T15:20:49","date_gmt":"2012-08-09T07:20:49","guid":{"rendered":"http:\/\/vanabel.sinaapp.com\/?p=2312"},"modified":"2012-08-09T15:20:49","modified_gmt":"2012-08-09T07:20:49","slug":"%e5%85%b3%e4%ba%8e%e9%ad%94%e6%96%b9%e7%8a%b6%e6%80%81%e7%bd%ae%e6%8d%a2%e7%9a%84%e5%bf%ab%e9%80%9f%e8%a7%a3%e6%b3%95","status":"publish","type":"post","link":"https:\/\/lttt.vanabel.cn\/?p=2312","title":{"rendered":"\u5173\u4e8e\u9b54\u65b9\u72b6\u6001\u7f6e\u6362\u7684\u5feb\u901f\u89e3\u6cd5"},"content":{"rendered":"<p>\u5728<a href=\"http:\/\/vanabel.sinaapp.com\/?p=2254\" title=\"\u9b54\u65b9\u8fd8\u539f(\u673a\u68b0)\u7b97\u6cd5\u521d\u63a2\" target=\"_blank\">\u524d\u4e00\u7bc7\u65e5\u5fd7<\/a>\u4e2d, \u6211\u628a\u9b54\u65b9\u4ece\u521d\u59cb\u72b6\u6001\u53d8\u6362\u5230\u7ed9\u5b9a\u72b6\u6001\u7684\u7f6e\u6362\u79f0\u4e3a\u72b6\u6001\u7f6e\u6362, \u800c\u5f53\u65f6\u60f3\u7528\u5f3a\u751f\u6210\u5143\u6765\u5feb\u901f\u7684\u627e\u5230\u8be5\u7f6e\u6362\u7684\u8868\u793a, \u7531\u4e8e\u6211\u7684\u77e5\u8bc6\u6709\u9650, \u672a\u80fd\u6210\u529f. \u4eca\u5929\u6211\u5c06\u7528\u53e6\u4e00\u79cd\u65b9\u6cd5\u5b9e\u73b0\u5feb\u901f\u627e\u5230\u8fd9\u4e2a\u72b6\u6001\u7f6e\u6362. \u6362\u8a00\u4e4b, \u4f60\u53ea\u9700\u8981\u6309\u7167\u7f16\u53f7\u987a\u5e8f\u5199\u51fa\u7ed9\u5b9a\u72b6\u6001\u4e0b\u7684\u989c\u8272\u7f16\u53f7, \u90a3\u4e48\u5c31\u53ef\u4ee5\u5229\u7528\u7a0b\u5e8f\u673a\u68b0\u7684\u627e\u51fa\u8be5\u7f6e\u6362.<\/p>\n<p>\u9996\u5148\u8fd8\u662f\u8ba9\u6211\u8bb2\u8bb2\u57fa\u672c\u539f\u7406. \u4e00\u4e2a\u57fa\u672c\u7684\u89c2\u5bdf\u662f, \u6bcf\u4e2a\u5c0f\u6b63\u65b9\u4f53(\u5b83\u7531\u4e09\u4e2a\u4e0d\u540c\u989c\u8272\u7ec4\u6210\u4e09\u4e2a\u53ef\u4ee5\u770b\u5230\u7684\u9762)\u7684\u989c\u8272\u96c6\u5408\u5728\u8f6c\u52a8\u8fc7\u7a0b\u4e2d\u4e0d\u4f1a\u6539\u53d8. \u4f8b\u5982, \u4e0a\u7bc7\u65e5\u5fd7\u4e2d\u9762\u5bf9\u81ea\u5df1\u7684\u7f16\u53f7\u4e3a1,5,9\u7684\u5c0f\u6b63\u65b9\u4f53\u7684\u989c\u8272\u96c6\u5408\u662f{R,G,B}, \u90a3\u4e48\u65e0\u8bba\u4f60\u600e\u4e48\u8f6c\u52a8, \u8fd9\u4e2a\u5c0f\u6b63\u65b9\u4f53\u7684\u4f4d\u7f6e\u53ef\u80fd\u4f1a\u6539\u53d8, <!--more-->\u4f46\u662f\u5176\u5404\u4e2a\u4e0a\u7684\u989c\u8272\u6240\u6210\u7684\u96c6\u5408\u662f\u4e0d\u4f1a\u6539\u53d8\u7684. \u4e8e\u662f\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u9996\u5148\u5bf98\u4e2a(2\u9636\u9b54\u65b9\u7684\u60c5\u5f62\u54c8)\u5c0f\u6b63\u65b9\u4f53\u7684\u989c\u8272\u96c6\u5408\u4e09\u5143\u7ec4\u8fdb\u884c\u5206\u7c7b(\u67098\u4e2a\u4e92\u4e0d\u76f8\u4ea4\u7684\u989c\u8272\u4e09\u5143\u7ec4\u7ec4\u6210), \u800c\u540e, \u5728\u6211\u4eec\u8981\u5bfb\u627e\u8f6c\u52a8\u524d\u540e\u9762\u7684\u5bf9\u5e94\u5173\u7cfb\u65f6, \u53ef\u4ee5\u5148\u627e\u5230\u5c0f\u6b63\u65b9\u4f53\u7684\u5bf9\u5e94\u5173\u7cfb, \u4e00\u65e6\u627e\u5230\u8be5\u5bf9\u5e94\u5173\u7cfb, \u901a\u8fc7\u989c\u8272\u7684\u5bf9\u5e94\u53ef\u4ee5\u5f97\u5230\u7f16\u53f7\u7684\u5bf9\u5e94. <\/p>\n<p>\u8bf4\u8d77\u6765\u53ef\u80fd\u5f88\u590d\u6742, \u4f46\u662f\u6211\u76f8\u4fe1\u4f60\u81ea\u5df1\u628a\u6211\u4e0a\u7bc7\u65e5\u5fd7\u7684\u90a3\u4e2a\u4f8b\u5b50\u4e2d\u7684\u72b6\u6001\u7f6e\u6362\u627e\u8fc7\u4e00\u6b21\u5c31\u660e\u767d\u5176\u8981\u9886\u4e86. \u6216\u8005, \u4f60\u4e5f\u53ef\u4ee5\u63a5\u7740\u770b\u6211\u4e0b\u9762\u7684\u4ee3\u7801\u548c\u5206\u6790.<\/p>\n<p>\u9996\u5148, \u6211\u4eec\u9700\u8981\u5f97\u5230\u989c\u8272\u6309\u7167\u7f16\u53f7\u6392\u5217\u7684\u5e8f\u5217, \u5206\u522b\u7528iniorder, endorder\u6765\u8868\u793a\u521d\u59cb\u72b6\u6001\u7684\u989c\u8272\u5e8f\u5217, \u548c\u7ed9\u5b9a\u72b6\u6001\u7684\u989c\u8272\u5e8f\u5217. \u660e\u663e, \u6309\u7167\u524d\u4e00\u7bc7\u65e5\u5fd7\u7684\u89c4\u5b9a, iniorder={R, R, R, R, G, G, G, G, B, B, B, B, b, b, b, b, g, g, g, g, r, r, r,  r}; \u4f5c\u4e3a\u4f8b\u5b50, \u5982\u524d\u7bc7\u65e5\u5fd7\u6240\u5047\u8bbe\u7684\u90a3\u4e2a\u4f8b\u5b50, \u7ed9\u5b9a\u72b6\u6001\u7684\u989c\u8272\u5e8f\u5217\u662f:{R, R, R, R, G, G, b, G, B, B, r, B, b, g, r, b, g, g, g, b, r, G, B,  r}; \u8fd9\u5728Mathematica\u4e2d\u53ef\u4ee5\u5982\u4e0b\u8868\u793a:<\/p>\n<pre lang=\"c\" line=\"\" file=\"mathematica\" colla=\"+\">iniorder = {R, R, R, R, G, G, G, G, B, B, B, B, b, b, b, b, g, g, g, g, r, r, r, r};\nendorder = {R, R, R, R, G, G, b, G, B, B, r, B, b, g, r, b, g, g, g, b, r, G, B, r};<\/pre>\n<p>\u63a5\u4e0b\u6765, \u6211\u4eec\u9700\u8981\u628a\u8fd9\u4e24\u4e2a\u5e8f\u5217\u6309\u7167\u6bcf\u4e2a\u5c0f\u65b9\u5757\u6765\u5206\u7ec4, \u5373\u4f4d\u4e8e\u540c\u4e00\u4e2a\u5c0f\u65b9\u5757\u7684\u989c\u8272\u5206\u4e3a\u540c\u4e00\u4e2a\u7ec4. \u540c\u65f6, \u7531\u4e8e\u6211\u4eec\u6700\u7ec8\u662f\u8981\u901a\u8fc7\u989c\u8272\u6765\u5bfb\u627e\u9762\u7684\u5bf9\u5e94, \u4e8e\u662f\u6211\u4eec\u5e94\u8be5\u628a\u6bcf\u4e2a\u989c\u8272\u90fd\u8054\u7cfb\u7740\u5b83\u7684\u7f16\u53f7:<\/p>\n<pre lang=\"c\" line=\"\" file=\"mathematica\" colla=\"+\">\nsmallcubeorder={{1,5,9},{2,12,17},{3,16,18},{4,6,13},{7,14,24},{8,10,21},{11,20,22},{15,19,23}};\ninigroup={smallcubeorder,Part[iniorder,smallcubeorder[[#]]]&\/@Range[Length[smallcubeorder]]};\nendgroup={smallcubeorder,Part[endorder,smallcubeorder[[#]]]&\/@Range[Length[smallcubeorder]]};\n<\/pre>\n<p>\u7b2c\u4e00\u884c\u662f\u6bcf\u4e2a\u5c0f\u6b63\u65b9\u4f53\u7684\u7f16\u53f7\u5206\u7ec4, \u800c\u7b2c\u4e8c\u884c\u662f\u521d\u59cb\u72b6\u6001\u4e0b\u989c\u8272\u6309\u7167\u7f16\u53f7\u5206\u7ec4\u800c\u6784\u6210\u7684\u96c6\u5408, \u6700\u540e\u4e00\u884c\u5f53\u7136\u5c31\u662f\u7ed9\u5b9a\u7684\u72b6\u6001\u4e0b\u989c\u8272\u6309\u7167\u7f16\u53f7\u5206\u7ec4\u800c\u6784\u6210\u7684\u96c6\u5408. \u4e3a\u4e86\u4fbf\u4e8e\u7406\u89e3, \u6211\u7ed9\u51fa\u6700\u540e\u4e24\u884c\u4ee3\u7801\u7684\u8f93\u51fa\u7ed3\u679c(\u5373\u989c\u8272\u7684\u5206\u7ec4\u7ed3\u679c):<\/p>\n<pre lang=\"c\" line=\"\" file=\"mathematica\" colla=\"+\">\n{{{1,5,9},{2,12,17},{3,16,18},{4,6,13},{7,14,24},{8,10,21},{11,20,22},{15,19,23}},{{R,G,B},{R,B,g},{R,b,g},{R,G,b},{G,b,r},{G,B,r},{B,g,r},{b,g,r}}}\n\n{{{1,5,9},{2,12,17},{3,16,18},{4,6,13},{7,14,24},{8,10,21},{11,20,22},{15,19,23}},{{R,G,B},{R,B,g},{R,b,g},{R,G,b},{b,g,r},{G,B,r},{r,b,G},{r,g,B}}}\n<\/pre>\n<p>\u4ed6\u4eec\u5206\u522b\u7531\u4e24\u884c\u7ec4\u6210\u7b2c\u4e00\u884c\u662f\u6bcf\u4e2a\u5c0f\u6b63\u65b9\u4f53\u7684\u7f16\u53f7\u5206\u7ec4, \u7b2c\u4e8c\u884c\u662f\u4e0e\u7f16\u53f7\u5bf9\u5e94\u7684\u989c\u8272\u5206\u7ec4.<\/p>\n<p>\u63a5\u4e0b\u6765, \u4e3a\u4e86\u6839\u636e\u989c\u8272\u7684\u5206\u7ec4, \u627e\u5230\u5bf9\u5e94\u7f16\u53f7\u7684\u5206\u7ec4, \u6211\u4eec\u9700\u8981\u5bf9\u6bcf\u4e2a\u7ec4\u7684\u989c\u8272\u8fdb\u884c\u6392\u5e8f, \u8fd9\u6837\u624d\u80fd\u591f\u901a\u8fc7\u7a0b\u5e8f\u5224\u65ad\u4e24\u4e2a\u989c\u8272\u5206\u7ec4\u662f\u76f8\u540c\u7684. \u540c\u6837\u6211\u7ed9\u51famathematica\u4ee3\u7801:<\/p>\n<pre lang=\"c\" line=\"\" file=\"mathematica\" colla=\"+\">\nsortedinigroup=Transpose[SortBy[Transpose[inigroup[[All,#]]],Last]]&\/@Range[Length[smallcubeorder]];\nsortedendgroup=Transpose[SortBy[Transpose[endgroup[[All,#]]],Last]]&\/@Range[Length[smallcubeorder]];\n<\/pre>\n<p>\u4f8b\u5982, \u7ed9\u5b9a\u72b6\u6001\u4e0b\u7684\u989c\u8272\u6309\u7167\u6bcf\u4e2a\u7ec4\u7684\u989c\u8272\u5347\u5e8f\u6392\u5217\u540e\u7684\u5206\u7ec4\u4e3a:<\/p>\n<pre lang=\"c\" line=\"\" file=\"mathematica\" colla=\"+\">\n{{{9,5,1},{B,G,R}},{{12,17,2},{B,g,R}},{{16,18,3},{b,g,R}},{{13,6,4},{b,G,R}},{{7,14,24},{b,g,r}},{{10,8,21},{B,G,r}},{{20,22,11},{b,G,r}},{{23,19,15},{B,g,r}}}\n<\/pre>\n<p>\u4f60\u53ef\u4ee5\u770b\u5230\u539f\u6765\u7ed9\u5b9a\u72b6\u6001\u4e0b\u7684 \u7b2c\u4e00\u7ec4\u662f{{1,5,9},{R,G,B}}, \u800c\u6309\u7167\u989c\u8272\u6392\u5e8f\u540e\u53d8\u6210{{9,5,1},{B,G,R}}. \u9700\u8981\u63d0\u9192\u7684\u662f\u989c\u8272\u548c\u7f16\u53f7\u7684\u5bf9\u5e94\u5173\u7cfb\u4e00\u5b9a\u8981\u4fdd\u6301, \u5373\u6392\u5e8f\u524d\u540e1< ->R, 5< ->G, 9< ->B\u7684\u5173\u7cfb\u6ca1\u53d8. \u5426\u5219\u540e\u9762\u5c31\u4e0d\u80fd\u901a\u8fc7\u989c\u8272\u5bfb\u627e\u7f16\u53f7\u4e86.<\/p>\n<p>\u8fd9\u6837, \u4e00\u65e6\u6211\u4eec\u6709\u4e86\u8fd9\u4e2a\u6709\u5e8f\u7684\u989c\u8272\u7ec4, \u90a3\u4e48\u5c31\u53ef\u4ee5\u5bf9\u6bd4\u521d\u59cb\u72b6\u6001\u548c\u7ed9\u5b9a\u72b6\u6001\u7684\u989c\u8272\u7ec4\u800c\u5f97\u5230\u9762\u7684\u5bf9\u5e94:<\/p>\n<pre lang=\"c\" line=\"\" file=\"mathematica\" colla=\"+\">\nsortedendorder = \n sortedendgroup[[Position[sortedendgroup[[All, 2]], \n        sortedinigroup[[#, 2]]] \/\/ Flatten, 1]] & \/@ \n   Range[Length[smallcubeorder]] \/\/ Flatten\n<\/pre>\n<p>\u8fd9\u91cc, \u6211\u5bf9\u4ee3\u7801\u4f5c\u4e00\u4e9b\u89e3\u91ca, \u9996\u5148\u770b\u5230Position\u7684\u4f5c\u7528\u662f\u5c06\u7b2c\u4e8c\u4e2a\u53c2\u6570( sortedinigroup[[#, 2]] )\u5728\u7b2c\u4e00\u4e2a\u53c2\u6570(sortedendgroup[[All, 2]])\u4e2d\u7684\u4f4d\u7f6e\u627e\u5230, \u800c\u540e\u6211\u4eec\u8fd8\u901a\u8fc7sortedendgroup[[*,1]]\u5f97\u5230\u4e86\u8be5\u989c\u8272\u5728\u7ed9\u5b9a\u72b6\u6001\u4e0b\u7684\u7f16\u53f7, \u6700\u540e\u5c06\u8fd9\u4e2a\u64cd\u4f5c\u5bf9{1,2,3,45,6,,7,8}=Range[Length[smallcubeorder]] \u4e2d\u7684\u6bcf\u4e00\u4e2a\u6570\u90fd\u64cd\u4f5c\u4e00\u904d. \u8fd9\u6837\u5f53\u7136\u5c31\u5f97\u5230\u4e86\u4e0e\u521d\u59cb\u72b6\u6001\u7f16\u53f7\u5bf9\u5e94\u7684\u7ed9\u5b9a\u72b6\u6001\u7684\u7f16\u53f7. <\/p>\n<p>\u6700\u540e, \u53ea\u9700\u8981\u627e\u51fa\u8fd9\u4e2a\u5c06\u521d\u59cb\u7f16\u53f7, \u53d8\u4e3a\u7ed9\u5b9a\u72b6\u6001\u7684\u7f16\u53f7\u7684\u7f6e\u6362:<\/p>\n<pre lang=\"c\" line=\"\" file=\"mathematica\" colla=\"+\">\nsortediniorder=sortedinigroup[[All,1]]\/\/Flatten;\ntransdata=FindPermutation[SortBy[Transpose[{sortediniorder,sortedendorder}],First]\/\/Transpose\/\/Last,Range[24]]\n<\/pre>\n<p>\u5f97\u5230\u8f93\u51fa:<\/p>\n<pre lang=\"c\" line=\"\" file=\"mathematica\" colla=\"+\">\nCycles[{{7, 22, 15}, {11, 23, 24}, {14, 20, 19}}]\n<\/pre>\n<p>\u603b\u8d77\u6765\u8bf4, \u4f60\u53ea\u9700\u5c06\u4e0b\u9762\u4ee3\u7801\u4e2d\u7684endorder\u6240\u4ee3\u8868\u7684\u989c\u8272\u5e8f\u5217\u6539\u4e3a\u4f60\u9700\u8981\u7684\u989c\u8272\u5e8f\u5217, \u8fd0\u7b97\u540e\u5c31\u53ef\u4ee5\u76f4\u63a5\u5f97\u5230\u72b6\u6001\u7f6e\u6362:<\/p>\n<pre lang=\"c\" line=\"\" file=\"mathematica\" colla=\"+\">\niniorder={R,R,R,R,G,G,G,G,B,B,B,B,b,b,b,b,g,g,g,g,r,r,r,r};\nendorder={R,R,R,R,G,G,b,G,B,B,r,B,b,g,r,b,g,g,g,b,r,G,B,r};\nsmallcubeorder={{1,5,9},{2,12,17},{3,16,18},{4,6,13},{7,14,24},{8,10,21},{11,20,22},{15,19,23}};\ninigroup={smallcubeorder,Part[iniorder,smallcubeorder[[#]]]&\/@Range[Length[smallcubeorder]]};\nendgroup={smallcubeorder,Part[endorder,smallcubeorder[[#]]]&\/@Range[Length[smallcubeorder]]};\nsortedinigroup=Transpose[SortBy[Transpose[inigroup[[All,#]]],Last]]&\/@Range[Length[smallcubeorder]];\nsortedendgroup=Transpose[SortBy[Transpose[endgroup[[All,#]]],Last]]&\/@Range[Length[smallcubeorder]];\nsortedendorder=sortedendgroup[[Position[sortedendgroup[[All,2]],sortedinigroup[[#,2]]]\/\/Flatten,1]]&\/@Range[Length[smallcubeorder]]\/\/Flatten;\nsortediniorder=sortedinigroup[[All,1]]\/\/Flatten;\ntransdata=FindPermutation[SortBy[Transpose[{sortediniorder,sortedendorder}],First]\/\/Transpose\/\/Last,Range[24]]\n<\/pre>\n<h3>\u6ce8\u8bb0<\/h3>\n<p>\u82e5\u5c06<\/p>\n<pre lang=\"c\" line=\"\" file=\"mathematica\" colla=\"+\">\ntransdata=FindPermutation[SortBy[Transpose[{sortediniorder,sortedendorder}],First]\/\/Transpose\/\/Last,Range[24]]\n<\/pre>\n<p>\u66ff\u6362\u4e3a<\/p>\n<pre lang=\"c\" line=\"\" file=\"mathematica\" colla=\"+\">\ntransdata=FindPermutation[SortBy[Transpose[{sortediniorder,sortedendorder}],First]\/\/Transpose\/\/Last]\n<\/pre>\n<p>\u5219\u6700\u7ec8\u7ecf\u8fc7GAP\u8ba1\u7b97\u5f97\u5230\u7684\u8868\u793a\u4e0d\u9700\u8981\u53d6\u9006, \u5426\u5219\u9700\u8981.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u524d\u4e00\u7bc7\u65e5\u5fd7\u4e2d, \u6211\u628a\u9b54\u65b9\u4ece\u521d\u59cb\u72b6\u6001\u53d8\u6362\u5230\u7ed9\u5b9a\u72b6\u6001\u7684\u7f6e\u6362\u79f0\u4e3a\u72b6\u6001\u7f6e\u6362, \u800c\u5f53\u65f6\u60f3 &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"more-link\" href=\"https:\/\/lttt.vanabel.cn\/?p=2312\"> <span class=\"screen-reader-text\">\u5173\u4e8e\u9b54\u65b9\u72b6\u6001\u7f6e\u6362\u7684\u5feb\u901f\u89e3\u6cd5<\/span> \u9605\u8bfb\u66f4\u591a &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[548,274,403],"class_list":["post-2312","post","type-post","status-publish","format-standard","hentry","category-mathnotes","tag-mathematica","tag-274","tag-403"],"_links":{"self":[{"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=\/wp\/v2\/posts\/2312","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2312"}],"version-history":[{"count":0,"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=\/wp\/v2\/posts\/2312\/revisions"}],"wp:attachment":[{"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2312"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2312"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2312"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}