1. Mathematics for Computer Engineering
Faculty: Dr.D.Ezhilmaran
Teaching Research Associate: M.Adhiyaman
Vellore Institute of Technology, Tamilnadu, India
ezhilmaran.d@vit.ac.in
July 28, 2016
Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Higher Mathematics July 28, 2016 1 / 53
2. Overview
1 Proof Techniques
Baics of Proof Techniques
Implication, Equivalance
Converse, Inverse, Contrapositive
Negation, Contradiction, Structure
Direct Proof, Disproof (In Direct Proof)
Natural Number Induction, Structural Induction, Weak/String
Induction
Recursion, Well Orderings
Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Higher Mathematics July 28, 2016 2 / 53
3. Basics of proof techniques
Definition 1. (Proposition)
A statement or proposition is a declarative sentence that is either true or
false (but not both).
For instance, the following are propositions:
1. 3 > 1 (true).
2. 2 < 4 (true).
3. 4 = 7 (false)
However the following are a not propositions:
1. x is an even number.
2. what is your name?.
3. How old are you?.
4. Close the door.
5. Wow! Wonderful statue.
Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Higher Mathematics July 28, 2016 3 / 53
4. Definition 2. (Atomic statements)
Declarative sentences which cannot be further split into simple sentences
are called atomic statements (also called primary statements or primitive
statements).
Example: p is a prime number
Definition 3. (Compound statements)
New statements can be formed from atomic statements through the use of
connectives such as ”and, but, or etc...” The resulting statement are called
molecular or compound (composite) statements.
Example: If p is a prime number then, the divisors are p and 1 itself
Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Higher Mathematics July 28, 2016 4 / 53
5. Definition 4. (truth value)
The truth or falsehood of a proposition is called its truth value.
Definition 5. (Truth Table)
A table, giving the truth values of a compound statement interms of its
component parts, is called a Truth Table.
Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Higher Mathematics July 28, 2016 5 / 53
6. Definition 6. (Connectives)
Connectives are used for making compound propositions. The main ones
are the following (p and q represent given two propositions):
Table 1. Logic Connectives
Name Represented Meaning
Negation ¬p not in p
Conjunction p ∧ q p and q
Disjunction p ∨ q p or q (or both)
Implication p → q if p then q
Biconditional p ↔ q p if and only if q
Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Higher Mathematics July 28, 2016 6 / 53
7. The truth value of a compound proposition depends only on the value of
its components. Writing F for false and T for true, we can summarize the
meaning of the connectives in the following way:
p q ¬p p ∧ q p ∨ q p → q p ↔ q
T T F T T T T
T F F F T F F
F T T F T T F
F F T F F T T
Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Higher Mathematics July 28, 2016 7 / 53
8. Definition 7. (Tautology)
A proposition is said to be a tautology if its truth value is T for any
assignment of truth values to its components.
Example: The proposition p ∨ ¬p is a tautology.
Definition 8. (Contradiction)
A proposition is said to be a contradiction if its truth value is F for any
assignment of truth values to its components.
Example: The proposition p ∧ ¬p is a contradiction.
Definition 9.(Contingency)
A proposition that is neither a tautology nor a contradiction is called a
contingency.
Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Higher Mathematics July 28, 2016 8 / 53
9. p ¬p p ∧ ¬p p ∨ ¬p
T F F T
T F F T
p q p ∨ q ¬p (p ∨ q) ∨ (¬p)
T T T F T
T F T F T
F T T T T
F F F T T
Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Higher Mathematics July 28, 2016 9 / 53
10. I. Construct the truth table for the following statements
(i) (p → q) ←→ (¬p ∨ q)
(ii) p ∧ (p ∨ q)
(iii) (p → q) → p
(iv) ¬ (p ∧ q) ←→ (¬ p ∨ ¬ q)
(v) (p ∨ ¬q) → q
Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Higher Mathematics July 28, 2016 10 / 53
11. Solutions
(i) Let S = (p → q) ←→ (¬p ∨ q)
p q ¬p p → q ¬p ∨ q S
T T F T T T
T F F F F T
F T T T T T
F F T T T T
Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Higher Mathematics July 28, 2016 11 / 53
12. (ii) Let S = p ∧ (p ∨ q)
p q p ∨ q S
T T T T
T F T T
F T T F
F F F F
Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Higher Mathematics July 28, 2016 12 / 53
13. (iii) Let S = (p → q) → p
p q p → q S
T T T T
T F F T
F T T F
F F T F
Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Higher Mathematics July 28, 2016 13 / 53
14. (iv) Let S = ¬ (p ∧ q) ←→ ¬ p ∨ ¬ q
p q p ∧ q ¬ (p ∧ q) ¬p ¬q ¬ p ∨ ¬ q S
T T T F F F F T
T F F T F T T T
F T F T T F T T
F F F T T T T T
Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Higher Mathematics July 28, 2016 14 / 53
15. (v) Let S = (p ∨ ¬q) → q
p q ¬q p ∨ ¬q S
T T F T T
T F T T F
F T F F T
F F T T F
Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Higher Mathematics July 28, 2016 15 / 53
16. Implications
S.No Formula Name
1 p ∧ q ⇒ p simplification
p ∧ q ⇒ q
2 p ⇒ p ∨ q addition
q ⇒ p ∨ q
3 p, q ⇒ p ∧ q
4 p, p → q ⇒ q modus ponens
5 ¬p, p ∨ q ⇒ q disjunctive syllogism
6 ¬q, p → q ⇒ ¬p modus tollens
7 p → q , q → r ⇒ p → r hypothetical syllogism
Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Higher Mathematics July 28, 2016 16 / 53
17. Logical Equivalence
The compound propositions p → q and ¬p ∨ q have the same truth
values:
p q ¬p p → q ¬p ∨ q
T T F T T
T F F F F
F T T T T
F F T T T
Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Higher Mathematics July 28, 2016 17 / 53
18. When two compound propositions have the same truth value they are
called logically equivalent.
For instance p → q and ¬p ∨ q are logically equivalent, and it is denoted
by
p → q ⇔ ¬p ∨ q
Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Higher Mathematics July 28, 2016 18 / 53
19. Definition 10. (Logically Equivalent)
Two propositions A and B are logically equivalent precisely when A ⇔ B
is a tautology.
Example: The following propositions are logically equivalent:
p ↔ q ⇔ (p → q) ∧ (q → p)
p q p ↔ q p → q q → p (p → q) ∧ (q → p) S
T T T T T T T
T F F F T F T
F T F T F F T
F F T T T T T
Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Higher Mathematics July 28, 2016 19 / 53
20. Table 2. Logic equivalences
Equivalences Name
p ∧ T ⇔ p Identity law
p ∨ F ⇔ p
p ∨ T ⇔ T Dominent law
p ∧ F ⇔ F
p ∨ T ⇔ T Idempotent law
p ∧ F ⇔ F
p ∨ q ⇔ q ∨ p Commutative law
p ∧ q ⇔ q ∧ p
(p ∨ q) ∨ r ⇔ p ∨ (q ∨ r) Associative law
(p ∧ q) ∧ r ⇔ p ∧ (q ∧ r)
Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Higher Mathematics July 28, 2016 20 / 53
21. Table 2. Logic equivalences (Continued...)
Equivalences Name
(p ∨ q) ∧ r ⇔ (p ∧ r) ∨ (q ∧ r) Distributive law
(p ∧ q) ∨ r ⇔ (p ∨ r) ∧ (q ∨ r)
(p ∨ q) ∧ p ⇔ p Absorbtion law
(p ∧ q) ∨ p ⇔ p
¬ (p ∧ q) ⇔ ¬ p ∨ ¬ q De morgan’s law
¬ (p ∨ q) ⇔ ¬ p ∧ ¬ q
¬ p ∧ p ⇔ F Negation law
¬ p ∨ p ⇔ T
¬ (¬ p ) ⇔ p
Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Higher Mathematics July 28, 2016 21 / 53
23. Table 4. Logic equivalences involving Biconditions
Biconditions
p ↔ q ⇔ (p → q) ∧ (q → p)
p ↔ q ⇔ ¬p ↔ ¬q
p ↔ q ⇔ (p ∧ q) ∨ (¬p ∧ ¬q)
¬(p ↔ q) ⇔ p ↔ ¬q
Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Higher Mathematics July 28, 2016 23 / 53
24. Converse, Inverse, Contrapositive
Definition 11. (Converse)
The converse of a conditional proposition p → q is the proposition q → p
Definition 12. (Inverse)
The inverse of a conditional proposition p → q is the proposition
¬ p → ¬ q
Definition 13. (Contrapositive)
The contrapositive of a conditional proposition p → q is the proposition
¬ q → ¬ p.
Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Higher Mathematics July 28, 2016 24 / 53
25. For example
Let us consider the statement,
”The crops will be destroyed, if there is a flood.”
Let F : there is a flood & C : The crops will be destroyed
The symbolic form is, F → C.
Converse (C→F)
i.e., ”if the crops will be destroyed then there is flood.”
Inverse (¬F→¬C)
i.e.,”if there is no flood then the crops won’t be destroyed, .”
Contrapositive (¬C→¬F)
i.e., ”if the crops won’t be destroyed then there is no flood.”
Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Higher Mathematics July 28, 2016 25 / 53
26. Negation, Contradiction, Structure
Definition 14. (Negation)
Let p be a preposition. The negation of p, denoted by ¬p (also denoted
by p), is the statement
”it is not the case the p.”
The proposition ¬p is read ”not p”. The truth value of the negation of
p,¬p, is the opposite value of the truth value of p.
For example
Find the negation of the proposition ”Prathap PC runs Linux” and express
this in simple English.
Solution
The negation is ”It is not the case that Prathap PC runs Linux.” This
negation can be more simply expressed as ”Prathap PC does not run
Linux.”
Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Higher Mathematics July 28, 2016 26 / 53
27. Definition 14. (Contradiction)
A compound proposition that is always true, no matter what the truth
values of the propositional variables that occur in it, is called a tautology.
A compound proposition that is always false is called a contradiction. A
compound proposition that is neither a tautology nor a contradiction is
called a contingency.
For example
p ¬p p ∨ ¬p p ∧ ¬p
T F T F
T F T F
Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Higher Mathematics July 28, 2016 27 / 53
28. Direct Proofs and Disproofs
Nature & Importance of Proofs
In mathematics, a proof is:
A sequence of statements that form an argument. Must be correct
(well-reasoned, logically valid) and complete (clear, detailed) that rig-
orously & undeniably establishes the truth of a mathematical state-
ment.
Why must the argument be correct & complete?
Correctness prevents us from fooling ourselves. Completeness allows
anyone to verify the result.
Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Higher Mathematics July 28, 2016 28 / 53
29. Rules of Inference
Rules of inference are patterns of logically valid deductions from hy-
potheses to conclusions.
We will review ”inference rules” (i.e., correct & fallacious), and ”proof
methods”.
Inference Rules - General Form
Inference Rule
Pattern establishing that if we know that a set of hypotheses are all
true, then a certain related conclusion statement is true.
Hypothesis 1
Hypothesis 2...
∴ conclusion ”∴” means ”therefore”
Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Higher Mathematics July 28, 2016 29 / 53
30. Inference Rules & Implications
Each logical inference rule corresponds to an implication that is a tau-
tology.
Hypothesis 1
Hypothesis 2... Inference rule
∴ conclusion
Corresponding tautology:
((Hypoth. 1) ∧ (Hypoth. 2)∧... ) → conclusion
Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Higher Mathematics July 28, 2016 30 / 53
31. Some Inference Rules
Rule of Addition {p ⇒ p ∨ q}
”It is below freezing now. Therefore, it is either below freezing or
raining now.”
Rule of Simplification {p ∧ q ⇒ p}
”It is below freezing and raining now. Therefore, it is below freezing
now.”
Rule of Conjunction {p, q ⇒ p ∨ q}
”It is below freezing. It is raining now. Therefore, it is below freezing
and it is raining now.”
Rule of Modus Ponens & Tollens {p, p → q ⇒ q &
¬q, p → q ⇒ ¬p}
”If it is snows today, then we will go skiing” and ”It is snowing
today” imply ”We will go skiing”
Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Higher Mathematics July 28, 2016 31 / 53
32. Rule of hypothetical syllogism {p → q , q → r ⇒ p → r}
Rule of disjunctive syllogism {¬p, p ∨ q ⇒ q}
Formal Proofs
A formal proof of a conclusion C, given premises p1, p2...pn consists
of a sequence of steps, each of which applies some inference rule to
premises or to previously-proven statements (as hypotheses) to yield a
new true statement (the conclusion).
A proof demonstrates that if the premises are true, then the conclusion
is true (i.e., valid argument).
Example
Suppose we have the following premises:
”It is not sunny and it is cold.”
”if it is not sunny, we will not swim.”
”If we do not swim, then we will canoe.”
”If we canoe, then we will be home early.”
Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Higher Mathematics July 28, 2016 32 / 53
33. Given these premises, prove the theorem
”We will be home early” using inference rules”
Let us adopt the following abbreviations:
sunny = ”It is sunny”;
cold = ”It is cold”;
swim = ”We will swim”;
canoe = ”We will canoe”;
early = ”We will be home early”.
Then, the premises can be written as:
1 ¬ sunny ∨ cold
2 ¬ sunny ⇒ ¬ swim
3 ¬ swim ⇒ canoe
4 canoe ⇒ early
Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Higher Mathematics July 28, 2016 33 / 53
34. Step Proved by
¬ sunny ∨ cold Premise -1
¬ sunny Simplification of 1
¬ sunny ⇒ ¬ swim Premise -2
¬ swim Modus tollens on 2,3
¬ swim ⇒ canoe Premise -3
canoe Modus ponens on 4,5
canoe ⇒ early Premise -3
early Modus ponens on 6,7
Common Fallacies
A fallacy is an inference rule or other proof method that is not
logically valid.
− May yield a false conclusion!
Fallacy of affirming the conclusion:
− ”p ⇒ q is true, and q is true, so p must be true.” (No, because F
⇒ T is true.)
Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Higher Mathematics July 28, 2016 34 / 53
35. Fallacy of denying the hypothesis:
− ”p ⇒ q is true, and p is false, so q must be false.” (No, again
because F ⇒ T is true.)
Example
”If you do every problem in this book, then you will learn discrete
mathematics. You learned discrete mathematics.”
p: ”You did every problem in this book”
q: ”You learned discrete mathematics”
Fallacy of affirming the conclusion:
p ⇒ q and q does not imply p
Fallacy of denying the hypothesis:
p ⇒ q and ¬p does not imply ¬q
Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Higher Mathematics July 28, 2016 35 / 53
36. Inference Rules for Quantifiers
Universal instantiation {∀xP(x) ⇒ P(o)}
Universal generalization {P(g) ⇒ ∀xP(x)}
Existential instantiation {∃xP(x) ⇒ P(c)}
Existential generalization {P(o) ⇒ ∃xP(x)}
Example - 1
”Everyone in this discrete math class has taken a course in computer
science” and ”Marla is a student in this class” imply ”Marla has taken a
course in computer science”
D(x): ”x is in discrete math class”
C(x): ”x has taken a course in computer science”
Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Higher Mathematics July 28, 2016 36 / 53
37. Step Proved by
∀ x (D(x) ⇒C(x)) Premise -1
D(Marla) ⇒ C (Marla) Univ. instantiation
D(Marla) Premise -2
C(Marla) Modus tollens on 2,3
Example - 2
”A student in this class has not read the book” and ”Everyone in this class
passed the first exam” imply ”Someone who passed the first exam has not
read the book”
C(x): ”x is in this class”
B(x): ”x has read the book”
P(x): ”x passed the first exam”
Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Higher Mathematics July 28, 2016 37 / 53
38. Step Proved by
∃x (C(x) ∨¬ B(x)) Premise -1
(C(a)∨¬ B(a)) Exist. instantiation
C(a) Simplication on 2
∀x (C(x) Rightarrow P(x)) Premise -2
C(a) ⇒ P(a) Univ.instantiation
P(a) Modus ponens on 3,5
¬ B(a) Simplication on 2
P(a) ∧¬ B(a) Conjunction on 6,7
∃x (P(x)∧¬ B(x)) Exist. generalization
Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Higher Mathematics July 28, 2016 38 / 53
39. Example -3
Is this argument correct or incorrect?
− ”All TAs compose easy quizzes. Ramesh is a TA. Therefore,
Ramesh composes easy quizzes.”
First, separate the premises from conclusions:
− Premise -1: All TAs compose easy quizzes.
− Premise -2: Ramesh is a TA.
− Conclusion: Ramesh composes easy quizzes. Next, re-render the
example in logic notation.
Premise -1: All TAs compose easy quizzes.
− Let U.D. = all people
− Let T(x) = ”x is a TA”
− Let E(x) = ”x composes easy quizzes”
− Then premise-1 says: ∀x, T(x) ⇒ E(x)
Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Higher Mathematics July 28, 2016 39 / 53
40. Premise -2: Ramesh is a TA.
Let R = Ramesh
Then Premise -2 says: T(R)
Conclusion says: E(R)
The argument is correct, because it can be reduced to a sequence of
applications of valid inference rules, as follows
Statement How obtained
∃x (T(x) ⇒ E(x)) Premise -1
T(Ramesh) ⇒ E(Ramesh) Univ. instantiation
T(Ramesh) Premise - 2
E(Ramesh) Modus ponens on 2,3
Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Higher Mathematics July 28, 2016 40 / 53
41. Example-4
Correct or incorrect?
At least one of the 280 students in the class is intelligent. Y is a
student of this class. Therefore, Y is intelligent.
First: Separate premises/conclusion, & translate to logic:
− Premises:
(1) ∃ x InClass(x) ∧ Intelligent(x)
(2) InClass(Y)
− Conclusion: Intelligent(Y)
No, the argument is invalid; we can disprove it with a
counter-example, as follows:
Consider a case where there is only one intelligent student X in the
class, and X = Y .
−Then the premise ∃x in InClass(x) ∧ Intelligent(x) is true, by
existential generalization of InClass(x) ∧ Intelligent(x) − But the
conclusion Intelligent(Y) is false, since X is the only intelligent
student in the class, and Y = X.
Therefore, the premises do not imply the conclusion.
Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Higher Mathematics July 28, 2016 41 / 53
42. Proof Methods
Proving p ⇒ q
− Direct proof: Assume p is true, and prove q.
− Indirect proof: Assume ¬q, and prove ¬p.
− Trivial proof: Prove q true.
− Vacuous proof: Prove p is true.
Proving p
− Proof by contradiction: Prove ¬p ⇒ (r ∧ ¬r)
(r ∧ ¬r); therefore ¬p must be false.
Prove (a ∨ b) ⇒ p
− proof by cases: prove (a ⇒ p) and (b ⇒ p)
Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Higher Mathematics July 28, 2016 42 / 53
43. Definition
An integer n is called odd iff n = 2k + 1 for some integer k; n is even
iff n = 2k for some k.
Axioms
Every integer is either odd or even.
Theorem
(For all numbers n) If n is an odd integer, then n2 is an odd integer.
Proof
If n is odd, then n = 2k + 1 for some integer k. Thus,
n2 = (2k + 1)2 = 4k2 + 4k + 1 = 2(2k2 + 2k) + 1. Therefore n2 is of
the form 2j + 1 (with j the integer 2k2 + 2k), thus n2 is odd.
Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Higher Mathematics July 28, 2016 43 / 53
44. Example
Definition
A real number r is rational if there exist integers p and q = 0, with no
common factors other than 1 (i.e., gcd(p,q)=1), such that r = p
q . A
real number that is not rational is called irrational.
Theorem
Prove that the sum of two rational numbers is rational.
Indirect Proof
Proving p ⇒ q
− Indirect proof : Assume ¬q, and prove ¬p.
Theorem
(For all integers n) If 3n + 2 is odd, then n is odd.
Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Higher Mathematics July 28, 2016 44 / 53
45. Proof
Suppose that the conclusion is false, i.e., that n is even. Then n = 2k
for some integer k. Then 3n + 2 = 3(2k) + 2 = 6k + 2 = 2(3k + 1).
Thus 3n + 2 is even, because it equals 2j for integer j = 3k + 1. So
3n + 2 is not odd. We have shown that ¬(n is odd) ⇒ ¬(3n + 2 is
odd), thus its contra-positive (3n + 2 is odd) (n is odd) is also true.
Example
Theorem
Prove that if n is an integer and n2 is odd, then n is odd.
Trivial Proof
− Trivial proof : Prove q true.
Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Higher Mathematics July 28, 2016 45 / 53
46. Example
Theorem
(For integers n) If n is the sum of two prime numbers, then either n is
odd or n is even.
Proof
Any integer n is either odd or even. So the conclusion of the
implication is true regardless of the truth of the hypothesis. Thus the
implication is true trivially.
Vacuous Proof
Proving p ⇒ q
− Vacuous proof : Prove ¬p is true.
Example
Theorem
(For all n) If n is both odd and even, then n2 = n + n.
Proof
The statement ”n is both odd and even” is necessarily false, since no
number can be both odd and even. So, the theorem is vacuously true.
Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Higher Mathematics July 28, 2016 46 / 53
47. Proof by Contradiction
Proving p
− Assume ¬p, and prove that ¬p ⇒ (r ∧ ¬r)
− (r ∧ ¬r) is a trivial contradiction, equal to F
− Thus ¬p ⇒ F is true only if ¬p = F
Example
Theorem
Prove that
√
2 is irrational
Example
Prove that the sum of a rational number and an irrational number is
always irrational.
First, you have to understand exactly what the question is asking you
to prove:
”For all real numbers x, y, if x is rational and y is irrational, then
x + y is irrational.” ∀x, y: Rational(x) ∧ Irrational(y) ⇒
Irrational(x+y)
Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Higher Mathematics July 28, 2016 47 / 53
48. Next, think back to the definitions of the terms used in the statement
of the theorem:
−∀ reals r: Rational (r) ↔ ∃ Interger (i) ∧ Integer (j): r i
j
−∀ reals r: Irrational (r) ↔ ¬ Rational (r)
You almost always need the definitions of the terms in order to prove
the theorem!
Next, lets go through one valid proof
Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Higher Mathematics July 28, 2016 48 / 53
49. Mathematical Induction
Mathematical induction is a form of mathematical proof.
Just because a rule, pattern, or formula seems to work for several
values of n, you cannot simply decide that it is valid for all values of n
without going through a legitimate proof.
The Principle of Mathematical Induction
Let Pn be a statement involving the positive integer n. If
1 P1 is true, and
2 The truth of Pk implies the truth of Pk + 1 , for every positive integer
k, then Pn must be true for all integers n.
Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Higher Mathematics July 28, 2016 49 / 53
50. Example-1
Use mathematical induction to prove the following formula.
Sn = 1 + 3 + 5 + 7 + .....(2n − 1) = n2
First, we must show that the formula works for n = 1.
1 For n = 1
S1 = 1 = 12
The second part of mathematical induction has two steps. The first
step is to assume that the formula is valid for some integer k. The
second step is to use this assumption to prove that the formula is
valid for the next integer, k + 1.
2 Assume Sk = 1 + 3 + 5 + 7 + ..... + (2k − 1) = k2
is true, show that Sk+1 = (k + 1)2
Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Higher Mathematics July 28, 2016 50 / 53
51. Sk+1 = 1 + 3 + 5 + 7 + ... + (2k − 1) + [2(k + 1) − 1]
= [1 + 3 + 5 + 7 + ... + (2k − 1)] + (2k + 2 − 1)
= Sk + (2k + 1)
= k2 + 2k + 1
= (k + 1)2
Example-2
Use mathematical induction to prove the following formula
Sn = 12 + 22 + 32 + 42 + ..... + n2 = n(n+1)(2n+1)
6
1 Show n = 1 is true
Sn = 12 = 1(2)(3)
6
2 Assume that Sk is true
Sk = 12 + 22 + 32 + 42 + ..... + k2 = k(k+1)(2k+1)
6
show that Sk+1 = (k+1)(k+2)(2k+3)
6 is true.
Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Higher Mathematics July 28, 2016 51 / 53
52. Sk+1 = 12 + 22 + 32 + 42 + ..... + k2
= k(k+1)(2k+1)
6 + (k + 1)2
= k(k+1)(2k+1)+6(k+1)2
6
= (k+1)[k(2k+1)+6(k+1)]
6
= (k+1)[2k2+7k+6]
6
= (k+1)(k+2)(2k+3)
6
Exercise
1 Conjecture a formula for the sum of the first n positive odd integers.
Then prove your conjecture using mathematical induction.
2 Use mathematical induction to show that
1 + 2 + 22 + .... + 2n = 2n+1 − 1 for all non-negative integers n.
Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Higher Mathematics July 28, 2016 52 / 53
53. Next module will be updated soon...
For further queries
Prof.Dr.D.Ezhilmaran, Ph.D.,
Assistant Professor (Senior),
Department of Mathematics,
Vellore Institute of Technology, Tamilnadu, India.
E-mail.ID : ezhilmaran.d@vit.ac.in
Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Higher Mathematics July 28, 2016 53 / 53