Docsity

Probability Distribution - Artificial Intelligence - Exam, Exams of Artificial Intelligence

Toggle sidebar
bg1
CS 540: Introduction to Artificial Intelligence
Final Exam: 2:45-4:45pm, May 11, 2008
Room 1240 Computer Sciences
CLOSED BOOK
(two sheets of notes and a calculator allowed)
Write your answers on these pages and show your work. If you feel that a question is not fully specified,
state any assumptions that you need to make in order to solve the problem. You may use the backs of
these sheets for scratch work. There also is one blank page at the end of the exam.
Write your name on this and all other pages of this exam. Make sure your exam contains seven problems
on eleven pages.
Name ________________________________________________________________
Student ID ________________________________________________________________
Problem Score Max Score
1 ______ 18
2 ______ 15
3 ______ 25
4 ______ 10
5 ______ 5
6 ______ 12
7 ______ 15
TOTAL ______ 100
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Probability Distribution - Artificial Intelligence - Exam and more Exams Artificial Intelligence in PDF only on Docsity!

CS 540: Introduction to Artificial Intelligence

Final Exam: 2:45-4:45pm, May 11, 2008 Room 1240 Computer Sciences

CLOSED BOOK (two sheets of notes and a calculator allowed)

Write your answers on these pages and show your work. If you feel that a question is not fully specified, state any assumptions that you need to make in order to solve the problem. You may use the backs of these sheets for scratch work. There also is one blank page at the end of the exam.

Write your name on this and all other pages of this exam. Make sure your exam contains seven problems on eleven pages.

Name ________________________________________________________________

Student ID ________________________________________________________________

Problem Score Max Score

1 ______ 18

2 ______ 15

3 ______ 25

4 ______ 10

5 ______ 5

6 ______ 12

7 ______ 15

TOTAL ______ 100

Problem 1 – Reasoning with Probability Distributions (18 points)

a) Consider the joint probability distribution below.

A B C P(A, B, C) False False False 0. False False True 0. False True False 0. False True True 0. True False False 0. True False True 0. True True False 0. True True True 0.

i. What is P( A = false)? ______________ Show your work below.

ii. What is P( A =true or B =true)? ______________ Explain.

Problem 2 – Bayesian Networks (15 points)

Consider the following Bayesian Network, where variables A-D are all Boolean-valued:

a) What is the probability that all four of these Boolean variables are true? ______________ [Be sure to show your work for Parts a-c.]

b) What is the probability that A is false and D is false? _______________

c) What is the probability that B is true given that C is false and D is true? _______________

A B P(C =true | A, B) false false 0. 8 false true 0. 3 true false 0. 4 true true 0. 7 C P(D=true | C) false 0. true 0.

A^ P(A=true)^ = 0.4^ B P(B=true)^ = 0.

C

D

Problem 3 – Representing Knowledge with First-Order Logic (25 points)

a) Convert each of the following English sentences into First-Order Predicate Calculus (FOPC), using reasonably named predicates, functions, and constants. If you feel a sentence is ambiguous, clarify which meaning you’re representing in logic. (Write your answers in the space below each English sentence.)

Some person is in both CS 538 and CS 540 during Spring term 2008.

Every dog hates the same cat.

Driving to work changes one’s location but not one’s boss [You must use situation calculus here.]

Problem 4 – Logical Reasoning (10 points)

Given the following background knowledge:

  1. x { [ p(x) q(x) ]  [ r(x) s(x) ] } ______________________________________
  2. y [ q(y)  s(y) ] ______________________________________
  3. p(1) ______________________________________
  4. p(2) ______________________________________
  5. q(2) ______________________________________

Show: z [ r(z) ]

Do this by putting wff’s 1-5 into CNF and use the resolution inference rule. Put the CNF on the lines above, to the right of the wff’s. Put the CNF that results from the query below.

6. ______________________________________

Problem 5 – Neural Networks (5 points)

Consider a perceptron that has three real-valued inputs and an output unit with a step function as its activation function. All the initial weights and the bias (“threshold”) equal -1.0_._ Assume the teacher has said that the output should be 1 for the input in1 = -2, in2 = 0, and in3 = 4.

Show how the perceptron learning rule would alter this neural network upon processing this training example. Let (the learning rate) be 0.2 and be sure to adjust the output unit’s bias during training.

Perceptron BEFORE Training

Perceptron AFTER Training

Problem 7– Learning What a Neural Network Learned (15 points)

Assume we have successfully trained the simple neural network below. The output unit uses a “step function,” whose “threshold” is 7, to compute its output given its weighted input. The inputs are binary-valued (i.e., either 0 or 1). .

a) We would like to understand what this neural network has learned. So we decide to address this task by giving all of the eight possible input vectors to this neural network, collecting this set of input/output pairs into a training set. Complete the contents of this training set below:

X 1 X 2 X 3 Y

0 0 0 ___

0 0 1 ___

0 1 0 ___

0 1 1 ___

1 0 0 ___

1 0 1 ___

1 1 0 ___

1 1 1 ___

[Feel free to use the empty space around this training set for your calculations for Part b.]

X 1

X 2

X 3

Y

b) We next decide to learn a decision tree that fully fits Part a’s training set, since decision trees are often easy to interpret. Show all the calculations needed to create this tree, and show the final decision tree that results. (Feel free to do some of your calculations on the previous page.)

c) Should we worry about pruning Part b’s decision tree? Why or why not?

Have a good summer!