Discrete Mathematics Lecture 4 PDF
Document Details
Abu Dhabi Polytechnic
null
null
Tags
Summary
This document is a lecture on discrete mathematics, specifically focusing on predicates and quantifiers. It covers topics like symbolic propositions, truth values, and examples.
Full Transcript
DISCRETE MATHEMATICS Lecture 4 CLO2. Apply formal methods of symbolic prepositional and predicate logic in information security. 2 “There is a computer on the university network that is under attack by an intruder.” “...
DISCRETE MATHEMATICS Lecture 4 CLO2. Apply formal methods of symbolic prepositional and predicate logic in information security. 2 “There is a computer on the university network that is under attack by an intruder.” “CS2 is under attack by an intruder,” 3 Predicates and Quantifiers Predicates: The statement “x is greater than 3” has two parts. The first part, the variable x, is the subject of the statement. The second part—the predicate, “is greater than 3”— refers to a property that the subject of the statement can have. 4 Predicates Example Let P(x) denote the statement “x > 3.” What are the truth values of P(4) and P(2)? Solution: We obtain the statement P(4) by setting x = 4 in the statement “x > 3.” Hence, P(4), which is the statement “4 > 3,” is true. However, P(2), which is the statement “2 > 3,” is false. 5 Exercise Let A(x) denote the statement “Computer x is under attack by an intruder.” Suppose that of the computers on campus, only CS2 and MATH1 are currently under attack by intruders. What are truth values of A(CS1), A(CS2), and A(MATH1)? 6 Exercise Answer Solution: We obtain the statement A(CS1) by setting x = CS1 in the statement “Computer x is under attack by an intruder.” Because CS1 is not on the list of computers currently under attack, we conclude that A(CS1) is false. Similarly, because CS2 and MATH1 are on the list of computers under attack, we know that A(CS2) and A(MATH1) are true 7 Exercise- Predicate Let Q(x, y) denote the statement “x = y + 3.” What are the truth values of the propositions Q(1, 2) and Q(3, 0)? 8 Exercise - Answer Solution: To obtain Q(1, 2), set x = 1 and y = 2 in the statement Q(x, y). Hence, Q(1, 2) is the statement “1 = 2 + 3,” which is false. The statement Q(3, 0) is the proposition “3 = 0 + 3,” which is true. 9 Exercise letR(x, y, z) denote the statement x + y = z. When values are assignedto the variables x, y, and z, this statement has a truth value. What are the truth values of the propositions R(1, 2, 3) and R(0, 0, 1)? 10 Predicates are also used to establish the correctness of computer programs, that is, to show that computer programs always produce the desired output when given valid input if x > 0 then x := x + 1. P(5) 11 Quantifiers Quantification expresses the extent to which a predicate is true over a range of elements. In English, the words all, some, many, none, and few are used in quantifications. The area of logic that deals with predicates and quantifiers is called the predicate calculus. 12 THE UNIVERSAL QUANTIFIER The universal quantification of P(x) is the statement “P(x) for all values of x in the domain.” The notation ∀xP(x) denotes the universal quantification of P(x). Here ∀ is called the universal quantifier. 13 Example –Universal Quantifiers Let P(x) be the statement “x + 1 > x.” What is the truth value of the quantification ∀xP(x), where the domain consists of all real numbers? Solution: Because P(x) is true for all real numbers x, the quantification ∀xP(x) is true. 14 The Real Numbers 15 Example -Universal Quantifiers Let Q(x) be the statement “x < 2.” What is the truth value of the quantification ∀xQ(x), where the domain consists of all real numbers? Solution: Q(x) is not true for every real number x, because, for instance, Q(3) is false. That is, x = 3 is a counterexample for the statement ∀xQ(x). Thus ∀xQ(x) is false. 16 Exercise – Universal Quantifiers What is the truth value of ∀xP(x), where P(x) is the statement “x2 < 10” and the domain consists of the positive integers not exceeding 4? (4 is also included) 17 Exercise - Answers Solution: The statement ∀xP(x) is the same as the conjunction P(1) ∧ P(2) ∧ P(3) ∧ P(4), because the domain consists of the integers 1, 2, 3, and 4. Because P(4), which is the statement “42 < 10,” is false, it follows that ∀xP(x) is false. 18 THE EXISTENTIAL QUANTIFIER The existential quantification of P(x) is the proposition “There exists an element x in the domain such that P(x).” We use the notation ∃xP(x) for the existential quantification of P(x). Here ∃ is called the existential quantifier 19 Example – Existential Quantifier Let P(x) denote the statement “x > 3.” What is the truth value of the quantification ∃xP(x), where the domain consists of all real numbers? Solution: Because “x > 3” is sometimes true—for instance, when x = 4—the existential quantification of P(x), which is ∃xP(x), is true. 20 Example – Existential Quantifier Let Q(x) denote the statement “x = x + 1.”What is the truth value of the quantification ∃xQ(x), where the domain consists of all real numbers? Solution: Because Q(x) is false for every real number x, the existential quantification of Q(x), which is ∃xQ(x), is false 21 Quantifiers 22 Exercise - Quantifiers Let P(x) be the statement “x = x2.” If the domain consists of the integers, what are these truth values? a) P(0) b) P(1) c) P(2) d) P(−1) e) ∃xP(x) f ) ∀xP(x) 23 Exercise – Quantifiers Answers Let P(x) be the statement “x = x2.” If the domain consists of the integers, what are these truth values? a) P(0) b) P(1) c) P(2) d) P(−1) e) ∃xP(x) f ) ∀xP(x) a) T b) T c) F d) F e) T f) F 24 Reference Kenneth Rosen. “Discrete Mathematics and Its Applications”, McGraw Hill Publishing Co.; 8th Edition (2018). ISBN-10: 125967651X. 25