Docsity

Logic Expression - Artificial Intelligence - Solved Exam, Exams of Artificial Intelligence

Toggle sidebar
bg1
1
CS-271, Intro to A.I. — Final Exam — Spring Quarter, 2010
1. (2 pts) NAME AND EMAIL ADDRESS:
YOUR ID: ID TO RIGHT: ROW: NO. FROM RIGHT:
The exam will begin on the next page.
This page summarizes the points available for each question so you can plan your time.
1. (2 pts) Name and email address.
2. (14 pts total, 2 pts each) English to first-order logic translation.
3. (16 points total, 2 pts each) Logical equivalences.
4. (7 points total, 1 pt each) Resolution proof.
5. (15 pts total, 1 pt each) Logical definitions.
6. (10 pts total, -1 for each error, but not negative) Alpha-beta pruning.
7. (15 pts total, -1 for each wrong answer, but not negative) Search Strategy Evaluation.
8. (6 pts total, 1 pt each) Linearly Separable Classifiers.
9. (15 pts total, 1 pt each) Constraint Satisfaction Problems.
pf3
pf4
pf5

Partial preview of the text

Download Logic Expression - Artificial Intelligence - Solved Exam and more Exams Artificial Intelligence in PDF only on Docsity!

CS-271, Intro to A.I. — Final Exam — Spring Quarter, 2010

  1. (2 pts) NAME AND EMAIL ADDRESS:

YOUR ID: ID TO RIGHT: ROW: NO. FROM RIGHT:

The exam will begin on the next page.

This page summarizes the points available for each question so you can plan your time.

  1. (2 pts) Name and email address.
  2. (14 pts total, 2 pts each) English to first-order logic translation.
  3. (16 points total, 2 pts each) Logical equivalences.
  4. (7 points total, 1 pt each) Resolution proof.
  5. (15 pts total, 1 pt each) Logical definitions.
  6. (10 pts total, -1 for each error, but not negative) Alpha-beta pruning.
  7. (15 pts total, -1 for each wrong answer, but not negative) Search Strategy Evaluation.
  8. (6 pts total, 1 pt each) Linearly Separable Classifiers.
  9. (15 pts total, 1 pt each) Constraint Satisfaction Problems.
  1. (14 pts total, 2 pts each) Fill in each blank below with Y (= Yes) or N (= No) depending on whether the logic expression correctly expresses the English.

2a. N “All men are mortal.” ∀x Man(x)  Mortal(x)

2b. Y “Fido has a brother who is a dog.” ∃x Brother(x, Fido)  Dog(x)

2c. Y “For every quiz, there is a student who got 100 on it.” ∀q∃s Quiz(q)  [ Student(s)  Got100(s, q) ]

2d. “No student got 100 on every quiz.” ∀s∃q Student(s)  [ Quiz(q)  ¬Got100(s, q) ] (Question 2d was discarded as ambiguous. Everyone gets it right.)

2e. N “Every student got 100 on every quiz.” ∀s∃q Student(s)  [ Quiz(q)  Got100(s, q) ]

2f. Y “Everyone has a favorite food.” ∀x∃y Person(x)  [ Food(y)  Favorite(y, x) ]

2g. N “There is someone at UCI who is smart.” ∃x [ Person(x)  At(x, UCI) ]  Smart(x)

  1. (16 points total, 2 pt each) Label the following statements as T (= true) or F (= false). Recall that “X is equivalent to Y” means that X and Y have the same truth table. Recall that “X entails Y” means that whenever X is true, Y is also true. Use rewrite rules.

3a. T (A  B) is equivalent to (¬ A  B).

3b. F [ (A  B)  (¬ A) ] entails (¬ B).

3c. T [ (A  B)  (¬ B) ] entails (¬ A).

3d. T [ (A  B)  (¬ A  C)  (¬ C) ] entails B.

3e. T [ (A  B)  (¬ (A  ¬ B) ) ] is equivalent to A.

3f. T (A  (B  C) ) is equivalent to (A  B)  (A  C).

3g. T (A  B) is equivalent to (¬ A  ¬ B).

  1. (10 pts total, -1 for each error, but not negative) ALPHA-BETA PRUNING. Cross out each leaf node that will not be examined because it is pruned by alpha-beta pruning. Traverse the tree left-to-right.
  2. (15 pts total, -1 for each wrong answer, but not negative) Search Strategy Evaluation. Fill in the values of the four evaluation criteria for each search strategy shown. Assume a tree search where: b is the finite branching factor; d is the finite depth to the shallowest goal node; m is the finite maximum depth of the search tree; l is the finite depth limit; C* is the true cost to the least-cost goal node; step costs are identical and equal to some positive ε ; and in Bidirectional search both directions use breadth-first search.

Criterion Complete? Time complexity Space complexity Optimal? Breadth-First Yes O(b^d) O(b^d) Yes Uniform-Cost Yes O(b^(1+floor(C/ε))) O(b^(1+floor(C/ε))) Yes Depth-First No O(b^m) O(bm) No Depth-Limited No O(b^l) O(bl) No Iterative Deepening Yes O(b^d) O(bd) Yes Bidirectional (if applicable)

Yes O(b^(d/2)) O(b^(d/2)) Yes

Max

Min

Min

Max

  1. (6 pts total, 1 pt each) Label the following as Y (= yes) or N (= no) depending on whether a perceptron with a “hard” decision boundary (step transfer function) can correctly classify the examples shown. If your answer is Y (= yes), fill in a set of weights that correctly classifies them. Use w0 as the threshold and wi as the weight for input xi. All perceptrons have three Boolean inputs, x1, x2, and x3, and a “dummy” input, x0, which is always equal to one. They all compute the decision function ∑ wi xi > 0. You may not transform the input space, i.e., they operate on the stated inputs.

Where the answer is Y, other weights are OK iff the decision function is correct.

8a. “At least two inputs are 1.” Correctly classifiable? Y If yes, weights are w0 = -1.5 ; w1 = 1 ; w2 = 1 ; w3 = 1

8b. “Exactly two inputs are 1.” Correctly classifiable? N If yes, weights are w0 = ; w1 = ; w2 = ; w3 =.

8c. “At most two inputs are 1.” Correctly classifiable? Y If yes, weights are w0 = 2.5 ; w1 = -1 ; w2 = -1 ; w3 = -.

8d. “Input x1 = 1, input x2 = 0, input x3 =anything.” Correctly classifiable? Y If yes, weights are w0 = -0.5 ; w1 = 1 ; w2 = -1 ; w3 = 0.

8e. “IF input x1 = 1 THEN input x2 = 0 ELSE input x2 = 1.” Correctly classifiable? N If yes, weights are w0 = ; w1 = ; w2 = ; w3 =.

8f. “Input x1 = input x2.” Correctly classifiable? N If yes, weights are w0 = ; w1 = ; w2 = ; w3 =.