Mathematical Induction. Part Two

Similar documents
Mathematical Induction. Part Two

Mathematical Induction

Mathematical Induction Assignments

1 Continued Fractions

THE DIVISION THEOREM IN Z AND R[T ]

Mathematical Induction

Mathematics 228(Q1), Assignment 2 Solutions

Hence, the sequence of triangular numbers is given by., the. n th square number, is the sum of the first. S n

Standard forms for writing numbers

Infinite Continued Fractions

Discrete Mathematics. Spring 2017

Induction 1 = 1(1+1) = 2(2+1) = 3(3+1) 2

What is proof? Lesson 1

PUTNAM TRAINING NUMBER THEORY. Exercises 1. Show that the sum of two consecutive primes is never twice a prime.

Discrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 3

Some Review Problems for Exam 1: Solutions

INTEGERS. In this section we aim to show the following: Goal. Every natural number can be written uniquely as a product of primes.

CSC236H Lecture 2. Ilir Dema. September 19, 2018

CS1800: Mathematical Induction. Professor Kevin Gold

Grade 8 Chapter 7: Rational and Irrational Numbers

Proof Techniques (Review of Math 271)

Grade 7/8 Math Circles Winter March 20/21/22 Types of Numbers

Fall 2017 Test II review problems

Discrete Mathematics and Probability Theory Fall 2013 Vazirani Note 1

Lecture 2: Continued fractions, rational approximations

SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION

CHAPTER 4: EXPLORING Z

UNIT 4 NOTES: PROPERTIES & EXPRESSIONS

What can you prove by induction?

THE DIVISION THEOREM IN Z AND F [T ]

Climbing an Infinite Ladder

x 2 + 6x 18 x + 2 Name: Class: Date: 1. Find the coordinates of the local extreme of the function y = x 2 4 x.

1. Introduction to commutative rings and fields

1.2 The Well-Ordering Principle

A NEW SET THEORY FOR ANALYSIS

Notes on arithmetic. 1. Representation in base B

Basic Principles of Algebra

Homework 4, 5, 6 Solutions. > 0, and so a n 0 = n + 1 n = ( n+1 n)( n+1+ n) 1 if n is odd 1/n if n is even diverges.

The Inductive Proof Template

Carmen s Core Concepts (Math 135)

CSC 344 Algorithms and Complexity. Proof by Mathematical Induction

Writing proofs for MATH 61CM, 61DM Week 1: basic logic, proof by contradiction, proof by induction

Solutions Quiz 9 Nov. 8, Prove: If a, b, m are integers such that 2a + 3b 12m + 1, then a 3m + 1 or b 2m + 1.

MAT115A-21 COMPLETE LECTURE NOTES

Discrete Mathematics. Spring 2017

Discrete Mathematics for CS Spring 2008 David Wagner Note 4

Assignment #2 COMP 3200 Spring 2012 Prof. Stucki

Chapter 2. Mathematical Reasoning. 2.1 Mathematical Models

DR.RUPNATHJI( DR.RUPAK NATH )

Section 4.2: Mathematical Induction 1

3 Finite continued fractions

Outline Goals and Assumptions Real Numbers Rational and Irrational. L11: Numbers. Alice E. Fischer

CHAPTER 1 NUMBER SYSTEMS. 1.1 Introduction

Proof: If (a, a, b) is a Pythagorean triple, 2a 2 = b 2 b / a = 2, which is impossible.

CSE 1400 Applied Discrete Mathematics Proofs

Part I, Number Systems. CS131 Mathematics for Computer Scientists II Note 1 INTEGERS

CS 360, Winter Morphology of Proof: An introduction to rigorous proof techniques

a = qb + r where 0 r < b. Proof. We first prove this result under the additional assumption that b > 0 is a natural number. Let

Mathematical Induction

5) ) y 20 y 10 =

At the start of the term, we saw the following formula for computing the sum of the first n integers:

1 Basic Combinatorics

Chapter 1 A Survey of Divisibility 14

1 Adeles over Q. 1.1 Absolute values

The Dynamics of Continued Fractions

0.Axioms for the Integers 1

The area of a geometric figure is a measure of how big a region is enclosed inside the figure.

WORKSHEET ON NUMBERS, MATH 215 FALL. We start our study of numbers with the integers: N = {1, 2, 3,...}

MATH10040: Numbers and Functions Homework 1: Solutions

Assignment: Summer Assignment Part 1 of 8 Real Numbers and Their Properties. Student: Date:

PRINCIPLE OF MATHEMATICAL INDUCTION

MATH 131A: REAL ANALYSIS

Mathematical Fundamentals

Reading and Writing. Mathematical Proofs. Slides by Arthur van Goetham

Sequences of Real Numbers

1. Introduction to commutative rings and fields

SEVENTH EDITION and EXPANDED SEVENTH EDITION

CSE 311: Foundations of Computing. Lecture 14: Induction

Numbers. 2.1 Integers. P(n) = n(n 4 5n 2 + 4) = n(n 2 1)(n 2 4) = (n 2)(n 1)n(n + 1)(n + 2); 120 =

Beautiful Mathematics

1 Proof by Contradiction

Every subset of {1, 2,...,n 1} can be extended to a subset of {1, 2, 3,...,n} by either adding or not adding the element n.

12 Sequences and Recurrences

3.1 Induction: An informal introduction

What Fun! It's Practice with Scientific Notation!

Fall 2017 November 10, Written Homework 5

MATH 2112/CSCI 2112, Discrete Structures I Winter 2007 Toby Kenney Homework Sheet 5 Hints & Model Solutions

Homework #2 Solutions Due: September 5, for all n N n 3 = n2 (n + 1) 2 4

A number that can be written as, where p and q are integers and q Number.

Proofs Not Based On POMI

CS1800: Strong Induction. Professor Kevin Gold

Ma/CS 6a Class 2: Congruences

Study Guide for Math 095

Induction and recursion. Chapter 5

CYCLICITY OF (Z/(p))

Chapter 3 Basic Number Theory

Chapter Summary. Mathematical Induction Strong Induction Well-Ordering Recursive Definitions Structural Induction Recursive Algorithms

Discrete Mathematics and Probability Theory Fall 2014 Anant Sahai Note 7

1 Numbers. exponential functions, such as x 7! a x ; where a; x 2 R; trigonometric functions, such as x 7! sin x; where x 2 R; ffiffi x ; where x 0:

Climbing an Infinite Ladder

Transcription:

Mathematical Induction Part Two

The principle of mathematical induction states that if for some property P(n), we have that If it starts P(0) is true and and it keeps going For any n N, we have P(n) P(n + ) Then then it's always true. For any n N, P(n) is true.

n(n+ ) Theorem: For any natural number n, i= Proof: By induction. Let P(n) be 2 n n(n+ ) P(n) i= i= 2 For our base case, we need to show P(0) is true, meaning that 0 0(0+ ) i= i= 2 Since the empty sum is defined to be 0, this claim is true. n+ i= n i= n i= For the inductive step, assume that for some n N that P(n) holds, so n(n+ ) i= 2 We need to show that P(n + ) holds, meaning that n+ (n+ )(n+ 2) i= i= 2 To see this, note that n n(n+ ) n(n+ )+ 2(n+ ) (n+ )(n+ 2) i= i+ (n+ )= + n+ = = i= 2 2 2 Thus P(n + ) is true, completing the induction.

Induction in Practice Typically, a proof by induction will not explicitly state P(n). Rather, the proof will describe P(n) implicitly and leave it to the reader to fill in the details. Provided that there is sufficient detail to determine what P(n) is, that P(0) is true, and that whenever P(n) is true, P(n + ) is true, the proof is usually valid.

Theorem: For any natural number n, Proof: By induction on n. For our base case, if n = 0, note that and the theorem is true for 0. For the inductive step, assume that for some n the theorem is true. Then we have that n(n+ ) n(n+ )+ 2(n+ ) (n+ )(n+ 2) i+ (n+ )= + n+ = = 2 2 2 n+ i= n i= i= 0 i= i= so the theorem is true for n +, completing the induction. n i= 0(0+ ) =0 2 i= n(n+ ) 2

A Variant of Induction

n 2 versus 2 n 0 2 = 0 2 = 2 2 = 4 3 2 = 9 4 2 = 6 5 2 = 25 6 2 = 36 7 2 = 49 8 2 = 64 9 2 = 8 0 2 = 00 < < = > = < < < < < < 2 n is much 2 0 = bigger here. 2 = 2 Does the trend 2 2 = 4 continue? 2 3 = 8 2 4 = 6 2 5 = 32 2 6 = 64 2 7 = 28 2 8 = 256 2 9 = 52 2 0 = 024

Theorem: For any natural number n 5, n 2 < 2 n. Proof: By induction on n. As a base case, if n = 5, then we have that 5 2 = 25 < 32 = 2 5, so the claim holds. For the inductive step, assume that for some n 5, that n 2 < 2 n. Then we have that (n + ) 2 = n 2 + 2n + Since n 5, we have (n + ) 2 = n 2 + 2n + < n 2 + 2n + n (since < 5 n) = n 2 + 3n < n 2 + n 2 (since 3n < 5n n 2 ) = 2n 2 So (n + ) 2 < 2n 2. Now, by our inductive hypothesis, we know that n 2 < 2 n. This means that (n + ) 2 < 2n 2 (from above) < 2(2 n ) (by the inductive hypothesis) = 2 n + Completing the induction.

Theorem: For any natural number n 5, n 2 < 2 n. Proof: By induction on n. As a base case, if n = 5, then we have that 5 2 = 25 < 32 = 2 5, so the claim holds. For the inductive step, assume that for some n 5, that n 2 < 2 n. Then we have that (n + ) 2 = n 2 + 2n + Since n 5, we have Why (n + ) 2 = n 2 + 2n Why is + is this this < n 2 + 2n allowed? allowed? + n (since < 5 n) = n 2 + 3n < n 2 + n 2 (since 3n < 5n n 2 ) = 2n 2 So (n + ) 2 < 2n 2. Now, by our inductive hypothesis, we know that n 2 < 2 n. This means that (n + ) 2 < 2n 2 (from above) < 2(2 n ) (by the inductive hypothesis) = 2 n + Completing the induction.

Why is this Legal? Let P(n) be Either n < 5 or n 2 < 2 n. P(0) is trivially true. P() is trivially true, so P(0) P() P(2) is trivially true, so P() P(2) P(3) is trivially true, so P(2) P(3) P(4) is trivially true, so P(3) P(4) We explicitly proved P(5), so P(4) P(5) For any n 5, we explicitly proved that P(n) P(n + ). Thus P(0) and for any n N, P(n) P(n + ), so by induction P(n) is true for all natural numbers n.

Induction Starting at k To prove that P(n) is true for all natural numbers greater than or equal to k: Show that P(k) is true. Show that for any n k, that P(n) P(n + ). Conclude P(k) holds for all natural numbers greater than or equal to k. You don't need to justify why it's okay to start from k.

An Important Observation

One Major Catch 0 2 3 4 5 6 7 8 In In an an inductive inductive proof, proof, to to prove prove P(5), P(5), we we can can only only assume assume P(4). P(4). We We cannot cannot rely rely on on any any of of our our earlier earlier results! results!

Strong Induction

The principle of strong induction states that if for some property P(n), we have that Assume Assume that that P(n) P(n) holds holds for for all all natural natural numbers numbers smaller smaller than than n. n. P(0) is true and For any n N with n 0, if P(n') is true for all n' < n, then P(n) is true then For any n N, P(n) is true.

Using Strong Induction 0 2 3 4 5 6 7 8

Induction and Dominoes

Strong Induction and Dominoes

Weak and Strong Induction Weak induction (regular induction) is good for showing that some property holds by incrementally adding in one new piece. Strong induction is good for showing that some property holds by breaking a large structure down into multiple small pieces.

Proof by Strong Induction State that you are attempting to prove something by strong induction. State what your choice of P(n) is. Prove the base case: State what P(0) is, then prove it. Prove the inductive step: State that you assume for all 0 n' < n, that P(n') is true. State what P(n) is. (this is what you're trying to prove) Go prove P(n).

Application: Binary Numbers

Binary Numbers The binary number system is base 2. Every number is represented as s and 0s encoding various powers of two. Examples: 00 2 = 2 2 + 0 2 + 0 2 0 = 4 0 2 = 2 4 + 2 3 + 0 2 2 + 2 + 2 0 = 27 Enormously useful in computing; almost all computers do computation on binary numbers. Question: How do we know that every natural number can be written in binary?

Justifying Binary Numbers To justify the binary representation, we will prove the following result: Every natural number n can be expressed as the sum of distinct powers of two. This says that there's at least one way to write a number in binary; we'd need a separate proof to show that there's exactly one way to do it. So how do we prove this?

One Proof Idea 0 6 8 2

General Idea Repeatedly subtract out the largest power of two less than the number. Can't subtract 2 n twice for any n; otherwise, you could have subtracted 2 n+. Eventually, we reach 0; the number is then the sum of the powers of two that we subtracted. How do we formalize this as a proof?

Theorem: Every n N is the sum of distinct powers of two. Proof: By strong induction. Let P(n) be n is the sum of distinct powers of two. We prove that P(n) is true for all n N. As our base case, we prove P(0), that 0 is the sum of distinct powers of 2. Since the empty sum of no powers of 2 is equal to 0, P(0) holds. For the inductive step, assume that for some nonzero n N, that for any n' N where 0 n' < n, that P(n') holds and n' is the sum of distinct powers of two. We prove P(n), that n is the sum of distinct powers of two. Let 2 k be the greatest power of two such that 2 k n. Consider n 2 k. Since 2 k for any natural number k, we know that n 2 k < n. Since 2 k n, we know Notice 0 n 2 k. Thus, by our inductive hypothesis, n 2 Notice the the stronger stronger version version of of k is the sum of distinct powers of two. If S be the set of these powers of two, then n is the the sum the induction of induction these powers hypothesis. hypothesis. of two and 2 k. If we can show that We're We're 2 k now S, now we showing showing will have that that n P(n') P(n') is the is sum is of distinct powers of two (namely, true the elements of S and 2 k ). Then P(n) will hold, completing the induction. true for for all all natural natural numbers numbers in in the We show 2 k S by the range contradiction; range 0 assume n' n' < n. that n. We'll 2We'll k S. Since 2 k S and the sum of the powers use use of two this this in fact S fact is n later later 2 k, this on. on. means that 2 k n 2 k. Thus 2 k + 2 k n, so 2 k + n. This contradicts that 2 k is the largest power of two no greater than n. We have reached a contradiction, so our assumption was wrong and 2 k S, as required.

Theorem: Every n N is the sum of distinct powers of two. Proof: By strong induction. Let P(n) be n is the sum of distinct powers of two. We prove that P(n) is true for all n N. As our base case, we prove P(0), that 0 is the sum of distinct powers of 2. Since the empty sum of no powers of 2 is equal to 0, P(0) holds. For the inductive step, assume that for some nonzero n N, that for any n' N where 0 n' < n, that P(n') holds and n' is the sum of distinct powers of two. We prove P(n), that n is the sum of distinct powers of two. Let 2 k be the greatest power of two such that 2 k n. Consider n 2 k. Since 2 k for any natural number k, we know that n 2 k < n. Since 2 k n, we know Here's 0 n 2 k. Thus, by our inductive hypothesis, n 2 k is the sum of Here's the distinct powers the key key step of two. step of If of the S be the proof. the proof. set of these powers of two, then n is the sum If If of we we these can can powers show show of that that two and 2 k. If we can show that 2 k S, we will have that n is the sum of distinct powers of two (namely, the 0 elements of S and 2 k ). Then P(n) will hold, n 2 k completing the induction. k < n We show 2 k S by then then contradiction; we we can can use use assume the the that inductive inductive 2 k S. Since 2 k S and the sum of the powers of two in S is n 2 k, this means that 2 k n 2 k. hypothesis Thus 2 k + 2 k hypothesis to n, so 2 k + to claim n. claim that This contradicts that n 2 that k k is is a 2 k a is the largest power of two no sum sum greater of of distinct than distinct n. We powers powers have reached of of two. two. a contradiction, so our assumption was wrong and 2 k S, as required.

Theorem: Every n N is the sum of distinct powers of two. Proof: By strong induction. Let P(n) be n is the sum of distinct powers of two. We prove that P(n) is true for all n N. As our base case, we prove P(0), that 0 is the sum of distinct powers of 2. Since the empty sum of no powers of 2 is equal to 0, P(0) holds. For the inductive step, assume that for some nonzero n N, that for any n' N where 0 n' < n, that P(n') holds and n' is the sum of distinct powers of two. We prove P(n), that n is the sum of distinct powers of two. Let 2 k be the greatest power of two such that 2 k n. Consider n 2 k. Since 2 k for any natural number k, we know that n 2 k < n. Since 2 k n, we know 0 n 2 k. Thus, by our inductive hypothesis, n 2 k is the sum of distinct powers of two. If S be the set of these powers of two, then n is the sum of these powers of two and 2 k. If we can Here Here show is is that where where 2 k strong S, strong we will induction induction have that n kicks kicks is the in. in. sum of We We distinct powers use of two (namely, the elements of S and 2 k ). Then P(n) will hold, completing use the the the fact induction. fact that that any any smaller smaller number number can can be be written We show written as 2 k S by as the contradiction; the sum sum of of distinct assume distinct powers that powers of 2 k S. Since of two two 2 k S and the sum to to of show show the powers that that n of two 2 k k in can can S is be n be 2written k, this means as as the the that sum sum 2 k n 2 k. Thus 2 k + 2 k n, so of 2 k + n. This contradicts that 2 k is the largest power of two no greater of distinct distinct powers than n. powers of We have reached of two. two. a contradiction, so our assumption was wrong and 2 k S, as required.

Theorem: Every n N is the sum of distinct powers of two. Proof: By strong induction. Let P(n) be n is the sum of distinct powers of two. We prove that P(n) is true for all n N. As our base case, we prove P(0), that 0 is the sum of distinct powers of 2. Since the empty sum of no powers of 2 is equal to 0, P(0) holds. For the inductive step, assume that for some nonzero n N, that for any n' N where 0 n' < n, that P(n') holds and n' is the sum of distinct powers of two. We prove P(n), that n is the sum of distinct powers of two. Let 2 k be the greatest power of two such that 2 k n. Consider n 2 k. Since 2 k for any natural number k, we know that n 2 k < n. Since 2 k n, we know 0 n 2 k. Thus, by our inductive hypothesis, n 2 k is the sum of distinct powers of two. If S be the set of these powers of two, then n is the sum of the elements of S and 2 k. If we can show that 2 k S, we will have that n is the sum of distinct powers of two (namely, the elements of S and 2 k ). Then P(n) will hold, completing the induction. We show 2 k S by contradiction; assume that 2 k S. Since 2 k S and the sum of the powers of two in S is n 2 k, this means that 2 k n 2 k. Thus 2 k + 2 k n, so 2 k + n. This contradicts that 2 k is the largest power of two no greater than n. We have reached a contradiction, so our assumption was wrong and 2 k S, as required.

Theorem: Every n N is the sum of distinct powers of two. Proof: By strong induction. Let P(n) be n is the sum of distinct powers of two. We prove that P(n) is true for all n N. As our base case, we prove P(0), that 0 is the sum of distinct powers of 2. Since the empty sum of no powers of 2 is equal to 0, P(0) holds. For the inductive step, assume that for some nonzero n N, that for any n' N where 0 n' < n, that P(n') holds and n' is the sum of distinct powers of two. We prove P(n), that n is the sum of distinct powers of two. Let 2 k be the greatest power of two such that 2 k n. Consider n 2 k. Since 2 k for any natural number k, we know that n 2 k < n. Since 2 k n, we know 0 n 2 k. Thus, by our inductive hypothesis, n 2 k is the sum of distinct powers of two. If S be the set of these powers of two, then n is the sum of the elements of S and 2 k. If we can show that 2 k S, we will have that n is the sum of distinct powers of two (namely, the elements of S and 2 k ). Then P(n) will hold, completing the induction. We show 2 k S by contradiction; assume that 2 k S. Since 2 k S and the sum of the powers of two in S is n 2 k, this means that 2 k n 2 k. Thus 2 k + 2 k n, so 2 k + n. This contradicts that 2 k is the largest power of two no greater than n. We have reached a contradiction, so our assumption was wrong and 2 k S, as required.

Application: Continued Fractions

Continued Fractions 4 + + 2

Continued Fractions A continued fraction is an expression of the form a + a 2 + a 3 +...+ a n Formally, a continued fraction is either An integer n, or n + / F, where n is an integer and F is a continued fraction. Continued fractions have numerous applications in number theory and computer science. (They're also really fun to write!)

Fun with Continued Fractions Every rational number, including negative rational numbers, has a continued fraction representation. Harder result: every irrational number has an (infinite) continued fraction representation. Even harder result: If we truncate an infinite continued fraction for an irrational number, we can get progressively better approximations of that number.

π as a Continued Fraction π=3+ 7+ 5+ + + 292+ + + + 2+...

Approximating π π=3+ 7+ 5+ + 292 3 = 3.0000... And And he he made made the the Sea Sea of of cast cast bronze, bronze, ten ten cubits cubits from from one one brim brim to to the the other; other; it it was was completely completely round. round. [ [ A] A] line line of of thirty thirty cubits cubits measured measured its its circumference. Kings Kings 7:23, 7:23, New New King King James James Translation Translation

Approximating π π=3+ 7+ 5+ + 292 3 = 3.0000... 22/7 = 3.42857... Greek Greek mathematician Archimedes knew knew of of this this approximation, circa circa 250 250 BCE BCE

Approximating π π=3+ 7+ 5+ + 292 3 = 3.0000... 22/7 = 3.42857... 336/06 = 3.45094... 355/3 = 3.459292... Chinese Chinese mathematician mathematician 祖沖之祖沖之 (Zu (Zu Chongzhi) Chongzhi) discovered discovered this this approximation approximation in in the the early early fifth fifth century; century; this this was was the the best best approximation approximation of of pi pi for for over over a a thousand thousand years. years.

Approximating π π=3+ 7+ 5+ + 292 3 = 3.0000... 22/7 = 3.42857... 336/06 = 3.45094... 355/3 = 3.459292... 03993/3302 = 3.45926530...

More Continued Fractions 3 The The Ancient Ancient Greeks Greeks knew knew about about this this connection. connection. 4 They They called called this this procedure procedure anthyphairesis. anthyphairesis. 3 4 = 4 + + 2

An Interesting Continued Fraction x=+ + + + + + + + + +...

An Interesting Continued Fraction x=+ + + + + + + / 2 / 3 / 2 5 / 3 8 / 5 3 / 8 2 / 3 34 / 2 Each fraction is the ratio of consecutive Fibonacci numbers!

The Golden Ratio ϕ= + 5 2 =+ + + +... ϕ.6803399

The Golden Ratio

The Golden Spiral

How do we prove all rational numbers have continued fractions?

Constructing a Continued Fraction 7 0+ 9 = 9 7 9 7 = + 7 2 7 2 = 3+ 2

Constructing a Continued Fraction 7 0+ 9 = + 3+ 2

Constructing a Continued Fraction 7 9 9 = 0+ + 3+ 2 7 7 2 9 > 7 > 2 > 2

The Division Algorithm For any integers a and b, with b > 0, there exists unique integers q and r such that and a = qb + r 0 r < b q is the quotient and r is the remainder. Given a = and b = 4: = 2 4 + 3 Given a = -37 and b = 42: -37 = -4 42 + 3

Theorem: Every rational has a continued fraction. Proof: By strong induction. Let P(d) be any rational with denominator d has a continued fraction. We prove that P(d) is true for all positive natural numbers. Since all rationals can be written with a positive denominator, this proves that all rationals have continued fractions. For our base case, we prove P(), that any rational with denominator has a continued fraction. Consider any rational with denominator ; let it be n /. Since n is a continued fraction and n = n /, P() holds. For our inductive step, assume that for some d N with d >, that for any d' N where d' < d, that P(d') is true, so any rational with denominator d' has a continued fraction. We prove P(d) by showing that any rational with denominator d has a continued fraction. Take any rational with denominator d; let it be n / d. Using the division algorithm, write n = qd + r, where 0 r < d. We consider two cases: Case : r = 0. Then n = qd, so n / d = q. Then q is a continued fraction for n / d. n Case 2: r 0. Given that n = qd + r, we have d =q+ r d =q+ d /r. Since r < d, by our inductive hypothesis there is some continued fraction for d / r; call it F. Then q + / F is a continued fraction for n / d. In either case, we find a continued fraction for n / d, so P(d) holds, completing the induction.

For more on continued fractions: http://www.maths.surrey.ac.uk/hosted-sites/r.knott/fibonacci/cfintro.html

Next Time Graphs and Relations Representing structured data. Categorizing how objects are connected.