1 course summary cs 202 aaron bloomfield. 2 outline a review of the proof methods gone over in class...
TRANSCRIPT
11
Course SummaryCourse Summary
CS 202CS 202
Aaron BloomfieldAaron Bloomfield
22
OutlineOutline
A review of the proof methods gone over A review of the proof methods gone over in classin class
Interspersed with the most popular Interspersed with the most popular demotivators from CS 101demotivators from CS 101
Course summaryCourse summary
33
Demotivator winners!Demotivator winners!
MethodologyMethodology– 11stst place vote counted for 3 points place vote counted for 3 points– 22ndnd place vote counted for 2 points place vote counted for 2 points– 33rdrd place vote counted for 1 point place vote counted for 1 point
Have not tallied the Toolkit ones yetHave not tallied the Toolkit ones yet– I won’t get those for a few weeksI won’t get those for a few weeks
Will then buy two demotivators and Will then buy two demotivators and hang them in my office…hang them in my office…
44
Proof methods learned so farProof methods learned so far
Logical equivalencesLogical equivalences via truth tablesvia truth tables via logical equivalencesvia logical equivalences
Set equivalencesSet equivalences via membership tablesvia membership tables via set identitiesvia set identities via mutual subset proofvia mutual subset proof via set builder notation and via set builder notation and
logical equivalenceslogical equivalencesRules of inferenceRules of inference
for propositionsfor propositions for quantified statementsfor quantified statements
Pigeonhole principlePigeonhole principleCombinatorial proofsCombinatorial proofs
Ten proof methods in section 1.5:Ten proof methods in section 1.5: Direct proofsDirect proofs Indirect proofsIndirect proofs Vacuous proofsVacuous proofs Trivial proofsTrivial proofs Proof by contradictionProof by contradiction Proof by casesProof by cases Proofs of equivalenceProofs of equivalence Existence proofsExistence proofs
ConstructiveConstructiveNon-constructiveNon-constructive
Uniqueness proofsUniqueness proofs CounterexamplesCounterexamples
InductionInduction Weak mathematical inductionWeak mathematical induction Strong mathematical inductionStrong mathematical induction Structural inductionStructural induction
55
Idempotent Law
Associativity of Or
rqprqrp )()()( Definition of implication
Using Logical EquivalencesUsing Logical Equivalences
rqprqrp )()()(
rqprqp rqprrqp
rqprqrp )()()(
rqprqrp
Re-arranging
Original statement
DeMorgan’s Law
qpqp
qpqp )(
rqrprqrp )()(
rrr
66
In 12In 12thth place (11 votes) place (11 votes)
77
Definition of differenceDefinition of difference
Definition of differenceDefinition of difference
DeMorgan’s lawDeMorgan’s law
Complementation lawComplementation law
Distributive lawDistributive law
Complement lawComplement law
Identity lawIdentity law
Commutative lawCommutative law
Set equivalencesSet equivalences (§1.7) (§1.7)Prove that A∩B=B-(B-A)Prove that A∩B=B-(B-A)
)AB-(BBA
)A(BB
)AB(B
A)B(B
A)(B)B(B
A)(BA)(BBA
88
Proof by set builder notation Proof by set builder notation and logical equivalences 2and logical equivalences 2
Original statement
Definition of difference
Negating “element of”
Definition of difference
DeMorgan’s Law
Distributive Law
Negating “element of”
Negation Law
Identity Law
Definition of intersection
)}(|{ AxBxBxx
)( ABB )}(|{ ABxBxx
))}((|{ ABxBxx
}|{ AxBxx
)}(|{ AxBxBxx
}|{ AxBxBxBxx })(|{ AxBxBxBxx
}|{ AxBxFx
BA
99
In 11In 11thth place (1/3) (12 votes) place (1/3) (12 votes)
1010
Rules of inference (Rules of inference (§1.5)§1.5)
Example 6 of Rosen, section 1.5Example 6 of Rosen, section 1.5We have the hypotheses:We have the hypotheses: ““It is not sunny this afternoon and it It is not sunny this afternoon and it
is colder than yesterday”is colder than yesterday” ““We will go swimming only if it is We will go swimming only if it is
sunny”sunny” ““If we do not go swimming, then we If we do not go swimming, then we
will take a canoe trip”will take a canoe trip” ““If we take a canoe trip, then we will If we take a canoe trip, then we will
be home by sunset”be home by sunset”
Does this imply that “we will be Does this imply that “we will be home by sunset”?home by sunset”?
““It isIt is not not sunny this afternoonsunny this afternoon and it and it
is colder than yesterday”is colder than yesterday” ““We will go swimming only if We will go swimming only if it is it is
sunnysunny”” ““If we do not go swimming, then we If we do not go swimming, then we
will take a canoe trip”will take a canoe trip” ““If we take a canoe trip, then we will If we take a canoe trip, then we will
be home by sunset”be home by sunset”
Does this imply that “we will be Does this imply that “we will be home by sunset”?home by sunset”?
““It isIt is not not sunny this afternoonsunny this afternoon and and it it
is colder than yesterdayis colder than yesterday”” ““We will go swimming only if We will go swimming only if it is it is
sunnysunny”” ““If we do not go swimming, then we If we do not go swimming, then we
will take a canoe trip”will take a canoe trip” ““If we take a canoe trip, then we will If we take a canoe trip, then we will
be home by sunset”be home by sunset”
Does this imply that “we will be Does this imply that “we will be home by sunset”?home by sunset”?
““It isIt is not not sunny this afternoonsunny this afternoon and and it it
is colder than yesterdayis colder than yesterday”” ““We will go swimmingWe will go swimming only if only if it is it is
sunnysunny”” ““If If we dowe do not not go swimminggo swimming, then we , then we
will take a canoe trip”will take a canoe trip” ““If we take a canoe trip, then we will If we take a canoe trip, then we will
be home by sunset”be home by sunset”
Does this imply that “we will be Does this imply that “we will be home by sunset”?home by sunset”?
““It isIt is not not sunny this afternoonsunny this afternoon and and it it
is colder than yesterdayis colder than yesterday”” ““We will go swimmingWe will go swimming only if only if it is it is
sunnysunny”” ““If If we dowe do not not go swimminggo swimming, then , then we we
will take a canoe tripwill take a canoe trip”” ““If If we take a canoe tripwe take a canoe trip, then we will , then we will
be home by sunset”be home by sunset”
Does this imply that “we will be Does this imply that “we will be home by sunset”?home by sunset”?
““It isIt is not not sunny this afternoonsunny this afternoon and and it it
is colder than yesterdayis colder than yesterday”” ““We will go swimmingWe will go swimming only if only if it is it is
sunnysunny”” ““If If we dowe do not not go swimminggo swimming, then , then we we
will take a canoe tripwill take a canoe trip”” ““If If we take a canoe tripwe take a canoe trip, then , then we will we will
be home by sunsetbe home by sunset””
Does this imply that “Does this imply that “we will be we will be home by sunsethome by sunset”?”?
p
q
r
s
t
¬p q
r → p
¬r → s
s → t
t
1111
Rules of inference (Rules of inference (§1.5)§1.5)
1.1. ¬p ¬p q q 11stst hypothesis hypothesis
2.2. ¬p¬p Simplification using step 1Simplification using step 1
3.3. r → pr → p 22ndnd hypothesis hypothesis
4.4. ¬r¬r Modus tollens using steps 2 & 3Modus tollens using steps 2 & 3
5.5. ¬r → s¬r → s 33rdrd hypothesis hypothesis
6.6. ss Modus ponens using steps 4 & 5Modus ponens using steps 4 & 5
7.7. s → t s → t 44thth hypothesis hypothesis
8.8. tt Modus ponens using steps 6 & 7Modus ponens using steps 6 & 7
p
qp
q
qp
p
p
qp
q
1212
In 11In 11thth place (2/3) (12 votes) place (2/3) (12 votes)
1313
Rules of inference (Rules of inference (§1.5)§1.5)
Rosen, section 1.5, question 10aRosen, section 1.5, question 10a
Given the hypotheses:Given the hypotheses: ““Linda, a student in this class, owns a Linda, a student in this class, owns a
red convertible.”red convertible.” ““Everybody who owns a red convertible Everybody who owns a red convertible
has gotten at least one speeding ticket”has gotten at least one speeding ticket”
Can you conclude: “Somebody in Can you conclude: “Somebody in this class has gotten a speeding this class has gotten a speeding ticket”?ticket”?
C(Linda)R(Linda)
x (R(x)→T(x))
x (C(x)T(x))
1414
Rules of inference (Rules of inference (§1.5)§1.5)
1.1. x (R(x)→T(x))x (R(x)→T(x)) 33rdrd hypothesis hypothesis
2.2. R(Linda) → T(Linda)R(Linda) → T(Linda) Universal instantiation using step Universal instantiation using step
11
3.3. R(Linda)R(Linda) 22ndnd hypothesis hypothesis
4.4. T(Linda)T(Linda) Modes ponens using steps 2 & 3Modes ponens using steps 2 & 3
5.5. C(Linda)C(Linda) 11stst hypothesis hypothesis
6.6. C(Linda) C(Linda) T(Linda) T(Linda) Conjunction using steps 4 & 5Conjunction using steps 4 & 5
7.7. x (C(x)x (C(x)T(x))T(x)) Existential generalization using Existential generalization using
step 6step 6Thus, we have shown that “Somebody in this class has gotten a speeding ticket”
1515
In 11In 11thth place (3/3) (12 votes) place (3/3) (12 votes)
1616
Proof methods (Proof methods (§1.5)§1.5)
Ten proof methods:Ten proof methods:1.1. Direct proofsDirect proofs2.2. Indirect proofsIndirect proofs3.3. Vacuous proofsVacuous proofs4.4. Trivial proofsTrivial proofs5.5. Proof by contradictionProof by contradiction6.6. Proof by casesProof by cases7.7. Proofs of equivalenceProofs of equivalence8.8. Existence proofsExistence proofs9.9. Uniqueness proofsUniqueness proofs10.10. CounterexamplesCounterexamples
1717
In 10In 10thth place (1/5) (13 votes) place (1/5) (13 votes)
1818
Direct proof exampleDirect proof example
Rosen, section 1.5, question 20Rosen, section 1.5, question 20 Show that the square of an even number is an Show that the square of an even number is an
even numbereven number Rephrased: if Rephrased: if nn is even, then is even, then nn22 is even is even
Assume Assume nn is even is even Thus, Thus, nn = 2 = 2kk, for some , for some kk (definition of even (definition of even
numbers)numbers) nn22 = (2 = (2kk))22 = 4 = 4kk22 = 2(2 = 2(2kk22)) As As nn22 is 2 times an integer, is 2 times an integer, nn22 is thus even is thus even
1919
Indirect proof exampleIndirect proof example
If If nn22 is an odd integer then is an odd integer then nn is an odd integer is an odd integer
Prove the contrapositive: If Prove the contrapositive: If nn is an even integer, is an even integer, then then nn22 is an even integer is an even integer
Proof: Proof: nn=2=2kk for some integer for some integer kk (definition of even (definition of even numbers)numbers)
nn22 = (2 = (2kk))22 = 4 = 4kk22 = 2(2 = 2(2kk22))
Since Since nn22 is 2 times an integer, it is even is 2 times an integer, it is even
2020
In 10In 10thth place (2/5) (13 votes) place (2/5) (13 votes)
2121
Proof by contradictionProof by contradiction
Given a statement p, assume it is falseGiven a statement p, assume it is false Assume ¬pAssume ¬p
Prove that ¬p cannot occurProve that ¬p cannot occur A contradiction existsA contradiction exists
Given a statement of the form p→qGiven a statement of the form p→q To assume it’s false, you only have to consider the To assume it’s false, you only have to consider the
case where p is true and q is falsecase where p is true and q is false
2222
Proof by contradictionProof by contradiction
Theorem (by Euclid): There are infinitely many Theorem (by Euclid): There are infinitely many prime numbers. prime numbers.
Proof. Assume there are a finite number of primesProof. Assume there are a finite number of primes
List them as follows: List them as follows: pp11, , pp22 …, …, ppnn..
Consider the number Consider the number qq = = pp11pp22 … … ppnn + 1 + 1 This number is not divisible by any of the listed primesThis number is not divisible by any of the listed primes
If we divided If we divided ppii into into qq, there would result a remainder of 1, there would result a remainder of 1 We must conclude that We must conclude that qq is a prime number, not among is a prime number, not among
the primes listed abovethe primes listed aboveThis contradicts our assumption that all primes are in the list This contradicts our assumption that all primes are in the list pp11, , pp22 …, …, ppnn..
2323
Proof by contradiction example 2Proof by contradiction example 2
Rosen, section 1.5, question 21 (b)Rosen, section 1.5, question 21 (b) Prove that if n is an integer and nProve that if n is an integer and n33+5 is odd, then n is even+5 is odd, then n is even Rephrased: If nRephrased: If n33+5 is odd, then n is even+5 is odd, then n is even
Thus, p is “nThus, p is “n33+5” is odd, q is “n is even”+5” is odd, q is “n is even”
Assume p and Assume p and qq Assume that nAssume that n33+5 is odd, and n is odd+5 is odd, and n is odd
Since n is odd:Since n is odd: n=2k+1 for some integer k (definition of odd numbers)n=2k+1 for some integer k (definition of odd numbers) nn33+5 = (2k+1)+5 = (2k+1)33+5 = 8k+5 = 8k33+12k+12k22+6k+6 = 2(4k+6k+6 = 2(4k33+6k+6k22+3k+3)+3k+3) As nAs n33+5 = 2(4k+5 = 2(4k33+6k+6k22+3k+3) is 2 times an integer, n must be even+3k+3) is 2 times an integer, n must be even Thus, we have concluded qThus, we have concluded q
Contradiction!Contradiction! We assumed q was false, and showed that this assumption implies that q must We assumed q was false, and showed that this assumption implies that q must
be truebe true As q cannot be both true and false, we have reached our contradictionAs q cannot be both true and false, we have reached our contradiction
2424
In 10In 10thth place (3/5) (13 votes) place (3/5) (13 votes)
2525
Vacuous proof exampleVacuous proof example
When the antecedent is falseWhen the antecedent is false
Consider the statement:Consider the statement: All criminology majors in CS 202 are femaleAll criminology majors in CS 202 are female Rephrased: If you are a criminology major and you Rephrased: If you are a criminology major and you
are in CS 202, then you are femaleare in CS 202, then you are femaleCould also use quantifiers!Could also use quantifiers!
Since there are no criminology majors in this Since there are no criminology majors in this class, the antecedent is false, and the class, the antecedent is false, and the implication is trueimplication is true
2626
Trivial proof exampleTrivial proof example
When the consequence is trueWhen the consequence is true
Consider the statement:Consider the statement: If you are tall and are in CS 202 then you are If you are tall and are in CS 202 then you are
a studenta student
Since all people in CS 202 are students, Since all people in CS 202 are students, the implication is true regardlessthe implication is true regardless
2727
Proof by cases exampleProof by cases example
Prove that Prove that Note that b ≠ 0Note that b ≠ 0
Cases:Cases: Case 1: a ≥ 0 and b > 0Case 1: a ≥ 0 and b > 0
Then |a| = a, |b| = b, andThen |a| = a, |b| = b, and Case 2: a ≥ 0 and b < 0Case 2: a ≥ 0 and b < 0
Then |a| = a, |b| = -b, andThen |a| = a, |b| = -b, and Case 3: a < 0 and b > 0Case 3: a < 0 and b > 0
Then |a| = -a, |b| = b, andThen |a| = -a, |b| = b, and Case 4: a < 0 and b < 0Case 4: a < 0 and b < 0
Then |a| = -a, |b| = -b, andThen |a| = -a, |b| = -b, and
b
a
b
a
b
a
b
a
b
a
b
a
b
a
b
a
b
a
b
a
b
a
b
a
b
a
b
a
b
a
b
a
b
a
2828
In 10In 10thth place (4/5) (13 votes) place (4/5) (13 votes)
2929
Proofs of equivalence exampleProofs of equivalence example
Rosen, section 1.5, question 40Rosen, section 1.5, question 40 Show that mShow that m22=n=n22 if and only if m=n or m=-n if and only if m=n or m=-n Rephrased: (mRephrased: (m22=n=n22) ↔ [(m=n)) ↔ [(m=n)(m=-n)](m=-n)]
Need to prove two parts:Need to prove two parts: [(m=n)[(m=n)(m=-n)] → (m(m=-n)] → (m22=n=n22))
Proof by cases!Proof by cases!Case 1: (m=n) → (mCase 1: (m=n) → (m22=n=n22))
(m)(m)22 = m = m22, and (n), and (n)22 = n = n22, so this case is proven, so this case is proven
Case 2: (m=-n) → (mCase 2: (m=-n) → (m22=n=n22)) (m)(m)22 = m = m22, and (-n), and (-n)22 = n = n22, so this case is proven, so this case is proven
(m(m22=n=n22) → [(m=n)) → [(m=n)(m=-n)](m=-n)]Subtract nSubtract n22 from both sides to get m from both sides to get m22-n-n22=0=0Factor to get (m+n)(m-n) = 0Factor to get (m+n)(m-n) = 0Since that equals zero, one of the factors must be zeroSince that equals zero, one of the factors must be zeroThus, either m+n=0 (which means m=n)Thus, either m+n=0 (which means m=n)Or m-n=0 (which means m=-n)Or m-n=0 (which means m=-n)
3030
In 10In 10thth place (5/5) (13 votes) place (5/5) (13 votes)
3131
Constructive existence proof Constructive existence proof exampleexample
Show that a square exists that is the sum Show that a square exists that is the sum of two other squaresof two other squares Proof: 3Proof: 322 + 4 + 422 = 5 = 522
Show that a cube exists that is the sum of Show that a cube exists that is the sum of three other cubesthree other cubes Proof: 3Proof: 333 + 4 + 433 + 5 + 533 = 6 = 633
3232
Non-constructive existence proof Non-constructive existence proof exampleexample
Rosen, section 1.5, question 50Rosen, section 1.5, question 50Prove that either 2*10Prove that either 2*10500500+15 or 2*10+15 or 2*10500500+16 is not a +16 is not a perfect squareperfect square
A perfect square is a square of an integerA perfect square is a square of an integer Rephrased: Show that a non-perfect square exists in the set Rephrased: Show that a non-perfect square exists in the set
{2*10{2*10500500+15, 2*10+15, 2*10500500+16}+16}
Proof: The only two perfect squares that differ by 1 are 0 Proof: The only two perfect squares that differ by 1 are 0 and 1and 1
Thus, any other numbers that differ by 1 cannot both be perfect Thus, any other numbers that differ by 1 cannot both be perfect squaressquares
Thus, a non-perfect square must exist in any set that contains Thus, a non-perfect square must exist in any set that contains two numbers that differ by 1two numbers that differ by 1
Note that we didn’t specify which one it was!Note that we didn’t specify which one it was!
3333
In 9In 9thth place (14 votes) place (14 votes)
3434
Uniqueness proof exampleUniqueness proof example
If the real number equation 5x+3=a has a If the real number equation 5x+3=a has a solution then it is uniquesolution then it is unique
ExistenceExistence We can manipulate 5x+3=a to equal (a-3)/5We can manipulate 5x+3=a to equal (a-3)/5 Is this constructive or nonconstructive?Is this constructive or nonconstructive?
UniquenessUniqueness If there are two such numbers, then they would fulfill If there are two such numbers, then they would fulfill
the following: a = 5x+3 = 5y+3the following: a = 5x+3 = 5y+3 We can manipulate this to yield that x = yWe can manipulate this to yield that x = y
Thus, the one solution is unique!Thus, the one solution is unique!
3535
In 8In 8thth place (15 votes) place (15 votes)
3636
CounterexamplesCounterexamples
Given a universally quantified statement, find a single Given a universally quantified statement, find a single example which it is not trueexample which it is not true
Note that this is DISPROVING a UNIVERSAL statement Note that this is DISPROVING a UNIVERSAL statement by a counterexampleby a counterexample
x ¬R(x), where R(x) means “x has red hair”x ¬R(x), where R(x) means “x has red hair” Find one person (in the domain) who has red hairFind one person (in the domain) who has red hair
Every positive integer is the square of another integerEvery positive integer is the square of another integer The square root of 5 is 2.236, which is not an integerThe square root of 5 is 2.236, which is not an integer
3737
In 7In 7thth place (16 votes) place (16 votes)
3838
Weak mathematical induction (§ 3.3)Weak mathematical induction (§ 3.3)
Rosen, question 7: ShowRosen, question 7: Show
Base case: Base case: nn = 1 = 1
Inductive hypothesis: assume Inductive hypothesis: assume
6
)12)(1(
1
2
nnni
n
i
116
61
6
)12)(11(1
2
1
1
2
i
i
6
)12)(1(
1
2
kkki
k
i
3939
Weak mathematical induction (§ 3.3)Weak mathematical induction (§ 3.3)
Inductive step: show Inductive step: show 6
)1)1(2)(1)1)((1(1
1
2
kkki
k
i
6
)32)(2)(1()1(
1
22
kkkik
k
i
6139261392 2323 kkkkkk
)32)(2)(1()12)(1()1(6 2 kkkkkkk
6
)32)(2)(1(
6
)12)(1()1( 2
kkkkkk
k
6
)1)1(2)(1)1)((1(1
1
2
kkki
k
i
6
)12)(1(
1
2
kkki
k
i
4040
In 6In 6thth place (18 votes) place (18 votes)
4141
Strong mathematical induction (§ 3.3)Strong mathematical induction (§ 3.3)
Show that any number > 1 can be written Show that any number > 1 can be written as the product of primesas the product of primes
Base case: P(2)Base case: P(2) 2 is the product of 2 (remember that 1 is not 2 is the product of 2 (remember that 1 is not
prime!)prime!)
Inductive hypothesis: P(1), P(2), P(3), …, Inductive hypothesis: P(1), P(2), P(3), …, P(P(kk) are all true) are all trueInductive step: Show that P(Inductive step: Show that P(kk+1) is true+1) is true
4242
Strong mathematical induction (§ 3.3)Strong mathematical induction (§ 3.3)
Inductive step: Show that P(Inductive step: Show that P(kk+1) is true+1) is true
There are two cases:There are two cases: kk+1 is prime+1 is prime
It can then be written as the product of It can then be written as the product of kk+1+1 kk+1 is composite+1 is composite
It can be written as the product of two composites, It can be written as the product of two composites, a and b, where 2 ≤ a and b, where 2 ≤ aa ≤ ≤ bb < < kk+1+1
By the inductive hypothesis, both P(By the inductive hypothesis, both P(aa) and P() and P(bb) is ) is truetrue
4343
In 5In 5thth place (1/2) (21 votes) place (1/2) (21 votes)
4444
Structural induction Structural induction (§ 3.4)(§ 3.4)
Show that Show that nn((TT) ) ≥≥ 2 2hh((TT) + 1) + 1Inductive hypothesisInductive hypothesis:: Let Let TT11 and and TT22 be full binary trees be full binary trees
Assume that Assume that nn((TT11) ) ≥≥ 2 2hh((TT11) + 1 for some tree ) + 1 for some tree TT11
Assume that Assume that nn((TT22) ) ≥≥ 2 2hh((TT22) + 1 for some tree ) + 1 for some tree TT22
Recursive stepRecursive step:: Let Let TT = = TT11 ∙ ∙ TT22
Here the ∙ operator means creating a new tree with a root note Here the ∙ operator means creating a new tree with a root note rr and subtrees and subtrees TT11 and and TT22
New element is New element is TT By the definition of height and size, we know:By the definition of height and size, we know:
nn((TT) = 1 + ) = 1 + nn((TT11) + ) + nn((TT22))hh((TT) = 1 + max ( ) = 1 + max ( hh((TT11), ), hh((TT22) )) )
Therefore:Therefore:nn((TT) = 1 + ) = 1 + nn((TT11) + ) + nn((TT22))≥≥ 1 + 21 + 2hh((TT11) + 1 + 2) + 1 + 2hh((TT22) + 1) + 1≥≥ 1 + 2*max ( 1 + 2*max ( hh((TT11), ), hh((TT22) )) ) the sum of two non-neg #’s is at least the sum of two non-neg #’s is at least
as large as the larger of the as large as the larger of the twotwo= 1 + 2*= 1 + 2*hh((TT))
Thus, Thus, nn((TT) ) ≥≥ 2 2hh((TT) + 1) + 1
4545
In 5In 5thth place (2/2) (21 votes) place (2/2) (21 votes)
4646
Induction methods comparedInduction methods comparedWeak Weak
mathematicalmathematicalStrongStrong
MathematicalMathematical StructuralStructural
Used forUsed forUsually Usually
formulaeformulaeUsually formulae not Usually formulae not
provable via provable via mathematical inductionmathematical induction
Only things defined Only things defined via recursionvia recursion
AssumptionAssumption Assume P(k)Assume P(k) Assume P(1), P(2), …, Assume P(1), P(2), …, P(k)P(k)
Assume statement is Assume statement is true for some "old" true for some "old"
elementselements
What to What to proveprove
True for True for P(k+1)P(k+1) True for P(k+1)True for P(k+1)
Statement is true for Statement is true for some "new" elements some "new" elements
created with "old" created with "old" elementselements
Step 1 Step 1 calledcalled
Base caseBase case Base caseBase case Basis stepBasis step
Step 3 Step 3 calledcalled
Inductive stepInductive step Inductive stepInductive step Recursive stepRecursive step
4747
In 4In 4thth place (25 votes) place (25 votes)
4848
Pigeonhole principle (Pigeonhole principle (§4.2)§4.2)
Consider 5 distinct points (Consider 5 distinct points (xxii, , yyii) with integer values, where ) with integer values, where ii = 1, = 1, 2, 3, 4, 52, 3, 4, 5Show that the midpoint of at least one pair of these five points Show that the midpoint of at least one pair of these five points also has integer coordinatesalso has integer coordinates
Thus, we are looking for the midpoint of a segment from (Thus, we are looking for the midpoint of a segment from (aa,,bb) to ) to ((cc,,dd))
The midpoint is ( (The midpoint is ( (aa++cc)/2, ()/2, (bb++dd)/2 ))/2 )
Note that the midpoint will be integers if Note that the midpoint will be integers if aa and and cc have the same have the same parity: are either both even or both oddparity: are either both even or both odd
Same for Same for bb and and dd
There are four parity possibilitiesThere are four parity possibilities (even, even), (even, odd), (odd, even), (odd, odd)(even, even), (even, odd), (odd, even), (odd, odd)
Since we have 5 points, by the pigeonhole principle, there must Since we have 5 points, by the pigeonhole principle, there must be two points that have the same parity possibilitybe two points that have the same parity possibility
Thus, the midpoint of those two points will have integer coordinatesThus, the midpoint of those two points will have integer coordinates
4949
In 3In 3rdrd place (1/2) (27 votes) place (1/2) (27 votes)
5050
Combinatorial proof (Combinatorial proof (§§4.3)4.3)
Let Let nn be a non-negative integer. Then be a non-negative integer. Then
Combinatorial proofCombinatorial proof A set with A set with nn elements has 2 elements has 2nn subsets subsets
By definition of power setBy definition of power set
Each subset has either 0 or 1 or 2 or … or Each subset has either 0 or 1 or 2 or … or nn elements elementsThere are subsets with 0 elements, subsets with 1 There are subsets with 0 elements, subsets with 1 element, … and subsets with element, … and subsets with nn elements elements
Thus, the total number of subsets isThus, the total number of subsets is
Thus,Thus,
n
k
n
k
n
0
2
nn
k k
n2
0
0
n
n
k k
n
0
1
n
n
n
5151
In 3In 3rdrd place (2/2) (27 votes) place (2/2) (27 votes)
5252
Official course goalsOfficial course goals
1.1. Logic: Introduce a formal system (propositional and predicate Logic: Introduce a formal system (propositional and predicate logic) which mathematical reasoning is based on. (sections 1.1-logic) which mathematical reasoning is based on. (sections 1.1-1.4) 1.4)
2.2. Proofs: Develop an understanding of how to read and construct Proofs: Develop an understanding of how to read and construct valid mathematical arguments (proofs) and understand valid mathematical arguments (proofs) and understand mathematical statements (theorems), including inductive proofs. mathematical statements (theorems), including inductive proofs. Also, introduce and work with various problem solving strategies Also, introduce and work with various problem solving strategies and techniques. (sections 1.5, 3.1, 3.3, 3.4) and techniques. (sections 1.5, 3.1, 3.3, 3.4)
3.3. Counting: Introduce the basics of integer theory, combinatorics, Counting: Introduce the basics of integer theory, combinatorics, and counting principles, including a brief introduction to discrete and counting principles, including a brief introduction to discrete probability. (sections 2.4, 4.1-4.4, 5.1) probability. (sections 2.4, 4.1-4.4, 5.1)
4.4. Structures: Introduce and work with important discrete data Structures: Introduce and work with important discrete data structures such as sets, relations, sequences, and discrete structures such as sets, relations, sequences, and discrete functions. (sections 1.6-1.8, 2.7, 3.2, 7.1, 7.3-7.6) functions. (sections 1.6-1.8, 2.7, 3.2, 7.1, 7.3-7.6)
5.5. Applications: Gain an understanding of some application areas of Applications: Gain an understanding of some application areas of the material covered in the course. (sections 2.6, 3.6, 10.3) the material covered in the course. (sections 2.6, 3.6, 10.3)
The written final will be based on these goals!The written final will be based on these goals!
5353
In 2In 2ndnd place (30 votes) place (30 votes)
5454
Unofficial course goalsUnofficial course goals
Ensure that all students have a “base” level of discrete Ensure that all students have a “base” level of discrete mathematical proficiencymathematical proficiency
In particular, ensure that they know a number of covered topics, In particular, ensure that they know a number of covered topics, such as sets, logic, etc.such as sets, logic, etc.
Used in CS 216, in particularUsed in CS 216, in particular
To prepare for more advanced computer theory classes To prepare for more advanced computer theory classes (CS 302, CS 432)(CS 302, CS 432)
To give the students more experience in mathTo give the students more experience in math The best way to get better at anything is through practiceThe best way to get better at anything is through practice
To help create a To help create a computer scientistcomputer scientist, not a computer , not a computer programmerprogrammer
5555
And the winner is…And the winner is…with 45 votes…with 45 votes…
5656
Have a summer!Have a summer!
Final is 9 a.m. this Saturday!Final is 9 a.m. this Saturday!