A090573
Number of configurations of the 3-dimensional 3 X 3 X 3 sliding cube puzzle that require a minimum of n moves to be reached, starting with the empty space at one of the enclosing cube corners.
Original entry on oeis.org
1, 3, 9, 30, 102, 324, 1029, 3096, 9960, 30732, 97932, 295924, 929202, 2766958, 8590731, 25271897, 77575820
Offset: 0
- Ji-Ha You, Three dimensional puzzle with blocks - has cube frame with hollow interior and movable blocks filled on one side with magnet. German Patent application DE-4106826 A1, March 4, 1991 - see link
-
# uses alst(), swap() in A089473
def moves3d(p, shape, fixed=None): # n x m x r puzzle
nxt, (n, m, r) = [], shape
L, z = n*m, p.find("-") # z: location of blank
zq, zr = divmod(z, L)
if zr > n - 1: nxt.append(swap(p, z, z-n)) # blank up
if zr < n*m-n: nxt.append(swap(p, z, z+n)) # blank down
if zr%n != 0: nxt.append(swap(p, z, z-1)) # blank left
if zr%n != n-1: nxt.append(swap(p, z, z+1)) # blank right
if zq > 0: nxt.append(swap(p, z, z-L)) # blank in
if zq < r - 1: nxt.append(swap(p, z, z+L)) # blank out
return [m for m in nxt if m.find("-") != fixed]
moves = lambda p, shape: moves3d(p, shape)
start, shape = "-123456789ABCDEFGHIJKLMNOPQ", (3, 3, 3)
print(alst(start, shape, maxd=12)) # Michael S. Branicky, Dec 28 2020
A090576
Number of configurations of the 3-dimensional 3 X 3 X 3 sliding cube puzzle that require a minimum of n moves to be reached, starting with the empty space at mid-side of one of the 12 edges of the combination cube.
Original entry on oeis.org
1, 4, 12, 40, 128, 412, 1251, 4026, 12362, 39624, 120012, 379132, 1130914, 3530916, 10402781, 32112656, 93427431
Offset: 0
a(1)=4 because the empty space located at mid-edge of one of the 12 edges of the assumed initial configuration can be replaced in the first move by any of the adjacent 2 cubes from the same edge or by the adjacent mid-face cubes of the 2 faces forming this edge.
-
# uses alst(), swap() in A089473, moves3d() in A090573
moves = lambda p, shape: moves3d(p, shape)
start, shape = "1-23456789ABCDEFGHIJKLMNOPQ", (3, 3, 3)
print(alst(start, shape, maxd=12)) # Michael S. Branicky, Dec 28 2020
A090574
Number of configurations of the 3-dimensional 3 X 3 X 3 sliding cube puzzle that require a minimum of n moves to be reached, starting with the empty space in the center of the combination cube.
Original entry on oeis.org
1, 6, 24, 72, 192, 624, 2004, 6504, 19776, 62760, 186000, 583712, 1720972, 5344088, 15565416, 47816092, 137916958
Offset: 0
a(1)=6 because the empty space in the center of the cube present in the assumed initial configuration can be replaced by any of the 6 adjacent cubes from the face centers in the first move.
-
# uses alst(), swap() in A089473, moves3d() in A090573
moves = lambda p, shape: moves3d(p, shape)
start, shape = "123456789ABCD-EFGHIJKLMNOPQ", (3, 3, 3)
print(alst(start, shape, maxd=12)) # Michael S. Branicky, Dec 28 2020
Showing 1-3 of 3 results.
Comments