• Welcome to the Speedsolving.com, home of the web's largest puzzle community!
    You are currently viewing our forum as a guest which gives you limited access to join discussions and access our other features.

    Registration is fast, simple and absolutely free so please, join our community of 40,000+ people from around the world today!

    If you are already a member, simply login to hide this message and begin participating in the community!

Lower bound for Megaminx in htm and qtm

Joined
Nov 29, 2008
Messages
276
I analyzed the number of generic move sequences to get lower bounds for God's number of Megaminx, taking into account the commutativity of moves. There are a lot of commutating moves because of the many disjoint faces of Megaminx. In htm, I found a lower bound of 45 moves and in qtm a lower bound of 55 moves.

I posted the details here:

http://cubezzz.dyndns.org/drupal/?q=node/view/328
 
I made a somewhat similar recursion a while back and ended up with, I think, 43 moves for the Megaminx. I'm not sure exactly where our techniques differ, but I do like this technique in general, as you can get some pretty nice results without a huge amount of work.

I assume, the techniques differ somehow, because the difference between 43 und 45 means that you have more than 1000 times the number of move sequences with 45 moves.
I would be really pleased, if
1. Someone could double check, that there are 25 unordered pairs of faces (X,Y), which have no pieces in common and either X or Y (or both) have pieces in common with some arbitrary different fixed face,e.g. U.
2. The same for 15 unordered triples (X,Y,Z), which have no pieces in common and either X or Y or Z have pieces in common with another different face, for example the U face.
3. Compute the true number of positions of Megaminx out to some depth in htm and qtm to check if the numbers are the same for the first ??? depths. This depends on the length of the shortest nontrivial identity. Btw, What is the shortest nontrivial identity on Megaminx?
 
Last edited:
In a private communication Tomas Rokicki pointed out recently that my argumentation concerning the commutating moves is too weak. Indeed not all commutative moves are taken into account in my argumentation and the lower bound 45 can be improved to 48 moves.
http://twistypuzzles.com/~sandy/forum/viewtopic.php?f=1&t=26168
shows an algorithm which gives the correct numbers.

Using the key idea given here - keeping track of the "recently used moves" - I found a pencil and paper method to compute the number of canonical sequences for each depth. If there is more than one recently used move these moves have to commute pairwise.
There are only 5 different types of "recently used moves":
0. No recently used move (this happens only at depth 0)
1. One recently used move
2. Two recently used moves. There are 2 types for this case. The two moves are opposite to each other or they are not opposite and do not share any cubies (else they would not commute).
3. Three recently used moves. Essentially there is only one case for three axes such that the moves commute pairwise.

Let us name the number of maneuvers of depth n which end with 0, 1, 2 or three recently used moves with a0(n), a1(n), a2a(n), a2b(n) and a3(n).
For depth 0 we have
a0(0) = 1, a1(0) = 0, a2a(0) = 0, a2b(0) = 0, a3(0) = 0

Analysing what happens when you append one move you find for n>=0:

a0(n+1) = 0
a1(n+1) = 4*(12*a0(n) + 5*a1(n) + 2*a2a(n))
a2a(n+1) = 4*(5*a1(n) + 4*a2a(n) + 10*a2b(n) + 3*a3(n))/2
a2b(n+1) = 4*(1*a1(n) + 2*a2a(n) + 3*a3(n))/2
a3(n+1) = 4*(2*a2a(n) + 3*a3(n))/3

The factor 4 takes into account that there are 4 possible moves for each axis, dividing by 2 or 3 takes into account that for commutative moves we only count a fraction of the possibilites.

The total number total (n) of canonical sequences of depth n then is given by

total(n) = a0(n)+a1(n)+a2a(n)+a2b(n)+a3(n) which gives

1, 48, 1536, 43520, 1182720, 31641600, 841318400, 22315008000, 591298560000, 15661924352000,....

Tom also gave me the number of true positions for each depth which is

1, 48, 1536, 43520, 1180800, 31471080,.....
which shows that all canonical sequences up to depth 3 give different positions.

I also found a simple linear recurrence for the number of canonical sequences for the megaminx which I think is really surprising

total(n+1) = 36 total(n) -240 total(n-1) -320 total(n-2), n>=3 and total(1)= 48, total(2) = 1536 and total(3) =43520.

This easily gives the lower bound of 48 moves. That this is the same number as the number of depth 1 maneuvers is coincidence. The same coicidence happens btw. for Rubik's cube, where the number of depth 1 maneuvers and the lower bound are both 18...

The asymtotic branching factor is the greatest zero of the corresponding characteristic polynomial x^3-(36 x^2-240x-320) which is about 26.4803 .

The above holds for HTM. I do not see how to give an easy similar argumentation for QTM.
 
Last edited:
total(n+1) = 36 total(n) -240 total(n-1) -320 total(n-2)
Why does this work? Is it just simplifing the equations above?

I just used this recurrence relations with the exact values for total(5), total(6), and total(7). Unfortuantely, it does not improve the lower-bound of 48.

Btw, do we know much about the UPPER-bound? I think there is a new one conjectured to be 119.
 
Last edited:
In a private communication Tomas Rokicki pointed out recently that my argumentation concerning the commutating moves is too weak. Indeed not all commutative moves are taken into account in my argumentation and the lower bound 45 can be improved to 48 moves.
http://twistypuzzles.com/~sandy/forum/viewtopic.php?f=1&t=26168
shows an algorithm which gives the correct numbers.
Unfortunately this link does not seem to be working anymore. I am going to utilize a very similar approach for a theorem in my thesis and I would like to make sure that I am not claiming credit for something that you and Tomas have done 9 years ago. I am not exactly sure what kind of algorithm you are talking about here, would you be willing to quickly summarize what was behind that link?
 
If you came up with it yourself it wouldn't be claiming credit belonging to someone else. Sometimes multiple people make the same discoveries independently.
That is fair, but I would still want to know what other background exists so I can get a better picture of the existing results and ideas. I might learn something new or find a better way to approach something. And I will give credit anyway, as I would not have come up with the recursive formulas myself, although I will give a proper proof ofc.
 
Unfortunately this link does not seem to be working anymore. I am going to utilize a very similar approach for a theorem in my thesis and I would like to make sure that I am not claiming credit for something that you and Tomas have done 9 years ago. I am not exactly sure what kind of algorithm you are talking about here, would you be willing to quickly summarize what was behind that link?

https://www.twistypuzzles.com/forum/viewtopic.php?f=1&t=26168 is working for me (delete the "~sandy/" part from the link you quoted and keep reloading the page until its content is fully displayed).
 
It appears to be up now but it's intermittent so I'll try and archive the content here:

Post subject: Puzzle Branching Factors (Mathy post)
Contrabass:
A nice way of bounding by below the longest solution on a puzzle is by a counting argument, for example on a cube there are 18 possible moves and so if there are p positions, then the length of the longest algorithm k must be such that the number of move sequences of length at most k must be at least p. The factor of 18 on a cube also is the branching factor on a naive brute force search to solve the cube. Both of these can be improved by noting that on a cube, preforming LR is the same as performing RL, so if you only allow one of these orders, the branching factor can be improved to under 14. This gives a larger lower bound on God's algorithm and speeds up the brute force search by a large factor (although other tricks are still needed to get a reasonable search).


I was curious as to how this would work for other puzzles, such as the Megaminx, where the commuting moves don't nicely pair up. I came up with a technique where you keep track of which moves have been used recently. For example, if you turn one face, there is no need to turn that face again until one of its adjacent faces. This means that if you have a graph with a vertex for each axis and pairs of vertices are connected if they don't commute, one has to keep track of an independent set of vertices and update the set when you make a new move, removing all of the adjacent points from the set and adding the new one. Furthermore, to take care of fixing the order between two commuting moves, give each axis a number and only allow a move if no commuting move with a lower number is currently in the set. This gives a system of recurrences (possibly many) that can give the total number of unique moves up to a given length. This means that there is a solution to the system of recurrences that is a sum of exponentials, so I wrote a program to calculate the largest of them (the largest eigenvalue of the related matrix).


In summary, the list below gives the branching factors of various puzzles, taking the fact that certain axes commute into account. The value for the listed polyhedron is assuming that the puzzle has an axis for each face and that axes commute if they don't share an edge; for example, the value for octahedron works for a dino cube, but not a face turning octahedron. It is assumed that if the polyhedron has n-fold symmetry around a face, then the face has n-1 possible moves. Note that this doesn't take jumbling or fudging into account, so a rhombic dodecahedron has only one move per face and the hexagons on the truncated octahedron have only two moves per face. The entries listed with values of big had too many independent sets for my program to calculate, but were included in the table for completions sake. As far as I know, only a few of these were previously known.



Tetrahedron: 6.0

Cube: 13.348469228349533

Octahedron: 8.418307885893643

Rhombic Dodecahedron: 5.645751311064589

Dodecahedron: 26.480303433871622

Icosahedron: 9.897936961398141

Rhombic Triacontahedron: 6.319918428462637


Truncated Tetrahedron: 11.132631540166239

Truncated Cube: 20.659251569084045

Truncated Octahedron: 16.57073441219379

Cuboctahedron: 13.13554100759743

Great Cuboctahedron: 20.338639289994845

Truncated Dodecahedron: 35.95476263148417

Truncated Icosahedron: 22.163447213360012

Icosidodecahedron: 13.13554100759743

Great Icosidodecahedron: big


Half truncated Cube: 7.664546987461376

4-truncated Rhombic Dodecahedron: 10.70522820695193

3-truncated Rhombic Dodecahedron: 8.948422488554135

5-truncated Rhombic Triacontahedron: 13.757663732948052

3-truncated Rhombic Triacontahedron: big

Hemi-Dodecahedron: 9.040294042680404

Hemi-Rhombic Dodecahedron: 4.449489742783179


I will be glad to clarify points in what is surely a pretty opaque post. There are some other thing that I hope to add soon, such as more exact lower bounds on God's algorithm for some of the puzzles like the nxnxn cubes.
Brandon Enright:
Your commuting faces metric forces the puzzle to be very shallow. It should work for a Megaminx but it won't work for a Pyraminx Crystal. Any chance you can recompute for a few different cut depths?


For the 26.480303433871622 value, I assume I can do something like:


? log(((20! / 2) * (30! / 2) * (3^20 / 3) * (2^30 / 2)) / 48) / log(26.480303433871622) + 1

% = 47.609450523099887034349233643719026861


This calculation assumes 48 choices for the first turn and 26.480303433871622 choices for the remaining moves giving a lower bound of 49 moves. Does this sound right?


Edit: fixed the math a bit.


Edit 2:


If I'm doing this right, the Rubik's cube would be:


? log((((8! * 12!) / 2) * (2^12 / 2) * (3^8 / 3)) / 18) / log(13.348469228349533) + 1

% = 17.332166195062793503264859496466053047


Or a lower bound of 18.
GuiltyBystander:

Great post and math. When I was working on my megaminx solver I used the exact same method to prevent redundant moves. I was only trying to test my turn rates so I didn't directly try to calculate the branch rate, but I can see how you did now. I only managed to guess ~26.50 after a depth 8 search.


Could you do the cube one again for higher order cubes like 4x4, 5x5, etc. ?


*slow poster so Brandon beat me*
bmenrigh wrote:Your commuting faces metric forces the puzzle to be very shallow. It should work for a Megaminx but it won't work for a Pyraminx Crystal. Any chance you can recompute for a few different cut depths?
Yeah, deeper depth cuts for the dodecahedron would be interesting too.

bmenrigh wrote:This calculation assumes 48 choices for the first turn and 26.480303433871622 choices for the remaining moves giving a lower bound of 49 moves. Does this sound right?
I could be wrong, but I think the 26.48 is the only number you should be using (don't ever use 48). It already takes everything into account. You don't really have 48 choices for the first move because if you want to do the move "CA" and the two faces aren't adjacent, you should be doing "AC" instead.
Brandon Enright:
There was a related discussion in this topic but I welcome the new discussion since there is probably a lot left to say in this area and I find the topic quite interesting.
(Note: references God's Number topic)
contrabass:
Here are some more requested branching factors:

Deeper cut dodecahedron: 41.90890230020664

4x4x4: 20.730509637946682

5x5x5: 28.120978779040065

6x6x6: 35.51482296942452

7x7x7: 42.910355416554786

17x17x17: 116.88890151869273

Gigaminx: 54.890296106968144

Teraminx: 83.31590766854173

Petaminx: 111.74542596469087

Examinx: 140.17650715312683


As for the exact counting methods, the values given are such that the largest term of the expression for the total number of moves of length k is c*b^k, where b is the branching factor and c is some constant. Taking the sum from j=0 to k of c*b^j gives about bc/(b-1) b^k. For all of the puzzles given, that factor bc/(b-1) is between 1 and 3.3, and for the megaminx, the factor is 1.4426236265623917.

Solving for k to get the number of positions for the megaminx give k=47.67914174495091, giving the bound of 48. In essence, this extra factor changes the value by a small amount, so just taking the logarithm of the number of positions and dividing by the logarithm of the branching factor will probably be within 0.5 of the correct answer and so will be within 1 of the correct bound. For the cube, the additional factor is 1.6282550728636884, giving k=17.259410632386267, so 18 is still the bound.
Bram:
I don't follow why there are non-integral branching factors. It seems like the branching factor should be the number of possible moves minus one. Some interesting branching factors if you go by that definition are that the Alternating Cube and Spider Gear have a branching factor of 2, and the Bramboules has a branching factor of 15.
contrabass:
The branching factors are non-integral because they are a weighted average of branching factors taking into account some moves that have already been accounted for. In the cube example, guaranteeing that there is no RL move (only LR moves) means that at the start there are 18 moves, if you have just performed an L move, there are 15 possible moves, and if you have performed an R move, there are 12 possible moves. Those states each have a certain likelihood to occur in a random scramble, and taking those into account gives an average branching factor of about 13.35.

If anyone thinks there’s an issue with me doing this please let me know and I’ll remove it.
 
Back
Top