Surprise Problem 1 Truth & Proof Math

advertisement
Mathematics for Computer Science
Team Problem
MIT 6.042J/18.062J
Truth & Proof
Surprise
Problem 1
Math vs. Reality
Propositional Logic
lec 1F.1
September 9, 2005
Copyright ©Albert R. Meyer, 2005.
Copyright ©Albert R. Meyer, 2005.
September 9, 2005
lec 1F.2
Not Math
Math
Sets
Numbers
t, f
Booleans
Strings
f ( x) = x + 2
2
4, 7, π , i + 1
”albert meyer”
Functions
Relations
a≤b
Data structures
Copyright ©Albert R. Meyer, 2005.
September 9, 2005
Family
lec 1F.3
Copyright ©Albert R. Meyer, 2005.
Not Math
September 9, 2005
lec 1F.4
Not Math
Solar System
Cats
Copyright ©Albert R. Meyer, 2005.
September 9, 2005
lec 1F.5
Copyright ©Albert R. Meyer, 2005.
September 9, 2005
lec 1F.6
1
Not Math: Cogito ergo sum
Evidence vs. Proof
Let p(n) ::= n2 + n + 41.
Claim:
∀n∈
µ
N
N
René Descartes'
For all n
MEDITATIONS
on First Philosophy in which the Existence of God and
the Distinction Between Mind and Body are Demonstrated.
p(n) is a prime number
numbers
that are natural
0,1,2,»
(h ttp://www.btinternet.com/~glynhughes/squashed/descartes.htm)
Copyright ©Albert R. Meyer, 2005.
lec 1F.7
September 9, 2005
Only Prime Numbers?
Evidence:
p(0) = 41
p (1) = 43
prime
p(2) = 47
prime
p (3) = 53
prime
p (20) = 461
prime
p (39) = 1601
prime enough already!
.
∀ n ∈ µ p(n) ::= n 2 + n + 41
prime
is a prime number
This is not a coincidence.
The hypothesis must be true.
But no!
looking good!
#
September 9, 2005
lec 1F.9
Only Prime Numbers?
Copyright ©Albert R. Meyer, 2005.
prime.
September 9, 2005
lec 1F.10
EULER'S CONJECTURE (1769)
a4 + b4 + c4 = d 4
Prove that 1681 is not prime.
has no solution for a,b,c,d positive integers
Proof: 1681 = p(40)
= 402 + 40 + 41
= 402 + 2⋅40 + 1
= (40 + 1)2
September 9, 2005
p (40) = 1681 is not
Evidence vs. Proof
Quickie:
Copyright ©Albert R. Meyer, 2005.
lec 1F.8
September 9, 2005
Only Prime Numbers?
#
Copyright ©Albert R. Meyer, 2005.
Copyright ©Albert R. Meyer, 2005.
∀a ∈ ] + ∀b ∈ ] + ∀c ∈ ] + ∀d ∈ ] +
a4 + b4 + c4 ≠ d 4
lec 1F.11
Copyright ©Albert R. Meyer, 2005.
September 9, 2005
lec 1F.12
2
Euler’s Conjecture
Propositional (Boolean) Logic
Proposition is either True or False
Counterexample: 218 years later by Noam
Elkies at Liberal Arts school up Mass Ave:
958004 + 2175194 + 414560 4 = 4224814
(= (+ (expt 95800 4)
Proof
(expt 217519 4)
(expt 414560 4))
by computer:
(expt 422481 4))
;Value: #t
Copyright ©Albert R. Meyer, 2005.
September 9, 2005
Examples:
Non-examples:
lec 1F.13
Operators
Copyright ©Albert R. Meyer, 2005.
2+2 = 4
1× 1 = 4
True
False
Wake up!
Where am I?
September 9, 2005
lec 1F.18
English to Math
∧ ::= AND
“If Greeks are Human, and Humans are
Mortal, then Greeks are Mortal.”
∨ ::= OR
((G → H ) ∧ ( H → M )) → (G → M )
¬ ::= NOT
→ ::= IMPLIES
↔ ::= IFF (if and only if)
Copyright ©Albert R. Meyer, 2005.
September 9, 2005
lec 1F.19
English to Math
Copyright ©Albert R. Meyer, 2005.
September 9, 2005
English to Math
Greeks carry Swords or Javelins
Greeks carry Bronze or Flint swords
(G → S ) ∨ (G → J )
N
disjunction
(G → B) ⊕
(G → F )
N
exclusive-or
P ⊕ Q means “P or Q but not both”
True even if a Greek carries both
Copyright ©Albert R. Meyer, 2005.
September 9, 2005
lec 1F.20
lec 1F.21
Copyright ©Albert R. Meyer, 2005.
September 9, 2005
lec 1F.22
3
Math vs. English
C Parent: If you don’t clean your room,
you can’t watch
a DVD.”
D
and
Copyright © Albert R. Meyer, 2005.
lec 1F.23
September 9, 2005
Math vs. English
Math vs. English
C Parent: If you don’t clean your room,
you can’t watch
a DVD.”
D
that is
Copyright © Albert R. Meyer, 2005.
Math vs. English
C
Mathematician:
“If a function is not continuous,
then it is not differentiable.”
C
Mathematician:
“If a function is not continuous,
then it is not differentiable.”
D
D
But
Copyright © Albert R. Meyer, 2005.
lec 1F.24
September 9, 2005
September 9, 2005
lec 1F.25
Copyright © Albert R. Meyer, 2005.
is not??
implied
September 9, 2005
lec 1F.26
Sound Rules
Deductions
From:
P implies Q, Q implies R
Conclude: P implies R
Definition: A rule is sound if the
conclusion is true whenever all
antecedents are true.
Antecedents
( P → Q), (Q → R)
P→R
Conclusion
Copyright © Albert R. Meyer, 2005.
September 9, 2005
lec 1F.27
Copyright © Albert R. Meyer, 2005.
September 9, 2005
lec 1F.28
4
A sound deduction
An Unsound Deduction
P → Q, P
Q
P →Q
P→Q
Modus ponens
Copyright ©Albert R. Meyer, 2005.
.
lec 1F.29
September 9, 2005
An Unsound Deduction
not Smart → not MIT-student
Yes!
Smart → MIT-student
No!
Copyright ©Albert R. Meyer, 2005.
September 9, 2005
Copyright ©Albert R. Meyer, 2005.
September 9, 2005
lec 1F.30
Team Problem
Problems 2 & 3
lec 1F.31
Copyright ©Albert R. Meyer, 2005.
September 9, 2005
lec 1F.32
5
Download