Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSE 20 DISCRETE MATH Prof. Shachar Lovett Clicker frequency: CA.

Similar presentations


Presentation on theme: "CSE 20 DISCRETE MATH Prof. Shachar Lovett Clicker frequency: CA."— Presentation transcript:

1 CSE 20 DISCRETE MATH Prof. Shachar Lovett http://cseweb.ucsd.edu/classes/wi15/cse20-a/ Clicker frequency: CA

2 Todays topics Strong induction Section 3.6.1 in Jenkyns, Stephenson

3 Strong vs regular induction

4 P(1)P(2)P(3)P(n)P(n+1) …… P(1)P(2)P(3)P(n)P(n+1) ……

5 Example for the power of strong induction 5

6 Another example: divisibility Thm: For all integers n>1, n is divisible by a prime number. Before proving it (using strong induction), lets first review some of the basic definitions, but now make them precise

7 Definitions and properties for this proof

8 Definitions and properties for this proof (cont.) Goes without saying at this point: The set of Integers is closed under addition and multiplication Use algebra as needed

9 Thm: For all integers n>1, n is divisible by a prime number. Proof (by strong mathematical induction): Basis step: Show the theorem holds for n = ________. Inductive step: Assume [or “Suppose”] that WTS that So the inductive step holds, completing the proof.

10 Thm: For all integers n>1, n is divisible by a prime number. Proof (by strong mathematical induction): Basis step: Show the theorem holds for n = ________. Inductive step: Assume [or “Suppose”] that WTS that So the inductive step holds, completing the proof. A.0 B.1 C.2 D.3 E.Other/none/more than one

11 Thm: For all integers n>1, n is divisible by a prime number. Proof (by strong mathematical induction): Basis step: Show the theorem holds for n = _2______. Inductive step: Assume [or “Suppose”] that WTS that So the inductive step holds, completing the proof. A.For some integer n>1, n is divisible by a prime number. B.For some integer n>1, k is divisible by a prime number, for all integers k where 2  k  n. C.Other/none/more than one

12 Thm: For all integers n>1, n is divisible by a prime number. A.n+1 is divisible by a prime number. B.k+1 is divisible by a prime number. C.Other/none/more than one

13 Thm: For all integers n>1, n is divisible by a prime number. Proof (by strong mathematical induction): Basis step: Show the theorem holds for n=2. Inductive step: Assume that for some n  2, all integers 2  k  n are divisible by a prime. WTS that n+1 is divisible by a prime. Proof by cases: Case 1: n+1 is prime. n+1 divides itself so we are done. Case 2: n+1 is composite. Then n+1=ab with 1<a,b<n+1. By the induction hypothesis, since a  n there exists a prime p which divides a. So p|a and a|n+1. We’ve already seen that this Implies that p|n+1 (in exam – give full details!) So the inductive step holds, completing the proof. 13

14 Theorems about recursive definitions

15 Definition of the sequence: d 1 = 9/10 d 2 = 10/11 d k = (d k-1 )(d k-2 ) for all integers k  3 Thm: For all integers n>0, 0<d n <1. Proof (by strong mathematical induction): Basis step: Show the theorem holds for n = ________. Inductive step: Assume [or “Suppose”] that WTS that So the inductive step holds, completing the proof.

16 Definition of the sequence: d 1 = 9/10 d 2 = 10/11 d k = (d k-1 )(d k-2 ) for all integers k  3 Thm: For all integers n>0, 0<d n <1. Proof (by strong mathematical induction): Basis step: Show the theorem holds for n = ________. Inductive step: Assume [or “Suppose”] that WTS that So the inductive step holds, completing the proof. A.0 B.1 C.2 D.3 E.Other/none/more than one

17 Definition of the sequence: d 1 = 9/10 d 2 = 10/11 d k = (d k-1 )(d k-2 ) for all integers k  3 Thm: For all integers n>0, 0<d n <1. Proof (by strong mathematical induction): Basis step: Show the theorem holds for n = _1,2_____. Inductive step: Assume [or “Suppose”] that WTS that So the inductive step holds, completing the proof. A.For some int n>0, 0<d n <1. B.For some int n>1, 0<d k <1, for all integers k where 1  k  n. C.Other/none/more than one

18 Definition of the sequence: d 1 = 9/10 d 2 = 10/11 d k = (d k-1 )(d k-2 ) for all integers k  3 Thm: For all integers n>0, 0<d n <1. Proof (by strong mathematical induction): Basis step: Show the theorem holds for n = _1,2_____. Inductive step: Assume [or “Suppose”] that WTS that So the inductive step holds, completing the proof. A.For some int n>0, 0<d n <1. B.For some int n>1, 0<d k <1, for all integers k where 1  k  n. C.0<d n+1 <1 D.Other/none/more than one

19 Definition of the sequence: d 1 = 9/10 d 2 = 10/11 d k = (d k-1 )(d k-2 ) for all integers k  3 Thm: For all integers n>0, 0<d n <1. Proof (by strong mathematical induction): Basis step: Show the theorem holds for n=1,2. Inductive step: Assume [or “Suppose”] that the theorem holds for n  2. WTS that 0<d n+1 <1. By definition, d n+1 =d n d n-1. By the inductive hypothesis, 0<d n-1 <1 and 0<d n <1. Hence, 0<d n+1 <1. So the inductive step holds, completing the proof.

20 Fibonacci numbers 1,1,2,3,5,8,13,21,… Rule: F 1 =1, F 2 =1, F n =F n-2 +F n-1. Question: can we derive an expression for the n-th term?

21 Fibonacci numbers

22 22

23 Fibonacci numbers 23 A.n=1 B.n=2 C.n=1 and n=2 D.n=1 and n=2 and n=3 E.Other

24 Fibonacci numbers 24 A.n=1 B.n=2 C.n=1 and n=2 D.n=1 and n=2 and n=3 E.Other

25 Fibonacci numbers 25

26 Fibonacci numbers 26 A.F n =F n-1 +F n-2 B.F n  F n-1 +F n-2 C.F n =r n D.F n  r n E.Other

27 Proof of inductive case

28 Proof of inductive case (contd)

29 Fibonacci numbers - recap Recursive definition of a sequence Base case: verify for n=1, n=2 Inductive step: Formulated what needed to be shown as an algebraic inequality, using the definition of F n and the inductive hypothesis Simplified algebraic inequality Proved the simplified version 29

30 Next class Applying proof techniques to analyze algorithms Read section 3.7 in Jenkyns, Stephenson


Download ppt "CSE 20 DISCRETE MATH Prof. Shachar Lovett Clicker frequency: CA."

Similar presentations


Ads by Google