This is a presentation that deals with the theory of computation formal proofs and the different types of proofs that is used in theory of computation.
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".
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