Take the 2-minute tour ×
MathOverflow is a question and answer site for professional mathematicians. It's 100% free, no registration required.

For background: I'm working on a book to help mathematicians learn how to program. However, I need to see some examples from people in the field that have done different kinds of things than I have.

Where have you used programming in your career as a mathematician? (If you haven't feel free to say so, though it isn't very helpful)

I've currently used programming in several math-y settings. Computational Biology, Image Processing (Fourier Transforms and other things like that), writing scripts that comply to a certain data restriction or to a library. I've looked at some computational algebraic geometry, but not much as of yet, and I'd use SAGE or sympy if I needed that.

share|improve this question
This probably should be community wiki. –  Andy Putman May 9 '10 at 3:28
I've wiki-hammered this. –  Scott Morrison May 9 '10 at 4:11
oh, sorry about that, I haven't posted in a while and forgot to hit community –  Michael Hoffman May 9 '10 at 8:04
You may also want to look at the recent question on experimental mathematics. Some answers there may apply: mathoverflow.net/questions/12085/experimental-mathematics –  Willie Wong May 9 '10 at 11:01
This discussion on computer experimentation may interest you as well: mathoverflow.net/questions/12085/experimental-mathematics –  Adeel Sep 6 '10 at 3:23

11 Answers 11

Look at any of my published papers! :-)


  1. Solved huge systems of quadratics in order to construct exotic subfactors.
  2. Calculated R-matrices for representations of various quantum groups, in order to systematically identify coincidences amongst small modular tensor categories.
  3. Implemented a parallelisable, caching algorithm for computing Khovanov homology, in an attempt to disprove the smooth 4-d Poincare conjecture.
  4. Enumerated bipartite graphs satisfying certain combinatorial conditions, filtered by largest eigenvalue, in order to classify subfactors up to index 5 (slides).
  5. Looked for small real cyclotomic integers which are larger than all their conjugates, in order to verify the many cases of a theorem identifying those smaller than 76/33.
  6. Proved identities involving q-binomial coefficients using the methods of A=B.

and then a whole lot of stuff that hasn't yet, or won't ever, make it into print.

share|improve this answer
Thanks Scott, I really appreciate it! I'll read them ASAP –  Michael Hoffman May 9 '10 at 8:05
Well, sometimes the computer code is slightly below the surface. But feel free to ask if you want more details. –  Scott Morrison May 9 '10 at 16:43

I've used computers to do some group theory calculations. I was too lazy to figure out how to do them in GAP, so I wrote the programs I needed in C++. One particular paper that I used them in is my paper "The Picard Group of the Moduli Space of Curves with Level Structures". The paper and code are available on my webpage at http://www-math.mit.edu/~andyp/papers/PicardGroupLevel.html

In that paper, I needed to know some twisted group cohomology groups. The groups depended on a parameter $g$, but I could prove that they were independent of the parameter once $g$ was large, so I was able to reduce myself to computing a finite number of cases on a computer.

share|improve this answer

I've used programming in MATLAB for countless things. Some highlights:

  • bioinformatics: besides testing published algorithms, I also developed algorithms for producing surrogate *NAs with completely specified short-range subsequences and biologically plausible codon structure, for molecular phylogeny, and a toy model of *NAs with specified nearest-neighbor thermodynamical properties. In related work I used a numerical calculation to rule out a class of hypotheses about the binding kinetics of oligomers;
  • networks: modeling queueing networks and prototyping network monitoring data structures, visualizations and algorithms involving generalized statistical physics and continuous-time martingales and change detection techniques, as well as post-processing outputs from multiple prototype network monitoring systems. Besides prototyping, I've also used MATLAB for QA purposes in my company;
  • I outlined some combinatorial calculations about necklaces in MATLAB and C for porting to a reconfigurable computer;
  • I elucidated the structure of the Lie algebra of the stochastic group, particularly completely explicit Levi decompositions (this is no trivial feat in a numerical language)--someday I'll clean this up and put it on the arXiv;
  • I produced periodic lattices with permutohedral boundary conditions (used so far to validate a 2D lattice Boltzmann model by approximating the initial decay of a Taylor-Green vortex);
  • I enumerated the minimal periodic colorings of the root lattice $A_N$ for $N$ small by means of permutation matrices;
  • I've analyzed detailed behavior of Anosov systems (e.g., the cat map and a map topologically conjugate to the cross section of the geodesic flow on a surface of negative curvature).

I'm sure I could think of other stuff that has been especially useful to my work. I use MATLAB more days than not.

share|improve this answer
Hoping you'll get those Levi decompositions on arxiv someday, I'm looking at nonnumerical computations in particular. –  Michael Hoffman May 17 '10 at 3:38
If you want I can send you a rough draft. My email is sh [at my domain name]. –  Steve Huntsman May 17 '10 at 3:42

I am a pure mathematician interested in representation theory.

I computed $q$-characters of $\ell$-fundamental representations for the quantum affine $E_8$ by a SUPERCOMPUTER. See


There is more famous project on $E_8$:


I believe there are lots of other computation in the representation theory of exceptional groups, which require lots of memory.

They are usually based on recursive algorithms, and one cannot use the parallel computing.

When I computed $q$-characters, I could not find any guides explaining how to code a program for such a problem. I appreciate very much if an expert could give me any references.

share|improve this answer

I discovered a new near octagon related to the finite simple group $G_2(4)$, from which we were able to construct the full Suzuki tower, with the help of a computer. See this: http://arxiv.org/abs/1501.04119

This also gave us several other well known srg's (see the Remark in Section 5) which were all checked to be strongly regular using SAGE. In fact, I used GAP and SAGE extensively to find several results for which we later found computer-free proofs.

The fact that the automorphism group of this near octagon, which is the same as the automorphism group of its point graph, is isomorphic to $G_2(4):2$ was first checked using SAGE which probably uses the nauty package by Brendan Mckay. And all the group theory stuff in Section 3 of that paper was done using GAP.

share|improve this answer

I've used computers to prove a theorem about a complex dynamical system. See http://www.ams.org/mathscinet-getitem?mr=1836429. So have others. See Proving Conjectures by Use of Interval Arithmetic.

share|improve this answer

I often write small programs in various languages (Perl, C, Maple, HP 50G) to generate complicated pictures, perform tedious algebraic computations to test conjectures, or simulate random processes.

share|improve this answer

I've worked (and still continue to work) on K-nearest-neighbor analysis for image segmentation and multispectral and hyperspectral data classification, and worked on trying to improve the algorithms for speed and to require less interaction. I've also worked on writing C programs, which work much faster than interpreted Octave or Matlab code, for image analysis and texture analysis, and for image segmentation based on local feature analysis. This is all very different from the types of mathematics I used and learned in academia.

I've also run simulations of some games I've played recreationally to answer some simple questions using backtracking algorithms, for example, a card game akin to playing tic-tac-toe on a 4-dimensional lattice which I used as an answer to Favorite mathematical puzzles and toys.

share|improve this answer

I wrote a series of algorithms to find bounds on the homology of finitely-presented groups and implemented them in GAP in http://www.intlpress.com/HHA/v12/n1/a3/. Graham Ellis has written the GAP package HAP, http://www.gap-system.org/Packages/hap.html, which does some group (co)homology calculations.

share|improve this answer

I've used computers in a variety of ways, some fairly simple and some more complex. I'll restrict myself to usages that resulted in publishable work.

  • As a grad student, Dev Sinha inspired me to come up with a formula for the type-2 invariant of knots, as a signed count of quadrisecants (lines that intersect the knot in precisely four places). Technically the count only worked for "long knots". I implemented the count and generated animations which included the quadrisecants. After seeing the quadrisecants created and destroyed in enough situations I came up with a formula for closed knots. Eventually, this led to Garret Flower's Thesis, where the formula is a count of the family of round circles that intersect the knot in a pentagram. The code was written in C++ to find the quadrisecants / circular pentagrams. That data was fed to PoVRay to generate the images.

  • Recently I've been developing Regina, which is a package for studying triangulations of low-dimensional manifolds. I have a few objectives with this project: studying the 3-manifolds that embed smoothly in $S^4$, studying the "small" triangulable 4-manifolds, and such. This is a rather big project, and Regina is quite a bit bigger than my contributions to it. It's written in C++ and Python. Recently I've come across some new knot exteriors in homotopy $4$-spheres. I'm in the process of building a table of small knot exteriors in homotopy $4$-spheres, as well as attempting to prove all `small' homotopy $4$-spheres are PL-equivalent to $S^4$, etc.

share|improve this answer

A simple but important answer (in my opinion) is to understand the behavior of some random process.

For instance, imagine that you are drawing balls of different colors out of an urn and replacing them according to some rule. What do you expect to happen? If you are not sure how to start on this problem analytically, you can just simulate it a million times and visualize the results.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.