CS 662 Assignment 5: Logic and Knowledge Representation
Assigned: Thursday, October 4.
Due: Thursday October 11 at the start of class.
30 points total.
What to turn in: Typed answers for each of the questions below. It is
best if you use the traditional symbols for forall, thereExists, and,
or and not. If you cannot use them, you may use A, E, &, |, and !.
Question 0: Protege (note - there is nothing to turn in for
In the next assignment, you will be using a tool called Protege to
build and edit an ontology. Before next Thursday's class, you should
do at least one of the following, depending on how you plan to do your
- Successfully start Protege on one of the lab machines. It's
installed on all three platforms; on OS X you can find it under
Applications, and under Windows and Linux, you can get to it from
the start menu. If you're planning to work entirely in the lab, this
is all you need to do.
- If you're planning to work completely or partially on your own
machine, download and install Protege
from here. You should
download the full version, which contains Protege-OWL. Please get
version 3.3.1. You will also want to install
the Pellet reasoner. You'll need
to build it, and then run pellet-dig.sh or pellet-dig.bat, depending
on your OS. Make sure you are able to start both applications,
configure the reasoner, and open the Pizza tutorial.
Question 1: Prop Logic sentences (5 points)
Encode the following sentences in propositional logic, using only the
- H: Homer is happy.
- B: Bart is happy.
- M: Marge is happy.
- Sun: The sun is shining
- S: There is school.
- L: Lisa is happy.
Question 2: Conversion to CNF (5 points)
- Homer is happy if and only if Bart is happy and Marge is happy.
- If there is no school and the sun is shining, then Bart is happy.
- If there is school, then Lisa is happy.
- If Lisa is not happy, then Marge is happy.
- The sun is shining.
- Lisa is not happy.
Convert each of the sentences above to CNF.
Question 3: Resolution Proof (10 points)
Use resolution with refutation to show that Homer is happy.
Question 4: First-order logic (10 points)
Translate the following sentences into first-order logic using the
following predicates: worksAt(x,y), smarter(x,y), student(x),
livesIn(x,y), likedBy(x,y), hasBlueHair(x)
- Everyone who works at the power plant is smarter than Homer.
- Unless a person is a student, he or she works at the power plant.
- There is someone who lives in Springfield who is liked by
everyone. (you can like yourself.)
- Homer is liked by exactly two people.
- Marge is the only person in Springfield with blue hair.