# Storing a group in a computer

I would like to write a program (in C++) that can handle groups. The use shall be solving equations in groups. What's a good idea to store a group?

My plan was:

• If the group has a generating system, it is enough to store the generators
• Otherwise, try something implicit (for example, let $(\mathbb{R},+)$ be approximated by all floats, or: this group can be constructed from that group by whatever)

Are there better alternatives to store groups?

-
As to your first point: You are aware of en.wikipedia.org/wiki/Word_problem_for_groups ? –  Hagen von Eitzen Sep 7 '12 at 9:30
Also be aware of en.wikipedia.org/wiki/Automatic_group –  Isaac Solomon Sep 7 '12 at 10:16
They were both new to me, thanks! But what about non finite generated groups? –  Johannes Sep 7 '12 at 10:31
If it's not finitely-generated, how are you even going to store the generating system? –  Zhen Lin Sep 7 '12 at 11:03
@Johannes: An equation involves only finitely many variables, so you can work inside a finitely generated subgroup. The most general finitely generated subgroup (the one where equations have the fewest simplifications) are called the “free groups”. You probably want to look at “laws of groups” if free groups are too general (but storing the laws on computer is done with a free group). –  Jack Schmidt Sep 7 '12 at 13:34

It might be helpful to look at what is done in an open-source computer algebra system, such as GAP. As far as I know, it deals mainly with finitely generated groups, but they must have some way of dealing with some non-finitely-generated groups. For example, commutator subgroups of f.g. groups aren't always f.g., and I think GAP can still work with them.

-

I agree with Tara's answer -- though I'm not so sure about non f.g. groups in GAP.

But I also wanted to point out that if there is a finite-dimensional representation of your group (or just a subgroup that you're interested in), then pretty much any computer algebra system can help in performing calculations via matrix multiplications and inverses.

I would not recommend approximating group elements in any way using floats unless you are willing to deal with round-off error. For example, $e^{2i\pi/5}$ is order $5$ in the multiplicative group of complex numbers, but an approximation, $z = 0.309016994 + 0.951056516 i$ is not -- Due to roundoff error, $z^5 = 0.999999998 + 1.32694344 \times 10^{-9} i \neq 1$.

Hope this helps!

-