Project Links
Home Page
Project Report
(1024 KB)
26/06/2001
Finished Applet
21/02/2001
Post-Hasse
11/12/2000
Pre-Hasse
3/12/2000
Project Update
12/11/2000
Matrix Groups
27/10/2000
Example Applets
16/10/2000
Hello Applet
4/10/2000
|
Matrix Group Calculator: Finished Version
Since the last update, the finishing touches have been applied to the Applet. I cleaned up the code, adding comments and formatting properly. An algorithm has been added for improving the presentation of the group when the number of generators is two or three. The associativity of matrix multiplication has been exploited in that brackets have been omitted in the group presentation. Finally, I added a button for saving the Hasse diagram to a Jpeg file. Note that this button only works when the Applet is run in JBuilder, etc., and does NOT work on the Internet because of security considerations.
Matrix Group Calculator, Finished Version (See below for operating instructions)
(Final Source Code: GroupApplet.java, Matrix3x3.java, GroupList.java, links.java, HasseCanvas.java, JpegEncoder.java. JBuilder Files & Code in zip format: code.zip)
Code Compiled on 21st February, 2001
Operating Instructions
(Click here for an example on the use of the Applet)
There are two halves to the above Applet. The top half deals with input (left matrix) and output (right matrix). The bottom half deals with the Hasse diagram.
Entering Generators
When the program starts, you may enter a generator by changing the values in the top left hand matrix, specifying a name for the generator in the dark grey box, and clicking on the "+" button to add the generator. As long as the determinant of the matrix is 1 or -1,* (the only restriction on the type of matrices allowed) the generator will be stored. Note that the identity matrix is stored by default and is not required to be entered.
When you have added the first generator, note that the grey box underneath the output area in the top right now reads "Matrix 1 of 2: I". This indicates that you have successfully entered your generator, as there are now 2 matrices stored in memory. Click on the "Next" button to see your generator in the list, and on the "D" button to return to the beginning of the list. (At any stage the "D" button (D for 'Display') displays the group and any new generators you may have added)
You may now enter (if you wish) more generators by changing the values and clicking "+" again. You can do this at any stage during the execution of the program. The only thing to note is that you must specify a different name for each generator.
* 3×3 matrices with determinant 1 or -1 belong to the Orthogonal Group O(3). The Applet deals with these matrices only.
Group Calculation
When you have finished entering your generators and wish to calculate the group generated by these generators, click on the "G" button. The group is calculated and is displayed in the output area (top right). The grey bar will now read "Group 1 of n: I" where n is the number of elements in your calculated group. Hit "Next" to go through the elements of your group, which will show you the matrix associated with that element and the "name" for that element. For example, if you have one generator called P of order 3, you might see "Group 1 of 3: I", "Group 2 of 3: P" (as shown) and "Group 3 of 3: PP". At any stage, click on the "G" (G for 'Group') button again to go to the beginning of the list.
If you have selected generators that generate an infinite group, the message "MEMORY ERROR!" will appear and you will have to reset all data by clicking on the "R" button to start all over again.
Subgroups
The next stage is to calculate all the subgroups of your group. To do this, click on the "S" (S for 'Subgroups') button. If you have a large group, a progress indicator will appear and tell you how much processing is left to be done. Once this has finished, the subgroups will appear in the output area. For each subgroup, click on the "Next" button to scroll through the elements of that subgroup. When you are done, click on the "Next Subgroup" button to view the following subgroup. As before, clicking "S" again will return you to the beginning of the subgroup list.
Note that the subgroups are ordered with respect to their size or order. Therefore, the first subgroup shown will always be the subgroup consisting of just the identity matrix, and the last subgroup shown will always be the whole group. Any intermediate subgroups will have order which divides into the order of the group. As for the elements of each subgroup, these are ordered according to the order of multiplication. The first element of any subgroup will be the identity matrix.
Hasse Diagram
Having computed all the subgroups of a given group, the final stage is to draw the Hasse diagram describing the group-subgroup relationships. To see the Hasse diagram for your group, click on the "H" (H for 'Hasse') button. This assumes that you have previously clicked on the "S" button to compute the subgroups. If you have not done this, the "H" button will be unavailable.
![[Hasse Diagram]](hasse.gif)
When you click on "H", the bottom half of the Applet will be activated. Let us work through the bar at the bottom of the Applet which contains the Hasse diagram controls.
The button denoted by "Save" exports the Hasse diagram into a Jpeg picture which is stored in the default directory of the Java Interpreter you are using. It is important to note that this button will NOT work on the Internet because of security restrictions. It will however work when the Applet is run in JBuilder, etc. Either way, clicking on the button will generate a message which will appear on the status bar underneath the input area. This will either display "Export Completed" or "Error Saving Image to File (Security)" depending on where you will be using the Applet.
![[Error]](error.gif)
The next item along is a checkbox titled "Show All Links". Clicking on this button will show the redundant "missing" links taken out during the calculation of the diagram. In fact, what happens during calculation is the following: if there is a link from subgroup A to subgroup B, and a link from subgroup B to subgroup C, then there is no need for a link from subgroup A to subgroup C because of transitivity. So we delete all such links. By clicking on the "Show All Links" button, the program draws (in blue) all the links that were previously erased.
The final part of the "controls" consists of three drop down lists called "S", "G" and "D". S represents Spacing, G represents Granularity and D represents Display.
| Spacing |
Changes the spacing between different nodes in the Hasse diagram i.e. the distance between two yellow boxes. Experiment with different values to see the effect.
|
| Granularity |
Changes the "shuffle" or "pyramid" effect. This means that if there are 3 boxes in a straight vertical line, with a link going through all three, you cannot tell if there is one link linking the bottom node to the top node or if there are two links, one linking the bottom node to the middle node, and one linking the middle node to the top node. In this case you need to change the granularity to "shift" some of the nodes left and right to eliminate this ambiguity. Again experiment with different values, and set it to zero to see why it is needed.
|
| Display |
In the diagram itself, the nodes representing subgroups are labelled with numbers. To see which subgroup corresponds to a number in the diagram, select the number in the drop down list and the subgroup will appear in the output area in the top right. |
Tips
- When you pass the mouse over a button, the button's action will be displayed in the black status bar running through the middle of the Applet.
- If a button is unavailable, this means that another action is needed before it can become available.
- If you have made a mistake e.g. incorrectly entered a generator, click the "R" (R for 'Reset') button to effectively start the program from scratch again.
- Try to use single (capital) letters as names for your generators. This way it will be easier to read off the elements of subsequently calculated groups and subgroups.
|