General announcements: - Course notes are available at bookstroe. "2002-2003" on the front cover is what matters. - You must check the course webpage regularly, at least twice a week. - Lecture notes, assignments, and announcements will be posted on the webpage. - You don't need any computer account for this course. This is just a paper and pen course! Evaluation: - There will be 5 assignments, two term tests, and a final exam. - Late assignments are not accepted!! Plan ahead and start early. - Term tests will be based on assignments. - Special consideration: talk to me *immediately*. Plagiarism: - *Any time* you submit someone else's work or ideas as your own, for *anything* that is worth marks. - More details about the policies on the webpage. --------- Induction --------- Preliminaries: - Mostly covered in tutorial. - The set of natural numbers is: N = {0,1,2,...} (i.e., natural numbers *include* 0). - Z and Q are the sets of integers and rational numbers, respectively. Well-ordering principle: - "If A is any non-empty set of natural numbers, then A contains a smallest element". - Kind of obvious, but not trivial: . Applies to any non-empty set, including infinite sets. . Is not true for all numbers (e.g., not for Z or Q instead of N). Proofs by Induction ("ordinary" induction or "simple" induction): - To prove statements of the form "for all n >= x, S(n)" , where S(n) represents some statement about the number n, proceed in steps: . Base case: prove S(x) is true. Often (but not always) x=0. . Let k >= x be an arbitrary number . Inductive hypothesis: assume S(k) . Inductive step: prove S(k+1) under this assumption (last three points together prove "for all k >= x, S(k) implies S(k+1)") . Conclusion: by induction, S(n) is true for all n >= x. - Every single word in this template is important! n Example 1: Prove that for all n in N, sum (1/2^i) = 2-(1/2^n). i=0 n . First, define S(n): "sum (1/2^i) = 2-(1/2^n)" i=0 0 . Base: S(0) is the statement "sum (1/2^i) = 2-(1/2^0)" i=0 0 and sum (1/2^i) = 1/1 and 2-(1/2^0) = 2 - 1 = 1 so S(0) is true. i=0 . Let k >= 0 be an arbitrary number. k . Ind. Hyp.: Assume that S(k) is true, i.e., sum (1/2^i) = 2-(1/2^k). i=0 k+1 . Ind. Step: To prove: S(k+1), i.e., sum (1/2^i) = 2-(1/2^{k+1}). i=0 k+1 ( k ) But sum (1/2^i) = (sum (1/2^i)) + (1/2^{k+1}) since k >= 0 i=0 (i=0 ) = 2 - (1/2^k) + (1/2^{k+1}) by the ind. hyp. = 2 - 2*(1/2^{k+1}) + (1/2^{k+1}) = 2 - (1/2^{k+1}). n . Hence, by induction, sum (1/2^i) = 2-(1/2^n) for all n >= 0. i=0 Note: - All the steps in the above example are essential: . You MUST define the predicate explicitly. . "For all n>=x" must **NOT** be part of the predicate (i.e. S(n)). . In Ind. Step, make sure you are using the base case properly. (we will see an improper use in example 3). Example 2: Prove that for any natural numbers n >= 1, if x is a real number such that 1 + x > 0 then (1 + x)^n >= 1+nx. . S(n) can be defined as "if x is a real number and 1 + x > 0 then (1 + x)^n >= 1 + nx". . We want to prove S(n), for all n >= 1. (Note that base case starts at n = 1, not 0). . Base: S(1) is true, because (1 + x)^1 = 1 + 1*x. . Ind. Hyp.: Let k >= 1 be an arbitrary natural number and assume that S(k) is true. . Ind. Step: We must show that S(k + 1) is true. (1 + x)^{k + 1} = (1 + x)(1 + x)^k Since k >= 1, >= (1 + x)(1 + kx) by Ind. Hyp. = 1 + (k + 1)x + kx^2 >= 1 + (k + 1)x since x^2 >= 0. . Thus, by induction, (1 + x)^n >= 1 + nx, for all n >= 1. Proofs by Strong (complete) Induction: - Change induction hypothesis to: "assume S(j) for 0 <= j <= k" (i.e., "assume S(0), S(1), ..., S(k)"). - Equivalent to: . Let k >= 0 be an arbitrary number . Inductive hypothesis: assume S(j) for 0 <= j < k . Inductive step: prove S(k) under this assumption Example 3: Prove that any amount of postage over 7 cents can be made using only 3 cent and 5 cent stamps. . S(n) can be defined as "n cents of postage can be made using only 3 cent and 5 cent stamps". . We want to prove S(n) for all n > 7, i.e., for all n >= 8. . Base: S(8) is the statement "8 cents of postage can be made using only 3 cent and 5 cent stamps". This is clearly true because we can use one 3 cent stamp and one 5 cent stamp to make 8 cents. . Ind. Hyp.: Let k >= 8 be an arbitrary integer and assume that S(8), S(9), ..., S(k) are all true. More precisely, this means that there exists some number x of 3 cent stamps and some number y of 5 cent stamps that add up to j cents, i.e., j = 3x + 5y, for 8 <= j <= k. . Ind. Step: To prove: S(k+1), i.e., k+1 cents of postage can be made using only 3 cent and 5 cent stamps. Suppose we use at least one 3 cent stamp to form k+1. Then, we are left with an amount of k-2. Is S(k-2) true? Only if 8 <= k-2 < k, but we only assumed that k >= 8, so it could be the case that k-2 < 8. Similarly, if we use at least one 5 cent stamp then we are left with k-4 and we cannot conclude that S(k-4) is true. What do we do now? . Enought to guarantee that k-2 >= 8, i.e. k >= 10. Rebuild the base case: . Base: S(8) is true as above. S(9) is true because 9=3+3+3. S(10) is true because 10=5+5. . Ind. Hyp.: Let k >= 10 be an arbitrary integer and assume that S(8),S(9),...,S(10) are all true. . Ind. Step: We must prove S(k+1). Suppose we use at least one 3 cent stamp to form k+1. Then we are left with k-2. Since k >= 10, k - 2 >= 8, so by Ind. Hyp. S(k-2) is true. This means there are natural numbers x and y such that: k-2 = 3x + 5y. Then, k+1 = (k-2) + 3 = 3x + 5y + 3 = 3(x+1) + 5y. So there are values x'=(x+1) and y'=y, such that k+1 = 3x' + 5y'. Hence S(k+1) is true. . Hence, by induction, every amount of postage over 7 cents can be made using only 3 cent and 5 cent stamps. Common pitfalls/errors: - Wrong or incomplete Base case, or completely forgetting it. (Example 1.8 of course notes). - Inductive hypothesis does not connect with base case: the first attempt of proof in example 3, or the example that all horses in the universe have the same color! - Changing the predicate in the inductive step (see Examples 1.9 and 1.10 on pages 34-36 of the textbook).