Representation Theory in Sage

I’ve written a series of posts about representation theory on my other site:

  1. Representation Theory – Basic Definitions
  2. Direct Sums and Tensor Products
  3. Irreducible and Indecomposable Representations
  4. Decomposing Representations
  5. The Group Ring and the Regular Representation

The emphasis is on illustrating all the above things in Sage. It’s pretty elementary, and uses linear algebra more than anything else. I haven’t touched character theory yet; that will be covered in the next series of posts.

Advertisements

Subgroup Lattices II – Coloring Vertices

Lattice of subgroups of the Dicyclic Group of order 12
Lattice of subgroups of the Dicyclic Group of order 12

Here’s my second subgroup lattice post: Subgroup Lattices with Sage – Coloring Vertices. It shows how to color a poset according to properties that you’d like to highlight.

At the bottom of that post, you’ll also find a nice interactive section where you can play around with various groups and their subgroups. It looks like this:

interact_demo

These posts are pretty time-consuming to write, so the next post might be quite a while later. Have fun playing with the interactive subgroup demo!

tool of the trade

Scientific research nowadays almost always requires programming. As a researcher, however, programming is just a tool, not my livelihood, and if I’m going to have to spend time and effort learning how to use this tool, it better be a good one. Some other things I would want from a programming language:

  • I should not spend days (or even hours) going from not knowing anything to printing “Hello World”.
  • If I want to do something, there should be a library written for it.
  • I should be able to communicate my code easily to others (including my future self).
  • There should be nice IDEs written for it, and I shouldn’t have to do much to get them to work.
  • It should be free.

I’m really pleased that Python has been able to do all the above. Python(x,y) works right out of the box, and inlcudes two great IDEs: Spyder and the IPython notebook. Spyder has the same feel as Matlab (editor, console, variable explorer), while the IPython notebook is like the notebook interface of Mathematica. But Matlab and Mathematica cost a lot, whereas Python(x,y) is free!

Another thing that amazes me about Python is the number and quality of packages written for it. By learning just one language, I have access to all the tools I could possibly want. As an example: before learning about Pandas, I tried learning R, which is very powerful for statistical computing. However, I only had to use it once in a while, for one of my many projects, and every time I went back to my code, it took me a while to understand what I had written. With the Pandas library for data analysis, all my projects are now in Python, and I can switch between projects seamlessly without having to do a mental reboot.

Some of the packages I use: Numpy, Scipy, and Matplotlib (all included in Python(x,y)), Sympy, Pandas, scikit-learn (part of a larger family of scientific python libraries), and of course, SAGE (which is not really a library, but I can use it like one). I’m still amazed that I can get all that functionality by only learning one language.

Finally, Python is great for communicating ideas. The IPython notebook, with the ability to type LaTex, is great for explaining and demonstrating snippets of code. But the Python language itself is so readable that some have called it executable pseudocode.

All in all, I’m really happy to have learnt Python. It wasn’t the first language I’ve had to learn, but I sure hope it’s my last.