TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

The Mathematics of the Rubik’s Cube (2009) [pdf]

135 点作者 lainon超过 6 年前

8 条评论

perfect_wave超过 6 年前
I&#x27;ve been fascinated by the Rubik&#x27;s cube for years after learning to solve one in 7th grade. I started to get back into it high school and dropped my solve times down below a minute. Then I continued in college and got down to 25 seconds average with a personal best of 15.15.<p>I created a 2x2 Rubik&#x27;s cube in Java as my freshman final project for my second computer science class, but it was quite ugly.<p>Recently, I decided to take another look at implementing the cube - this time using Python. I also wanted a way to generate cubes and check if they were valid. The main representation of the cube is as a permutation group - a 48-tuple where each element in the tuple is unique. The solved cube is represented as (0, 1, ... , 46, 47).<p>Turns of the cube simply permute this tuple. To figure these all out I spent a lot of time with a cube covered in post it notes.<p>All of the stuff I implemented in the checking for valid cube comes from this stackoverflow post: <a href="https:&#x2F;&#x2F;math.stackexchange.com&#x2F;questions&#x2F;127577&#x2F;how-to-tell-if-a-rubiks-cube-is-solvable&#x2F;127627" rel="nofollow">https:&#x2F;&#x2F;math.stackexchange.com&#x2F;questions&#x2F;127577&#x2F;how-to-tell-...</a><p>I&#x27;ve had a lot of fun working with this cube as my personal project. I recently created a Django website and a RESTful API to display randomly generated cubes. Soon I&#x27;ll be working on a data pipeline to process these random cubes and display them nicely.<p>I&#x27;ve looked into working on a solution algorithm to implement Thistlethwaite&#x27;s algorithm - <a href="https:&#x2F;&#x2F;www.jaapsch.net&#x2F;puzzles&#x2F;thistle.htm" rel="nofollow">https:&#x2F;&#x2F;www.jaapsch.net&#x2F;puzzles&#x2F;thistle.htm</a>. I think this will take me a while, but it should be doable. I haven&#x27;t really though too much about implementing it, but I think the way to do it is to define what it is for each step to be completed and then BFS a graph of moves to end up in that state. If anyone has looked into this I&#x27;d love some advice!<p>You can find the code I&#x27;ve written on Github: <a href="https:&#x2F;&#x2F;github.com&#x2F;elliotmartin&#x2F;RubikLite&#x2F;blob&#x2F;master&#x2F;Rubik.py" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;elliotmartin&#x2F;RubikLite&#x2F;blob&#x2F;master&#x2F;Rubik....</a>
评论 #19138371 未加载
tuckermi超过 6 年前
Is there a properly colorized version of this PDF floating around somewhere? In particular, I&#x27;m wondering about this line that lies above a grayscale image:<p><pre><code> For example, in the picture below, the red square is at FUR, yellow at RUF, blue at URF, and green at ULB</code></pre>
foxes超过 6 年前
Mathologer has a nice video explaining how to solve a cube, and they are really using group theory :),<p><a href="https:&#x2F;&#x2F;youtu.be&#x2F;-NL76uQOpI0" rel="nofollow">https:&#x2F;&#x2F;youtu.be&#x2F;-NL76uQOpI0</a>.<p>The key take away is that all you need to do is find a few basic operations (swapping an edge&#x2F;corner&#x2F;center) that leaves the rest of the cube unchanged, and then your job is basically done, you apply these until you have a solved cube.<p>This might approach might not give you the optimal algorithm, which has been shown to be able to solve any Rubik&#x27;s Cube in 20 turns or less [0].<p>[0] <a href="http:&#x2F;&#x2F;www.cube20.org&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.cube20.org&#x2F;</a>
stilldavid超过 6 年前
<a href="https:&#x2F;&#x2F;cube20.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;cube20.org&#x2F;</a>
magoghm超过 6 年前
There are also these much older (1980) notes on the Rubik&#x27;s cube: <a href="https:&#x2F;&#x2F;maths-people.anu.edu.au&#x2F;~burkej&#x2F;cube&#x2F;singmaster.pdf" rel="nofollow">https:&#x2F;&#x2F;maths-people.anu.edu.au&#x2F;~burkej&#x2F;cube&#x2F;singmaster.pdf</a>
maxxxxx超过 6 年前
I really wish I had the brains to do math to figure out things like the Rubik&#x27;s cube. I find it fascinating how you can model something like this and express it with math.
评论 #19137483 未加载
评论 #19137503 未加载
评论 #19136883 未加载
alejohausner超过 6 年前
Nice introduction to group theory. I wish my math profs had used some of this material.
评论 #19138931 未加载
评论 #19137768 未加载
ensconced超过 6 年前
dogschool.tripod.com