As you may observed, I have been stuck in Chapter 4 for quite a while. Notably on Section 4.3 and 4.4. There are exercises which I don't fully grok. That obviously makes me think of why. This usually gives me some insight.
When you take a look of teaching material on recurrence relations, most of the honest text will tell you that solving general recurrence relationship is in essence a guess job. This is where the substitution method shines.
Of course we all know that there are useful exceptions. There is the divide-and-conquer type. That is when you have the situation where there is a term T(n/a). Basically, tree method, the master method shine.
Now of course, if you talk about Math, many interesting things could happen. So for example, just on the divide-and-conquer type of recurrence - so what if we have a linear combination of the term T(n/a)? This is where master method will not work and you need to retreat back to tree method.
If you are looking for a standard method, then you have to use Akra-Bassi method which states the general solution of T(n) = Sum T(n/a_i) + f(n) . This is the stated in the bibliographical references but not covered in CLRS.
Now how about another important class where. T(n) = Sum T(n-a_i)? This is usually known as linear recurrence relation (ref: the famous "Discrete Mathematics and Applications"). In that case, one needs to introduce powerful method such as generating function to solve this kind of question. Again, this is not something which is not covered in CLRS.
So here you have it, CLRS basically hadn't covered many standard techniques in solving recurrence relation. But its exercises are a bit unforgiving because it has question such as 4.3-6 which require solving recurrence such as T(n) = T(n/2+17) + n or 4.4.5 which requires solving T(n) = T(n/2) + T(n-1) + n. In a ways, both of them are kinds of recurrence relation which are both linear and divide-and-conquer. The goal is to train the reader to learn "how to guess?".
That is perhaps why some of these problems are not easy. 4.3-6, for example, takes some space to explain if you try to solve it using substitution method.
In a way, CLRS's treatement on recurrence is both too simple and too difficult. I don't blame the authors. In my opinion. its real strength, especially in 3rd edition, is that it motivates the reader how to think of recurrence relation and how they occur. Concrete Mathematics reads similarly but it would take 7 chapters before the readers can reach the point of learning how to solve recurrence using generating function. So as an introductory text, CLRS is doing a fairly good job.
But for readers who are looking for an encyclopedic text, do bear in mind that, CLRS needs to be supplemented by other books. If you want to understand the "full" story, you still need to read TAOCP and CMath.
Ah learning, learning.
This is my self-study page for the book, "Introduction to Algorithm", or commonly known as CLRS. This is also my diary page of how I struggle and grow in the programming world. I hope this blog can help amateurs or professionals, to improve their skills in programming, learning and living. As of Sep 12, 2011, I finished the "exercise read" of Chapter 2 (20110518) and 3 (20110608) and half of Chapter 4.
Shortcut for chapter specific information
Chapter4
(62)
chapter3
(41)
Chapter2
(22)
chapter6
(10)
chapter12
(9)
chapter15
(8)
chapter13
(7)
chapter7
(7)
Chapter10
(5)
chapter5
(5)
Appendix A
(4)
chapter8
(4)
Chapter19
(3)
Chapter22
(3)
Chapter34
(3)
Chapter35
(3)
chapter11
(3)
chapter16
(3)
chapter18
(3)
Appendix C
(2)
Chapter21
(2)
Chapter25
(2)
Chapter26
(2)
Chapter27
(2)
Chapter28
(2)
Chapter29
(2)
Chapter9
(2)
chapter14
(2)
chapter20
(2)
chapter23
(2)
chapter24
(2)
chapter30
(2)
chapter31
(2)
chapter32
(2)
Appendix D
(1)
Chapter1
(1)
Chapter33
(1)
chapter17
(1)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment