Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

How much programming knowledge does a mathmatician need?

  1. Apr 4, 2007 #1


    User Avatar
    Gold Member

    well as the title suggests, perhaps next summer ill be taking courses from our computer science department, i want to know how much knowledge of programming does a mathematician needs?

    up till now im taking one course which is entitled computers for physicists.
    it's not much of a challenge, but it got my interest in programming back again, i just want to know if it will also payback if i were to choose a career as a mathematician or physicist?

    any mathematican here can tell me his programming expertise?
  2. jcsd
  3. Apr 4, 2007 #2


    User Avatar
    Homework Helper
    Gold Member

    I'd say you need atleast a little. I think it's useful for future research because you can test things quickly and explore things easier.

    Myself, am familiar with the basics of Java, Visual Basics, Maple and GAP programming.
  4. Apr 4, 2007 #3
    depends on what you want to do.
    Mathematica/Maple/Matlab are your friend if you want to do medium sized mathematical coding/modelling(numerically or symbolically).But if you want to go to HPC type programs you will need to know the ins and outs of C/C++ so you can learn MPI and OPenMP.
    Though i believe matlab has an extension for openmp. Java/VB aren't very useful in scientfici computing except for dev GUIs.

    There are various other threads that specify which math libs you should take a look at and assuming that you are a undergrad student(basedonyour other posts in ther forum). You might want to get a head start on BLAS or (C)LAPACK or Numerical Recipes(golden for studnet but not very practical for apps). LiDiA is another one you wmight want to take a look at if your intersted in Number THeory.

    www.netlib.org. but yeah search on the forums for "math librar" and you should be able to find stuff.
  5. Apr 4, 2007 #4

    If you choose a career as a physicist it will pay off to have a working knowledge of computer programming. If you're a theoretical physicist you'll almost certainly be doing some modeling. And if you're an experimental physicist you'll need programming skills for data analysis.
  6. Apr 4, 2007 #5

    matt grime

    User Avatar
    Science Advisor
    Homework Helper

    What kind of maths? Applied: useful, even something like FORTRAN. Pure. Less so. Some people use it, it will become more prevalent, but I doubt you CS people will offer anything that is useful for you (beyond you learning some programming paradigms).
  7. Apr 5, 2007 #6


    User Avatar
    Gold Member

    thanks for your replies, i thought so my self that it will be good to have some courses from cs.
  8. Apr 5, 2007 #7
    I urge you, loop, to think about the difference between:

    "Computer Science is good for my eventual career"


    "I should take a computer science CLASS"

    If you want to learn about programming, I suggest reading a book and/or working through some online tutorials, but don't take a university class unless you will go all the way and dual major. Many students in Comp Sci major already know how to program, but they are jumping through the hoops of the CS program so that they can get a degree and make more money, so the evaluation can be quite "sink or swim". Swim means teach it to yourself, so why even bother with the stress?

    Another reason to avoid CS class is because many of the students are not strong in math like a math major, so you will not see enough math programming examples, mostly exercises designed to teach the language i.e. excessively fancy code to do very simple things.

    Much better is to find a math professor who wants a student who can program, then ask his advice on what to learn, then practice really hard and become his research assistant.

    I think CS is a beautiful subject, and it is so useful I would suggest to double major if you are early enough that you still can. But don't take the class "just too learn" because it will be unecessarily punishing.

    Compared to the other posters, I am much more enthusiastic about recommending you to computing. The computer is clearly the most significant tool for doing mathematics besides the human brain, and I think the next 30 years will see computers invade the mathematics classroom, and thus there will be a decrease in demand for the (elite) traditional mathematicians whose training does not include CS.
  9. Apr 5, 2007 #8
    i know how to program, and i use it when it deems useful. I just kinda picked programming up.
  10. Apr 6, 2007 #9

    matt grime

    User Avatar
    Science Advisor
    Homework Helper

    I very much doubt the usage of computers will be the reason that 'demand for traditional elite mathematicians not trained in CS' will decrease. Computers make very poor mathematicians. Computer proof checkers are horrendously bad things, and I don't see them getting any better, never mind them actually starting to prove things. But that is on the pure side of things. They're certainly useful for Groebner basis computations for example, and they have led to the verification of many conjectures in certain cases that were beyond by hand things'.

    I would certainly like to see more emphasis on dsicrete mathematics - the mathematics partially behind computer science, and less on analysis in the undergrad courses, before you accuse me of being anti-CS, Crosson. But as you yourself indicate, that is entirely different from knowing *any* programming languages at all, which is what the OP asked about. *The* language for algebraic geometry is MAGMA, the language for algebra is GAP (though it isn't very good), and for number theory there is PARI/GMP.
    Last edited: Apr 6, 2007
  11. Apr 6, 2007 #10


    User Avatar
    Gold Member

    well, in the meantime it's only hypothetical question, i dont intend in the near future to take cs classes, as i said perhaps next summer if the department will offer the courses.

    anyway, matt, havent you taken in your ug years courses in set theory and combinatorics?
  12. Apr 6, 2007 #11

    matt grime

    User Avatar
    Science Advisor
    Homework Helper

    Yes. What makes you ask that. I've even taught them. I don't think they're taught enough. And frequently they are lectured badly. Although, to paraphrase Erdos, mathematics isn't ready for lots of the stuff in combinatorics.

    And I must agree with Crosson - the mathematical content of CS courses I've seen is sadly lowest common denominator. In fact one set of lecture notes I read (by the lecturer) contained many egregous errors of mathematics.
  13. Apr 6, 2007 #12


    User Avatar
    Gold Member

    well bacuae of this statement of yours:"I would certainly like to see more emphasis on dsicrete mathematics - the mathematics partially behind computer science, and less on analysis in the undergrad courses"
    if you already learned at ug, then why do you think less emphasis is given to discrete maths?
    doesnt it depend on staff the uni has who deals with this material?
    usually it's the cs people who deal with discrete maths, but i dont see why do they need to be less competent in teaching this material than say a true mathemtician, whatever this phrase means ('true mathematician').
  14. Apr 6, 2007 #13

    matt grime

    User Avatar
    Science Advisor
    Homework Helper

    Where did I say they 'need to be less competent'? I said the course notes I'd seen offered were evidently not written by someone who was particularly good at mathematics. They'd be like the kind of notes I'd write if I tried to teach elementary particle physics - full of misconceptions and demonstrating a poor basic knowledge of the subject.

    This sentence 'if you already learned at ug, then why do you think less emphasis is given to discrete maths?' makes no sense to me.

    "doesnt it depend on staff the uni has who deals with this material?"

    It depends on the university probably and the country certainly. Large UK universities, no. Each department teaches its own courses in the main. It is certainly not the case that CS teaches discrete maths to any mathematics undergraduates at any place in the UK I can think of.
  15. Apr 6, 2007 #14
    proving techniques...is usually what CS students can't handle. and
    graph theory, combinatorics, logic, set are all usually proving classes(sometimes even rigourous...though it depends on your CS prof...some CS profs require students to know proving...in canada anyways).

    I think they would be able to pack all those topics in a single one year full course. But it depends on if the dept is willing to try it.

    matt grime: what topics did you include in your combinatorics class?
  16. Apr 6, 2007 #15
    This is a great conflict in uni math education --- teach analysis for physics and engineering, or teach discrete math for CS and pure math students. Many (weak) math majors feel deceived when they first enter a discrete math/ proof techniques class, and rightfully so after two years of skills based calculus.

    And Matt, your record shows you are far from the anti-CS category. You have clearly used several research-level computational packages, and even just using a LaTeX distro to typeset your own papers for the ArXiv shows that you embrace computers in your career.

    When I talk about computers displacing traditional mathematicians, I don't mean proof checking or proof writing. I am talking about education, and the increasing use of computers in math education. For the vast majority of math majors who will not be getting a PhD, computer training is essential for them to be able to apply their skills in a job. Only elite universities can afford not to care about teaching, so their will be a push in most universities to only hire computer competent people.

    So as you can see, the math majors who should worry are the ones with little to no computer skills, or who even put down computer to make themselves feel "pure".

    Edit --- Combinatorics is a great example of a class that benefits from the use of software, because otherwise most of the examples use very small numbers. Imagine wanting to teach the greedy algorithm for coloring graphs (which won't work for graphs which contain a 4-cycle). This sort of thing needs a good example, so here are the choices:

    1) Use a small random example graph with 6 vertices or less.

    2) Carefully redraw a graph with more then 6 vertices which you are pretty sure worked (has no 4-cycle) when you made up your lecture notes.

    3) Randomly draw a graph with more then 6 vertices, waisting time trying to avoid four cycles, and then start the example sure to encounter an "oops this one won't work" and make a messs trying to erase rogue edges.

    4) Type a command to generate a random large example in front of the class.

    Now lets evaluate each of the choices:

    1) Misleading, students need to see examples of large graphs to appreciate the "combinatorial explosion". Pity the student who, when ask to produce a random graph after a semester long course, produces one of order 5.

    2) This means a lot of work preparing for the professor, which is unrealistic even for those with good intentions. Also, students are punished when they have to wait 60 seconds for you to draw a diagram from your notes.

    3) This is the most common choice, and obviously it will quickly lose the students attention and respect.

    4) This is the most efficient choice, and the one that is most likely to motivate students to learn what you know.
    Last edited: Apr 6, 2007
  17. Apr 7, 2007 #16


    User Avatar
    Gold Member

    "This is a great conflict in uni math education --- teach analysis for physics and engineering, or teach discrete math for CS and pure math students. Many (weak) math majors feel deceived when they first enter a discrete math/ proof techniques class, and rightfully so after two years of skills based calculus."
    crosson when you mean two years of skilles based calculus, do you mean at high school or at university.
    cause if it's the latter as far as i can tell, maths majors take at least courses in intro to set theory and combinatorics in their first year with the other courses.
  18. Apr 7, 2007 #17


    User Avatar

    I have the other problem in that my programming is good but my math is poor, but to answer your question. Yes I would say that some programming skill would be most useful the question is which language. Now for my money and I am sure this point will cause much debate, the language you should go for is C then C++.
    A lot of mathematicians seem to have used Fortran in the past, however it seem to be a language of many versions, and may not be available on the system you want to use it on. Basic is more of the same and although it maybe easy to learn inasmuch as the syntax is simple, it is often very different between systems.
    Thus you should really consider C and later C++ as it is very widely used and available for most systems you will ever want to program on. (Stick to ANSI C and you wont go far wrong)
    Also a very good environment to use is the now ancient Microsoft’s Quick C, I guess you can pull it of the web it is for DOS so runs in a Windows DOS window and you can do pretty much anything in it as far learning the language. From simple math to nice graphics.

    Have fun all the best IMK
  19. Apr 7, 2007 #18


    User Avatar
    Gold Member

    who said my programming is poor?
    i cannot judge if my programming skills are poor cause my experience with programming isnt linear, i took it when i was a 10th grader, and for 5-6 years since then i didnt took any class in programming.
    now im taking a course which is essentially C language in unix OS for physicists, im not planning to leave physics any time soon, just thought next year to take 1-2 courses from my cs department, that's it.
  20. Apr 7, 2007 #19


    User Avatar

    Didn’t mean to imply your programming skill where poor, maybe I miss read your original post. C for unix is fine and I guess you’ll be using GCC or the like which is a good system although when I used it I did not find the integrated help was that well integrated. And that is why I like the old quickC 2.51 to teach with.

    Good luck on your class, and maybe just maybe if you physics is good you could help with my post on:
  21. Apr 7, 2007 #20
    My school requires 4 semesters of calculus, and then set theory and combinatorics are offered at the 300 level.

    C is an okay language, although it really has no advantages other then popularity (the C stands for Cool). Much better is to take the language-independent approach to learn programming, where you study the semantics common to all languages, which gives you the versatility to learn new languages (syntax) quickly.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook