TAOCP by Knuth are quite something to read

It’s been almost one year since I wrote my last blog post. I hope to write more frequently in the future on topics like in this post.

About one month ago I received my copy of The Art of Computer Programming, Volume 4A: Combinatorial Algorithms, Part 1 by Donald Knuth from Amazon. I wasn’t expecting to read it from cover to cover but I wanted to see what Knuth’s work look like because there are very hot discussions on the Internet about whether Knuth’s work are worth reading. Knuth himself also has joined one of such discussions.

The first thing I noticed when I opened the book was that some pages were really math-heavy. It was a frightening first contact. However when I tried to read some parts I saw that it was not that bad and most of the stuff was explained in plain English and most mathematical stuff belong to proofs of given theorems. On the other hand the volume I got was particularly interesting for me because it’s about a useful, fun and challenging topic, Combinatorial Algorithms which Knuth himself also states as “The kind of programming I like best”.

A few days after I got the book (what a coincidence!) I needed an algorithm for finding combinations (of m) of integers whose sum was equal to a given number n. The algorithm I needed was Integer Partitioning which I was able to discover thanks to the extended index at the end of the book (and Google of course). I just put the book nearby and implemented the algorithm in Java even without understanding it completely; it was a quite straightforward process.

I am now a happier developer as I have been able to utilize Knuth’s work for a real world case :-)

I may write more about the algorithm-to-Java transformation process later as it was also an interesting experience.

Finally, greetings to my colleague, Derya Susman who shared this joyful experience with me ;-)