02-pred_logic

02-pred_logic - CSIS1118 Foundations of Computer Science...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
CSIS1118 oundations of Computer Science Foundations of Computer Science redicate Logic Predicate Logic Hubert Chan ([O1,O2]; chapters 1.3, 1.4) 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Subjects and Predicates Do you still remember the definition of propositions? Is “x > 3” a proposition? No, unless the value of x is fixed. Let P(x) denote the statement “x > 3” where P(x) is called a propositional function . P(x) has a truth value once the value of x is fixed. E.g. P(5) is true; P(1) is false. P actually refers to the property “is greater than 3” and is called the predicate . Note that x is a variable (the subject). A propositional function can have more than one variable (multi- value predicates). E.g. Let Q(x, y) denote “x + y > 10”. 2 Then, Q(4, 5) is false; Q(5, 6) is true.
Background image of page 2
niverse of Discourse Universe of Discourse • The collection of values that a variable x may take is called the universe of discourse or domain . xample Example : “x is rich”, x can refer to people in HK, the world, movies stars, IT people, … For the statement “x is prime ”, the universe of discourse of x is the set of all positive integers. 3
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
uantification (Quantifiers) Quantification (Quantifiers) Two ways to convert a propositional function, say P(x), into a roposition proposition. • Assign value(s) to variable(s). • Quantify variable(s): (x) is true for all possible values of x niversal Quantification) P(x) is true for all possible values of x (Universal Quantification) These exists at least one value of x such that P(x) is true (Existential Quantification) Example: Let P(x) denote the statement “x has a million dollars”. P(x) has no truth value and is not a proposition. P(John) is a proposition . x P(x) is a proposition. “ or all possible values of x (universe of discourse) P(x) is true” 4 for all possible values of x (universe of discourse), P(x) is true e.g. x P(x)” is false where domain is people in this room.
Background image of page 4
Example: Let P(x) denote the statement “x is married”.
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/05/2012 for the course FBE BUSI1007 taught by Professor Lin during the Spring '11 term at HKU.

Page1 / 15

02-pred_logic - CSIS1118 Foundations of Computer Science...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online