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

Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 

Recently uploaded (20)

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🔝
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 

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