Introduction to Algorithms by The MIT Press Title: Introduction to Algorithms

Purchase Item

Manufacturer: The MIT Press
List Price: $82.00
Our Price: $42.90

Customer Reviews:
Introduction to Algorithms by The MIT Press

Introduction to Algorithms

very interesting and fine written book, clearly explained study subjects, plenty of exercises for every chapter
Introduction to Algorithms by The MIT Press

Lots of problems with no solutions

If you look at the preface, the author states "Despite myriad requests from students for solutions to problems and exercises, we have chosen as a matter of policy not to supply references for problems and exercises, to remove the temptation for students to look up a solution rather than to find it themselves." Well, gee, thanks mister author, for you so very high opinion of me as a lazy cheater. I guess I'll just come up with the best answers that I can, and just automatically assume that they're right since I have no correct answers to compare them to. I'm sure glad you have such high principles as you sit up in your MIT ivory tower that you will not be swayed by the masses. I grovel in starry admiration of your intellectual genius and moral superiority. Too bad I have to buy your book for my class.
Introduction to Algorithms by The MIT Press

There are two reasons to buy this book.

The first reason: you're taking a course and this is the text. The second reason: you are a working professional and think it might be useful. I have comments for each reason.

If you are taking a course, there is a good chance you will hate this book. This reminds me a lot of the Feynman Lectures of Physics: rapturously admired by people who have already mastered the material; a bit on the brain-numbing side for those who have never seen this stuff before.

This book (despite its bulk) is actually very concise in its treatment of topics. This means that you'll be reading along and suddenly realize it has left you behind. On the other and, it is also very precise, which means your problem is that you missed something. Fortunately, because it is concise, whatever that is is bound to be in the last page or so.

My advice to the student is this: learn to live with the Zen of this book, and you won't hate it. Simply accept that this book will take you on numerous short trips from mystification to epiphany. When you find yourself lost, back up a few paragraphs and really apply yourself. If this were easy stuff, everybody would do it.

For the professional, realize that this is NOT a cookbook. Don't go to this book to examine what an implementation of heap sort in C might look like, although users of languages like Python might be able to use some of the book's treatments of things like graph algorithms that way.

This is a book about designing algorithms, not implementing them. If you need to design an algorithm (much more likely in today's sophisticated, networked, massive data centric applications), this is your text. It is comprehensive, and has useful reviews of things like infinite series and probability that you're probably a bit rusty on.

This is a kind of book a professional wants when his job is giving his company a competitive edge at doing really, really hard stuff. It's not for people who buy books with names like "Visual Basic for Dummies".

If you are a teacher, I would say this: be prepared for students who don't like this book. However this book will get the job done, and will be something students who go on to advanced work will want to keep.

Kleinberg and Tardos, although not the kind of textbook you keep for the rest of your life, may be a better choice on the undergraduate level for several reasons. First, it introduces the material in a more gentle, pedagogical manner. Second, it makes more of an effort to introduce topics using somewhat realistic sounding problems; for me this is neither here nor there but students may be less likely to wonder "why are we studying this?" Third, it has solved exercises. Fourth, it's designed to fit conveniently into an undergraduate curriculum between a data structures course and a computation theory course.

That said, when ten years hence your student runs across a dynamic programming problem and remembers he studied this in school, it is CLRS that will get him back up to speed most quickly.
Introduction to Algorithms by The MIT Press

A mixed bag


This book seems to generate strong opinions. I'll try to offer reasons for mine and
base them on examples from the book. I'm sorry this review is so long, but explanations
take more words than emotions. Most of this review was written bit by bit over about
five months, so it might not seem as coherent as I'd like it to be.

There are many errors in this book. It is a big book with a lot of information, so
there is room for a lot of errors. With each printing some of them are corrected.
There is a web site with a list of the errors that have been reported so far, who
reported them, and when they were fixed or will be fixed.
See http://mitpress.mit.edu/algorithms for the error list and other information about the
book. There seems to be fewer errors in each printing, so things are getting better, but
new errors in the first printing (2001), were still being reported in 2006 when the
seventh printing was current. The density of the reported errors decreases toward the back
of the book. I suspect that means fewer readers of the later chapters, rather than fewer
errors, which means the errors will be discovered over a longer time period. But most books
have errors, and based on my experience, computer books have more than most others.
This one is not as bad as some.

Most of my comments here are negative. Balance them against the fact that many instructors
have chosen this text after considering many alternatives. Some of my complaints are general
but supported by only one example. An example, or even several examples do not make the
case. The example documents where "something clicked," when I realized that I had seen
the same flaw several other times.

There were three authors for the first edition, and four for the current, second edition.
It is difficult to make all the chapters seem like they were written by the same person.
The authors did not succeed. Perhaps they did not even try. It does not hurt much.
I noticed the difference only while considering the following problem.

I can not tell what the goal or purpose of the book is. The authors do not seem to have
a clear idea either. The preface tells us it is "a comprehensive introduction" for
"undergraduate or graduate courses in algorithms or data structures" and "equally well
suited for self-study by technical professionals". It claims to be "versatile and
complete", "a mathematical desk reference or an engineering handbook", but "many
interesting algorithms could not be included due to lack of space."

The title is "Introduction to Algorithms" but the book goes well beyond introductory
material, both in depth of treatment and in topics covered. Factoring large integers
and the Fast Fourier Transform are not simple topics. But a little extra is always nice,
so perhaps this really is an introduction.

A lot of the bulk of the book is due to proofs of correctness. This is gold for
some readers and dross for others

There is a lot of math in the book, but it is not uniformly mathematical or uniformly
rigorous. Sometimes it seems the authors do not know what level they are trying for.
Chapter 5 is "Probabilistic Analysis and Randomized Algorithms." It says "If you are
unfamiliar with the basics of probability theory, you should read Appendix C, which
reviews this material." Appendix C says "This chapter reviews elementary combinatorics
and probability theory. If you have a good background in these areas, you may want to
skim the beginning of the chapter lightly and concentrate on the later sections."
Section C.5 is an advanced discussion of the tails of the Bernoulli distribution.

Some of the math sections are fairly advanced. There are subtle points I never saw before
in spite of my BS Math. In other places the math is overly simple. Appendix A is a review
of summations. There is a formula for the sum of the simplest arithmetic and geometric series,
but the general cases are ignored. Overall the level of the math seems close to "right."
If the title were changed to "Introduction to Algorithms and Analysis of Algorithms" then
the level would be fine. Readers uninterested in the mathematical analysis of the algorithms
or unable to follow the analysis need not despair. Most of the results are also presented in
English. This book is probably (just a guess) as good as most of the lighter, thinner,
and less expensive tomes for those readers.

The technique of partial fractions is used several times with the results presented as if by
magic instead of as the result of a simple technique. One sentence "look up partial fractions
in any calculus book" would help some readers. However, there is an extensive bibliography and
many pointers to one or more sources for many topics.

Many reviewers have complained about the pseudocode and I agree it is a weakness of the
book, but it is not a total mess. It is not APL or even similar to APL. It is closest
to Pascal, but there are differences. Variables are local unless otherwise indicated,
and that is fine. Variables are not declared and that is fine. Block structure is
indicated by indentation instead of words or symbols that mean begin and end, and that
would be fine except that the authors do not follow their claim. Instead, an apparently
meaningless keyword "do" introduces many blocks. It may have a meaning, but I could not
find it since it is not in the index. The result of the "do" is a block appears with mixed
indentation. Also, the indentation from one level to the next varies from place to place,
apparently from 3 to 7 spaces. It is hard to tell. I suspect the pseudocode is set in a
variable width typeface with spacing added to make it look fixed width. Perhaps the "do"
is a residue from Pascal where it is used to terminate the test portion of a WHILE or FOR
statement. If so, most style guides would have it with the test, rather than with the
block controlled by the test. I believe most readers would find it easier to understand the
pseudocode if they used a bottle of "whiteout" to erase all the instances of "do".

Assignments are done with an arrow instead of Pascal's ":=", and that is fine.
Comments are introduced by a special triangle symbol instead of any of the common
comment symbols. I can not imagine why.

In Pascal, functions return the value stored in the variable with the name of the function.
The pseudocode uses return statements which can have explicit values, and that is fine, (an
improvement in my opinion) but the return statement is not mentioned in the index.

Arrays are indexed from 1 to n, instead of from 0 to n-1. This is not a fault. The debate
over which is best has gone on for decades. Readers will have to adjust the index if they
compare the algorithms presented here with those in a source that uses Java, C, etc.
In at least one case, they also use zero base. In the section on Bucket Sort, the algorithm
uses both with no reason given for either.

The lack of answers to any of the problems can be a problem to most readers and will be
a major problem to those using the book for self education. Some answers can be found on
the web pages maintained by some CS instructors who use the text. I have no idea what
fraction of the answers are available, and offer no tips for finding them. The lack of
answers is made worse by another characteristic. Many claims are made in the text, with the
proof deferred to a problem. Sometimes the problem makes a further reference, even to a
different chapter. For example, the discussion of double hashing depends on problem 11.4-3,
which contains the hint "See chapter 31." Some readers might be willing to use a result
from a problem without seeing the proof. This is not always possible. Some problems express
something about an algorithm, perhaps a formula for running time, or a post condition, or a
fragment of implementation, or perhaps several alternative claims, and then ask which if any are true.

The authors deserve a star for intellectual honesty. Many authors freely lift historical
notes from elsewhere and repeat the information. Here, the historian (often Don Knuth)
is given credit as well as the inventor.

Some algorithms are presented in a recursive form when an iterative form is well known,
and sometimes much better known, and usually the original form. Merge sort is a good
example. This bias to the recursive form usually makes the analysis of run time easier
but might lead some developers to an inefficient implementation. I found a few cases where
the iterative form was mentioned in an exercise or problem. For example, in quicksort,
which partition to stack and which to sort is not asked, but can be discovered by solving
a problem on p162. Even Euclid's algorithm for the greatest common divisor is presented
as recursive. Exercise 31.2-4 asks for an iterative version.

In spite of the bulk of the book, it is not complete. For most topics it is not complete.
The authors do not claim it is complete; they explicitly state it is not. In general,
they have made a reasonable choice of material. Consider binary trees. There have been
many inventions for keeping binary trees in reasonable balance in spite of biased additions.
The authors ignore most of them. They provide very good coverage of red-black trees, which
may provide the best tradeoff between best possible balance and least effort spent adjusting.
Splay trees and skip lists get a few lines each.

There is a 17 page bibliography of 320 items.

The index is 36 pages of two columns, but it is not complete. It seems to cover some topics
thoroughly, but others less so. Definitions seem to be covered, but uses are often ignored.
For example, Sterling's approximation to n! is indexed where the formula is given, but not
any of the places where it is used. The entropy function is used as an example several times,
but is indexed only where it is defined. Some special notation conventions are explained
where they are introduced, but then not used immediately. The reader wondering what it is
good for is lost. The index does not help.

Some reviewers have berated reviewers that have not read the entire book. I plead guilty.
I'm using the book for a class that covers 20 of the 35 chapters, the first 15 and the five
chapters about graph algorithms. The book is good enough that I will probably read most
of the other chapters when I have the time.

The background of other reviewers seems to greatly influence some of their reviews.
So readers of this one can compensate for any of my biases, here is my background.
I'm a retired software engineer, having programmed digital computers since 1960.
BS math '68, MS CS '93. I wanted to take a class as part of my brain-rot prevention plan.
I picked one about analysis of algorithms because I'd seen a little of it in Knuth's books
and elsewhere, but had never done much of it. I've built and used many of the algorithms
discussed in the book. There may be topics that are poorly presented that I would not notice
because of that familiarity. There may be topics that are presented better than in any other
book that I would not notice because of that familiarity.

This paragraph was added more than a year after I finished the course that used the book.
It has drifted to the dusty end of the shelf. I use Knuth every few weeks and Skiena
occasionally. This tome was touched once, when a three page chapter on the Fast Fourier
Transform seemed too terse. After scanning the 27 pages here I went back to the three page version.


Introduction to Algorithms by The MIT Press

Great book; not perfect

I have been using this book since 1995 (that was the first edition; the second is much better). It is a great book, and presents the subject in an incredibly clear way: too often I found that I didn't have to go back and re-read a paragraph or anything. The authors are excellent writers.

One thing I didn't like was the chapter on NP-completeness. It seems to be less clear than the rest of the book, but then maybe it's just me.

The exercises are good -- there are easy, medium and hard ones.

But even this book being excellent, I would recommend others as well -- some other books have a better coverage of parallel, distributed, approximated algorithms, and the theory of computational complexity is barely scratched in this book.

And one thing that I see people complaining about (and I agree with them) is the total absence of answer to exercises. There are some problems with this:

* People who study on their own have no way to tell if they really got it right. It's not an easy subject, and looking up the answer to get some positive reinfircement after you finished an exercise is an excellent way to enhance and speed up the learning process, as well as spotting mistakes;

* Not making answers available is some kind of message to instructors: "Don't bother creating your own sets of exercises; use those from the book, the students won't know the answers anyway". There are instructors who will use exercises from this book on tests (!) -- this is not good. Teachers should be able to come up with their own exercises and tests, and ***change them every time they teach the course!*** (I once saw a student with a pile of resolved exercises on Compilers. He said the teacher would always use exercises from a certain list in his test)

So, really... Not publicizing answers to at least part of the exercises makes no sense (that's why I am not giving it 5 stars).
Introduction to Algorithms by The MIT Press

Product Description

The first edition won the award for Best 1990 Professional and Scholarly Book in Computer Science and Data Processing by the Association of American Publishers.

There are books on algorithms that are rigorous but incomplete and others that cover masses of material but lack rigor. Introduction to Algorithms combines rigor and comprehensiveness.

The book covers a broad range of algorithms in depth, yet makes their design and analysis accessible to all levels of readers. Each chapter is relatively self-contained and can be used as a unit of study. The algorithms are described in English and in a pseudocode designed to be readable by anyone who has done a little programming. The explanations have been kept elementary without sacrificing depth of coverage or mathematical rigor.

The first edition became the standard reference for professionals and a widely used text in universities worldwide. The second edition features new chapters on the role of algorithms, probabilistic analysis and randomized algorithms, and linear programming, as well as extensive revisions to virtually every section of the book. In a subtle but important change, loop invariants are introduced early and used throughout the text to prove algorithm correctness. Without changing the mathematical and analytic focus, the authors have moved much of the mathematical foundations material from Part I to an appendix and have included additional motivational material at the beginning.
Introduction to Algorithms by The MIT Press

Amazon.com

Aimed at any serious programmer or computer science student, the new second edition of Introduction to Algorithms builds on the tradition of the original with a truly magisterial guide to the world of algorithms. Clearly presented, mathematically rigorous, and yet approachable even for the math-averse, this title sets a high standard for a textbook and reference to the best algorithms for solving a wide range of computing problems.

With sample problems and mathematical proofs demonstrating the correctness of each algorithm, this book is ideal as a textbook for classroom study, but its reach doesn't end there. The authors do a fine job of explaining each algorithm. (Reference sections on basic mathematical notation will help readers bridge the gap, but it will help to have some math background to appreciate the full achievement of this handsome hardcover volume.) Every algorithm is presented in pseudo-code, which can be implemented in any computer language, including C/C++ and Java. This ecumenical approach is one of the book's strengths. When it comes to sorting and common data structures, from basic linked lists to trees (including binary trees, red-black, and B-trees), this title really shines, with clear diagrams that show algorithms in operation. Even if you just glance over the mathematical notation here, you can definitely benefit from this text in other ways.

The book moves forward with more advanced algorithms that implement strategies for solving more complicated problems (including dynamic programming techniques, greedy algorithms, and amortized analysis). Algorithms for graphing problems (used in such real-world business problems as optimizing flight schedules or flow through pipelines) come next. In each case, the authors provide the best from current research in each topic, along with sample solutions.

This text closes with a grab bag of useful algorithms including matrix operations and linear programming, evaluating polynomials, and the well-known Fast Fourier Transformation (FFT) (useful in signal processing and engineering). Final sections on "NP-complete" problems, like the well-known traveling salesman problem, show off that while not all problems have a demonstrably final and best answer, algorithms that generate acceptable approximate solutions can still be used to generate useful, real-world answers.

Throughout this text, the authors anchor their discussion of algorithms with current examples drawn from molecular biology (like the Human Genome Project), business, and engineering. Each section ends with short discussions of related historical material, often discussing original research in each area of algorithms. On the whole, they argue successfully that algorithms are a "technology" just like hardware and software that can be used to write better software that does more, with better performance. Along with classic books on algorithms (like Donald Knuth's three-volume set, The Art of Computer Programming), this title sets a new standard for compiling the best research in algorithms. For any experienced developer, regardless of their chosen language, this text deserves a close look for extending the range and performance of real-world software. --Richard Dragan

Topics covered: Overview of algorithms (including algorithms as a technology); designing and analyzing algorithms; asymptotic notation; recurrences and recursion; probabilistic analysis and randomized algorithms; heapsort algorithms; priority queues; quicksort algorithms; linear time sorting (including radix and bucket sort); medians and order statistics (including minimum and maximum); introduction to data structures (stacks, queues, linked lists, and rooted trees); hash tables (including hash functions); binary search trees; red-black trees; augmenting data structures for custom applications; dynamic programming explained (including assembly-line scheduling, matrix-chain multiplication, and optimal binary search trees); greedy algorithms (including Huffman codes and task-scheduling problems); amortized analysis (the accounting and potential methods); advanced data structures (including B-trees, binomial and Fibonacci heaps, representing disjoint sets in data structures); graph algorithms (representing graphs, minimum spanning trees, single-source shortest paths, all-pairs shortest paths, and maximum flow algorithms); sorting networks; matrix operations; linear programming (standard and slack forms); polynomials and the Fast Fourier Transformation (FFT); number theoretic algorithms (including greatest common divisor, modular arithmetic, the Chinese remainder theorem, RSA public-key encryption, primality testing, integer factorization); string matching; computational geometry (including finding the convex hull); NP-completeness (including sample real-world NP-complete problems and their insolvability); approximation algorithms for NP-complete problems (including the traveling salesman problem); reference sections for summations and other mathematical notation, sets, relations, functions, graphs and trees, as well as counting and probability backgrounder (plus geometric and binomial distributions).