320 likes | 687 Views
Chapter 13 Automated Reasoning. Contents. Week Methods in Theorem Proving General Problem Solver (GSP) Resolution Theorem Proving Resolution Refutations Answer Extraction. Automated Reasoning. Week methods Focus on techniques/strategies, instead of knowledge base Automated reasoning
E N D
Chapter 13 Automated Reasoning Contents • Week Methods in Theorem Proving • General Problem Solver (GSP) • Resolution Theorem Proving • Resolution Refutations • Answer Extraction Artificial Intelligence
Automated Reasoning • Week methods • Focus on techniques/strategies, instead of knowledge base • Automated reasoning • Employs an unambiguous and exacting notation for representing information, precise inference rules for drawing conclusions, and carefully delineated strategies to control those inference rules • Monotonic reasoning • LT – Logic Theorist, the first program for automated reasoning to prove many of theorems in Russell and Whitehead’s Principia Mathematica (1950) Artificial Intelligence
General Problem Solver • Rooted at LT • Address mechanic process of proof • Three inference rules: • Substitution: substitute an expression for all occurrences of a symbol in a already-true proposition • E.g. BBB to ¬A¬A¬A • Replacement: equivalent replacement between propositions • E.g. AB ¬AB • Detachment: modus ponens • E.g. A, AB to B Artificial Intelligence
GPS Executive Routine • Four steps: • Substitute the current goal to match against all know axioms and theorems • If fails, apply detachments and replacements to the goal to obtain a list of subgoals • Use chaining method to find a new subproblem: if ac is a problem and bc is found, then ab is set up as a new subproblem • If above fails on the original problem, go to the subproblem list and select the next untried subproblem Artificial Intelligence
GPS Example • Goal (p¬p)¬p • Proof: • (AA)A 1 of 5 Known axioms • (¬A¬A)¬A Substitution • (A¬A)¬A Replacement • (p¬p)¬p Substitution • Issues: • Matching process • Search space • Control strategies Artificial Intelligence
Means-Ends Analysis • Method: the operators for difference reduction are indexed by the differences they can reduce • Heuristic search – difference table • Difference table: list the symbol difference between the goal and the expression that the operator creates • E.g. pq and ¬pq, the difference table should contain and , as well as p and ¬p Artificial Intelligence
Transformation rules for logic problems of LT Artificial Intelligence
A proof of a theorem in propositional calculus Artificial Intelligence
Flow chart and difference reduction table for the General Problem Solver Artificial Intelligence
Resolution Theorem Proving • Root of Prolog • Resolution refutation principle: to prove A • assume A is false, • add A to known axioms and theorems, • show a contradiction • Resolution refutation proof steps: Artificial Intelligence
An Example • Problem • Statements: • Fido is a dog • All dogs are animals • All animals will die • goal: • Fido will die • Predicates representation • Statements • dog(fido) • (X) (dog(X)animal(X)) • (X) (animal(X)die(X)) • Goal: • die(fido) Artificial Intelligence
Resolution proof for the “dead dog” problem. Artificial Intelligence
Conjunctive Normal Form • Clause form: conjunction of disjuncts • Any expression can be transformed into conjunctive normal form • Horn class is a special case of conjunctive normal form • Conjunctions are “,” • Knowledge base is a set of expressions in CNF • E.g. AB, CDE, ¬A¬C • Literals: letters or their negates Artificial Intelligence
CNF Normalization • Eliminate • Reduce the scope of negation • Variable renaming • Move all qualifiers left without changing their order • Eliminate all existential quantifiers using Skolemization • Drop all universal quantifiers • Convert to conjunct of disjuncts • Separate into a set of disjuncts • Standardize the variables apart so that different clauses contain different variable names Artificial Intelligence
Binary Resolution Proof Procedure • Given two disjunct expressions, merge them by eliminating all literals with their negates • P1: a1a2…an • P2: b1b2…bm If ai=¬bj, then P1 and P2 can be merged by eliminating ai and ¬bj: P: a1a2…ai-1ai+1…an b1b2…bj-1bj+1…bm • E.g. a¬b and bc ac Artificial Intelligence
One resolution proof for an example from the propositional calculus with the given clauses: • a¬b¬c • b • c¬d¬e • ef • ¬f Artificial Intelligence
“Happy Student” Problem • Anyone passing his history exams and winning the lottery is happy. But anyone who studies or is lucky can pass all his exams. John did not study but he is lucky. Anyone who is lucky wins the lottery. • Is John happy? Artificial Intelligence
One refutation for the “happy student” problem. Artificial Intelligence
Answer Extraction • Extract correct answer to a problem from a resolution refutation by retaining information on the unification substitutions made in the resolution refutation • “Exciting lives problem” • All people who are not poor and are smart are happy. Those people who read are not stupid. John can read and is wealthy. Happy people have exciting lives. • Who can be found with an exciting life? Artificial Intelligence
Resolution proof for the “exciting life” problem. Answer: {Z/W}{X/Z}{Y/X}{john/Y} W=john Artificial Intelligence
Another resolution refutation for the “exciting lives” problem Artificial Intelligence
Strategies and Simplification • Problem: • More than one resolution refutations exist, which is the best? • When there are N clauses in the clause space, there are N2 ways of combining them or checking to see whether they can be combined at just the first level • Strategies • Breadth-first strategy: exhaustive search to find the best binary resolution each step • Set of support strategy: for a set of input clauses S, specify a subset T, the set of support. In each resolution one of the resolvents have an ancestor in the use of support • Unit preference strategy: Unit clause is a clause of one literal. Each resolution contains at least one unit clause • Linear input form strategy: Start from the negated goal, resolve the result of previous step with one of input clauses, until empty clauses is produced. Artificial Intelligence
Complete state space for the “exciting life” problem generated by breadth-first search (to two levels). Artificial Intelligence
The unit preference strategy and the linear input form strategy on the “exciting life” problem. Artificial Intelligence
Complete Strategies • Complete strategy • A set of clauses is unsatisfiable if no interpretation exists that establishes the set as satisfiable • An inference rule is refutation complete if, given an unsatisfiable set of clauses, the unsatisfiability can be established by use of this inference rule alone • A strategy is refutation complete if by its use with a refutation-complete inference rule we can guarantee finding a refutation whenever a set of clauses is unsatisfiable. • Strategies • The Breadth-first strategy is refutation complete • The set of support strategy is refutation complete if input set S is unsatisfiable but S-T (support set) is satisfiable • The unit preference strategy is not complete • The linear input form strategy is not complete Artificial Intelligence