Logics for Data and Knowledge Representation Exercises Modeling

  • Slides: 25
Download presentation
Logics for Data and Knowledge Representation Exercises: Modeling Fausto Giunchiglia, Rui Zhang and Vincenzo

Logics for Data and Knowledge Representation Exercises: Modeling Fausto Giunchiglia, Rui Zhang and Vincenzo Maltese

Outline q Modeling q Logical Modeling q Exercises with intensional models q Forest q

Outline q Modeling q Logical Modeling q Exercises with intensional models q Forest q Exercises with extensional models q Classroom q Family q My friends q Databases 2

MODELING : : LOGICAL MODELING : : INTENTIONAL MODELS : : EXTENSIONAL MODELS Modeling:

MODELING : : LOGICAL MODELING : : INTENTIONAL MODELS : : EXTENSIONAL MODELS Modeling: from the world to its representation Language L Theory T Mental Model World Domain D SEMANTIC GAP 3 Data Knowledge Meaning Model M

MODELING : : LOGICAL MODELING : : INTENTIONAL MODELS : : EXTENSIONAL MODELS What

MODELING : : LOGICAL MODELING : : INTENTIONAL MODELS : : EXTENSIONAL MODELS What and How World: the phenomenon we want to describe q Domain: the abstract relevant elements in the real world q Mental Model: what we have in mind. It is the first abstraction of the world (subject to the semantic gap) q Language: the set of words and rules we use to build sentences used to express our mental model q Model: the formalization of the mental model, i. e. the set of true facts in the language, in agreement with theory q Theory: the set of sentences (constraints) about the world expressed in the language that limit the possible models q q 4 NOTE: this does not necessarily need to be in formal semantics

MODELING : : LOGICAL MODELING : : INTENTIONAL MODELS : : EXTENSIONAL MODELS Example

MODELING : : LOGICAL MODELING : : INTENTIONAL MODELS : : EXTENSIONAL MODELS Example of informal Modeling Mental Model World Language L Domain D Theory T Model M L: Informal description in NL D: {monkey, banana, tree} T: If the monkey climbs on the tree, he can get the banana M: The monkey actually climbs on the tree and gets the banana SEMANTIC GAP 5 NOTE: a database can be seen as an informal model

MODELING : : LOGICAL MODELING : : INTENTIONAL MODELS : : EXTENSIONAL MODELS Logical

MODELING : : LOGICAL MODELING : : INTENTIONAL MODELS : : EXTENSIONAL MODELS Logical Modeling Language L Realization Domain D SEMANTIC GAP 6 Mental Model Meaning Theory T ⊨ Entailment I World Interpretation Modeling Data Knowledge Model M NOTE: the key point is that in logical modeling we have formal semantics

MODELING : : LOGICAL MODELING : : INTENTIONAL MODELS : : EXTENSIONAL MODELS What

MODELING : : LOGICAL MODELING : : INTENTIONAL MODELS : : EXTENSIONAL MODELS What and How q World: the phenomenon that we are observing and want to model q Domain (D) = the abstract relevant objects from the world q Language (L) = a logical language with formal syntax and semantics: q The formal syntax is given by the set of rules to construct complex sentences (the grammar) q The formal semantics is given by the interpretation function I: L → D q Model (M) = the abstract (mathematical sense) representation of the intended truths via the interpretation I of the language L. q M is called L-model of D q M ⊨ P, indicates that M satisfies P q Theory (T) = the set of facts/constraints expressed in the language L. q A fact defines a piece of knowledge (about D), something true in the model. 7

MODELING : : LOGICAL MODELING : : INTENTIONAL MODELS : : EXTENSIONAL MODELS Example

MODELING : : LOGICAL MODELING : : INTENTIONAL MODELS : : EXTENSIONAL MODELS Example of formal (intentional) Modeling Mental Model World Language L Domain D Theory T Model M L = {Monkey, Climbs, Get. Banana, , , } D= {T, F} T = { (Monkey Climbs) Get. Banana} A possible model M: I(Monkey) =T I(Climbs) =T I(Get. Banana) = T SEMANTIC GAP 8

MODELING : : LOGICAL MODELING : : INTENTIONAL MODELS : : EXTENSIONAL MODELS Example

MODELING : : LOGICAL MODELING : : INTENTIONAL MODELS : : EXTENSIONAL MODELS Example of formal (extensional) Modeling Mental Model World Language L Domain D Theory T Model M L = {Monkey, Climbs, Get. Banana, , , } D= {Cita, That. Banana} T = { Climbs Get. Banana} A possible model M: I(Monkey) = Cita I(Climbs) = Cita I(Get. Banana) = That. Banana SEMANTIC GAP 9

MODELING : : LOGICAL MODELING : : INTENTIONAL MODELS : : EXTENSIONAL MODELS Modeling

MODELING : : LOGICAL MODELING : : INTENTIONAL MODELS : : EXTENSIONAL MODELS Modeling Exercise: Forest q Description: There are two lions, Kimba and Simba, in the forest. They are in competition for the food. There is a nice antelope they want to hunt. If they want to survive they have to catch it. q Problem: Model the problem by identify relevant objects, defining the domain, the language, theory and providing a possible intentional model. 10

MODELING : : LOGICAL MODELING : : INTENTIONAL MODELS : : EXTENSIONAL MODELS Solution:

MODELING : : LOGICAL MODELING : : INTENTIONAL MODELS : : EXTENSIONAL MODELS Solution: Forest (I) q Description: There are two lions, Kimba and Simba, in the forest. They are in competition for the food. There is a nice antelope they want to hunt. If they want to survive they have to catch it. Relevant objects are in red D = {T, F} L = {Lion, Antelope, Survive, Catch} 11

MODELING : : LOGICAL MODELING : : INTENTIONAL MODELS : : EXTENSIONAL MODELS Solution:

MODELING : : LOGICAL MODELING : : INTENTIONAL MODELS : : EXTENSIONAL MODELS Solution: Forest (II) q q A possible model: I (Lion) =T I (Antelope) =T I (Catch) =T I (Survive) =T The theory T: Antelope (Catch Survive) Antelope Catch q I above is a model for T q I below is NOT a model for T I (Lion) =T I (Antelope) =F I (Catch) =F I (Survive) =T 12

MODELING : : LOGICAL MODELING : : INTENTIONAL MODELS : : EXTENSIONAL MODELS Modeling

MODELING : : LOGICAL MODELING : : INTENTIONAL MODELS : : EXTENSIONAL MODELS Modeling Exercise: Classroom q Description: In a class there are several persons. Usually there is one professor who teaches to some students. Students can be Master students or Ph. D students. Among Ph. D students there might be some Assistants of the professor. q Problem: Model the problem by identify relevant objects, defining the domain and the language, and providing a possible extensional model for it. 13

MODELING : : LOGICAL MODELING : : INTENTIONAL MODELS : : EXTENSIONAL MODELS Solution:

MODELING : : LOGICAL MODELING : : INTENTIONAL MODELS : : EXTENSIONAL MODELS Solution: Classroom (I) q Description: In a class there are several persons. Usually there is one professor who teaches to some students. Students can be Master students or Ph. D students. Among Ph. D students there might be some Assistants of the professor. Relevant objects are in red L = {Person, Professor, Student, Master, Ph. D, Assistant} D = {Fausto, Mary, Paul, Jane} 14

MODELING : : LOGICAL MODELING : : INTENTIONAL MODELS : : EXTENSIONAL MODELS Solution:

MODELING : : LOGICAL MODELING : : INTENTIONAL MODELS : : EXTENSIONAL MODELS Solution: Classroom (II) q The corresponding Venn diagram U Ph. D Assistant Student Master 15 Professor Person

MODELING : : LOGICAL MODELING : : INTENTIONAL MODELS : : EXTENSIONAL MODELS Solution:

MODELING : : LOGICAL MODELING : : INTENTIONAL MODELS : : EXTENSIONAL MODELS Solution: Classroom (III) q. A possible model: I (Person) = {Fausto, Mary, Paul, Jane} I (Professor) = {Fausto} I (Student) = {Mary, Paul, Jane} I (Master) = {Mary} I (Ph. D) = {Paul, Jane} I (Assistant) = {Paul} 16

MODELING : : LOGICAL MODELING : : INTENTIONAL MODELS : : EXTENSIONAL MODELS Modeling

MODELING : : LOGICAL MODELING : : INTENTIONAL MODELS : : EXTENSIONAL MODELS Modeling Exercise: Family q Description: My family consists of several members. There is a grandparent and my parents. Then there are some children, i. e. two sisters, one brother and me q Problem: Model the problem by identify relevant objects, defining the domain and the language, and providing a possible extensional model for it. 17

MODELING : : LOGICAL MODELING : : INTENTIONAL MODELS : : EXTENSIONAL MODELS Solution:

MODELING : : LOGICAL MODELING : : INTENTIONAL MODELS : : EXTENSIONAL MODELS Solution: Family (I) q Description: My family consists of several members. There is a grandparent and my parents. Then there are some children, i. e. two sisters, one brother and me Relevant objects are in red L = {member, grandparent, child, brother, sister, me} D = {Bob, Fausto, Mary, Paul, Jane, Hugo, Robert} 18

MODELING : : LOGICAL MODELING : : INTENTIONAL MODELS : : EXTENSIONAL MODELS Solution:

MODELING : : LOGICAL MODELING : : INTENTIONAL MODELS : : EXTENSIONAL MODELS Solution: Family (II) q The corresponding Venn diagram U Grandparent Parent Member Brother Child 19 Sister Me

MODELING : : LOGICAL MODELING : : INTENTIONAL MODELS : : EXTENSIONAL MODELS Solution:

MODELING : : LOGICAL MODELING : : INTENTIONAL MODELS : : EXTENSIONAL MODELS Solution: Family (III) q. A possible model: I (Member) = {Bob, Fausto, Mary, Paul, Jane, Hugo, Robert} I (Grandparent) = {Bob} I (Parent) = {Fausto, Mary, Bob} I (Brother) = {Robert, Paul} I (Sister) = {Jane} I (Me) = {Hugo} 20

MODELING : : LOGICAL MODELING : : INTENTIONAL MODELS : : EXTENSIONAL MODELS Modeling

MODELING : : LOGICAL MODELING : : INTENTIONAL MODELS : : EXTENSIONAL MODELS Modeling Exercise: My friends q Description: I have a lot of friends. I met some of them on the forum of my website. However, only a few of them are close to me. In particular, I use to play chess with Paul. q Problem: Model the problem by identify relevant objects, defining the domain and the language, and providing a possible extensional model for it. 21

MODELING : : LOGICAL MODELING : : INTENTIONAL MODELS : : EXTENSIONAL MODELS Solution:

MODELING : : LOGICAL MODELING : : INTENTIONAL MODELS : : EXTENSIONAL MODELS Solution: My friends (I) q Description: I have a lot of friends. I met some of them on the forum of my website. However, only a few of them are close to me. In particular, I use to play chess with Paul. Relevant objects are in red L = {Friend, Forum, Close, Playing. Chess} D = {Bob, Fausto, Mary, Paul, Jane, Hugo, Robert} 22

MODELING : : LOGICAL MODELING : : INTENTIONAL MODELS : : EXTENSIONAL MODELS Solution:

MODELING : : LOGICAL MODELING : : INTENTIONAL MODELS : : EXTENSIONAL MODELS Solution: My friends (II) q The corresponding Venn diagram Friend Forum Playing. Chess Close 23 U

MODELING : : LOGICAL MODELING : : INTENTIONAL MODELS : : EXTENSIONAL MODELS Solution:

MODELING : : LOGICAL MODELING : : INTENTIONAL MODELS : : EXTENSIONAL MODELS Solution: My friends (III) q. A possible model: I (Friend) = {Bob, Paul, Jane, Robert, Richard, Samuel} I (Forum) = {Bob, Paul, Jane} I (Close) = {Bob, Paul, Samuel} I (Playing. Chess) = {Paul} 24

MODELING : : LOGICAL MODELING : : INTENTIONAL MODELS : : EXTENSIONAL MODELS A

MODELING : : LOGICAL MODELING : : INTENTIONAL MODELS : : EXTENSIONAL MODELS A Database ID Name Nationality Hair Color Affiliation 1 Fausto Italian White Professor 2 Enzo Italian Black Ph. D Closed world assumption (CWA): The assumption that what is not currently 3 Rui Chinese Black Assistant known to be true, is false. 4 … I (Italian) = {Fausto, Enzo} 5 … I (Black. Hair) = {Enzo, Rui} … … … q q Italian Black. Hair 25 Class Ph. D Open world assumption (OWA): anything which is not explicitly asserted is unknown. Is Rui Italian? This is not asserted in the DB, therefore it is unknown.