This preview shows pages 1–5. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: 1 15251 Great Theoretical Ideas in Computer Science 15251 Proof Techniques for Computer Scientists Lecture 2 (September 1, 2011) Inductive Reasoning Induction This is the primary way well This is the primary way well 1. 1. prove theorems prove theorems 2. 2. construct and define objects construct and define objects Dominoes Domino Principle: Line up any number of dominos in a row; knock the first one over and they will all fall n dominoes numbered 0 to n1 F k The The k th th domino falls domino falls If If we set them all up in a row then we we set them all up in a row then we know that each one is set up to know that each one is set up to knock over the next one: knock over the next one: For For all all 0 0 k < n: k < n: F k F k+1 k+1 2 n dominoes numbered 0 to n1 F k The The k th th domino falls domino falls For all 0 k < n For all 0 k < n1: 1: F k F k+1 k+1 F F 1 F 2 F All Dominoes Fall The Natural Numbers One One domino for each natural number: domino for each natural number: 0 1 2 3 4 5 . N = { 0, 1, 2, 3, . . .} Plato: The Domino Principle works for an infinite row of dominoes Aristotle: Never seen an infinite number of anything, much less dominoes. Platos Dominoes One for each natural number Theorem: An infinite row of dominoes, one domino for each natural number. Knock over the first domino and they all will fall Suppose they dont all fall. Let k > 0 be the lowest numbered domino that remains standing. Domino k1 0 did fall, but k1 will knock over domino k. Thus, domino k must fall and remain standing. Contradiction. Proof: Induction Principle: If F and k, F k F k+1 then n, F n Well Ordering Principle: Every nonempty set of positive integers contains a least* element *under the usual ordering < Two Equivalent Principles Well talk more about axioms in the next Lecture Inductive Proofs To Prove k N , S k 1. Establish Base Case: S 2. Establish that k, S k S k+1 To prove To prove To prove To prove k, S k S k+1 Assume hypothetically that S k for any particular k; Conclude that S k+1 3 Theorem ? The sum of the first n odd numbers is n 2 Check on small values: Theorem ? The sum of the first n odd numbers is n 2 Check on small values: 1 = 1 1+3 = 4 1+3+5 = 9 1+3+5+7 = 16 Theorem ? The sum of the first n odd numbers is n 2 The k th odd number is (2k 1), when k > 0 S n is the statement that: 1+3+5+(2k1)+...+(2n1) = n 2 S n = 1 + 3 + 5 + (2k1) + . . +(2n1) = n 2 Establishing that n 1 S n S n = 1 + 3 + 5 + (2k1) + . . +(2n1) = n 2 Establishing that n 1 S n Base Case: S 1 Assume Induction Hypothesis: S k That means: 1+3+5++ (2k1) = k 2 1+3+5++ (2k1)+(2k+1) = k 2 +(2k+1) Sum of first k+1 odd numbers = (k+1) 2 Domino Property: Theorem The sum of the first n odd numbers is n 2 4 Inductive Proofs To Prove k N , S k 1. Establish Base Case: S 2. Establish that 2....
View Full
Document
 Spring '11
 Gupta
 Computer Science

Click to edit the document details