CS311 -- Discrete Structures ----Spring 2002

Note: Lecture notes will not exactly follow the lecture. They may include more material.

Note on notation: Because of the limitations of html (and my knowledge of it), I will use the following notation in these notes:

"V" for or
"&" for and
" ¬" for not
"->" for implies

Lecture Monday 2/4/02 (Class 7)

Review: There are 4 ways to prove a statement of the form p->q: For the examples below we will be using the definitions of even and odd we have used previously. Example 1.
Claim 1: If x*y is even then x is even or y is even
We will prove this using an indirect proof. In an indirect proof you prove the contrapositive. The contrapositive of "if p then q" (p->q) is "if not q then not p" (¬ q-> ¬ p). These are equivalent so if we can prove "if not q then not p" then we have proved our claim. In this example, the contrapositive of the claim is: If x is not even and y is not even then x&y is not even.
Proof: (indirect) Assume x is odd and y is odd. Then by the definition of odd, there exist integers k and j such that x = 2k + 1 and y = 2j + 1. Then xy = (2k+1)(2j+1)=4kj + 2k + 2j + 1 = 2(2kj + k+ j) + 1.
Let l = 2kj + k + j. We have: xy = 2l+1. We know l is an integer because integers are closed under multiplication and addition. Therefore by the definition of odd, xy is odd. Therefore the claim is true.
 
Notice in the proof above we proved the claim for a general x and y. If we don't make any assumptions about this x and y, then we can generalize the result to all integers x and y. This is using the principle of Universal Generalization in words (rather than in logical notation).

When we say "Integers are closed under +" we mean: "If x & y are integers then x + y is an integer".
We can substitute any operation for "+" in the above definition to determine whether integers are closed under other operations. Are integers closed under "*"? Integers are closed under multiplication if and only if, for any two integers x and y, x*y is also an integer. This is true.
It turns out that integers are closed under addition, multiplication, and subtraction. They are not closed under division (because x/y might not be an integer.).
NOT EDITED BELOW HERE
Proof by Induction (Chapter 4)

Induction is used to prove statements like:

SUM(i)=n(n+1)/2 where 1 <= i <= n SUM(i)=1 + 2 + 3 where 1 <= i <= 3 SUM(i)=1 + 2 + 3 + ...+ (n-1) + n where 1 <= i <= n SUM(2i + 1)=3 + 5 + 7 where 1 <= i <= 3 Fact: (a <= i <= n) SUM(f(i)) = SUM(f(i)) (a <= i <= n -1)+ f(n) eg. (1 <= i <= n) SUM(i) = SUM(i) (1 <= i <= n-1) + n = 1 + 2 + 3 + 4 + ... + n-1 + n Principle of Mathematical Induction: To prove: for n >= b P(n) is true if we show P(b) Basic Step and Assume P(n) Induction Hypothesis Prove P(n+1) Induction Step Then we have shown for n > = b, P(n) is true. Claim: ( 1 <= i <= n) SUM(i) = n(n+1) /2 Proof: Basis: show (i = 1) SUM(i) = 1(1+1)/2 = 1 1) 1(1+1)/2 = 1 So the basis is true 2) Assume: (1 <= i <= n) SUM(i) = n(n+1) /2 Induction Hypothesis 3) Show (1 <= i <= n+1) SUM(i) = (n+1)(n+2) /2 (1 <= i <= n+1) SUM(i) = SUM(i) (1 <= i <= n) + n + 1 = n(n+1)/2 + (n+1) by I.H = (n^2 + n + 2n + 2) / 2 = ((n+1)(n+2))/2 Have shown P(n) -> P(n+1) for n>=0 & P(0) By principle of Mathematical Induction, thus prove the claim. Claim:(0 <= i <= n) SUM(2i + 1) = (n+1) ^2 Proof: Basis: show i = 0, (2i + 1) = (i + 1) ^ 2 (2i + 1) = ( 2 * 0 + 1) = 1 (0 + 1)^2 = 1 ^ 2 = 1 I.H Assume: (0 <= i <= k) SUM(2i + 1) = (k + 1) ^2 where k is some integer > 0 Induction Step: To show: (0 <= i <= k + 1) SUM(2i + 1) = (k + 2) ^ 2 (0 <= i <= k+1) SUM(2i + 1) = SUM(2i + 1) (0<=i<=k) + 2(k+1)+1 = (k + 1) ^ 2 + 2k + 3 = k^2 + 4k + 4 = (k + 2) ^2 Claim:(0<=i<=n) SUM(2^i) = 2^(n+1) - 1 Proof: Basis: Show i=0 SUM(2^i) = 1 2 ^ 0 = 1 2 ^(0+1) - 1 = 2 ^ 1 - 1 = 1 I.H: Assume (0<=i<=k) SUM(2^i) = 2^(k+1) - 1 where k is some int > 0 Induction Step: To show (0<=i<=k+1) SUM(2^i) = 2^(k+2) - 1 (0<=i<=k+1)SUM(2^i)= SUM(2^i) (0<=i<=k) + 2^(k+1) = 2 ^ (k+1) - 1 + 2^(k+1) = 2 ^ (k+2) -1 Weak form of induction Strong Form prove P(basis) Prove basis = 0 Assume P(n) Assume P(0)&P(1)...&P(n) Show P(n + 1) Prove P(n+1) Claim: 2^n >= n for n>=1 Proof: By induction: Basis: To show 2^1 >= 1 2^1=2>=1 So the basis is true I.H Assume 2^n>=n for general n>=1 I.Step: To show 2^(n+1) >= n+1 2^(n+1) = 2*2^n = 2^n + 2^n >= n + n by I.H 2^(n+1) >= 2n 2n >= n + 1 for 2n -n = n >= 1 So for n >=1 2^(n+1) >= n + 1