Solutions to Homework Assignment #5

Last modified: "December 9, 1996 20:14:12 by matt"

From Russell and Norvig Artificial Intelligence, a Modern Approach:

7.2

  1. Not all students take both history and biology.
    ~forall x student(x) --> (takes(x,H) and takes(x,B))
  2. Only one student failed history.
    exists x student(x) and fails(x,H) and forall ystudent(y) and fails(x,H) --> x=y
  3. Only one student failed both History and Biology.
    exists x student(x) and fails(x,H) and fails(x,B) and forall y student(y) and fails(x,H) and fails(x,B) --> x=y
  4. The best score in history was better than the best score in biology.
    exists x forall y score(x,H0 > score(y,B)
  5. Every person who dislikes all vegetarians is smart.
    forall x person(x) and (forall y vegetarian(y) --> dislikes(x,y)) --> smart(x)
  6. No person likes a smart vegetarian.
    forall x,y person(x) and smart(y) and vegetarian(y) --> ~likes(x,y)
  7. There is a woman who likes all men who are not vegetarians.
    exists x woman(x) and forall y man(y) and ~vegetarians(y) --> likes(x,y)
  8. There is a barber who shaves all men in town who do not shave themselves.
    exists x barber(x) and forall y man(y) and ~shaves(y,y) --> shaves(x,y)
  9. No person likes a professor unless the professor is smart.
    forall x,y person(x) and professor(y) and ~smart(y) --> ~likes(x,y)
  10. Politicians can fool some of the people all of the time, and they can fool all of the people some of the time, but they can't fool all of the people all of the time.
    forall x politican(x) --> (exists y forall t person(y) and fools(x,y,t)) and (exists t forall y person(y) --> fools(x,y,t)) and ~(forall t forall y person(y) --> fools(x,y,t))
7.6
You must use <--> to form definitions. If you use only simple implication, -->, you are only imposing constraints.