Chapter 3. Mathematical Reasoning 3.1 Methods of proof • A theorem is a statement that can be shown to be true. • A.
Download
Report
Transcript Chapter 3. Mathematical Reasoning 3.1 Methods of proof • A theorem is a statement that can be shown to be true. • A.
Chapter 3. Mathematical Reasoning
3.1 Methods of proof
• A theorem is a statement that can be shown to be true.
• A proof is to demonstrate that a theorem is true with a sequence of
statements that form an argument.
• An axiom or postulate is the underlying assumption about
mathematical structures, the hypothesis of the theorem to be proved,
and previously proved theorems.
• The rules of inference are the means used to draw conclusion from
other assertions which tie together the steps of a proof.
• A lemma is a simple theorem used in the proof of other theorems.
• A corollary is a proposition that can be established directly from a
theorem that has been proved.
• A conjecture is a statement whose truth is unknown. When its proof
is found, it becomes a theorem.
• Rules of Inference
The rules of inference provide the justification of the steps used to
show that a conclusion follows logically from a set of hypotheses.
• Basis of the rule of inference: the law of detachment
p
pq
q
hypotheses
conclusion
It is thesame as tosay that (p (p q)) q is a tautology.
Example 1
It is snowing today.
If it snows today, then we will go skiing.
We will go skiing.
Table 1 Rules of Inference
Rules of Inference
p
pq
pq
p
p
q
pq
p
pq
q
q
pq
p
pq
qr
pr
pq
p
q
Tautology
Name
p ( p q)
Addition
( p q) p
Simplification
( p q) ( p q)
Conjunction
( p ( p q)) q
Modus ponens
(detachment law)
(q ( p q)) p
Modus tollens
Hypothetical
(( p q) (q r )) ( p r )
syllogism
(( p q) p) q
Disjunctive
syllogism
Example 2
If n is divisible by 3, thenn 2 is divisible by 9.
n is divisible by 3.
n 2 is divisible by 9.
Example 3
State which rule of inferenceis thebasis of thefollowing
argument: It is below freezingnow. T herefore,it is either
below freezingor rainingnow.
Solution
p
pq
Example 4
State which rule of inferenceis thebasis of thefollowing
argument: It is below freezingand rainingnow. T herefore,
it is below freezingnow.
Solution
pq
p
Example 5
State which rule of inferenceis thebasis of thefollowing
argument: If it rains, then wewill not havea barbecue today.
If we do not havea barbecue today,then wewill havea
Solution
pq
qr
pr
barbecue tomorrow.T herefore,if it rains today,we will have
a barbecue tomorrow.
Step
p: It is sunny this afternoon.
Example 6
1. p q
q
Show the following hypotheses :
2. p
(1) It is not sunny this afternoon and it is colder than
3. r p
yesterday.
r
4. r
(2)We will go swimming only if it is sunny.
s
5.r s
(3) If we do not go swimming, then we will take a
6. s
canoe trip.
t
7. s t
(4) If we take a canoe trip, then we will be home by
8. t
sunset.
lead to the conclusion “We will be home by sunset”.
Reason
Hypothesis
Simplification (1)
Hypothesis
Modus tollens(2,3)
Hypothesis
Modus ponens(4,5)
Hypotheis
Modus ponens(6,7)
Example 7
Step
Reason
1. p q
Hypothesis
Show that the hypotheses
2. q p Contraposition (1)
q
(1) If you send me an e-mail message,
3. p r
Hypothsis
Hypothet ic
al syllogism (2,3)
then I will finish writing the program, 4. q r
r
5. r s
Hypothsis
(2) If you do not send me an e-mail massage,
6. q s
Hypothet ic
al syllogism(4,5)
then I will go to sleep early,
s
(3) If I go to sleep early, then I will wake up
feeling refreshed
p
lead to the conclusion “If I do not finish
writing program, then I will wake up
An argumentis called valid if wheneverhypothesesare true,
feeling refreshed”.
thecounclut ion is also true.
Consequently, q logically follows from thehypotheses
p1,p2 ,..., pn is thesame as showing that theimplication
( p1 p2 pn ) q is true.
3.2 Mathematical Induction
How to prove 1+2+…+n=n(n+1)/2 for n=1,2,…?
Use mathematical induction!
The Well-Ordering Property
Every nonempty set of nonnegative integers has a least element.
Mathematical Induction(1)
Mathematical induction is used to prove the form nP(n) is true.
Where the universe of discourse is the set of positive integers.
1. Basis step. The proposition P(1) is shown to be true.
2. Inductive step. The implication
P(k ) P(k 1) is shown tobe turefor everypositiveintegerk.
T heproof techniquecan be statedas [ P(1) k ( P(k ) P(k 1))] nP(n).
p
pq
q
Why does Mathematical induction work?
Law of detachment
P (1)
P (1) P (2)
P(1)
P ( 2)
P(2)
P(2) P(3)
P(3)
P(3)
P(3) P(4)
P(4)
P(k 1)
P(k 1) P(k )
P( k )
P(n)
Example 1
Use mathematic
al inductionto provethat thesum of thefirst n odd positive
integersis n 2 .
1 = 12. Therefore, P(1) is true.
Inductive step : Assuming P(k) is true, we prove P(k 1 ) is true.
1 3 5 (2k 1) (2k 1)
Basis step : We prove P(1) is true.
= k2 (2k 1) = ( k 1) 2
Therefore, for any k if P(k) is true then P(k 1 ) is true.
Example 2
P(n)
Use Mathematical induction to prove the inequality
n 2n for all positiveintegersn.
Basis step : P(1 ) is true,since 1 21.
Inductivestep : Assume P(k)is true, thatis, k 2 k . We need to show
thatP(k 1 ) is true.
From k 1 2 k 1 2 k 2 k = 2 k 1 , we get thatP(k 1 ) is true.
Mathematical Induction(2)
Mathematical induction is used to prove the form nP(n) is true.
Where the universe of discourse is the set of contiguous integers:
m,m+1,m+2,….
1. Basis step. The proposition P(m) is shown to be true.
2. Inductive step. The implication
P(k ) P(k 1) is shown tobe truefor everypositiveintegerk m.
Example 3
P(n)
Use Mathematical induction to prove that
1 2 22 23 2k = 2k 1 1 for all nonnegative integersk.
Basis step : P(0) is truesince 20 = 1 = 21 1.
Inductivestep : Assuming P(k)is true, we proveP(k 1) is true:
1 2 2 2 23 2 k 2 k 1
= (1 2 2 2 23 2 k ) 2 k 1
= (2 k 1 1) 2 k 1 = 2 2 k 1 1 = 2 k 2 1.
Example 4 Sums of Geometric Progressions
Use Mathematical induction to prove the following formula:
n 1
n
ar
a
j
2
n
P(n)
ar
=
a
ar
ar
ar
=
,
when
r
1
.
r 1
j =0
ar a
Basis step : P(0) is true, since a =
r 1
Inductivestep : Assum eP(k)is true.We proveP(k 1 ) is true:
a ar ar2 ark ar k 1
k 1
k 2
ar
a
ar
a
2
k
k 1
k 1
= (a ar ar ar ) ar =
ar =
r 1
r 1
Example 5 Inequality for Harmonic Numbers.
1 2
1
(Hormonic numbers : H i = 1 , for i = 1,2,3,....)
2 3
i
Use Mathematical induction to prove that H n 1 n / 2.
P(n)
2
Basis step : P(0) is true,since H 20 = H1 = 1 1 0 / 2.
Inductivestep : Assum eP(k)is true.We proveP(k 1 ) is true:
1 1
1
1
1
H 2k 1 = 1 k k
k 1
2 3
2
2 1
2
1
1
= H 2k k
k 1
2 1
2
k
1
1
(1 ) k
k 1 (by theinductivehypothesis)
2 2 1
2
k
1
k
(1 ) 2 k 1 (since thereare termseach not less than1/2k 1 )
2
2
k 1
k 1
(1 ) = 1
.
2 2
2
Example 6 The numbers of Subsets of a Finite Set
Use Mathematical induction to prove that
If S is a finiteset withn elements,thenS has 2n subsets.
P(n)
Basis step : P(0) is true,since theemptyset has exactly
20 = 1 subsets, namely,itself.
Inductivestep : Assum eP(k)is true.We provethat P(k 1 ) is true:
Let a be one elementof S and S ' = S-{a}.
T hesubsets of S can be obtainedin thefollowing way :
For each subset X of S', Xand X {a} are thesubsets of S .
Since thereare 2 k subsets of S , thereforeS has 2 2 k = 2 k 1
subsets.
X {a}
X
X
3.3 Recursive Definitions
Recursive definitions: defining an object by itself.
For example,an = 2n for n = 0,1,2,...can also be defined as
an1 = 2an for n = 0,1,2,....
Recursively defined functions
To define a function with these of nonnegative integers as its domain,
1.
Specify the value of the function at zero.
2.
Give a rule for finding its value at an integer from its values at
smaller integers.
Such a definition is called a recursive or inductive definition.
Example 1 Function f is recursively
f(1)=2f(0)+3=9,
defined by f(0)=3, f(n+1)=2f(n)+3.
f(2)=2f(1)+3=21,
Find f(1),f(2) and f(3).
f(3)=2f(3)+3=93.
Example 2
Give an inductive definition of the factorial function F(n)=n!.
Solution
F(0)=1
F(n+1)=(n+1)F(n)
Example 3
Give a recursivedefinitionof a n where a is a nonzeroreal number and
n is a nonnegative integer.
Solution
a0 = 1
an 1 = a an for n = 0,1,2,....
n
Example 4 Give a recursivedefinitionof ak .
k =0
Solution
0
a
k =0
k
n 1
a
k =0
= a0 ,
n
k
= ( a k ) an 1.
k =0
Example 5
T heFibonaccinumbers, f 0 , f1 , f 2 ...
f 2 = f1 f 0 = 1,
are defined recursively as follows:
f 3 = f 2 f1 = 2,
f 0 = 0,
f1 = 1,
f n = f n 1 f n 2 .
Whatis theFibonaccinumbers f 2 ,f3 ,f4 , and f 5 ?
f 4 = f 3 f 2 = 3,
f 5 = f 4 f 3 = 5.