Presenting AjGroups: Finite Groups Library

I was writing a C# class library to manage finite groups. A group is a set G of elements with a defined binary operation *, where:

a * b  is in G    (closure)

a * (b * c) = (a * b) * c        (associative)

a * a’ = e     (inverse and identity)

a * e = e * a   (identity)

The solution code is in my AjCodeKata Google Project, under trunk/AjGroups:

The key interfaces are:

IElement has a method Multiply, that receives another IElement and returns the result IElement. IElement.Order is the number of elements to be multiplied to get the identity:

a * a * a ….. * a = e

IGroup.Elements is the collection of IElements that are the elements of the group. IGroup.Order is the count of elements.

There are two implementations of that interfaces: one based on permutations, another based on named elements (such “a”, “e”) and a table describing their multiplications.

There are methods to:

– Get the subgroups of a group
– Get the normal subgroups of a group
– Answer if two groups are isomorphic

I followed TDD ideas during development. All tests in green:

Good code coverage:

I should make some refactoring, but the project is taking form. I will write posts describing the permutation implementation, and the abstract elements implementation.

Keep tuned!

Angel “Java” Lopez

3 thoughts on “Presenting AjGroups: Finite Groups Library

  1. Pingback: Permutations in AjGroups « Angel “Java” Lopez on Blog

  2. Pingback: Abstract Elements in AjGroups « Angel “Java” Lopez on Blog

  3. Pingback: Elementos abstractos en AjGroups - Angel "Java" Lopez

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s