Download Only Prime Numbers?

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Mathematics for Computer Science
MIT 6.042J/18.062J
Truth and Proof
Math vs. Reality
Propositions & Predicates
Copyright © Albert R. Meyer, 2002. All rights reserved.
February 7, 2002
L1-2.1
Only Prime Numbers?
Let p(n) :: n  n  41.
2
Hypothesis:
n 
Copyright © Albert R. Meyer, 2002. All rights reserved.
p (n ) is a prime number
February 7, 2002
L1-2.2
Only Prime Numbers?
Evidence:
p(0)  41
p (1)  43
prime
p (2)  47
prime
p(3)  53
prime
p(20)  461
prime
looking good!
p (39)  1601
prime
enough already!
Copyright © Albert R. Meyer, 2002. All rights reserved.
February 7, 2002
prime
L1-2.3
Only Prime Numbers?
n 
.
p(n) :: n  n  41
2
is a prime number
This can’t be a coincidence.
The hypothesis must be true.
BUT IT’S NOT:
p(40)  1681 is NOT PRIME.
Copyright © Albert R. Meyer, 2002. All rights reserved.
February 7, 2002
L1-2.4
Only Prime Numbers?
Quickie:
Prove that 1601 is prime,
and 1681 is not prime.
Copyright © Albert R. Meyer, 2002. All rights reserved.
February 7, 2002
L1-2.5
Further Extreme Example
EULER'S CONJECTURE (1769)
a b c  d
has no solution for a, b, c ,d positive integers:
4
a 

4
4

b 
4
c 

d 
a b c  d
4
Copyright © Albert R. Meyer, 2002. All rights reserved.
4
February 7, 2002
4

4
L1-2.6
Further Extreme Example
Counterexample: 218 years later by Noam
Elkies at Liberal Arts school up Mass Ave:
95800  217519  414560  422481
4
4
4
4
(= (+ (expt 95800
4)
(expt 217519 4)
(expt 414560 4))
(expt 422481 4))
;Value: #t
Copyright © Albert R. Meyer, 2002. All rights reserved.
February 7, 2002
L1-2.7
Further Extreme Example
Hypothesis:
313  ( x  y )  z
3
3
3
has no positive integer solution.
False. But smallest counterexample has
MORE THAN 1000 digits!
Copyright © Albert R. Meyer, 2002. All rights reserved.
February 7, 2002
L1-2.8
Evidence vs. Proof
Claim: All odd numbers greater than 1 are prime.
MATHEMATICIAN: 3 is prime, 5 is prime,
7 is prime, but 9  3  3 is not prime, so the
proposition is false!
Copyright © Albert R. Meyer, 2002. All rights reserved.
February 7, 2002
L1-2.9
Evidence vs. Proof
Claim: All odd numbers greater than 1 are prime.
PHYSICIST: 3 is prime, 5 is prime, 7 is
prime, 9 is not prime, but 11 is prime, 13 is
prime. So 9 must be experimental error; the
proposition is true!
Copyright © Albert R. Meyer, 2002. All rights reserved.
February 7, 2002
L1-2.10
Evidence vs. Proof
Claim: All odd numbers greater than 1 are prime.
LAWYER: Ladies and Gentleman of the
jury, it is beyond all reasonable doubt that
odd numbers are prime. The evidence is
clear: 3 is prime, 5 is prime, 7 is prime, 9 is
prime, 11 is prime, and so on.
Copyright © Albert R. Meyer, 2002. All rights reserved.
February 7, 2002
L1-2.11
Math
Sets
Numbers
T, F
Booleans
Strings
F ( x)  x 2  2
Functions


F  m a
Relations
Copyright © Albert R. Meyer, 2002. All rights reserved.
7 , , i  1
a b
ab
Vectors
February 7, 2002
L1-2.12
Not Math
Solar System
Copyright © Albert R. Meyer, 2002. All rights reserved.
February 7, 2002
L1-2.13
Not Math
Physical Motion
Copyright © Albert R. Meyer, 2002. All rights reserved.
February 7, 2002
L1-2.14
Not Math
Family
Copyright © Albert R. Meyer, 2002. All rights reserved.
February 7, 2002
L1-2.15
Not Math
Cats
Copyright © Albert R. Meyer, 2002. All rights reserved.
February 7, 2002
L1-2.16
Not Math: Cogito ergo sum
René Descartes'
MEDITATIONS
(Picture source: http://www.btinternet.com/~glynhughes/squashed/descartes.htm)
Copyright © Albert R. Meyer, 2002. All rights reserved.
February 7, 2002
L1-2.17
Not Math: Cogito ergo sum
René Descartes'
MEDITATIONS
on First Philosophy in which the Existence of God and
the Distinction Between Mind and Body are Demonstrated.
Copyright © Albert R. Meyer, 2002. All rights reserved.
February 7, 2002
L1-2.18
Propositional (Boolean) Logic
Proposition is either True or False
Examples:
Nonexamples:
Copyright © Albert R. Meyer, 2002. All rights reserved.
22  4
1 1  4
True
False
Wake up!
Where am I?
February 7, 2002
L1-2.19
Operators
 :: AND
 :: OR
 :: NOT
 :: IMPLIES
 :: IFF (if and only if)
Copyright © Albert R. Meyer, 2002. All rights reserved.
February 7, 2002
L1-2.20
Deductions
A student is trying to prove that propositions P, Q,
and R are all true. She proceeds as follows.
First, she proves three facts:
• P implies Q
• Q implies R
• R implies P.
Then she concludes,
``Thus P, Q, and R are obviously all true.''
Copyright © Albert R. Meyer, 2002. All rights reserved.
February 7, 2002
L1-2.21
Deductions
From:
P implies Q, Q implies R, R implies P
Conclude: P, Q, and R are true.
(( P  Q)  (Q  R)  ( R  P))
( P  Q  R)
Copyright © Albert R. Meyer, 2002. All rights reserved.
February 7, 2002
L1-2.22
Truth Table
Could use a truth table.
Conclusion (below the line) must be true
whenever Hypothesis (above the line) is true.
(( P  Q)  (Q  R)  ( R  P))
( P  Q  R)
Copyright © Albert R. Meyer, 2002. All rights reserved.
February 7, 2002
L1-2.23
Truth Table
Conclusion (below the line) must be true
whenever Hypothesis (above the line) is true.
P Q R ( P  Q)  (Q  R)  ( R  P)
T
T
T
T
F
F
F
F
T
T
F
F
T
T
F
F
T
F
F
F
F
F
F
T
T
F
T
F
T
F
T
F
Copyright © Albert R. Meyer, 2002. All rights reserved.
February 7, 2002
OK
OK
OK
OK
OK
OK
OK
NOT OK!
L1-2.24
Goldbach Conjecture
Every even integer greater than 2 is the
sum of two primes.
Evidence:
4  22
5  3 2
6  3 3
8  53
20  ? 13  7
Copyright © Albert R. Meyer, 2002. All rights reserved.
February 7, 2002
L1-2.25
Goldbach Conjecture
True for all even numbers with
up to 13 digits!
(Rosen, p.182)
It remains an OPEN problem:
no counterexample, no proof.
UNTIL NOW!…
Copyright © Albert R. Meyer, 2002. All rights reserved.
February 7, 2002
L1-2.26
Goldbach Conjecture
The answer is on my desk!
(Proof by Cases)
Copyright © Albert R. Meyer, 2002. All rights reserved.
February 7, 2002
L1-2.27
Quicker by Cases
(( P  Q)  (Q  R)  ( R  P))
( P  Q  R)
Case 1: P is true. Now, if Hypothesis is true,
then Q must be true (because P implies Q).
Then R must be true (because Q implies R).
So the conclusion P  Q  R is true.
This case is OK.
Copyright © Albert R. Meyer, 2002. All rights reserved.
February 7, 2002
L1-2.28
Quicker by Cases
(( P  Q)  (Q  R)  ( R  P))
( P  Q  R)
Case 2: P is false. To make Hypothesis true,
R must be false (because R implies P), so
Q must be false (because Q implies R).
This assignment does make the Hypothesis true,
but the conclusion P  Q  R is (very) False.
This case is not OK.
Copyright © Albert R. Meyer, 2002. All rights reserved.
February 7, 2002
L1-2.29
Problems
Tutorial Problems 1 & 2
Copyright © Albert R. Meyer, 2002. All rights reserved.
February 7, 2002
L1-2.30
Related documents