CMSC 471

Artificial Intelligence -- Fall 2015

HOMEWORK FOUR
out 11/24/15, due 12/03/15


As stated in the course syllabus, you are permitted (and encouraged!) to work on this homework assignment in groups of up to three students. If you work in a group, you only need to turn in one shared solution, with everyone's name on the assignment. All students in the group will receive the same grade on the assignment. If you choose to work in a group, you must actually produce group solutions, not have each member work independently on one part of the assignment, then submit the collection of independent solutions.


I. Machine Learning (50 pts)

A. Information Gain (10 pts)

Russell & Norvig, Exercise 18.5 (page 764). Suppose that an attribute splits the set of examples E into subsets E_k and that each subset has p_k positive examples and n_k negative examples. Show that the attribute has strictly positive information gain unless the ratio p_k / (p_k + n_k) is the same for all k.

B. Decision Tree learning (40 pts)

The following table gives a data set for deciding whether to play or cancel a ball game, depending on the weather conditions.

Outlook Temp (F) Humidity (%) Windy? Class
sunny 75 70 true Play
sunny 80 90 true Don't Play
sunny 85 85 false Don't Play
sunny 72 95 false Don't Play
sunny 69 70 false Play
overcast 72 90 true Play
overcast 83 78 false Play
overcast 64 65 true Play
overcast 81 75 false Play
rain 71 80 true Don't Play
rain 65 70 true Don't Play
rain 75 80 false Play
rain 68 80 false Play
rain 70 96 false Play
  1. Information Gain (15 pts.) At the root node for a decision tree in this domain, what would the information gain associated with a split on the Outlook attribute? What would it be for a split at the root on the Humidity attribute? (Use a threshold of 75 for humidity (i.e., assume a binary split: humidity <= 75 / humidity > 75.)

  2. Gain Ratios (15 pts.) Again at the root node, what is the gain ratio associated with the Outlook attribute? What is the gain ratio for the Humidity attribute at the root (using the same threshold as in (a))?

  3. Decision Tree (10 pts.) Suppose you build a decision tree that splits on the Outlook attribute at the root node. How many children nodes are there are at the first level of the decision tree? Which branches require a further split in order to create leaf nodes with instances belonging to a single class? For each of these branches, which attribute can you split on to complete the decision tree building process at the next level (i.e., so that at level 2, there are only leaf nodes)? Draw the resulting decision tree, showing the decisions (class predictions) at the leaves.
     

II. Knowledge Bases

A. Logic (20 pts)

(a) Russell & Norvig Exercise 7.7, page 281 (10 pts).

(b) Russell & Norvig Exercise 8.28 (c,f,h,k,l), page 320-321 (10 pts)

B. Resolution Theorem Proving (30 pts)

(a) (8 points) Represent the following knowledge base in first-order logic. Use the predicates where arguments x have the domain of all people, and arguments t have the domain of all tests.
  1. Everyone who is smart, studies, and attends class will be prepared.
  2. Everyone who is prepared will pass a test if it is fair.
  3.  A student passes a test if and only if they don't fail it.
  4.  Every UMBC student is smart.
  5.  If a test isn't fair, everyone will fail the test.
  6.  Aidan is a UMBC student.
  7.  Sandy passed the 471 exam.
  8.  Aidan attends class.

(b) (8 points) Convert the KB to conjunctive normal form.

(c) (2 points) We wish to prove that

study(Aidan) -> pass(Aidan, 471-exam)

Express the negation of this goal in conjunctive normal form.

(c) (12 points) Add the negated goal to the KB, and use resolution refutation to prove that it is true. You may show your proof as a series of sentences to be added to the KB or as a proof tree.  In either case, you must clearly show which sentences are resolved to produce each new sentence, and what the unifier is for each resolution step.