# What is the best book for studying discrete mathematics?

As a programmer, mathematics is important basic knowledge to study some topics, especially Algorithms. Many websites, and my fellows suggest me to study Discrete Mathematics before going to Algorithms, so I want to know which Discrete Mathematics book is suitable for my needs?

-
I am wondered, this question got so many up-votes! – pushpen.paul Jan 20 '15 at 7:56

I really like Discrete Mathematics by Ross and Wright:

-

Elements of Discrete Mathematics by C. L. Liu is Helpful for the Introduction ofNumber Theory,Combintorics,Logic.

-

I found the book Elements of Discrete Mathematics by C. L. Liu extremely helpful.

It is at a very basic level and is great if you are looking for an introduction into discrete mathematics.

-

I very much like Norman Biggs' Discrete Mathematics. I would not recommend the second edition. Rather, get the first edition (the "revised" first edition if you can). The text claims to be self-contained (seems so to me).

Since there is not much info on this edition of the text online (the preview on Amazon is the second edition), here is an outline:

Part 1: Numbers and Counting

1. Integers (ordering, recursion, induction, divisibility, gcd, factorization)
2. Function and counting (surjections, injections, bijections, pigeonhole principle, finite vs infinite)
3. Principles of counting (Euler's function, addition principle, words, permutations)
4. Subsets and designs (binomial theorem, sieve principle, designs, $t$-designs)
5. Partition (equivalence relations,distributions, multinomial numbers, classification of permutations)
6. Modular arithmetic (congruences, $\mathbb{Z}_m$, cyclic constructions, Latin squares)

Part 2: Graphs and Algorithms:

1. Algorithms and efficiency (proving correctness, $O$ notation, comparison, sorting)
2. Graphs (isomorphism of graphs, valency, paths, cycles, trees, coloring, greedy algorithm)
3. Trees, sorting, searching (counting leaves, sorting algorithms, spanning trees, MST problem, depth-first, breadth-first, shortest path problem)
4. Bipartite graphs (relations, edge colorings, matchings, maximum matchings, transversals)
5. Digraphs, networks, flows (critical paths, flows and cuts, max-flow min-cut theorem, labelling algorithm)
6. Recursive techniques (linear recursion,recursive bisection, recursive optimization, dynamic programming)

Part 3: Algebraic Methods:

1. Groups (axioms, isomorphisms,cyclic groups, subgroups, cosets)
2. Groups of permutations (definitions, orbits, stabilizers, size/number of orbits, representation of groups by permutations)
3. Rings, fields, polynomials (division algorithm, Euclidean algorithm, factorization)
4. Finite fields (order, construction, primitive element theorem, finite geometry, projective planes, existence)
5. Error correction (words, codes, errors, linear codes, cyclic codes)
6. Generating functions (power series, partial fractions, binomial theorem, linear recursion)
7. Partitions of a positive integer (conjugate partitions, generating functions, mysterious identity)
8. Symmetry and counting (cyclic and dihedral symmetry,3D symmetry, inequivalent colorings, colorings and generating functions, Polya's theorem)
-

Mathematical Thinking: Problem-Solving and Proofs.

John P. D'Angelo, Douglas B. West.

Available at Amazon.

This is supposed to be an introduction to mathematical proofs. As such it is not restricted to discrete mathematics. But it does a very good job for discrete mathematics. You would also see some proof in real analysis; but you can focus only on the discrete part ignoring this.

-

A very good textbook for discrete mathematics at an undergraduate level is the Kenneth Rosen book titled Discrete Mathematics and Its Applications.

The book provides solutions to half of the problems. You can also buy the Student's Solutions Guide. I don't own it, but I would suspect that it either provides the answers to the other half of the questions or provides a step-by-step guide to solving the problems (the book only provides final answers with minimal explanations of those answers).

It's used for the two-quarter sequence in Discrete Mathematics that is taken by computer science and software engineering majors, as well as a number of mathematics programs at my university. I kept this book around even after I took the course, and I'm currently using it to brush up on my discrete math skills for my Certified Software Development Associate exam.

-

Theres many different areas to discrete math, and many good books.

theres Graph Theory by Diestel, which has a free pdf version available at

diestel-graph-theory.com

math.upenn.edu/~wilf/DownldGF.html

Other books that are good include Enumerative combinatorics 1 and 2 by Richard P Stanley (a book which is sufficiently dense that having at least 1 analysis and algebra course each will help).

that being said, for more introductory expositions in terms of expected mathematical maturity, I'd suggest googling around and looking at various lecture notes of the "intro to combinatorics" or "mathematics for computer scientists" sorts. I found that MIT OCW's "mathematics for Computer Scientists" notes were quite nice when I looked at them several years ago.

has a link to the lecture notes. There are some really funny asides in it. One of my favorites "... anyone who says that is wrong, and you should make fun of them until they cry".

Also, If you want to dig even deeper into discrete math/ combinatorics, the value of building up a wee bit of mathematical basics in other areas of math. Complex Analysis, real analysis (at the level of at least baby rudin, and perhaps even up to functional analysis), maybe some probability up to its measure theory formulation level, and at least a smidge of abstract algebra. Then you can do stuff like look at the combinatorics of random processes (great for analyzing randomized algorithms) and look at cool problems like percolation.

theres probably other things I should suggest, but the point is discrete math is accessible without that much of a background, but is also rewards you for enriching that mathematics background with some amazingly beautiful stuff thats 1) awesome and fun 2) useful.

-

Discrete Math knowledge is needed to become adept in proving the correctness and deriving the complexity of algorithms and data structures. You will be taught those in Algo/DS books, but you can only get the mathematical proficiency by practicing just discrete math.

Knuth book is very good for that. But IMHO, you will only need it if you for doing advanced proofs in DS/Algorithms.

For a beginner, it would be great to go over "Grimaldi" http://www.amazon.com/Discrete-Combinatorial-Mathematics-Applied-Introduction/dp/0201199122 and then quickly move to Algorithms.

Otherwise, you will continue going deep in Discrete Math and never get to Algorithms/DS.

Remember, Discrete Math does not teach you how to design algorithms or Data structures. That will come only by practicing Algorithm problems @ topcoder, acm icpc , spoj etc and reading books on Algos/DS or courses on those.

My 2 cents.

-
this is indeed a very good advice. – Gollum Aug 14 '10 at 3:42

By Donald Knuth himself!

-
This is one of the most entertaining books I read in high school, with all its margin graffiti and chatting... it actually makes you eager to do the exercises! – ShreevatsaR Aug 4 '10 at 17:12
This book requires an existing knowledge of discrete mathematics that is well beyond what a programmer needs to know. In fact, I believe this book is geared toward computer scientists in the upper levels of an undergraduate program or even beginning a graduate program. – Thomas Owens Aug 12 '10 at 23:47
@Thomas Owens: Actually, it was an attempt to take a program like you describe that already existed at Stanford and make it more accessible. So says the preface of the second edition. – Larry Wang Aug 13 '10 at 0:16
Different books require different prerequisites and appeal to different people. There is no book to rule them all. You might have to study some topics from one book and some from others. There is NO 'ONE' book. There can't be. – Pratik Deoghare Aug 13 '10 at 5:58
That's true. But I still stand by my assertion that you can not learn discrete mathematics from this book since a prerequisite to this book is a background in the basic concepts of discrete math. This book answers the title question, but does not take into account the body of the question where the asker is looking for a book to develop the basic knowledge of discrete mathematics that might be required to have a deeper understanding of algorithms – Thomas Owens Aug 13 '10 at 10:08