240 likes | 256 Views
Logics for Data and Knowledge Representation. Exercises: Modeling. Fausto Giunchiglia, Rui Zhang and Vincenzo Maltese. Outline. Modeling Logical Modeling Exercises with intensional models Forest Exercises with extensional models Classroom Family My friends Databases.
E N D
Logics for Data and KnowledgeRepresentation Exercises: Modeling Fausto Giunchiglia, Rui Zhang and Vincenzo Maltese
Outline • Modeling • Logical Modeling • Exercises with intensional models • Forest • Exercises with extensional models • Classroom • Family • My friends • Databases
Modeling: from the world to its representation MODELING :: LOGICAL MODELING :: INTENTIONAL MODELS :: EXTENSIONAL MODELS Language L Theory T Data Knowledge World Mental Model Domain D Model M Meaning SEMANTIC GAP 3
Example of informal Modeling MODELING :: LOGICAL MODELING :: INTENTIONAL MODELS :: EXTENSIONAL MODELS Mental Model Language L Domain D Theory T Model M World L: Informal description in NL D: {monkey, banana, tree} T: If the monkeyclimbs on the tree, he can get the banana M: The monkey actually climbs on the tree and gets the banana SEMANTIC GAP NOTE: a database can be seen as an informal model 4
Logical Modeling MODELING :: LOGICAL MODELING :: INTENTIONAL MODELS :: EXTENSIONAL MODELS Language L Theory T Data Knowledge Interpretation Modeling Entailment World Mental Model ⊨ I Realization Domain D Model M Meaning SEMANTIC GAP NOTE: the key point is that in logical modeling we have formal semantics 5
What and How MODELING :: LOGICAL MODELING :: INTENTIONAL MODELS :: EXTENSIONAL MODELS • World: the phenomenon that we are observing and want to model • Domain(D) = the abstract relevant objects from the world • Language(L) = a logical language with formal syntax and semantics: • The formal syntax is given by the set of rules to construct complex sentences (the grammar) • The formal semantics is given by the interpretation function I: L → D • Model(M) = the abstract (mathematical sense) representation of the intended truths via the interpretation I of the language L. • M is called L-model of D • M ⊨ P, indicates that M satisfies P • Theory(T) = the set of facts/constraintsexpressed in the languageL. • A fact defines a piece of knowledge (about D), something true in the model. 6
Example of formal (intentional) Modeling MODELING :: LOGICAL MODELING :: INTENTIONAL MODELS :: EXTENSIONAL MODELS Mental Model Language L Domain D Theory T Model M World L = {Monkey, Climbs, GetBanana, , , } D= {T, F} T = { (Monkey Climbs) GetBanana} A possible model M: I(Monkey) = T I(Climbs) = T I(GetBanana) = T SEMANTIC GAP 7
Example of formal (extensional) Modeling MODELING :: LOGICAL MODELING :: INTENTIONAL MODELS :: EXTENSIONAL MODELS Mental Model Language L Domain D Theory T Model M World L = {Monkey, Climbs, GetBanana, , , } D= {Cita, ThatBanana} T = { Climbs GetBanana} A possible model M: I(Monkey) = Cita I(Climbs) = Cita I(GetBanana) = ThatBanana SEMANTIC GAP 8
Modeling Exercise: Forest MODELING :: LOGICAL MODELING :: INTENTIONAL MODELS :: EXTENSIONAL MODELS • 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. • Problem: Model the problem by identify relevant objects, defining the domain, the language, the theory and providing a possible intentional model. 9
Solution: Forest (I) MODELING :: LOGICAL MODELING :: INTENTIONAL MODELS :: EXTENSIONAL MODELS • 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} 10
Solution: Forest (II) MODELING :: LOGICAL MODELING :: INTENTIONAL MODELS :: EXTENSIONAL MODELS • A possible model: I (Lion) = T I (Antelope) = T I (Catch) = T I (Survive) = T • The theory T: Antelope (Catch Survive) Antelope Catch • I above is a model for T • I below is NOT a model for T I (Lion) = T I (Antelope) = F I (Catch) = F I (Survive) = T 11
Modeling Exercise: Classroom MODELING :: LOGICAL MODELING :: INTENTIONAL MODELS :: EXTENSIONAL MODELS • Description: In a class there are several persons. Usually there is one professor who teaches to some students. Students can be Master students or PhD students. Among PhD students there might be some Assistants of the professor. • Problem: Model the problem by identify relevant objects, defining the domain and the language, and providing a possible extensional model for it. 12
Solution: Classroom (I) MODELING :: LOGICAL MODELING :: INTENTIONAL MODELS :: EXTENSIONAL MODELS • Description: In a class there are several persons. Usually there is one professor who teaches to some students. Students can be Master students or PhD students. Among PhD students there might be some Assistants of the professor. Relevant objects are in red L = {Person, Professor, Student, Master, PhD, Assistant} D = {Fausto, Mary, Paul, Jane} 13
Solution: Classroom (II) MODELING :: LOGICAL MODELING :: INTENTIONAL MODELS :: EXTENSIONAL MODELS • The corresponding Venn diagram U Person Student PhD Assistant Professor Master
Solution: Classroom (III) MODELING :: LOGICAL MODELING :: INTENTIONAL MODELS :: EXTENSIONAL MODELS • A possible model: I (Person) = {Fausto, Mary, Paul, Jane} I (Professor) = {Fausto} I (Student) = {Mary, Paul, Jane} I (Master) = {Mary} I (PhD) = {Paul, Jane} I (Assistant) = {Paul} 15
Modeling Exercise: Family MODELING :: LOGICAL MODELING :: INTENTIONAL MODELS :: EXTENSIONAL MODELS • 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 • Problem: Model the problem by identify relevant objects, defining the domain and the language, and providing a possible extensional model for it. 16
Solution: Family (I) MODELING :: LOGICAL MODELING :: INTENTIONAL MODELS :: EXTENSIONAL MODELS • 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, parent, child, brother, sister, me} D = {Bob, Fausto, Mary, Paul, Jane, Hugo, Robert} 17
Solution: Family (II) MODELING :: LOGICAL MODELING :: INTENTIONAL MODELS :: EXTENSIONAL MODELS • The corresponding Venn diagram U Member Grandparent Parent Brother Sister Me Child 18
Solution: Family(III) MODELING :: LOGICAL MODELING :: INTENTIONAL MODELS :: EXTENSIONAL MODELS • 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} 19
Modeling Exercise: My friends MODELING :: LOGICAL MODELING :: INTENTIONAL MODELS :: EXTENSIONAL MODELS • 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. • Problem: Model the problem by identify relevant objects, defining the domain and the language, and providing a possible extensional model for it. 20
Solution: My friends (I) MODELING :: LOGICAL MODELING :: INTENTIONAL MODELS :: EXTENSIONAL MODELS • 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, PlayingChess} D = {Bob, Fausto, Mary, Paul, Jane, Hugo, Robert} 21
Solution: My friends (II) MODELING :: LOGICAL MODELING :: INTENTIONAL MODELS :: EXTENSIONAL MODELS • The corresponding Venn diagram U Friend Forum Close PlayingChess
Solution: My friends(III) MODELING :: LOGICAL MODELING :: INTENTIONAL MODELS :: EXTENSIONAL MODELS • A possible model: I (Friend) = {Bob, Paul, Jane, Robert, Richard, Samuel} I (Forum) = {Bob, Paul, Jane} I (Close) = {Bob, Paul, Samuel} I (PlayingChess) = {Paul} 23
A Database MODELING :: LOGICAL MODELING :: INTENTIONAL MODELS :: EXTENSIONAL MODELS • Closed world assumption (CWA): The assumption that what is not currently known to be true, is false. I (Italian) = {Fausto, Enzo} I (BlackHair) = {Enzo, Rui} … • 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. Class Italian PhD BlackHair