megaminx: megaminx

megaminxR Documentation

megaminx

Description

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.

Author(s)

Robin K. S. Hankin

See Also

megaminx_plotter

Examples


data(megaminx)
megaminx
megaminx^5  # should be the identity
inverse(megaminx)  # turn each face anticlockwise


megaminx_colours[permprod(megaminx)]  # risky but elegant...

W    # turn the White face one click clockwise (colour names as per the
     # table above)


megaminx_colours[as.word(W,129)]      # it is safer to ensure a size-129 word;
megaminx_colours[as.word(W)]          # but the shorter version will work


# 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)





permutations documentation built on Sept. 11, 2024, 6:10 p.m.