Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: Resources to learn math as a foundation for CS
38 points by txmjs on March 2, 2018 | hide | past | favorite | 12 comments
I’ve been a self taught web developer for about 4 years, and although my programming knowledge has been increasing at an exponential rate recently, I feel like I want to step up to the next level, by which I mean trying to teach myself the foundations of CS. I know in order to do this, my maths needs to be much stronger than it is now. Assume that my maths knowledge is currently at the same level as a high school student. I’d appreciate any advice as to how I can improve my maths, and what I should be learning in order to better grasp CS foundations. Thanks!

I've done exactly what you are talking about, so I think I have some insight that might be helpful.

For me, the biggest aid was finding good books, ones with exercises and that explained the material very well. Then it was just a matter of reading, actually doing all the exercises, and struggling with the material until I could fully understand it; then I moved on to the next chapter/book/etc.

I've worked through a lot of books by now but here's the short list of ones that I think are great for getting started(especially, if you do what I described above), also when these have solutions manuals I would advise getting them as well so you can ensure you understand how every problem works.

1. Calculus 4th ed. by Smith and Minton

2. Introduction to Linear Algebra (Gilbert Strang)

3. Introduction to Probability Theory (Hoel, Port, Stone)

4. Discrete Mathematics and its applications (Rosen)

5. Introduction to Automata Theory, Languages, and Computation (Hopcroft)

6. Introduction to Algorithms (Cormen, Leiserson, Rivest, Stein)

It will take you at least a year if not two to work through all these in your spare time, but the advantage is that after that you'll have the skills to be able to approach just about any topic in computer science (even highly theoretical ones) and not have much difficulty understanding them (at least that was my experience).

Thanks for this!

Can you suggest a book that would be a bit more introductory and cover Algebra well? I missed out on ever understanding it properly in school and would love to try again.

yes, I would recommend "Algebra 2" published by McGraw-Hill (https://www.amazon.com/Glencoe-Algebra-2-McGraw-Hill-Educati...). I actually had to start there myself, now those many years ago :).

Best of luck!

Modern mathematics is built around linear algebra and analysis. It's no coincidence math bootcamps like Harvard Math 55 go this route. If you are into long-term mathematical learning and you can afford the detour, I'd start by learning linear algebra from e.g. Axler and analysis from e.g. Bressoud (both are didactic masterpieces).

Alternatively, you can start by studying any of the alternative foundations to mathematics (set theory, logic, etc). Perhaps from a toned down alternative to Sørensen & Urzyczyn. A beautiful and very modern way to do this for a CS student would be to marry it with a course on automated theorem proving (using Isabelle or Coq). Any book suggestions welcome.

This has been the single most useful math resource for me as a programmer: https://github.com/Jam3/math-as-code, especially for working through CS textbooks like CLRS.

Concrete Mathematics by Knuth was designed with your needs in mind, and has essentially become the canonical "math for cs" text. I haven't read more than the preface plus a few pages though, so I can't comment further on whether or not it delivers in my opinion, but the opinions of others seem very positive.

Mathematical Foundations of Computing by Keith Schwarz:


Just saw this via another recent HN thread and started reading it. The writing and exposition of topics seems good to me.

I checked it out and it seems approachable. Is there any resource that provides answers to the problem sets ?

I am not sure to be honest, but if you want a book with answers, try Discrete Mathematics with Applications by Epp [0]

It has a very large number of answers in the back, but not all of them. You'll come out ahead even if you only do the problems with an answer as each section has anywhere between 30 to 60 problems. If you want to try every problem (or some of the interesting ones that don't have answers), there's an instructor's manual for 3rd edition. The one I linked is the 4th ed. No problem as the editions 3 and 4 mainly differ in numbering of their sections and chapters, so if you match a chapter from 4 ed to the one in the instructor's manual for 3rd ed, the answers are identical and in the same order. If none of this works for you, either just google the problem or visit MSE [1] as almost none of the problems in the undergrad books are original and many people before you have asked the same questions many times over.

Note, the price of the book is steep, but I am sure you know of libg3n.


[1] https://math.stackexchange.com/questions

Great! Thanks.

This sounds pretty much like what you are looking for: https://courses.csail.mit.edu/6.042/spring17/mcs.pdf

Given that linear algebra has become so vital lately (as others remarked already), the following new book appears better than the lot from an applied viewpoint: https://web.stanford.edu/~boyd/vmls/vmls.pdf

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