logical structures in natural language exercises
play

Logical Structures in Natural Language: Exercises Propositional - PDF document

Logical Structures in Natural Language: Exercises Propositional Logic (In class on Wed. 12th) Universit` a di Trento 1 Formalization problems 1.1 Colouring problem Given the graph: Italy is connected to Austria Austria is connected


  1. Logical Structures in Natural Language: Exercises Propositional Logic (In class on Wed. 12th) Universit` a di Trento 1 Formalization problems 1.1 Colouring problem Given the graph: • Italy is connected to Austria • Austria is connected to Hungary Find a coloring function C : V → { black , white } such that no two adjacent countries have the same color. Solution Vertex axioms: (the dual are redundant) [Uniqueness constraint] ( ¬ W I ↔ B I ) ( ¬ W H ↔ B H ) ( ¬ W A ↔ B A ) Edge axioms: (the dual are redundant) [Explicit Constraints] ( B I ↔ ¬ B A ) ∧ ( W I ↔ ¬ W A ) ( B H ↔ ¬ B A ) ∧ ( W H ↔ ¬ W A ) In this way you are implicitly stating that Italy is adjacent to A and A is adjacent to Hungary. And you get a simpler tableaux. 2 To be done at home and to be checked in class on Thu 13rd 2.1 Boxes Formalise the following puzzle in propositional logic, find the solution using first truth tables and then a tableaux procedure and build a counterexample if the argument is not valid. Three boxes are presented to you. One contains gold, the other two are empty. Each box has imprinted on it a clue as to its contents; the clues are (Box 1) “The gold is not here”, (Box 2) “The gold is not here”, and (Box 3) “The gold is in Box 2”. Only one message is true; the other two are false. Which box has the gold? 1

  2. 2.2 Pet For your birthday, you were given a cute chameleon. You adore it, but you don’t know it well. After doing some research in the library, here’s what you have discovered: • your chameleon can be in three moods: it can be happy, upset, or indignant; it can be in only one mood at any given time; • in each mood, a chameleon takes on a specific color: in particular, when a chameleon is indignant or upset it turns purple; • chameleon always become upset when they are hungry; • chameleon always become indignant when they are busy eating and you suddenly start to pet them; • if the food bowl is empty then you can be sure your chameleon is hungry; • if the food bowl is not empty and a chameleon is hungry, it immediately engages itself in busy eating; • when a chameleon has slept enough it becomes happy. (a) suppose you see that the food bowl is empty: show that it follows from the data above that your chameleon is not happy. Notice that for answering the question you do not necessarily need all the information provided above. 2

  3. 3 Solutions Solution Let p, q, r stand for “The gold is in box 1”, “The gold is in box 2” and “The gold is in box 3”, respectively. • “Only one box contains the gold” is formalized as below. ( p ∧ ¬ q ∧ ¬ r ) ∨ ( ¬ p ∧ q ∧ ¬ r ) ∨ ( ¬ p ∧ ¬ q ∧ r ) • “Only one message is true” is formalized as below ( p ∧ q ) ∨ ( p ∧ ¬ q ) We can now build the truth table or the tableaux and check which interpretations satisfy the constraints. You will find that the interpretation satisfying the constraints is: I ( p ) = T and I ( q ) = F . Hence, the gold is in Box 1. 3.1 Pet • happy ↔ ( ¬ upset ∧ ¬ indignant ) • upset ↔ ( ¬ happy ∧ ¬ indignant ) • indignant ↔ ( ¬ happy ∧ ¬ upset ) • ( indignant ∨ upset ) → purple • hungry → upset • ( busyeating ∧ pet ) → indignant • empty → hungry • ( ¬ empty ∧ hungry ) → busyeating • slept → happy • empty • ¬ happy It’s enough to use: • happy → ( ¬ upset ∧ ¬ indignant ) • ( indignant ∨ upset ) → purple • hungry → upset • empty → hungry plus the fact that the food bowl is empty ( empty ) and the negation of the conclusion ( ¬ happy ). 3

Recommend


More recommend