views:

1163

answers:

8

I am going to start learning Abstract Algebra- Groups, Rings,etc. I am interested to know any programming language, if at all which can help me learn/try the concepts I learn in theory.

EDIT: I am not really looking at implementing what I learn. I am interested to know any language which already supports them.

Thank You.

+2  A: 

Any language with fixed size unsigned integers (eg. the unsigned int type in C) is an example of such an implementation. Addition with unsigned values is essentially the same as addition over Z232 (ie. the integers modulo 232), which you are probably learning about in your abstract algebra class.

Modular addition over such a group is not terribly interesting, though. More interesting might be modular addition over a group of size N where N has prime factors other than just 2, or size P where P is a prime. To experiment with such groups, you may have to implement such arithmetic operations yourself (it's not hard). Languages with operator overloading can make the implementation a lot more convenient to use.

Greg Hewgill
Not arithmetic, but addition.
Jason
True, I'll edit for precision. Multiplication too, but division is the tricky one.
Greg Hewgill
Multiplication doesn't work as a group operation in Z/nZ unless n is prime. This is needed to guarantee the existence of inverse elements.
Jason
Good point again. Thanks, it's been many years. :)
Greg Hewgill
A: 

In a similar vein to Greg's answer, groups have a nice representation in the form a matrix multiplication, so you often see examples done using matlab or similar tools...

dmckee
+8  A: 

The text that you want here is Abstract Algebra, A Computational Approach by Chuck Sims. The author will recommend that you use the APL programming language. The book is out of print, but you can probably find it in your library.

There is also the GAP Computer Algebra System which is fun to use for group theory.

Advanced resources:

Magma: fairly sophisticated CAS that can handle a wide range of concepts from abstract algebra.
Macaulay 2: used to study polynomial rings, especially Gröbner bases.
SINGULAR: used to study polynomial rings.

A key fact in studying group theory is that every group is isomorphic to a permutation group by the regular action. Thus, the key to understanding group theory is to understand the permutation groups.

Finally, any language that supports defining your own objects and defining a binary operator on two instances of the object will support learning the theory through programming.

Jason
I just stumbled upon "Abstract Algebra, A Computational Approach" in the library today... can you recommend an APL implementation for the exercises?
Jørgen Fogh
The NARS2000 implementation is great; I've used it successfully under Linux (it's runs on other systems too). I've heard (but have not experienced) that the VisualAPL (.NET implementation of APL) is fantastic.
Jason
+8  A: 

Maybe a slightly different take on your question, but still... The functional language Haskell uses concepts from algebra (particularly category theory) such as monads, monoids, arrows and whatnot.

Using Haskell's typeclasses, you could also make any object into a group, or a ring, for example, simply by defining operations (operators) on them. Guaranteeing that the operations you define actually comply to the group/ring axioms would be your responsibility, however.

Thomas
That is THE kind of answer I wanted :-). Thanks!
Amit
Practically speaking, Haskell is nice for abstract algebra and other discrete math because it makes defining and evaluating combinatorial datastructures lightweight and easy.
comingstorm
A good introduction of using Haskell for algebra could be found in this paper: http://people.cs.uu.nl/jeroen/article/algebra/index.html
Daniel Velkov
+2  A: 

Mathematica has a lot of useful functions for dealing with concepts in abstract algebra. Unfortunately, it's proprietary software and very expensive. Sage is a free alternative, which also has a pretty good repertoire of abstract algebra functions, although I haven't used it as extensively so I can't comment much more on it.

Adam Rosenfield
A: 

Use the language that makes the most sense to you. Abstract algebra contains a lot of symbol manipulation (symbol pushing) and rewriting, a modest amount of induction, and a fair amount of tediousness. To me that sounds like logic or functional programming; Epigram and Agda do a bit of this, and Haskell does to some extent (though I disagree that monoid is correct, mzero and mappend okay, mconcat: bad). For abstract algebra, the best programming language is Definition notebook and tons paper. Though this one is becoming quite esoteric these days.

+2  A: 

Hmm ... sorry to say but I don't think it's wise to learn some fancy new programming languague in order to help you learn abstract algebra.

Yes some things in Haskell and other FP-languagues have something to do with categorie theory but I think you will learn about algebra best by doing you assigned exercises and problems and by reading algebra books with paper and pencil handy.

GAP and co. are used to help grown up group theorists to find new "monsters" - they are bad tools to learn group theorie. Maybe you can have a look at this: http://freecomputerbooks.com/mathAlgebraBooks.html - there are a lot of free books around this topic - but I prefer a real book and algebra books are not that expensive in gerneral.

CKoenig
I must disagree here. If you have decent programming chops then implementing these concepts in something like Haskell could be a fantastic learning exercise. Abstractions of types and binary operations are conceptually close to the basics of abstract algebra.
Alex
A: 

If you're playing with groups, you may want to visualize them using Group explorer.

huitseeker