A Modern Approach AI Chapter 8 first-order logic

First order logic syntax and semantics

Propositional logic is the logic of the first things we learn, is relatively simple, relatively easy to understand.
Because propositional logic skills is not enough, all we have introduced first-order logic (First-order Logic), namely FOL. FOL new concepts a lot more new ingredients, increasing the term to represent objects, increase the universal quantifier and existential quantifier .

FOL sentences:
. 1) Term (item)
constant symbol, symbols, or the function symbols
2) atomic sentence (atomic statement)
the predicate symbols (with value to true or to false)
Represents by A Relation BETWEEN Terms
. 3) Complex sentence (compound statement)
Atom (s) joined together using logical connectives ( logical connectives, and contains non-equivalent) and / or quantifiers

Concepts (some concepts of FOL):
. 1) the Literal (text)
negative atom, atoms,
2) Clause and Clause set (clauses and clause set)
disjunctions of literal (text extraction)
. 3) CNF (conjunctive Normal form, conjunctive Paradigm)
conjunctions of literal of disjunctions of (text extracted conjunctive normal form)

CNFs not include quantifiers. CNFs do not contain quantifiers !!!

Interpretation
explained in the first-order logic constant symbol mapped to the object, to the predicate symbol mapping relationship between objects, a mapping function of a function of the word on the object.

Universal quantifier and existential quantifier

Universal quantifier usually pick contains symbols ⇒. For example: all the kings are human. ∀x King (x) ⇒ Person (
x) existential quantifier symbols taken generally engage ∧. For example: There are crown in King John's head. ∃x Crown (x) ∧ OnHead ( x, John)

Nested quantifier
Loves (x, y): x love the y-
∀x∃y Loves (the X-, the y-): Everyone will fall in love with someone
∃y∀x Loves (x, y): the presence of a person to be loved everyone

  • ∀x∀y is the same as ∀y∀x
  • ∃x∃y is the same as ∃y∃x
  • ∃x∀y is not the same as ∀y∃x

And other words equality

In addition to the predicate terms and produce atomic statement outside, there is a way to order logic statement another configuration atoms. You can use the words to declare two table entries refer to the same object.
For example: Father (John) = Henry

Represent two items are not the same object plus negative word.
For example: Richard had at least two brothers. Can be written as: ∃x, y Brother (x, Richard) ∧ Borther (y, Richard) ∧ ¬ (x = y)

For example: Richard had two brothers, John and Geoffrey.
Error: Brother (John, Richard) ∧ Borther (Geoffrey, Richard) ∧ ¬ (John = Geoffrey)
correct: Brother (John, Richard) ∧ Borther (Geoffrey, Richard) ∧ ¬ (John = Geoffrey) ∧ ∀x Borther (x , Richard) ⇒ (x = John ∨ x = Geoffrey)

Model checking is feasible in first-order predicate logic?
Such as propositional logic, implication, so defined in terms of the effectiveness of all possible models. Since the number of possible models is infinite, by enumerating all possible model to test implicit in first-order logic it is not feasible in. Even a limited number of objects, the number of various combinations still be very large. If there are 6 or less objects, there are two statements constants, a binary relation, there 137,506,194,466 models.

The use of first-order logic

First-order logic assertions and queries

TELL statement will add to the knowledge base. Such a statement is called assertions .
For example, TELL (KB, King (John ))

ASK ask questions to the knowledge base. Questions raised by ASK is called a query or target .
For example, ASK (KB, King (John ))

ASKVARS asked what kind of x such statement is true
, for example, ASKVARS (KB, Person (x ))

Kinship universe (the kinship domain)

The difference between predicates and functions

  • functions, which return values
  • predicates, which are true or false
    Function: father_of(Mary) = Bill
    Predicate: father_of(Mary, Bill)

一元谓词:Male, Female
二元谓词:Parent 、 Sibling 、 Brother 、Sister 、 Child 、 Daughter 、 Son 、 Spouse、 Wife 、 Husband 、 Grandparent 、Grandchild 、 Cousin 、 Aunt 、 Uncle
函数: Mother、Father

Mother (mother) refers to the female (female) parents (parent): ∀m, c Mother © = m ⇔ Female (m) ∧Parent (m, c)
husband (husband) refers to a person of the male (male) spouse (spouse): ∀w, h Husband (h, w) ⇔ male (h) ∧Spouse (h, w)
women (female) and male (male) are two disjoint sets: ∀x male (x) ⇔ ¬Female (x)
parents and children is the anti-relationship: ∀p, c parent (p, c) ⇔ child (c, p)
grandparents (grandparent) parents parents: ∀g, c grandparent (g, c) ⇔ ∃ p parent (g, p) ∧Parent (p, c)
compatriots (sibling) are the parents of another child someone: ∀x, y sibling (x, y) ⇔ x ≠ y∧ ∃p parent (p, x) ∧Parent (p, y)

Not all logical statements about the universe are axioms, theorems and some are - they are derived from axioms by.

to sum up

This chapter describes the first-order logic representation language, it is stronger than propositional logic skills. Main points are as follows:

  • Knowledge representation language should be declarative, can be synthesized, expressive, context-independent and unambiguous.
  • Logic in Ontology conventions and knowledge on the conventions there are different on. Propositional logic just the fact that there is defined , and the first-order logic to the presence of objects and relationships are defined, so a stronger force is expressed.
  • The syntax of first-order logic is based on propositional logic. It adds entries to represent objects, and using the universal quantifier, and existential quantifier for quantifying the constructed arguments asserted.
  • First order logic may or world model comprises the set of objects and through interpretation , to explain the symbols are mapped to the constant object to the predicate symbol mapping relationship between objects, a mapping function of a function of the word on the object.
  • Atomic statements only in relation predicate represented by the establishment in terms of the referenced object is true. Extending Explanation quantized arguments mapped on the object, the truth table defines the quantization statement.
  • First-order logic to develop the knowledge base is a meticulous process, including in the field of the analysis, the selected vocabulary, reasoning conclusion essential axiom encoded.

Information sharing

Experiment download:
https://github.com/yyl424525/AI_Homework
Artificial Intelligence - A Modern Approach Chinese third edition pdf, courseware, operations and solutions, after-school exercise answers, test code and reports, over the years Kaobo title Download: HTTPS : //download.csdn.net/download/yyl424525/11310392

Guess you like

Origin blog.csdn.net/yyl424525/article/details/95309168