SlideShare a Scribd company logo
1 of 17
Theory of Computation
Introduction to formal proof
• A proof is a convincing logical argument that a
statement is true.
• A formal proof or derivation is a
finite sequence of sentences (called well-formed
formulas in the case of a formal language), each of
which is an axiom, an assumption, or follows from the
preceding sentences in the sequence by a rule of
inference
• Formal proof techniques are indispensable for proving
theorems in theory of computation.
• Understanding how correct programs work is
equivalent to proving theorems by induction.
Formal Proofs
There are 5 different forms of proofs
1. Deductive Proof
2. Proof by Induction(Inductive Proof)
3. Proof by Contradiction
4. Proof by Counter example
5. Proof by Contrapositive
Deductive Proof
• From the given statement(s) to a conclusion statement (what we want to prove)
i.e. Given a hypothesis H, and some statements, generate a conclusion C.
• Each step of a deductive proof MUST follow from a given fact or previous statements (or their
combinations) by an accepted logical principle.
• The theorem that is proved when we go from a hypothesis H to a conclusion C is the
statement ’’if H then C’’. We say that C is deduced from H.
“If H then C” i.e C is deduced from H
Proof by Contradiction
• Start with a statement contradictory to given
statement and then prove it leads to
contradiction
• Suppose that we want to prove H and we
know that it is true. Instead of proving H
directly, we may instead show that assuming
¬H leads to a contradiction. Therefore H must
be true.
Proof by Counter Example
• A counter example disproves a statement by
giving a situation where the statement is false.
• It is the technique where a statement is
shown to be wrong by finding a single
example whereby it is not satisfied.
• An example which disproves a proposition.
For example, the prime number 2 is
a counterexample to the statement "All prime
numbers are odd."
Proof by Contrapositive
• Proof by contrapositive takes advantage of the
logical equivalence between "H implies C" and
"Not C implies Not H".
• For example, the assertion "If it is my car, then
it is red" is equivalent to "If that car is not red,
then it is not mine".
• To prove "If P, Then Q" by the method of
contrapositive means to prove "If Not Q, Then
Not P".
The Principle of Mathematical
Induction
Mathematical Induction
• Suppose we have some statement P(n) and
we want to demonstrate that P(n) is true for
all n belonging to N.
• Even if we can provide proofs for P(0), P(1),
..., P(k), where k is some large number, we
have accomplished very little.
• However, there is a general method, the
Principle of Mathematical Induction
The principle of mathematical induction
is a tool which can be used to prove a
wide variety of mathematical statements.
Each such statement is assumed as P(n)
associated with positive integer n, for
which the correctness for the case n=1 is
examined.
Then assuming the truth of P(k) for some
positive integer k, the truth of P(k+1) is
established.
There is a given statement P(n) involving the natural
number n such that
(i) The statement is true for n=1, i.e., P(1) is true
This is called the proof for the basis.
(ii) If the statement is true for n=k (where k is some
positive integer ), then the statement is also true for
n=k+1
i.e., truth of P(k) implies the truth of P(k+1).
This is called the induction hypothesis.
(iii) Then, P(n) is true for all natural numbers n.
Proof by Induction…..
Example…
• Prove that 1 + 3 + 5 + ……+ n = n(n+1)/2
Solution
(a) Proof for the basis.
For n=1, LHS = 1 and RHS = 1(1+1)/2 =1
Hence the result is true for n = 1.
(b) By Induction hypothesis, we assume it is true
for n = k,
1 + 3 + 5 + ……+ k= k(k+1)/2
we have to prove that this is true for n = k+1
also
ie 1 + 3 + 5 + ……+ k + (k+1) = (k + 1)(k+2)/2
LHS = 1 + 3 + 5 + ……+ k + (k+1)
= k(k+1)/2 + (k+1)
= (k(k +1) + 2(k+1))/2
= ((k+1)(k+2))/2
=RHS
Examples…
Prove by induction
1. 1 + 4 + 7+…….+ (3n -2) =
𝑛(3𝑛−1)
2
2. 13 + 23 + …….. + n3 =
𝑛2 𝑛+1 2
4
3. 4+9+14+19+……+(5n-1)=n/2(3+5n)
4. -1+2+5+8+……+(3n-4)=n/2[3n-5]
5. 1/2+1/4+1/8+…. 1/2n=(2n-1)/2n
6. Prove n!>2n for n>=4
Examples….

More Related Content

Similar to 1-Theory of Computation_formal proofs.pptx

Tma2033 chap1.1&1.2handout
Tma2033 chap1.1&1.2handoutTma2033 chap1.1&1.2handout
Tma2033 chap1.1&1.2handoutshiqinrino
 
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
 
Mathmatical reasoning
Mathmatical reasoningMathmatical reasoning
Mathmatical reasoningindu psthakur
 
Proving existential statements
Proving existential statementsProving existential statements
Proving existential statementsAbdur Rehman
 
MATHEMATICAL INDUCTION.ppt
MATHEMATICAL INDUCTION.pptMATHEMATICAL INDUCTION.ppt
MATHEMATICAL INDUCTION.pptMarjorie Malveda
 
Artificial intelligent Lec 5-logic
Artificial intelligent Lec 5-logicArtificial intelligent Lec 5-logic
Artificial intelligent Lec 5-logicTaymoor Nazmy
 
SESSION-12 PPT.pptx
SESSION-12 PPT.pptxSESSION-12 PPT.pptx
SESSION-12 PPT.pptxNaniSarath
 
Aa - Module 1 Fundamentals_2.pdf
Aa  - Module 1  Fundamentals_2.pdfAa  - Module 1  Fundamentals_2.pdf
Aa - Module 1 Fundamentals_2.pdfAayushSharma261
 
Discrete mathematics Chapter1 presentation.ppt
Discrete mathematics Chapter1 presentation.pptDiscrete mathematics Chapter1 presentation.ppt
Discrete mathematics Chapter1 presentation.pptNandiniSR2
 
Concept learning and candidate elimination algorithm
Concept learning and candidate elimination algorithmConcept learning and candidate elimination algorithm
Concept learning and candidate elimination algorithmswapnac12
 

Similar to 1-Theory of Computation_formal proofs.pptx (20)

Tma2033 chap1.1&1.2handout
Tma2033 chap1.1&1.2handoutTma2033 chap1.1&1.2handout
Tma2033 chap1.1&1.2handout
 
Mathematical Reasoning DM
Mathematical Reasoning DMMathematical Reasoning DM
Mathematical Reasoning DM
 
4AMT122-PART 1-SLIDES.pptx
4AMT122-PART 1-SLIDES.pptx4AMT122-PART 1-SLIDES.pptx
4AMT122-PART 1-SLIDES.pptx
 
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
 
Mathmatical reasoning
Mathmatical reasoningMathmatical reasoning
Mathmatical reasoning
 
Data structure chapter-1-proofs
Data structure chapter-1-proofsData structure chapter-1-proofs
Data structure chapter-1-proofs
 
Proving existential statements
Proving existential statementsProving existential statements
Proving existential statements
 
MATHEMATICAL INDUCTION.ppt
MATHEMATICAL INDUCTION.pptMATHEMATICAL INDUCTION.ppt
MATHEMATICAL INDUCTION.ppt
 
Artificial intelligent Lec 5-logic
Artificial intelligent Lec 5-logicArtificial intelligent Lec 5-logic
Artificial intelligent Lec 5-logic
 
Fskik 1 nota
Fskik 1   notaFskik 1   nota
Fskik 1 nota
 
WRITING PROOFS-Qtr 2.pptx
WRITING PROOFS-Qtr 2.pptxWRITING PROOFS-Qtr 2.pptx
WRITING PROOFS-Qtr 2.pptx
 
Proof by contradiction
Proof by contradictionProof by contradiction
Proof by contradiction
 
SESSION-12 PPT.pptx
SESSION-12 PPT.pptxSESSION-12 PPT.pptx
SESSION-12 PPT.pptx
 
Aa - Module 1 Fundamentals_2.pdf
Aa  - Module 1  Fundamentals_2.pdfAa  - Module 1  Fundamentals_2.pdf
Aa - Module 1 Fundamentals_2.pdf
 
5
55
5
 
Discrete mathematics Chapter1 presentation.ppt
Discrete mathematics Chapter1 presentation.pptDiscrete mathematics Chapter1 presentation.ppt
Discrete mathematics Chapter1 presentation.ppt
 
Concept learning and candidate elimination algorithm
Concept learning and candidate elimination algorithmConcept learning and candidate elimination algorithm
Concept learning and candidate elimination algorithm
 
Course notes1
Course notes1Course notes1
Course notes1
 
Logic.ppt
Logic.pptLogic.ppt
Logic.ppt
 
Slide subtopic 3
Slide subtopic 3Slide subtopic 3
Slide subtopic 3
 

Recently uploaded

MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.arsicmarija21
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........LeaCamillePacle
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
ROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationAadityaSharma884161
 
Planning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxPlanning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxLigayaBacuel1
 

Recently uploaded (20)

MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
ROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint Presentation
 
Planning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxPlanning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptx
 

1-Theory of Computation_formal proofs.pptx

  • 2. Introduction to formal proof • A proof is a convincing logical argument that a statement is true. • A formal proof or derivation is a finite sequence of sentences (called well-formed formulas in the case of a formal language), each of which is an axiom, an assumption, or follows from the preceding sentences in the sequence by a rule of inference • Formal proof techniques are indispensable for proving theorems in theory of computation. • Understanding how correct programs work is equivalent to proving theorems by induction.
  • 3. Formal Proofs There are 5 different forms of proofs 1. Deductive Proof 2. Proof by Induction(Inductive Proof) 3. Proof by Contradiction 4. Proof by Counter example 5. Proof by Contrapositive
  • 4. Deductive Proof • From the given statement(s) to a conclusion statement (what we want to prove) i.e. Given a hypothesis H, and some statements, generate a conclusion C. • Each step of a deductive proof MUST follow from a given fact or previous statements (or their combinations) by an accepted logical principle. • The theorem that is proved when we go from a hypothesis H to a conclusion C is the statement ’’if H then C’’. We say that C is deduced from H. “If H then C” i.e C is deduced from H
  • 5.
  • 6.
  • 7. Proof by Contradiction • Start with a statement contradictory to given statement and then prove it leads to contradiction • Suppose that we want to prove H and we know that it is true. Instead of proving H directly, we may instead show that assuming ¬H leads to a contradiction. Therefore H must be true.
  • 8. Proof by Counter Example • A counter example disproves a statement by giving a situation where the statement is false. • It is the technique where a statement is shown to be wrong by finding a single example whereby it is not satisfied. • An example which disproves a proposition. For example, the prime number 2 is a counterexample to the statement "All prime numbers are odd."
  • 9. Proof by Contrapositive • Proof by contrapositive takes advantage of the logical equivalence between "H implies C" and "Not C implies Not H". • For example, the assertion "If it is my car, then it is red" is equivalent to "If that car is not red, then it is not mine". • To prove "If P, Then Q" by the method of contrapositive means to prove "If Not Q, Then Not P".
  • 10. The Principle of Mathematical Induction
  • 11. Mathematical Induction • Suppose we have some statement P(n) and we want to demonstrate that P(n) is true for all n belonging to N. • Even if we can provide proofs for P(0), P(1), ..., P(k), where k is some large number, we have accomplished very little. • However, there is a general method, the Principle of Mathematical Induction
  • 12. The principle of mathematical induction is a tool which can be used to prove a wide variety of mathematical statements. Each such statement is assumed as P(n) associated with positive integer n, for which the correctness for the case n=1 is examined. Then assuming the truth of P(k) for some positive integer k, the truth of P(k+1) is established.
  • 13. There is a given statement P(n) involving the natural number n such that (i) The statement is true for n=1, i.e., P(1) is true This is called the proof for the basis. (ii) If the statement is true for n=k (where k is some positive integer ), then the statement is also true for n=k+1 i.e., truth of P(k) implies the truth of P(k+1). This is called the induction hypothesis. (iii) Then, P(n) is true for all natural numbers n. Proof by Induction…..
  • 14. Example… • Prove that 1 + 3 + 5 + ……+ n = n(n+1)/2 Solution (a) Proof for the basis. For n=1, LHS = 1 and RHS = 1(1+1)/2 =1 Hence the result is true for n = 1. (b) By Induction hypothesis, we assume it is true for n = k, 1 + 3 + 5 + ……+ k= k(k+1)/2 we have to prove that this is true for n = k+1 also ie 1 + 3 + 5 + ……+ k + (k+1) = (k + 1)(k+2)/2
  • 15. LHS = 1 + 3 + 5 + ……+ k + (k+1) = k(k+1)/2 + (k+1) = (k(k +1) + 2(k+1))/2 = ((k+1)(k+2))/2 =RHS
  • 16. Examples… Prove by induction 1. 1 + 4 + 7+…….+ (3n -2) = 𝑛(3𝑛−1) 2 2. 13 + 23 + …….. + n3 = 𝑛2 𝑛+1 2 4 3. 4+9+14+19+……+(5n-1)=n/2(3+5n) 4. -1+2+5+8+……+(3n-4)=n/2[3n-5] 5. 1/2+1/4+1/8+…. 1/2n=(2n-1)/2n 6. Prove n!>2n for n>=4