1. Umm-AlQura University
College of Computer Science & Information systems
Discrete Structures
Winter 2014
Dr. Sonia Hashish
Chapter 1: Proofs
Discrete Structures: Winter 2014.
Dr. Sonia Hashish
2. Discrete Structures: Winter 2014.
Dr. Sonia Hashish
Theorem: a statement that can be shown to be true (sometimes referred to
as facts or results). Less important theorems are often called propositions.
Axiom (or postulates) are statements that we assume to be true.
A conjecture is a statement that is being proposed as a true statement. If
later proven, it becomes a theorem, but it may be false.
A corollary is a theorem proven as an easy consequence of a theorem.
A lemma is a less important theorem, used as an auxiliary result to prove a
more important theorem.
A proof is a valid argument that establishes the truth of a theorem. The
statements used in a proof include axioms, hypotheses (or premises), and
previously proven theorems. Rules of inference, together with definition of
terms, are used to draw conclusions.
3. Discrete Structures: Winter 2014.
Dr. Sonia Hashish
Many theorems assert that a property holds for all elements in
a domain, such as the integers or the real numbers.
Although the precise statement of such theorems needs to
include a universal quantifier, the standard convention in
mathematics is to omit it.
For example, the statement “If x > y, where x and y are
positive real numbers, then x2 > y2 ” is the same as “For all
positive real numbers x and y, if x >y, then x2 > y2 ” which
formally can be written as ∀x ∀y (((x ≥ 0) ∧ (y ≥ 0) ∧ (x > y )
→ (x2 > y2)).
Discrete Structures: Winter 2014.
Dr. Sonia Hashish
4. Discrete Structures: Winter 2014.
Dr. Sonia Hashish
To prove a theorem of the form ∀x(P(x) → Q(x)), we start by
proving that the implication: P(c) → Q(c) is true for an arbitrary
element c.
We can use any of the following methods to show that
propositions based on the conditional statement p → q are true.
Direct proofs: Assume p is true; the last step establishes q is true.
Proof by Contraposition: Uses a direct proof of the contrapositive
¬q →¬p. That is, assume ¬q is true; the last step establishes is ¬p
true.
Proof by Contradiction: To prove that P is true, we assume ¬p is
true and reach a contradiction, that is (r ^ ¬ r) is true for some
proposition r. In particular, to prove p → q ,we assume p → q is
false, and get as a consequence a contradiction. Assuming that p
→ q is false ≡ (p ^ ¬ q) is true.
5. Discrete Structures: Winter 2014.
Dr. Sonia Hashish
A formal direct proof of a conditional statement p → q
:assume p is true, build steps using inference rules, with the
final step showing that q is true.
Examples
Def.
The integer n is even if there exists an integer k such that n =
2k, and n is odd if there exists an integer k such that n = 2k + 1.
Def.
The integer n is even if there exists an integer k such that n =
2k, and n is odd if there exists an integer k such that n = 2k + 1.
Give a direct proof of the theorem
“If n is an odd integer, then n2 is odd.”.
Give a direct proof of the theorem
“If n is an odd integer, then n2 is odd.”.
Give a direct proof of the theorem
“If n is an even integer, then n2 is even.”.
Give a direct proof of the theorem
“If n is an even integer, then n2 is even.”.
6. Discrete Structures: Winter 2014.
Dr. Sonia Hashish
This theorem states ∀n (P (n) → Q(n)), where P(n) is “n is an odd
integer” and Q(n) is “n2 is odd.”
We start by showing that P(n) implies Q(n), we assume that the
hypothesis of this conditional statement is true, that is “n is odd”.
So n = 2k + 1(by def.), where k is some integer.
Then we find that n2= (2k + 1)2= 4k2+ 4k + 1 = 2(2k2+ 2k) + 1.
By the definition of an odd integer, we can conclude that n2 is an
odd integer (it is one more than twice an integer).
Consequently, we have proved that if n is an odd integer, then n2
is an odd integer. ▲
Give a direct proof of the theorem
“If n is an odd integer, then n2 is odd.”.
Give a direct proof of the theorem
“If n is an odd integer, then n2 is odd.”.
7. Discrete Structures: Winter 2014.
Dr. Sonia Hashish
Proof:
Let p=a/b for some integers a and b and let q =c/d for
some integers c and d then
p+ q= a/b + c/d= (ad + bc)/bd
(ad + bc) and bd are integers and bd ≠0 so p + q is
rational.
Give a direct proof of the theorem
“The sum of two rational numbers is rational”.
“if p and q are rational numbers then p+q is rational”
Give a direct proof of the theorem
“The sum of two rational numbers is rational”.
“if p and q are rational numbers then p+q is rational”
8. Discrete Structures: Winter 2014.
Dr. Sonia Hashish
Proof by contraposition make use of the fact that the
conditional statement p → q is equivalent to its contrapositive,
¬q →¬p.
This means that the conditional statement p → q can be
proved by showing that its contrapositive, ¬q →¬p, is true.
In a proof by contraposition of p → q, we take ¬q as a
premise, and using axioms, definitions, and previously proven
theorems, together with rules of inference, we show that ¬p
must follow.
9. Discrete Structures: Winter 2014.
Dr. Sonia Hashish
Assume that the conclusion of the conditional statement is
false; namely, assume that n is even.
Then, n = 2k for some integer k.
We then find that 3n + 2 = 3(2k) + 2 = 6k + 2 = 2(3k + 1).
So 3n + 2 is even and therefore not odd.
This is the negation of the premise of the theorem. Because
the negation of the conclusion of the conditional statement
implies that the hypothesis is false, the original conditional
statement is true.
Prove that if n is an integer and 3n + 2 is odd, then n is odd.Prove that if n is an integer and 3n + 2 is odd, then n is odd.
10. Discrete Structures: Winter 2014.
Dr. Sonia Hashish
We can use contrapositive of the theorem i.e.
we prove that
Prove that “the square root of irrational number is irrational”.Prove that “the square root of irrational number is irrational”.
if r is irrational number then √r is also irrational.if r is irrational number then √r is also irrational.
if √r rational number then r is rational.if √r rational number then r is rational.
11. Discrete Structures: Winter 2014.
Dr. Sonia Hashish
Proof: let √r= x/y where x and y are integers.
Squaring both sides we get r=x2/y2 where x2 and y2 are integers
,hence r is also rational.
if √r rational number then r is rational.if √r rational number then r is rational.
12. Discrete Structures: Winter 2014.
Dr. Sonia Hashish
Proof by contradiction is another type of indirect
proof.
We prove the proposition is true by showing that the
proposition's being false would imply a contradiction.
This means that ¬p → q where q is a contradiction.
Because the statement r ∧¬r is a contradiction
whenever r is a proposition, we can prove that p is
true if we can show that ¬p → (r ∧¬r) is true for
some proposition r.
13. Discrete Structures: Winter 2014.
Dr. Sonia Hashish
Let p be “n is even” and q be “n2 is even.” To construct a
proof by contradiction,
assume that both p and ¬q are true. That is, assume that n is
even and that n2 is odd.
So we have n2 = 2k+1
n2 -1=2k, (n-1)(n+1)=2k,
both multiplicands are even or odd.
They have to be to be even to provide “2k” This means n
must be odd which contradicts our assumption that n is
even.
Prove that if n is an even number then n2 is also even.Prove that if n is an even number then n2 is also even.
14. Discrete Structures: Winter 2014.
Dr. Sonia Hashish
Assume that ¬p is true. Note that ¬p is the statement “It is not the case that √2 is
irrational,” which says that √2 is rational. We will show that assuming that ¬p is
true leads to a contradiction.
If √2 is rational, there exist integers a and b with √2 = a/b, where b≠0 and a and b
have no common factors (so that the fraction a/b is in lowest terms.)
So 2 = a2 / b2 and 2b2 =a2
So a is an even number (We use the fact that “if the square of an integer is even the
integer is even), a can be written as a=2c
so 2b2 =4c2 and b2 =2c2
Both a and b are even which implies that 2 divides both of them.
Prove that √2 is irrational by giving a proof by contradiction.Prove that √2 is irrational by giving a proof by contradiction.
15. Discrete Structures: Winter 2014.
Dr. Sonia Hashish
Let p be “3n + 2 is odd” and q be “n is odd.” To construct a
proof by contradiction,
assume that both p and ¬q are true. That is, assume that 3n + 2
is odd and that n is even.
Because n is even, there is an integer k such that n = 2k. This
implies that 3n + 2 = 3(2k) + 2 = 6k + 2 = 2(3k + 1). Because
3n + 2 is 2t , where t = 3k + 1, 3n + 2 is even. This is
equivalent to the statement ¬p, because an integer is even if
and only if it is not odd. Because both p and ¬p are true, we
have a contradiction. ▲
Give a proof by contradiction of the theorem “If 3n + 2 is odd,
then n is odd.”
Give a proof by contradiction of the theorem “If 3n + 2 is odd,
then n is odd.”
16. Discrete Structures: Winter 2014.
Dr. Sonia Hashish
Split the proof into cases and prove each case
separately
Must cover all possible cases
When only finite instances are considered it turns to be
exhaustive proof.
17. Discrete Structures: Winter 2014.
Dr. Sonia Hashish
Since n is not divisible by 5, it leaves a remainder of 1, 2, 3, or 4 when it is
divided by 5. These four cases exhaust all the possibilities {n=5k+1,
n=5k+2, n=5k+3, n=5k+4}
For n=5k+1, n2 = (5k+1)2 =25k2+10k+1=5(5k2+2k)+1 which is divisible by
5 with reminder 1.
For n=5k+2, n2 = (5k+2)2 =25k2+20k+4=5(5k2+4k)+4 which is divisible by
5 with reminder 4.
For n=5k+3, (5k+3)2 =25k2+30k+9=5(5k2+6k+1)+4 which is divisible by 5
with reminder 4.
For n=5k+4, (5k+4)2 =25k2+40k+16=5(5k2+8k+3)+1 which is divisible by
5 with reminder 1.
Prove that if n is any integer which is not divisible by 5, then n2
leaves a remainder of 1 or 4 when it is divided by 5.
Prove that if n is any integer which is not divisible by 5, then n2
leaves a remainder of 1 or 4 when it is divided by 5.
18. Discrete Structures: Winter 2014.
Dr. Sonia Hashish
Case 1. n is even, n=2k
Case 2. n is odd, n=2k+1
For both cases, substitute into 3n2 + n+14 and reformat
so that we have it in the form 2(k’) to prove that it is
an even.
Prove that if n is an integer, then 3n2 + n+14 is evenProve that if n is an integer, then 3n2 + n+14 is even
19. Discrete Structures: Winter 2014.
Dr. Sonia Hashish
We use a proof by exhaustion, by examining the cases n
= 1, 2.
for n=1 then 22 ≥31
for n=2 then 32 ≥32
Prove that (n + 1)2 ≥3n if n is a positive
integer with n ≤ 2.
Prove that (n + 1)2 ≥3n if n is a positive
integer with n ≤ 2.
20. Discrete Structures: Winter 2014.
Dr. Sonia Hashish
“Proof:" We use these steps, where a and b are two equal positive integers.
Step Reason
1. a = b Given
2. a2= ab Multiply both sides of (1) by a
3. a2 - b2 = ab - b2 Subtract b2 from both sides of (2)
4. (a - b)(a + b) = b(a - b) Factor both sides of (3)
5. a + b = b Divide both sides of (4) by a - b
6. 2b = b Replace a by b in (5) as a = b and simplify
7. 2 = 1 Divide both sides of (6) by b
What is wrong with this famous supposed “proof”
that 1 = 2?
What is wrong with this famous supposed “proof”
that 1 = 2?