DS - Lecture04 B
DS - Lecture04 B
DS - Lecture04 B
INTRODUCTION
METHODS OF PROOF
INDIRECT PROOF
DIRECT PROOF
pq
PROOF BY PROOF BY
CONTRAPOSITION CONTRADICTION
p q ~q~p p q (p~q) c
1
DIRECT PROOF
The implication p q can be proved by showing that if p is true, then q
must also be true. This shows that the combination p true and q false never
occurs. A proof of this kind is called a direct proof (or if there does not exist
a condition of p true and q false).
p q p q
T T T
T F F
F T T
F F T
SOME BASICS
1. An integer n is even if, and only if, n = 2k for some integer k like 6=2(3).
2. An integer n is odd if, and only if, n = 2k + 1 for some integer k e,g.
(7=2(3)+1.
3. An integer n is prime if, and only if, n > 1 and for all positive integers r
and s, if n = r·s, then r = 1 or s = 1.
4. An integer n > 1 is composite if, and only if, n = r·s for some positive
integers r and s with r 1 and s 1(e.g 7 is a prime number and 8 is a
composite number as 8=(4)(2).
a
5.A real number r is rational if, and only if, r for some integers a and b
b
with b0.
6.If n and d are integers and d 0, then d divides n, written d|n if, and only
if, n = d.k for some integers k.
7.An integer n is called a perfect square if, and only if, n = k 2 for some
integer k(e.g 16=42).
2
EXERCISE
3
EXERCISE
Prove that the product of an even integer and an odd integer is even.
SOLUTION
Suppose m is an even integer and n is an odd integer. Then
m = 2k for some integer k
and n = 2l + 1 for some integer l
Now
m·n = 2k · (2l + 1)
= 2·k (2l + 1)
= 2·r where r = k(2l + 1) is an integer
Hence m·n is even. (Proved)
EXERCISE
Prove that, if the sum of any two integers is even, then so is their difference.
SOLUTION
Suppose m and n are integers so that m + n is even. Then by definition of
even numbers
m + n = 2k for some integer k
m = 2k - n ……………….(1)
Now m - n= (2k - n) - n using (1)
= 2k - 2n
= 2 (k - n) = 2r where r = k - n is an integer
Hence m - n is even.
5
EXERCISE
Given any two distinct rational numbers r and s with r < s. Prove that there
is a rational number x such that r < x < s.
PROOF
Given two distinct rational numbers r and s such that
r<s ………………….(1)
Adding r to both sides of (1), we get
r+r<r+s
2r < r + s
rs 6
r ………………….(2)
2
Next adding s to both sides of (1), we get
r+s<s+s
r + s < 2s
rs
s ………………………(3)
2
Combining (2) and (3), we may write
rs
r s ……………………..(4)
2
Since the sum of two rationals is rational, therefore r + s is rational. Also
the quotient of a rational by a non-zero rational, is rational, therefore r s
is rational and by (4) lies between r & s. 2
rs
Hence, we have found a rational number x
2
such that r < x < s. (proved)
EXERCISE
Prove that for all integers a, b and c, if a|b and b|c then a|c.
PROOF
Suppose a|b and b|c where a, b, c Z. Then by definition of divisibility
b=a·r and c=b·s for some integers r and s.
Now c = b·s
= (a·r)·s (substituting value of b)
= a·(r·s) (associative law)
= a·k where k = r·s Z
a|c by definition of divisibility
7
EXERCISE
Prove that for all integers a, b and c if a|b and a|c then a|(b+c)
PROOF
Suppose a|b and a|c where a, b, c Z
By definition of divides
b = a·r and c = a·s for some r, s Z
Now
b+c = a·r + a·s (substituting values)
= a·(r+s) (by distributive law)
= a·k where k = (r + s) Z
Hence a|(b + c) by definition of divides.
EXERCISE
8
EXERCISE
11