# /usr/bin/node /home/cubeman/prog/cubing.js-special/dist/bin/puzzle-geometry-bin.js --ksolve --optimize --gap --moves U,D,L,R,F,B,2F,2U,2R 3x3x3 # PuzzleGeometry 0.1 Copyright 2018 Tomas Rokicki. # c f 0.333333333333333 optimize true movelist U,D,L,R,F,B,2F,2U,2R M_FN:=(7,26,15,10)(8,25,16,9)(31,50,40,35)(32,51,41,36)(33,49,42,34); M_BN:=(11,18,19,28)(12,17,20,27)(37,45,52,48)(38,43,53,46)(39,44,54,47); M_2FN:=(2,6,5,3)(13,22,29,24)(14,21,30,23); M_UN:=(21,27,29,25)(22,28,30,26)(31,37,46,49)(32,38,47,50)(33,39,48,51); M_DN:=(9,23,17,13)(10,24,18,14)(34,40,52,43)(35,41,53,44)(36,42,54,45); M_2DN:=(1,5,4,2)(7,16,19,12)(8,15,20,11); M_LN:=(15,29,19,23)(16,30,20,24)(40,51,46,54)(41,49,47,52)(42,50,48,53); M_RN:=(7,13,11,21)(8,14,12,22)(31,36,43,39)(32,34,44,37)(33,35,45,38); M_2LN:=(1,6,4,3)(9,26,27,18)(10,25,28,17); ip:=[[1],[2],[3],[4],[5],[6],[7],[9],[11],[13],[15],[17],[19],[21],[23],[25],[27],[29],[31],[34],[37],[40],[43],[46],[49],[52]]; F := M_FN ^-1; B := M_BN ^-1; L := M_LN ^-1; R := M_RN ^-1; U := M_UN ^-1; D := M_DN ^-1; L2 := L^2; R2 := R^2; D2 := D^2; generators := [U, D, L, R, F, B]; move_names := ["U", "D", "L", "R", "F", "B"]; M_2F := M_2FN ^-1; M_2D := M_2DN ^-1; M_2L := M_2LN ^-1; Gen:=[ F,B,L,R,U,D ]; cube := Group(Gen); # p2 is the process that generates the 6xo3 pattern p2 := R^2 * L^-1 * D * F^2 * R^-1 * D^-1 * F * B^-1 * U * D^-1 * F * L * D^2 * F^-1 * R * L^2; Print ("\nsolving the 6xo3 position, storing solution in variable sol"); t := Runtime(); # start timing fg := FreeGroup ("U", "D", "L", "R", "F", "B"); testo := Group (U, D, L, R, F, B); hom := GroupHomomorphismByImagesNC (fg, testo, GeneratorsOfGroup(fg), GeneratorsOfGroup(testo)); sol := PreImagesRepresentative( hom, p2); Print ("\nThe solutions is \n", sol); elapsed := Runtime() - t; # elapsed milliseconds Print("\nSolution found in ", elapsed, "/1000 seconds (rational format):\n"); Print("\nSolution length in quarter turns ", Length(sol), "\n");