Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask HN: Hard maths for Computer Science?
14 points by newsisan on Aug 13, 2010 | hide | past | favorite | 9 comments
Apologies for stealing your attention - I shall try to make this post as short as possible.

I am in school in Australia, and wondering whether I should take the maths class that is ridiculously easy or take the 'Specialist mathematics', given that I have a strong interest in recommendation and collective intelligence, and am probably looking to study Computer Science at a Uni in the USA.



As a general principle, I believe you should do the hardest maths you possibly can. I have a PhD in graph theory, and these days I manage programmers, write software, and occasionally give talks about how maths is fun, useful and occasionally exciting.

The one thing that constantly catches me by surprise, even after decades, is how apparently useless bits of maths I did as part of my first degree are suddenly, unexpectedly relevant.

Just yesterday an obscure bit of topology interacted with ordinary classical complex analysis to yield an insight into a problem we were having. I can't tell you anything about the problem - it's commercial in confidence - but my colleagues struggled for 2 hours to see the point I was making. These are clever, clever guys, but they didn't have the background, language or toolkit to see the solution.

But it works. Code to implement the solution should ship in about two weeks. Previously we were estimating 8 to 12 months for a solution, and perhaps another 4 for coding.

Do as much math as you can, especially the hard, scary stuff.


Seconded. Hard, scary math is well worth the effort even if you never, ever, use any of it professionally as a programmer in a direct way. You'll be forced to stretch yourself and get used to the idea and the time involved in working on hard problems. Which does translate to dev work later.

Generally, even if the CS program at your university or college isn't that rigorous (and right now, with falling enrollments, it doesn't seem that the average CS school is interested in changing this), the faculty in the math department are almost always scary smart. Take advantage of them.


That is awesome, could you maybe just give a hint about what kind of area it was in? I took topology last year and it was fun but I could never imagine it applied to CS.


It wasn't any specific results or theorems, it was just a way of thinking about "closeness" and the structure of a space we were working in. Instead of thinking of a succession of two dimensional grey-scale images, I said - let's consider the 4D space where the dimensions are X, Y, intensity and frame time, and then think of the images as a mapping from that 4D space into {0,1}.

Now generalise into a mapping from C^2 -> [0,1] and think about continuity. Various properties of objects moving in your images translate nicely into properties of the functions. The thing we were trying to do turned out not to be posible, but this way of thinking showed us a similar idea that worked, and the solutions provided could be warped into a solution of the original problem.

Interestingly, in a sense it was like proving that a given problem is NP-Complete in that we converted the problem we had into another, then converted the solutions back.

It's the rich inter-connectedness that gives you this, not the individual fields. People recommend that you learn Linear Algebra, or Complex Analysis, or Group Theory, or Topology, but in truth, no single field helps on its own.

They are intertwingled, and it's the connections that carry the real benefits.


Thank you all - I made the choice and chose specialist mathematics, and I strongly believe that this was the better choice.


I'm a student at the University of Sydney focused primarily on Natural Language Processing and Machine Learning. My largest regret is not doing more math and that's something I plan on fixing after Honours (either in PhD or in my spare time wherever I end up). If you can, take as much math as possible.

I'd also mention that although the traditionally important math for computer science is discrete mathematics and graph theory you really can't underestimate how important linear algebra, differential calculus and probability theory are if you want to actually understand the theory behind a lot of machine learning algorithms.

If you're looking for a fun project to do that involves mathematics I'd highly suggest writing a raytracer. The amount of linear algebra that you end up learning accidentally just trying to render a sphere with lighting is amazing and it really inspires you to learn more.

I would also highly recommend going through Andrew Ng's AI course from Stanford[1] where he derives many common machine learning algorithms in a simple to follow manner. It shows just how many wonderful bits and pieces of math fall into the area. He only assumes a basic knowledge of probability theory and linear algebra and takes great strides in ensuring there's no "magic steps" in the derivations.

If you get lost, pause the video and read the (wonderfully written) lecture notes or Google for the particular topic you're stuck on. Review notes are also provided for Linear Algebra, Probability Theory, Convex Optimization, Hidden Markov Models and Gaussian Processes if any of those really catch your fancy, but they're not required reading to necessarily understand the majority of the course.

[1] http://see.stanford.edu/see/courseinfo.aspx?coll=348ca38a-3a...



If you think you have a shot at doing it, take the harder course.

Trying to get good grades by looking for the easy A is a good way to teach yourself to never try hard. Furthermore it sets you up for failure later when you find that you didn't learn stuff that people around you did. Plus it is boring, and boredom is not worthwhile.


I recommend linear algebra, probability theory, numerical analysis in that order if you want to pursue recommendation and collective intelligence in cs. Discrete math is also nice but you will be faced with discrete math issues in the above classes as well and you'll pick it up along the way.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: