11-1100/Assignment I - Permutation Counting: Difference between revisions
Josh.seaton (talk | contribs) No edit summary |
Josh.seaton (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
The puzzle that I have chosen is a 2x2x3 variant of the Rubik's cube. Below is a sketch of how I have labelled |
The puzzle that I have chosen is a 2x2x3 variant of the Rubik's cube. Below is a sketch of how I have labelled. |
||
[[2x2x3 Permutation Puzzle]] |
[[2x2x3 Permutation Puzzle]] |
||
Line 5: | Line 5: | ||
Here are the generators |
Here are the generators: |
||
g1 = [1,2,3,4,12,22,7,8,6,11,21,28,13,14,15,16,17,18,5,10,20,27,23,24,25,26,9,19,29,30,31,32] |
g1 = [1,2,3,4,12,22,7,8,6,11,21,28,13,14,15,16,17,18,5,10,20,27,23,24,25,26,9,19,29,30,31,32] |
||
Line 19: | Line 19: | ||
[[NCGE Python Code]] |
[[NCGE Python Code]] |
||
First, the class of permutations is defined, along with how to multiply them and take their inverses. Then, algorithm is spelled out. |
|||
The algorithm yields that their are '''39016857600''' different configurations of the 2x2x3 puzzle. The algorithm was subsequently checked with the Rubik's cube generators given on [http://www.math.toronto.edu/~drorbn/Talks/Mathcamp-0907/NCGE.pdf the handout] and the correct numbers were outputted. |
Revision as of 22:58, 10 October 2011
The puzzle that I have chosen is a 2x2x3 variant of the Rubik's cube. Below is a sketch of how I have labelled.
Here are the generators:
g1 = [1,2,3,4,12,22,7,8,6,11,21,28,13,14,15,16,17,18,5,10,20,27,23,24,25,26,9,19,29,30,31,32]
g2 = [1,2,13,23,5,6,7,4,9,10,11,12,30,14,15,16,17,3,19,20,21,22,29,24,25,26,27,28,8,18,31,32]
g3 = [14,24,3,4,5,6,2,8,9,10,11,12,13,32,16,26,1,18,19,20,21,22,23,31,15,25,27,28,29,30,7,17]
g4 = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,22,23,24,25,26,17,18,19,20,21,32,31,30,29,28,27]
This is the Python code used to implement the NCGE algorithm for the 2x2x3 puzzle.
First, the class of permutations is defined, along with how to multiply them and take their inverses. Then, algorithm is spelled out.
The algorithm yields that their are 39016857600 different configurations of the 2x2x3 puzzle. The algorithm was subsequently checked with the Rubik's cube generators given on the handout and the correct numbers were outputted.