1.
Inference and Proofs - 05 CSC1001 Discrete Mathematics 1 CHAPTER การอน ุมานและการพิสจน์ ู 5 (Inference and Proofs) 1 Rules of Inference1. Valid Arguments in Propositional Logic Consider the following argument involving propositions (which, by definition, is a sequence of propositions):“If you have a current password, then you can log onto the network.” “You have a current password.”Therefore, “You can log onto the network.” We would like to determine whether this is a valid argument. That is, we would like to determine whetherthe conclusion “You can log onto the network” must be true when the premises “If you have a currentpassword, then you can log onto the network” and “You have a current password” are both true. Definition 1 An argument in propositional logic is a sequence of propositions. All but not the final propositions in the argument are called premises and the final proposition is called the conclusion. An argument is valid if the truth of all its premises implies that the conclusion is true. Definition 2 An argument form in propositional logic is a sequence of compound propositions involving propositional variables. An argument form is valid no matter which particular propositions are substituted for the propositional variables in its premises, the conclusion is true if the premises are all true.Example 1 (6 points) Can you show the conclusion of the premises, if all of them are true.1) “If you have access to the network, then you can change your grade.”, “You have access to the network.”, Therefore,2) “If there is thunder, then it is raining”, “If it is raining, then Thailand football team wins”, Therefore,3) “Paint is gay”, “Tong is gay”, Therefore,มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
2.
2 CSC1001 Discrete Mathematics 05 - Inference and Proofs2. Rules of Inference for Propositional Logic We can first establish the validity of some relatively simple argument forms, called rules of inference.These rules of inference can be used as building blocks to construct more complicated valid argument forms.We will now introduce the most important rules of inference in propositional logic. Rule of Inference Tautology Name p p→q (p ∧ (p → q)) → q Modus ponens ∴q ¬q p→q ( ¬ q ∧ (p → q)) → ¬p Modus tollens ∴¬p p→q q→r ((p → q) ∧ (q → r)) → (p → r) Hypothetical syllogism ∴p→ r p∨ q ¬p ((p ∨ q) ∧ ¬ p) → q Disjunctive syllogism ∴q P p → (p ∨ q) Addition ∴p∨ q p∧q (p ∧ q) → p Simplification ∴p p q ((p) ∧ (q)) → (p ∧ q) Conjunction ∴p ∧ q p∨ q ¬p ∨ r ((p ∨ q) ∧ ( ¬ p ∨ r)) → (q ∨ r) Resolution ∴q∨ rExample 2 (2 points) What is the conclusion statement by using rules of inference, if given the hypothesis(premises) “If it snows today, then we will go skiing” and “It is snowing today” are true.Example 3 (2 points) What is the conclusion statement by using rules of inference, if given the hypothesis(premises) “If there is thunder, then it is raining” and “If it is raining, then Thailand football team wins” are true.มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
3.
Inference and Proofs - 05 CSC1001 Discrete Mathematics 3Example 4 (2 points) What is the conclusion statement by using rules of inference, if given the hypothesis(premises) “Paint is gay” and “Tong is gay” are true.Example 5 (2 points) What is the conclusion statement by using rules of inference, if given the hypothesis(premises) “Natee is a beautiful boy” is true.Example 6 (2 points) What is the conclusion statement by using rules of inference, if given the hypothesis(premises) “Tong is not gay” and “If Paint is gay, then Tong is gay” are true.Example 7 (2 points) What is the conclusion statement by using rules of inference, if given the hypothesis(premises) “Nut get F in discrete mathematics or Nut get A in discrete mathematics” and “Nut does not get F indiscrete mathematics” are true.Example 8 (2 points) What is the conclusion statement by using rules of inference, if given the hypothesis(premises) “Natee and Frame are a beautiful boy” is true.Example 9 (2 points) What is the conclusion statement by using rules of inference, if given the hypothesis(premises) “It is raining or it is sunny” and “It is not raining or it is cloudy” are true.มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
4.
4 CSC1001 Discrete Mathematics 05 - Inference and Proofs3. Using Rules of Inference to Build Arguments When there are many premises or hypothesis, therefore, several rules of inference are often needed toshow that an argument is valid.Example 10 (10 points) Show that the premises “If students come to class before teacher, then students get Afor this course,” “If students get A for this course, then students graduate in their degree,” and “students do notgraduate in their degree” lead to the conclusion “Students do not come to class before teacher.”Example 11 (10 points) Show that the premises “Paint is not gay,” “If Paint is not gay, then Tong is not gay,”and “Tong is gay or Nut is gay” lead to the conclusion “Nut is gay or Natee is super gay.”Example 12 (10 points) Show that the premises “It is not sunny this afternoon and it is colder than yesterday,”“We will go swimming only if it is sunny,” “If we do not go swimming, then we will take a canoe trip,” and “If wetake a canoe trip, then we will be home by sunset” lead to the conclusion “We will be home by sunset.”มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
5.
Inference and Proofs - 05 CSC1001 Discrete Mathematics 5Example 13 (10 points) Show that the premises “x + 2 = 7 and x + 4 = 9,” “If x + 4 = 9, then x * x ≠ 20,”“If x – 2 = 5, then x * x = 20,” and “x ÷ 2 ≠ 0,” lead to the conclusion “x – 2 ≠ 5 and x ÷ 2 ≠ 0.”Example 14 (10 points) Show that the premises “If you send me an e-mail message, then I will finish writingthe program,” “If you do not send me an e-mail message, then I will go to sleep early,” and “If I go to sleepearly, then I will wake up feeling refreshed” lead to the conclusion “If I do not finish writing the program, then Iwill wake up feeling refreshed.”Example 15 (5 points) Show that the premises p ∧ q and q → r imply the conclusion r.Example 16 (5 points) Show that the premises p → q, q → r and ¬ r imply the conclusion ¬ p.มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
6.
6 CSC1001 Discrete Mathematics 05 - Inference and ProofsExample 17 (5 points) Show that the premises (p ∧ q) ∨ r and r → s imply the conclusion p ∨ s.Example 18 (10 points) Show that the premises p → q, r → ¬ q, ¬ r → s, t → ¬s and p imply theconclusion ¬ t.Example 19 (10 points) Show that the premises p ∨ q, ¬ q, p → ¬ r, s → r and ¬t imply the conclusion¬ (s ∨ t).Example 20 (10 points) Show that the premises (p ∧ t) → (r ∨ s), q → (u ∧ t), u → p, and ¬s imply theconclusion q → r.มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
7.
Inference and Proofs - 05 CSC1001 Discrete Mathematics 7 2 Introduction to Proofs1. Direct Proofs Definition 1 The integer n is even if there exists an integer k such that n = 2k, and n is odd if there exists an integer k such that n = 2k + 1. (Note that every integer is either even or odd, and no integer is both even and odd.) Two integers have the same parity when both are even or both are odd; they have opposite parity when one is even and the other is odd.Example 1 (2 points) Give a direct proof of the theorem “If n is an odd integer, then n2 is odd.”Example 2 (2 points) Give a direct proof of the theorem “If n is an even integer, then n + n + n is even.”Example 3 (2 points) Give a direct proof that if m and n are both perfect squares, then nm is also a perfectsquare. (An integer a is a perfect square if there is an integer b such that a = b2.)2. Indirect Proofs (Proof by Contraposition) Definition 2 An extremely useful type of indirect proof is known as proof by contraposition. Proofs by contraposition make use of the fact that the conditional statement p → q is equivalent to its contrapositive, ¬ q → ¬ p. This means that the conditional statement p → q can be proved by showing that its condition of contra- positive, ¬ q → ¬ p, is true.Example 4 (2 points) Prove that if n is an integer and 3n + 2 is odd, then n is odd.มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
8.
8 CSC1001 Discrete Mathematics 05 - Inference and ProofsExample 5 (2 points) Prove that if n = ab, where a and b are positive integers, then a ≤ n or b ≤ n.Example 6 (2 points) Show that the proposition P(0) is true, where P(n) is “If n > 1, then n2 > n” and thedomain consists of all integers.Example 7 (2 points) Let P(n) be “If a and b are positive integers with a ≥ b, then an ≥ bn,” where the domainconsists of all nonnegative integers. Show that P(0) is true.3. Proof by Cases Definition 3 This method is based on a rule of inference that we will now introduce. To prove a conditional statement of the form (p1 ∨ p2 ∨ … ∨ pn) → q the tautology [(p1 ∨ p2 ∨ … ∨ pn) → q] ↔ [(p1 → q) ∧ (p2 → q) ∧ … ∧ (pn → q)] can be used as a rule of inference. This shows that the original conditional statement with a hypothesis made up of a disjunction of the propositions p1, p2, . . . , pn can be proved by proving each of the n conditional statements pi → q, i = 1, 2, . . . , n, individually. Such an argument is called a proof by cases.Example 8 (2 points) Prove that if n is an integer, then n2 ≥ n.Example 9 (2 points) Prove that (n + 1)3 ≥ 3n if n is a positive integer with n ≤ 4.มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี