Shortcut for chapter specific information

Sunday, June 5, 2011

Why people think "reading" CLRS completely is impossible?

If you search for "CLRS" in Google, in Jun 2011, you would find a link which ask "How many programmers recommending “Introduction to algorithms” by CLRS actually read whole book?"

This is a valid question.  In a way, it is similar to "How many people recommending "Feynmann Lecture of Physics" actually read the whole book?" or "How many people actually read Dickens? Austen? Tolstoy? Dostoevsky?" or even "Tolkien?".   In my way of thinking, I think people who have doubt about reading CLRS is possible don't really have issues in programming and algorithmic study.   What they don't grasp is how reading and understanding works. 


Most of us can read.  The difference is mostly an issue about speed and understanding.   Speed is easy to understand,  sparing technicalities, the number of characters divided by the time you spent to read the whole book.   

But what is understanding then?  This is the core of the issues.  This is a tough problem but in many types of work, there are simple answer.   Let's work try to work out this kind of simple answer first.  For example, in fictional work, one can ask simply what is the plot of the story.   A deeper level, one can a detail chronology of all characters that include identifying their names, what they have done.   We also want to identify all their interactions.  


What is even deeper level?  That could be analysis on the text of the work (Many did that on famous book such as ... well Bible).  It could also be an intelligent guess of what the author *really* want to say.  That's what critics do.  It could be a comparison study of what this book compare with other similar books.  Does it has philosophical meaning?  Then philosophers would want to analyze its philosophical implications.  Is it about mind and body?  Monism vs Dualism?  Theist vs Atheist?    Is the book an expression of artistry?  Then a thinking of whether this book is "beautiful".   This is domain of beauty?


So what do we see here?  Understanding of a book seems to be a representation of a book in different type of knowledge.   Some representation is cruder (like just knowing the plot and the title).   Some representation is certainly more complicated and difficult to understand.  

Now a lot of contention of whether one can completely read a book lie on that it is not easy to agree what "reading" really means.   This is not just an issue of computer science books.  It is also an issue of any books.    So we should clarify that first for our subject, CLRS.   How do we define "understanding" of an algorithm?  


In fact from the example of fiction, one can see a proper definition of understanding depends on what representation of understanding should we use.   Many programmers, when they argue about this problem simply ignore this simple fact.    That's fuzzy thinking.  It's a big no-no for programmers.   What are some other types of fuzzy thinking one can think of? I can imagine couple of others.  Here is a big one.
  • "After I read the book for the first time, I will be able to use any algorithms in the book at ease."
My bet is that it is how many programmer are thinking.  After reading one single book, we become some type of super programmer and we end up able to solve all issues in work. 

Wrong.  For a book like CLRS, even if you finish reading the book and complete all exercises yourself (meaning: without any help, you can answer all the exercises).   You still need to learn.   There are parts of CLRS need to be complemented by other books.   Its sorting section is known to be less practical than Sedgewick AIC,  its theoretical depth is known to be shallower than TAOCP.  

I would say if you studied CLRS by heart, you would know around 100-200 standard algorithms.   But you don't exactly know all of their variations.   It's also impossible for *you* to change them because you don't necessarily understand why they survive these days.  (Because their underlying principle is sound).   By the definition, you need at least another read. 

Back to the problem of understanding CLRS.  So what can we say about what is understanding of an algorithm.   One thing we established so far is that understanding is actually not just a simple "BEEEB" in our brain, then we understand.   Understanding is a complicated object.   We also see from the fiction example that understanding can mean different things to different people.   So I will tell you my way of understanding the book.   In the past, I have outlined a post titled Current Reading Methodologies for CLRS.   I wrote that post with this thinking in mind.
  • Level 1: knowing the algorithms and the basic terminology to describe the algorithm.   e.g. you need to know the pseudocode of the insertion sort.   In big O, it is a O(n^2) algorithm. 
  • Level 2: you can finish the exercises related the books.  Why?  If there were no exercises, all of us should simply jump to Level 3.  That is to establish connections in between all related terms you learn.   But exercise is an accelerated method.  Especially in a well written book such as CLRS. Once you finish one exercise, you should have a feeling that you either know how to apply some material in the text.  Or you are able to connection between some similar unrelated concepts.   Or you are able to learn a new property of a certain object.   
  • Level 3: Establish connection on all the things we human know.   For example in the case of big Oh.  Can you differentiate it with soft Oh (The one which doesn't differentiate exponential difference).   When you learn insertion sort, do you know its different variations?  This starts to be a deep level because there are many possibility to connect.  My "complementary exercises" are essentially about that.  At this point, I am still trying to understand different variations of insertion sort.  Sounds silly?  Of course, if you ask me other slightly advanced things such as DP and graph algorithm, I also have working knowledge.   It's just that they are not as deep.  This is also a point you want to read other books as well.   So even though I am reading CLRS,  I read Sedgewick ,  CMath, TAOCP and Programming Pearls. 
  • Level 4:  This starts to be the domain of research.   What are the issues of in this area?  This includes couple of things. 
    • What are the interesting new problems in this domain?
    • What are the viewpoints in this domain?
    • What are the unsolved problems in this domain?
    • Is there any thing in this topic is "useful"?  e.g. so efficient one should let every one should know?
    • This is the moment you should feel confused. 
  • Level 5:  Try to think of some solutions for the questions you have in Level 4.  You might or might not able to think of any.   If you do, don't waste it.  Publish it.  Tell other people.  
Now here is the first question you will have if you read this far.   "Does that mean it takes a long time to get to Level X of understanding?"  Of course.  No pain no gain, my bro.  Another more important question you should ask as well is "Does that mean it only take skimming to finish level 1 of understanding?"  That's certainly true too.  Some programmers who did cursory look of the book in the first few chapters only take 1-2 months.  So it is not such a long time.  Not everyone needs everything in a huge algorithm book.   But reading it is still highly recommendable because even just a tidbit of this knowledge will help you to cruise through a lot of daily technical problems in your work.

So, in conclusion, I still whole-heartedly recommend you to read CLRS through.   I, for one, has a cursory read until Chapter 15 in the last 2 months (what I called "fuzzy" read).  I believe that means at around September, I will finish the so called "fuzzy" read in this September.   My exercise read should be finished around 1.5 to 2 years later.   But I still plan to finish it because just finishing the first two chapters give me a feeling that I have tremendously improved in programming.  I think you can also be benefited in the process.

No comments:

Post a Comment