"Many students struggle with the idea of recursion..." 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 lear…
Math topics useful for computer science/programming
21–30 of 69 posts
Re: Math topics useful for computer science/programming
#22This does not seem very informed, starting from the false premise in the question up to the random concepts listed in the answers. 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 ov…
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?
Re: Math topics useful for computer science/programming
#23Calculus: 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.
Re: Math topics useful for computer science/programming
#24This does not seem very informed, starting from the false premise in the question up to the random concepts listed in the answers. 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 ov…
I certainly agree. I'm trying to re-learn advanced calculus and analysis from a rigorous standpoint, as I think it is crucial for developing deep knowledge in probability theory, among other things. 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 B…
Re: Math topics useful for computer science/programming
#25Why not teach math + programming together? I didn't seem to see anyone suggest that. Calculus: 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, e…
Re: Math topics useful for computer science/programming
#26Re: Math topics useful for computer science/programming
#27This does not seem very informed, starting from the false premise in the question up to the random concepts listed in the answers. 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 ov…
I certainly agree. I'm trying to re-learn advanced calculus and analysis from a rigorous standpoint, as I think it is crucial for developing deep knowledge in probability theory, among other things. 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 B…
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.
Re: Math topics useful for computer science/programming
#28Why not teach math + programming together? I didn't seem to see anyone suggest that. Calculus: 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, e…
Linear algebra/vector algebra is the single most useful topic for programming I can imagine.
Re: Math topics useful for computer science/programming
#29Re: Math topics useful for computer science/programming
#30Earlier quoted context omitted.
> 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, It's still interesting to think about which branches of math are actually applicable to programming itself. People…
I have a couple simple ones off the top of my head: - 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 meanin…
In general, the whole "oh yeah CS people should know some category theory and abstract algebra" is pretty hilarious.
First, it's a bit like saying "oh yeah CS people need to know the undegraduate basics and also the generalization that most mathematicians don't encounter until a couple years into grad school."
Second, most people who say this really mean "a conceptual grasp on different types of morphisms is useful". But that's like saying you need calculus in order to drive a car; or, in the case of categories, it's like saying you need two semesters of real analysis in order to drive a car.
Why not just say "knowing about different sorts of mappings is pretty useful in functional programming"? Knowing how this generalizes to more abstract mathematical objects is totally unnecessary.