Do mathematicians have to code the programs they use?

I was wondering in high-level mathematical applications where a (super)computer is required to produce the result of large calculations or perform advanced mathematical analyses whether mathematicians themselves have to write the programs for them.
It seems to be a specialised task, and so you would need the sufficient level of knowledge in order to code it.

However, let us say that the level of knowledge is uniquely specialised, in that only the mathematicians involved are aware enough of the key concepts (maybe when analysing a new theorom or something).

Who the heck writes the code for this sort of thing? Is it the mathematicians themselves? And if so, then where the heck do they learn it from?

I know computability is a fundamental concept in mathematics, however I seriously doubt these guys use C+ (or maybe they do - fill me in). But if they don’t, then where the heck do they obtain a sufficient language from, and do they really have the time to learn it?

Or is it more like a seperate group of programmers with some background in the mathematics involved aid them?

How often does the need for this type of programming come up in mathematics (I’m asking for both pure and applied)?
I may have a distorted picture of mathematicians since I never really expected them to be able to code (I would have thought they wouldn’t have the time). I’m completely unfamiliar with the type of programming they would use (e.g. language, structure of work, what types of tasks they would use programs for…) so I would like to be filled in here a little. I’d also like to know where they learn this from, since I find it odd if it would be in the curriculum.

I’ve been reading different math forums lately and it suprised me that some professors (AFAIK) were saying how “terrible” their pupils were at program coding. I remember thinking, WTF??? They teach that in math?

I don’t know about mathematicians per se, but I can tell you there are plenty of environments where the people who design the algorithms don’t actually write the code themselves. They’ll define it in pseudocode or flowchart or some other fashion, and a coder will render it in the appropriate programming language.

I think it really depends on what kind of math you’re talking about.

Using supercomputers for simulations often just requires extreme optimisations of the calculations that are performed, over and over again, on large sets of numbers.

There are libraries that optimise standard mathematical functions, and others that optimise things like matrix multiplication. You’d probably just need to know enough programming to link in the right libraries and to not write really stupidly inefficient programs. But even stupidly inefficient programs can be optimized quite a bit by a smart compiler.

I’m doing a graduate degree in applied math, and the code that I use (Matlab and C++) is partly written by me. What I’m doing is extending a partial differential equation solver that was written by my supervisor and another of his students (a mechanical engineer) and that links with a commercial linear/nonlinear system of equations solver.

By the way, we don’t use a supercomputer, we use a group of Linux-running PCs. I don’t know their specifications, but I assume that they must have a lot of memory, since it is required when solving large systems of equations.

Applied mathematicians must know something about programming. It’s part of the job. They must be able to write optimized code (which doesn’t necessarily mean elegant code). Many pure mathematicians need it too. Most of the professors in my department are decent programmers.

When I was an undergrad, most math students had to do two first-year computer science courses, as well as a data structures course and a C++ language course. Yes, many of them don’t like programming and are not very good at it. It just doesn’t require the same abilities as math. On the other hand, I did a minor in computer science, and I enjoyed it, which might be the reason why I think I’m also a decent programmer. Certainly not a genius, but I know enough to do my job.

Some pure mathematicians (like myself) have enough knowledge of computer programming to write the programs themselves (or write programs that rely partly on pre-existing libraries themselves). Other mathematicians who don’t have such knowledge may collaborate with those who do. Or, depending on how closely the math department is allied with computer science or engineering at their particular institution, programming work might get farmed out to a programming-literate grad student either at the master’s or Ph.D. level.

It’s pretty much like how you would get a one-shot program written in any other circumstance: either do it yourself if you know how or find someone else to do it if you don’t. Only instead of paying in money mathematicians have the option of “paying” by crediting the programmer as a co-author on the final result.

A lot of quite varied degrees now use computers to such an extent that it’s common to expect someone to be able to (badly) write chunks of code that will do certain things.

Maple, Mathematica and Matlab are probably the most common coding enviroments for mathematics and all are significantly easier than C to program in for maths applications.

At my university, First year mathematics took about 4 weeks worth of matlab coding, Discrete math covered psuedo-code and Maple for about 3 weeks and probably about 1/4 of the higher maths classes involve coding of some sort.

If you want to avoid coding after the 1st year, it’s perfectly possible. But it’s pretty much considered a standard tool in the toolkit these days to my understanding.

They’re mathematicians–it only takes them three hours. :slight_smile:

**Do mathematicians have to code the programs they use? **
Sure, I write a lot of my own programs. It’s fun. Writing an elegant piece of code is a kick. But I also write specs for the real engineers to crank out. Sometimes I write a smaller version of the required code to test out the algorithms, then turn things over to the programming pros to finish it up. They do what they do best, and I do what I do best.

Why would you doubt that?

My first year introduction to applied maths at the University of Cape Town included a Matlab course, and coding was closely coupled to that course. However, the pure maths that I carried through to third year did not rely on any coding ability, and it would not have surprised me if any of the pure maths professors in the department weren’t coders.

When I started college in the early 1970s, I was planning on being a math major. One of the requirements for a Math degree was an introductory computer programming class, the same one that Comp Sci students had to take. The programming language was Fortran (at the time, Mathematica and Matlab did not exist and C was an obscure language mainly (only?) in use at Bell Labs).

BTW, I liked programming so much, I changed majors.

Sometimes we do. Then again, very few mathematicians work in calculations. Computers still suck at proving things.

An individual task is, but what we’ll generally use are suites of tools applicable to a lot of problems. Constructing a given ornate chest of drawers is a very specialized task, but the same couple of saws work for cutting all the wood.

Evidently you’ll be surprised to hear that a quite a few mathematicians have taken a few classes in computer programming in their past. In fact, computer science (you know, the discipline that writes programming languages?) used to be just a sub-discipline of mathematics. As for a separate group of programmers, trust me: only a grad student in mathematics is crazy enough to want to be a mathematician’s bitch.

Ultraspecialized? Not really that often. Specialized enough to work up a new tool set? More often in applied, but an even greater number of applied mathematicians know how to program than pure ones.

As for languages and structures, we’re just like everybody else in how we program. As for how it’s used, pure mathematics generally uses computer experiments to give intuition. Then we go back and prove something on the blackboard. The only standing proof which essentially requires a computer is that of the four-color theorem.

And yes, Haken and Appel programmed their computer themselves. I think their book has the code in it, even, if you want to see for yourself.

Well, sure. If I wanna be lazy about it.

And I usually do.

Computability doesn’t have a great deal to do with practical computer programming. It just means that something can be computed in a finite time. You could write quite a simple program to compute the 10^10^10^10^10th prime number, but that program might require more computer memory than you could fit into our universe, and might not be able to finish its calculations within the expected lifetime of the universe.