0% found this document useful (0 votes)
40 views9 pages

ECL2 2024 Ex06 SampleSolution Updated

This document provides an optional exercise on various topics in computational linguistics including ambiguities, semantic relations, quantifier transformations, predicate logic, and propositional logic. It includes examples and asks students to identify different types of ambiguities, explain semantic relationships between terms, transform statements by changing quantifiers, write statements in predicate logic format, and evaluate statements using truth tables in propositional logic.

Uploaded by

Richard Salnikov
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views9 pages

ECL2 2024 Ex06 SampleSolution Updated

This document provides an optional exercise on various topics in computational linguistics including ambiguities, semantic relations, quantifier transformations, predicate logic, and propositional logic. It includes examples and asks students to identify different types of ambiguities, explain semantic relationships between terms, transform statements by changing quantifiers, write statements in predicate logic format, and evaluate statements using truth tables in propositional logic.

Uploaded by

Richard Salnikov
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Introduction to Computational Linguistics II Spring Semester 2024

Department of Computational Linguistics University of Zürich

ECL II Exercise 6
Repetition

Information: This exercise is optional. We will not correct it individually,


but provide some sample solutions. Whenever you encounter problems or
have any questions, just post on the OLAT-Forum. If it is personal or
urgent, you can also contact us through E-Mail.

1 Ambiguities
For each sentence, identify the type of ambiguity:

1. Pragmatic ambiguity:
statement vs. request (e.g., Turn the music off!)

2. Syntactic ambiguity:
John catches [the mouse][with cheese]
John catches [the mouse with cheese]

3. Phonetic/phonological ambiguity:
piece vs peace

4. Scope ambiguity:
Each tourist eats their own kiwi. vs. All tourists have to share one
single kiwi.
If you are from New Zealand, there might be another ambiguity, namely
lexical ambiguity between kiwifruit and kiwi bird.

5. Pragmatic ambiguity* Semantic ambiguity


The football player went shopping and bought one expensive thing. vs.
The club had to pay a lot to buy the football player.
[* previous sample solution had a mistake - its semantic ambiguity]

1
Introduction to Computational Linguistics II Spring Semester 2024
Department of Computational Linguistics University of Zürich

2 Semantic Relations
Explain the semantic relationship between ’cat’ and the terms listed below
(hyponymy, meronymy, synonymy, etc.).
Cat:
1. Hyponym
2. Hypernym
3. Meronym
4. Synonym
5. Hyponym

3 Transformation of Quantifiers
Transform the following statements in such a way, that you can express the
same ’meaning’ using the opposite quantifier(∃ to ∀ and vice versa). Thus,
the truth conditions must stay constant.
Example: ∀x(Roman(x) → be_crazy(x)) ↔ ¬∃x(Roman(x) ∧
¬be_crazy(x))

Transformed statement 1:

¬∀x(Gaul(x) ∧ is_named(x, Asterix))

Transformed statement 2:

∃x(boar(x) ∧ ¬delicious(x))

Since we have double negation, we can simplify the original statement to:

¬∃x((human(x) ∧ have(x, ears)) ∧ like(x, Troubadix’s songs))

Transformed statement 3:

∀x((human(x) ∧ have(x, ears)) ∧ ¬like(x, Troubadix’s songs))

Transformed statement 4:

¬∃x(weak(x) ∧ ¬make_strong(Magicpotion, x))

2
Introduction to Computational Linguistics II Spring Semester 2024
Department of Computational Linguistics University of Zürich

4 Repetition of Predicate Logic


1. Some Gauls can brew a magic potion.

∃x(Gaul(x)) ∧ ∃y(potion(y) ∧ (magic(y)) ∧ can_brew(x, y)

2. If and only if Caesar defeats the Gaulish village will he be happy.

happy(Caesar) ↔ defeats(Caesar, Gaulish_village)

We don’t instantiate Caesar as it is a proper noun, the same goes


for the gaulish village (although you could certainly make a case for
village(x) and gaulish(x)). ”Happy” is a predicate, but you could also
say ”is_happy”.

3. All Gauls like boars, but they don’t like Romans.

∀x(Gaul(x) → ∀y, z(boar(y) ∧ roman(z) → like(x, y) ∧ ¬like(x, z)))

4. No one who is not crazy will fight the Gauls.

¬∃x(¬crazy(x) ∧ fight(x, Gauls))

5. Most Britons eat peppermint boars and drink cervisia.

¬∀ x(Briton(x) → ∃y(boar(y)∧peppermint(y)∧(eat(x, y))∧drink(x, cervisia))

6. If Obelix pulls out a tree, Idefix is very sad.

∀x(tree(x) ∧ pulls_out(Obelix, x)) → very_sad(Idefix)

7. Strong Gauls don’t fear crazy Romans.

∀x(Gaul(x) ∧ strong(x) → ∀y(Roman(y) ∧ crazy(y) → ¬fear(x, y)))

8. If some Romans attack the Gaulish village, Obelix throws a menhir.

∀x(Roman(x)∧attack(x, Gaulish_village)) → ∃y(menhir(y)∧throws(Obelix, y)

3
Introduction to Computational Linguistics II Spring Semester 2024
Department of Computational Linguistics University of Zürich

5 More Predicate Logic


1. Harry is a magician, Dudley isn’t.

magician(Harry) ∧ ¬magician(Dudley)

2. Only bad magicians and witches go to Azkaban. (Both solutions are


correct)

∀x(goto(x, Azkaban) → (bad(x) ∧ magician(x) ∨ witch(x)))

¬∃x(goto(x, Azkaban) ∧ ¬(bad(x) ∧ magician(x) ∨ witch(x)))

3. Slytherin and Gryffindor don’t like each other. (Both solutions are cor-
rect)

∀x, y(Slytherin(x) ∧ Gryffindor(y) → ¬like(x, y) ∧ ¬like(y, x))

¬∃x, y(Slytherin(x) ∧ Gryffindor(y) ∧ (like(x, y) ∨ like(y, x))))

4. Every magician likes a magician. Scope ambiguity!

∀x(magician(x) → ∃y(magician(y) ∧ like(x, y)))

∃y(magician(y) ∧ ∀x(magician(x) → like(x, y)))

5. No magician likes a witch who is better than himself. (Both solutions


are correct here)

∀x, y(magician(x) ∧ witch(y) ∧ betterthan(y, x) → ¬like(x, y))

∃x, y(magician(x) ∧ witch(y) ∧ betterthan(y, x) ∧ like(x, y))

6. There is a magician, who likes all witches who are not better than
himself.

∃x(magician(x)) ∧ ∀y(witch(y) ∧ ¬betterthan(y, x) → like(x, y))

4
Introduction to Computational Linguistics II Spring Semester 2024
Department of Computational Linguistics University of Zürich

6 Propositional Logic
a: It’s warm.

b: It’s cold.

c: It’s summer.

4.1 If it’s warm, it’s not cold. If it’s summer, it’s warm. It’s summer. Thus,
it’s not cold.
Premise: (a → ¬b) ∧ (c → a) ∧ c
Conclusion: ¬b

Truth Table:
a b c (a → ¬b) ∧ (c → a) ∧ c ¬b
1 1 1 0 0 1 0 1 0
1 1 0 0 0 1 0 0 0
1 0 1 1 1 1 1 1 1
1 0 0 1 1 1 0 0 1
0 1 1 1 0 0 0 1 0
0 1 0 1 1 1 0 0 0
0 0 1 1 0 0 0 1 1
0 0 0 1 1 1 0 0 1
As you can see in row 1.1, we have the only instance of the premise being
true and the conclusion being also true. So, the semantic proof holds.

5
Introduction to Computational Linguistics II Spring Semester 2024
Department of Computational Linguistics University of Zürich

4.2 It’s warm, exactly when it’s not cold. If it’s cold, it’s not summer. Thus,
it’s summer, if it’s warm.
Premise: (a ↔ ¬b) ∧ (b → ¬c)
Conclusion: a → c

a b c (a ↔ ¬b) ∧ (b → ¬c) a→c


1 1 1 1 0 0 0 1 0 0 1
1 1 0 1 0 0 0 1 1 1 0
1 0 1 1 1 1 1 0 1 0 1
1 0 0 1 1 1 1 0 1 1 0
0 1 1 0 1 0 0 1 0 0 1
0 1 0 0 1 0 1 1 1 1 1
0 0 1 0 0 1 0 0 1 0 1
0 0 0 0 0 1 0 0 1 1 1
In row 4, we have one instance of the premise being true and the conclusion
not (highlighted in red). Even if we have row 3 and 6 (highlighted in yellow)
where both of the premise and the conclusion hold, that does not matter
since we have one case where it does not hold. So, the semantic proof does
not hold since not in all cases in which the premise is true, the conclusion is
true as well.

The raccoon will be angry if you get it wrong!

6
Introduction to Computational Linguistics II Spring Semester 2024
Department of Computational Linguistics University of Zürich

7 Model theoretic Semantics


Here F means formula and not the rules that have been used. Unfortunately,
these were not specified, but you can infer them from the solution. As you
can see we don’t always have perfect sample solution which is why we do not
release them for all the exercises.

7
Introduction to Computational Linguistics II Spring Semester 2024
Department of Computational Linguistics University of Zürich

8
Introduction to Computational Linguistics II Spring Semester 2024
Department of Computational Linguistics University of Zürich

Extra comments from us: We hope this helps you practice a bit before the
exam, for more translation exercises, you have quite a lot in the old exam. If
you want to check your results for the exams with no sample solutions, come
ask us in the Q&A session. Good luck!

You might also like