After a month of getting stuck in 4.3-6. I passed the 1 month period which I vowed to not look up a solution if I couldn't solve a problem. Eventually, I found the solution on the web and it was not a short solution and it takes some time to understand.
What was the issue then? As it turns out, it's because I use a wrong form of guess. So no matter what I do, I still couldn't find the answer.
Another thing I learn is that one should always try to understand how the base case works first. The implicit question asked in every questions in Section 4.3 and 4.4 is that "What the initial condition is?" If I had thought through, may be I could resolve the issue.
Oh well, at least I am unstuck. This problem should be studied and it deserved a write-up.
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)
Please can you post the link to the solution, i'm stuck and i can't find it on the web.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteWatch the second video lecture from MIT:
ReplyDeletehttp://www.catonmat.net/blog/mit-introduction-to-algorithms-part-one/
Use the idea of residual and the same reasoning line used by the professor on the class example: T(n) = 4T(n/2) + n
and you will get the right answer.
After trying, if you need help, mail me at leandro.luque@gmail.com