Mathematical Induction Tan Conghui Department of Systems Engineering and Engineering Management, The Chinese University of Hong Kong September 15, 2016 Tan Conghui (ENGG 2440B) Tutorial 1 September 15, 2016 1 / 16 Outline 1 Review of Basic Concepts 2 Examples Tan Conghui (ENGG 2440B) Tutorial 1 September 15, 2016 2 / 16 Review of Basic Concepts Outline 1 Review of Basic Concepts 2 Examples Tan Conghui (ENGG 2440B) Tutorial 1 September 15, 2016 3 / 16 Review of Basic Concepts Definition of Predicate A predicate is a statement whose value depends on one or more variables. Example 1 The following two statements are both predicates depends on n (n is a nonnegative integer): n is a perfect square, Pn n(n+1) , i=1 i = 2 However, the former is only true for some particular choices of n, while the latter is true for all n. Usually, we use P(n) to denote a predicate concerning the variable n. Tan Conghui (ENGG 2440B) Tutorial 1 September 15, 2016 4 / 16 Review of Basic Concepts Principle of (Weak) Mathematical Induction Let P(n) be a predicate. If P(0) is true, and P(n) implies P(n + 1) for all nonnegative integers n, then P(n) is true for all nonnegative integers n. Tan Conghui (ENGG 2440B) Tutorial 1 September 15, 2016 5 / 16 Review of Basic Concepts A Template for Induction Proofs 1 2 3 4 5 State that the proof uses induction. Define an appropriate predicate P(n). Prove that P(0) is true (basic step). Prove that P(n) implies P(n + 1) for every nonnegative integer n (inductive step). Invoke induction. Given these facts, the induction principle allows you to conclude that P(n) is true for all nonnegative n. Tan Conghui (ENGG 2440B) Tutorial 1 September 15, 2016 6 / 16 Review of Basic Concepts Principle of Strong Mathematical Induction Let P(n) be a predicate. If P(0) is true, and P(0), P(1), . . . , P(n) together implies P(n + 1) for any nonnegative integer n, then P(n) is true for all nonnegative integers n. Tan Conghui (ENGG 2440B) Tutorial 1 September 15, 2016 7 / 16 Examples Outline 1 Review of Basic Concepts 2 Examples Tan Conghui (ENGG 2440B) Tutorial 1 September 15, 2016 8 / 16 Examples Problem 1 Question: Prove by induction that if 0 < a < 1, then (1 − a)n ≥ 1 − na for all n = 0, 1, . . . . Tan Conghui (ENGG 2440B) Tutorial 1 September 15, 2016 9 / 16 Examples Problem 1 Question: Prove by induction that if 0 < a < 1, then (1 − a)n ≥ 1 − na for all n = 0, 1, . . . . Solution: We can prove it by induction. Let P(n) be the predicate “(1 − a)n ≥ 1 − na”. 1 2 (Basic Step) When n = 0, LHS = (1 − a)0 = 1 = 1 − 0 × a = RHS, so P(0) is true. (Inductive Step) For any nonnegative integer n, assume P(n) is true, i.e., (1 − a)n ≥ 1 − na. Then we have (1 − a)n+1 = (1 − a)n (1 − a) ≥ (1 − na)(1 − a) (from P(n) and the fact 1 − a ≥ 0) 2 = 1 − (n + 1)a + na > 1 − (n + 1)a, which means P(n + 1) is true. Hence, by the principle of induction, P(n) is true for n = 0, 1, 2, . . . . Tan Conghui (ENGG 2440B) Tutorial 1 September 15, 2016 9 / 16 Examples Problem 2 Question: Let T(n) be the number of comparisons needed to sort n cards by merge sort. We already know that T(n) has recursive relationship T(n) = 2T( n2 ) + n − 1 and T(1) = 0. Prove that T(n) ≤ n log2 n for all n = 2k , where k = 0, 1, 2, . . . . Tan Conghui (ENGG 2440B) Tutorial 1 September 15, 2016 10 / 16 Examples Problem 2 Solution: We prove it by induction. Let P(k) be the predicate “T(n) ≤ n log2 n holds where n = 2k ”. 1 (Basic step) When k = 0, then n = 2k = 1 and therefore T(n) = 0 = 1 × log2 1 = n log2 n, so P(0) is true. 2 (Inductive Step) For any nonnegative integer k, assume P(k) is true, i.e., T(n) ≤ n log2 n where n = 2k . Note that 2k+1 = 2n, so we need to prove T(2n) ≥ 2n log2 (2n) for P(n + 1): T(2n) = 2T(n) + 2n − 1 (from the recursive relationship of T(2n)) ≤ 2n log2 n + 2n − 1 (by inductive hypothesis) = 2n(log2 n + 1) − 1 = 2n log2 (2n) − 1 ≤ 2n log2 (2n), thus P(k + 1) is also true. Remark: log2 n + 1 = log2 n + log2 2 = log2 (2n) Tan Conghui (ENGG 2440B) Tutorial 1 September 15, 2016 11 / 16 Examples Problem 3 Question: Show that any integer n (n ≥ 2) can be written as the product of primes, e.g., 20 = 2 × 2 × 5. Tan Conghui (ENGG 2440B) Tutorial 1 September 15, 2016 12 / 16 Examples Problem 3 Solution: We prove it by strong mathematical induction. Let P(n) be the predicate “n can be written as the product of primes”. 1 2 (Basic Step) For n = 2, since 2 itself is a prime number, thus P(2) holds. (Inductive Step) Assume P(k) holds for all 2 ≤ k ≤ n. Now let’s consider n + 1: If n + 1 is not divisible by any positive integer greater than 1 and except itself, then n + 1 itself is a prime number and therefore P(n + 1) is obviously true; Otherwise, then there must exist integers s and t such that n + 1 = s · t and 1 < s, t < n + 1. By the inductive hypothesis, we known both s and t can be written as the product of primes, i.e., s = s1 · s2 · · · sl and t = t1 · t2 · · · tm , where si and tj are all primes. Thus, n + 1 = s · t = s1 · s2 · · · sl · t1 · t2 · · · tm and therefore P(n + 1) is true. Hence, by the principle of strong MI, P(n) is true for n = 0, 1, 2, . . . . Tan Conghui (ENGG 2440B) Tutorial 1 September 15, 2016 13 / 16 Examples Problem 4 Question: Recall that the Fibonacci numbers are defined recursively by: if n = 0 0 1 if n = 1 . Fn = Fn−1 + Fn−2 if n ≥ 2 √ Let φ be the number 1 + 5 /2 (note it satisfy φ2 = 1 + φ). Prove Fn ≤ φn−1 for all nonnegative integer n by weak mathematical induction. Tan Conghui (ENGG 2440B) Tutorial 1 September 15, 2016 14 / 16 Examples Problem 4 Solution: Let P(n) be the predicate “Fn ≤ φn−1 and Fn+1 ≤ φn ”. (Basic Step): For n = 0, because F0 = 0 ≤ φ−1 and F1 = 1 ≤ 1 = φ0 , P(0) is true. (Inductive Step): Assume all P(n) is true, i.e., Fn ≤ φn−1 and Fn+1 ≤ φn . Now let us look into Fn+2 : Fn+2 = Fn + Fn+1 (from def. of Fn+2 ) ≤ φn−1 + φn (by IH) =φ n−1 (1 + φ) (because φ2 = 1 + φ). = φn+1 Together with Fn+1 ≤ φn (by IH directly), we know P(n + 1) is also true. Obviously, Fn ≥ φn−1 for all nonnegative integer n. Tan Conghui (ENGG 2440B) Tutorial 1 September 15, 2016 15 / 16 Examples Thank You! If you have any questions, feel free to contact me. My Email is [email protected]. Tan Conghui (ENGG 2440B) Tutorial 1 September 15, 2016 16 / 16
© Copyright 2026 Paperzz