100 likes | 219 Views
Definitions : Consistent, Refutation. A set of formulas T is inconsistent iff there exists a deduction of False from T (T |- False). A refutation from a set of clauses S’ is a deduction of False from S’ (S’ |- False). Proof as a search task. State representation :
E N D
Definitions : Consistent, Refutation • A set of formulas T is inconsistent iff there exists a deduction of False from T (T |- False). • A refutation from a set of clauses S’ is a deduction of False from S’ (S’ |- False) .
Proof as a search task • State representation: a set of wffs (considered to be true) • Operators: inference rules • Initial state: an initial set of wffs (what is initially considered to be true) • Goal state: the wff to prove is in our state’s set of known wffs
Implicative Normal Form (INF) More natural form:each clause is an implication Body Head where Body is a conjunction of atoms and Head is a disjunction of atoms Notice that (negation) is not used Examples: 1) P 2) P R 3) P R T V S V Q 4) P
Converting arbitrary wffs to INF After converting to CNF add the following step to convert it to INF: • Convert disjunctions to implications: Body Head Gather up the negative literals into one list,take them as a conjuntion (Body) ; gather up the positive literals into another, take them as a disjunction (Head). CNF INF P P P V R P R P V R V T V S V Q P R T V S V Q P V R P R
Resolution in INF P1 ... Pi ... Pn1 R1 v ... v Rn2 S1 ... Sn3 Q1 v ... v Pi v... v Qn4 --------------------------------------------------------- P1 ... Pi-1 Pi+1... Pn1 S1 ... Sn3 R1 v ... v Rn2 v Q1 v...v Qj-1 v Qj+1... v Qn4 Example: P R T V S V Q U Z R -------------------------------------------------- P U Z T V S V Q
Horn Clauses A Horn clause is a clause that has at most one positive literal Examples: P ; P V R; P V R ; P V R V T; • P V R is not a Horn clause • Usually written in Implicative Normal Form (INF): at most one atom in the head Examples: PFact P R Rule P R T Rule P R Goal Definite Clauses : Facts and Rules Objective (or goal) clause: goal
SLD Resolution • Language: Horn clauses in INF • S - Selection Function - selects the atom in the goal clause to resolve • L- Linear Resolution • D - Definite Clauses The set of clauses S’: a set of definite clauses representing KB, together with one goal clause representing Q
SLD Resolution • Resolution rule in INF (order of atoms is important!): P1 ... Pi ... Pn1 S1 ... Sn3 Pi --------------------------------------------------------- P1 ... Pi-1 S1 ... Sn3 Pi+1... Pn1
SLD Resolution • Standard selection function (PROLOG): leftmost atom The above rule becomes: P1 ... Pn1 S1 ... Sn3 P1 --------------------------------------------------------- S1 ... Sn3 P2... Pn1 Remember that the order of atoms is important! resolvent - play DO: body of definite clause then body of the objective clause
SLDNF Resolution • Negation in PROLOG: Negation as (finite) Failure Not P if an SLD tree starting from P finitely fails.