As of May 4 2007 the scripts will autodetect your timezone settings. Nothing here has to be changed, but there are a few things

Please follow this blog

Search this blog

Thursday, November 4, 2010

Quaternion group as a Freegroup

The Quaternion group can be defined as follows $\{(a,b) : a^4=e,b^4=e,a^2=b^2,ab=ba^3\}$. Let's be practical and set a=i, b=j and let's implement this in Mathematica.

The following Mathematica code

$r:=\{ \text{iiii} \to \text{""} , \text{jjjj} \to \text{""} ,\text{ii} \to \text{jj},\text{ij} \to \text{jiii}\}$

$f[\text{x_}]:=\text{StringReplace}[x,r]$

$\text{NestList}[f,\text{"ijij"},5]$

yields:

$\{\text{ijij},\text{jiiijiii},\text{jjjjiiijji},\text{jjjiiiji},\text{jjjjjjiiii},\text{jj}\}$


Let me explain. The variable $r$ is a list which contains four ( production ) rules, i.e.:
$\text{iiii} \to \text{""}$ - Says that $i^4 = 1$.
$\text{jjjj} \to \text{""}$ - Says that $j^4 = 1$.
$\text{ii} \to \text{jj}$ - Says that $i^2 = j^2$. And $i^2=-1$ as we know.
$\text{ij} \to \text{jiii}$ - Says that $ij = jiii$. Or $ij=-ji$.

The command $f[\text{x_}]:=\text{StringReplace}[x,r]$ takes a string as input and applies the production rules once from left to right. This command can be repeated until the input string no longer changes. In the case of $"ijij"$ it took $5$ times and the input and resp. outputs were as follows.

$\{\text{ijij}$,
$\text{jiiijiii}$,
$\text{jjjjiiijji}$,
$\text{jjjiiiji}$,
$\text{jjjjjjiiii}$,
$\text{jj}\}$

As you see $(ij)^2=k^2$ is correctly evaluated to $j^2=-1$.

From here on it's fairly easy to generate all elements from the quaternion group by string concatenation and applying the production rules.

No comments:

Post a Comment

Popular Posts

Welcome to The Bridge

Mathematics: is it the fabric of MEST?
This is my voyage
My continuous mission
To uncover hidden structures
To create new theorems and proofs
To boldly go where no man has gone before




(Raumpatrouille – Die phantastischen Abenteuer des Raumschiffes Orion, colloquially aka Raumpatrouille Orion was the first German science fiction television series. Its seven episodes were broadcast by ARD beginning September 17, 1966. The series has since acquired cult status in Germany. Broadcast six years before Star Trek first aired in West Germany (in 1972), it became a huge success.)