1 / 26

CS322

Week 4 - Monday. CS322. Last time. What did we talk about last time? Divisibility Quotient-remainder theorem Proof by cases. Questions?. Logical warmup. An epidemic has struck the Island of Knights and Knaves Sick Knights always lie Sick Knaves always tell the truth

Download Presentation

CS322

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Week 4 - Monday CS322

  2. Last time • What did we talk about last time? • Divisibility • Quotient-remainder theorem • Proof by cases

  3. Questions?

  4. Logical warmup • An epidemic has struck the Island of Knights and Knaves • Sick Knights always lie • Sick Knaves always tell the truth • Healthy Knights and Knaves are unchanged • During the epidemic, a Nintendo Wii was stolen • There are only three possible suspects: Jacob, Karl, and Louie • They are good friends and know which one actually stole the Wii • Here is part of the trial's transcript: • Judge (to Jacob): What do you know about the theft? • Jacob: The thief is a Knave • Judge: Is he healthy or sick? • Jacob: He is healthy • Judge( to Karl): What do you know about Jacob? • Karl: Jacob is a Knave. • Judge: Healthy or sick? • Karl: Jacob is sick. • The judge thought a while and then asked Louie if he was the thief. Based on his yes or no answer, the judge decided who stole the Wii. • Who was the thief?

  5. Proof by Cases Review

  6. Proof by cases formatting • For a direct proof using cases, follow the same format that you normally would • When you reach your cases, number them clearly • Show that you have proved the conclusion for each case • Finally, after your cases, state that, since you have shown the conclusion is true for all possible cases, the conclusion must be true in general

  7. Consecutive integers have opposite parity • Prove that, given any two consecutive integers, one is even and the other is odd • Hint Divide into two cases: • The smaller of the two integers is even • The smaller of the two integers is odd

  8. Another proof by cases • Theorem: for all integers n, 3n2 + n + 14 is even • How could we prove this using cases? • Be careful with formatting

  9. Floor and Ceiling

  10. More definitions • For any real number x, the floor of x, written x, is defined as follows: • x = the unique integer n such that n ≤ x < n + 1 • For any real number x, the ceiling of x, written x, is defined as follows: • x = the unique integer n such that n – 1 < x ≤ n

  11. Examples • Give the floor for each of the following values • 25/4 • 0.999 • -2.01 • Now, give the ceiling for each of the same values • If there are 4 quarts in a gallon, how many gallon jugs do you need to transport 17 quarts of werewolf blood? • Does this example use floor or ceiling?

  12. Proofs with floor and ceiling • Prove or disprove: • x, y R, x + y = x + y • Prove or disprove: • x R, m Zx + m = x + m

  13. Indirect Proof

  14. Proof by contradiction • The most common form of indirect proof is a proof by contradiction • In such a proof, you begin by assuming the negation of the conclusion • Then, you show that doing so leads to a logical impossibility • Thus, the assumption must be false and the conclusion true

  15. Contradiction formatting • A proof by contradiction is different from a direct proof because you are trying to get to a point where things don't make sense • You should always mark such proofs clearly • Start your proof with the words Proof by contradiction • Write Negation of conclusion as the justification for the negated conclusion • Clearly mark the line when you have both p and ~p as a contradiction • Finally, state the conclusion with its justification as the contradiction found before

  16. Example • Theorem: There is no largest integer. • Proof by contradiction: Assume that there is a largest integer.

  17. Another example • Theorem: There is no integer that is both even and odd. • Proof by contradiction: Assume that there is an integer that is both even and odd

  18. Another example • Theorem: x, y  Z+, x2 – y2  1 • Proof by contradiction: Assume there is such a pair of integers

  19. Two Classic Results

  20. Square root of 2 is irrational Theorem: is irrational Proof by contradiction: • Suppose is rational • = m/n, where m,nZ, n  0 and m and n have no common factors • 2 = m2/n2 • 2n2 = m2 • 2k = m2, kZ • m = 2a, aZ • 2n2 = (2a)2 = 4a2 • n2 = 2a2 • n = 2b, bZ • 2|m and 2|n • is irrational QED • Negation of conclusion • Definition of rational • Squaring both sides • Transitivity • Square of integer is integer • Even x2 implies even x (Proof on p. 202) • Substitution • Transitivity • Even x2 implies even x • Conjunction of 6 and 9, contradiction • By contradiction in 10, supposition is false

  21. Proposition 4.7.3 • Claim: • Proof by contradiction: Suppose such that 1 1 Contradiction Negation of conclusion Definition of divides Definition of divides Subtraction Substitution Distributive law Definition of divides Since 1 and -1 are the only integers that divide 1 Definition of prime Statement 8 and statement 9 are negations of each other By contradiction at statement 10 QED

  22. Infinitude of primes Theorem: There are an infinite number of primes Proof by contradiction: • Suppose there is a finite list of all primes: p1, p2, p3, …, pn • Let N = p1p2p3…pn + 1, N Z • pk | N where pkis a prime • pk | p1p2p3…pn + 1 • p1p2p3…pn = pk(p1p2p3…pk-1pk+1…pn) • p1p2p3…pn = pkP, P Z • pk | p1p2p3…pn • pk does not divide p1p2p3…pn + 1 • pk does and does not divide p1p2p3…pn + 1 • There are an infinite number of primes QED • Negation of conclusion • Product and sum of integers is an integer • Theorem 4.3.4, p. 174 • Substitution • Commutativity • Product of integers is integer • Definition of divides • Proposition from last slide • Conjunction of 4 and 8, contradiction • By contradiction in 9, supposition is false

  23. A few notes about indirect proof • Don't combine direct proofs and indirect proofs • You're either looking for a contradiction or not • Proving the contrapositive directly is equivalent to a proof by contradiction

  24. Upcoming

  25. Next time… • Review for Exam 1

  26. Reminders • Exam 1 is next Monday • Review is Friday • Start reading Chapter 5

More Related