Docsity

chapter 4 on discrete mathmatix, Slides of Discrete Mathematics

Partial preview of the text

Download chapter 4 on discrete mathmatix and more Slides Discrete Mathematics in PDF only on Docsity!

CS

Discrete Maths

Chapter 4, Section 4. Mathematical Induction These class notes are based on material from our textbook, Discrete Mathematics and Its Applications , 6 th ed., by Kenneth H. Rosen. They are intended for classroom use only and are not a substitute for reading the textbook.

Mathematical Induction

Used to prove propositions of the form  nP ( n ), where nZ

  • Can be used only to prove results originally obtained in some other way --
  • Not a tool for discovering new theorems

Mathematical Induction

Expressed as a rule of inference, this proof technique can be stated as [ P (1)   k ( P ( k ) P ( k +1))]   nP ( n )

  • It is not assumed that P ( k ) is true for all positive integers!
  • It is only shown that if it is assumed that P ( k ) is true for some individual (but unspecified) k , then P ( k + 1) is also true. - not a case of circular reasoning

Mathematical Induction

  • When we use mathematical induction to prove a theorem, we first show that P (1) is true. Then we know: P (1)  P (2) Therefore, P (2) is true P (2)  P (3) Therefore, P (3) is true P (3)  P (4) Therefore, P (4) is true ……………. P ( l -2)  P ( l -1) Therefore, P ( l -1) is true P ( l -1)  P ( l ) Therefore, P ( l ) is true

Example

  • When we ask, “What is the basis for this proof?” we are asking, “what do we already know, or could show by demonstration if asked to do so.”
  • Since the proof involves positive integers and the condition is that n  1, we start with n = 1: S 1 = (1 (1 + 1)) / 2 = 2 / 2 = 1

Example

  • What is the inductive hypothesis for this proof?
  • (^) We know that S k is true for some k , namely, k = 1. Our inductive hypothesis is that S k is true for any k < ( n + 1), that is: S n = ( n ( n + 1)) / 2
  • (^) Our job will be to prove that S n+ is also true. That is, we must prove that : S n+ = (( n + 1) (( n + 1) + 1)) / 2 (This is our goal ; we got this by substituting n + 1 for n in our inductive hypothesis.)

Example

In every inductive proof we need to start

from something we already know, and

derive the goal statement, using the

inductive hypothesis somewhere in the

proof.

Homework Exercises

Use mathematical induction to show that a + ar + ar 2

  • … + ar n = ( ar n +  a )/( r  1) for all non-negative integers n.
  • Conjecture a formula for the sum of the first n positive odd integers. Then prove your conjecture using mathematical induction.

Mathematical Induction (Recap)

A proof by mathematical induction that P ( n ) is true for every positive integer n consists of two steps:

  • Basis step : The proposition P (1) is shown to be true.
  • Inductive step : The implication P ( k ) P ( k +1) is shown to be true for every positive integer k.

Recursion

We can define a sequence, series, or function in terms of itself. This process is called recursion.

  • To define a function with the set of nonnegative integers as its domain: - Specify the value of the function at zero - Give a rule for finding its value at an integer from its values at smaller integers

Example

Suppose that f is defined recursively by f (0) = 3 f ( n + 1) = 2 f ( n ) + 3

  • Find f (1), f (2), f (3), and f (4)

Example

If f is defined recursively by f (0) = 3 f ( n + 1) = 2 f ( n ) + 3

  • Then:

f (1) = 2 f ( 0 ) + 3 = 2 • 3 + 3 = 9

f (2) = 2 f ( 1 ) + 3 = 2 • 9 + 3 = 21

f (3) = 2 f ( 2 ) + 3 = 2 • 21 + 3 = 45

f (4) = 2 f ( 3 ) + 3 = 2 • 45 + 3 = 93

Example

Give a recursive definition of the factorial function F ( n ) = n!

  • First, define the base case F ( 0 ) = 1
  • Next, define a rule for finding F ( n+ 1) from F ( n ) for all n  0: F ( n +1) = ( n +1) F ( n )
  • Now, to find F (3) we just compute (3) F (2). To find F (2) we just compute (2) F (1). To find F (1) we just compute (1) F (0).

Example

We know that F ( 0 ) = 1.

  • So: F (3) = (3) (2) (1) F ( 0 ), or 3 • 2 • 1 •1 = 6