groupHS

My computer science major mandated a functional programming course, which was held by a different professor each year. Each professor brought along his favorite functional programming language which in my case was Haskell. Inspired by the many exercises on lists, enumeration, permutations and so on, I started a project to play around with finite groups (the algebraic variety).

groupsHS implements groups as a type: A list (its elements) together with a function that takes two list elements and produces a third. This closely resembles the usual mathematical definition of a set together with a binary operation. But although in the spirit of functional programming, my Group type does not encode any of the necessary constraints and instead uses functions such as isValidGroup.
Encoding properties like this is possible via typeclasses. A prominent example is the typeclass Monoid, an essential part of Haskell's base package.

Back to groupsHS and playing around with small finite groups. I implemented cyclic and symmetric groups and functions related to subgroups and generating sets among others. Eventually group isomorphisms piqued my interest. A computational problem that reduces to the graph isomorphism problem. Quite the challenge. With computationally hard problems like that, Haskell's lazy evaluation and convoluted runtime behavior became increasingly annoying. To gain better control over the computational aspects I reimplemented groupHS as asocgen in plain C and soon retired groupsHS.

Project Overview
Academic Project
Winter 2014/15
Abandoned
20+ hours
Technology
Haskell
Haskell Icon
Last Updated
2024-04-02