HN Books @HNBooksMonth

The best books of Hacker News.

Hacker News Comments on
Concrete Mathematics: A Foundation for Computer Science (2nd Edition)

Ronald Graham, Donald Knuth, Oren Patashnik · 17 HN comments
HN Books has aggregated all Hacker News stories and comments that mention "Concrete Mathematics: A Foundation for Computer Science (2nd Edition)" by Ronald Graham, Donald Knuth, Oren Patashnik.
View on Amazon [↗]
HN Books may receive an affiliate commission when you make purchases on sites after clicking through links on this page.
Amazon Summary
This book introduces the mathematics that supports advanced computer programming and the analysis of algorithms. The primary aim of its well-known authors is to provide a solid and relevant base of mathematical skills - the skills needed to solve complex problems, to evaluate horrendous sums, and to discover subtle patterns in data. It is an indispensable text and reference not only for computer scientists - the authors themselves rely heavily on it! - but for serious users of mathematics in virtually every discipline. Concrete Mathematics is a blending of CONtinuous and disCRETE mathematics. "More concretely," the authors explain, "it is the controlled manipulation of mathematical formulas, using a collection of techniques for solving problems." The subject matter is primarily an expansion of the Mathematical Preliminaries section in Knuth's classic Art of Computer Programming, but the style of presentation is more leisurely, and individual topics are covered more deeply. Several new topics have been added, and the most significant ideas have been traced to their historical roots. The book includes more than 500 exercises, divided into six categories. Complete answers are provided for all exercises, except research problems, making the book particularly valuable for self-study. Major topics include: Sums Recurrences Integer functions Elementary number theory Binomial coefficients Generating functions Discrete probability Asymptotic methods This second edition includes important new material about mechanical summation. In response to the widespread use of the first edition as a reference book, the bibliography and index have also been expanded, and additional nontrivial improvements can be found on almost every page. Readers will appreciate the informal style of Concrete Mathematics. Particularly enjoyable are the marginal graffiti contributed by students who have taken courses based on this material. The authors want to convey not only the importance of the techniques presented, but some of the fun in learning and using them.
HN Books Rankings

Hacker News Stories and Comments

All the comments and stories posted to Hacker News that reference this book.
I'm going to go a completely different direction from other recommendations and say Concrete Mathematics by Knuth and Patashnik. They will definitely be able to use skills from analysis and calculus here, but there are so many additional tools in this book that it's very much a worthwhile digression. The marginal notes are great, as well!

I own this book, and it's a favorite of mine.

When I saw the title, this was the first book that came to my mind. Very nicely written, possibly the best math book I've read (as a Computer Science MSc)
Great pick. Note: you can get it for $20 less AND support a local used book store if you buy it from alibris.
Or concrete, as suggested by Knuth, Graham, and Patashnik in their book, "Concrete Mathematics: A Foundation for Computer Science".

The "Concrete Math" book title is a play on words - combining continuous and discrete. From the preface: "When DEK taught Concrete Mathematics for the first time.... [h]e announced that, contrary to the expectations of some of his colleagues, he was _not_ going to teach the Theory of Aggregates, not Stone's Embedding Theorem, not even the Stone-Cech compactification. (Several students from the civil engineering department got up and quietly left the room). [Edit]: Typo/Spelling fix.
Someone asked this a few months ago and the book that was referred was Concrete Mathematics by Knuth ( which I have since purchased and have enjoyed re-learning from college. Highly recommended, and should cover all you need to know. Very approachable text.
Donald Knuth is actually a great writer and teacher. Try Concrete Mathematics instead of TAOCP, it is a shorter and easier introduction:

It is humorous and it includes notes from past students in the margin. I really enjoyed it.

Shameless plug: I wrote an illustrated book on algorithms that aims to be an easier read than TAOCP, CLRS and others:

Not available yet.
The first chapter is here:

(not the final formatting)

I prefer the Sedgewick illustrations. Yours are targetting kids and is too verbose.
This is always a good topic with numerous HN submissions and comments:

Just from a search, there are some great results:

1. Mathematics for Computer Science - HN Submissions:,

2. How to Read Mathematics - HN Submissions:,


Here are some other excellent mathematics books:

1. Mathematics: Its Content, Methods and Meaning

Containing the thoughts and direction of numerous mathematicians including Kolmogorov, this is a great survey of the field of mathematics. It touches upon Analysis, Analytic Geometry, Probability, Linear Algebra, Topology, and more. [1.]

2. Concrete Mathematics: A Foundation for Computer Science

Containing the thoughts and direction of mathematician and computer scientists such as Donald Knuth, this is a great reference for computer science related mathematical concepts focusing on continuous and discrete concepts. [2.]




Any HN recommendations for a good thorough book on Lambda Calculus? Preferably creative commons if such a text exists.
Have you seen this post on StackExchange/Mathematics? This may be a good start. I can't personally recommend any. Of course, good luck learning!

You mean Concrete Mathematics, by Ron Graham^, Don Knuth^^, and Oren Patashnik?[1]

I thought it was just an advertisement for Computer Concrete Roman (Knuth's other font family) and the Zapf(?) Euler math fonts.

^ Yes, that Ron Graham.

^^ Yes, that Don Knuth.

^^^ I don't recognize Patashnik. Sorry.


CLRS is quite 'academic' and requires good understanding of mathematics. It's a great book, but not a good one for beginners, imo. It will be difficult as self study for first timers. You can start with Datastructures and Algorithm Analysis in C by M. A. Weiss[0]. One more alternative is The Algorithm Design Manual by S. Skiena[1]. It's also good and focuses more on algorithm, implementation (as opposed to math-y stuff of CLRS). If I were you, I would get both the books and read alternatively. Don't miss out on exercises, they are very important.

I also suggest you to join this Coursera course, Algorithms: Design and Analysis by Tim Roughgarden[2]. Currently the course is open, so you can sign up for classes. The course is offered in two parts[3], complete both of them.

Once you are comfortable with basic concepts start solving questions/puzzles online on sites like SPOJ[4], UVa[5], (YC-funded) HackerRank[6]. You could try TopCoder[7] also, but the questions are bit difficult. Hope this helps.

PS - You should study math, because it is important in Algorithms Analysis. You could try reading required parts of Concrete Mathematics by Knuth[8] or as you come across new concepts, Google and understand them.

[0] -

[1] -

[2] -

[3] -

[4] -

[5] -

[6] -

[7] -

[8] -

I would also recommend Roughgarden's Coursera classes, however, I would strongly recommend waiting for a live session.

A book I think is informative from a practical perspective is Algorithms in a Nutshell from O'Reilly Press. As always with Amazon I would look for a used copy.

But no need to wait at this moment, as class is live. However I also agree that live session is recommended and actually fun. Some of the Community TAs are really good, which one will miss if attended non-live version of class.
For what it's worth, Rosen's introductory text on discrete mathematics is pretty good as well. (This sort of math crops up all the time in formal CS, for those of you who might otherwise wonder wtf discrete has to do with anything.) (The study guide that is available to go with it is worth the money, imho.)

The Graham, Knuth, Patashnik book on concrete mathematics (a bit of a play on words for continuous and discrete) is a quality work as well but written to a considerably higher level that may or may not be pleasant to contend with depending on the reader's background.

Well you haven't mentioned how much math you're familiar with. But I'll assume that you know school level mathematics and are looking to learn more about the math mostly used in computer science. Get Concrete Mathematics( ) by Graham, Knuth & Patashnik - It's based on the course taught at Stanford since 1970 & it's really really good. Another book I think you should get is Meta Math: The quest for Omega( ) by Gregory Chaitin. It's not really a math course book, and is mostly the authors take on his favorite topics in math, but if you want to improve your thinking process then this book will definitely give you a different perspective.
_Concrete Mathematics_ [1] is a good book that is fun to work through. The book can be considered an introduction/prerequisite to Knuth's _The Art of Computer Programming_ series [2], which contains much mathematics. If you would like a book that is not so difficult, _Introduction to Algorithms_ [3] (aka "CLRS") is also highly recommended.




This looks excellent. I also heartily recommend Knuth's Concrete Mathematics (
This book has a great chapter on recurrence relations. Saved my ass in an algorithms course iirc.
Has anyone read both this and Knuth's Concrete Mathematics? How do they compare with each other?
My recommendation is "Concrete Mathematics", by Graham, Knuth, and Patashnik. (

It is excellently written, but by no means a light read. If you put in the time and effort, you will come out on the other side with a great foundation, and deep understanding and mastery of the topics.

However, it's definitely not an introductory book, and some background in math will be very helpful.

I'd also check out these threads:

Ask HN: Best Mathematics book for complete noobie?

Ask HN: good math books

Ask HN: Learning advanced math

Jun 19, 2009 · chollida1 on Ask HN: good math books
I've seen a few people recommend The Princeton Companion to Mathematics(PCM)

I own this book and while I do agree it's a great book for getting a 10000 foot view about topics in mathematics it's not really a book one read to learn the math that the poster is asking for.

I agree with another post here that said studying is doing problems and being able to do them again a week later without having to consult the text again.

PCM isnt a good book for learning calculus, discrete math, probability or statistics( what the posters wants to learn) simply because it isn't designed to teach them. There are no problems/solutions in the book to try.

If you really want one book then I'd recommend Concrete Mathamatics by Graham, Knuth and Patashnik. It has relevant topics and problem sets that you can work through to see if you truly did learn anything when reading it.

It depends what level you are already on. At some point, you might like to read Concrete Mathematics: A Foundation for Computer Science

which is an enjoyable book, but which presupposes a fairly strong background in math.

An easier book that is good preparation for computer science is Mathematics: A Discrete Introduction,

which is very readable and full of information that will get you ready for computer science concepts and for other math reading.

After edit:

Browse the books on this bibliography page

for lots of suggestions compiled by someone deeply interested in computer science.

Assuming you've been coding for a while, I'd recommend taking a look at Concrete Mathematics ( ). It's a challenging book, but it's extremely well-written, and you should be able to get through it with a minimal amount of other resources. I was able to work my way through it, and I have no background in formal education past the high-school level, let alone a background in maths.

This is, in my opinion, required reading on the same level as SICP for people who are serious programmers - at least those with a weak math background.

HN Books is an independent project and is not operated by Y Combinator or
~ [email protected]
;laksdfhjdhksalkfj more things ~ Privacy Policy ~
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.