2024 CSC14003 ReviewExercisesForFinal
2024 CSC14003 ReviewExercisesForFinal
Question 01. (Adapted from Prof. Ziv-Bar Joseph, Carnegie Mellon University, Course 10-701
Machine Learning materials.) NASA wants to discriminate Martians (M) from Humans (H)
based on these features (attributes): Green ∈ {𝑁, 𝑌}, Legs ∈ {2, 3}, Height ∈ {𝑆, 𝑇}, Smelly ∈
{𝑁, 𝑌}. Your available training data is as follows (N = No, Y = Yes, S = Small, T = Tall). Note that
it is just a made-up problem for the exercise, anything can happen!
Build an ID3 decision tree classifier from the above training dataset. Attributes are evaluated
using Information Gain. Ties are broken such that an attribute with earlier alphabetical order is
preferred.
1) Present the calculations required to choose the attribute for the root node.
Target Height Green Legs Smelly
S T Y N 2 3 Y N
AE
IG
2) Present the calculations required to choose the attribute for the root’s left branch.
Target Height Legs Smelly
AE
IG
3) Present the calculations required to choose the attribute for the root’s right branch.
Target Height Legs Smelly
AE
IG
Question 02. From the sentence "Heads I win, tails you lose," prove that "I win" by using
propositional logic refutation resolution.
a) Represent the given sentence in propositional logic using only the following prepositions:
Head (the coin’s head), Tail (the coin’s tail), IWin (I win), and YouLose (you lose)
b) Add some general knowledge axioms about coins, winning, and losing.
Use first-order logic forward chaining to prove Faster(Bob, Steve). If several rules apply, use
the one with the smallest number. Show the chaining process step by step, using the numbering
of the sentences to identify how you are using the rules and facts in the KB. For either
presentation method, you will need to indicate the unifications.
a) Build a FOL knowledge base from the above sentences, using only given predicates.
CHILD(x): “x is a child” LOVES(x, y): “x loves y”
REINDEER(x): “x is a reindeer” REDNOSE(x): “x has red nose”
WEIRD(x): “x is weird” CLOWN(x): “x is a clown”
Politicians can fool some people all of the time, and they can fool all people some of the
time, but they can’t fool all of the people all of the time.
a) Compute the output values for all the hidden and output neurons when input signals come
to neuron 1 and 2 are both 1s and output signal is 1.
Neuron 3 4 5
Output
Weights w1 w2 w3 w4 w5 w6
Values
Question 07. In the network shown below, all the units have binary inputs (0 or 1), unipolar
step functions and binary outputs (0 or 1). The weights for this network are w 31 = 1, w32 = 1, w41
= 1, w42 = 1 and w43 = −2. The threshold of the hidden unit (3) is 1.5 and the threshold of the
output unit (4) is 0.5. The threshold of both input units (1 and 2) is 0.5, so the output of these
units is the same as the input.
Which Boolean functions can be computed by this network? Justify your answer by showing
detailed calculations.
1 2 3 4