27
CSC411 CSC411 Artificial Intelligence Artificial Intelligence 1 Chapter 13 Automated Reasoning Contents Contents Week Methods in Theorem Proving General Problem Solver (GSP) Resolution Theorem Proving Resolution Refutations Answer Extraction

Chapter 13 Automated Reasoning

  • Upload
    colum

  • View
    88

  • Download
    0

Embed Size (px)

DESCRIPTION

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 - PowerPoint PPT Presentation

Citation preview

Page 1: Chapter 13 Automated Reasoning

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 11

Chapter 13

Automated Reasoning

ContentsContentsWeek Methods in Theorem ProvingGeneral Problem Solver (GSP)Resolution Theorem ProvingResolution RefutationsAnswer Extraction

Page 2: Chapter 13 Automated Reasoning

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 22

Automated ReasoningAutomated ReasoningWeek methodsWeek methods– Focus on techniques/strategies, instead of Focus on techniques/strategies, instead of

knowledge baseknowledge baseAutomated reasoningAutomated reasoning– Employs an unambiguous and exacting Employs an unambiguous and exacting

notation for representing information, precise notation for representing information, precise inference rules for drawing conclusions, and inference rules for drawing conclusions, and carefully delineated strategies to control those carefully delineated strategies to control those inference rulesinference rules

– Monotonic reasoningMonotonic reasoning– LT – Logic Theorist, the first program for LT – Logic Theorist, the first program for

automated reasoning to prove many of automated reasoning to prove many of theorems in Russell and Whitehead’s theorems in Russell and Whitehead’s Principia Principia MathematicaMathematica (1950) (1950)

Page 3: Chapter 13 Automated Reasoning

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 33

General Problem SolverGeneral Problem SolverRooted at LTRooted at LT

Address mechanic process of proofAddress mechanic process of proof

Three inference rules:Three inference rules:– Substitution: substitute an expression for all Substitution: substitute an expression for all

occurrences of a symbol in a already-true occurrences of a symbol in a already-true proposition proposition

E.g. BE.g. BBBB to ¬AB to ¬A¬A¬A¬A¬A

– Replacement: equivalent replacement between Replacement: equivalent replacement between propositionspropositions

E.g. AE.g. AB B ¬A ¬ABB

– Detachment: modus ponensDetachment: modus ponensE.g. A, AE.g. A, AB to BB to B

Page 4: Chapter 13 Automated Reasoning

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 44

GPS Executive RoutineGPS Executive RoutineFour steps:Four steps:– Substitute the current goal to match against all Substitute the current goal to match against all

know axioms and theoremsknow axioms and theorems– If fails, apply detachments and replacements If fails, apply detachments and replacements

to the goal to obtain a list of subgoalsto the goal to obtain a list of subgoals– Use chaining method to find a new Use chaining method to find a new

subproblem: subproblem: if aif ac is a problem and bc is a problem and bc is c is found, then afound, then ab is set up as a new subproblemb is set up as a new subproblem

– If above fails on the original problem, go to the If above fails on the original problem, go to the subproblem list and select the next untried subproblem list and select the next untried subproblem subproblem

Page 5: Chapter 13 Automated Reasoning

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 55

GPS ExampleGPS ExampleGoal (pGoal (p¬p)¬p)¬p¬p

Proof:Proof:– (A(AA)A)AA 1 of 5 Known axioms1 of 5 Known axioms– (¬A(¬A¬A)¬A)¬A¬A SubstitutionSubstitution– (A(A¬A)¬A)¬A¬A ReplacementReplacement– (p(p¬p)¬p)¬p¬p SubstitutionSubstitution

Issues:Issues:– Matching processMatching process– Search spaceSearch space– Control strategiesControl strategies

Page 6: Chapter 13 Automated Reasoning

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 66

Means-Ends AnalysisMeans-Ends AnalysisMethodMethod: the operators for difference : the operators for difference reduction are indexed by the differences reduction are indexed by the differences they can reducethey can reduce

Heuristic searchHeuristic search – difference table – difference table

Difference tableDifference table: list the symbol difference : list the symbol difference between the goal and the expression that between the goal and the expression that the operator createsthe operator creates

E.g. pE.g. pq and ¬pq and ¬pq, the difference table q, the difference table should contain should contain and and , as well as p and , as well as p and ¬p¬p

Page 7: Chapter 13 Automated Reasoning

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 77

Transformation rules for logic problems of LT

Page 8: Chapter 13 Automated Reasoning

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 88

A proof of a theorem in propositional calculus

Page 9: Chapter 13 Automated Reasoning

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 99

Flow chart and difference reduction table for the General Problem Solver

Page 10: Chapter 13 Automated Reasoning

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 1010

Resolution Theorem ProvingResolution Theorem ProvingRoot of PrologRoot of PrologResolution refutation principle: to prove AResolution refutation principle: to prove A– assume A is false, assume A is false, – add A to known axioms and theorems,add A to known axioms and theorems,– show a contradictionshow a contradiction

Resolution refutation proof steps:

Page 11: Chapter 13 Automated Reasoning

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 1111

An ExampleAn ExampleProblemProblem– Statements:Statements:

Fido is a dogFido is a dogAll dogs are animalsAll dogs are animalsAll animals will dieAll animals will die

– goal:goal:Fido will dieFido will die

Predicates representationPredicates representation– StatementsStatements

dog(fido)dog(fido)(X) (dog(X)(X) (dog(X)animal(X))animal(X))(X) (animal(X)(X) (animal(X)die(X))die(X))

– Goal:Goal:die(fido)die(fido)

Page 12: Chapter 13 Automated Reasoning

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 1212

Resolution proof for the “dead dog” problem.

Page 13: Chapter 13 Automated Reasoning

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 1313

Conjunctive Normal FormConjunctive Normal FormClause form: Clause form: conjunction of disjunctsconjunction of disjunctsAny expression can be transformed into Any expression can be transformed into conjunctive normal formconjunctive normal formHorn classHorn class is a special case of conjunctive is a special case of conjunctive normal formnormal formConjunctions are “,”Conjunctions are “,”Knowledge base is a set of expressions in Knowledge base is a set of expressions in CNFCNFE.g. AE.g. AB, CB, CDDE, ¬AE, ¬A¬C¬CLiterals: letters or their negatesLiterals: letters or their negates

Page 14: Chapter 13 Automated Reasoning

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 1414

CNF NormalizationCNF Normalization1.1. Eliminate Eliminate 2.2. Reduce the scope of negationReduce the scope of negation3.3. Variable renamingVariable renaming4.4. Move all qualifiers left without changing Move all qualifiers left without changing

their ordertheir order5.5. Eliminate all existential quantifiers using Eliminate all existential quantifiers using

SkolemizationSkolemization6.6. Drop all universal quantifiersDrop all universal quantifiers7.7. Convert to conjunct of disjunctsConvert to conjunct of disjuncts8.8. Separate into a set of disjunctsSeparate into a set of disjuncts9.9. Standardize the variables apart so that Standardize the variables apart so that

different clauses contain different different clauses contain different variable names variable names

Page 15: Chapter 13 Automated Reasoning

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 1515

Binary Resolution Proof ProcedureBinary Resolution Proof ProcedureGiven two disjunct expressions, Given two disjunct expressions, merge them by eliminating all literals merge them by eliminating all literals with their negateswith their negates

PP11: a: a11aa22……aann

PP22: b: b11bb22……bbmm

If aIf aii=¬b=¬bjj, then P, then P11 and P and P22 can be merged by can be merged by eliminating aeliminating aii and ¬b and ¬bjj::

P: P: aa11aa22……aai-1i-1aai+1i+1……aannbb11bb22……bbj-1j-1bbj+1j+1……bbmm

E.g. aE.g. a¬b and b¬b and bc c a acc

Page 16: Chapter 13 Automated Reasoning

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 1616

One resolution proof for an example from the propositional calculus with the given clauses:

a¬b¬cbc¬d¬eef¬f

Page 17: Chapter 13 Automated Reasoning

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 1717

““Happy Student” ProblemHappy Student” ProblemAnyone passing his history exams Anyone passing his history exams and winning the lottery is happy. But and winning the lottery is happy. But anyone who studies or is lucky can anyone who studies or is lucky can pass all his exams. John did not study pass all his exams. John did not study but he is lucky. Anyone who is lucky but he is lucky. Anyone who is lucky wins the lottery.wins the lottery.

Is John happy?Is John happy?

Page 18: Chapter 13 Automated Reasoning

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 1818

Page 19: Chapter 13 Automated Reasoning

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 1919

One refutation for the “happy student” problem.

Page 20: Chapter 13 Automated Reasoning

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 2020

Answer ExtractionAnswer ExtractionExtract correct answer to a problem from Extract correct answer to a problem from a resolution refutation by retaining a resolution refutation by retaining information on the unification substitutions information on the unification substitutions made in the resolution refutationmade in the resolution refutation““Exciting lives problem”Exciting lives problem”– All people who are not poor and are smart are All people who are not poor and are smart are

happy. Those people who read are not stupid. happy. Those people who read are not stupid. John can read and is wealthy. Happy people John can read and is wealthy. Happy people have exciting lives. have exciting lives.

– Who can be found with an exciting life? Who can be found with an exciting life?

Page 21: Chapter 13 Automated Reasoning

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 2121

Page 22: Chapter 13 Automated Reasoning

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 2222

Resolution proof for the “exciting life” problem.

Answer: {Z/W}{X/Z}{Y/X}{john/Y} W=john

Page 23: Chapter 13 Automated Reasoning

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 2323

Another resolution refutation for the “exciting lives” problem

Page 24: Chapter 13 Automated Reasoning

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 2424

Strategies and Simplification Strategies and Simplification Problem: Problem: – More than one resolution refutations exist, which is the More than one resolution refutations exist, which is the

best?best?– When there are N clauses in the clause space, there are When there are N clauses in the clause space, there are

NN22 ways of combining them or checking to see whether ways of combining them or checking to see whether they can be combined at just the first levelthey can be combined at just the first level

StrategiesStrategies– Breadth-first strategyBreadth-first strategy: exhaustive search to find the best : exhaustive search to find the best

binary resolution each stepbinary resolution each step– Set of support strategySet of support strategy: for a set of input clauses S, : for a set of input clauses S,

specify a subset T, the set of support. In each resolution specify a subset T, the set of support. In each resolution one of the resolvents have an ancestor in the use of one of the resolvents have an ancestor in the use of supportsupport

– Unit preference strategyUnit preference strategy: Unit clause is a clause of one : Unit clause is a clause of one literal. Each resolution contains at least one unit clauseliteral. Each resolution contains at least one unit clause

– Linear input form strategyLinear input form strategy: Start from the negated goal, : Start from the negated goal, resolve the result of previous step with one of input resolve the result of previous step with one of input clauses, until empty clauses is produced.clauses, until empty clauses is produced.

Page 25: Chapter 13 Automated Reasoning

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 2525

Complete state space for the “exciting life” problem generated by breadth-first search (to two levels).

Page 26: Chapter 13 Automated Reasoning

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 2626

The unit preference strategy and the linear input form strategy on the “exciting life” problem.

Page 27: Chapter 13 Automated Reasoning

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 2727

Complete StrategiesComplete StrategiesComplete strategyComplete strategy– A set of clauses is unsatisfiable if no interpretation exists A set of clauses is unsatisfiable if no interpretation exists

that establishes the set as satisfiable that establishes the set as satisfiable – An inference rule is refutation complete if, given an An inference rule is refutation complete if, given an

unsatisfiable set of clauses, the unsatisfiability can be unsatisfiable set of clauses, the unsatisfiability can be established by use of this inference rule aloneestablished by use of this inference rule alone

– A strategy is refutation complete if by its use with a A strategy is refutation complete if by its use with a refutation-complete inference rule we can guarantee refutation-complete inference rule we can guarantee finding a refutation whenever a set of clauses is finding a refutation whenever a set of clauses is unsatisfiable.unsatisfiable.

StrategiesStrategies– The Breadth-first strategy is refutation completeThe Breadth-first strategy is refutation complete– The set of support strategy is refutation complete if The set of support strategy is refutation complete if

input set S is unsatisfiable but S-T (support set) is input set S is unsatisfiable but S-T (support set) is satisfiablesatisfiable

– The unit preference strategy is not completeThe unit preference strategy is not complete– The linear input form strategy is not completeThe linear input form strategy is not complete