Live data from Hacker News

Math topics useful for computer science/programming

matheducators.stackexchange.com

51–60 of 69 posts

Re: Math topics useful for computer science/programming

#51
post #45

Earlier quoted context omitted.

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…

As someone currently teaching themselves linear algebra (via Strang), I'm curious as to why you believe linear algebra is ridiculously important. I see its applications to graph programming and obviously to cryptography, but I've done a lot of work in both of those subjects and never strictly needed a background in linear algebra to be effective.

`ridiculously` might be hyperbole, but the two biggest ones I can think of are computer graphics and machine learning; these of which you can't even sneeze at without getting in linear algebra.

Re: Math topics useful for computer science/programming

#52
post #51
post #45

Earlier quoted context omitted.

As someone currently teaching themselves linear algebra (via Strang), I'm curious as to why you believe linear algebra is ridiculously important. I see its applications to graph programming and obviously to cryptography, but I've done a lot of work in both of those subjects and never strictly needed a background in linear algebra to be effective.

`ridiculously` might be hyperbole, but the two biggest ones I can think of are computer graphics and machine learning; these of which you can't even sneeze at without getting in linear algebra.

I have some sense of the linear algebra implicated in machine learning (I lived for many years with a comp. neuroscience PhD), but I have no visibility into graphics. So with my ignorance pinned to my lapel: the linear algebra involved in computer graphics is pretty simple, right? Just knowing how to manipulate vectors and matrices? Not a lot of eigenvalues, or for that matter orthogonalization?

I'm asking not to rebut but because I hope to prompt the sort of "sell us on linear algebra" statement that will make me study harder. :)

Re: Math topics useful for computer science/programming

#53
post #46
post #2

I never liked these kinds of lists. The people who ask the question always seem to be under- or overwhelmed by the answer (programmers don't need any math?! theoretical computer scientists need all math?!). And the people who answer are almost always skewed toward whatever it is they do. Even the top-voted response to the OP is obviously biased toward the logic flavor of computer science, with awkwardly scattered rec…

This comment is a little frustrating, because part of the point of linking to the Stack Overflow post is to continue the discussion, which is obviously germane to our site. Why not dig into specifics of how you'd approach the intersection of math and CS?

It's actually inspired me to write my own article, but that will take time.

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.

Re: Math topics useful for computer science/programming

#54
post #45

Earlier quoted context omitted.

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…

As someone currently teaching themselves linear algebra (via Strang), I'm curious as to why you believe linear algebra is ridiculously important. I see its applications to graph programming and obviously to cryptography, but I've done a lot of work in both of those subjects and never strictly needed a background in linear algebra to be effective.

Linear algebra is insanely important. I would consider the most important area of numerical mathematics to know. Any sort of mathematical modeling you do is going to involve linear algebra at some point.

I have argued that almost all numerical mathematics, in some form, can be modeled as a linear algebra problem. Google's original page rank algorithm is linear algebra. Remember that Netflix challenge? All linear algebra. Optimisation? Linear algebra. Want to do any engineering of a system? Behind the scenes it is all linear algebra as every single numerical technique for solving PDEs, that I am aware of, can be thought of in a linear algebra sense. Fluid modeling is all linear algebra. A lot of the machine learning I've seen is just linear algebra. I would also that almost every simulation running on the world's supercomputers involves linear algebra.

Do you absolutely need linear algebra to do this things? No. Just like I don't need to understand how my car works to drive it. But having an understanding how these systems operate can really help you use them in a more logical way.

Re: Math topics useful for computer science/programming

#55
post #41
post #32

Earlier quoted context omitted.

More simply (but hard to appreciate without going through semesters of work): know that structure-preserving mappings are the important parts.

Yes. But my more important point is that you can tach about these mappings in isolation, in the context of functional programming. No Category Theory needed. You can teach about "different sorts of mappings" in just about any setting. In fact, that's kind of the whole reason Category Theory exists. So why teach the general result when all you care about is its application to functional programming?

The importance of structure preserving mappings shows up in many other places besides functional programming. I do believe context is important, but having multiple contexts is even better.

Re: Math topics useful for computer science/programming

#56
post #52
post #51

Earlier quoted context omitted.

`ridiculously` might be hyperbole, but the two biggest ones I can think of are computer graphics and machine learning; these of which you can't even sneeze at without getting in linear algebra.

I have some sense of the linear algebra implicated in machine learning (I lived for many years with a comp. neuroscience PhD), but I have no visibility into graphics. So with my ignorance pinned to my lapel: the linear algebra involved in computer graphics is pretty simple, right? Just knowing how to manipulate vectors and matrices? Not a lot of eigenvalues, or for that matter orthogonalization? I'm asking not to reb…

Disclaimer: I'm not very experienced with CG, but I think your intuition is correct on CG, for lots of 'boilerplate' game or photoshop programming.

However, I do think you can find plenty of examples in academia. For example, applying PCA

http://cmp.felk.cvut.cz/~hlavac/TeachPresEn/11ImageProc/15PC...

(Perhaps this is just the result of crossover between CG and ML/Statistics here).

Not a good sell, but perhaps someone with more experience can chime in.

Re: Math topics useful for computer science/programming

#57
post #22
post #3

This 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 found it easier to handle Analysis by following the sequence:Spivak ->Apostol->Rudin.

Re: Math topics useful for computer science/programming

#58
post #57
post #22

Earlier quoted context omitted.

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 found it easier to handle Analysis by following the sequence:Spivak ->Apostol->Rudin.

I think I am ready to tackle Rudin, but I don't really like it. I'm not alone there. Arnol'd is said to have called it Bourbakian propaganda. That's a bit extreme, but I certainly dislike books that strive to remove intuition:

http://pauli.uni-muenster.de/~munsteg/arnold.html

Re: Math topics useful for computer science/programming

#60
post #43
post #40

Earlier quoted context omitted.

I think you misunderstood my criticism. "Different sorts of mappings" is NOT synonymous with "category theory". Not even close. Heck, Euclid knew about "different sorts of mappings". Most everything in Gamma et al is arguably useful for everyday programming in Java. Maybe 5-10 pages of MacLane is useful for everyday programming in functional languages. Unless by "Category Theory" you mean "5-10 pages of MacLane", Cat…

Functional Programming is a vast subject. I've really never needed an abstraction for semigroups, monoids, meet-semi-lattices, monads, comonads, arrows or catamorpisms in Clojure, Common Lisp, Scheme, or Hy. These concepts become more relevant when I program Haskell, Agda, Isabelle/HOL, or Coq. I'd say a stronger analogy can be made between reading MacLane's Catagories for the Working Mathematician and reading Hoyte'…

> when I program Haskell, Agda, Isabelle/HOL, or Coq.

That's fair. Although Haskell is a bit of an odd man out in that list, both in terms of its nature and in terms of its typical use case.

> That being said, depending on what sort of functional programming you're doing, a strong background in category theory or meta-programming can enabling (or not).

This is where the analogy between the two books breaks down. When you're using a functional programming language as a proof assistant, category theory can be helpful. But this is far less common than meta-programming.

edit: 2nd paragraph.

Post reply on HN