CSE 311 Foundations of Computing I

Slides:



Advertisements
Similar presentations
22C:19 Discrete Structures Induction and Recursion Fall 2014 Sukumar Ghosh.
Advertisements

MA/CSSE 473/474 How (not) to do an induction proof.
Induction and recursion
1.  The set N = {1,2,3,4,……..} is known as natural numbers or the set of positive integers  The natural numbers are used mainly for :  counting  ordering.
1 Intro to Induction Supplementary Notes Prepared by Raymond Wong Presented by Raymond Wong.
TR1413: INTRO TO DISCRETE MATHEMATICS LECTURE 2: MATHEMATICAL INDUCTION.
EE1J2 - Slide 1 EE1J2 – Discrete Maths Lecture 12 Number theory Mathematical induction Proof by induction Examples.
Copyright © Cengage Learning. All rights reserved.
CSE 311 Foundations of Computing I Lecture 12 Primes, GCD, Modular Inverse Spring
CSE 311 Foundations of Computing I Lecture 6 Predicate Logic, Logical Inference Spring
Module :MA3036NI Cryptography and Number Theory Lecture Week 7
Mathematical Induction. F(1) = 1; F(n+1) = F(n) + (2n+1) for n≥ F(n) n F(n) =n 2 for all n ≥ 1 Prove it!
CSE 311: Foundations of Computing Fall 2013 Lecture 8: More Proofs.
CSE 311 Foundations of Computing I Lecture 15 Recursive Definitions and Structural Induction Autumn 2011 CSE 3111.
CSE 311 Foundations of Computing I Lecture 16 Recursively Defined Sets and Structural Induction Spring
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 Mathematical Induction 4.2 Strong Induction and Well-Ordering 4.3 Recursive Definitions and Structural Induction 4.4 Recursive Algorithms.
Chinese Remainder Theorem Dec 29 Picture from ………………………
CompSci 102 Discrete Math for Computer Science March 1, 2012 Prof. Rodger Slides modified from Rosen.
Induction & Recursion Weiss: ch 7.1. Recursion –a programming strategy for solving large problems –Think “divide and conquer” –Solve large problem by.
CSE 311 Foundations of Computing I Lecture 9 Proofs and Set Theory Autumn 2012 CSE
CSE 311 Foundations of Computing I Lecture 14 Euclid’s Algorithm Mathematical Induction Autumn 2012 CSE
CSE373: Data Structures and Algorithms Lecture 2: Proof by Induction Linda Shapiro Winter 2015.
INDUCTION Slides of Ken Birman, Cornell University.
Mathematical Induction
CSE 311: Foundations of Computing Fall 2013 Lecture 12: Primes, GCD, modular inverse.
CSE 311: Foundations of Computing Fall 2013 Lecture 8: Proofs and Set theory.
CS Discrete Mathematical Structures Mehdi Ghayoumi MSB rm 132 Ofc hr: Thur, 9:30-11:30a.
Chapter 5. Section 5.1 Climbing an Infinite Ladder Suppose we have an infinite ladder: 1.We can reach the first rung of the ladder. 2.If we can reach.
CSE 311 Foundations of Computing I Lecture 8 Proofs Autumn 2011 CSE 3111.
CSE 311 Foundations of Computing I Lecture 8 Proofs Autumn 2012 CSE
1 Discrete Mathematical Mathematical Induction ( الاستقراء الرياضي )
Induction and Recursion CSC-2259 Discrete Structures Konstantin Busch - LSU1.
CSE 311 Foundations of Computing I Lecture 15 Strong Induction and Recursive Definitions Spring
Mathematical Induction EECS 203: Discrete Mathematics Lecture 11 Spring
Foundations of Computing I CSE 311 Fall Announcements Homework #2 due today – Solutions available (paper format) in front – HW #3 will be posted.
Mathematical Induction I Lecture 19 Section 4.2 Mon, Feb 14, 2005.
Chapter 5 1. Chapter Summary  Mathematical Induction  Strong Induction  Recursive Definitions  Structural Induction  Recursive Algorithms.
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
Induction (chapter of the book and chapter of the notes)
CSE 311 Foundations of Computing I
Advanced Algorithms Analysis and Design
CSE 311 Foundations of Computing I
CS2210:0001Discrete Structures Induction and Recursion
CSE 311: Foundations of Computing
CSE 311 Foundations of Computing I
Methods of Proof A mathematical theorem is usually of the form pq
CSE373: Data Structures and Algorithms Lecture 2: Proof by Induction
CSE373: Data Structures and Algorithms Lecture 2: Proof by Induction
CSE 311 Foundations of Computing I
Discrete Math for CS CMPSC 360 LECTURE 12 Last time: Stable matching
BaSIC Math Reviews.
Induction and recursion
CSE 311: Foundations of Computing
CSE 311: Foundations of Computing
CSE 373 Data Structures and Algorithms
Mathematical Induction I
Applied Discrete Mathematics Week 9: Integer Properties
Direct Proof and Counterexample I
Topic Past Papers –Proofs
CSE 373 Optional Section Led by Yuanwei, Luyi Apr
Induction Chapter
Advanced Analysis of Algorithms
Mathematical Induction
Mathematical Induction
CSE 321 Discrete Structures
CSE 311 Foundations of Computing I
Useful GCD Fact If a and b are positive integers, then gcd(a,b) = gcd(b, a mod b) Proof: By definition of mod, a = qb+ (a mod b) for.
CSE 311 Foundations of Computing I
CSE 311 Foundations of Computing I
Presentation transcript:

CSE 311 Foundations of Computing I Lecture 13 Mathematical Induction Spring 2013

Announcements Reading assignment 5.1-5.2 7th Edition Today’s lecture: 5.1 (7th), 4.1 (6th)

Highlights from last lecture Greatest common divisor (gcd) Definition and computation via prime factorization Euclid’s algorithm 78 = 2 • 33 + 12 33 = 2 • 12 + 9 12 = 1 • 9 + 3 9 = 3 • 3 so gcd(78,33)=3 Bézoit: ∃ s,t such that gcd(a,m)=sa+tm E.g. 3=1•12 - 1•9 =1•12 - 1•(33 - 2•12) = -1•33 +3•12 = -1•33 + 3•(78 - 2•33) = 3•78 - 7•33

Highlights from last lecture Solving Modular Equations Solving ax ≡ b (mod m) for unknown x when gcd(a,m)=1. Find s such that sa+tm=1 Compute a-1= s mod m, the multiplicative inverse of a modulo m Set x = (a-1 • b) mod m

Solve 7x mod 26 = 1 Hint: 3∙26−11∙7=1

Mathematical Induction Method for proving statements about all integers n ≥ 0 Part of sound logical inference that applies only in the domain of integers Not like scientific induction which is more like a guess from examples Particularly useful for reasoning about programs since the statement might be “after n times through this loop, property P(n) holds”

Finding a Pattern 20 - 1 = 1 - 1 = 0 = 3 • 0 22 - 1 = 4 - 1 = 3 = 3 • 1 24 - 1 = 16 - 1 = 15 = 3 • 5 26 - 1 = 64 - 1 = 63 = 3 • 21 28 - 1 = 256 - 1 = 255 = 3 • 85 …

How do you prove it? Want to prove 3 | 22n -1 for all integers n  0 ... Examples to show its true P(0) P(k)  P(k+1)

Induction as a rule of Inference Domain: integers ≥ 0: P(0)  k (P(k)  P(k+1))   n P(n) Formal steps Show P(0) Assume P(k), Prove P(k+1), Conclude P(k) P(k+1) Conclude  k (P(k) P(k+1)) Conclude  n P(n)

How would we use the induction rule in a formal proof?  k (P(k)  P(k+1))   n P(n) 1. Prove P(0) Let k be an arbitrary integer ≥ 0 3. Assume that P(k) is true 4. ... 5. Prove P(k+1) is true P(k)  P(k+1) Direct Proof Rule 7.  k (P(k)  P(k+1)) Intro  from 2-6 8.  n P(n) Induction Rule 1&7

How would we use the induction rule in a formal proof?  k (P(k)  P(k+1))   n P(n) Base Case 1. Prove P(0) Let k be an arbitrary integer ≥ 0 3. Assume that P(k) is true 4. ... 5. Prove P(k+1) is true P(k)  P(k+1) Direct Proof Rule 7.  k (P(k)  P(k+1)) Intro  from 2-6 8.  n P(n) Induction Rule 1&7 Inductive Hypothesis Inductive Step Conclusion

5 Steps to Inductive Proofs in English Proof: 1. “By induction we will show that P(n) is true for every n≥0” 2. “Base Case:” Prove P(0) 3. “Inductive Hypothesis: Assume that P(k) is true for some arbitrary integer k ≥ 0” 4. “Inductive Step:” Want to prove that P(k+1) is true: Use the goal to figure out what you need. Make sure you are using I.H. and point out where you are using it. (Don’t assume P(k+1)!) 5. “Conclusion: Result follows by induction”

Induction Example Want to prove 3 | 22n -1 for all n  0 Examples to show its true P(0) P(k)  P(k+1)

1 + 2 + 4 + … + 2n = 2n+1 – 1 for all n ≥ 0

1+2+...+n =  i = n(n+1)/2 for all n≥1

Harmonic Numbers for all 𝑛 ≥ 1

Cute Application: Checkerboard Tiling with Trinominos Prove that a 2n  2n checkerboard with one square removed can be tiled with: