CoCalc Public Filestmp / 2017-02-25-152742-rubiks.sagewsOpen in with one click!
Author: William A. Stein
C = RubiksCube() C C.plot3d??()
+--------------+ | 1 2 3 | | 4 top 5 | | 6 7 8 | +------------+--------------+-------------+------------+ | 9 10 11 | 17 18 19 | 25 26 27 | 33 34 35 | | 12 left 13 | 20 front 21 | 28 right 29 | 36 rear 37 | | 14 15 16 | 22 23 24 | 30 31 32 | 38 39 40 | +------------+--------------+-------------+------------+ | 41 42 43 | | 44 bottom 45 | | 46 47 48 | +--------------+
3D rendering not yet implemented
C = RubiksCube(PermutationGroupElement('(44,18)(26,34)')) C C.plot3d()
Error in lines 2-2 Traceback (most recent call last): File "/projects/sage/sage-7.5/local/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 982, in execute exec compile(block+'\n', '', 'single') in namespace, locals File "", line 1, in <module> File "/projects/sage/sage-7.5/local/lib/python2.7/site-packages/smc_sagews/sage_salvus.py", line 3553, in displayhook _system_sys_displayhook(obj) File "sage/structure/sage_object.pyx", line 192, in sage.structure.sage_object.SageObject.__repr__ (/projects/sage/sage-7.5/src/build/cythonized/sage/structure/sage_object.c:2691) result = repr_func() File "/projects/sage/sage-7.5/local/lib/python2.7/site-packages/sage/groups/perm_gps/cubegroup.py", line 1262, in _repr_ return self._group.repr2d(self._state) File "/projects/sage/sage-7.5/local/lib/python2.7/site-packages/sage/groups/perm_gps/cubegroup.py", line 893, in repr2d g = self.parse(mv) File "/projects/sage/sage-7.5/local/lib/python2.7/site-packages/sage/groups/perm_gps/cubegroup.py", line 699, in parse return mv if mv.parent() is self else PermutationGroup_generic.__call__(self, mv, check) File "/projects/sage/sage-7.5/local/lib/python2.7/site-packages/sage/groups/perm_gps/permgroup.py", line 672, in __call__ return self._element_class()(x, self, check=check) File "sage/groups/perm_gps/permgroup_element.pyx", line 457, in sage.groups.perm_gps.permgroup_element.PermutationGroupElement.__init__ (/projects/sage/sage-7.5/src/build/cythonized/sage/groups/perm_gps/permgroup_element.c:5582) raise TypeError('permutation %s not in %s' % (g, parent)) TypeError: permutation (10,18)(26,34) not in The Rubik's cube group with generators R,L,F,B,U,D in SymmetricGroup(48).
C
Error in lines 1-1 Traceback (most recent call last): File "/projects/sage/sage-7.5/local/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 982, in execute exec compile(block+'\n', '', 'single') in namespace, locals File "", line 1, in <module> File "/projects/sage/sage-7.5/local/lib/python2.7/site-packages/smc_sagews/sage_salvus.py", line 3553, in displayhook _system_sys_displayhook(obj) File "sage/structure/sage_object.pyx", line 192, in sage.structure.sage_object.SageObject.__repr__ (/projects/sage/sage-7.5/src/build/cythonized/sage/structure/sage_object.c:2691) result = repr_func() File "/projects/sage/sage-7.5/local/lib/python2.7/site-packages/sage/groups/perm_gps/cubegroup.py", line 1262, in _repr_ return self._group.repr2d(self._state) File "/projects/sage/sage-7.5/local/lib/python2.7/site-packages/sage/groups/perm_gps/cubegroup.py", line 893, in repr2d g = self.parse(mv) File "/projects/sage/sage-7.5/local/lib/python2.7/site-packages/sage/groups/perm_gps/cubegroup.py", line 699, in parse return mv if mv.parent() is self else PermutationGroup_generic.__call__(self, mv, check) File "/projects/sage/sage-7.5/local/lib/python2.7/site-packages/sage/groups/perm_gps/permgroup.py", line 672, in __call__ return self._element_class()(x, self, check=check) File "sage/groups/perm_gps/permgroup_element.pyx", line 457, in sage.groups.perm_gps.permgroup_element.PermutationGroupElement.__init__ (/projects/sage/sage-7.5/src/build/cythonized/sage/groups/perm_gps/permgroup_element.c:5582) raise TypeError('permutation %s not in %s' % (g, parent)) TypeError: permutation (10,18) not in The Rubik's cube group with generators R,L,F,B,U,D in SymmetricGroup(48).
C.solve()
"U' B2 F2 D' B2 F2 U2"
C
Error in lines 1-1 Traceback (most recent call last): File "/projects/sage/sage-7.5/local/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 982, in execute exec compile(block+'\n', '', 'single') in namespace, locals File "", line 1, in <module> File "/projects/sage/sage-7.5/local/lib/python2.7/site-packages/smc_sagews/sage_salvus.py", line 3553, in displayhook _system_sys_displayhook(obj) File "sage/structure/sage_object.pyx", line 192, in sage.structure.sage_object.SageObject.__repr__ (/projects/sage/sage-7.5/src/build/cythonized/sage/structure/sage_object.c:2691) result = repr_func() File "/projects/sage/sage-7.5/local/lib/python2.7/site-packages/sage/groups/perm_gps/cubegroup.py", line 1262, in _repr_ return self._group.repr2d(self._state) File "/projects/sage/sage-7.5/local/lib/python2.7/site-packages/sage/groups/perm_gps/cubegroup.py", line 893, in repr2d g = self.parse(mv) File "/projects/sage/sage-7.5/local/lib/python2.7/site-packages/sage/groups/perm_gps/cubegroup.py", line 699, in parse return mv if mv.parent() is self else PermutationGroup_generic.__call__(self, mv, check) File "/projects/sage/sage-7.5/local/lib/python2.7/site-packages/sage/groups/perm_gps/permgroup.py", line 672, in __call__ return self._element_class()(x, self, check=check) File "sage/groups/perm_gps/permgroup_element.pyx", line 457, in sage.groups.perm_gps.permgroup_element.PermutationGroupElement.__init__ (/projects/sage/sage-7.5/src/build/cythonized/sage/groups/perm_gps/permgroup_element.c:5582) raise TypeError('permutation %s not in %s' % (g, parent)) TypeError: permutation (2,44)(7,45)(10,18)(26,34) not in The Rubik's cube group with generators R,L,F,B,U,D in SymmetricGroup(48).
C.solve(algorithm="gap")
'Illegal or syntactically incorrect state. No solution.'
C = RubiksCube("U' B2 F2 D' B2 F2 U2"); C.plot3d()
3D rendering not yet implemented
C.move("U'").plot3d()
3D rendering not yet implemented
C.move("U'").move("B2").plot3d()
3D rendering not yet implemented
# U' B2 F2 D' B2 F2 U2 #C.move("U'").move("B2").move("F2").move("D'").move("B2").move("F2").move("U2").plot3d() C.move("U2").move("F2").move("B2").move("D'").move("F2").move("B2").move("U'").plot3d()
3D rendering not yet implemented
C.move("U2").move("F2").move("B2").move("D'").move("F2").move("B2").move("U'").solve()
"B' F' L2 U2 B' F' L2 D2 F2 R2"