1 Put your name if you want your attendance credit. Please put your e-mail as well. CSC 320 is done at 11:30 so I did NOT fill in the box for 11:30 for.

Slides:



Advertisements
Similar presentations
Mathematical Induction
Advertisements

MA/CSSE 473/474 How (not) to do an induction proof.
Nattee Niparnan. Recall What is the measurement of algorithm? How to compare two algorithms? Definition of Asymptotic Notation.
Proof Points Key ideas when proving mathematical ideas.
Fall 2007CS 2251 Proof by Induction. Fall 2007CS 2252 Proof by Induction There are two forms of induction Standard Induction –Prove the theorem is true.
General Announcements Project Due Friday, 1/30 Labs start Wednesday & Thursday – Java review – Weiss 1.19, 1.20 – You may show up & hand in Workshops.
Recursive Definitions Rosen, 3.4. Recursive (or inductive) Definitions Sometimes easier to define an object in terms of itself. This process is called.
Logic: Connectives AND OR NOT P Q (P ^ Q) T F P Q (P v Q) T F P ~P T F
1 Recursion, Recurrences and Induction Supplementary Notes Prepared by Raymond Wong Presented by Raymond Wong.
Tirgul 2 Asymptotic Analysis. Motivation: Suppose you want to evaluate two programs according to their run-time for inputs of size n. The first has run-time.
Discrete Structures Chapter 5: Sequences, Mathematical Induction, and Recursion 5.2 Mathematical Induction I [Mathematical induction is] the standard proof.
CHAPTER 10 Recursion. 2 Recursive Thinking Recursion is a programming technique in which a method can call itself to solve a problem A recursive definition.
1 Section 3.3 Mathematical Induction. 2 Technique used extensively to prove results about large variety of discrete objects Can only be used to prove.
analysis, plug ‘n’ chug, & induction
Induction and recursion
Instructor Neelima Gupta
Algorithm Design and Analysis (ADA)
ICS 253 Presents Mathematical Induction Sultan Almuhammadi muhamadi
MATH 224 – Discrete Mathematics
Lecture 9. Arithmetic and geometric series and mathematical induction
Induction and recursion
Mathematical Induction. F(1) = 1; F(n+1) = F(n) + (2n+1) for n≥ F(n) n F(n) =n 2 for all n ≥ 1 Prove it!
CSNB143 – Discrete Structure Topic 5 – Induction Part I.
1 Introduction to Abstract Mathematics Chapter 4: Sequences and Mathematical Induction Instructor: Hayk Melikya 4.1- Sequences. 4.2,
MCA 202: Discrete Mathematics Instructor Neelima Gupta
Math Review Data Structures & File Management Computer Science Dept Va Tech July 2000 ©2000 McQuain WD 1 Summation Formulas Let N > 0, let A, B, and C.
Variables Tutorial 3c variable A variable is any symbol that can be replaced with a number to solve a math problem. An open sentence has at least one.
March 3, 2015Applied Discrete Mathematics Week 5: Mathematical Reasoning 1Arguments Just like a rule of inference, an argument consists of one or more.
CSC201 Analysis and Design of Algorithms Asst.Proof.Dr.Surasak Mungsing Oct-151 Lecture 2: Definition of algorithm and Mathematical.
Extending the Definition of Exponents © Math As A Second Language All Rights Reserved next #10 Taking the Fear out of Math 2 -8.
Proofs, Recursion and Analysis of Algorithms Mathematical Structures for Computer Science Chapter 2 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesProofs,
Proofs, Recursion and Analysis of Algorithms Mathematical Structures for Computer Science Chapter 2.5 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesProofs,
CMPT 438 Algorithms Chapter 3 Asymptotic Notations.
Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques.
Proofs, Induction and Recursion Basic Proof Techniques Mathematical Induction Recursive Functions and Recurrence Relations.
Data Structures and Algorithm Analysis Introduction Lecturer: Ligang Dong, egan Tel: , Office: SIEE Building.
Analysis of Algorithms CS 477/677 Instructor: Monica Nicolescu Lecture 3.
Complexity Analysis: Asymptotic Analysis. Recall What is the measurement of algorithm? How to compare two algorithms? Definition of Asymptotic Notation.
1+2+3+…+n = n(n+1)/2 We want to prove the above statement by mathematical Induction for all natural numbers (n=1,2,3,…) Next SlideSlide 1.
Mathematical Induction Section 5.1. Climbing an Infinite Ladder Suppose we have an infinite ladder: 1.We can reach the first rung of the ladder. 2.If.
CSE373: Data Structures and Algorithms Lecture 2: Proof by Induction Linda Shapiro Winter 2015.
INDUCTION Slides of Ken Birman, Cornell University.
CS104:Discrete Structures Chapter 2: Proof Techniques.
1 2/21/2016 MATH 224 – Discrete Mathematics Sequences and Sums A sequence of the form ar 0, ar 1, ar 2, ar 3, ar 4, …, ar n, is called a geometric sequence.
1 Proof of the Day: Some students claimed to prove that 2 k = 2 k+1 – 1. Try to prove by induction that: 2 k = 2 k+1 – 1. Where does the proof go off-track?
Chapter 4: Solution of recurrence relationships Techniques: Substitution: proof by induction Tree analysis: graphical representation Master theorem: Recipe.
Section 2.2 More practice with Direct Proofs. Directions for Writing Proofs 1.Copy the statement of the theorem to be proved onto your paper. 2.Clearly.
Reading and Writing Mathematical Proofs Spring 2016 Lecture 2: Basic Proving Techniques II.
Mathematical Induction Thinking Skill: Develop Confidence in Reason Warm Up: Find the k+1 term (P k+1 ) 1) 2)
Section 8.4 Mathematical Induction. Mathematical Induction In this section we are going to perform a type of mathematical proof called mathematical induction.
Section Recursion 2  Recursion – defining an object (or function, algorithm, etc.) in terms of itself.  Recursion can be used to define sequences.
Mathematical Induction EECS 203: Discrete Mathematics Lecture 11 Spring
Analysis of Algorithms CS 477/677 Instructor: Monica Nicolescu Lecture 2.
Mathematical Induction. The Principle of Mathematical Induction Let S n be a statement involving the positive integer n. If 1.S 1 is true, and 2.the truth.
1 Proof of the Day: The length of a string is the number of symbols it contains. For example, the length of is five. Let L = { w such that w is a.
MATH 224 – Discrete Mathematics
Analysis of Algorithms CS 477/677
Proofs, Recursion and Analysis of Algorithms
CSE373: Data Structures and Algorithms Lecture 2: Proof by Induction
Introduction to Algorithms Analysis
CS 220: Discrete Structures and their Applications
Mathematical Induction
Chapter 11: Further Topics in Algebra
Copyright © Cengage Learning. All rights reserved.
Mathematical Induction
Mathematical Induction
Mathematical Induction
Copyright © Cengage Learning. All rights reserved.
11.4 Mathematical Induction
Chapter 1 Automata CE year IV.
Presentation transcript:

1 Put your name if you want your attendance credit. Please put your as well. CSC 320 is done at 11:30 so I did NOT fill in the box for 11:30 for our class.

2 CSC 320: Proof of the Day Definition: for functions f and g which map the natural numbers to real values, the function f(n) is in O(g(n)) if there exists constants c  0 and n o ≥ 0 such that for all n ≥ n 0, f(n) ≤ c ۰ g(n). Use this definition to prove that n + 5 n n 3 is in O(n 3 ).

3 You will learn a lot more if you try the problems and get them wrong than if you do not try. Also, it helps me know where the class is in terms of understanding.

4 Announcements If you are on my connex roster, you should have received an I sent out Thursday reminding you to bring your schedule to class today. Please make sure you can access connex. Start work now on assignment #1. Please ask me questions if any of the instructions are not clear to you. Your first tutorial is this Tuesday at 3:30pm. Note: you don’t have to wait until the tutorial if you have questions. Ask me or send me .

5 Meaning of notation (translation to code): sum= 0; for (i=c; i ≤ n; i++) sum= sum + f(i); The value of the expression is sum at the termination of this loop.

6 Some students did not include limits and others omitted the name of the summation variable on the summations. This means that what you wrote is not properly defined.

7 = { 0, 1, 2, 3, 4, … } Natural Numbers Inductive Definition: [Basis] 0 is in the set [Inductive step]: If k is in then k+1 is in

8 The idea behind the simplest form of an induction proof: Suppose we are given a statement S(n) and we want to show that S(n) is true for all integers n ≥ 0. If we prove: 1.that S(0) is a true statement, and 2.if S(n) is a true statement then so is S(n+1) then this is sufficient to prove that S(n) is true for all integers n ≥ 0.

9 k Theorem S(k): Σ 2 i = 2 k i=0 Proof: [Basis] When k=0, Σ i=0 to k 2 i = 2 0 = 1 and 2 k+1 – 1 = =1 so this formula is correct for k=0. Note: the induction hypothesis which I will use for this proof is the statement (hypothesis since we have not finished proving it yet) S(k): k Σ 2 i = 2 k We are trying to prove S(k+1). i=0 k+1 S(k+1): Σ 2 i = 2 (k+1) i=0

10 [Induction step] Assume S(k) is true. We want to prove S(k+1). Separating the sum into two parts gives k+1 Σ 2 i = i=0 k Σ 2 i + 2 k+1. i=0 By the induction hypothesis, the red term above is equal to 2 k+1 – 1. Therefore, IMPORTANT: always indicate to your reader where you apply the induction hypothesis.

11 k+1 Σ 2 i = i=0 2 k k+1 = 2 * 2 k = 2 k+2 – 1 = 2 (k+1) + 1 – 1 as required.

12 Common problem in solutions submitted: Many students applied the induction hypothesis without explaining to the reader what you were doing. You will lose marks on the assignment if you do not explain where you are applying the induction hypothesis. A proof is intended for someone to read. It will be easier for someone to understand and believe in your proof if you explain what you are doing algebraically at every step. Your proof will be more elegant if you don’t change the variable names (for this problem, stick to k instead of switching to j or n or m or l).

13 Standard approach to an induction proof that for all n ≥ 0, f(n)= g(n): [Basis] Prove that f(0)= g(0). [Induction step] Assume that f(n)= g(n). We want to prove that f(n+1)= g(n+1). The induction hypothesis is the mathematical statement that f(n)=g(n).

14 1.Rewrite f(n+1) in terms of some terms involving f(n) and some other terms by applying standard mathematics. 2. Replace f(n) by g(n). This is called applying the induction hypothesis. On your assignments, I want you to explain what you are doing at this step by writing: By induction, f(n) = g(n) and therefore, …. They may not teach this in Math 122, but a good mathematician explains what they are doing at every step of a proof. 3. Simplify algebraically until you have shown that f(n+1) = g(n+1).

15 k Theorem: Σ 2 i = 2 k i=0 Proof: [Basis] When k=0, Σ i=0 to k 2 i = 2 0 = 1 and 2 k+1 – 1 = =1 so this formula is correct for k=0. Assume that k Σ 2 i = 2 k We want to prove that i=0 k+1 Σ 2 i = 2 (k+1) = 2 k i=0 Model Solution

16 [Induction step] Separating the sum into two parts gives k+1 Σ 2 i = i=0 k Σ 2 i + 2 k+1. i=0 By induction, k Σ 2 i is equal to 2 k+1 – 1. Therefore, i=0

17 k+1 Σ 2 i = i=0 2 k k+1 = 2 * 2 k = 2 k+2 – 1 as required.

18 Induction: I want you to: 1.Understand why it works as a proof technique. 2.Write proofs that explain clearly what you are doing at every step (except for very simple algebra). Be sure to mention where it is that you apply the induction hypothesis. Everything you write should be mathematically valid. 3.Be able to use it on novel applications (requires understanding). 4.If you try to prove a hypothesis that is not correct, I want you to indicate where and why the induction proof fails. You will get zero marks for “proofs” for incorrect statements. 5.Elegance is good (e.g. don’t put more in the base case than you really need).

19 What is wrong with my induction proof? In a drunken haze I decided that the solution to the recurrence T(1)=1, T(n)= 1 + T(n-1) is … + n. Theorem: The solution to the recurrence is n(n+1)/2. Proof. [Basis] T(1)=1 and 1 *(1+1)/2 = 1 as required. [Induction step] Assume that … + n-1 + n = n(n+1)/2. We want to prove that … + n-1 + n + (n+1) = (n+1)(n+2)/2 = (n 2 +3n +2)/2. By induction, … + n= n(n+1)/2. So n + (n+1)= n(n+1)/2 + (n+1). Simplifying: (n 2 + n + 2n + 2)/2= (n 2 +3n +2)/2 as required.