cs 23022 discrete mathematical structures
DESCRIPTION
CS 23022 Discrete Mathematical Structures. Mehdi Ghayoumi MSB rm 132 [email protected] Ofc hr: Thur, 9:30-11:30a. Announcements. Midterm…!!! Do HW5 again for Thursday This session is from chapter 5 Rosen and some other articles. Everyone likes Ice cream!. Suggests a proof technique. - PowerPoint PPT PresentationTRANSCRIPT
CS 23022Discrete Mathematical Structures
Mehdi GhayoumiMSB rm [email protected] Ofc hr: Thur, 9:30-11:30a
Announcements
Midterm…!!!
Do HW5 again for Thursday
This session is from chapter 5 Rosen
and some other articles
Mathematical InductionOne rule:
if the person “before” you likes Ice cream,
then you like Ice cream.Person 1 likes Ice cream.What can we conclude?
Everyone likes Ice cream!
Suggests a proof technique
n FL(n)
Mathematical InductionSuppose we want to prove everyone likes Fruit
LoopsNeed to show two things:Person 1 likes Fruit Loops (FL(1))
If
person k likes Fruit Loops, Then
person k+1 does too. (FL(k) FL(k+1))
Mathematical InductionSuppose we want to prove everyone likes Fruit
LoopsNeed to show two things:
Person 1 likes Fruit Loops (FL(1))If person k likes Fruit Loops, then person k+1
does too. (FL(k) FL(k+1))
First part is a simple proposition we call the base case.
Second part is a conditional. Start by assuming FL(k), and show that FL(k+1) follows.
• We know that:
We can reach the first rung of this ladder;If we can reach a particular rung of the ladder,then we can reach the next rung of the ladder.
Can we reach every step of this infinite ladder?
Yes, using Mathematical Induction which is a rule of inference that tells us:
P(1)k (P(k) P(k+1))-------------------------- n (P(n)
Mathematical Induction
Mathematical InductionIf we have a propositional function P(n), and we want
to prove that P(n) is true for any natural number n, we do the following:
Show that P(0) is true. (basis step)
Show that if P(n) then P(n + 1) for any nN. (inductive step)
Then P(n) must be true for any nN. (conclusion)
• Use induction to prove that the • 1 + 2 + 22 + … + 2n = 2n+1 - 1 • for all non-negative integers n.
• 1 – Hypothesis? Prove a base case (n=?)
• 2 - Base case? Prove P(k)P(k+1)
3 – Inductive HypothesisAssume P(k) = 1 + 2 + 22 + … + 2k = 2 k+1 – 1
Inductive hypothesi
s
n = 0 10 = 21-1.
P(n) = 1 + 2 + 22 + … + 2n = 2 n+1 – 1for all non-negative integers n.
Mathematical Induction
• 4 – Inductive Step: show that (k) P(k) P(k+1), assuming P(k).
• How?P(k+1)= 1 + 2 + 22 + … + 2k+ 2k+1 = (2k+1 – 1) + 2k+1 By inductive
hypothesisp(k) = 2 2k+1 - 1
P(k+1) = 2k+2 - 1
= 2(k+1)+1 - 1
Mathematical Induction
Mathematical InductionUse induction to prove that the sum of the first n
odd integers is n2.Prove a base case (n=1)
Base case (n=1): the sum of the first 1 odd integer is 12. Yup, 1
= 12.
Prove P(k)P(k+1)
Assume P(k): the sum of the first k odd ints is k2.
1 + 3 + … + (2k - 1) = k2Prove that 1 + 3 + … + (2k - 1) + (2k + 1) = (k+1)2
Inductive hypothesi
s
1 + 3 + … + (2k-1) + (2k+1) =
k2 + (2k + 1)
By inductive hypothesis
= (k+1)2By arithmetic
Mathematical InductionProve that 11! + 22! + … + nn! = (n+1)!
- 1, nBase case (n=1): 11! = (1+1)! - 1?Yup, 11! = 1, 2! - 1 = 1
Assume P(k): 11! + 22! + … + kk! = (k+1)! - 1Prove that 11! + … + kk! + (k+1)(k+1)! = (k+2)! - 1
Inductive hypothesi
s
11! + … + kk! + (k+1)(k+1)! =
(k+1)! - 1 + (k+1)(k+1)!= (1 + (k+1))(k+1)! -
1= (k+2)(k+1)! - 1= (k+2)! - 1
Mathematical InductionProve that if a set S has |S| = n, then |P(S)| =
2nBase case (n=0): S=ø, P(S) = {ø} and |P(S)| =
1 = 20Assume P(k): If |S| = k, then |P(S)| = 2k
Prove that if |S’| = k+1, then |P(S’)| = 2k+1
Inductive hypothesi
s
S’ = S U {a} for some S S’ with |S| = k, and a S’.
Partition the power set of S’ into the sets containing a and those not.
We count these sets separately.
Mathematical InductionAssume P(k): If |S| = k, then |P(S)| = 2k
Prove that if |S’| = k+1, then |P(S’)| = 2k+1
S’ = S U {a} for some S S’ with |S| = k, and a S’.
Partition the power set of S’ into the sets containing a and those not.
P(S’) = {X : a X} U {X : a X} P(S’) = {X : a X} U P(S) Since these are all the
subsets of elements in S.Subsets containing a are
made by taking any set from P(S), and inserting an a.
Mathematical InductionAssume P(k): If |S| = k, then |P(S)| = 2k
Prove that if |S’| = k+1, then |P(S’)| = 2k+1
S’ = S U {a} for some S S’ with |S| = k, and a S’.
P(S’) = {X : a X} U {X : a X} P(S’) = {X : a X} U P(S) Subsets containing a are
made by taking any set from P(S), and inserting an a.
So |{X : a X}| = |P(S)|
|P(S’)| = |{X : a X}| + |P(S)| = 2 |P(S)|
= 22k
= 2k+1
Mathematical Induction - a cool example
Deficient TilingA 2n x 2n sized grid is deficient if all but one cell is
tiled.
2n
2n
Mathematical Induction - a cool example
We want to show that all 2n x 2n sized deficient grids can be tiled with tiles shaped like:
Mathematical Induction - a cool example
Is it true for 20 x 20 grids?Yup!
Is it true for 21 x 21 grids?
Yup!
Mathematical Induction - a cool example
Inductive Hypothesis:We can tile a 2k x 2k deficient board using
our fancy designer tiles.
Use this to prove:We can tile a 2k+1 x 2k+1 deficient board
using our fancy designer tiles.
Mathematical Induction - a cool example
2k
2k 2k
2k
2k+1
OK!! (by IH)
???
Mathematical Induction - a cool example
2k
2k 2k
2k
2k+1
OK!! (by IH)
OK!! (by IH)
OK!! (by IH)
OK!! (by IH)
Mathematical Induction - a cool example
Mathematical Induction - a cool example