Quiz 6 The way I expected it..

Slides:



Advertisements
Similar presentations
Mathematical Induction
Advertisements

22C:19 Discrete Structures Induction and Recursion Fall 2014 Sukumar Ghosh.
Copyright © Cengage Learning. All rights reserved. CHAPTER 5 SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION.
13.4 Mathematical Induction. Mathematical Induction is a common method of proving that each statement of an infinite sequence of mathematical statements.
Induction and Recursion. Odd Powers Are Odd Fact: If m is odd and n is odd, then nm is odd. Proposition: for an odd number m, m k is odd for all non-negative.
1 Mathematical Induction. 2 Mathematical Induction: Example  Show that any postage of ≥ 8¢ can be obtained using 3¢ and 5¢ stamps.  First check for.
Induction and recursion
Recursive Definitions Rosen, 3.4. Recursive (or inductive) Definitions Sometimes easier to define an object in terms of itself. This process is called.
CSE115/ENGR160 Discrete Mathematics 03/22/12 Ming-Hsuan Yang UC Merced 1.
Chapter Mathematical Induction
Section Section Summary Recursive Algorithms Proving Recursive Algorithms Correct Recursion and Iteration (not yet included in overheads) Merge.
Discrete Structures Chapter 5: Sequences, Mathematical Induction, and Recursion 5.2 Mathematical Induction I [Mathematical induction is] the standard proof.
Chapter 10 Sequences, Induction, and Probability Copyright © 2014, 2010, 2007 Pearson Education, Inc Mathematical Induction.
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.
Copyright © 2007 Pearson Education, Inc. Slide 8-1.
Induction and recursion
Algorithm Design and Analysis (ADA)
What it is? Why is it a legitimate proof method? How to use it?
College Algebra Sixth Edition James Stewart Lothar Redlin Saleem Watson.
Mathematical Maxims and Minims, 1988
MATH 224 – Discrete Mathematics
Chapter 6 Mathematical Induction
CSNB143 – Discrete Structure Topic 5 – Induction Part I.
Chapter 4: Induction and Recursion
Chapter 3 (Part 3): Mathematical Reasoning, Induction & Recursion  Recursive Algorithms (3.5)  Program Correctness (3.6)
© by Kenneth H. Rosen, Discrete Mathematics & its Applications, Sixth Edition, Mc Graw-Hill, 2007 Chapter 4 (Part 3): Mathematical Reasoning, Induction.
INDUCTION AND RECURSION. PRINCIPLE OF MATHEMATICAL INDUCTION To prove that P(n) is true for all positive integers n, where P(n) is a propositional function,
Chapter 5 With Question/Answer Animations. Section 5.1.
Recursive Algorithms &
Chap 3 –A theorem is a statement that can be shown to be true –A proof is a sequence of statements to show that a theorem is true –Axioms: statements which.
CS 103 Discrete Structures Lecture 13 Induction and Recursion (1)
October 3, 2001CSE 373, Autumn Mathematical Background Exponents X A X B = X A+B X A / X B = X A-B (X A ) B = X AB X N +X N = 2X N 2 N +2 N = 2 N+1.
Inductive Proofs and Inductive Definitions Jim Skon.
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.
Proofs, Recursion and Analysis of Algorithms Mathematical Structures for Computer Science Chapter 2 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesProofs,
Quiz 7 The way I expected it.. How to do it! 1. Let P(n) be the statement that n 2 = n(n + 1)(2n + 1)/6 for the positive integer n. Be.
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.
Section Recursion  Recursion – defining an object (or function, algorithm, etc.) in terms of itself.  Recursion can be used to define sequences.
Mathematical Induction And Recursion Discrete Math Team KS MATEMATIKA DISKRIT (DISCRETE MATHEMATICS ) 1.
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.
Chapter 4: Induction and Recursion
Recursive Algorithms Section 5.4.
MATH 224 – Discrete Mathematics
Chapter 4 (Part 3): Mathematical Reasoning, Induction & Recursion
CS2210:0001Discrete Structures Induction and Recursion
Chapter 3 The Real Numbers.
Induction and recursion
Induction and Recursion
Mathematical Induction Recursion
Chapter 5 Induction and Recursion
Proofs, Recursion and Analysis of Algorithms
CSE373: Data Structures and Algorithms Lecture 2: Proof by Induction
Notes 9.5 – Mathematical Induction
Induction and recursion
This Lecture Substitution model
One step equation with Multiplication and Division
CSE 373 Data Structures and Algorithms
Applied Discrete Mathematics Week 9: Integer Properties
Mathematical Induction
This Lecture Substitution model
Two step equation Brackets
Chapter 11: Further Topics in Algebra
Copyright © Cengage Learning. All rights reserved.
Mathematical Induction
Copyright © Cengage Learning. All rights reserved.
11.4 Mathematical Induction
Recursion.
Chapter 1 Automata CE year IV.
Presentation transcript:

Quiz 6 The way I expected it.

How to do it! 1. Use mathematical induction to prove that 12 + 32 + 52 + ... + (2n + 1)2 = (n + 1)(2n + 1)(2n + 3)/3 whenever n is a nonnegative integer. Be sure to use the formula provided in class.

State what you are trying to prove! Prove 12 + 32 + 52 + ... + (2n + 1)2 = (n + 1)(2n + 1)(2n + 3)/3 whenever n is a nonnegative integer using mathematical induction. Nonnegative means 0, 1, 2, …

Basis Step Prove 12 + 32 + 52 + ... + (2n + 1)2 = (n + 1)(2n + 1)(2n + 3)/3 whenever n is a nonnegative integer using mathematical induction. (a) Basis Step: plugging in n = 0 we have that P(0) is the statement: (2 * 0 + 1)2 = (0 + 1)(2 * 0 + 1)(2 * 0 + 3)/3. Expanding both sides we have: 1 = 1 * 1 * 3/3 = 1 Both sides of P(0) shown in part (a) equal 1. Here we are just plugging in the smallest nonnegative integer and showing that both sides are equivalent.

Inductive Hypotheses (b) Inductive Hypotheses: The inductive hypothesis is the statement that 12 + 32 + 52 + ... + (2k + 1)2 = (k + 1)(2k + 1)(2k + 3)/3. Here we substitute k for n and restate what we are trying to prove.

Inductive step (c) For the inductive step, we want to show for each k ≥ 1 that P(k) implies P(k + 1). In other words, we want to show that by assuming the inductive hypothesis we can prove 12 + 32 + 52 + ... + (2k + 1)2 + (2(k + 1) + 1)2 = ((k + 1) + 1)(2(k + 1) + 1)(2(k + 1) + 3)/3 We take the last k term on the left side , (2k + 1)2, add another similar term with the k value replaced by k + 1, and replay all k terms on the right-hand side by k + 1 terms.

Substitution Proof (d) Replacing the quantity in brackets on the left-hand side of part(c) by what it equals by virtue of the inductive hypothesis (12 + 32 + 52 + ... + (2k + 1)2 = (k + 1)(2k + 1)(2k + 3)/3), we have (k + 1)(2k + 1)(2k + 3)/3 + (2(k + 1) + 1)2 = ((k + 1) + 1)(2(k + 1) + 1)(2(k + 1) + 3)/3 ((k + 1)(2k + 1)(2k + 3) + 3(2(k + 1) + 1)2)/3 = ((k + 2)(2k + 2 + 1)(2k + 2 + 3)/3 (k + 1)(2k + 1)(2k + 3) + 3(2k + 2 + 1)2 = ((k + 2)(2k + 3)(2k + 5) {divide both sides by 3} (k + 1)(2k + 1)(2k + 3) + 3(2k + 3)2 = ((k + 2)(2k + 3)(2k + 5) (k + 1)(2k + 1) + 3(2k + 3) = ((k + 2)(2k + 5) {divide both sides by (2k + 3)} 2k2 + 3k + 1 + 6k + 9 = 2k2 + 9k + 10 2k2 + 9k + 10 = 2k2 + 9k + 10 we have shown that both sides are equal as we desired. 

N Factorial 2. Give a recursive algorithm (in the pseudo format specified in appendix A3) for computing:  a. n! (n factorial). procedure factorial(n: nonnegative integer) if n = 0 then return 1 else return n ∙ factorial(n − 1) {output is n!}

A Recursive Algorithm for Computing an 2. Give a recursive algorithm (in the pseudo format specified in appendix A3) for computing:  b. an (a to the nth power). procedure power(a: nonzero real number, n: nonnegative integer) if n = 0 then return 1 else return a ∙ power (a, n − 1) {output is an}

Bonus 3. Bonus question: Using 2.b. above, show the value of an generated at each step given a=5 and n= 4 (starting with n = 0). hint1: procedure power(a, n) hint2: {54} N 1 2 3 4 an 5 25 125 625