Anatomy of a bestseller: Tom Cormen on keeping “Introduction to Algorithms” current

Tom Cormen, Emeritus Professor of Computer Science at Dartmouth College, is one of the co-authors of Introduction to Algorithms, the influential textbook now in its fourth edition. A perennial bestseller in the field, Introduction to Algorithms has maintained its standing as an important reference text over three decades—thirty years in which the world of computing has revolutionized nearly every aspect of daily life. We asked Tom about the work involved in keeping a textbook current in a changing field.

You were a graduate student when you first began work on Introduction to Algorithms, and you are now a professor emeritus. Tell me about the team you’ve assembled to help keep it current.

Over the years, several Dartmouth students have helped us prepare the textbook and ancillary materials, assisting in converting illustrations from one format to another or colorizing them, checking the bibliography, and developing lecture notes and solutions for the instructor’s manual. In fact, two undergraduate students, Clara Lee and Erica Lin, did such outstanding work on the manual for the second edition that they are listed as coauthors of the manual. I have managed to stay in touch with almost all of these students, some of who graduated from Dartmouth over 20 years ago.

Tell me about the co-authorship process: did you have a specialization, or a favorite part of the writing process?

Each chapter has a primary author, but we each have a hand in every chapter. In some cases, I developed a new way to approach existing material, such as changing the treatment of binary search trees between the second and third editions, or explaining the intuition behind the potential function for table doubling and halving in the fourth edition. In other cases, I had to learn the material in order to write the chapter from scratch, such as the chapter on bipartite matching and the section on suffix arrays in the fourth edition.

My favorite part of the writing process is the feeling I get when I know I got a sentence, or a paragraph, just right. And then I hope that I don’t get knocked down later when Julie Sussman, the best copyeditor ever, shows me an even better way to say it!

The field was obviously very different when you first wrote Introduction to Algorithms. Tell me a little about the process of revision within a quickly changing and developing field.

One change that is quite apparent to us, the authors, is the technology we use to produce the book. To produce a PDF of the book, we have to run it through LaTeX, BibTeX, and windex (the indexing program that Ron Rivest wrote) three times, dvips once to produce a PostScript file, and then ps2pdf to produce the PDF.

When we started writing the first edition, we were just producing PostScript, not PDF, and even before we had written the entire book, producing the PostScript file was an overnight run—unless we ran it on Ron’s machine, when it took about an hour. On our laptops now, it takes about 20 seconds to produce the PostScript file, and a few more seconds to produce the PDF.

For the first edition, the illustrations were produced at a separate site from the text, and they were pasted in. Starting with the second edition, we can lay in illustrations directly. We have also augmented our set of LaTeX macros over the years, most notably the clrscode, clrscode3e, and clrscode4e packages, which allow everyone to typeset pseudocode the way we do.

One other change related to keeping up with the times is that for the fourth edition, we are making available a complete set of Python implementations of the algorithms in the book. (Because the algorithms in the new chapter on machine learning are so abstract, we omitted them.) The Python code was written by my former student, Linda Xiao, and me.

Regarding how the content of the book has changed over the years, as much as we would have liked to only add material and not remove any, there are physical (and contractual) limitations to how big the book can get. So we’ve had to decide not only what material to add, but what material to cut. Left to our own devices, the book would end up being a cube!

Media Inquiries

Journalists seeking information about EECS, or interviews with EECS faculty members, should email eecs-communications@mit.edu.

Please note: The EECS Communications Office only handles media inquiries related to MIT’s Department of Electrical Engineering & Computer Science. Please visit other school, department, laboratory, or center websites to locate their dedicated media-relations teams.