Discrete Mathematics with Applications Chapter 5: Sequences, - - PowerPoint PPT Presentation

discrete mathematics with applications
SMART_READER_LITE
LIVE PREVIEW

Discrete Mathematics with Applications Chapter 5: Sequences, - - PowerPoint PPT Presentation

Strong Induction The Well-Ordering Principle The Quotient-Remainder Theorem Discrete Mathematics with Applications Chapter 5: Sequences, Mathematical Induction, and Recursion (Part 2) March 21, 2019 Chapter 5: Sequences, Mathematical


slide-1
SLIDE 1

Strong Induction The Well-Ordering Principle The Quotient-Remainder Theorem

Discrete Mathematics with Applications

Chapter 5: Sequences, Mathematical Induction, and Recursion (Part 2) March 21, 2019

Chapter 5: Sequences, Mathematical Induction, and Recursion (Part 2) Discrete Mathematics with Applications

slide-2
SLIDE 2

Strong Induction The Well-Ordering Principle The Quotient-Remainder Theorem

Strong induction is similar to weak induction, but more general.

Chapter 5: Sequences, Mathematical Induction, and Recursion (Part 2) Discrete Mathematics with Applications

slide-3
SLIDE 3

Strong Induction The Well-Ordering Principle The Quotient-Remainder Theorem

Strong induction is similar to weak induction, but more general. The difference is that the strong form of induction assumes several cases for the basis step.

Chapter 5: Sequences, Mathematical Induction, and Recursion (Part 2) Discrete Mathematics with Applications

slide-4
SLIDE 4

Strong Induction The Well-Ordering Principle The Quotient-Remainder Theorem

Strong induction is similar to weak induction, but more general. The difference is that the strong form of induction assumes several cases for the basis step. Rather than assume that P(k) is true to prove that P(k + 1) is true, we assume that P(i) is true for every integer i such that a ≤ i < k, where i is the base case, to help prove that P(k) is true.

Chapter 5: Sequences, Mathematical Induction, and Recursion (Part 2) Discrete Mathematics with Applications

slide-5
SLIDE 5

Strong Induction The Well-Ordering Principle The Quotient-Remainder Theorem

Strong induction is similar to weak induction, but more general. The difference is that the strong form of induction assumes several cases for the basis step. Rather than assume that P(k) is true to prove that P(k + 1) is true, we assume that P(i) is true for every integer i such that a ≤ i < k, where i is the base case, to help prove that P(k) is true. We use strong induction instead of weak induction whenever the inductive hypothesis of P(k) being true by itself isn’t enough for a complete proof.

Chapter 5: Sequences, Mathematical Induction, and Recursion (Part 2) Discrete Mathematics with Applications

slide-6
SLIDE 6

Strong Induction The Well-Ordering Principle The Quotient-Remainder Theorem

The Principle of Strong Mathematical Induction

Let P(n) be a predicate where the domain of n is Z, and let a be a fixed integer.

Chapter 5: Sequences, Mathematical Induction, and Recursion (Part 2) Discrete Mathematics with Applications

slide-7
SLIDE 7

Strong Induction The Well-Ordering Principle The Quotient-Remainder Theorem

The Principle of Strong Mathematical Induction

Let P(n) be a predicate where the domain of n is Z, and let a be a fixed integer. Goal: Prove a theorem of the form “∀n ≥ a, P(n).”

Chapter 5: Sequences, Mathematical Induction, and Recursion (Part 2) Discrete Mathematics with Applications

slide-8
SLIDE 8

Strong Induction The Well-Ordering Principle The Quotient-Remainder Theorem

The Principle of Strong Mathematical Induction

Let P(n) be a predicate where the domain of n is Z, and let a be a fixed integer. Goal: Prove a theorem of the form “∀n ≥ a, P(n).” Process:

Chapter 5: Sequences, Mathematical Induction, and Recursion (Part 2) Discrete Mathematics with Applications

slide-9
SLIDE 9

Strong Induction The Well-Ordering Principle The Quotient-Remainder Theorem

The Principle of Strong Mathematical Induction

Let P(n) be a predicate where the domain of n is Z, and let a be a fixed integer. Goal: Prove a theorem of the form “∀n ≥ a, P(n).” Process:

1 “Basis Step” or “Base Case”: Prove that P(a) is true.

Chapter 5: Sequences, Mathematical Induction, and Recursion (Part 2) Discrete Mathematics with Applications

slide-10
SLIDE 10

Strong Induction The Well-Ordering Principle The Quotient-Remainder Theorem

The Principle of Strong Mathematical Induction

Let P(n) be a predicate where the domain of n is Z, and let a be a fixed integer. Goal: Prove a theorem of the form “∀n ≥ a, P(n).” Process:

1 “Basis Step” or “Base Case”: Prove that P(a) is true. 2 “Inductive Step”: Prove “∀k ≥ a, if P(i) holds for all integers

i such that a ≤ i < k, then P(k) also holds” via the following:

Chapter 5: Sequences, Mathematical Induction, and Recursion (Part 2) Discrete Mathematics with Applications

slide-11
SLIDE 11

Strong Induction The Well-Ordering Principle The Quotient-Remainder Theorem

The Principle of Strong Mathematical Induction

Let P(n) be a predicate where the domain of n is Z, and let a be a fixed integer. Goal: Prove a theorem of the form “∀n ≥ a, P(n).” Process:

1 “Basis Step” or “Base Case”: Prove that P(a) is true. 2 “Inductive Step”: Prove “∀k ≥ a, if P(i) holds for all integers

i such that a ≤ i < k, then P(k) also holds” via the following:

1

“Inductive Hypothesis”: Assume P(i) is true for every integer i between a (inclusive) and k (exclusive).

Chapter 5: Sequences, Mathematical Induction, and Recursion (Part 2) Discrete Mathematics with Applications

slide-12
SLIDE 12

Strong Induction The Well-Ordering Principle The Quotient-Remainder Theorem

The Principle of Strong Mathematical Induction

Let P(n) be a predicate where the domain of n is Z, and let a be a fixed integer. Goal: Prove a theorem of the form “∀n ≥ a, P(n).” Process:

1 “Basis Step” or “Base Case”: Prove that P(a) is true. 2 “Inductive Step”: Prove “∀k ≥ a, if P(i) holds for all integers

i such that a ≤ i < k, then P(k) also holds” via the following:

1

“Inductive Hypothesis”: Assume P(i) is true for every integer i between a (inclusive) and k (exclusive).

2

Deduce that P(k) must also be trues.

Chapter 5: Sequences, Mathematical Induction, and Recursion (Part 2) Discrete Mathematics with Applications

slide-13
SLIDE 13

Strong Induction The Well-Ordering Principle The Quotient-Remainder Theorem

The Principle of Strong Mathematical Induction

Let P(n) be a predicate where the domain of n is Z, and let a be a fixed integer. Goal: Prove a theorem of the form “∀n ≥ a, P(n).” Process:

1 “Basis Step” or “Base Case”: Prove that P(a) is true. 2 “Inductive Step”: Prove “∀k ≥ a, if P(i) holds for all integers

i such that a ≤ i < k, then P(k) also holds” via the following:

1

“Inductive Hypothesis”: Assume P(i) is true for every integer i between a (inclusive) and k (exclusive).

2

Deduce that P(k) must also be trues.

Note: The base case is often vacuously true. In such situations, proving a base case is not necessary.

Chapter 5: Sequences, Mathematical Induction, and Recursion (Part 2) Discrete Mathematics with Applications

slide-14
SLIDE 14

Strong Induction The Well-Ordering Principle The Quotient-Remainder Theorem

Theorem If {bn}∞

n=0 is the sequence defined recursively by b0 = 1, b1 = 2,

b3 = 3, and bn = bn−3 + bn−2 + bn−1 for n ≥ 3, then bn ≤ 3n for all nonnegative integers n.

Chapter 5: Sequences, Mathematical Induction, and Recursion (Part 2) Discrete Mathematics with Applications

slide-15
SLIDE 15

Strong Induction The Well-Ordering Principle The Quotient-Remainder Theorem

Theorem If {bn}∞

n=0 is the sequence defined recursively by b0 = 1, b1 = 2,

b3 = 3, and bn = bn−3 + bn−2 + bn−1 for n ≥ 3, then bn ≤ 3n for all nonnegative integers n. This is an example of when strong induction is needed instead of weak induction, because the recurrence relation is defined using the three prior terms of the sequence instead of just the immediate previous one.

Chapter 5: Sequences, Mathematical Induction, and Recursion (Part 2) Discrete Mathematics with Applications

slide-16
SLIDE 16

Strong Induction The Well-Ordering Principle The Quotient-Remainder Theorem

Proof. We proceed by strong induction on n. Base Case 1: n = 0. Then b0 = 1 ≤ 30. Base Case 2: n = 1. Then b1 = 2 ≤ 31. Base Case 3: n = 2. Then b2 = 3 ≤ 32. Inductive Step: Let k be an arbitrary integer that is at least 3, and suppose that bi ≤ 3i for every nonnegative integer i < k. Then bk = bk−1 + bk−2 + bk−3 ≤ 3k−1 + 3k−2 + 3k−3 (inductive hypothesis) ≤ 3k−1 + 3k−1 + 3k−1 = 3 ∗ 3k−1 = 3k

Chapter 5: Sequences, Mathematical Induction, and Recursion (Part 2) Discrete Mathematics with Applications

slide-17
SLIDE 17

Strong Induction The Well-Ordering Principle The Quotient-Remainder Theorem

Theorem (The Fundamental Theorem of Arithmetic) Every integer greater than 1 is either a prime number or can be uniquely written as the product of prime factors.

Chapter 5: Sequences, Mathematical Induction, and Recursion (Part 2) Discrete Mathematics with Applications

slide-18
SLIDE 18

Strong Induction The Well-Ordering Principle The Quotient-Remainder Theorem

Theorem (The Fundamental Theorem of Arithmetic) Every integer greater than 1 is either a prime number or can be uniquely written as the product of prime factors. This is possibly the most famous example of a theorem requiring a strong inductive proof! (Note: a base case is unnecessary here. Why?)

Chapter 5: Sequences, Mathematical Induction, and Recursion (Part 2) Discrete Mathematics with Applications

slide-19
SLIDE 19

Strong Induction The Well-Ordering Principle The Quotient-Remainder Theorem

Proof (Existence). We use strong induction. Suppose n is an integer larger than 1, and suppose that for every integer k, if 1 < k < n, then k is either prime or a product of prime factors. Of course, if n is prime then there is nothing more to prove, so assume instead that n is

  • composite. Then there are positive integers r and s such that

n = rs with 1 < r < n and 1 < s < n. Thus, by inductive hypothesis, each of r and s is either prime or a product of prime

  • factors. But then since n = rs, it follows that n is itself a product
  • f prime factors.

Chapter 5: Sequences, Mathematical Induction, and Recursion (Part 2) Discrete Mathematics with Applications

slide-20
SLIDE 20

Strong Induction The Well-Ordering Principle The Quotient-Remainder Theorem

Proof (Existence). We use strong induction. Suppose n is an integer larger than 1, and suppose that for every integer k, if 1 < k < n, then k is either prime or a product of prime factors. Of course, if n is prime then there is nothing more to prove, so assume instead that n is

  • composite. Then there are positive integers r and s such that

n = rs with 1 < r < n and 1 < s < n. Thus, by inductive hypothesis, each of r and s is either prime or a product of prime

  • factors. But then since n = rs, it follows that n is itself a product
  • f prime factors.

The proof of the uniqueness of the prime factorization is left as an exercise to you.

Chapter 5: Sequences, Mathematical Induction, and Recursion (Part 2) Discrete Mathematics with Applications

slide-21
SLIDE 21

Strong Induction The Well-Ordering Principle The Quotient-Remainder Theorem

Theorem For all integers n ≥ 4, n cents can be obtained using a combination of 2-cent and 5-cent coins.

Chapter 5: Sequences, Mathematical Induction, and Recursion (Part 2) Discrete Mathematics with Applications

slide-22
SLIDE 22

Strong Induction The Well-Ordering Principle The Quotient-Remainder Theorem

Theorem For all integers n ≥ 4, n cents can be obtained using a combination of 2-cent and 5-cent coins. We saw earlier how to prove this using weak induction. However, there’s an even simpler proof of this using strong induction!

Chapter 5: Sequences, Mathematical Induction, and Recursion (Part 2) Discrete Mathematics with Applications

slide-23
SLIDE 23

Strong Induction The Well-Ordering Principle The Quotient-Remainder Theorem

Proof. We proceed by strong induction on n. Base Case 1: n = 4. We then need two 2-cent coins in this case. Base Case 2: n = 5. When then need one 5-cent coin in this case. Inductive Step: Let k be an arbitrary integer that is at least 6, and suppose that every integer i, if 4 ≤ i < k, then i cents can be

  • btained using some combination of 2-cent and 5-cent coins.

Then, in particular, 4 ≤ k − 2 < k, and so there are nonnegative integers r and s such that 2r + 5s = k − 2. Hence k = (k − 2) + 2 = 2r + 5s + 2 = 2(r + 1) + 5s. Hence k can also be attained using some combination of 2-cent and 5-cent coins, as desired.

Chapter 5: Sequences, Mathematical Induction, and Recursion (Part 2) Discrete Mathematics with Applications

slide-24
SLIDE 24

Strong Induction The Well-Ordering Principle The Quotient-Remainder Theorem

Exercises

1 Let {sn}∞ n=0 be the recursively defined sequence given by

s0 = 0, s1 = 4, and sn = 6sn−1 − 5sn−2 for n ≥ 2. Prove that sn = 5n − 1 for every nonnegative integer n.

2 Suppose that {en}∞ n=0 be the recursively defined sequence

given by e0 = 12, e1 = 29, and en = 5en−1 − 6en−2 for n ≥ 2. Prove that en = 5 · 3n + 7 · 2n for every nonnegative integer n.

Chapter 5: Sequences, Mathematical Induction, and Recursion (Part 2) Discrete Mathematics with Applications

slide-25
SLIDE 25

Strong Induction The Well-Ordering Principle The Quotient-Remainder Theorem

The Well-Ordering Principle states that every set containing

  • ne or more integers all of which are greater than some fixed

integer has a least element.

Chapter 5: Sequences, Mathematical Induction, and Recursion (Part 2) Discrete Mathematics with Applications

slide-26
SLIDE 26

Strong Induction The Well-Ordering Principle The Quotient-Remainder Theorem

The Well-Ordering Principle states that every set containing

  • ne or more integers all of which are greater than some fixed

integer has a least element. In other words, if S is a nonempty subset of Z that’s bounded below by some number, then S contains an integer that is less than every other integer in S.

Chapter 5: Sequences, Mathematical Induction, and Recursion (Part 2) Discrete Mathematics with Applications

slide-27
SLIDE 27

Strong Induction The Well-Ordering Principle The Quotient-Remainder Theorem

Exercise

To which of the following sets does the well-ordering principle apply? If it does apply, what is it’s least element?

Chapter 5: Sequences, Mathematical Induction, and Recursion (Part 2) Discrete Mathematics with Applications

slide-28
SLIDE 28

Strong Induction The Well-Ordering Principle The Quotient-Remainder Theorem

Exercise

To which of the following sets does the well-ordering principle apply? If it does apply, what is it’s least element?

1 R

Chapter 5: Sequences, Mathematical Induction, and Recursion (Part 2) Discrete Mathematics with Applications

slide-29
SLIDE 29

Strong Induction The Well-Ordering Principle The Quotient-Remainder Theorem

Exercise

To which of the following sets does the well-ordering principle apply? If it does apply, what is it’s least element?

1 R 2 {n ∈ Z+ | n2 < n}

Chapter 5: Sequences, Mathematical Induction, and Recursion (Part 2) Discrete Mathematics with Applications

slide-30
SLIDE 30

Strong Induction The Well-Ordering Principle The Quotient-Remainder Theorem

Exercise

To which of the following sets does the well-ordering principle apply? If it does apply, what is it’s least element?

1 R 2 {n ∈ Z+ | n2 < n} 3 {46 − 7k | k ∈ Z and 46 − 7k ≥ 0}

Chapter 5: Sequences, Mathematical Induction, and Recursion (Part 2) Discrete Mathematics with Applications

slide-31
SLIDE 31

Strong Induction The Well-Ordering Principle The Quotient-Remainder Theorem

Exercise

To which of the following sets does the well-ordering principle apply? If it does apply, what is it’s least element?

1 R 2 {n ∈ Z+ | n2 < n} 3 {46 − 7k | k ∈ Z and 46 − 7k ≥ 0} 4 Z

Chapter 5: Sequences, Mathematical Induction, and Recursion (Part 2) Discrete Mathematics with Applications

slide-32
SLIDE 32

Strong Induction The Well-Ordering Principle The Quotient-Remainder Theorem

Exercise

To which of the following sets does the well-ordering principle apply? If it does apply, what is it’s least element?

1 R 2 {n ∈ Z+ | n2 < n} 3 {46 − 7k | k ∈ Z and 46 − 7k ≥ 0} 4 Z

Solutions:

Chapter 5: Sequences, Mathematical Induction, and Recursion (Part 2) Discrete Mathematics with Applications

slide-33
SLIDE 33

Strong Induction The Well-Ordering Principle The Quotient-Remainder Theorem

Exercise

To which of the following sets does the well-ordering principle apply? If it does apply, what is it’s least element?

1 R 2 {n ∈ Z+ | n2 < n} 3 {46 − 7k | k ∈ Z and 46 − 7k ≥ 0} 4 Z

Solutions:

1 The well-ordering principle does not apply to R because it is

not a subset of Z.

Chapter 5: Sequences, Mathematical Induction, and Recursion (Part 2) Discrete Mathematics with Applications

slide-34
SLIDE 34

Strong Induction The Well-Ordering Principle The Quotient-Remainder Theorem

Exercise

To which of the following sets does the well-ordering principle apply? If it does apply, what is it’s least element?

1 R 2 {n ∈ Z+ | n2 < n} 3 {46 − 7k | k ∈ Z and 46 − 7k ≥ 0} 4 Z

Solutions:

1 The well-ordering principle does not apply to R because it is

not a subset of Z.

2 The well-ordering principle does not apply to this set because

it is empty. (There are no integers n such that n2 < n.)

Chapter 5: Sequences, Mathematical Induction, and Recursion (Part 2) Discrete Mathematics with Applications

slide-35
SLIDE 35

Strong Induction The Well-Ordering Principle The Quotient-Remainder Theorem

Exercise

To which of the following sets does the well-ordering principle apply? If it does apply, what is it’s least element?

1 R 2 {n ∈ Z+ | n2 < n} 3 {46 − 7k | k ∈ Z and 46 − 7k ≥ 0} 4 Z

Solutions:

1 The well-ordering principle does not apply to R because it is

not a subset of Z.

2 The well-ordering principle does not apply to this set because

it is empty. (There are no integers n such that n2 < n.)

3 The well-ordering principle does apply to this set. One can

verify that it’s least element is 4.

Chapter 5: Sequences, Mathematical Induction, and Recursion (Part 2) Discrete Mathematics with Applications

slide-36
SLIDE 36

Strong Induction The Well-Ordering Principle The Quotient-Remainder Theorem

Exercise

To which of the following sets does the well-ordering principle apply? If it does apply, what is it’s least element?

1 R 2 {n ∈ Z+ | n2 < n} 3 {46 − 7k | k ∈ Z and 46 − 7k ≥ 0} 4 Z

Solutions:

1 The well-ordering principle does not apply to R because it is

not a subset of Z.

2 The well-ordering principle does not apply to this set because

it is empty. (There are no integers n such that n2 < n.)

3 The well-ordering principle does apply to this set. One can

verify that it’s least element is 4.

4 The well-ordering principle does not apply to Z because it is

not bounded from below.

Chapter 5: Sequences, Mathematical Induction, and Recursion (Part 2) Discrete Mathematics with Applications

slide-37
SLIDE 37

Strong Induction The Well-Ordering Principle The Quotient-Remainder Theorem

Theorem The following are logically equivalent:

1 The principle of (ordinary/weak) mathematical induction. 2 The principle of strong induction. 3 The well-ordering principle.

Chapter 5: Sequences, Mathematical Induction, and Recursion (Part 2) Discrete Mathematics with Applications

slide-38
SLIDE 38

Strong Induction The Well-Ordering Principle The Quotient-Remainder Theorem

Theorem The following are logically equivalent:

1 The principle of (ordinary/weak) mathematical induction. 2 The principle of strong induction. 3 The well-ordering principle.

Proof omitted.

Chapter 5: Sequences, Mathematical Induction, and Recursion (Part 2) Discrete Mathematics with Applications

slide-39
SLIDE 39

Strong Induction The Well-Ordering Principle The Quotient-Remainder Theorem

In other words, the weak induction, strong induction, and the well-ordering principle are logically the same. They are different, but equivalent, ways of stating the same fundamental aspect of how the integers are “counted.”

Chapter 5: Sequences, Mathematical Induction, and Recursion (Part 2) Discrete Mathematics with Applications

slide-40
SLIDE 40

Strong Induction The Well-Ordering Principle The Quotient-Remainder Theorem

In other words, the weak induction, strong induction, and the well-ordering principle are logically the same. They are different, but equivalent, ways of stating the same fundamental aspect of how the integers are “counted.” One nice consequence of this is that every inductive proof can be rewritten as a proof using the well-ordering principle, and vice-versa.

Chapter 5: Sequences, Mathematical Induction, and Recursion (Part 2) Discrete Mathematics with Applications

slide-41
SLIDE 41

Strong Induction The Well-Ordering Principle The Quotient-Remainder Theorem

Example

Theorem

n

  • i=1

(2i − 1) = 1 + 3 + 5 + · · · + (2n − 1) = n2.

Chapter 5: Sequences, Mathematical Induction, and Recursion (Part 2) Discrete Mathematics with Applications

slide-42
SLIDE 42

Strong Induction The Well-Ordering Principle The Quotient-Remainder Theorem

Example

Theorem

n

  • i=1

(2i − 1) = 1 + 3 + 5 + · · · + (2n − 1) = n2. We proved this earlier using induction. Let us now prove it using the well-ordering principle.

Chapter 5: Sequences, Mathematical Induction, and Recursion (Part 2) Discrete Mathematics with Applications

slide-43
SLIDE 43

Strong Induction The Well-Ordering Principle The Quotient-Remainder Theorem

Proof. Assume, to the contrary, that there is a positive integer n such that n

i=1(2i − 1) = n2. Then, by the well-ordering principle, there

is a smallest such positive integer, say s. Note that s ≥ 2 since 1

i=1(2i − 1) = 12. Now since s is the least counterexample, it

follows that s − 1 ≥ 1 is not, and so s−1

i=1(2i − 1) = (s − 1)2. But

then

s

  • i=1

(2i − 1) =

s−1

  • i=1

(2i − 1) + (2s − 1) = (s − 1)2 + (2s − 1) = s2 − 2s + 1 + 2s − 1 = s2; a contradiction. Therefore n

i=1(2i − 1) = n2 for all n.

Chapter 5: Sequences, Mathematical Induction, and Recursion (Part 2) Discrete Mathematics with Applications

slide-44
SLIDE 44

Strong Induction The Well-Ordering Principle The Quotient-Remainder Theorem

Theorem (The Quotient-Remainder Theorem (aka The Division Algorithm)) Given any integer n and positive integer d, there exist unique integers q and r such that n = dq + r with 0 ≤ r < d.

Chapter 5: Sequences, Mathematical Induction, and Recursion (Part 2) Discrete Mathematics with Applications

slide-45
SLIDE 45

Strong Induction The Well-Ordering Principle The Quotient-Remainder Theorem

Theorem (The Quotient-Remainder Theorem (aka The Division Algorithm)) Given any integer n and positive integer d, there exist unique integers q and r such that n = dq + r with 0 ≤ r < d. This theorem actually holds for all nonzero integers d, but we will stick to d > 0 for simplicity.

Chapter 5: Sequences, Mathematical Induction, and Recursion (Part 2) Discrete Mathematics with Applications

slide-46
SLIDE 46

Strong Induction The Well-Ordering Principle The Quotient-Remainder Theorem

Proof (Existence). Let S = {n − dk | k ∈ Z and n − dk ≥ 0}. Observe that S is a nonempty set of nonnegative integers. (Indeed, if n ≥ 0, then (n − d · 0) ∈ S, whereas if n < 0, then n − dn = (1 − d)n ≥ 0 and is thus in S.) It follows by the well-ordering principle that S has a least element r. Hence, for some specific integer k = q, n − dq = r. We claim that r < d. To see why, note that if r ≥ d, then n − d(q + 1) = n − dq − d = r − d ≥ 0, which would make n − d(q + 1) an element of S that is even smaller than r, thus contradicting the minimality of r.

Chapter 5: Sequences, Mathematical Induction, and Recursion (Part 2) Discrete Mathematics with Applications

slide-47
SLIDE 47

Strong Induction The Well-Ordering Principle The Quotient-Remainder Theorem

Div and Mod

Given an integer n and a positive integer d, n div d is the quotient attained by dividing n by d, whereas n mod d is the remainder thus attained.

Chapter 5: Sequences, Mathematical Induction, and Recursion (Part 2) Discrete Mathematics with Applications

slide-48
SLIDE 48

Strong Induction The Well-Ordering Principle The Quotient-Remainder Theorem

Div and Mod

Given an integer n and a positive integer d, n div d is the quotient attained by dividing n by d, whereas n mod d is the remainder thus attained. These are common built-in functions in various computer languages, such as Pascal. (div and mod are called / and %, respectively, in C++ and Java.)

Chapter 5: Sequences, Mathematical Induction, and Recursion (Part 2) Discrete Mathematics with Applications

slide-49
SLIDE 49

Strong Induction The Well-Ordering Principle The Quotient-Remainder Theorem

Div and Mod

Given an integer n and a positive integer d, n div d is the quotient attained by dividing n by d, whereas n mod d is the remainder thus attained. These are common built-in functions in various computer languages, such as Pascal. (div and mod are called / and %, respectively, in C++ and Java.) The Quotient-Remainder theorem tells us that these two functions are well-defined. In fact, if n = dq + r with 0 ≤ r < d, then n div d = q and n mod d = r.

Chapter 5: Sequences, Mathematical Induction, and Recursion (Part 2) Discrete Mathematics with Applications

slide-50
SLIDE 50

Strong Induction The Well-Ordering Principle The Quotient-Remainder Theorem

Div and Mod

Given an integer n and a positive integer d, n div d is the quotient attained by dividing n by d, whereas n mod d is the remainder thus attained. These are common built-in functions in various computer languages, such as Pascal. (div and mod are called / and %, respectively, in C++ and Java.) The Quotient-Remainder theorem tells us that these two functions are well-defined. In fact, if n = dq + r with 0 ≤ r < d, then n div d = q and n mod d = r. Furthermore, the Quotient-Remainder theorem indicates that n mod d must be one of the integers between 0 and d − 1, inclusive.

Chapter 5: Sequences, Mathematical Induction, and Recursion (Part 2) Discrete Mathematics with Applications

slide-51
SLIDE 51

Strong Induction The Well-Ordering Principle The Quotient-Remainder Theorem

Other Nice Things About the Quotient-Remainder Theorem

The Quotient-Remainder theorem validates the (previously unproven) assertion that all integers are either even or odd.

Chapter 5: Sequences, Mathematical Induction, and Recursion (Part 2) Discrete Mathematics with Applications

slide-52
SLIDE 52

Strong Induction The Well-Ordering Principle The Quotient-Remainder Theorem

Other Nice Things About the Quotient-Remainder Theorem

The Quotient-Remainder theorem validates the (previously unproven) assertion that all integers are either even or odd. In fact, the Quotient-Remainder theorem provides a nice way to invoke casework into a potential proof. Just take the potential cases to be the potential values of the remainder r when dealing with a fixed value of d. (Note that a number is divisible by d if and only if r = 0.)

Chapter 5: Sequences, Mathematical Induction, and Recursion (Part 2) Discrete Mathematics with Applications

slide-53
SLIDE 53

Strong Induction The Well-Ordering Principle The Quotient-Remainder Theorem

Other Nice Things About the Quotient-Remainder Theorem

The Quotient-Remainder theorem validates the (previously unproven) assertion that all integers are either even or odd. In fact, the Quotient-Remainder theorem provides a nice way to invoke casework into a potential proof. Just take the potential cases to be the potential values of the remainder r when dealing with a fixed value of d. (Note that a number is divisible by d if and only if r = 0.) Exercise: prove that √ 3 is irrational.

Chapter 5: Sequences, Mathematical Induction, and Recursion (Part 2) Discrete Mathematics with Applications

slide-54
SLIDE 54

Strong Induction The Well-Ordering Principle The Quotient-Remainder Theorem

Other Nice Things About the Quotient-Remainder Theorem

The Quotient-Remainder theorem validates the (previously unproven) assertion that all integers are either even or odd. In fact, the Quotient-Remainder theorem provides a nice way to invoke casework into a potential proof. Just take the potential cases to be the potential values of the remainder r when dealing with a fixed value of d. (Note that a number is divisible by d if and only if r = 0.) Exercise: prove that √ 3 is irrational. Harder exercise: prove that if n is an integer that is not a perfect square, then √n is irrational.

Chapter 5: Sequences, Mathematical Induction, and Recursion (Part 2) Discrete Mathematics with Applications