SlideShare ist ein Scribd-Unternehmen logo
1 von 9
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Was ist angesagt?

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 DiagonalizableJay Liew
 
Gentle Introduction to Dirichlet Processes
Gentle Introduction to Dirichlet ProcessesGentle Introduction to Dirichlet Processes
Gentle Introduction to Dirichlet ProcessesYap Wooi Hen
 
Integration material
Integration material Integration material
Integration material Surya Swaroop
 
Local Volatility 1
Local Volatility 1Local Volatility 1
Local Volatility 1Ilya 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 integersLukas Nabergall
 
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 polynomialsSWAMY J S
 
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 IiSri Prasanna
 
Admission in india 2015
Admission in india 2015Admission in india 2015
Admission in india 2015Edhole.com
 
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 Algebraijtsrd
 
Números primos repunits
Números primos repunitsNúmeros primos repunits
Números primos repunitslenixez
 

Was ist angesagt? (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
 

Ähnlich wie Proofs, Recursion and Analysis of Algorithms Using Mathematical Induction

17-mathematical-induction.ppt
17-mathematical-induction.ppt17-mathematical-induction.ppt
17-mathematical-induction.pptRishabhNath3
 
17-mathematical-induction.ppt
17-mathematical-induction.ppt17-mathematical-induction.ppt
17-mathematical-induction.pptSintaVeDe
 
11-Induction CIIT.pptx
11-Induction CIIT.pptx11-Induction CIIT.pptx
11-Induction CIIT.pptxjaffarbikat
 
CPSC 125 Ch 2 Sec 1
CPSC 125 Ch 2 Sec 1CPSC 125 Ch 2 Sec 1
CPSC 125 Ch 2 Sec 1David Wood
 
Introduction to mathematical Induction.ppt
Introduction to mathematical Induction.pptIntroduction to mathematical Induction.ppt
Introduction to mathematical Induction.pptShaukatAliChaudhry1
 
Aa - Module 1 Fundamentals_2.pdf
Aa  - Module 1  Fundamentals_2.pdfAa  - Module 1  Fundamentals_2.pdf
Aa - Module 1 Fundamentals_2.pdfAayushSharma261
 
Lect 18
Lect 18Lect 18
Lect 18IIUM
 
Math 189 Exam 1 Solutions
Math 189 Exam 1 SolutionsMath 189 Exam 1 Solutions
Math 189 Exam 1 SolutionsTyler Murphy
 
Principle of mathematical induction
Principle of mathematical inductionPrinciple of mathematical induction
Principle of mathematical inductionKriti 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 Strategyallyn joy calcaben
 
Induction.pptx
Induction.pptxInduction.pptx
Induction.pptxAppasamiG
 
mathematicalinductionanddivisibilityrules-160711105713.pdf
mathematicalinductionanddivisibilityrules-160711105713.pdfmathematicalinductionanddivisibilityrules-160711105713.pdf
mathematicalinductionanddivisibilityrules-160711105713.pdfBhanuCharan9
 
Mathematical induction and divisibility rules
Mathematical induction and divisibility rulesMathematical induction and divisibility rules
Mathematical induction and divisibility rulesDawood Faheem Abbasi
 

Ähnlich wie Proofs, Recursion and Analysis of Algorithms Using Mathematical Induction (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
 

Mehr von 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 blockchainDavid 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 KeynoteDavid 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 20190221David Wood
 
Privacy in the Smart City
Privacy in the Smart CityPrivacy in the Smart City
Privacy in the Smart CityDavid Wood
 
Controlling Complexities in Software Development
Controlling Complexities in Software DevelopmentControlling Complexities in Software Development
Controlling Complexities in Software DevelopmentDavid Wood
 
Privacy Concerns related to Verifiable Claims
Privacy Concerns related to Verifiable ClaimsPrivacy Concerns related to Verifiable Claims
Privacy Concerns related to Verifiable ClaimsDavid Wood
 
Implementing the Verifiable Claims data model
Implementing the Verifiable Claims data modelImplementing the Verifiable Claims data model
Implementing the Verifiable Claims data modelDavid 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 20170301David 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 20160601David Wood
 
When Metaphors Kill
When Metaphors KillWhen Metaphors Kill
When Metaphors KillDavid Wood
 
Secularism in Australia
Secularism in AustraliaSecularism in Australia
Secularism in AustraliaDavid 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 PleonasmsDavid 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 mediaDavid Wood
 
Summary of the Hero's Journey
Summary of the Hero's JourneySummary of the Hero's Journey
Summary of the Hero's JourneyDavid Wood
 
Open by Default
Open by DefaultOpen by Default
Open by DefaultDavid Wood
 
Lod Then, Now and Next 20110926
Lod Then, Now and Next 20110926Lod Then, Now and Next 20110926
Lod Then, Now and Next 20110926David Wood
 
Linked Data ROI 20110426
Linked Data ROI 20110426Linked Data ROI 20110426
Linked Data ROI 20110426David Wood
 
Introduction to Linked Data: RDF Vocabularies
Introduction to Linked Data: RDF VocabulariesIntroduction to Linked Data: RDF Vocabularies
Introduction to Linked Data: RDF VocabulariesDavid Wood
 

Mehr von 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
 

Kürzlich hochgeladen

Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 

Kürzlich hochgeladen (20)

Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 

Proofs, Recursion and Analysis of Algorithms Using Mathematical Induction

  • 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