Lecture Overview. 2 Weak Induction

Similar documents
INDUCTION AND RECURSION. Lecture 7 - Ch. 4

Lecture 6 : Induction DRAFT

Induction. Induction. Induction. Induction. Induction. Induction 2/22/2018

1 Examples of Weak Induction

Discrete Mathematics and Probability Theory Fall 2013 Vazirani Note 1

Mathematical Induction

Reading 5 : Induction

Climbing an Infinite Ladder

Example. How to Guess What to Prove

Mathematical Induction. EECS 203: Discrete Mathematics Lecture 11 Spring

Notes on induction proofs and recursive definitions

Discrete Mathematics. Spring 2017

MATH 55 - HOMEWORK 6 SOLUTIONS. 1. Section = 1 = (n + 1) 3 = 2. + (n + 1) 3. + (n + 1) 3 = n2 (n + 1) 2.

Proof Techniques (Review of Math 271)

What can you prove by induction?

Chapter 2. Mathematical Reasoning. 2.1 Mathematical Models

Module 9: Mathematical Induction

Discrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 3

1 Proof by Contradiction

The Inductive Proof Template

Solution Set 2. Problem 1. [a] + [b] = [a + b] = [b + a] = [b] + [a] ([a] + [b]) + [c] = [a + b] + [c] = [a + b + c] = [a] + [b + c] = [a] + ([b + c])

CISC-102 Fall 2017 Week 3. Principle of Mathematical Induction

Lecture 12 : Recurrences DRAFT

Math 192r, Problem Set #3: Solutions

CSC 344 Algorithms and Complexity. Proof by Mathematical Induction

PRINCIPLE OF MATHEMATICAL INDUCTION

Sum of Squares. Defining Functions. Closed-Form Expression for SQ(n)

CS173 Strong Induction and Functions. Tandy Warnow

MATH 324 Summer 2011 Elementary Number Theory. Notes on Mathematical Induction. Recall the following axiom for the set of integers.

b + O(n d ) where a 1, b > 1, then O(n d log n) if a = b d d ) if a < b d O(n log b a ) if a > b d

Math1a Set 1 Solutions

Discrete Mathematics. Spring 2017

CS 246 Review of Proof Techniques and Probability 01/14/19

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

n(n + 1). 2 . If n = 3, then 1+2+3=6= 3(3+1) . If n = 2, then = 3 = 2(2+1)

Mathematical Induction. Section 5.1

Notes from How to Prove it: A Structured Approach by Daniel J. Velleman

Discrete Mathematics & Mathematical Reasoning Induction

Mathematical Induction

CS 220: Discrete Structures and their Applications. Mathematical Induction in zybooks

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

CSE 311: Foundations of Computing. Lecture 14: Induction

Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes

Introducing Proof 1. hsn.uk.net. Contents

Lecture #21. c T x Ax b. maximize subject to

Mathematical Induction

CS1800: Strong Induction. Professor Kevin Gold

CSE 20. Final Review. CSE 20: Final Review

Math.3336: Discrete Mathematics. Mathematical Induction

Nondeterministic finite automata

Show Your Work! Point values are in square brackets. There are 35 points possible. Some facts about sets are on the last page.

Lecture 2: Continued fractions, rational approximations

SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION

Lecture 17: Trees and Merge Sort 10:00 AM, Oct 15, 2018

Lecture 8 : Structural Induction DRAFT

Discrete Mathematics and Probability Theory Spring 2016 Rao and Walrand Note 3

ASSIGNMENT 1 SOLUTIONS

Day 6. Tuesday May 29, We continue our look at basic proofs. We will do a few examples of different methods of proving.

Climbing an Infinite Ladder

Chapter 2 Section 2.1: Proofs Proof Techniques. CS 130 Discrete Structures

Before you get started, make sure you ve read Chapter 1, which sets the tone for the work we will begin doing here.

CS1800: Mathematical Induction. Professor Kevin Gold

Conjectures and proof. Book page 24-30

Proofs: A General How To II. Rules of Inference. Rules of Inference Modus Ponens. Rules of Inference Addition. Rules of Inference Conjunction

Math 324 Summer 2012 Elementary Number Theory Notes on Mathematical Induction

3 The language of proof

Discrete Mathematics for CS Spring 2008 David Wagner Note 4

Proofs. Joe Patten August 10, 2018

2 Lecture 2: Logical statements and proof by contradiction Lecture 10: More on Permutations, Group Homomorphisms 31

Complete Induction and the Well- Ordering Principle

CMPSCI 250: Introduction to Computation. Lecture 11: Proof Techniques David Mix Barrington 5 March 2013

Proofs. Introduction II. Notes. Notes. Notes. Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry. Fall 2007

MAT 300 RECITATIONS WEEK 7 SOLUTIONS. Exercise #1. Use induction to prove that for every natural number n 4, n! > 2 n. 4! = 24 > 16 = 2 4 = 2 n

We want to show P (n) is true for all integers

MA103 STATEMENTS, PROOF, LOGIC

Mathematical Induction. How does discrete math help us. How does discrete math help (CS160)? How does discrete math help (CS161)?

MAS114: Solutions to Exercises

CIS Spring 2018 (instructor Val Tannen)

Solutions to odd-numbered exercises Peter J. Cameron, Introduction to Algebra, Chapter 2

Section 4.2: Mathematical Induction 1

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

Math 13, Spring 2013, Lecture B: Midterm

CSC236 Week 3. Larry Zhang

CS 173: Induction. Madhusudan Parthasarathy University of Illinois at Urbana-Champaign. February 7, 2016

MEETING 9 - INDUCTION AND RECURSION

Seunghee Ye Ma 8: Week 2 Oct 6

PRACTICE PROBLEMS: SET 1

CDM. Recurrences and Fibonacci

Logic, Sets, and Proofs

Definition 2.3. We define addition and multiplication of matrices as follows.

Lecture 6: Finite Fields

Theoretical Cryptography, Lecture 13

One-to-one functions and onto functions

Proof worksheet solutions

Solving Diophantine Equations With Unique Factorization

CDM. Recurrences and Fibonacci. 20-fibonacci 2017/12/15 23:16. Terminology 4. Recurrence Equations 3. Solution and Asymptotics 6.

Discrete Mathematics for CS Fall 2003 Wagner Lecture 3. Strong induction

Fall 2017 Test II review problems

Combinatorics. But there are some standard techniques. That s what we ll be studying.

REVIEW PROBLEMS FOR SECOND 3200 MIDTERM

Transcription:

COMPSCI 30: Discrete Mathematics for Computer Science February 18, 019 Lecturer: Debmalya Panigrahi Lecture 11 Scribe: Kevin Sun 1 Overview In this lecture, we study mathematical induction, which we often use to prove that every nonnegative integer satisfies some given property Induction comes in two forms weak and strong and we will see their differences, as well as examples of both Weak Induction We begin by studying weak (also known as ordinary) induction Suppose we want to prove that some predicate P(n) is true for every number in Z + 0, the set of nonnegative integers We first state the driving principle behind weak induction, which is that the following implication is true: [P(0) ( n P(n) P(n + 1) ) ] [ n P(n)], where the universe of n is Z + 0 Notice that the consequence (the part after the second ) of the above implication is what we want to prove So if we can prove the antecedent (the part before the second ), then since the entire implication is true, we would be done Proving the antecedent requires proving two things: P(0) and, for every n Z + 0, P(n) P(n + 1) The first proposition is known as the base case, and the second is known as the inductive step Now why is the implication true? If the antecedent is true, then P(0) is true, and furthermore, P(0) P(1) is true, so P(1) is true Continuing, since P(1) and P(1) P() are true, we can conclude P() is also true Thus, through this chain of implications, we can conclude P(n) is true for every n Z + 0, as desired We now illustrate weak induction with an example Theorem 1 For any n Z + 0, the following holds: n i = i=0 In this theorem, we have P(n) = i=0 n i = /, so the theorem states n Z + 0 P(n) We shall now prove Theorem 1 using ordinary induction Proof Recall that in ordinary induction, we must prove the following things: P(0) and n Z + 0 P(n) P(n + 1) 11-1

Base case: P(0) is true because both sides of the equality in P(0) are equal to 0: 0 i = 0 = i=0 0(0 + 1) Inductive Step: We now show P(n) P(n + 1) for every n Z + 0 Let n be any nonegative integer, and assume P(n) is true This assumption is known as the inductive hypothesis In our case, assuming P(n) is true is equivalent to assuming n i = is true We want to use this inductive hypothesis to prove P(n + 1), which is the following: n+1 i = The left side of P(n + 1) can be written as follows: (n + 1)(n + ) n+1 i = 1 + + + (n 1) + n + (n + 1) n = i + (n + 1) = + (n + 1) (by the inductive hypothesis) ( n ) = (n + 1) + 1 = (n + 1)(n + ) This final expression is the right side of P(n + 1) Thus, by assuming P(n) is true, we have shown that P(n + 1) is true By the principle of induction, we can conclude that P(n) is true for all n Z + 0 To summarize, a proof by weak induction that proves a predicate P(n) for n Z + 0 following steps: has the 1 Base Case: Prove that P(0) is true Inductive Hypothesis: Precisely state the hypothesis that P(n) is true 3 Inductive Step: Prove that P(n + 1) is true using the inductive hypothesis Now let s see an example of induction being used incorrectly Claim (Incorrect) In any set of n nonnegative integers, all of the elements are equal to each other 11-

Proof of Claim : Here, the predicate P(n) is simply the statement of the claim Base Case: A set with 0 elements contains no elements, so they are all equal to each other, so P(0) is true Inductive Hypothesis: In any set of n natural numbers, all elements of a set are equal Inductive Step: We want to show that if S is a set containing n + 1 nonnegative integers, then all elements of S are equal to each other Let a and b be two distinct (different) elements of S, and consider the subsets S 1 = S \ {a} and S = S \ {b} Since S 1 and S are sets of size n, we can apply our inductive hypothesis on each and conclude that all elements of S 1 are equal to each other, and all elements of S are equal to each other Now let c be any element in S 1 S Since a and c are both in S 1, the induction hypothesis tells us a = c Similarly, b and c are both in S, so b = c Thus, a = b = c and in fact, every element of S 1 S is equal to c as well Thus, every element of S = S 1 {a} is equal to the value of c What went wrong? We assumed the existence of c If n = 1, then S 1 =, so we cannot find a c that s in both S 1 and S In fact, when n = 1, we cannot even find two distinct elements of S Thus, we did not prove the proposition P(0) P(1), so we have not met the conditions for ordinary induction 3 Strong Induction Now we will introduce a more general version of induction known as strong induction The driving principle behind strong induction is the following proposition which is quite similar to that behind weak induction: [ P(0) ( n (P(0) P(1) P(n)) P(n + 1) )] [ n P(n)], Again, the universe of n is Z + 0 Notice that this is similar to weak induction: the conclusion is the same, we still have P(0) as a base case, and the second part of the antecedent is also an implication This time, however, the antecedent of the implication is P(0) P(1) P() P(n) Recall that in weak induction, the antecedent was only P(n) This means that strong induction allows us to assume n predicates are true, rather than just 1, when proving P(n + 1) is true For example, in ordinary induction, we must prove P(3) is true assuming P() is true But in strong induction, we must prove P(3) is true assuming P(1) and P() are both true Note that any proof by weak induction is also a proof by strong induction it just doesn t make use of the remaining n 1 assumptions We now proceed with examples Recall that a positive integer has a prime factorization if it can be expressed as the product of prime numbers Theorem 3 Any positive integer greater than 1 has a prime factorization Proof Here, the predicate we want to prove is P(n) = n has a prime factorization Base case: Note that the base case is n =, because the claim does not apply when n {0, 1} Since itself is prime, we can conclude P() is true Inductive hypothesis: Every integer between and n (including and n) has a prime factorization 11-3

Inductive step: Let n + 1 be any positive integer greater than 1 If n + 1 is prime, then n + 1 itself is a prime factorization of n Otherwise, n + 1 = a b where a, b {,, n} Since a and b are between and n, the inductive hypothesis tells us that a and b each have a prime factorization, so they can be expressed as the product of prime numbers Since n + 1 is the product of a and b, this implies n + 1 can also be expressed as the product of prime numbers, so P(n + 1) is true Note: It would be much more difficult to prove Theorem 3 using weak induction, because we don t know how small a and b might be With weak induction, we would only know n has a prime factorization, but it is entirely possible (and always true) that a and b are less than n Now let s consider a second example Suppose all of the students in COMPSCI 30 are participating in a tournament Each game is played between two players (eg, Tic-tac-toe) The tournament is structured as follows: first, the instructor splits all of the students into two groups, called Group 1 and Group (The size of the groups can be anything greater than zero) The instructor then has everybody in Group 1 play everybody in Group exactly once Then, the instructor splits Group 1 into two groups (again, with arbitrary sizes), and every student of each group plays every student of the other group The instructor does the same for Group This process continues until every group has one student For example, suppose there are 6 students and the instructor creates groups of size and 4 This creates 4 = 8 games Then the group of gets split into 1 and 1, creating 1 game The group of 4 gets split into 1 and 3, creating 3 games This group of 3 then gets split into 1 and, creating games Finally, this group of gets split into 1 and 1, creating 1 game Thus, the total number of games played is 8 + 1 + 3 + + 1 = 15 If the initial split was size 3 and 3, then we would obtain a different list of numbers in the final sum However, the surprising result is the following: no matter how the instructor chooses to split each group, the total number of games created remains the same! In fact, let us determine the total number of games in terms of n If x and y are two students, then the moment x and y get split, they play each other once Afterwards, they never play each other again, because from then on, they only play students within their current group Thus, the total number of games is ( n ) = n(n 1)/ (Notice that in the example above, we indeed have 6(6 1)/ = 15 total games) We will now prove this fact using strong induction Theorem 4 If the splitting procedure described above is applied to a class of n students, then the total number of games played is always n(n 1)/, regardless of the sizes of the groups Proof We proceed by strong induction Base case: The instructor never forms a group of size 0, so the base case is n = 1 If there s only one student, then the total number of games played is 0, and 1(1 1)/ is indeed 0 Inductive hypothesis: For any x n, the total number of games that x students play (via any splitting procedure) is x(x 1)/ Note that we will assume P(1) P(n) and prove P(n + 1) Inductive step: Suppose the total number of students is n + 1, and the first split contains a group of size y and a group of size n + 1 y This results in y(n + 1 y) games Now we have two separate groups, and these groups never interact in the future Thus, we can apply the inductive hypothesis on each group and conclude that the first creates y(y 1)/ games while the second 11-4

creates (n + 1 y)(n y)/ games Thus, the total number of games is y(y 1) y(n + 1 y) + = ny + y y + y y + (n + 1 y)(n y) + n + n ny y + y = ny + y y + y y + n + n ny y + y = n + n = Note: Again, proving Theorem 4 using ordinary induction would be difficult, because in order to apply the inductive hypothesis, we would have to assume that the first split creates groups of size 1 and n, which may not be true Finally, let s look at the sequence of Fibonacci numbers, named after the Italian mathematician Fibonacci The sequence begins with 0 and 1, and then each term is the sum of the previous two terms More formally, the n-th Fibonacci number F(n) is defined as follows: F(0) = 0 F(1) = 1 F(n) = F(n 1) + F(n ) if n Theorem 5 Every third Fibonacci number is even, that is for all n 0, F(n) is even F(n + 3) is even Notice that the statement of Theorem 5 already suggests using strong induction Since F(n) is defined by the previous two terms (not one), proving Theorem 5 using ordinary induction would be much more difficult However, as we shall see, this proof does not make full use of the inductive hypothesis (unlike the proofs of Theorem 3 and 4) Proof We proceed by strong induction Base case: Here, the base case involves both n = 0 and n = 1 because of the way that Fibonacci numbers are defined For n = 0, we see that F(0) = 0 and F(0 + 3) = are both even For n = 1, we see that F(1) = 1 and F(4) = 3 are both odd In either case, we ve proven the predicate P(n) = F(n) is even F(n + 3) is even Inductive hypothesis: Assume P(1), P(),, P(n) are true In particular, this means P(n 1) and P(n) are both true Inductive step: Recall that if a and b are integers, then a + b is even [a is even b is even] (1) (It is straightforward to prove this by cases) Now consider F(n + 1) and notice the following: F(n + 1) is even F(n) + F(n 1) is even (definition of F(n + 1)) [F(n) is even F(n 1) is even] [F(n + 3) is even F(n + ) is even], (from (1) above) 11-5

where the final equivalence holds by the inductive hypothesis because we have assumed P(n) and P(n 1) are both true Continuing, the above is equivalent to F(n + 3) + F(n + ) is even (from (1) above) F(n + 4) is even (definition of F(n + 4)) Thus, we have shown that F(n + 1) is even if and only if F(n + 4) is even, which is exactly the statement P(n + 1) 4 Summary In this lecture, we studied both the weak and the strong versions of mathematical induction We also looked at their differences, saw how strong induction is easier to use in many situations than weak induction, and proved multiple theorems using induction 11-6