



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Assignment; Professor: Choe; Class: ARTIFICIAL INTELLIGNCE; Subject: COMPUTER SCIENCE; University: Texas A&M University; Term: Unknown 1989;
Typology: Assignments
1 / 6
This page cannot be seen from the preview
Don't miss anything!




(a) Tree 1 (b) Tree 2 (c) Tree 3
Figure 1: Search Trees.
Consider the three search trees in Figure 1. Suppose the branching factor is b and the tree is full. Suppose branches are visited from the left to the right. Nodes A, B, C, D, and E the goal nodes in the trees. Assume that nodes A, C, D, and E are at depth n; and A and C are the k-th node of their parents (i.e., they are children of the left-most node at depth n − 1 ). Node B is at depth m (< n). Node D is the last node to the right at depth n. Depth n is the last level of all the trees. Further assume that the exploration of each depth level proceeds from the left to the right.
Question 1 (4 pts): If n > 2 b, which one shows a case where both depth-first and breadth-first have identical time complexity? (Tree 1, 2, 3, none, or any combination of the three)
Tree 1: DFS will visit n + k − 1 nodes to reach node A. BFS will visit 1 + b + b^2 + ... + bm nodes to reach node B. If n + k − 1 = 1 + b + b^2 + ... + bm, the answer is the time complexity of DFS=BFS. In most cases, it will not be the case. Tree 3: DFS and BFS have the same time complexity.
Question 2 (4 pts): Which one shows a case where depth-first can be complete but non-optimal? (Tree 1, 2, 3, none, or any combination of the three) Explain why.
Tree 1 is the only answer, becasue DFS finds (A) at depth n (thus it is complete, since it found a goal), while there is a goal (B) at depth m < n, thus it is suboptimal.
Question 3 (4 pts): Assume b = 5, k = 2, and n = 7. What is the number of nodes visited in case of Tree 2 for depth-first (and breadth-first)? Note that the “number of node visited” is defined as the number’ of goal checks.
Question 4 (4 pts): Assume b = 10, k = 3, m = 4, and n = 20. In which case does depth-first outperform breadth-first in terms of time complexity (= nodes visited)? (Tree 1, 2, 3, none, or any combination of the three)
Tree 1 and Tree 2.
2 Informed Search
Answer the following questions regarding informed search strategies.
h=
h=
h=3 h=
h=
h=
h=
h=
h=
h=
h=
h=
h=
h=
h=
h=
h=
Figure 2: Search tree. An example search tree is shown with path cost on each edge and heuristic function value next to each node. The leaf nodes are goal states.
Question 1 (6 pts): Is the heuristic admissible? Explain why.
Yes, because at each node n, h(n) is less than the actual cost from n to the nearest goal (i.e. the sum of path cost from n to any of the closest goals).
Question 2 (6 pts): Given the search tree in figure 2, calculate the f (n) value for each node (A to q).
f (A) = 2, f (b) = 2 + 2 = 4, f (c) = 4 + 1.4 = 5. 4 , f (d) = 2 + 2 + 2 = 6, f (e) = 3 + 1.4 + 1 = 5. 4 , f (f ) = 6 + 1.4 + 2 = 9. 4 , f (g) = 4 + 2 + 2 + 1.4 = 9. 4 ,
Question 1 (5 pts): Using the following figure 4, for each node, indicate the final utility value.
Question 2 (9 pts): For each cut that happens, draw a line to cross out that subtree.
MIN
MAX
MIN
MAX
MIN MIN
MAX MAX 10 6 −2^1
−
5
4
3 9
6
7
5 7
[−inf,inf] [−inf,inf]
[5,inf]
[5,6] [5,6]
[5,inf/6]
[−inf/5,inf]
[−inf,inf/5] [5,inf/6/−2]
[5/7,6]
[5,6] [5,inf]
[5,6]
[5,6]
[5,6]
[5,6] [5,6]
[5,6]
Figure 4: Game Tree. Solve using α − β pruning. This tree is the same as figure 3.
See figure 4.
4 Propositional Logic
In all of the problems in this section, show each step of the derivation and indicate which axioms (or other rules) you used: For example, distributive law, definition, etc.
Question 1 (4 pts): Convert ¬(P → ¬S) ∨ (¬(Q → R) ∧ S) into conjunctive normal form.
Question 2 (4 pts): Convert ¬T → (R ∧ (S → (P ∧ Q))) into disjunctive normal form.
Question 3 (4 pts): Convert (R ∧ S) → (Q → ¬(P ∧ ¬T )) into horn normal form. After that, show the equivalent expression with a single implication (→) and some conjunctions (∧).
Question 1 (5 pts): Show that (P ∧ Q) ∨ ¬(R ∧ ¬(P → ¬Q)) is valid.
Question 2 (5 pts): Show that (P ∨ Q) ∧ ¬(¬Q → P ) is inconsistent.
Given:
show that P → Q is a logical consequence of the above using resolution. Precisely follow the steps below.
Question 1 (5 pts): Convert the above problem into a form that is suitable for resolution. This may involve converting some expressions into CNF, and other steps such as including the conclusion part (P → Q).
Negate conclusion: ¬(¬P ∨ Q) = P ∧ ¬Q