Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 15 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
15
Dung lượng
322,61 KB
Nội dung
ProvingMethods Nguyen An Khuong, Huynh Tuong Nguyen ChapterProvingMethodsDiscreteStructureforComputing(CO1007) Contents Proof Methods Homeworks and Exercises (Materials drawn from Chapter in: “Michael Huth and Mark Ryan Logic in Computer Science: Modelling and Reasoning about Systems, 2nd Ed., Cambridge University Press, 2006.”) Nguyen An Khuong, Huynh Tuong Nguyen Faculty of Computer Science and Engineering University of Technology, VNU-HCM 2.1 Contents ProvingMethods Nguyen An Khuong, Huynh Tuong Nguyen Contents Proof Methods Proof Methods Homeworks and Exercises Homeworks and Exercises 2.2 Introduction ProvingMethods Nguyen An Khuong, Huynh Tuong Nguyen Contents Definition A proof is a sequence of logical deductions from - axioms, and - previously proved theorems that concludes with a new theorem Proof Methods Homeworks and Exercises 2.3 Terminology ProvingMethods Nguyen An Khuong, Huynh Tuong Nguyen Contents Proof Methods Homeworks and Exercises • Theorem (định lý ) = a statement that can be shown to be true • Axiom (tiên đề ) = a statement we assume to be true • Hypothesis (giả thiết) = the premises of the theorem 2.4 ProvingMethods Nguyen An Khuong, Huynh Tuong Nguyen Contents Proof Methods Homeworks and Exercises • Lemma (bổ đề ) = less important theorem that is helpful in the proofs of other results • Corollary (hệ ) = a theorem that can be established directly from a proved theorem • Conjecture (phỏng đoán) = statement being proposed to be true, when it is proved, it becomes theorem 2.5 Proving a Theorem ProvingMethods Nguyen An Khuong, Huynh Tuong Nguyen Many theorem has the form ∀xP (x) → Q(x) Contents Proof Methods Goal: • Show that P (c) → Q(c) is true with arbitrary c of the domain Homeworks and Exercises • Apply universal generalization ⇒ How to show that conditional statement p → q is true 2.6 Methods of Proof ProvingMethods Nguyen An Khuong, Huynh Tuong Nguyen Contents • Direct proofs (chứng minh trực tiếp) Proof Methods • Proof by contraposition (chứng minh phản đảo) Homeworks and Exercises • Proof by contradiction (chứng minh phản chứng ) • Mathematical induction (quy nạp toán học) 2.7 Direct Proofs ProvingMethods Nguyen An Khuong, Huynh Tuong Nguyen Definition A direct proof shows that p → q is true by showing that if p is true, then q must also be true Contents Proof Methods Homeworks and Exercises Example Ex.: If n is an odd integer, then n2 is odd Pr.: Assume that n is odd By the definition, n = 2k + 1, k ∈ Z n2 = (2k + 1)2 = 4k + 4k + = 2(2k + 2k) + is an odd number 2.8 Proof by Contraposition ProvingMethods Nguyen An Khuong, Huynh Tuong Nguyen Definition p → q can be proved by showing (directly) that its contrapositive, ¬q → ¬p, is true Contents Proof Methods Example Homeworks and Exercises Ex.: If n is an integer and 3n + is odd, then n is odd Pr.: Assume that “If 3n + is odd, then n is odd” is false; or n is even, so n = 2k, k ∈ Z Substituting 3n + = 3(2k) + = 6k + = 2(3k + 1) is even Because the negation of the conclusion of the conditional statement implies that the hypothesis is false, Q.E.D 2.9 Proofs by Contradiction ProvingMethods Nguyen An Khuong, Huynh Tuong Nguyen Definition p is true if if can show that ¬p → (r ∧ ¬r) is true for some proposition r Contents Proof Methods Example √ Homeworks and Exercises Ex.: Prove that is irrational √ Pr.: Let p is the proposition “ is irrational” Suppose ¬p is true, √ √ which means is rational If so, ∃a, b ∈ Z, = a/b, a, b have no common factors Squared, = a2 /b2 , 2b2 = a2 , so a2 is even, and a is even, too Because of that a = 2c, c ∈ Z Thus, 2b2 = 4c2 , or b2 = 2c2 , which means b2 is even and so is b That means divides both a and b, contradict with the assumption 2.10 Problem ProvingMethods Nguyen An Khuong, Huynh Tuong Nguyen Contents Proof Methods Homeworks and Exercises Assume that we have an infinite domino string, we want to know whether every dominoes will fall, if we only know two things: We can push the first domino to fall If a domino falls, the next one will be fall We can! Mathematical induction 2.11 Mathematical Induction ProvingMethods Nguyen An Khuong, Huynh Tuong Nguyen Definition (Induction) To prove that P (n) is true for all positive integers n, where P (n) is a propositional function, we complete two steps: • Basis Step: Verify that P (1) is true Contents Proof Methods Homeworks and Exercises • Inductive Step: Show that the conditional statement P (k) → P (k + 1) is true for all positive integers k Logic form: [P (1) ∧ ∀kP (k) → P (k + 1))] → ∀nP (n) What is P (n) in domino string case? 2.12 ProvingMethods Example on Induction Nguyen An Khuong, Huynh Tuong Nguyen Example Show that if n is a positive integer, then + + + n = n(n + 1) Contents Proof Methods Solution Let P (n) be the proposition that sum of first n is n(n + 1)/2 • Basis Step: P (1) is true, because = • Inductive Step: Assume that + + + k = Then: Homeworks and Exercises 1(1+1) k(k+1) + + + k + (k + 1) = = = k(k + 1) + (k + 1) k(k + 1) + 2(k + 1) (k + 1)(k + 2) shows that P (k + 1) is true under the assumption that P (k) is true 2.13 Example on Induction ProvingMethods Nguyen An Khuong, Huynh Tuong Nguyen Example Prove that n < 2n for all positive integers n Solution Contents Let P (n) be the proposition that n > 2n Proof Methods • Basis Step: P (1) is true, because > 21 = Homeworks and Exercises • Inductive Step: Assume that P (k) is true for the positive k, that is, k < 2k Add to both side of k < 2k , note that ≤ 2k k + < 2k + ≤ 2k + 2k = · 2k = 2k+1 shows that P (k + 1) is true, namely, that k + < 2k+1 , based on the assumption that P (k) is true 2.14 Homeworks and Exercises ProvingMethods Nguyen An Khuong, Huynh Tuong Nguyen Cauchy inequality on means Fibonacci in Pascal’s Triangle: Prove that Fn = C(n, 0) + C(n − 1, 1) + C(n − 2, 2) + + C( n/2 , n/2 ), where Fn is the nth Fibonacci number, F0 = F1 = Notice that if C(a, b) = for b > a, we can rewrite the desired result as Fn = Contents Proof Methods Homeworks and Exercises n n−1 n−2 + + + + + n−1 n in order to have a simpler version to work with, and avoid considerations of whether n is even or odd Solve Exercises 7-11 in Huth and Ryan’s book Solve exercises in the attachment Try to solve as much as possible related exercises in Rosen’s book 2.15