planning and theorem proving
play

Planning and Theorem Proving Slides by Svetlana Lazebnik, 9/2016 - PowerPoint PPT Presentation

Planning and Theorem Proving Slides by Svetlana Lazebnik, 9/2016 with modifications by Mark Hasegawa-Johnson, 2/2020 CC BY-SA 3.0, https://commons.wikimedia.org/w/index.php?curid=18656684 Planning and Theorem Proving Examples Automatic


  1. Planning and Theorem Proving Slides by Svetlana Lazebnik, 9/2016 with modifications by Mark Hasegawa-Johnson, 2/2020 CC BY-SA 3.0, https://commons.wikimedia.org/w/index.php?curid=18656684

  2. Planning and Theorem Proving • Examples • Automatic Theorem Proving: forward-chaining, backward-chaining • Planning: forward-chaining, backward-chaining • Admissible Heuristics for Planning and Theorem Proving • Number of Steps • Planning Graph • Computational Complexity

  3. Example: River Crossing Problems https://en.wikipedia.org/wiki/River_crossing_puzzle • A farmer has a fox, a goat, and a bag of beans to get across the river • His boat will only carry him + one object • He can’t leave the fox with the goat • He can’t leave the goat with the bag of beans

  4. Solution https://en.wikipedia.org/wiki/River_crossing_puzzle fgb -----(farmer, goat)---- à fGb fGb ß -----(farmer)----------- -----(farmer,fox)----- à FGb Fgb ß --(farmer,goat)------ -----(farmer,beans)--- à FgB FgB ß -------(farmer)-------- -----(farmer,goat)---- à FGB

  5. Example: Cargo delivery problem • You have packages waiting for pickup at Atlanta, Boston, Charlotte, Denver, Edmonton, and Fairbanks • They must be delivered to Albuquerque, Baltimore, Chicago, Des Moines, El Paso, and Frisco • You have two trucks. Each truck can hold only two packages at a time.

  6. Example: Design for Disassembly ”Simultaneous Selective Disassembly and End-of-Life Decision Making for Multiple Products That Share Disassembly Operations,” Sara Behdad, Minjung Kwak, Harrison Kim and Deborah Thurston. J. Mech. Des 132 132 (4), 2010, doi:10.1115/1.4001207 • Design decisions limit the sequence in which you can disassemble a product at the end of its life • Problem statement: design the product in order to make disassembly as cheap as possible

  7. Application of planning: the Gale-Church alignment algorithm for machine translation

  8. Application of planning: the Gale-Church alignment algorithm for machine translation

  9. Example: Tower of Hanoi https://en.wikipedia.org/wiki/Tower_of_Hanoi Description English: This is a visualization generated with the walnut based on my implementation at [1] of the iterative algorithm described in Tower of Hanoi Date 30 April 2015 Source I designed this using http://thewalnut.io/ Author Trixx

  10. Planning and Theorem Proving • Examples • Automatic Theorem Proving: forward-chaining, backward-chaining • Planning: forward-chaining, backward-chaining • Admissible Heuristics for Planning and Theorem Proving • Number of Steps • Planning Graph • Computational Complexity

  11. The Syntax of First-Order Logic (Textbook p. 293) A “sentence” is 𝑇𝑓𝑜𝑢𝑓𝑜𝑑𝑓 → 𝐺𝑣𝑜𝑑𝑢𝑗𝑝𝑜 𝑈𝑓𝑠𝑛, … • an evaluated function, or • a negated sentence, or | ¬ 𝑇𝑓𝑜𝑢𝑓𝑜𝑑𝑓 | 𝑇𝑓𝑜𝑢𝑓𝑜𝑑𝑓 ∧ 𝑇𝑓𝑜𝑢𝑓𝑜𝑑𝑓 • the conjunction of 2 sentences, or | 𝑇𝑓𝑜𝑢𝑓𝑜𝑑𝑓 ∨ 𝑇𝑓𝑜𝑢𝑓𝑜𝑑𝑓 • the disjunction of 2 sentences, or | 𝑇𝑓𝑜𝑢𝑓𝑜𝑑𝑓 ⟹ 𝑇𝑓𝑜𝑢𝑓𝑜𝑑𝑓 • an implication, or | 𝑇𝑓𝑜𝑢𝑓𝑜𝑑𝑓 ⟺ 𝑇𝑓𝑜𝑢𝑓𝑜𝑑𝑓 • an equivalence, or | 𝑅𝑣𝑏𝑜𝑢𝑗𝑔𝑗𝑓𝑠 𝑊𝑏𝑠𝑗𝑏𝑐𝑚𝑓, … 𝑇𝑓𝑜𝑢𝑓𝑜𝑑𝑓 • a sentence with a quantified variable. 𝑈𝑓𝑠𝑛 → 𝐺𝑣𝑜𝑑𝑢𝑗𝑝𝑜 𝑈𝑓𝑠𝑛 A “term” is an evaluated function, or a 𝑊𝑏𝑠𝑗𝑏𝑐𝑚𝑓 𝐷𝑝𝑜𝑡𝑢𝑏𝑜𝑢 variable, or a constant. 𝑅𝑣𝑏𝑜𝑢𝑗𝑔𝑗𝑓𝑠 → ∃ | ∀ A “quantifier” is “there exists,” or “for all.”

  12. Examples (Textbook, p. 330) English First-Order Logic Notation It is a crime for Americans to sell 𝐵𝑛𝑓𝑠𝑗𝑑𝑏𝑜 𝑦 ∧ 𝑋𝑓𝑏𝑞𝑝𝑜 𝑧 ∧ weapons to hostile nations. 𝑇𝑓𝑚𝑚𝑡 𝑦, 𝑧, 𝑨 ∧ 𝐼𝑝𝑡𝑢𝑗𝑚𝑓 𝑨 ⟹ 𝐷𝑠𝑗𝑛𝑗𝑜𝑏𝑚(𝑦) Colonel West sold missiles to ∃𝑦, 𝑁𝑗𝑡𝑡𝑗𝑚𝑓(𝑦) ∧ 𝑇𝑓𝑚𝑚𝑡(𝑋𝑓𝑡𝑢, 𝑦, 𝐻𝑏𝑜𝑧𝑛𝑓𝑒𝑓) Ganymede. Colonel West is American. 𝐵𝑛𝑓𝑠𝑗𝑑𝑏𝑜(𝑋𝑓𝑡𝑢) Ganymede is an enemy of 𝐹𝑜𝑓𝑛𝑧(𝐻𝑏𝑜𝑧𝑛𝑓𝑒𝑓, 𝐵𝑛𝑓𝑠𝑗𝑑𝑏) America. Missiles are weapons. 𝑁𝑗𝑡𝑡𝑗𝑚𝑓(𝑦) ⟹ 𝑋𝑓𝑏𝑞𝑝𝑜(𝑦) An enemy of America is a hostile 𝐹𝑜𝑓𝑛𝑧(𝑦, 𝐵𝑛𝑓𝑠𝑗𝑑𝑏) ⟹ 𝐼𝑝𝑡𝑢𝑗𝑚𝑓(𝑦) nation.

  13. Automatic Theorem Proving First-Order Logic Notation 𝐵𝑛𝑓𝑠𝑗𝑑𝑏𝑜 𝑦 ∧ 𝑋𝑓𝑏𝑞𝑝𝑜 𝑧 ∧ 𝑇𝑓𝑚𝑚𝑡 𝑦, 𝑧, 𝑨 ∧ 𝐼𝑝𝑡𝑢𝑗𝑚𝑓 𝑨 ⟹ 𝐷𝑠𝑗𝑛𝑗𝑜𝑏𝑚(𝑦) Can we prove the theorem: ∃𝑦, 𝑁𝑗𝑡𝑡𝑗𝑚𝑓(𝑦) ∧ 𝑇𝑓𝑚𝑚𝑡(𝑋𝑓𝑡𝑢, 𝑦, 𝐻𝑏𝑜𝑧𝑛𝑓𝑒𝑓) 𝐷𝑠𝑗𝑛𝑗𝑜𝑏𝑚(𝑋𝑓𝑡𝑢) ? 𝐵𝑛𝑓𝑠𝑗𝑑𝑏𝑜(𝑋𝑓𝑡𝑢) 𝐹𝑜𝑓𝑛𝑧(𝐻𝑏𝑜𝑧𝑛𝑓𝑒𝑓, 𝐵𝑛𝑓𝑠𝑗𝑑𝑏) 𝑁𝑗𝑡𝑡𝑗𝑚𝑓(𝑦) ⟹ 𝑋𝑓𝑏𝑞𝑝𝑜(𝑦) 𝐹𝑜𝑓𝑛𝑧(𝑦, 𝐵𝑛𝑓𝑠𝑗𝑑𝑏) ⟹ 𝐼𝑝𝑡𝑢𝑗𝑚𝑓(𝑦)

  14. Actions that a Theorem Prover can Take • Universal Instantiation : • given the sentence ∀𝑦, 𝐺𝑣𝑜𝑑𝑢𝑗𝑝𝑜(𝑦) , • for any known constant 𝐷 , • it is possible to generate the sentence 𝐺𝑣𝑜𝑑𝑢𝑗𝑝𝑜(𝐷) . • Existential Instantiation : • given the proposition ∃𝑦, 𝐺𝑣𝑜𝑑𝑢𝑗𝑝𝑜(𝑦) , • if no known constant 𝐵 is known to satisfy 𝐺𝑣𝑜𝑑𝑢𝑗𝑝𝑜(𝐵) , then • it is possible to define a new, otherwise unspecified constant 𝐶 , and • to generate the sentence 𝐺𝑣𝑜𝑑𝑢𝑗𝑝𝑜(𝐶) . • Generalized Modus Ponens: • Given the sentence 𝑞 ! (𝑦 ! )⋀ 𝑞 " (𝑦 " )⋀ … ⋀ 𝑞 # (𝑦 # ) ⟹ 𝑟(𝑦 ! , … , 𝑦 # ) , and • given the sentences 𝑞 ! (𝐷 ! ), … , 𝑞 # (𝐷 # ) for any constants 𝐷 ! , … , 𝐷 # , • it is possible to generate the sentence 𝑟(𝐷 ! , … , 𝐷 # )

  15. Automatic Theorem Proving Example • Existential Instantiation : • Input: ∃𝑦, 𝑁𝑗𝑡𝑡𝑗𝑚𝑓(𝑦) ∧ 𝑇𝑓𝑚𝑚𝑡(𝑋𝑓𝑡𝑢, 𝑦, 𝐻𝑏𝑜𝑧𝑛𝑓𝑒𝑓) • Output: 𝑁𝑗𝑡𝑡𝑗𝑚𝑓(𝑁) ∧ 𝑇𝑓𝑚𝑚𝑡(𝑋𝑓𝑡𝑢, 𝑁, 𝐻𝑏𝑜𝑧𝑛𝑓𝑒𝑓) • Generalized Modus Ponens: • Input: 𝑁𝑗𝑡𝑡𝑗𝑚𝑓 𝑁 an and 𝑁𝑗𝑡𝑡𝑗𝑚𝑓(𝑦) ⟹ 𝑋𝑓𝑏𝑞𝑝𝑜(𝑦) • Output: 𝑋𝑓𝑏𝑞𝑝𝑜(𝑁) • Generalized Modus Ponens: • Input: 𝐹𝑜𝑓𝑛𝑧(𝐻𝑏𝑜𝑧𝑛𝑓𝑒𝑓, 𝐵𝑛𝑓𝑠𝑗𝑑𝑏) an and 𝐹𝑜𝑓𝑛𝑧(𝑦, 𝐵𝑛𝑓𝑠𝑗𝑑𝑏) ⟹ 𝐼𝑝𝑡𝑢𝑗𝑚𝑓(𝑦) • Output: 𝐼𝑝𝑡𝑢𝑗𝑚𝑓(𝐻𝑏𝑜𝑧𝑛𝑓𝑒𝑓) • Generalized Modus Ponens: • Input: 𝐵𝑛𝑓𝑠𝑗𝑑𝑏𝑜 𝑦 ∧ 𝑋𝑓𝑏𝑞𝑝𝑜 𝑧 ∧ 𝑇𝑓𝑚𝑚𝑡 𝑦, 𝑧, 𝑨 ∧ 𝐼𝑝𝑡𝑢𝑗𝑚𝑓 𝑨 ⟹ 𝐷𝑠𝑗𝑛𝑗𝑜𝑏𝑚(𝑦) and 𝐵𝑛𝑓𝑠𝑗𝑑𝑏𝑜 𝑋𝑓𝑡𝑢 , 𝑋𝑓𝑏𝑞𝑝𝑜 𝑁 , 𝑇𝑓𝑚𝑚𝑡 𝑋𝑓𝑡𝑢, 𝑁, 𝐻𝑏𝑜𝑧𝑛𝑓𝑒𝑓 , 𝐼𝑝𝑡𝑢𝑗𝑚𝑓(𝐻𝑏𝑜𝑧𝑛𝑓𝑒𝑓) • Output: 𝐷𝑠𝑗𝑛𝑗𝑜𝑏𝑚(𝑋𝑓𝑡𝑢)

  16. Automatic Theorem Proving as Search • State = the set of all currently known sentences • Action = generate a new sentence • Goal State = a set of sentences that includes the target sentence (Question to ponder: how do you disprove a target sentence?)

  17. Forward Chaining • What’s Special About Theorem Proving : • A state, at level n, can be generated by the combination of several states at level n-1. • Definition: Forward Chaining is a search algorithm in which each action • generates a new sentence, • by combining as many different preceding states as necessary.

  18. Example: Forward Chaining to prove 𝑟 ! Initial State 𝑞 ! , 𝑞 " , 𝑞 ! ⟹ 𝑟 ! , 𝑞 " ⟹ 𝑟 " , 𝑟 ! ∧ 𝑟 " ⟹ 𝑟 # Search ”Tree” Level 1 𝑞 ! , 𝑞 " , 𝑞 ! ⟹ 𝑟 ! , 𝑞 " ⟹ 𝑟 " , 𝑟 ! ∧ 𝑟 " ⟹ 𝑟 # , 𝑟 ! 𝑞 ! , 𝑞 " , 𝑞 ! ⟹ 𝑟 ! , 𝑞 " ⟹ 𝑟 " , 𝑟 ! ∧ 𝑟 " ⟹ 𝑟 # , 𝑟 " Search ”Tree” Level 2: Goal Achieved 𝑞 ! , 𝑞 " , 𝑞 ! ⟹ 𝑟 ! , 𝑞 " ⟹ 𝑟 " , 𝑟 ! ∧ 𝑟 " ⟹ 𝑟 # , 𝑟 ! , 𝑟 " , 𝑟 #

  19. Backward Chaining • What Else is Special About Theorem Proving: • The ”Goal State” is defined to be any set of sentences that includes the target sentence • Definition: Backward Chaining is a search algorithm in which • State = {set of known sentences}, {set of desired sentences} • Action = apply a known sentence, backward, to a target sentence, in order to generate a new set of desired sentences • Goal = all “desired sentences” are part of the set of “known sentences”

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend