Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jonghough/permuj
J scripts for calculating permutation groups
https://github.com/jonghough/permuj
group-theory j jlang permutation permutation-groups permutations subgroups
Last synced: about 2 months ago
JSON representation
J scripts for calculating permutation groups
- Host: GitHub
- URL: https://github.com/jonghough/permuj
- Owner: jonghough
- License: bsd-2-clause
- Created: 2014-07-10T14:56:51.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-03-09T14:19:09.000Z (almost 9 years ago)
- Last Synced: 2023-04-04T02:06:48.926Z (over 1 year ago)
- Topics: group-theory, j, jlang, permutation, permutation-groups, permutations, subgroups
- Language: J
- Size: 84 KB
- Stars: 9
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PermuJ #
*Collection of J scripts for doing calculations with permutation groups.*
Includes, or will hopefully include:
Creating permutation presentations of symmetric, alternating, dihedral, cyclic
groups.Functionality includes:
* finding conjugacy classes and cosets
* enumerating conjugacy classes
* finding subgroups
* commutators and derived subgroups
* involutions and centers
* quotients
* automorphisms
* constructing modulo-multiplication groups for given positive integer
* direct productsFinding normal subgroups and group structure, and finding quotient groups, and automorphisms.
Why J?
The J programming language is ideal for doing any kind of mathematics, and is ideal
for looking into permutations and groups.## Usage ##
Need to have J installed. Best to install J 8.X ( http://www.jsoftware.com/stable.htm )
### Example ###
NB. Create the symmetric group on 4 letters:
`s4 =: Sym 4`
NB. Create the dihedral group of order 8
`d4 =. Dih 4`
NB. Create direct product of S4 and D4:
`s4d4 =: s4 dir_prod d4`
NB. get the center of s4d4
`cent =. center s4d4`
Incidentally, the size of the center is 192 (i.e. 192 permutations make up the center of S4xD4). This can be seen by
`#cent`192
NB. Get the derived subgroup of s4d4
`derived_subgroup s4d4`
which gives
```
0 1 2 3 4 5 6 70 3 1 2 4 5 6 7
0 2 3 1 4 5 6 7
3 1 0 2 4 5 6 7
2 1 3 0 4 5 6 7
1 0 3 2 4 5 6 7
2 0 1 3 4 5 6 7
3 2 1 0 4 5 6 7
1 2 0 3 4 5 6 7
1 3 2 0 4 5 6 7
2 3 0 1 4 5 6 7
3 0 2 1 4 5 6 7
0 1 2 3 6 7 4 5
0 3 1 2 6 7 4 5
0 2 3 1 6 7 4 5
3 1 0 2 6 7 4 5
2 1 3 0 6 7 4 5
1 0 3 2 6 7 4 5
2 0 1 3 6 7 4 5
3 2 1 0 6 7 4 5
1 2 0 3 6 7 4 5
1 3 2 0 6 7 4 5
2 3 0 1 6 7 4 5
3 0 2 1 6 7 4 5
```We might want to inspect the contents of the derived group:
```dg =: derived_subgroup s4d4```
```conjugacy_classes dg```
```
┌───────────────┬───────────────┬───────────────┬───────────────┬───────────────┬───────────────┬───────────────┬───────────────┐
│0 1 2 3 4 5 6 7│0 3 1 2 4 5 6 7│0 2 3 1 4 5 6 7│1 0 3 2 4 5 6 7│0 1 2 3 6 7 4 5│0 3 1 2 6 7 4 5│0 2 3 1 6 7 4 5│1 0 3 2 6 7 4 5│
│ │1 2 0 3 4 5 6 7│1 3 2 0 4 5 6 7│2 3 0 1 4 5 6 7│ │1 2 0 3 6 7 4 5│1 3 2 0 6 7 4 5│2 3 0 1 6 7 4 5│
│ │2 1 3 0 4 5 6 7│2 0 1 3 4 5 6 7│3 2 1 0 4 5 6 7│ │2 1 3 0 6 7 4 5│2 0 1 3 6 7 4 5│3 2 1 0 6 7 4 5│
│ │3 0 2 1 4 5 6 7│3 1 0 2 4 5 6 7│ │ │3 0 2 1 6 7 4 5│3 1 0 2 6 7 4 5│ │
└───────────────┴───────────────┴───────────────┴───────────────┴───────────────┴───────────────┴───────────────┴───────────────┘
```The above gives a list of the conjugacy classes of dg.
We can also attempt to decompose dg into direct products.
```decompose_directproduct dg```
```
┌─────┬─────┬─────┐│Alt 4│Sym 2│Sym 2│
└─────┴─────┴─────┘
```
Example: Calculate module multiplication group for the number 45:
`mmg_groupnames 45`
Example: Calculate possible sylow subgroups of S(5) (symmetirc group on 5 elements):`sylow3 Sym 5`
## Visualization ##
### Visualizing the orbits of the elements of a group by way of the *cayley table*. ###
Below are visualizations of the cayley tables of *Sym(5)*, *Alt(5)* and *Dih(12)*, repsectively.
![Sym 5](/sym5.png?raw=true "Sym 5 visualization") ![Alt 5](/alt5.png?raw=true "Alt 5 visualization") ![Dih 12](/dih12.png?raw=true "Dih 12 visualization")
These are created by
```
view_table Sym 5
view_table Alt 5
view_table Dih 12
```
It is also possible to view the orbit of a single element of the group. e.g. below is the orbit of a single element in
the group *Sym(3) x Cyc(5)*:
![Sym 5](/orbitSym3xCyc5.png?raw=true "Sym 5 visualization")This is created by
```
1 view_orbit (Sym 3) dir_prod (Cyc 5) NB. left arg, 1, is the index of the permutation in Sym3xCyc5
```