Live data from Hacker News

Ask HN: Learn Math the Hard Way

news.ycombinator.com

51–60 of 88 posts

Re: Ask HN: Learn Math the Hard Way

#51
post #45

Just follow the usual path for education in relatively applied math. Here is a nutshell description: The standard high school level subjects are algebra, plane geometry, second year algebra, trigonometry, and solid geometry. The standard college level subjects are calculus, abstract algebra, linear algebra, advanced calculus, ordinary differential equations. Might also take elementary courses in probability and stati…

Most areas of CS you do are unlikely to need advanced calculus or topics that depend on it (differential equations, topology, measure theory...). Yes, we can both name exceptions, but on the whole you can learn them later if it proves relevant to what you want to do. You are right that you do need algebra, linear algebra, just enough calculus to understand infinite series (which is usually put in the second calculus…

I agree. ten's list is excellent but the OP wanted to learn topics that would help with CS and algorithms. To that end graph theory, combinatorics and basic calculus should have been given more weight. But for theoretical CS I can't think of where Linear algebra would be useful. Abstract Algebra yes, but why Linear Algebra ? (p.s. i read your stuff on kelly criterion a long whiles ago, top notch, thanks!)

----

I would also suggest more emphasis on logic, sets, and type theory. Category Theory is also something fairly common in CS. So I would recommend (Free!): www.cs.unibo.it/~asperti/PAPERS/book.pdf

Abstract algebra: http://abstract.ups.edu/

And while I am skeptical as to the need of linear algebra for CS, it is such a key requirement for mathematical maturity I will suggest: http://www.math.miami.edu/~ec/book/. If Linear algebra is a building then abstract algebra is the frame. The two should really be taught at the same time.

Re: Ask HN: Learn Math the Hard Way

#52
post #38
post #13

Start with these topics. Work your way through them, and make sure you understand everything you have read so far before progressing. Do the exercises, or it will be a waste of time. 0) Algebra, Trigonometry, Calculus Make sure you have a decent grasp over high school level math topics. You might not need to use these topics frequently (though trig comes up a surprising amount), but they are necessary to establish a…

You say 'trig comes up a surprising amount'. It would be great if you could give a few examples of these instances. I have always thought of trigonometry as one of the areas I really enjoyed in school but something I have never used ever since.

I think the surprising commonality is conditional. So you won't see it unless you are focusing on physics or signal processing.

Re: Ask HN: Learn Math the Hard Way

#53

Just follow the usual path for education in relatively applied math. Here is a nutshell description: The standard high school level subjects are algebra, plane geometry, second year algebra, trigonometry, and solid geometry. The standard college level subjects are calculus, abstract algebra, linear algebra, advanced calculus, ordinary differential equations. Might also take elementary courses in probability and stati…

While I love Rudin's Real and Complex Analysis and Functional Analysis , I've always thought Loomis and Sternberg's Advanced Calculus could serve as an interesting alternative to more conventional texts like Baby Rudin for introductory analysis. It also seems particularly suited to self-study: surprisingly self-contained, good exercises, a nice selection of applications, and available free from Sternberg's Web site […

'Advanced calculus' is a huge, ill-defined subject, partly a catch-all of introductions to several large topics. So I tried not to give a 'clarifying guide to advanced calculus' and, really, instead to concentrate on what would be of more interest to the OP. In particular, I listed only Rudin's 'Principles'.

Generally in advanced calculus I avoided the discussion of, and much connection with, geometry, Stokes theorem, and exterior algebra. So, I avoided Buck, Fleming, Spivak, and of course also, now in English, Henri Cartan, 'Differential Forms'. I even avoided the classic applied advanced calculus text, long used at MIT, Francis B. Hildebrand, 'Advanced Calculus for Applications'.

For Loomis and Sternberg, I agree with you, and have both the hard copy and the PDF.

Since I've mentioned such advanced calculus, I will try to save many students: Students, there's a secret. The secret is that vector analysis, Stokes theorem, etc. are important in physics and engineering; they will also be important in computing when computing concentrates on such physics and engineering. But still mostly what you will find in physics and engineering is vector analysis much as it was done in the 19th century which the late 20th century math departments liked about as much as a skunk at a garden party.

If you read the modern treatments, complete with differential forms, then you will be at the head of the class in an advanced class in general relativity (e.g., Misner, Thorne, and Wheeler) but will still be lost in much of old physics and engineering!

So, what to do? Sure, go to Tom M. Apostol, 'Mathematical Analysis: A Modern Approach to Advanced Calculus', Addison-Wesley, Reading, Massachusetts, 1957. The good thing about this book is the lie in the title -- it's mostly a 19th century treatment and not "modern"! So do whatever you have to do to get a copy. And get the 1957 edition and NOT a more recent edition where he omitted the 'good stuff'!

Then, in about 20 pages of the sweetest dessert you ever tasted, with line integrals, conservative force fields, and potentials, volume and surface integrals, nice stuff like that, you will find a charmingly clear presentation of what you need. Right: The treatment is not up to the precision of Rudin and actually needs pictures. Still it's what you need for much of physics and engineering. It's, uh, 'intuitive' math; trying to make that material as precise as Rudin could take you, well, a long time.

And it's EASY -- can take it with a couple of beers and have a really fun evening. Then don't tell anyone where you learned it! Besides, at its core, it's just nice uses of the fundamental theorem of calculus you saw in freshman calculus! Did I mention, it's easy?

The key point about Rudin's 'Principles' is the care with which he covers the real numbers, compactness, continuity and uniform continuity, sequences and series, and the Riemann integral (yes, patched up with the Stieltjes extension which isn't much different). So, he concentrates hard on the foundations. For someone like the OP, getting those foundations solid is likely more important than rushing into many of the more famous topics in 'advanced calculus' -- Fourier series, the heat equation, Lagrange multipliers, vibrating strings (boundary value problems), the Navier-Stokes equations, series solutions to ordinary differential equations, etc.

While I like Rudin, 'cut many of my math teeth' on Rudin, and really like some of his treatments of some topics, I omitted some notes on how to read Rudin; some such notes could be helpful. In particular, Rudin has some places where it's easy to get stuck, and students should be advised not to get stuck (don't assume that just because you can't see how to solve some one exercise must be missing something important) and if necessary just to look for other sources, ask for help, skip over and come back, or just f'get about it. Rudin was one of the best writers of his material, but he was not perfect, varied, got easier to read as he wrote more, but still is relatively severe. Due to the severity, there have been some people, e.g., at Courant, who didn't like Rudin!

As much as I like the real half of his 'R&CA', he gets a bit severe and obscure in a few places (his novel and surprising but long and 'unstructured' construction of Lebesgue measure and his work on regular Borel measures); net, for most students it would be good to read Royden first or in parallel.

Rudin has two exercises that can slow people down: (1) Every closed set is the union of a perfect set and a set that is at most countable and (2) there are no countably infinite sigma algebras. Both exercises require paying attention to what is countable versus uncountable. The first one I worked on about 14 hours a day for two weeks before someone mentioned 'uncountable' at which time I got it in about 90 seconds. The second one took me a long evening, but I was the only one in the class who got it. For the first one, eventually Rudin included the hint. Students: Don't get stuck on such exercises.

For Rudin's 'Functional Analysis', I nearly went to Brown's Division of Applied Math but at the last moment went to Hopkins instead. Brown was using Rudin's FA, so I got a copy and at Hopkins asked for a reading course in it. Alas, the prof had never heard of that book and declined to participate! So, Rudin's FA, along with his 'Fourier Analysis on Groups' or some such are still sitting new on my shelf as I write software!

Re: Ask HN: Learn Math the Hard Way

#55
post #11

You may not come from the same culture that I came from, but the early significant milestones in my mathematical education were: 1. Reading the "aha!" books by Martin Gardner, as a child. 2. Reading Lockhart's "A Mathematician's Lament" [1] 3. Linear algebra, calculus, and complex analysis classes. I was taught these at Cornell; you might look for them via MIT's OpenCourseWare [2]. 4. A bunch of combinatorics, from C…

FYI, Lockhart has a new book coming[1] out with the kinds of things we should be doing, which is something I (and probably everyone who read & liked his Lament) have been pining for. I'm waiting like everyone else, so I can't explicitly recommend it. But I certainly anticipate a mental treat.

1. http://www.amazon.com/Measurement-Paul-Lockhart/dp/067405755...

Re: Ask HN: Learn Math the Hard Way

#57
post #19

When I was in early university, I went through Introduction to Algorithms and chapter by chapter, I implemented nearly every algorithm presented in the book. At the time, I had no idea why I was doing it (fun? ACM practice?), but in hindsight it was incredibly important. I learn by doing, not by reading (at least doing cements what I read), so I make sure that I incorporate a lot of practice into my plans.

That's really the basis for the "Learn X the hard way" tutorials. There's a number of books that propose to teach a topic quickly/easily, with the shortcut being that you won't have to go through all the exercises. It turns out that's an ineffective teaching style for most computer/science topics. For many of these topics, you really can't short-cut that process of implementing solutions and learning from doing.

Re: Ask HN: Learn Math the Hard Way

#58
post #51
post #45

Earlier quoted context omitted.

Most areas of CS you do are unlikely to need advanced calculus or topics that depend on it (differential equations, topology, measure theory...). Yes, we can both name exceptions, but on the whole you can learn them later if it proves relevant to what you want to do. You are right that you do need algebra, linear algebra, just enough calculus to understand infinite series (which is usually put in the second calculus…

I agree. ten's list is excellent but the OP wanted to learn topics that would help with CS and algorithms. To that end graph theory, combinatorics and basic calculus should have been given more weight. But for theoretical CS I can't think of where Linear algebra would be useful. Abstract Algebra yes, but why Linear Algebra ? (p.s. i read your stuff on kelly criterion a long whiles ago, top notch, thanks!) ---- I woul…

But for theoretical CS I can't think of where Linear algebra would be useful. Abstract Algebra yes, but why Linear Algebra?

Linear algebra is a necessary piece of background for linear programming (including the simplex method) and or standard approximation algorithms for many NP-hard problems.

Strassen's algorithm for fast matrix multiplication is commonly taught in algorithms class. It does not make much sense unless you know what matrix multiplication is.

Also if you want to work in computer graphics (which comes up both in theoretical and applied problems) you will need a solid understanding of linear algebra and matrices to understand the material.

I could list more, but that's enough to demonstrate that linear algebra does come up in a lot of places.

(p.s. i read your stuff on kelly criterion a long whiles ago, top notch, thanks!)

You're welcome, and thanks for the compliment. :-)

Re: Ask HN: Learn Math the Hard Way

#59
post #45

Just follow the usual path for education in relatively applied math. Here is a nutshell description: The standard high school level subjects are algebra, plane geometry, second year algebra, trigonometry, and solid geometry. The standard college level subjects are calculus, abstract algebra, linear algebra, advanced calculus, ordinary differential equations. Might also take elementary courses in probability and stati…

Most areas of CS you do are unlikely to need advanced calculus or topics that depend on it (differential equations, topology, measure theory...). Yes, we can both name exceptions, but on the whole you can learn them later if it proves relevant to what you want to do. You are right that you do need algebra, linear algebra, just enough calculus to understand infinite series (which is usually put in the second calculus…

> Most areas of CS you do are unlikely to need advanced calculus or topics that depend on it (differential equations, topology, measure theory...).

Right. The only advanced calculus text I listed was 'Baby Rudin', and the main contribution there is just to get some of the more important properties of the real numbers, Euclidean n-space, infinite sequences and series, and Riemann integration solid.

If a CS student is to stop before these topics, okay, but if they are going to go on then these topics will be part of what is generally assumed.

For CS, as we know, it is doing what EE did -- moving beyond its core tools and into what to do with those tools. E.g., EE got into nonlinear filtering and stochastic integration. E.g., CS is now getting into both optimization and statistics. Then being handy with that Baby Rudin material, at least the early chapters, will get to be important.

With Baby Rudin already done, there can be a good course in differential equations, and such a course can be a good way to see some of the value of what did in linear algebra and Baby Rudin and to exercise that material. At some point in the future, a CS guy might well get into some work involving differential equations -- viral growth models, flight of airplanes and space vehicles, and much of mechanical engineering.

One of the main themes in the future of computer applications is handling 'randomness', and my view is that serious work in that direction should have the measure theory foundations. I did an A/B on that! Early in my career I tried the easy way. After measure theory, Neveu, Breiman, Loeve, Dynkin, Lipster, Shiryaev, etc., I concluded that the measure theory approach to probability, stochastic processes, and statistics was essential.

In particular, without measure theory, people too easily get totally stuck in the mud on what 'random' means, while with measure theory Kolmogorov has a really nice answer. My view is that people may not like Kolmogorov's answer but that, with some really simple assumptions, we get forced into that answer anyway!

For the rest, the Hilbert and Banach spaces won't go away! E.g., a huge dessert buffet of really finger lick'n good applications of the Hahn-Banach theorem is David G. Luenberger, 'Optimization by Vector Space Methods', and that book will be a nice source of methods for a lot that computing people might encounter.

> You left out graph theory and combinatorics, both of which are extremely important to CS.

For combinatorics, I assumed that one would get enough, in some ways deeper than in Knuth's TACP, from abstract algebra and elementary probability. E.g., combinatorics is a lot about counting, and so is group theory in abstract algebra.

For graph theory, I assumed that one would get enough from optimization on networks. E.g., a 'basis' in the network simplex method on a network is a minimum spanning tree! And the max flow/min cut theorem can follow just from linear programming. Dynamic programming, which I mentioned, can be viewed as graph theory.

I did mention linear programming (and so does CLRS), and one reason is that in the CS study of algorithms the algorithms for linear programming are important, and surprising, benchmarks. Also integer linear programming is one of the more important motivations for the question of P versus NP.

For some of the surprise, the simplex algorithm has low degree polynomial expected performance (K. Borgward) but exponential worst case performance (Klee and Minty), but the polynomial algorithms (Khachiyan) when they are faster than simplex have both of them too slow for practice! So, at one of the first places we looked at computational complexity for problems more challenging than, say, heap sort and AVL trees, an exponential algorithm turned out to be superior in nearly every sense of interest to a polynomial algorithm! There never was a guarantee that the study of computational complexity would be easy!

But there's a lot of overlap: I didn't mention courses in 'finite mathematics', combinatorics, or graph theory, but one way and another what I described should provide enough coverage. I didn't mention the CS book CLRS, but I mentioned good coverage of some of the more advanced topics in that book. Or, there is a lot of blending old wine and pouring it into new bottles.

There is a broad point: A major theme in CS now is to borrow, modify, and apply work done some years ago in applied math, especially from operations research, e.g., linear programming, flows on networks, stochastic point processes, and statistics. While CS has some new applications, typically the material is done more carefully in the old applied math sources. So, I emphasized learning the material as math instead of as CS. Besides, the OP was asking about math for CS and not 'mathematical CS'! Also the title asked for the "hard way"!

There's another broad point: What to learn and why to learn it? Just a first cut view of what O( n ln(n) ) means should take only a little searching on the Internet. Besides, Knuth's TACP is quite clear on such 'asymptotics'. I wish Microsoft's MSDN documentation of .NET was as clear and easy to read as TACP!

One reason not to learn this stuff is to confirm that Knuth, Sedgewick, CLRS, etc. were correct after all!

Generally the reason to learn such stuff is for new applications in the future. For that, my view was just to stay with a relatively traditional course in relatively applied math although I leaned away from classic mathematical physics and more to business applications.

Re: Ask HN: Learn Math the Hard Way

#60
post #36

Most math books suck. The one exception, and the first book that made me realize you can teach complex topics to regular folks, is Calculus Made Easy by Silvanus P. Thompson and Martin Gardner. It's been around since the late 1800's and it's what I finally learned calculus from. I haven't found many other books that explain calculus as well as that one. If you get that and then a book of exercises from Schaum's outli…

Calculus: An Intuitive Approach by the late Morris Klein is pretty good too. I found it refreshingly clear!
Post reply on HN