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)
Showing posts with label TAOCP. Show all posts
Showing posts with label TAOCP. Show all posts
Sunday, June 5, 2011
TAOCP 3.1, 3.2
I have a lot of work related task which require random number generator. These few chapters come in handy.
Tuesday, May 24, 2011
Why I failed when I read TAOCP the first time.
Believe it or not, this is actually the second time I read TAOCP seriously. The first time is when I first came to U.S. (around 8 years ago) I was motivated by the success of reading "Elementary Number Theory". I finished all the exercises in the number theory book and felt very ambitious another book. I thought that I can gain a lot by reading TAOCP after I bought its international edition.
There's nothing wrong with that thinking. Unfortunately, I made mistakes which many people made, let me summarize at here.
There's nothing wrong with that thinking. Unfortunately, I made mistakes which many people made, let me summarize at here.
- I simply tried to read Chapter 1 too deep. TAOCP Chapter 1 gives a general introduction of computer science. This introduction is not gentle. In a way, it brings the reader to the frontier of each of these basic topics. (So if you go deep for TAOCP in one section, you are likely to be a deep experts in a field.) This is too difficult for me (or perhaps for many) to finish.
- I was scared by MIX. This is simply a bias. At that time I was crazily in love with C and has a lot of prejudice. I have since changed.
- I tried to read other CS text. Ah, one of my biggest problems, after reading something and have success, I liked to move on and go for breadth, than depth. Not a good habit for deep subject such as Math and CS.
- At that time, I wasn't proficient in basic programming skill. For example even though I finished a master already, I still have basic misunderstanding why writing good program is a good thing. Experience is my teacher.
- Just like many, I thought TAOCP was meant to be a reference. (Conform to the 99%, Big mistake.)
- I only think about algorithmic problem when I need to. (Conform to the 90%, Biggest mistake)
Friday, May 13, 2011
TAOCP Vol 4A
I hadn't track the status of TAOCP. When I just learned that Vol 4 became a 4 (or maybe 5) volume set by itself. Here is what I told myself : epic. In fact, this feeling is no less than the first time I learn Tolkien has invented a language for a book. It will be a long time before I go to study TAOCP but I am glad that my trade, programmer, is a topic which some very talented people have dedicated on it.
Of course, that means I will buy a copy of 4A soon.
Of course, that means I will buy a copy of 4A soon.
Wednesday, May 4, 2011
How many people read TAOCP?
http://markharrison.net/stackoverflow/knuth/
This is interesting link. It shows how programmers are divided into two camps on whether learning elementary data structure is useful or not.
It's clear that sometimes studies in data structure and algorithm doesn't really pay off. For example, what if you are working on a system which has no speed constraints? Then thinking through what the right thing to do would be more important. For example, what if you are working in a research problem, where no one even know the solutions, not to say a fast solution?
As a skill though, learning algorithm is delightful. There is another interesting effect for me, it makes me feel sharper and work faster. Many believe that learning extra things will only burden one's head and *waste* one's time. I always feel otherwise. e.g. Learning a new foreign language always make me feel I think through something.
Similarly - learning a new algorithm always make me feel sharper and can think through issues (even if it not related) more easily.
Algorithm and Mathematics have one thing in common. Sometimes they are not learned by logic alone, but also by intuition and experience. What's experience then? That means you need to touch it and feel it. So I tend to disagree with people holding a point of view which sorting is not a valuable subject to learn. There are so many tricks in sorting - say usage of sentinel, recursion, two way merges, shell decrements, average analysis. All these ideas can be used in thinking and help to understand other algorithms. If one doesn't know them, it will mean they have to reinvent a similar framework to solve a problem. Is it an effective approach?
This is interesting link. It shows how programmers are divided into two camps on whether learning elementary data structure is useful or not.
It's clear that sometimes studies in data structure and algorithm doesn't really pay off. For example, what if you are working on a system which has no speed constraints? Then thinking through what the right thing to do would be more important. For example, what if you are working in a research problem, where no one even know the solutions, not to say a fast solution?
As a skill though, learning algorithm is delightful. There is another interesting effect for me, it makes me feel sharper and work faster. Many believe that learning extra things will only burden one's head and *waste* one's time. I always feel otherwise. e.g. Learning a new foreign language always make me feel I think through something.
Similarly - learning a new algorithm always make me feel sharper and can think through issues (even if it not related) more easily.
Algorithm and Mathematics have one thing in common. Sometimes they are not learned by logic alone, but also by intuition and experience. What's experience then? That means you need to touch it and feel it. So I tend to disagree with people holding a point of view which sorting is not a valuable subject to learn. There are so many tricks in sorting - say usage of sentinel, recursion, two way merges, shell decrements, average analysis. All these ideas can be used in thinking and help to understand other algorithms. If one doesn't know them, it will mean they have to reinvent a similar framework to solve a problem. Is it an effective approach?
Tuesday, April 26, 2011
TAOCP Vol 3 (5.2.1 and 5.2.3)
I reread the two sections about insertion sort and selection sort in TAOCP. Those are two very good sections on this seeminly simple subject. In fact, I should regard I understand these broad types of sorting technique *after* I finished the exercises in TAOCP first.
One thing I learn is that insertion sort's performance is actually related the average number of inversion in a sequence. This gives a better insight than the standard probablistic arguments.
Very interesting. There are just so many things I don't know even in "simple" matters.
33_P
One thing I learn is that insertion sort's performance is actually related the average number of inversion in a sequence. This gives a better insight than the standard probablistic arguments.
Very interesting. There are just so many things I don't know even in "simple" matters.
33_P
Subscribe to:
Posts (Atom)