Written Homework #3

Due March 22

1. Representing and solving CSP problems:

   Around the water cooler this morning, Green and four other workers at Circuit City compared what they had for dinner last night. For example, in the course of the conversation, it was discovered that one of them ate lasagne. Knowing that no two made the same entrée, can you determine each person's full name (first + last), occupation (one is a janitor), and meal. Here are some other clues to help you solve this:-

  • The five workers are Mike, Black, the manager, Suzie, and one of them who ate chicken.
  • Dave isn't the accountant.
  • Patty, who isn't Black, loves her job in sales.
  • Strong ate spaghetti that HE made from his old family recipe.
  • One of the women is the owner; another ate fish.
  • Walters ate a hamburger.
  • Polly's last name is Brown

For non-Americans, the first names are Mike and Dave (male) and Suzie, Patty, and Polly (female). The last names are Black, Brown, Green, Strong, and Walters.

 1a) [13] Define this problem formally as a CSP problem.

 1b) [13] Solve it. Use the MRV heuristic and forward checking. Some of the constraints can be encoded directly in the initial domains. Show your steps.

2. [6] Consider a vocabulary with exactly four propositions A, B, C, and D. How many models (mathematical abstract worlds where the sentence is true) are there for the following sentences?

 

3. [10] Assume the following:

If the unicorn is mythical, then it is immortal, but if it is not mythical, then it is a mortal mammal. If the unicorn is either immortal or a mammal, then it is horned. The unicorn is magical if it is horned.

Can you (mechanically) prove the unicorn is magical? (use propositional logic and resolution by hand)

4. [5] First Order Logic: Consider a knowledgebase containing just two sentences: P(A) and P(B). Does this knowledgebase entail FORALL x P(x)?

5. [32 (4 each)] Represent the following sentences in First Order Logic. Use a consistent vocabulary!!

  • Some students took French in Spring 2005.
  • Every student who takes French passes it..
  • Only one student took Greek in Spring 2005.
  • The best score in Greek is always higher than the best score in French.
  •  If you push anything hard enough, it will fall over.
  • The coat in the closet belogs to Sarah.
  • One of the coats in the closet belongs to Sarah.
  • Anyone with two or more spouses is a bigamist.

6. [5] What axioms would be needed to infer the fact Female(Laura) given the facts Male(Jim) and Spouse(Jim, Laura)?

7. [6] Define the concept of "uncle" (i.e. what are the properties that "x" must have in order that Uncle(x) is true?

8. [10] Attempt to unify the following pairs of expressions. Either show their most general unifiers or explain why they will not unify. CAPS indicate CONSTANTS, small letters are variables.

  • p(x, y) and p(TABLE, BLOCK1)
  • p(x, y) and p(TABLE, z)
  • p(x, x) and p(TABLE, BLOCK1)
  • ancestor(x, y) and ancestor(BILL, father(BILL))
  • ancestor(x, father(x)) and ancestor(DAVID, GEORGE)