Uploaded by Ketro Sithole

COS210 - Lecture 2 - Annotated

advertisement
COS210 - Theoretical Computer Science
Introduction to Proofs (Part 2)
Mathematical Preliminaries
c CW Cleghorn and L Marshall
Proof by Contradiction
Proof by contradiction is a very common proof technique that often relies
on a bit of logical manipulations. The simple form is:
Theorem
Statement S is true
Proof:
Assume that statement S is false.
Then, derive a contradiction.
Which implies S could not have been false, therefore S is true.
Mathematical Preliminaries
c CW Cleghorn and L Marshall
Proof by Contradiction
The most common application is in the following form.
Theorem
Statement A implies statement B. (A =) B)
Proof:
Assume that statement A =) B is false.
Recall that (A =) B) = ¬A _ B
So ¬(A =) B) = ¬(¬A _ B) = A ^ ¬B
So in essence we assume A ^ ¬B, derive a contradiction, therefore
A =) B must be true
Mathematical Preliminaries
c CW Cleghorn and L Marshall
Proof by Contradiction: Example 1
Theorem
Let n be a positive integer. If n2 is even then n is even.
Proof:
Discussed
Mathematical Preliminaries
in
class
c CW Cleghorn and L Marshall
Proof by Contradiction: Example 2
Consider the classic result
Theorem
p
2 is irrational
Proof:
Mathematical Preliminaries
c CW Cleghorn and L Marshall
Assume
rational
is
mln
I
m
A
n
I l
n
m
2
z
m2
2n2
every
is
m
k
2K
m
2 m2
een
30
m2
c
Z
Ak2
212
n
is
m2
n
Ms
is
even
is
even
not
rational
as
assumped
Proof by Contradiction: Example 3
Consider the result
Theorem
The sum of a rational number and an irrational number is irrational.
Proof:
Mathematical Preliminaries
c CW Cleghorn and L Marshall
Let
be
a
in
b
is
Td
a
Td
number
irrational
an
atb
Assume
Let
rational
a
number
rational
atb
and
mln
mln
tb
mln
b
b is
C
rational
Il
Proof by Contradiction: Example - 4
Theorem
p
If a and b are positive real numbers with a 6= b, then a + b > 2 ab.
Proof: Homework
atb
a
Mathematical Preliminaries
a
c CW Cleghorn and L Marshall
Assume
2Mab
atb
atb
am
a
As
a
b
a
ERT
tb
atb
Cat b
O
o
Z
Aab
E
5
i.ca
and
O
2
2
i
0
F
inequality does
not
both
q
at
change
are
2ab
gas
a2t2abtb2
a
2
2
Cee
b
b
Aab
E
t
b
2
2
f
O
E
O
Ihs
two
rhs
b
f
a
b
a
Ca
O
O
b
and
contradict
directly
another
one
If
then
a
b
It
tb
a
2nd
b
Nonconstructive Proofs
In contrast to a constructive proof,
In a nonconstructive proof, we only show that an object with
property P exists.
We do not construct the specific object.
Mathematical Preliminaries
c CW Cleghorn and L Marshall
Nonconstructive Proofs: Examples
Theorem
There exist irrational numbers x and y such that x y is rational.
Proof:
Mathematical Preliminaries
c CW Cleghorn and L Marshall
A
case
I
E
a
FACT
GQ
x
AF
x
y
My
say
2
y
Ms
Mz
is
Pigeon Hole Principle
Definition (Pigeon Hole Principle)
If n + 1 or more objects are placed into n boxes, then there is at least one
box containing two or more objects.
Definition (Alt:Pigeon Hole Principle)
If A and B are two sets such that |A| > |B|, then there is no one-to-one
function from A to B.
A function f : A ! B is one-to-one (or injective), if for any two
distinct elements a and a0 in A, we have f (a) 6= f (a0 ).
Mathematical Preliminaries
c CW Cleghorn and L Marshall
Pigeon Hole Principle: Application
Despite the simplicity (and obviousness) its application comes up rather
frequently.
Consider a course with 1200 students like COS132.
There will be at least 2 students with the same last three digit of
their student number.
I
Why?
Mathematical Preliminaries
c CW Cleghorn and L Marshall
Pigeon Hole Principle: Application
Despite the simplicity (and obviousness) its application comes up rather
frequently.
Consider a course with 1200 students like COS132.
There will be at least 2 students with the same last three digit of
their student number.
I
I
Why?
Each digit has 10 possibilities, there are only 10 ⇤ 10 ⇤ 10 = 1000, 3
digits suffixes, therefore there must be at least one duplicated 3 digits
suffixes
Mathematical Preliminaries
c CW Cleghorn and L Marshall
Pigeon Hole Principle: Application
Theorem
If there are five points p1 , p2 , · · · , p5 in the interior of a square S of side
length 1, then no matter how
p you place them there will be at least two
points that are closer than 2/2 from each other.
Proof:
Mathematical Preliminaries
c CW Cleghorn and L Marshall
i
Download