After I get back my midterm 1 paper, I found that I stated the WRONG P(n) for each problem, and TA deducte one mark for each, that is, 3 marks, 20% in total...SAD FACE, weighed so much. However, then I looked through slides and class notes very carefully, to check out what I have done wrong. Eventually I realized that when we state the P(n) for a problem, we should not include "for every n belongs to natural numbers"(or something like that), because that is what we going to prove, and if we already stated that out, nothing left out for us. In other hand, isn't it strange to say in the induction step: assume for every n belong to natural number, P(n) is true? that is, if we already stated then why we assume again?
A good thing is from this midterm, I learned that I should be more attentive when study those class slides.
Monday, 22 October 2012
Monday, 15 October 2012
About First Term Test (sad FACE)
Well, it seemed like first term of this course was pretty stright foward, not so hard, but also, not so easy. Unfortunately, I just noticed one day ahead of the term test that we are going to have the term next day! What a big mistake! And which caused me did not have enough time to recover all induction concepts. Perhaps this would not happend again, no, must not!
Also, I realized few small mistakes I have done in question No.2 during the midterm.
Should be more specific in the induction step.
Following is the complete one, I hope. :)
P(n): at most, total leaves of a n height tree is 2^(n-1).
induction step:
assume n belongs to all natural number, 1 <= i < n, P(i) is True.
case i = 1, then this tree has only one node, this node is also its leave => 2^(1-1) = 1, 1<=1, thus, P(i) holds
case i > 1, then at most, this tree has two children, TL and TR, and TL, TR also inherited T's properties, but their's heights are less than T's by 1, thus 1<= TR's height, TL's height < n, P(TLn), P(TRn) holds. Thus,
Tleaves = TLleavs + TRleaves
<= 2^(TLn-1) + 2^(TRn-1) # by IH
<= 2^(n-1-1) + 2^(n-1-1)
<= 2^(n-2) + 2^(n-2)
<= 2* 2^(n-2)
<= 2^(n-2+1)
<= 2^(n-1)
then, P(i) holds.
Since in both cases P(i) holds, then for all natural numbers of n, n>= 1, P(n) is true.
"mistakes are opportunities to learn, adjust, grow, and improve." I believe I would not make such mistakes again.
Also, I realized few small mistakes I have done in question No.2 during the midterm.
Should be more specific in the induction step.
Following is the complete one, I hope. :)
P(n): at most, total leaves of a n height tree is 2^(n-1).
induction step:
assume n belongs to all natural number, 1 <= i < n, P(i) is True.
case i = 1, then this tree has only one node, this node is also its leave => 2^(1-1) = 1, 1<=1, thus, P(i) holds
case i > 1, then at most, this tree has two children, TL and TR, and TL, TR also inherited T's properties, but their's heights are less than T's by 1, thus 1<= TR's height, TL's height < n, P(TLn), P(TRn) holds. Thus,
Tleaves = TLleavs + TRleaves
<= 2^(TLn-1) + 2^(TRn-1) # by IH
<= 2^(n-1-1) + 2^(n-1-1)
<= 2^(n-2) + 2^(n-2)
<= 2* 2^(n-2)
<= 2^(n-2+1)
<= 2^(n-1)
then, P(i) holds.
Since in both cases P(i) holds, then for all natural numbers of n, n>= 1, P(n) is true.
"mistakes are opportunities to learn, adjust, grow, and improve." I believe I would not make such mistakes again.
Subscribe to:
Posts (Atom)