Giter Site home page Giter Site logo

permuj's Introduction

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 products

Finding 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 7

0 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 Alt 5 Dih 12

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

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 

permuj's People

Contributors

jonghough avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.