SlideShare una empresa de Scribd logo
1 de 9
Descargar para leer sin conexión
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

Más contenido relacionado

La actualidad más candente

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
 

La actualidad más candente (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 a CPSC 125 Ch 2 Sec 2

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
 

Similar a 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
 

Más de 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
 

Más de 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
 

Último

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 

Último (20)

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 

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