Download Math 232 - Discrete Math Notes 2.1 Direct Proofs and

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

Mathematics of radio engineering wikipedia , lookup

List of important publications in mathematics wikipedia , lookup

Foundations of mathematics wikipedia , lookup

Laws of Form wikipedia , lookup

Turing's proof wikipedia , lookup

Elementary mathematics wikipedia , lookup

Collatz conjecture wikipedia , lookup

Addition wikipedia , lookup

Gödel's incompleteness theorems wikipedia , lookup

Brouwer fixed-point theorem wikipedia , lookup

Non-standard calculus wikipedia , lookup

Brouwer–Hilbert controversy wikipedia , lookup

Georg Cantor's first set theory article wikipedia , lookup

Fermat's Last Theorem wikipedia , lookup

Four color theorem wikipedia , lookup

Theorem wikipedia , lookup

Wiles's proof of Fermat's Last Theorem wikipedia , lookup

Fundamental theorem of algebra wikipedia , lookup

Mathematical proof wikipedia , lookup

Proofs of Fermat's little theorem wikipedia , lookup

Transcript
Math 232 - Discrete Math
Notes
2.1 Direct Proofs and Counterexamples
Axiom: Proposition that is assumed to be true.
Proof: A logical argument establishing the truth of the theorem given the truth of the axioms
and any previously proven theorems.
Theorem: Proposition that requires a proof.
Lemma: Theorem that is not interesting on its own, but helps prove another theorem.
Corollary: Theorem that follows directly from another theorem. The proof should be
“obvious.”
Theorems are usually of the form:
∀x1 , x2 , ..., xn , p(x1 , x2 , ..., xn ) → q(x1 , x2 , ..., xn ).
To prove this kind of statement directly (aka direct proof):
(1) Assume x1 , x2 , ..., xn are arbitrary in the domain of discourse.
(2) Assume p(x1 , x2 , ..., xn ) is true.
(3) Show q(x1 , x2 , ..., xn ) is true.
1
PROOF EXAMPLES ...
Consider these definitions:
(1) An integer n is even if ∃k ∈ Z such that n = 2k.
(2) An integer n is odd if ∃k ∈ Z such that n = 2k + 1.
(3) An integer n is divisible by an integer k if ∃m ∈ Z such that n = km.
Prove the statement: ∀m, n ∈ Z, if m, n are odd then then m + n is even.
proof: Let m, n be odd integers. Then ∃k1 , k2 ∈ Z such that m = 2k1 + 1 and n = 2k2 + 1.
Then
m + n = (2k1 + 1) + (2k2 + 1) = 2k1 + 2k2 + 2 = 2(k1 + k2 + 1).
So m + n is even by definition since k1 + k2 + 1 ∈ Z
¤
Prove the statement: ∀m, n ∈ Z, if m, n are divisible by 3, then mn is divisible by 9.
proof: Let m, n ∈ Z be divisible by 3. Then ∃k1 , k2 ∈ Z such that m = 3k1 and n = 3k2 .
Then
mn = (3k1 )(3k2 ) = 9k1 k2 .
mn is divisible by 9 by definition since k1 k2 ∈ Z
¤
Prove the statement: For all sets X, Y, Z prove that if X ∩ Y = X ∩ Z and X ∪ Y = X ∪ Z
then Y = Z.
proof: Let X, Y, Z be sets. Assume X ∩ Y = X ∩ Z and X ∪ Y = X ∪ Z. We need to show
that Y and Z are subsets of each other:
(Y is a subset of Z) Let y ∈ Y . Then y ∈ X ∪ Y . So y ∈ X ∪ Z. That means y ∈ X or
y ∈ Z. If y ∈ Z there is nothing to show. Suppose y ∈ X. Then y ∈ X ∩ Y . So y ∈ X ∩ Z.
Thus both cases in the disjunction lead to y ∈ Z. Hence Y ⊆ Z.
(Z is a subset of Y ) Reversing the argument should be obvious by symmetry. Therefore
Y = Z.
¤
In this next example, the variables are real numbers:
Prove the statement: ∀² > 0, ∃M > 0 such that x > M →
1
x2
< ².
1
proof: Let ² > 0 be a real number. Set M = ²− 2 .
Then
x>M =
1
²
1
2
→
1
1
1
< ² 2 → 2 < ².
x
x
¤
To disprove a universally quantified statement all that is needed is one counterexample.
Disprove: For all sets X, Y we have that P(X ∪ Y ) ⊆ P(X) ∪ P(Y ).
Here is a counterexample. Let X = {1} and Y = {2}. Then X ∪ Y = {1, 2} ∈ P(X ∪ Y ).
However, X ∪ Y 6∈ P(X) and X ∪ Y 6∈ P(Y ). Therefore X ∪ Y 6∈ P(X) ∪ P(Y ).
Prove or disprove: For all sets X, Y we have that X × Y = X × Y .
This statement is false. Lets find a counterexample. Let the universe for both X, Y be {1, 2}
and thus U × U contains (0, 0), (0, 1), (1, 0), (1, 1). Take both X and Y to be {1}. This gives
us our counterexample.
Prove or disprove: If two out of three integer terms in an equation are divisible by k ∈ N
then the other term is as well.
proof: Assume a and b are two of the three integer terms. By properties of equivalent
equations, the equation can be solved for the third term. Then c, the third term equals a ± b
or b ± a, which are both divisible by k using distribution. This is often called the 2 out of 3
principle.
¤
What about the following statement (ELFR):
For all sets X, Y we have that X × Y = (X × Y ) ∪ (X × Y ) ∪ (X × Y ).
2.2 More Methods of Proof
A proof by contradiction establishes that p is true by assuming that p is false and arriving
at a contradiction, which is any proposition of the form r ∧ ¬r.
Formally, this “indirect proof” method is justified by the logical equivalence:
p ≡ ((¬p) → (r ∧ ¬r)).
Prove for all integers n, if n2 is divisible by 5 then so is n.
proof: Let n be an integer with n2 divisible by 5. Assume that n is not divisible by 5. Then
∃k ∈ Z and r ∈ {1, 2, 3, 4}, n = 5k + r. Then n2 = 25k 2 + 10kr + r2 and since r2 is not
divisible by 5 neither is n2 . This contradicts that n2 is divisible by 5. Therefore n must be
divisible by 5..
¤
Prove that
√
5 is irrational.
√
√
proof: Suppose 5 is rational. Then there exists integers a and b 6= 0 such that 5 = ab is
reduced. That is, a and b do not share any common factors apart from 1. Then 5b2 = a2 .
Thus a2 is divisible by 5. That this implies a is divisible by 5. Therefore, a = 5k for some
integer k. Then 5b2 = (5k)2 = 25k 2 → b2 = 5k 2 . That implies that b2 and therefore
√ b is
divisible by 5. But then a, b share the factor 5. This is a contradiction. Therefore, 5 is
irrational.
¤
Prove the real numbers are uncountable.
proof: It suffices to show that (0, 1) is uncountable. Lets prove it by contradiction. Suppose
the real numbers are countable, which means there is a correspondence with the natural
numbers. In particular, that means the decimal expansion of every real number in (0, 1)
can be put into rows of an infinite matrix where the first column represents the tenths, the
second column represents the hundredths, and so it goes. But then consider the following
real number: Take the diagonal entries and add one modulo 10 to each entry. This represents
a real number not found in any row of the matrix because in particular it does not match
on the diagonal entry. That contradicts that the real number are countable. Therefore they
are uncountable.
¤
Prove there are infinitely many prime numbers.
proof: Assume otherwise. Then ∃n ∈ N such that p1 , ..., pn ∈ N are a complete list of
primes. Then q = p1 · p2 · · · · · pn + 1 cannot be divisible by any of the primes pi , which is a
contradiction.
¤
A proof by contraposition occurs when one proves ¬q → ¬p to justify the equivalent p → q.
It is often interchanged for a proof by contradiction.
Prove: For all real numbers a, b if the product ab is an irrational number, then either a or b
must be an irrational number.
proof: Assume it is not the case that either a or b is irrational. Then a and b are both
rational. That implies ab is rational, which means not irrational. This concludes the proof
by contraposition.
¤
Prove: For any integers a and b, a + b ≥ 15 implies that a ≥ 8 or b ≥ 8.
proof: Assume it is not the case that either a ≥ 8 or b ≥ 8. Then a and b are 7 or smaller,
which makes a + b ≤ 14. This concludes the proof by contraposition.
¤
A proof by cases is used when a hypothesis naturally divides itself into different cases.
Prove: For real numbers a, b, |a + b| ≤ |a| + |b|.
proof: Lets begin with the case where both a, b are non-negative. Then |a| = a, |b| = b and
|a + b| = a + b so we have equality.
Now assume a ≥ 0 and b < 0. Then |a| = a and |b| = −b. Also, −(a − b) ≤ b ≤ a + b < a − b
implies |a + b| ≤ a − b = |a| + |b|. The proof is similar for a < 0 and b ≥ 0.
Now assume a < 0 and b < 0. Then |a| = −a, |b| = −b and —a+b—=−(a + b) = −a + (−b)
so we have equality.
¤
Prove: For every integer n prove n2 − n is even.
proof:
Case 1: n = 2m for some integer m. Then clearly n2 − n is even.
Case 2: n = 2m + 1 for some integer m. Then n2 − n = n(n − 1) is divisible by 2 since
n − 1 = 2m.
¤
To prove p ↔ q, just prove both directions: p → q and q → p.
To prove p ↔ q ↔ r (or more), just prove p → q, q → r, and r → p.
Prove the equivalence of the following three statements for sets A, B and C. Let U be the
universal set.
(1) A ∪ B = U ,
(2) A ∩ B = ∅,
(3) A ⊆ B.
proof: (1) → (2) : Take the complement of both sides to get A ∪ B = U = ∅. This implies,
using DeMorgan’s laws, A ∩ B = ∅.
(2) → (3) : Let x ∈ A. Since A ∩ B = ∅, we have that x 6∈ B. Hence, x ∈ B = B.
(3) → (1) : Let x ∈ U . If x ∈ A then x ∈ A ∪ B. Suppose x 6∈ A. Then x ∈ A implies x ∈ B.
Then x ∈ A ∪ B. Hence A ∪ B = U .
¤
An existence proof provides a proof to the statement
∃x, P (x),
by exhibiting one element x in the domain of discourse for which P (x) can be shown to be
true.
An existence proof is constructive if it exhibits the element x that satisfies P (x) explicitly
during the proof. Otherwise it is called nonconstructive.
Prove that there exists two irrational numbers a and b such that ab is rational.
√
√
proof: Let x = y = 2. If xy is rational then we are √
done since 2 is irrational. Otherwise,
y
x√
is√irrational.
Then by setting a = xy and b = 2 we have that ab = (xy )b = xby =
√
√
( 2) 2 2 = ( 2)2 = 2, which is rational.
¤
Note that this proof is nonconstructive because it does not explicitly give an example of an
irrational raised to an irrational being rational,√but√rather just argues the existence of such
an exponential, by cases on the rationality of ( 2) 2 .
2.4 Induction
Principle of Mathematical induction:
Suppose S(n) is a propositional function with domain of discourse equal to integers greater
or equal to n0 . Suppose that
(1) S(n0 ) is true;
(2) For all n ≥ n0 , if S(n) is true, then S(n + 1) is true.
Then S(n) is true for every n ≥ n0 .
Prove: For r 6= 1,
n
X
ri =
i=0
1 − rn+1
.
1−r
proof: If n = 1 then
1
X
ri = 1 + r =
i=0
1 − r2
by factoring and canceling 1 − r 6= 0.
1−r
Assume that
n
X
i=0
Consider
n+1
X
i=0
=
1 − rn+1
r =
.
1−r
i
à n !
X
1 − rn+1
ri =
ri + rn+1 =
+ rn+1 =
1−r
i=0
1 − rn+1
1−r
1 − rn+1 rn+1 − rn+2
1 − rn+2
+ rn+1
=
+
=
1−r
1−r
1−r
1−r
1−r
¤
Prove: The sum of the first n odd natural numbers is n2 .
proof: Base case is clear. 1 = 12 . Assume
n
X
(2i − 1) = n2 .
i=1
Then
n+1
X
(2i − 1) =
i=1
à n
X
!
+ 2(n + 1) − 1 = n2 + 2n + 1 = (n + 1)2 .
(2i − 1)
i=1
¤
Define
Hk = 1 +
1
1
+···+ .
2
k
Prove: H2n ≥ 1 + n2 .
proof: If n = 1 then H2 = 1.5 and 1 +
n
2
= 1.5.
Assume H2n ≥ 1 + n2 .
Then
H2n+1 = H2n +
1+
2n
1
1
1
+ n
+···+ n
≥
+1 2 +2
2 + 2n
n
1
1
1
+ n
+ n
+···+ n
≥
2 2 +1 2 +2
2 + 2n
1+
1
1
1
n
+ n+1 + n+1 + · · · + n+1 =
2 2
2
2
1+
1
n+1
n
+ 2n · n+1 = 1 +
.
2
2
2
¤
(ELFRs)
Prove that
n
X
i=
i=1
that
n
X
i2 =
i=1
and that
n
X
i=1
n(n + 1)(2n + 1)
,
6
µ
3
n(n + 1)
,
2
i =
n(n + 1)
2
¶2
.
2.5 Strong Form of Induction and Well Ordering Property
The “strong form” of induction is actually equivalent, so it is an alternate form of induction
(nothing actually stronger):
Strong Form of Mathematical induction:
Suppose S(n) is a propositional function with domain of discourse equal to integers greater
or equal to n0 . Suppose that
(1) S(n0 ) is true;
(2) For all n ≥ n0 , if S(k) is true for all k, n0 ≤ k < n then S(n) is true.
Then S(n) is true for every integer n ≥ n0 .
A chocolate bar consists of a number of squares (say, n) arranged in a rectangular pattern.
You split the bar into small squares always breaking along the lines between the squares.
What is the minimum number of breaks to separate the chocolate bar into its pieces?
Claim: n − 1 breaks.
Base case: A bar made of two pieces takes 1 break.
Assume for 2 ≤ k < n, a chocolate bar with k squares takes k − 1 breaks. Consider a bar
with n squares. Break it. Then you have two bars consisting of less than n squares each,
say n1 and n2 squares respectively. Then those take n1 − 1 and n2 − 1 breaks respectively
to separate into individual pieces.
All told there are 1 + (n1 − 1) + (n2 − 1) = n − 1 breaks
¤
Every amount of postage that is at least 12 cents can be made from 4-cent and 5-cent stamps.
Base cases: 12 cents can be made from three 4-cent stamps. 13 cents can be made from
two 4-cent stamps and a 5-cent stamp. 14cents can be made from two 5-cent stamps and a
4-cent stamp. 15 cents can be made with three 5-cent stamps.
Let n ∈ N and n > 15. Assume for all natural numbers k such that 11 < k < n, k cents can
be made with 4-cent and 5-cent stamps. Since 11 < n − 4 < n, by induction n − 4 cents can
be made with 4-cent and 5-cent stamps. Hence n = 4 + (n − 4) can too!
¤
Well-Ordering Property: Every nonempty set of nonnegative integers has a least element.
This property is equivalent to the two forms of induction.
Quotient-Remainder Theorem:
If d and n are integers, d > 0, then there exist unique integers q and r such that
n = dq + r and 0 ≤ r < d.
proof: Let X = {n − dk|n − dk ≥ 0, k ∈ Z}. By selecting k ∈ Z so that k < nd (integers
are unbounded) we have dk < n and therefore, n − dk ∈ X. Thus X is nonempty. By the
well-ordering property, let r ∈ X be the smallest element. In particular r ≥ 0. Label by q
the integer that satisfies n − dq = r. Then n = dq + r.
Now suppose r ≥ d. Then r − d ≥ 0 and hence, n − d(q + 1) = r − d ∈ X and r − d < r.
But this contradicts that r is the smallest element of X.
Thus 0 ≤ r < d.
Now for uniqueness. Suppose r1 , r2 , q1 , q2 ∈ Z and
n = dq1 + r1 and 0 ≤ r1 < d.
n = dq2 + r2 and 0 ≤ r2 < d.
Then 0 = n − n = d(q1 − q2 ) + (r1 − r2 ) → d(q1 − q2 ) = (r2 − r1 ). But then d divides r2 − r1
and since 0 ≤ r1 , r2 < d,
−d < r2 − r1 < d → r1 = r2 .
Then d(q1 − q2 ) = 0 → q1 = q2 .
¤