11-1100/MATLAB Code for Non-Commutative Gaussian Elimination

From Drorbn
Revision as of 16:06, 9 October 2011 by Jmracek (talk | contribs)
Jump to navigationJump to search

I wrote a MATLAB script to carry out the non-commutative Gaussian elimination algorithm. Specifically, I have chosen to use the problem of the 2x2x2 pocket cube; however, this algorithm may be easily adapted for finding the solution to other combinatorial puzzles. The structure of the script is very similar to Dror's code. I call the "Feed" script for each generator of the puzzle, but the built in recursion takes care of finding an empty spot in the table, as well as all the messiness of feeding all products of everything in the table.

My solution is slightly different, however, in that I carry out group operations using matrix representations of the generators. I picked a representation of the group in which every matrix was comprised of only 1's and 0's. This is useful, because it easily allows me to compute products, inverses, and find pivot points. The representation of which I write can be constructed by considering the action of on an n-dimensional vector space. As an example, consider the permutation . This permutation takes 1 -> 2, 2 -> 3, and 3 -> 1; thus, the matrix representation of this operation is:

From a computational standpoint this is kind of a bad idea, but I figured it was something different and no one else was likely to try this.

I split the program into 3 parts: BG2.m is a short script which

BG2.jpg Feed.jpg PocketCube.jpg</math>