CS560 Knowledge Discovery and Management Yugi Lee STB #560D (816) 235-5932 leeyu@umkc.edu www.sce.umkc.edu/~leeyu CS560 - Lecture 3 1 Logic A logic allows the axiomatization of the domain information, and the drawing of conclusions from that information. Syntax defines the sentences in the language Semantics define the meaning of sentences; i.e., define truth of a sentence in a world Logical inference = reasoning CS560 - Lecture 3 2
Types of logic Logics are characterized by what they commit to as primitives Ontological commitment: what exists - facts? objects? time? beliefs? Epistemological commitment: what states of knowledge? CS560 - Lecture 3 3 Entailment: Logical Implication Knowledge base KB entails sentence α if and only if α is true in all worlds where KB is true E.g., the KB containing UMKC won and Kansas City won entails Either UMKC won or Kansas City won CS560 - Lecture 3 4
CS560 - Lecture 3 5 CS560 - Lecture 3 6
Models Logicians typically think in terms of models, which are formally structured worlds with respect to which truth can be evaluated We say m is a model of a sentence α if α is true in m M(α) is the set of all models of α Then KB ㅑ α if and only if M(KB) M(α) E.g. KB = UMKC won and Kansas City won α = Kansas City won or α = UMKC won or α = either Kansas City or UMKC won CS560 - Lecture 3 7 CS560 - Lecture 3 8
Propositional Logics: Basic Ideas Statements: The elementary building blocks of propositional logic are atomic statements that cannot be decomposed any further: propositions. E.g., The block is red It is raining and logical connectives and, or, not, by which we can build propositional formulas. CS560 - Lecture 3 9 Propositional Logics: Syntax CS560 - Lecture 3 10
Precedence CS560 - Lecture 3 11 Propositional Logics: Semantic Atomic statements can be true T or false F. The truth value of formulas is determined by the truth values of the atoms (truth value assignment or interpretation). Example: (a b) c If a and b are wrong and c is true, then the formula is not true. Then logical entailment could be defined as follows: φ is implied by Ω, if φ is true in all states of the world, in which Ω is true. CS560 - Lecture 3 12
CS560 - Lecture 3 13 Propositional inference CS560 - Lecture 3 14
Satisability and Validity An interpretation I is a model of φ: I ㅑ φ CS560 - Lecture 3 15 CS560 - Lecture 3 16
First-Order Logic Propositional logic only deals with facts, statements that may or may not be true of the world, e.g. It is raining., one cannot have variables that stand for books or tables. In first-order logic variables refer to things in the world and, furthermore, you can quantify over them to talk about all of them or some of them without having to name them explicitly. CS560 - Lecture 3 17 First-Order Logic Motivation Statements that cannot be made in propositional logic but can be made in FOL. When you paint a block with green paint, it becomes green. In propositional logic, one would need a statement about every single block, one cannot make the general statement about all blocks. When you sterilize a jar, all the bacteria are dead. In FOL, we can talk about all the bacteria without naming them explicitly. A person is allowed access to this Web site if they have been formally authorized or they are known to someone who has access. CS560 - Lecture 3 18
FOL syntax Term Constant symbols: Fred, Japan, Bacterium39 Variables: x, y, a Function symbol applied to one or more terms: F(x), F(F(x)), Mother-of(John) logic symbols For all There exists Implies Not Or And CS560 - Lecture 3 19 FOL syntax Sentence A predicate symbol applied to zero or more terms: on(a,b), sister(jane, Joan), sister(mother-of(john), Jane), its-raining() t1=t2 For v a variable and φ a sentence, then v.φ and v. φ are sentences. Closure under sentential operators: v ( ) CS560 - Lecture 3 20
FOL Interpretations Interpretation I U set of objects; domain of discourse; universe Maps constant symbols to elements of U Maps predicate symbols to relations on U (binary relation is a set of pairs) Maps function symbols to functions on U CS560 - Lecture 3 21 FOL Interpretations Basic FOL Semantics Denotation of terms (naming) I(Fred) if Fred is constant, then given I(x) undefined I(F(term)) I(F)(I(term)) CS560 - Lecture 3 22
Semantics of Quantifiers CS560 - Lecture 3 23 FOL Example Domain CS560 - Lecture 3 24
FOL Example Domain CS560 - Lecture 3 25 FOL Example CS560 - Lecture 3 26
Exercise Problems - FOL(1) CS560 - Lecture 3 27 Exercise Problems FOL (2) Cats are mammals Jane is a tall surveyor A nephew is a sibling's son A maternal grandmother Everybody loves somebody CS560 - Lecture 3 28
Exercise Problems FOL (3) Nobody loves Jane Everybody has a father Everybody has a father and a mother Whoever has a father, has a mother CS560 - Lecture 3 29