SlideShare a Scribd company logo
Proofs, Recursion and Analysis of
                      Algorithms



                     Mathematical
                     Structures for
                   Computer Science
                              Chapter 2




     Copyright © 2006 W.H. Freeman & Co. and modified by David Hyland-Wood, UMW 2010
     Section 2.2                                                Induction
Tuesday, February 9, 2010
Tuesday, February 9, 2010
Adding Another Proof Technique


        Proof Technique       Approach to prove P → Q                     Remarks

        Exhaustive Proof          Demonstrate P → Q              May only be used for finite
                                      for all cases                  number of cases

            Direct Proof          Assume P, deduce Q              The standard approach-
                                                                  usually the thing to try
             Proof by            Assume Qʹ′, derive Pʹ′         Use this Qʹ′ if as a hypothesis
            Contraposition                                          seems to give more
                                                                 ammunition then P would
             Proof by          Assume P Λ Qʹ′ , deduce a            Use this when Q says
           Contradiction            contradiction                   something is not true

            Serendipity       Not really a proof technique              Fun to know

          Mathematical       Prove P(1), assume P(k) and         An implication; very use
           Induction                prove P(k+1)                  for Computer Science
     Section 2.1
                                     for all cases Techniques
                                              Proof                                          13
Tuesday, February 9, 2010
Mathematical Induction
         ●   Mathematical induction looks like you are learning
             from experience (induction) but you are really
             applying a certain type of direct proof (deduction).
         ●   That’s why it is called “mathematical” induction.




                                                                    4
Tuesday, February 9, 2010
Principles of mathematical induction
         ●     First Principle:
         	

   P(1) is true
                                                     P(n) is true for all positive integers n
         	

   (∀k)P(k) true → P(k+1) true
         ●     Second Principle:
                   P(1) is true
                                                                 P(n) is true for all positive integers n
                   P(r) true for all r, 1≤r≤k → P(k+1) true


         ●     Major difference is in the second statement.
                   ■
                       Use the second principle when assuming P(k) is not enough to prove
                       P(k+1).
                   ■   Assuming P(r) for any r where 1≤ r ≤ k gives more ammunition to
                       prove the relation.
                   ■
                       Use second principle when the case k+1 depends on results further
                       back than k.

     Section 2.2                                     Induction                                    5
Tuesday, February 9, 2010
Example: First Principle of Induction
         ●     Prove that 1+2+22…+2n = 2n+1-1 for any n ≥ 1.
         ●     P(1) is the equation 1+2 = 21+1-1 or 3 = 22-1, which is true.
         ●     We take P(k) = 1+2+22…+2k = 2k+1-1 as the ?inductive hypothesis
               and try to establish P(k+1): 1+2+22…+2k+1 = 2k+1+1-1
         ●     Again, rewriting the sum on the left side of P(k+1) reveals how the
               inductive assumption can be used:
         	

   	

   1+2+22…+2k+1 = 1+2+22…+ 2k + 2k+1
         	

   	

   	

    	

         = 2k+1-1 + 2k+1
         	

   	

   	

    	

         = 2(2k+1)-1
         	

   	

   	

    	

         = 2k+1+1-1
         ●     Therefore,
         ! !         !            1+2+22…+2k+1 = 2k+1+1-1
         	

 and verifies P(k+1) and completes the proof.
     Section 2.2                                     Induction                 6
Tuesday, February 9, 2010
Example: First Principle of Induction
         ●     Prove that for any positive integer n, the number 22n-1 is
               divisible by 3.
         ●     The basis step is to show P(1), that 22(1)-1 = 4-1 = 3 is divisible
               by 3. Clearly this is true.
         ●     We assume that 22k-1 is divisible by 3,which means that
         	

   22k-1 = 3m for some integer m, or 22k = 3m+1.
         	

   We want to show that 22(k+1) -1 is divisible by 3.
         	

     22(k+1) -1 = 22k+2 -1
         	

   	

          = 22•22k-1
         	

   	

          = 22(3m+1) -1 (by the inductive hypothesis)
         	

   	

          = 12m+4 -1
         	

   	

          = 12m+3
         	

   	

          = 3(4m+1) where 4m+1 is an integer
         ●     Thus 22(k+1) -1 is divisible by 3.
     Section 2.2                                    Induction                        7
Tuesday, February 9, 2010
Example: Second Principle of Induction
         ●     Prove that the amount of postage greater than or equal to
               8 cents can be built using only 3-cent and 5-cent stamps.
         ●     Proof using the second principle of Induction
         ●     Hence, we have to prove that P(n) is true for n ≥ 8 where
               P(n) is the sum of 3 and 5 cent stamps used to make the
               n cents worth of postage.
                   ■
                       Base case: P(8) = 3 + 5 = 8 which is true.
                   ■
                       In this case we will have to establish additional cases to prove this. Hence,
                       establish two cases P(9) and P(10)
                   ■
                       P(9) = 3 + 3 + 3 = 9 and P(10) = 5 + 5
                   ■
                       Assume P(r) is true for any r, 8 ≤ r ≤ k and consider P(k+1)
                   ■
                       We have proved P(r) is true for r = 8,9,10
                   ■
                       So, lets assume k+1 ≥ 11
                   ■
                       If k+1 ≥ 11 then (k+1)-3= k-2 ≥ 8, hence, by inductive hypothesis, P(k-2)
                       is true.
                   ■
                       Hence, k-2 can be written as a sum of 3s and 5s. Adding an additional 3
                       results in k+1 as a sum of 3s and 5s.
                   ■
                       This verifies P(k+1) is true and hence verifies the proof.
     Section 2.2                                          Induction                                8
Tuesday, February 9, 2010
Mathematical Induction Principles


                   1st Principle of
                   Mathematical Induction
                                                        implies


                   implies
                                                          Principle of Well-Ordering
                                                          (“Every collection of positive integers that
                                                          contains any members at all has a smallest
                                                          member”)

           2nd Principle of                      implies
           Mathematical Induction




     Section 2.2                            Induction                                         9
Tuesday, February 9, 2010

More Related Content

What's hot

Program on Quasi-Monte Carlo and High-Dimensional Sampling Methods for Applie...
Program on Quasi-Monte Carlo and High-Dimensional Sampling Methods for Applie...Program on Quasi-Monte Carlo and High-Dimensional Sampling Methods for Applie...
Program on Quasi-Monte Carlo and High-Dimensional Sampling Methods for Applie...
The Statistical and Applied Mathematical Sciences Institute
 
The Probability that a Matrix of Integers Is Diagonalizable
The Probability that a Matrix of Integers Is DiagonalizableThe Probability that a Matrix of Integers Is Diagonalizable
The Probability that a Matrix of Integers Is Diagonalizable
Jay Liew
 
Gentle Introduction to Dirichlet Processes
Gentle Introduction to Dirichlet ProcessesGentle Introduction to Dirichlet Processes
Gentle Introduction to Dirichlet Processes
Yap Wooi Hen
 
Mgm
MgmMgm
Integration material
Integration material Integration material
Integration material
Surya Swaroop
 
Local Volatility 1
Local Volatility 1Local Volatility 1
Local Volatility 1
Ilya Gikhman
 
A note on arithmetic progressions in sets of integers
A note on arithmetic progressions in sets of integersA note on arithmetic progressions in sets of integers
A note on arithmetic progressions in sets of integers
Lukas Nabergall
 
Program on Quasi-Monte Carlo and High-Dimensional Sampling Methods for Appli...
 Program on Quasi-Monte Carlo and High-Dimensional Sampling Methods for Appli... Program on Quasi-Monte Carlo and High-Dimensional Sampling Methods for Appli...
Program on Quasi-Monte Carlo and High-Dimensional Sampling Methods for Appli...
The Statistical and Applied Mathematical Sciences Institute
 
Formal Logic - Lesson 8 - Predicates and Quantifiers
Formal Logic - Lesson 8 - Predicates and QuantifiersFormal Logic - Lesson 8 - Predicates and Quantifiers
Formal Logic - Lesson 8 - Predicates and Quantifiers
Laguna State Polytechnic University
 
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
ijceronline
 
Eucledian algorithm for gcd of integers and polynomials
Eucledian algorithm for gcd of integers and polynomialsEucledian algorithm for gcd of integers and polynomials
Eucledian algorithm for gcd of integers and polynomials
SWAMY J S
 
Stochastic Processes Homework Help
Stochastic Processes Homework Help Stochastic Processes Homework Help
Stochastic Processes Homework Help
Statistics Assignment Help
 
OPTIMAL PREDICTION OF THE EXPECTED VALUE OF ASSETS UNDER FRACTAL SCALING EXPO...
OPTIMAL PREDICTION OF THE EXPECTED VALUE OF ASSETS UNDER FRACTAL SCALING EXPO...OPTIMAL PREDICTION OF THE EXPECTED VALUE OF ASSETS UNDER FRACTAL SCALING EXPO...
OPTIMAL PREDICTION OF THE EXPECTED VALUE OF ASSETS UNDER FRACTAL SCALING EXPO...
mathsjournal
 
Analysis Of Algorithms Ii
Analysis Of Algorithms IiAnalysis Of Algorithms Ii
Analysis Of Algorithms Ii
Sri Prasanna
 
Admission in india 2015
Admission in india 2015Admission in india 2015
Admission in india 2015
Edhole.com
 
Thesis 6
Thesis 6Thesis 6
Thesis 6
Dorian Ehrlich
 
Birkhoff coordinates for the Toda Lattice in the limit of infinitely many par...
Birkhoff coordinates for the Toda Lattice in the limit of infinitely many par...Birkhoff coordinates for the Toda Lattice in the limit of infinitely many par...
Birkhoff coordinates for the Toda Lattice in the limit of infinitely many par...
Alberto Maspero
 
Jensen's inequality, EM 알고리즘
Jensen's inequality, EM 알고리즘 Jensen's inequality, EM 알고리즘
Jensen's inequality, EM 알고리즘
Jungkyu Lee
 
Results on Linear Algebra
Results on Linear AlgebraResults on Linear Algebra
Results on Linear Algebra
ijtsrd
 
Números primos repunits
Números primos repunitsNúmeros primos repunits
Números primos repunits
lenixez
 

What's hot (20)

Program on Quasi-Monte Carlo and High-Dimensional Sampling Methods for Applie...
Program on Quasi-Monte Carlo and High-Dimensional Sampling Methods for Applie...Program on Quasi-Monte Carlo and High-Dimensional Sampling Methods for Applie...
Program on Quasi-Monte Carlo and High-Dimensional Sampling Methods for Applie...
 
The Probability that a Matrix of Integers Is Diagonalizable
The Probability that a Matrix of Integers Is DiagonalizableThe Probability that a Matrix of Integers Is Diagonalizable
The Probability that a Matrix of Integers Is Diagonalizable
 
Gentle Introduction to Dirichlet Processes
Gentle Introduction to Dirichlet ProcessesGentle Introduction to Dirichlet Processes
Gentle Introduction to Dirichlet Processes
 
Mgm
MgmMgm
Mgm
 
Integration material
Integration material Integration material
Integration material
 
Local Volatility 1
Local Volatility 1Local Volatility 1
Local Volatility 1
 
A note on arithmetic progressions in sets of integers
A note on arithmetic progressions in sets of integersA note on arithmetic progressions in sets of integers
A note on arithmetic progressions in sets of integers
 
Program on Quasi-Monte Carlo and High-Dimensional Sampling Methods for Appli...
 Program on Quasi-Monte Carlo and High-Dimensional Sampling Methods for Appli... Program on Quasi-Monte Carlo and High-Dimensional Sampling Methods for Appli...
Program on Quasi-Monte Carlo and High-Dimensional Sampling Methods for Appli...
 
Formal Logic - Lesson 8 - Predicates and Quantifiers
Formal Logic - Lesson 8 - Predicates and QuantifiersFormal Logic - Lesson 8 - Predicates and Quantifiers
Formal Logic - Lesson 8 - Predicates and Quantifiers
 
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
 
Eucledian algorithm for gcd of integers and polynomials
Eucledian algorithm for gcd of integers and polynomialsEucledian algorithm for gcd of integers and polynomials
Eucledian algorithm for gcd of integers and polynomials
 
Stochastic Processes Homework Help
Stochastic Processes Homework Help Stochastic Processes Homework Help
Stochastic Processes Homework Help
 
OPTIMAL PREDICTION OF THE EXPECTED VALUE OF ASSETS UNDER FRACTAL SCALING EXPO...
OPTIMAL PREDICTION OF THE EXPECTED VALUE OF ASSETS UNDER FRACTAL SCALING EXPO...OPTIMAL PREDICTION OF THE EXPECTED VALUE OF ASSETS UNDER FRACTAL SCALING EXPO...
OPTIMAL PREDICTION OF THE EXPECTED VALUE OF ASSETS UNDER FRACTAL SCALING EXPO...
 
Analysis Of Algorithms Ii
Analysis Of Algorithms IiAnalysis Of Algorithms Ii
Analysis Of Algorithms Ii
 
Admission in india 2015
Admission in india 2015Admission in india 2015
Admission in india 2015
 
Thesis 6
Thesis 6Thesis 6
Thesis 6
 
Birkhoff coordinates for the Toda Lattice in the limit of infinitely many par...
Birkhoff coordinates for the Toda Lattice in the limit of infinitely many par...Birkhoff coordinates for the Toda Lattice in the limit of infinitely many par...
Birkhoff coordinates for the Toda Lattice in the limit of infinitely many par...
 
Jensen's inequality, EM 알고리즘
Jensen's inequality, EM 알고리즘 Jensen's inequality, EM 알고리즘
Jensen's inequality, EM 알고리즘
 
Results on Linear Algebra
Results on Linear AlgebraResults on Linear Algebra
Results on Linear Algebra
 
Números primos repunits
Números primos repunitsNúmeros primos repunits
Números primos repunits
 

Similar to CPSC 125 Ch 2 Sec 2

Induction.pdf
Induction.pdfInduction.pdf
Induction.pdf
pubggaming58982
 
Chapter5.pptx
Chapter5.pptxChapter5.pptx
Chapter5.pptx
sneha510051
 
17-mathematical-induction.ppt
17-mathematical-induction.ppt17-mathematical-induction.ppt
17-mathematical-induction.ppt
RishabhNath3
 
17-mathematical-induction.ppt
17-mathematical-induction.ppt17-mathematical-induction.ppt
17-mathematical-induction.ppt
SintaVeDe
 
11-Induction CIIT.pptx
11-Induction CIIT.pptx11-Induction CIIT.pptx
11-Induction CIIT.pptx
jaffarbikat
 
CPSC 125 Ch 2 Sec 1
CPSC 125 Ch 2 Sec 1CPSC 125 Ch 2 Sec 1
CPSC 125 Ch 2 Sec 1
David Wood
 
Introduction to mathematical Induction.ppt
Introduction to mathematical Induction.pptIntroduction to mathematical Induction.ppt
Introduction to mathematical Induction.ppt
ShaukatAliChaudhry1
 
Induction (1).ppt
Induction (1).pptInduction (1).ppt
Induction (1).ppt
ElizanderGalasi1
 
Fskik 1 nota
Fskik 1   notaFskik 1   nota
Fskik 1 nota
khairunnasirahmad
 
Mathematical Induction DM
Mathematical Induction DMMathematical Induction DM
Mathematical Induction DM
Rokonuzzaman Rony
 
Aa - Module 1 Fundamentals_2.pdf
Aa  - Module 1  Fundamentals_2.pdfAa  - Module 1  Fundamentals_2.pdf
Aa - Module 1 Fundamentals_2.pdf
AayushSharma261
 
Discrete Math Lecture 03: Methods of Proof
Discrete Math Lecture 03: Methods of ProofDiscrete Math Lecture 03: Methods of Proof
Discrete Math Lecture 03: Methods of Proof
IT Engineering Department
 
Lect 18
Lect 18Lect 18
Lect 18
IIUM
 
Math 189 Exam 1 Solutions
Math 189 Exam 1 SolutionsMath 189 Exam 1 Solutions
Math 189 Exam 1 Solutions
Tyler Murphy
 
Principle of mathematical induction
Principle of mathematical inductionPrinciple of mathematical induction
Principle of mathematical induction
Kriti Varshney
 
CMSC 56 | Lecture 5: Proofs Methods and Strategy
CMSC 56 | Lecture 5: Proofs Methods and StrategyCMSC 56 | Lecture 5: Proofs Methods and Strategy
CMSC 56 | Lecture 5: Proofs Methods and Strategy
allyn joy calcaben
 
ppt02.ppt
ppt02.pptppt02.ppt
Induction.pptx
Induction.pptxInduction.pptx
Induction.pptx
AppasamiG
 
mathematicalinductionanddivisibilityrules-160711105713.pdf
mathematicalinductionanddivisibilityrules-160711105713.pdfmathematicalinductionanddivisibilityrules-160711105713.pdf
mathematicalinductionanddivisibilityrules-160711105713.pdf
BhanuCharan9
 
Mathematical induction and divisibility rules
Mathematical induction and divisibility rulesMathematical induction and divisibility rules
Mathematical induction and divisibility rules
Dawood Faheem Abbasi
 

Similar to CPSC 125 Ch 2 Sec 2 (20)

Induction.pdf
Induction.pdfInduction.pdf
Induction.pdf
 
Chapter5.pptx
Chapter5.pptxChapter5.pptx
Chapter5.pptx
 
17-mathematical-induction.ppt
17-mathematical-induction.ppt17-mathematical-induction.ppt
17-mathematical-induction.ppt
 
17-mathematical-induction.ppt
17-mathematical-induction.ppt17-mathematical-induction.ppt
17-mathematical-induction.ppt
 
11-Induction CIIT.pptx
11-Induction CIIT.pptx11-Induction CIIT.pptx
11-Induction CIIT.pptx
 
CPSC 125 Ch 2 Sec 1
CPSC 125 Ch 2 Sec 1CPSC 125 Ch 2 Sec 1
CPSC 125 Ch 2 Sec 1
 
Introduction to mathematical Induction.ppt
Introduction to mathematical Induction.pptIntroduction to mathematical Induction.ppt
Introduction to mathematical Induction.ppt
 
Induction (1).ppt
Induction (1).pptInduction (1).ppt
Induction (1).ppt
 
Fskik 1 nota
Fskik 1   notaFskik 1   nota
Fskik 1 nota
 
Mathematical Induction DM
Mathematical Induction DMMathematical Induction DM
Mathematical Induction DM
 
Aa - Module 1 Fundamentals_2.pdf
Aa  - Module 1  Fundamentals_2.pdfAa  - Module 1  Fundamentals_2.pdf
Aa - Module 1 Fundamentals_2.pdf
 
Discrete Math Lecture 03: Methods of Proof
Discrete Math Lecture 03: Methods of ProofDiscrete Math Lecture 03: Methods of Proof
Discrete Math Lecture 03: Methods of Proof
 
Lect 18
Lect 18Lect 18
Lect 18
 
Math 189 Exam 1 Solutions
Math 189 Exam 1 SolutionsMath 189 Exam 1 Solutions
Math 189 Exam 1 Solutions
 
Principle of mathematical induction
Principle of mathematical inductionPrinciple of mathematical induction
Principle of mathematical induction
 
CMSC 56 | Lecture 5: Proofs Methods and Strategy
CMSC 56 | Lecture 5: Proofs Methods and StrategyCMSC 56 | Lecture 5: Proofs Methods and Strategy
CMSC 56 | Lecture 5: Proofs Methods and Strategy
 
ppt02.ppt
ppt02.pptppt02.ppt
ppt02.ppt
 
Induction.pptx
Induction.pptxInduction.pptx
Induction.pptx
 
mathematicalinductionanddivisibilityrules-160711105713.pdf
mathematicalinductionanddivisibilityrules-160711105713.pdfmathematicalinductionanddivisibilityrules-160711105713.pdf
mathematicalinductionanddivisibilityrules-160711105713.pdf
 
Mathematical induction and divisibility rules
Mathematical induction and divisibility rulesMathematical induction and divisibility rules
Mathematical induction and divisibility rules
 

More from David Wood

Internet of Things (IoT) two-factor authentication using blockchain
Internet of Things (IoT) two-factor authentication using blockchainInternet of Things (IoT) two-factor authentication using blockchain
Internet of Things (IoT) two-factor authentication using blockchain
David Wood
 
Returning to Online Privacy?
Returning to Online Privacy?Returning to Online Privacy?
Returning to Online Privacy?
David Wood
 
Methods for Securing Spacecraft Tasking and Control via an Enterprise Ethereu...
Methods for Securing Spacecraft Tasking and Control via an Enterprise Ethereu...Methods for Securing Spacecraft Tasking and Control via an Enterprise Ethereu...
Methods for Securing Spacecraft Tasking and Control via an Enterprise Ethereu...
David Wood
 
BlockSW 2019 Keynote
BlockSW 2019 KeynoteBlockSW 2019 Keynote
BlockSW 2019 Keynote
David Wood
 
Returning to Online Privacy - W3C/ANU Future of the Web Roadshow 20190221
Returning to Online Privacy - W3C/ANU Future of the Web Roadshow 20190221Returning to Online Privacy - W3C/ANU Future of the Web Roadshow 20190221
Returning to Online Privacy - W3C/ANU Future of the Web Roadshow 20190221
David Wood
 
Privacy in the Smart City
Privacy in the Smart CityPrivacy in the Smart City
Privacy in the Smart City
David Wood
 
Controlling Complexities in Software Development
Controlling Complexities in Software DevelopmentControlling Complexities in Software Development
Controlling Complexities in Software Development
David Wood
 
Privacy Concerns related to Verifiable Claims
Privacy Concerns related to Verifiable ClaimsPrivacy Concerns related to Verifiable Claims
Privacy Concerns related to Verifiable Claims
David Wood
 
Implementing the Verifiable Claims data model
Implementing the Verifiable Claims data modelImplementing the Verifiable Claims data model
Implementing the Verifiable Claims data model
David Wood
 
So You Wanna be a Startup CTO 20170301
So You Wanna be a Startup CTO 20170301So You Wanna be a Startup CTO 20170301
So You Wanna be a Startup CTO 20170301
David Wood
 
Functional manipulations of large data graphs 20160601
Functional manipulations of large data graphs 20160601Functional manipulations of large data graphs 20160601
Functional manipulations of large data graphs 20160601
David Wood
 
When Metaphors Kill
When Metaphors KillWhen Metaphors Kill
When Metaphors Kill
David Wood
 
Secularism in Australia
Secularism in AustraliaSecularism in Australia
Secularism in Australia
David Wood
 
Meditations on Writing in Paradoxes, Oxymorons, and Pleonasms
Meditations on Writing in Paradoxes, Oxymorons, and PleonasmsMeditations on Writing in Paradoxes, Oxymorons, and Pleonasms
Meditations on Writing in Paradoxes, Oxymorons, and Pleonasms
David Wood
 
Building a writer's platform with social media
Building a writer's platform with social mediaBuilding a writer's platform with social media
Building a writer's platform with social media
David Wood
 
Summary of the Hero's Journey
Summary of the Hero's JourneySummary of the Hero's Journey
Summary of the Hero's Journey
David Wood
 
Open by Default
Open by DefaultOpen by Default
Open by Default
David Wood
 
Lod Then, Now and Next 20110926
Lod Then, Now and Next 20110926Lod Then, Now and Next 20110926
Lod Then, Now and Next 20110926
David Wood
 
Linked Data ROI 20110426
Linked Data ROI 20110426Linked Data ROI 20110426
Linked Data ROI 20110426
David Wood
 
Introduction to Linked Data: RDF Vocabularies
Introduction to Linked Data: RDF VocabulariesIntroduction to Linked Data: RDF Vocabularies
Introduction to Linked Data: RDF Vocabularies
David Wood
 

More from David Wood (20)

Internet of Things (IoT) two-factor authentication using blockchain
Internet of Things (IoT) two-factor authentication using blockchainInternet of Things (IoT) two-factor authentication using blockchain
Internet of Things (IoT) two-factor authentication using blockchain
 
Returning to Online Privacy?
Returning to Online Privacy?Returning to Online Privacy?
Returning to Online Privacy?
 
Methods for Securing Spacecraft Tasking and Control via an Enterprise Ethereu...
Methods for Securing Spacecraft Tasking and Control via an Enterprise Ethereu...Methods for Securing Spacecraft Tasking and Control via an Enterprise Ethereu...
Methods for Securing Spacecraft Tasking and Control via an Enterprise Ethereu...
 
BlockSW 2019 Keynote
BlockSW 2019 KeynoteBlockSW 2019 Keynote
BlockSW 2019 Keynote
 
Returning to Online Privacy - W3C/ANU Future of the Web Roadshow 20190221
Returning to Online Privacy - W3C/ANU Future of the Web Roadshow 20190221Returning to Online Privacy - W3C/ANU Future of the Web Roadshow 20190221
Returning to Online Privacy - W3C/ANU Future of the Web Roadshow 20190221
 
Privacy in the Smart City
Privacy in the Smart CityPrivacy in the Smart City
Privacy in the Smart City
 
Controlling Complexities in Software Development
Controlling Complexities in Software DevelopmentControlling Complexities in Software Development
Controlling Complexities in Software Development
 
Privacy Concerns related to Verifiable Claims
Privacy Concerns related to Verifiable ClaimsPrivacy Concerns related to Verifiable Claims
Privacy Concerns related to Verifiable Claims
 
Implementing the Verifiable Claims data model
Implementing the Verifiable Claims data modelImplementing the Verifiable Claims data model
Implementing the Verifiable Claims data model
 
So You Wanna be a Startup CTO 20170301
So You Wanna be a Startup CTO 20170301So You Wanna be a Startup CTO 20170301
So You Wanna be a Startup CTO 20170301
 
Functional manipulations of large data graphs 20160601
Functional manipulations of large data graphs 20160601Functional manipulations of large data graphs 20160601
Functional manipulations of large data graphs 20160601
 
When Metaphors Kill
When Metaphors KillWhen Metaphors Kill
When Metaphors Kill
 
Secularism in Australia
Secularism in AustraliaSecularism in Australia
Secularism in Australia
 
Meditations on Writing in Paradoxes, Oxymorons, and Pleonasms
Meditations on Writing in Paradoxes, Oxymorons, and PleonasmsMeditations on Writing in Paradoxes, Oxymorons, and Pleonasms
Meditations on Writing in Paradoxes, Oxymorons, and Pleonasms
 
Building a writer's platform with social media
Building a writer's platform with social mediaBuilding a writer's platform with social media
Building a writer's platform with social media
 
Summary of the Hero's Journey
Summary of the Hero's JourneySummary of the Hero's Journey
Summary of the Hero's Journey
 
Open by Default
Open by DefaultOpen by Default
Open by Default
 
Lod Then, Now and Next 20110926
Lod Then, Now and Next 20110926Lod Then, Now and Next 20110926
Lod Then, Now and Next 20110926
 
Linked Data ROI 20110426
Linked Data ROI 20110426Linked Data ROI 20110426
Linked Data ROI 20110426
 
Introduction to Linked Data: RDF Vocabularies
Introduction to Linked Data: RDF VocabulariesIntroduction to Linked Data: RDF Vocabularies
Introduction to Linked Data: RDF Vocabularies
 

Recently uploaded

Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Wask
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
dbms calicut university B. sc Cs 4th sem.pdf
dbms  calicut university B. sc Cs 4th sem.pdfdbms  calicut university B. sc Cs 4th sem.pdf
dbms calicut university B. sc Cs 4th sem.pdf
Shinana2
 
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
alexjohnson7307
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Jeffrey Haguewood
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
Wouter Lemaire
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
Operating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptxOperating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptx
Pravash Chandra Das
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
Postman
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 

Recently uploaded (20)

Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
dbms calicut university B. sc Cs 4th sem.pdf
dbms  calicut university B. sc Cs 4th sem.pdfdbms  calicut university B. sc Cs 4th sem.pdf
dbms calicut university B. sc Cs 4th sem.pdf
 
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
Operating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptxOperating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptx
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 

CPSC 125 Ch 2 Sec 2

  • 1. Proofs, Recursion and Analysis of Algorithms Mathematical Structures for Computer Science Chapter 2 Copyright © 2006 W.H. Freeman & Co. and modified by David Hyland-Wood, UMW 2010 Section 2.2 Induction Tuesday, February 9, 2010
  • 3. Adding Another Proof Technique Proof Technique Approach to prove P → Q Remarks Exhaustive Proof Demonstrate P → Q May only be used for finite for all cases number of cases Direct Proof Assume P, deduce Q The standard approach- usually the thing to try Proof by Assume Qʹ′, derive Pʹ′ Use this Qʹ′ if as a hypothesis Contraposition seems to give more ammunition then P would Proof by Assume P Λ Qʹ′ , deduce a Use this when Q says Contradiction contradiction something is not true Serendipity Not really a proof technique Fun to know Mathematical Prove P(1), assume P(k) and An implication; very use Induction prove P(k+1) for Computer Science Section 2.1 for all cases Techniques Proof 13 Tuesday, February 9, 2010
  • 4. Mathematical Induction ● Mathematical induction looks like you are learning from experience (induction) but you are really applying a certain type of direct proof (deduction). ● That’s why it is called “mathematical” induction. 4 Tuesday, February 9, 2010
  • 5. Principles of mathematical induction ● First Principle: P(1) is true P(n) is true for all positive integers n (∀k)P(k) true → P(k+1) true ● Second Principle: P(1) is true P(n) is true for all positive integers n P(r) true for all r, 1≤r≤k → P(k+1) true ● Major difference is in the second statement. ■ Use the second principle when assuming P(k) is not enough to prove P(k+1). ■ Assuming P(r) for any r where 1≤ r ≤ k gives more ammunition to prove the relation. ■ Use second principle when the case k+1 depends on results further back than k. Section 2.2 Induction 5 Tuesday, February 9, 2010
  • 6. Example: First Principle of Induction ● Prove that 1+2+22…+2n = 2n+1-1 for any n ≥ 1. ● P(1) is the equation 1+2 = 21+1-1 or 3 = 22-1, which is true. ● We take P(k) = 1+2+22…+2k = 2k+1-1 as the ?inductive hypothesis and try to establish P(k+1): 1+2+22…+2k+1 = 2k+1+1-1 ● Again, rewriting the sum on the left side of P(k+1) reveals how the inductive assumption can be used: 1+2+22…+2k+1 = 1+2+22…+ 2k + 2k+1 = 2k+1-1 + 2k+1 = 2(2k+1)-1 = 2k+1+1-1 ● Therefore, ! ! ! 1+2+22…+2k+1 = 2k+1+1-1 and verifies P(k+1) and completes the proof. Section 2.2 Induction 6 Tuesday, February 9, 2010
  • 7. Example: First Principle of Induction ● Prove that for any positive integer n, the number 22n-1 is divisible by 3. ● The basis step is to show P(1), that 22(1)-1 = 4-1 = 3 is divisible by 3. Clearly this is true. ● We assume that 22k-1 is divisible by 3,which means that 22k-1 = 3m for some integer m, or 22k = 3m+1. We want to show that 22(k+1) -1 is divisible by 3. 22(k+1) -1 = 22k+2 -1 = 22•22k-1 = 22(3m+1) -1 (by the inductive hypothesis) = 12m+4 -1 = 12m+3 = 3(4m+1) where 4m+1 is an integer ● Thus 22(k+1) -1 is divisible by 3. Section 2.2 Induction 7 Tuesday, February 9, 2010
  • 8. Example: Second Principle of Induction ● Prove that the amount of postage greater than or equal to 8 cents can be built using only 3-cent and 5-cent stamps. ● Proof using the second principle of Induction ● Hence, we have to prove that P(n) is true for n ≥ 8 where P(n) is the sum of 3 and 5 cent stamps used to make the n cents worth of postage. ■ Base case: P(8) = 3 + 5 = 8 which is true. ■ In this case we will have to establish additional cases to prove this. Hence, establish two cases P(9) and P(10) ■ P(9) = 3 + 3 + 3 = 9 and P(10) = 5 + 5 ■ Assume P(r) is true for any r, 8 ≤ r ≤ k and consider P(k+1) ■ We have proved P(r) is true for r = 8,9,10 ■ So, lets assume k+1 ≥ 11 ■ If k+1 ≥ 11 then (k+1)-3= k-2 ≥ 8, hence, by inductive hypothesis, P(k-2) is true. ■ Hence, k-2 can be written as a sum of 3s and 5s. Adding an additional 3 results in k+1 as a sum of 3s and 5s. ■ This verifies P(k+1) is true and hence verifies the proof. Section 2.2 Induction 8 Tuesday, February 9, 2010
  • 9. Mathematical Induction Principles 1st Principle of Mathematical Induction implies implies Principle of Well-Ordering (“Every collection of positive integers that contains any members at all has a smallest member”) 2nd Principle of implies Mathematical Induction Section 2.2 Induction 9 Tuesday, February 9, 2010