Documente Academic
Documente Profesional
Documente Cultură
1 10/30/2018
Five types of Logic
Type of knowledge
Type of logic Reference to real world
known by Agent
2 10/30/2018
Representation, reasoning, and logic
The object of knowledge representation is to express
knowledge in a computer-tractable form, so that agents can
perform well.
3 10/30/2018
Sentences and Facts
4 10/30/2018
First Order Logic
7 10/30/2018
Sentence AtomicSentence
| Sentence Connective Sentence
| Quantifier Variable, … Sentence
| Sentence
| (Sentence)
Term Function(Term,…)
| Constant
| Variable
Connective | | |
Quantifier |
Constant A | X1 | John | …
Variable a | x | s | …
Predicate Before | HasColor | Raining | …
Function MotherOf | LeftLegOf | …
8 10/30/2018
Syntax and Semantics: Term
Constant Symbols
𝐵𝑜𝑜𝑘, 𝐹𝑟𝑒𝑑, 𝐴𝑙𝑖, etc.
Variables Symbols:
𝑥, 𝑦, 𝑎, etc.
Predicate Symbols :
𝐵𝑟𝑜𝑡ℎ𝑒𝑟 𝐹𝑎ℎ𝑚𝑖, 𝐺𝑎𝑙𝑖ℎ ; 𝑀𝑜𝑡ℎ𝑒𝑟(𝐴𝑛𝑛, 𝑆𝑢𝑒) ;
𝐹𝑎𝑡ℎ𝑒𝑟 𝐿𝑢𝑘𝑒, 𝐷𝑎𝑟𝑡ℎ𝑉𝑎𝑑𝑒𝑟 ; etc.
Function Symbols:
𝑆ℎ𝑜𝑒𝑠𝑂𝑓 𝐶𝑎𝑐𝑎 ; 𝐿𝑒𝑓𝑡𝐿𝑒𝑔𝑂𝑓 𝐽𝑜ℎ𝑛 ; etc.
9 10/30/2018
Syntax and Semantics: Sentences
Atomic Sentences
𝐺𝑖𝑣𝑒𝑠 𝐸𝑘𝑜, 𝐷𝑎𝑛𝑢, 𝐶ℎ𝑜𝑐𝑜𝑙𝑎𝑡𝑒𝐶𝑎𝑘𝑒
𝐵𝑟𝑜𝑡ℎ𝑒𝑟𝑂𝑓 𝐹𝑎ℎ𝑚𝑖 = 𝐵𝑢𝑑𝑖
𝑆𝑖𝑏𝑙𝑖𝑛𝑔𝑠 𝑆𝑜𝑛𝑂𝑓 𝐹𝑟𝑒𝑑 , 𝐷𝑎𝑢𝑔ℎ𝑡𝑒𝑟𝑂𝑓 𝐹𝑟𝑒𝑑
Complex Sentences
𝐵𝑟𝑜𝑡ℎ𝑒𝑟𝑠 𝐹𝑎ℎ𝑚𝑖, 𝐺𝑎𝑙𝑖ℎ 𝐺𝑖𝑣𝑒𝑠 𝐹𝑎ℎ𝑚𝑖, 𝐺𝑎𝑙𝑖ℎ, 𝐶ℎ𝑜𝑐𝑜𝑙𝑎𝑡𝑒
¬𝐼𝑡𝑠𝑅𝑎𝑛𝑖𝑛𝑔 𝑇𝑜𝑑𝑎𝑦
𝑇𝑜𝑑𝑎𝑦 𝑀𝑜𝑛𝑑𝑎𝑦 ∨ 𝑇𝑜𝑑𝑎𝑦 𝑇𝑢𝑒𝑠𝑑𝑎𝑦
10 10/30/2018
Universal Quantifiers
“For all, For Every” : ∀
– ∀𝑥 𝐶𝑎𝑡 𝑥 ⇒ 𝑀𝑎𝑚𝑚𝑎𝑙 𝑥
– ∀𝑥 𝐶ℎ𝑖𝑙𝑑 𝑥 ⇒ 𝐿𝑖𝑘𝑒𝑠 𝑥, 𝐶𝑎𝑛𝑑𝑦
This sentence is true iff all these sentence is true
– 𝐶ℎ𝑖𝑙𝑑 𝐴𝑛𝑑𝑖 ⇒ 𝐿𝑖𝑘𝑒𝑠 𝐴𝑛𝑑𝑖, 𝐶𝑎𝑛𝑑𝑦 ∧ 𝐶ℎ𝑖𝑙𝑑 𝐴𝑛𝑡𝑜 ⇒
𝐿𝑖𝑘𝑒𝑠 𝐴𝑛𝑡𝑜, 𝐶𝑎𝑛𝑑𝑦 ∧ 𝐶ℎ𝑖𝑙𝑑 𝐵𝑢𝑑𝑖 ⇒ 𝐿𝑖𝑘𝑒𝑠 𝐵𝑢𝑑𝑖, 𝐶𝑎𝑛𝑑𝑦 ∧ ⋯
11 10/30/2018
Existential Quantifiers
“There Exists”: ∃
– ∃𝑥 𝑆𝑡𝑢𝑑𝑒𝑛𝑡 𝑥, 𝑇𝑒𝑙𝑘𝑜𝑚 ∧ 𝑆𝑚𝑎𝑟𝑡 𝑥
– ∃𝑥 𝑀𝑎𝑚𝑚𝑎𝑙 𝑥 ∧ 𝐶𝑎𝑟𝑛𝑖𝑣𝑜𝑟𝑒 𝑥
12 10/30/2018
Properties of quantifiers
∀𝑥 ∀𝑦 same as ∀𝑦 ∀𝑥
∃𝑥 ∃𝑦 same as ∃𝑦 ∃𝑥
13 10/30/2018
Connections between ∀ and ∃
∀𝑥 ¬𝐿𝑖𝑘𝑒𝑠(𝑥, 𝐼𝑐𝑒𝐶𝑟𝑒𝑎𝑚) is equivalent to
¬∃𝑥 𝐿𝑖𝑘𝑒𝑠(𝑥, 𝐼𝑐𝑒𝐶𝑟𝑒𝑎𝑚)
De Morgan Rule
– ∀𝑥 ¬𝑃 ≡ ¬∃𝑥 𝑃 ¬ 𝑃∨𝑄 ≡ ¬𝑃 ∧ ¬𝑄
– ∀𝑥 𝑃 ≡ ∃𝑥 ¬𝑃 ¬ 𝑃∧𝑄 ≡ ¬𝑃 ∨ ¬𝑄
– ∀𝑥 𝑃 ≡ ¬∃𝑥 ¬𝑃 𝑃∧𝑄 ≡ ¬ ¬𝑃 ∨ ¬𝑄
– ∃𝑥 𝑃 ≡ ¬∀𝑥 ¬𝑃 𝑃∨𝑄 ≡ ¬ ¬𝑃 ∧ ¬𝑄
14 10/30/2018
Inference in First-Order Logic
Uses 7 rules from Propositional Logic
With three additional rules for more complex case
regarding to the quantifier
– Universal Instantiation or Universal Elimination
– Existential Instantiation or Existential Elimination
– Existential Introduction or Existential Generalization
15 10/30/2018
Example: Avunculate marriage
Avunculate marriage is illegal and prohibited
– marriage between an uncle and a niece or between an
aunt and a nephew (second-degree relative).
Case:
– W married to A
– W is biological daughter of B, where A and B is a twin
16 10/30/2018
Example: Avunculate marriage
∀𝑥, 𝑦 𝑁𝑖𝑒𝑐𝑒𝑂𝑓 𝑥, 𝑦 ∧ 𝑀𝑎𝑟𝑟𝑖𝑒𝑑 𝑥, 𝑦 ⇒ ¬𝑉𝑎𝑙𝑖𝑑 𝑀𝑎𝑟𝑟𝑖𝑒𝑑 𝑥, 𝑦 (1)
𝑀𝑎𝑟𝑟𝑖𝑒𝑑 𝑊, 𝐴 (2)
𝐷𝑎𝑢𝑔ℎ𝑡𝑒𝑟𝑂𝑓 𝑊, 𝐵 (3)
𝑇𝑤𝑖𝑛𝑠 𝐵, 𝐴 (4)
17 10/30/2018
Example: Avunculate marriage
𝑀𝑎𝑟𝑟𝑖𝑒𝑑 𝑊, 𝐴 ∧ 𝐷𝑎𝑢𝑔ℎ𝑡𝑒𝑟𝑂𝑓 𝑊, 𝐵 ∧ 𝑇𝑤𝑖𝑛𝑠 𝐵, 𝐴
18 10/30/2018
Example: Avunculate marriage
𝑀𝑎𝑟𝑟𝑖𝑒𝑑 𝑊, 𝐴 ∧ 𝐷𝑎𝑢𝑔ℎ𝑡𝑒𝑟𝑂𝑓 𝑊, 𝐵 ∧ 𝑇𝑤𝑖𝑛𝑠 𝐵, 𝐴 ∧ 𝑆𝑖𝑏𝑙𝑖𝑛𝑔𝑠 𝐵, 𝐴
19 10/30/2018
Example: Avunculate marriage
𝑀𝑎𝑟𝑟𝑖𝑒𝑑 𝑊, 𝐴 ∧ 𝐷𝑎𝑢𝑔ℎ𝑡𝑒𝑟𝑂𝑓 𝑊, 𝐵 ∧ 𝑇𝑤𝑖𝑛𝑠 𝐵, 𝐴 ∧ 𝑆𝑖𝑏𝑙𝑖𝑛𝑔𝑠 𝐵, 𝐴 ∧
𝑁𝑖𝑒𝑐𝑒𝑂𝑓(𝑊, 𝐴)
20 10/30/2018
THANK YOU
10/30/2018
22