Proofs by Counterexample Contradiction There are several ways
Proofs by Counterexample & Contradiction There are several ways to prove a theorem: q Counterexample: n n q By providing an example of in which theorem does not hold, you prove theory to be false. For example: All multiples of 5 are even. However 3 x 5 is 15, which is odd. The theorem is false. Contradiction: n Assume theorem to be true. If the assumption implies that some known property is false, then theorem CANNOT be true. 1
Proof by Induction n Proof by induction has three standard parts: q q q The first step is proving a base case, that is, establishing that a theorem is true for some small value(s), this step is almost always trivial. Next, an inductive hypothesis is assumed. Generally this means that theorem is assumed to be true for all cases up to some limit n. Using this assumption, theorem is then shown to be true for the next value, which is typically n+1 (induction step). This proves theorem (as long as n is finite). 2
Example: Proof By Induction n Claim: q Basis: n q Show formula is true when n = k Inductive hypothesis: n q S(n) is true for all n >= k Assume formula is true for an arbitrary n Induction Step: n Show that formula is then true for n+1 3
Induction Example: Gaussian Closed Form n Prove 1 + 2 + 3 + … + n = n(n+1) / 2 q Basis: n q Inductive hypothesis: n q If n = 0, then 0 = 0(0+1) / 2 Assume 1 + 2 + 3 + … + n = n(n+1) / 2 Step (show true for n+1): 1 + 2 + … + n+1 = (1 + 2 + …+ n) + (n+1) = n(n+1)/2 + n+1 = [n(n+1) + 2(n+1)]/2 = (n+1)(n+2)/2 = (n+1)(n+1 + 1) / 2 4
Induction Example: Geometric Closed Form n n Prove a 0 + a 1 + … + an = (an+1 - 1)/(a - 1) for all a 1 q Basis: show that a 0 = (a 0+1 - 1)/(a - 1) a 0 = 1 = (a 1 - 1)/(a - 1) = 1 q Inductive hypothesis: n q Assume a 0 + a 1 + … + an = (an+1 - 1)/(a - 1) Step (show true for n+1): a 0 + a 1 + … + an+1 = (an+1 - 1)/(a - 1) + an+1 = (an+1+1 - 1)/(a - 1) 5
Limits n n lim [f(n) / g(n)] = 0 f(n) o(g(n)) n lim [f(n) / g(n)] < f(n) O(g(n)) n n 0 < lim [f(n) / g(n)] < f(n) (g(n)) n 0 < lim [f(n) / g(n)] f(n) W(g(n)) n n n lim [f(n) / g(n)] = f(n) w(g(n)) n 6
Useful Facts n n For a ³ 0, b > 0, lim n ( lga n / nb ) = 0, so lga n = o(nb), and nb = w(lga n ) lg(n!) = (n lg n) 7
Examples A B n log 3(n 2) log 2(n 3) n nlg 4 n lg 2 n 3 lg n n 1/2 9
Examples n A B log 3(n 2) log 2(n 3) A (B) logba = logca / logcb; A = 2 lgn / lg 3, B = 3 lgn, A/B =2/(3 lg 3) n nlg 4 n lg 2 n 3 lg n n 1/2 10
Examples n A B log 3(n 2) log 2(n 3) A (B) logba = logca / logcb; A = 2 lgn / lg 3, B = 3 lgn, A/B =2/(3 lg 3) n nlg 4 A w(B) 3 lg n alog b = blog a; B =3 lg n=nlg 3; A/B =nlg(4/3) as n n lg 2 n n 1/2 11
Examples n A B log 3(n 2) log 2(n 3) A (B) logba = logca / logcb; A = 2 lgn / lg 3, B = 3 lgn, A/B =2/(3 lg 3) n nlg 4 A w(B) 3 lg n alog b = blog a; B =3 lg n=nlg 3; A/B =nlg(4/3) as n n lg 2 n n 1/2 A o (B) lim ( lga n / nb ) = 0 (here a = 2 and b = 1/2) A o (B) n 12
End of Chapter 3 14
- Slides: 12