11-1100/Assignment I - Permutation Counting: Difference between revisions

From Drorbn
Jump to navigationJump to search
No edit summary
No edit summary
Line 17: Line 17:


This is the Python code used to implement the NCGE algorithm for the 2x2x3 puzzle.
This is the Python code used to implement the NCGE algorithm for the 2x2x3 puzzle.

[[Media:NCGE_code.txt]]
[[Media:NCGE_code.txt]]

Revision as of 23:41, 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 it along with the permutation generators.

2x2x3 Permutation Puzzle


Here are the generators again:

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.

Media:NCGE_code.txt