megaminx
megaminx.Rd
A set of generators for the megaminx group
Details
Each element of megaminx
corresponds to a clockwise turn of 72
degrees. See the vignette for more details.
megaminx[, 1] | W | White | megaminx[, 2] |
Pu | Purple | megaminx[, 3] | DY |
Dark Yellow | megaminx[, 4] | DB | Dark Blue |
megaminx[, 5] | R | Red | megaminx[, 6] |
DG | Dark Green | megaminx[, 7] | LG |
Light Green | megaminx[, 8] | O | Orange |
megaminx[, 9] | LB | Light Blue | megaminx[,10] |
LY | Light Yellow | megaminx[,11] | Pi |
Pink | megaminx[,12] | Gy | Gray |
Vector megaminx_colours
shows what colour each facet has at
start. Object superflip
is a megaminx operation that
flips each of the 30 edges.
These objects can be generated by running script
inst/megaminx.R
, which includes some further discussion and
technical documentation and creates file megaminx.rda
which
resides in the data/
directory.
Examples
data(megaminx)
megaminx
#> White
#> (10,12,14,16,18)(11,13,15,17,19)(21,33,45,57,69)(22,34,46,58,60)(23,35,47,59,61)
#> Purple
#> (15,67,91,81,35)(16,68,92,82,36)(17,69,93,83,37)(20,22,24,26,28)(21,23,25,27,29)
#> DarkYellow
#> (17,29,89,79,47)(18,20,80,70,48)(19,21,81,71,49)(30,32,34,36,38)(31,33,35,37,39)
#> DarkBlue
#> (10,32,78,118,50)(11,33,79,119,51)(19,31,77,117,59)(40,42,44,46,48)(41,43,45,47,49)
#> Red
#> (11,43,115,105,61)(12,44,116,106,62)(13,45,117,107,63)(50,52,54,56,58)(51,53,55,57,59)
#> DarkGreen
#> (13,55,103,93,23)(14,56,104,94,24)(15,57,105,95,25)(60,62,64,66,68)(61,63,65,67,69)
#> LightGreen
#> (30,88,120,110,40)(31,89,121,111,41)(39,87,129,119,49)(70,72,74,76,78)(71,73,75,77,79)
#> Orange
#> (27,99,121,71,37)(28,90,122,72,38)(29,91,123,73,39)(80,82,84,86,88)(81,83,85,87,89)
#> LightBlue
#> (25,65,101,123,83)(26,66,102,124,84)(27,67,103,125,85)(90,92,94,96,98)(91,93,95,97,99)
#> LightYellow
#> (53,113,125,95,63)(54,114,126,96,64)(55,115,127,97,65)(100,102,104,106,108)(101,103,105,107,109)
#> Pink
#> (41,75,127,107,51)(42,76,128,108,52)(43,77,129,109,53)(110,112,114,116,118)(111,113,115,117,119)
#> Grey
#> (73,85,97,109,111)(74,86,98,100,112)(75,87,99,101,113)(120,122,124,126,128)(121,123,125,127,129)
megaminx^5 # should be the identity
#> White Purple DarkYellow DarkBlue Red DarkGreen
#> () () () () () ()
#> LightGreen Orange LightBlue LightYellow Pink Grey
#> () () () () () ()
inverse(megaminx) # turn each face anticlockwise
#> White
#> (10,18,16,14,12)(11,19,17,15,13)(21,69,57,45,33)(22,60,58,46,34)(23,61,59,47,35)
#> Purple
#> (15,35,81,91,67)(16,36,82,92,68)(17,37,83,93,69)(20,28,26,24,22)(21,29,27,25,23)
#> DarkYellow
#> (17,47,79,89,29)(18,48,70,80,20)(19,49,71,81,21)(30,38,36,34,32)(31,39,37,35,33)
#> DarkBlue
#> (10,50,118,78,32)(11,51,119,79,33)(19,59,117,77,31)(40,48,46,44,42)(41,49,47,45,43)
#> Red
#> (11,61,105,115,43)(12,62,106,116,44)(13,63,107,117,45)(50,58,56,54,52)(51,59,57,55,53)
#> DarkGreen
#> (13,23,93,103,55)(14,24,94,104,56)(15,25,95,105,57)(60,68,66,64,62)(61,69,67,65,63)
#> LightGreen
#> (30,40,110,120,88)(31,41,111,121,89)(39,49,119,129,87)(70,78,76,74,72)(71,79,77,75,73)
#> Orange
#> (27,37,71,121,99)(28,38,72,122,90)(29,39,73,123,91)(80,88,86,84,82)(81,89,87,85,83)
#> LightBlue
#> (25,83,123,101,65)(26,84,124,102,66)(27,85,125,103,67)(90,98,96,94,92)(91,99,97,95,93)
#> LightYellow
#> (53,63,95,125,113)(54,64,96,126,114)(55,65,97,127,115)(100,108,106,104,102)(101,109,107,105,103)
#> Pink
#> (41,51,107,127,75)(42,52,108,128,76)(43,53,109,129,77)(110,118,116,114,112)(111,119,117,115,113)
#> Grey
#> (73,111,109,97,85)(74,112,100,98,86)(75,113,101,99,87)(120,128,126,124,122)(121,129,127,125,123)
megaminx_colours[permprod(megaminx)] # risky but elegant...
#> [1] Black Black Black Black Black Black
#> [7] Black Black Black DarkBlue DarkBlue Red
#> [13] DarkGreen DarkGreen DarkGreen Purple Purple DarkYellow
#> [19] DarkYellow Purple DarkYellow DarkYellow Red DarkGreen
#> [25] LightBlue LightBlue LightGreen Orange Purple LightGreen
#> [31] DarkYellow DarkYellow DarkBlue DarkBlue White White
#> [37] LightBlue Orange LightGreen LightGreen LightYellow Pink
#> [43] Pink DarkBlue Red Red White White
#> [49] Orange White LightGreen Pink LightBlue LightYellow
#> [55] Red Red Purple DarkGreen White White
#> [61] White White Pink LightYellow LightYellow DarkGreen
#> [67] Orange LightBlue White DarkYellow DarkYellow Orange
#> [73] Grey Grey Grey LightGreen Red Pink
#> [79] Purple DarkYellow DarkGreen Purple Orange LightBlue
#> [85] LightBlue Orange Pink Grey DarkBlue Grey
#> [91] DarkYellow Purple Purple Purple Red LightYellow
#> [97] LightYellow LightBlue Grey LightYellow Grey Grey
#> [103] DarkGreen DarkGreen DarkBlue Red LightYellow Pink
#> [109] Pink DarkBlue Orange Pink Grey Grey
#> [115] DarkGreen Red DarkBlue DarkBlue Pink LightGreen
#> [121] LightGreen LightGreen Orange Orange LightBlue LightBlue
#> [127] LightYellow LightYellow LightGreen
W # turn the White face one click clockwise (colour names as per the
#> White
#> (10,12,14,16,18)(11,13,15,17,19)(21,33,45,57,69)(22,34,46,58,60)(23,35,47,59,61)
# table above)
megaminx_colours[as.word(W,129)] # it is safer to ensure a size-129 word;
#> [1] Black Black Black Black Black Black
#> [7] Black Black Black White White White
#> [13] White White White White White White
#> [19] White Purple DarkYellow DarkYellow DarkYellow Purple
#> [25] Purple Purple Purple Purple Purple DarkYellow
#> [31] DarkYellow DarkYellow DarkBlue DarkBlue DarkBlue DarkYellow
#> [37] DarkYellow DarkYellow DarkYellow DarkBlue DarkBlue DarkBlue
#> [43] DarkBlue DarkBlue Red Red Red DarkBlue
#> [49] DarkBlue Red Red Red Red Red
#> [55] Red Red DarkGreen DarkGreen DarkGreen Purple
#> [61] Purple DarkGreen DarkGreen DarkGreen DarkGreen DarkGreen
#> [67] DarkGreen DarkGreen Purple LightGreen LightGreen LightGreen
#> [73] LightGreen LightGreen LightGreen LightGreen LightGreen LightGreen
#> [79] LightGreen Orange Orange Orange Orange Orange
#> [85] Orange Orange Orange Orange Orange LightBlue
#> [91] LightBlue LightBlue LightBlue LightBlue LightBlue LightBlue
#> [97] LightBlue LightBlue LightBlue LightYellow LightYellow LightYellow
#> [103] LightYellow LightYellow LightYellow LightYellow LightYellow LightYellow
#> [109] LightYellow Pink Pink Pink Pink Pink
#> [115] Pink Pink Pink Pink Pink Grey
#> [121] Grey Grey Grey Grey Grey Grey
#> [127] Grey Grey Grey
megaminx_colours[as.word(W)] # but the shorter version will work
#> [1] Black Black Black Black Black Black
#> [7] Black Black Black White White White
#> [13] White White White White White White
#> [19] White Purple DarkYellow DarkYellow DarkYellow Purple
#> [25] Purple Purple Purple Purple Purple DarkYellow
#> [31] DarkYellow DarkYellow DarkBlue DarkBlue DarkBlue DarkYellow
#> [37] DarkYellow DarkYellow DarkYellow DarkBlue DarkBlue DarkBlue
#> [43] DarkBlue DarkBlue Red Red Red DarkBlue
#> [49] DarkBlue Red Red Red Red Red
#> [55] Red Red DarkGreen DarkGreen DarkGreen Purple
#> [61] Purple DarkGreen DarkGreen DarkGreen DarkGreen DarkGreen
#> [67] DarkGreen DarkGreen Purple
# Now some superflip stuff:
X <- W * Pu^(-1) * W * Pu^2 * DY^(-2)
Y <- LG^(-1) * DB^(-1) * LB * DG
Z <- Gy^(-2) * LB * LG^(-1) * Pi^(-1) * LY^(-1)
sjc3 <- (X^6)^Y * Z^9 # superflip (Jeremy Clark)
p1 <- (DG^2 * W^4 * DB^3 * W^3 * DB^2 * W^2 * DB^2 * R * W * R)^3
m1 <- p1^(Pi^3)
p2 <- (O^2 * LG^4 * DB^3 * LG^3 * DB^2 * LG^2 * DB^2 * DY * LG * DY)^3
m2 <- p2^(DB^2)
p3 <- (LB^2 * LY^4 * Gy * Pi^3 * LY * Gy^4)^3
m3 <- p3^LB
# m1,m2 are 32 moves, p3 is 20, total = 84
stopifnot(m1+m2+m3==sjc3)