Download slides - faculty.ucmerced.edu

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

Eisenstein's criterion wikipedia , lookup

Factorization wikipedia , lookup

Fundamental theorem of algebra wikipedia , lookup

Transcript
CSE15 Discrete Mathematics
02/08/17
Ming-Hsuan Yang
UC Merced
1
1.8 Proof methods and strategy
(( p1  p 2    p n )  q)
 (( p1  q)  ( p 2  q)    ( p n  q))
• Proof by cases: pi→q for i=1,2,…,n
• When it is not possible to consider all cases at
the same time
• Exhaustive proof: some theorems can be
proved by examining a relatively small number
of examples
2
Example
• Prove (n+1)3≥3n if n is a positive integer with
n≤4
• Proof by exhaustion as we only need to verify
n=1, 2, 3 and 4.
• For n=1, (n+1)3=8 ≥31=3
• For n=2, (n+1)3=27 ≥32=9
• For n=3, (n+1)3=64 ≥33=27
• For n=4, (n+1)3=125≥43=64
3
Example
• An integer is a perfect power if it equals na,
where a is an integer greater than 1
• Prove that the only consecutive positive
integers not exceeding 100 that are perfect
powers are 8 and 9
• Can prove this fact by examining positive
integers n not exceeding 100
– First check whether n is a perfect power, and then
check whether n+1 is a perfect power
4
Example
perfect power: na, for a >1
• For positive integers
– a=2, the squares ≤ 100: 1, 4, 9, 16, 25, 36, 49, 64,
81, and 100
– a=3, the cubes ≤ 100: 1, 8, 27, and 64
– a=4, the 4th powers n4 ≤ 100: 1, 16, and 81
– a=5, the 5th powers n5 ≤ 100: 1 and 32
– a=6, the 6th powers n6 ≤ 100: 1 and 64
– Look at the list of perfect powers, we see that the
pair of n=8 and n+1=9 is the only two consecutive
powers ≤ 100
5
Proof by cases
• Prove that if n is an integer, then n2≥ n
• We prove this by 3 cases:
– n=0: trivial case as 02≥ 0
– n≥1: If n≥1 then n∙n ≥ n∙1 and thus n2≥ n
– n≤-1: If n ≤ -1 then n2 ≥ 0>n and thus n2≥ n
n=-1 n=0
n=1
6
Example
• Show that |xy|=|x||y| for real numbers
(( p1  p 2    p n )  q)
 (( p1  q)  ( p 2  q)    ( p n  q))
•
•
•
•
x≥0, y≥0: xy ≥0 |xy|=xy=|x||y|
x≥0, y<0: xy<0 |xy|=-xy=x(-y)=|x||y|
x<0, y ≥0:xy<0 |xy|=-xy=(-x)y=|x||y|
x<0, y<0: xy>0 |xy|=xy=(-x)(-y)=|x||y|
7
Example
• Formulate a conjecture about the decimal
digits that occur at the final digit of the
squares of an integer and prove the result
• The smallest perfect squares are: 1, 4, 9, 16,
25, 36, 49, 64, 81, 100, 121, 144, 169, 196,
225 and so on
• Note that the digits that occur at the final digit
of a squares are: 0, 1, 4, 5, 6, and 9 (and no 2,
3, 7, and 8)  conjecture
8
Example
• We can express an integer n as 10a+b were a
and b are positive integers and 0≤b≤9
• n2=(10a+b)2=100a2+20ab+b2=10(10a2 +2b)+b2,
so the final digit is the final digit of b2
• Note also that the final digit of (10-b)2=10020b+b2. Thus, we only consider 6 cases
• Case 1: if final digit of n is 1 or 9 (or b), then
the last digit of n2 is 1
9
Example
• Case 2: if the final digit of n is 2 or 8, then the final
digit of n2 is 4
• Case 3: if the final digit of n is 3 or 7, then the final
digit of n2 is 9
• Case 4: if the final digit of n is 4 or 6, then the final
digit of n2 is 6
• Case 5: if the final digit of n is 5, then the final digit of
n2 is 5
• Case 6: if the final digit of n is 0, then the final digit of
n2 is 0
10
Example
• Show that there are no solutions in integers x
and y of x2+3y2=8
• x2>8 when |x|≥3, and 3y2>8 when |y|≥2. The
only values for x are -2,-1,0,1,2 and for y are
-1, 0, 1
• So, possible values for x2 are, 0, 1, and 4. The
possible values for 3y2 are 0 and 3
• No pair of x and y can be solution
11
Without loss of generality (WLOG)
• In proof, sometimes we can apply the same
argument for different cases
– x≥0, y<0: xy<0 |xy|=-xy=x(-y)=|x||y|
– x<0, y ≥0:xy<0 |xy|=-xy=(-x)y=|x||y|
• By proving one case of a theorem, no
additional argument is required to prove other
specified cases
12
Without loss of generality
Example: Show that if x and y are integers and both x∙y and x+y are even, then
both x and y are even.
Proof: Use a proof by contraposition. Suppose x and y are not both even.
Then, one or both are odd. Without loss of generality, assume that x is odd.
Then x = 2m + 1 for some integer k.
Case 1: y is even. Then y = 2n for some integer n, so
x + y = (2m + 1) + 2n = 2(m + n) + 1 is odd.
Case 2: y is odd. Then y = 2n + 1 for some integer n, so
x ∙ y = (2m + 1) (2n + 1) = 2(2m ∙ n +m + n) + 1 is odd.
We only cover the case where x is odd because the case where y is odd is
similar. The use phrase without loss of generality (WLOG) indicates this.
Common mistakes in exhaustive proof
and proof by cases
• Draw incorrect conclusions from insufficient number
of examples
• Need to cover every possible case in order to prove a
theorem
• Proving a theorem is analogous to showing a
program always produces the desired output
• No matter how many input values are tested, unless
all input values are tested, we cannot conclude that
the program always produces correct output
14
Example
• Is it true that every positive integer is the sum of 18
4th powers of integers?
• The 4th powers of integers: 0, 1, 16, 81, …
• Select 18 terms from these numbers and add up to n,
then n is the sum of 18 4th powers
• Can show that integers up to 78 can be written as the
sum as such
• However, if we decided this was enough (or stop
earlier), then we would come to wrong conclusion as
79 cannot be written this way
15
Example
• What is wrong with this “proof”
“Theorem”: If x is a real number, then x2 is a
positive real number
“Proof”: Let p1 be “x is positive” and p2 be “x
is negative”, and q be “x2 is positive”.
First show p1→q, and then p2→q. As we cover
all possible cases of x, we complete this proof
16
Example
• We missed the case x=0
• When x=0, the supposed theorem is false
• If p is “x is a real number”, then we need to
prove results with p1, p2, p3 (where p3 is the
case that x=0)
(( p1 p 2  p 3 )  q)  (( p1 q)  ( p 2  q)  ( p 3  q))
17
Existence proof
• A proof of a proposition of the form xp(x)
• Constructive proof: find one element a such
that p(a) is true
• Non-constructive proof: prove that xp(x) is
true in some other way, usually using proof by
contradiction
18
Constructive existence proof
• Show that there is a positive integer that can
be written as the sum of cubes of positive
integers in two different ways
• By intuition or computation, we find that
1729=103+93=123+13
• We prove this theorem as we show one
positive integer can be written as the sum of
cubes in two different ways
19
Ramanujan
• G. H. Hardy, when visiting Ramanujan,
remarked that 1729, the number of the cab he
took, was rather dull
• Ramanujan replied “No, it is a very interesting
number; it is the smallest number expressible
as the sum of cubes in two different ways.”
20
Non-constructive existence proof
• Show that there exist irrational numbers x and y such
that xy is rational
• We previously show that 2 is irrational
2
• Consider the number 2 . If it is rational, we have two
irrational number x and y with xy is rational (x= 2 , y= 2 )
2
• On the other hand if 2 is not rational, then we let
2
2
x  2 , y  2 , and thus x  ( 2 )
y
2
 2
2 2
2
 2 2
• We have not found irrational numbers x and y such that
xy is rational
• Rather, we show
that either the pair x= 2 , y= 2 or the
2
pair x  2 , y  2 have the desired property, but we
do not know which of these two pairs works.
21
Uniqueness proof
• Some theorems assert the existence of a unique element with
a particular property
• Need to show
– Existence: show that an element x with the desired property exists
– Uniqueness: show that if y≠x, then y does not have the desired
property
• Equivalently, show that if x and y both have the desired
property, then x=y
• Showing that there is a unique element x such that p(x) is the
same as proving the statement
x( p( x)  y (( y  x)  p( y )))
22
Example
• Show that if a and b are real numbers and
a≠0, then there is a unique number r such that
ar+b=0
• Note that the real number r=-b/a is a solution
of ar+b=0. Consequently a real number r exists
for which ar+b=0
• Second, suppose that s is a real number such
that as+b=0. Then ar+b=as+b. Since a≠0, s
must be equal to r. This means if s≠r, as+b≠0
23
Proof strategy
• Can be challenging
• First analyze what the hypotheses and
conclusion mean
• For conditional statements, usually start with
direct proof, then indirect proof, and then
proof by contradiction
24
Forward/backward reasoning
• Direct proof:
– start with premises, together with axioms and
known theorems,
– we can construct a proof using a sequence of
steps that lead to conclusion
• A type of forward reasoning
• Backward reasoning: to prove q, we find a
stement p that we can prove that p→q
25
Example
• For two distinct positive real numbers x, y,
their arithmetic mean is (x+y)/2, and their
geometric mean is xy . Show that the
arithmetic mean is always larger than
geometric mean
• To show ( x  y) / 2  xy , we can work backward
by finding equivalent statements
( x  y ) / 2  xy
( x  y ) 2 / 4  xy
x 2  2 xy  y 2  4 xy
( x  y)2  0
26
Example
• For two distinct real positive real numbers, x
and y, (x-y)2>0
• Thus, x2-2xy+y2>0, x2+2xy+y2>4xy, (x+y)2>4xy.
So, ( x  y) / 2  xy
• We conclude that if x and y are distinct
positive real numbers, then their arithmetic
mean is greater than their geometric mean
27
Example
• Suppose that two people play a game taking
turns removing 1, 2, or 3 stones at a time from
a pile that begins with 15 stones. The person
who removes the last stone wins the game.
• Show that the first player can win the game no
matter what the second play does
28
Example
• At the last step, the first player can win if this
player is left with a pile with 1, 2, or 3 stones
• The second player will be forced to leave 1, 2
or 3 stones if this player has to remove stones
from a pile containing 4 stones
• The first player can leave 4 stones when there
are 5, 6, or 7 stones left, which happens when
the second player has to remove stones from
a pile with 8 stones
29
Example
• That means, there are 9, 10 or 11 stones when
the first player makes this move
• Similarly, the first player should leave 12
stones when this player makes the first move
• We can reverse this argument to show that
the first player can always makes this move to
win (successively leave 12, 8, and 4 stones for
2nd player)
30
Adapting existing proof
• Take advantage of existing proofs
• Borrow some ideas used in the existing proofs
• We proved 2 is irrational. We now conjecture
that 3 is irrational. Can we adapt previous proof
to show this?
• Mimic the steps in previous proof
• Suppose 3  c / d , then 3  c 2 / d 2 ,3d 2  c 2
• Can we use this to show that 3 must be a factor
of both c and d?
31
Example
3  c / d , then 3  c 2 / d 2 ,3d 2  c 2
• We will use some results from number theory
(discussed in Chapter 3)
• As 3 is factor of c2, it must be a factor of c
Thus, 9 is a factor of c2, which means 9 is a
factor of 3d2
• Which implies 3 is a factor d2, and 3 is factor
of d
• This means 3 is factor of c and d, a
contradiction
32
Looking for counterexamples
• When confronted with a conjecture, try to
prove it first
• If the attempt is not successful, try to find a
counterexample
• Process of finding counterexamples often
provides insights into problems
33
Example
• We showed the statement “Every positive
integer is the sum of two squares of integers”
is false by finding a counterexample
• Is the statement “Every positive integer is the
sum of the squares of three integers” true?
• Look for an counterexample: 1=02+02+12,
2=02+12+12, 3=12+12+12, 4=02+02+22,
5=02+12+22, 6=12+12+22, but cannot do so for
7
34
Example
• The next question is to ask whether every
positive integer is the sum of the squares of 4
positive integers
• Some experiments provide evidence that the
answer is yes, e.g., 7=12+12+12+22,
25=42+22+22+12, and 87=92+22+12+12
• It turns the conjecture “Every positive integer
is the sum of squares of four integers” is true
35
Proof strategy in action
• Formulate conjectures based on many types of
possible evidence
• Examination of special cases can lead to a conjecture
• If possible, prove the conjecture
• If cannot find a proof, find a counterexample
• A few conjectures remain unproved
• Fermat’s last theorem (a conjecture since 1637 until
Andrew Wiles proved it in 1995)
no three positive integers satisfy a n  b n  c n , n is any integer  2
36