Sample Final Ai

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

SIMAD UNIVERSITY

FACULTY OF COMPUTING

SAMPLE FINAL EXAMINATION


ARTIFICIAL INTELLIGENCE
Student Name:____________________________________________________________________ID#____
Instruction: This Sample Exam contains four parts. Attempt All

[4 x 10.0 = 40 points]

Section One: [10 Marks]


1. Theorists used to call games by many names. List at least four such names
[1 point]
2. In a game of coins, You and your partner have a pile of 15 coins. Each player must
divide the pile of 15 Coins into two non-empty un-equal piles. The player who can’t
do that loses. Show all moves.
[2 points]
3. In a pick stick game between a user and a PC, the total sticks for 7 rounds are 42.
a. What is the range of picks of sticks of this game?
b. What is the minimum and maximum sticks?
c. Show the game using tabulation between a user and a PC
[1 point]
4. Consider a 3-layer Back-Propagation Neural Network (BPNN) shown below. Suppose
that the network is required to perform logical XOR with inputs are given as x1=x2 =
1. The effect of the bias applied to a neuron in the hidden or output layer is
represented by -1 and The initial weights and threshold levels are set randomly as
follows: train the Network. Train the Network.

1
[3 point]
5. In a TicTacToe game, there are multiple ways of designing winning strategies. Show
at least 3 of them using TicTacToe tables.

[2 points]
6. In a Minimax Game, the Min plays ((5, 7, 12, 8), (5, 7, 12, 8), (5, 7, 12, 8)). Show who
wins using by:-

[1 point]
a. Tabulation b. Minmax function utility

Section Two: [10 Marks]


1. Using Bayes ‘Rules, perform the followings

[4 points]

2
a. Prove P(W) = 1 e. P(Triangle) = ?
b. P(Black) = ? f. P(Circle | Star  Black) = ?
c. P(Circle | White) = ? g. P(White) = ?
𝑃(𝑌|𝑋 ) 𝑥 𝑃(𝑋)
d. P(Black | Star) = ? h. Prove 𝑃(𝑋|𝑌) =
𝑃(𝑌)
2. Using Joint probability of the below tabulation. Attempt the followings.

[3 points]

Dept Admitted Gender Percent


MM True Male 32
MM False Female 3
MM True Female 7
MM False Male 6
IT True Male 11
IT True Male 6
IT False Female 42
IT False Female 12
CS False Male 4
CS True Female 12
CS True Male 23
CS True Male 3
a. What is P(Admitted=true | Gender=Male, Dept=IT)?
b. What is P(Admitted=true | Gender=Female, Dept=IT)?
c. What is P(Admitted=true | Gender=Male, Dept=MM)?

3
d. What is P(Admitted=true | Gender=Female, Dept=CS  IT)?
e. What is P(Admitted=true | Gender=Male, Dept=CS)?

3. True / False: An event that cannot occur has zero probability or necessarily
it is certain not to occur [___]
[1 point]

4. Create two input AND function from a perceptron (assume w1 =0.8, w2 =


1.6, Threshold = 1 and Learning Rate n = 0.5). Train the perceptron
[2 points]

Section Three: [10 Marks]


1. A Class contains 40 students. Of them, 18 are IT and 22 are CS. If one
student is randomly selected out of this class, what is the probability that
this student is:-
a. IT c. Using P(A)+P(𝐴) = 1, prove it
b. CS d. Using P(A) = 1 - P(𝐴), prove it
[2 points]

2. Constraint Satisfaction problem is defined as set of variables X1, X2, ... XN


where by each variable Xi has a non-empty Domain Di of possible values
and a set of constraints C1, C2,… CM . Solve:- TWO +TWO = FOUR
[4 points]

3. Using Factoring concept with three variables namely X, Y, Z with values


={0.1, 0.9, 0.2, 0.8, 0.4, 0.6, 0.3. 0.7} perform:
a. Factor variable X= f and Z = f such that r(X = f, Y, Z=f)
b. Factor variable X = t, Y = t and Z = f such that r(X = t, Y=f, Z=f)
[2 points]
4. The probability that A is true in the absence of any other information is
known as P(A). Suppose Variable A is Temperature {Hot, Warm, Cool,

4
Cold} and another Variable Condition {Foggy, Snowy, Cloudy,
Amazing}as given by the following two-dimensional table. Compute:-

Chilly White Gloomy Icy


Warm 0.10 0.01 0.05 0.04
Hot 0.23 0.10 0.12 0.15
Cold 0.02 0,01 0.08 0.04
Cool 0.02 0.01 0.01 0.01
[2 points]

a. P(Cold | Chilly) c. P(Gloomy)


b. P(Icy | Hot) d. P(Cool | Icy)

Section Four: [10 Marks]


1. Based on Entropy prediction with the below table, Answer the followings
[2 points]

Object Color Number of Alive


Eyes
A Red 4 Yes
B Black 42 No
C Red 13 Yes
D Green 3 Yes
E Black 27 No
F Red 2 Yes
G Black 1 Yes
H Green 11 No

a. What is the entropy of Alive= Yes? H(Alive = Yes) = ?


b. What is the entropy of Color = Red ? H(Color = Red) =?
c. What is the entropy of Object = E? H(Object = E) =
d. What is the entropy of Alive | Color ? H(Alive | Color) =?

5
2. Calculate the output ℎ1(3) of the given NN based on the following values:
w11(1) = w12(1) = w13(1) = 0.3, w21(1) = w22(1) = w23(1) = 0.2,
w31(1) = w32(1) = w33(1) = 0.5, w11(2) = w12(2) = w13(2) = 0.2,
b1(1) = b2(1) = b3(1) = 0.5, b1(2) = 0.2, x1 = 1, x2 = 2, x3 = 3
[2 points]

False / True : The perceptron is the simplest form of neural net with one
neuron with adjustable weights[___]

[1 point]

3. Using Multiplication Factoring concept with variables X, Y for f1 and value


={}0.1, 0.9, 0.2, 0.8,} and variable Y amd X for f2 with values =}three
variables namely X, Y, Z with values ={0.3, 0.6, 0.6, 0.4}
a. Calculate f * f2

[1 point]

6
4. Using Summation Factoring concept of f8 with three variables namely X,
Y, Z with values ={0.03, 0.07, 0.54, 036, 0.6, 0.14, 0.48. 0.32}
a. Calculate ∑𝑌 𝐹8 b. Calculate ∑𝑋 𝐹8
[1 points]

5. Consider creating a perceptron that has three input data points as


outlined in the below table for the classification of output into Red or Blue
colors. Select appropriate Activation function by assuming that the output
should be 1 for Red color and 0 for Blue color provided that the initial
weights: w1 =-2, w2 =1, w3=3 and Learning Rate = 0.5
RED GREEN BLUE OUTPUT
255 0 0 RED
240 50 50
0 0 255 BLUE
82 12 110

[2 points]
Constraint Satisfaction problem is defined as set of variables X1, X2, ... XN
where by each variable Xi has a non-empty Domain Di of possible values and
a set of constraints C1, C2,… CM . Solve:- SEND + MORE = MONEY

[2 points]

END OF SAMPLE FINAL

You might also like