After more detail read, this time I start to realize the core of this chapter. It is actually not that important to understand 1000 algorithms which is based on DP. Rather it is important to understand why a problem is a DP and why it is not. So, the heart of this chapter is actually Chapter 15.3 and I found the examples about unweighted shortest simple path and unweighted longest simple path are the most illuminating.
The key of knowing when you can applying DP (which I frankly feel blurry sometimes) is that you want to know whether there is relationship between a problem and its subproblem. You also want to know whether the subproblem is being repeatedly solved. Both can be observed by looking at how a big problem is solved in the first place.
It's also important to understand when will a problem will become intractable polynomially.
I think I am good for this read. All of the examples are interesting and currently I have a feel on the rod cutting problem as well as matrix multiplication problem. The key of these types of problem is to think through the solution yourself and try to come up with the solution. I guess what I will add now is to always think through the problem dependency tree as well as the structure of the subproblems.
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