Assignment 5: Logic and Probability Theory


Due Monday, April 8th at 2:15pm

This is a purely paper assignment, you do not need to turn in anything online

  1. First Order Logic.
    1. (5 points) Write the following sentences in First-Order logic:
      • Any mortal holding the Ring will be tempted.
      • Frodo is a hobbit.
      • Hobbits are mortals.
      • Anyone who is tempted will put on the Ring.
      • If Frodo is not holding the ring, then Gandalf is holding it.
      • Gandalf is not holding the Ring.
      You should use the following predicates: mortal(x), holding(x,y), tempted(x), hobbit(x), putOn(x,y).
    2. (5 points) Show that Frodo has put on the Ring using forward chaining. On each step, show the facts added to the KB and the list of substitutions.
    3. (5 points) Show that Frodo has put on the Ring using backward chaining. Begin with putOn(Frodo, Ring) and work backward. At each step, show the queue of active goals.
    4. (5 points) Use resolution with refutation to show that Frodo has put on the Ring. Show each step of the proof. You will first need to convert each of the sentences to CNF. Add ! putOn(Frodo, Ring) to the KB and derive a contradiction.
  2. (20 points) Problem 13.10 from Russell and Norvig (p 507, slot machine problem.) Solve part c using a simulation, and include the code that you used. Do a sufficient number of iterations to convince yourself that you've found good results.
  3. (20 points) Problem 13.13 fom Russell and Norvig (p 508, test A and B for a virus)
  4. (20 points) Problem 13.18 fom Russell and Norvig (pp 508-509, flipping two-headed coin