Even the top-voted response to the OP is obviously biased toward the logic flavor of computer science, with awkwardly scattered recommendations for non-logicish topics that are far more useful for all flavors of computer science ("perhaps even eigenvalues," seriously?!).
These lists even ignore the deeper question being asked: how do you figure out what sort of mathematics you need for the things you're interested in? Not all computer scientists (and programmers) like the same things in computer science and programming. It's much more advisable to figure out what you like before you go around trying to learn all the math there is to learn related to CS, and then ask about what math topics are related to that.
Meanwhile, I actually write a blog called "Math Intersect Programming." Even though it's more about my specific interests than how a freshman should approach the topics, and I certainly emphasize the mathematical ideas over the engineering challenges, it still gives a good idea of what I would suggest:
Orient the learning around applications in CS. Find a problem that requires the mathematics you want to learn, and learn it with the persistent contextual understanding that you are trying to do something more than just tinker with definitions. Do this for one application and repeat as desired.
My view is that when this is done, you learn to focus on the things that matter over the things that are used to fill empty space in courses (calculus courses come to mind as a specifically abhorrent example of this). You get better at seeing the forest over the trees.
The problem is this avoids the OP's question (and this ensuing discussion about the OP's questions and the purported answers), since you can't organize a single class around it. Another problem is that very few books are written this way, or are only superficially so.
However, you should keep in mind that these lists are intended as an answer to "What Math should we teach freshmen undergrads?", not an answer to "What Math do all the CS-people need to know?". The latter is naturally a very small subset of Math, the 'logicish' type.
I do STRONGLY agree with you that we should help students figure out the areas that they find interesting, and let them know what kind of Math is useful for each.
The OP describes universal algebra and term rewriting, which is what I claim is the logicish type that is not as crucial as, say, linear algebra if you want to find widely applicable mathematics for CS/programming.
Calculus is actually important for Computer Science, it's actually important for everything, it's where you learn how to handle the exponential function and the natural logarithm, how to do approximations and bounds, how to handle infinite series, etc., and those things then appear all over the place, unlike most things listed it's something that you can expect to encounter almost regardless of what domain you are interested in.
I mean, the guy asks what should replace Calculus and then the first answer includes "Asymptotics", "basic limits, sequences and series", so actually calculus. In general I cringe a little every time I hear Computer Science people should focus on "discrete math", because without tools from analysis you can only solve the most trivial discrete problems. And yes, calculus by itself is hardly ever applicable in CS, yet you still have to learn it, tough luck. In general what is not stressed enough I think is that applying math is hard and you need to learn a lot of it before you have enough tools to tackle problems anywhere close to real-world complexity.
The top answer also lists random concepts. I am learning probability currently, for applications in machine learning. "Discrete spaces, Bayes theorem and expected values" you can learn in a day, "Markovs, Chebyshev and Chernoff inequalities" are mostly only useful for further theoretical work, so is "the law of large numbers". What will really be useful will depend a lot on the applications, if you are a theoretical computer scientist, mastery of generating functions and transforms will be useful, and it's one of those instances where discrete problems are solved via tools from calculus/analysis. For machine learning you need to know everything about the normal distribution by heart, and this means you have to know everything about the exponential function by heart, so again back to calculus. Notions from information theory are useful, but of course none of the ones he listed. The comment "This is a must for modern programmers." sounds just comic.
This.
If you take a look at the MIT course "Mathematics for Computer Science"[1] you'll see that the only prerequisite for learning the math for cs is ... calculus!
[1]http://ocw.mit.edu/courses/electrical-engineering-and-comput...
That said, I totally agree that calculus is good to know for a CS student.
It's still interesting to think about which branches of math are actually applicable to programming itself.
People tend to talk about programming and math as very strongly related, and of course there is the obvious relationship that "some computer programs do particular kinds of math" like you're talking about here.
But there is no (intuitive) overlap between writing, say, a web application and doing algebraic or calculus computation on paper. However, there are things like:
- Set theory underpinning relational databases
- Typed lambda calculus underpinning functional programming
I'd be interested in other examples like this.
- You write a recursive program the same way you write an inductive proof
- Abstract algebra and category theory are likely relevant, especially for metaprogramming. My math education hasn't included this, so I can't say much more.
- Linear algebra is just ridiculously important
- Statistics for machine learning. Also for figuring out how to combine data in a meaningful way. There are also a lot of people asking statistical questions directly, and writing programs is how you get those kinds of answers in a reasonable timeframe.
- NFA/DFA underpinning regular expressions ( well practical regular exp are not in fact regular, but anyway)
- Linear algebra used in graphics and game programming
I think it's amazing that programming can leverage and express so many mathematical facts - from implementing a binary tree that is enforced to always be balanced by the type system in Haskell, to using linear types to safely use and free OS resources in ATS.
Slightly tangential but, while there are many lovely books for linear algebra (like Halmos, Axler or Hoffman & Kunze), as a newcomer I don't find analysis literature so exciting. The standard, Rudin, is really synthetic Bourbaki-style. I like short and precise books, but I found it really removes most intuition. Any good books you happen to like? Perhaps Pugh or Zorich?
I have the book by Pugh, but that one is pure^2, even as far as analysis texts go, the problems are difficult and there are no solutions, so I think it would work only for people very in love with absolutely pure mathematics and most likely only in an academic setting, while I am interested in applications and self-studying. From modern texts, given your interests, I would look at "Understanding analysis" by Abbott and "Measure, Integral and Probability" by Capinski, both pleasant to read and together providing a not too steep path toward measure-theoretic probability.
No, you don't need to understand organic chemistry to write a CRUD app. But, you don't need university to write a CRUD app.
I think I received an excellent education that prepared me for about any job out there. And, I've done it. I've done cancer statistics for the NIH. I've worked in avionics and simulation. Well, blah blah, no one cares about my resume, I'll just say I couldn't have done any of it without the education I received. I haven't done financial quant stuff, as an example, but how could I without the math background? Or how could I program a controller in a factory without understanding PID (done that)? How can I get a piece of that neat drone project (done that)? Hey, that computer vision stuff looks interesting, all I need to know is ...derivatives, statistics (done that too).
For most of us, university is the last and/or best chance to really understand how the world works. For that you need quite a bit of math and science. Another example. We have a voluntary Arduino robotics workshop going on at work, coupled with 3D printing. Naturally, people are excited, and have all kinds of ideas. But, how do you execute on that if you don't understand how to design an op amp circuit, or filter data with something more sophisticated than a moving average? Robotics spans a number of fields, and to actually produce something more than a gimmick requires a lot of knowledge. Knowledge that you can pretty easily pick up in University, but knowledge you mostly just long for as you have to rush home at 5:30 to pick up the kids and make dinner.
I guess this is a cranky rant from an old guy. But I hear about University programs that are nothing more than Java voc ed systems and I despair. $100K in debt to learn something most anyone on here could just pick up on their own. You don't need university for that stuff.
You could have just learned it as you went. Done that.
It's also interesting to consider the chapter headings in Concrete Mathematics (Graham, Knuth, Patashnik), a text designed with students of CS and programming in mind:
Recurrent Problems
Summation
Integer Functions
Number Theory
Binomial Coefficients
Special Numbers
Generating Functions
Discrete Probability
AsymptoticsCalculus: simplify and iterate to solve a problem (like Newton's Method). Lots of issues to tackle with. Much more useful than learning formulas, but it can also be interesting to show how converting forms can take an unstable problem into a stable one.
Combinatorics: Explore the small side of a problem, code up the larger version, explore how far one can get, show methods for dealing with the problem beyond the scope.
Graphics, user interface design, etc., are also very big in math. In a course I teach to Enviro Science people, they come in scar(r)ed of math and by the end, they enjoy it. A big trick is getting them to use GeoGebra in an exploratory, visual fashion. It makes the math real.
The same approach in code can help make CS students get math while also getting the issues in CS. Anyone who thinks the exponential as 1+ x+ x^2/2 + .... is useful as is for x = 100 needs some actual experience with it. But at the same time, teaching them how to translate e^100 ~~ e^(43ln(10) + .98) ~~ 10^43 (1 + .98 + .98^2/2 + .98^3/6) = 10^43 * 2.62 has its value (compare to e^100 ~~ 2.69 * 10^43)
This is the kind of math that is useful. Exploratory math that struggles with mathematical truths and practical implementations. Students should get a sense of the limits of computers, what they can handle and not.
And designing a good math interface for these problems can be quite the UI learning experience. There are so many ways to explore math.
Stop teaching dry math and start teaching programming math.
For a lot of programming understanding user interaction and human psychology is much more important than mathematics.
I still remember one of the worst bugs I'd ever introduced (in terms of pain to me). I was maybe 2-3 years out of my bachelors, and I thought recursion was so nifty that I'd use it where ever I could. I was coding C++, at the time. And, I got the dreaded 2am call after all of the production servers went down hard. Like terminate and corrupt data hard.
Lesson learned: it's good to know recursion, but it's also good to know maximum stack sizes.
> ... there are ~1000 subcategories of computer programmers.
I'm curious: what about other careers? Are there fewer categories? Do they all do the same type of math? etc.
As for calculus, I think its importance is overrated - unless you are specifically doing some numerical computation that requires it.
Could you also recommend something on how symbolic computation works? I have used computer algebra systems like Mathematica for long; would like to understand how it works internally.
I currently understand some basics like DPLL, semantic first-order unification, methods of solving specific equation systems like linear systems, numerical differential equations, etc. I am missing at least how the "top-level" of symbolic computation works.
For example, from what I currently understand, first-order semantic unification can find "x = Cos[y]" from "Sin[x] = Sin[Cos[y]]", but cannot solve "Sin[x] = Cos[x]" for x, and cannot simplify "[(Sin[x])^2 + (Cos[x])^2] = 1" to True.
I am hoping to find something simpler than reading through SymPy source code. :-)