Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Midterm Exam Solutions for Artificial Intelligence | COSC 6368, Exams of Computer Science

Material Type: Exam; Professor: Eick; Class: Artificial Intelligence; Subject: (Computer Science); University: University of Houston; Term: Fall 2004;

Typology: Exams

Pre 2010

Uploaded on 08/19/2009

koofers-user-65r
koofers-user-65r 🇺🇸

5

(1)

10 documents

1 / 7

Toggle sidebar

Related documents


Partial preview of the text

Download Midterm Exam Solutions for Artificial Intelligence | COSC 6368 and more Exams Computer Science in PDF only on Docsity! Artificial Intelligence COSC 6368 Midterm Exam Tuesday, October 26, 2004 Solutions to some Problems Name: SSN: 1. A* & Best-first Search (15 points) 2. More Search and EC (15 points) 3. Decision Trees (13 points): 4. FOPL as a Language (7 points): 5. Resolution (10 points) Point Total (out of 60): Number Grade: The exam is “open books and notes” and you have 75 minutes to complete the exam. Write all your answers on this document. 1 1) Best first search and A* [15] Consider the search space below, where S is the start node and G1 and G2 satisfy the goal test. Arcs are labeled with the cost of traversing them and the estimated cost to a goal (h function) is reported inside nodes. For each of the following search strategies, indicate which goal state is reached (if any) and list, in order, all the states popped off of the OPEN list. When all else is equal, nodes should be removed from OPEN in alphabetical order. Best-First-Search (using function h only) [3] Goal state reached: _____G2__States popped off OPEN: S, A, E, G2_________________________________________ A* (using f=g+h)[4] Goal state reached: S2_______ States popped off OPEN: S, A, E, D, G2_____________ 2 S 9 B 7 A 5 G1 0 E 6 C 8 D 3 3 2 G2 0 2 3 8 4 1 1 5 9 7 2 1 2 1 5 2 3) Decision Trees [13] a) Assume the following dataset is given that consists of 2 discrete attributes A and B. Compute the information gain for all relevant tests. Give the formulas you use not only the final result. Based on your answers to the last question which test should be used as the root of a decision tree? [7] A B Class 1 0 C1 1 0 C1 2 1 C1 1 1 C2 2 1 C2 3 1 C2 3 0 C2 3 1 C2 IG(A=)= H(3/8,5/8) – 3/8*H(1/3,2/3) – 2/8*H(1/2,1/2) – 3/8*H(0,1)= … =0.36 IG(B=)=H(3/8,5/8) – 3/8*H(2/3,1/3)-5/8*H(1/5,4/5)=…=0.16 Pick A=0/1/2 as the root test. 5 Problem 3 continued b) Decision trees have been generalized to cope with continuous attributes. What tests are used for continuous attributes and how is the information gain for a continuous attribute computed? [4] c) What role does the validation set play in Reduced-Error Pruning? [2] The validation set is used to determine if a node is pruned or not. Usually, if the accuracy on the validation set for the tree after pruning is not worse than the accuracy for the original tree, then the node in question is pruned. 4) FOPL as a Language [7] Express the following natural language statements using first order predicate calculus formulas: a) There is a student in COSC 6368 that received the same grade in his midterm and his final exam. ]x (student(x) ^ has_taken(s,COSC6368) ^ midtermgrade(x,COSC6368,g1) ^ finalexamgrade(x,COSC6368,g2) ^ g1=g2) b) Every person has at most one social security number2. Vp(person(p)  ((~]s1 has_ssn(p,s1)) v ]s2(has_ssn(p,s2) ^ ~]s3(not(s3=s2) ^ has_ssn(p, s3))) 2 It is not possible that a person has 2 different social security numbers. 6 5) Resolution for FOPL [10] Show using Resolution (and not by using other methods!): (1)Vx]yVz (P(x,y,z)  R(x,y) ) (2)VrVu (P(s,s,u)  Q(s,u) ) (3)VaVb (Q(a,b)  R(b,a) ) (4)VsVt (((Q(s,t) ^ R(t,s))  R(s,t))) (5)VdVe]f ((P(d,d,e)  R(d,f)) (6)P(4,4,6) |- (X) R(4,6) First transform the FOPL formulas into clauses, and then the hunt for the empty clause can begin! Hint: Do not forget to negate the conclusion! See handout 7
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved