Dactyloscopy of the Rubik's Cube. Uniqueness Day.

swipymam

Regular
Joined
Sep 24, 2024
Messages
49
Location
Israel
The longest personal name belonged to Hubert Blaine Wolfeschlegelsteinhausenbergerdorff Sr. His full name, registered in the Guinness Book of World Records, consists of 26 given names (one for each letter of the English alphabet) and an exceedingly long and meaningful surname. In total, the name contains 747 letters. In everyday life, he used much shorter versions of his name, such as Hubert B. Wolfeschtern or Mr. Wolfe+585. By the end of the 1980s, the "Longest name" category had disappeared.

Apparently, it became clear that with the birth of the Rubik's Cube in 1974, the number of solutions for any given position would cause a continuous stream of applications for inclusion in the record book. The time has come for any position of the Rubik's Cube to acquire its own abbreviated name, like Mr. Wolfe+585.

Let's declare July 4th as Rubik's Cube Position Uniqueness Day. The date was chosen for mnemonic reasons; we don't say Independence from Great Britain Day, but simply Independence Day. Now, July 4th will also be Uniqueness Day. From this day forward, every position of the Rubik's Cube can be assigned a single unique name, while retaining all other names (based on face rotations).

For the "dactyloscopy" of each Rubik's Cube position, I propose using the browser-based UNLICENSE program https://vibcatch24.github.io/R-CS/ , where each position has a unique 18-character fingerprint (cod Catch-24). Such a unique position code can be obtained either by coloring or from the solutions for the position itself. This code can be used in competitions for control-checking a position after scrambling, or for obtaining positions before solving them, comparing positions with each other, analyzing them, and much more.

Scramble/Solution: U2 F U D F' R L F' U' D' F' R L F' U D B' R L U D R L (23f, 24q, 16t)
Catch-24: ifiififshshhshsttt
R-CS mob.jpg


Catch-24 retains the option to expand the 18-character code to 24 characters (by incorporating 6 characters for the state of the face centers), thereby additionally highlighting not only the year of its creation but also its possible length.
faces cath24.jpg

P.S. Certainly, there are systems that can produce an even more compact code. The minimum binary representation for the cube's states is 66 bits (or approximately 7.4 x 10^19, which exceeds the total number of possible states, about 4.3 x 10^19). Further compression of the state's representation could be achieved by using the internal symmetries of the Rubik's Cube or by applying specialized methods of signature code compression with irreducible polynomials. But the purpose of creating the Catch-24 code was somewhat different—to get a native code that briefly and explicitly describes the state of all the cube's elements (faces, corners, and edges) for later analysis and use.
 
Last edited:
Certainly, there are systems that can produce an even more compact code
I took this as an interesting challenge, and I think I got 14-character codes.

First, we determine an 'order' or pieces for both corners and edges. I will use UBL, UBR, UFR, UFL, DFL, DFR, DBR, DBL for corners and UB, UR, UF, UL, FL, FR, BR, BL, DF, DR, DB, DL for edges. Now we create a 20-tuple (a_1, ..., a_8, b_1, ..., b_12) to represent the orientations of the pieces in order, where a_i ∈ {0, 1, 2} are the corners, and b_i ∈ {0, 1} the edges. For the edges, 0 represents oriented, 1 represents misoriented. For corners, 0 represents oriented, 1 represents a corner that needs 1 clockwise rotation to be solved and 2 represents a corner that needs 2 clockwise rotations (i.e. 1 counterclockwise rotation) to be solved. There are two ways to do this, one where a_1 represents the corner that *goes* in the UBL spot and so on, and the other where a_1 represents the corner that *is currently* in the UBL spot and so on. I will use the latter. Now define the bijection f: (Z/3)^8 × (Z/2)^12 → {0, 1, ..., 268733855}, (a_1, ..., a_8, b_1, ..., b_12) ↦ 4096*∑_{i=1}^8a_i*3^(8−i)+∑_{j=1}^12b_j*2^{12−j}. This is injective because 2,3 are coprime, and surjective because it is injective and the results are always integers with the minimum being 0 and the maximum being 8192*3280+4095=26873855. Now represent f(a_1, ..., a_8, b_1, ..., b_12) in base 36 and you get a 5-character representation of the orientations of the pieces. (You can also use f(a_1, ..., a_8, b_1, ..., b_12) + 1 to get G0000 as maximum value since 268733855 = 16*36^4, but 00000 seems nice to have for the solved state, so I won't do this)

Now, represent the corner permutation as you would expect, so (01234567) is a solved cube, (10234567) has the UBL and UBR corners swapped, etc. Use Lehmer code and interpret the outcome as a number in the factorial system and convert to base 36. This gives a 3-character number with maximum V3Z. Do the same for edge permutation giving a 6-character number and concatenate the results. Note that again, the solved state gives only zeros after Lehmer code, ensuring that the string for the solved state is just 14 zeros.

Example:
D2 F2 R2 B2 U2 R' F2 R B2 F2 R' B' D' F R' B' D' U2 F2 U'
f(2 2 2 2 0 2 0 2 0 1 1 1 0 1 0 1 0 0 0 1) = 26625873 = FUONL
(3 4 6 0 5 2 7 1) ↦ (3 3 4 0 2 1 1 0) ↦ 17775 = DPR
(11 3 0 5 4 8 7 9 10 1 2 6) ↦ (11 3 0 3 2 4 3 3 3 0 0 0) ↦ 450105570 = 7FZBOI
Final string: FUONLDPR7FZBOI

Note: with only numbers and letters, the optimal character length is 13, since that is the first integer n with 36^n > 43,252,003,274,489,856,000. Now the way I described actually encodes for all rubiks cube states including edge flips, corner twists and impossible parity cases, so maybe you can optimize more by taking those restrictions into account, but I do not think this alone will reduce character count, because the leading digit of the maximum result of the orientation part is F>6 and that of the respective permutation parts are V,7 > 2.

Edit: Maybe this works for 13 character codes:
For 13 character codes:

Use 18-tuples (a_1, ..., a_7, b_1, ..., b_11) and f: (Z/3)^7 × (Z/2)^11 → {0, 1, ..., 4477951}, (a_1, ..., a_7, b_1, ..., b_11) ↦ 2048*∑_{i=1}^7a_i*3^(7−i)+∑_{j=1}^11b_j*2^{11−j}. Don’t convert to base 36 yet. Call this number o

Corner permutation remains the same, but don’t convert to base 36 yet. Call this number c.

Edge permutation: Almost the same but if the edge permutation is even, divide the result by 2. Else, treat edge permutation as having 0 and 1 swapped and divide the result by 2. This is not a bijection but no information is lost because the corner permutation stores the even/oddness of the edge permutation as well. This number is e.

(o,c,e) ↦ o*8!*12!/2 + c*12!/2+e is an injection of which the result is at most 4478975*8!*12!/2 + 8!*12!/2 < 36^12 so converting to base 36 gives a 13 character string
 
Last edited:
I took this as an interesting challenge, and I think I got 14-character codes
A code using Base64 would provide the shortest representation at 11 characters. Why not consider it?
If you read the postscript, you would see that the goal of the Catch-24 code is about more than simply minimizing the character count.
 
A code using Base64 would provide the shortest representation at 11 characters. Why not consider it?
If you read the postscript, you would see that the goal of the Catch-24 code is about more than simply minimizing the character count.
Yes and base 43252003274489856000 allows for single character codes. I was going with 36 because I was only using numbers and letters. I did indeed read the postscript (I literally quoted a part of it lol) but as mentioned, I mostly took the minimizing characters part as an interesting challenge.
 
For the "superflip composed with four spots" position alone, 92 optimal solutions can be written, and that's not including interchanges of move pairs on opposite faces. It's no wonder it's confusing. This is yet another reason why a standard is needed for encoding a position by more than just a sequence of face moves.
 
Back
Top