Extracted Exam Questions
Answer any four (4) of the following questions
Question 1
(a) Define the following agents and discuss distinctive/characteristic features of each using suitable diagrams. [4]
i. Goal-based agent
ii. Utility-based agent
(b) Consider the graph shown in the figure below. Simulate the process of travelling from Arad to Bucharest using
Breadth First Search and Depth First Search algorithms. Also comment on time and space complexities. [6]
(c) Describe suitable data structures that are used in implementing Breadth First Search and Depth First Search
algorithms and describe the way in which they are used. Give examples. [5]
Question 2
(a) What is greedy best first search? Explain the relationship between the A* algorithm and the Uniform Cost
Search algorithm. [3]
(b) Consider the following map: [6]
The cost of each move as the distance between each town is shown on the map.
The Straight Line Distance between any town and town M are given in the table below.
Straight Line Distance to M
A
B
C
D
223
222
166
192
E
F
G
H
165
136
122
111
I
J
K
L
100
60
32
102
M
0
Using the A* algorithm, work out a route from town A to town M.
Provide the search tree for your solution and indicate the order in which you expanded the nodes. Finally, state the
route you would take and the cost of that route.
(c) Given the following search tree, apply the alpha-beta pruning algorithm to it and show the search tree that would
be built by this algorithm. Make sure that you show where the alpha and beta cuts are applied and which parts of the
search tree are pruned as a result. [6]
Question 3
(a) Define (i) Biological Neuron, (ii) McCulloch-Pitts Model of artificial neuron and (iii) Perceptron. [3]
(b) Derive Back propagation algorithm for a multi-layer neural network. [5]
(c) A training pattern, consisting of an input vector x = [x₁, x₂, x₃]ᵀ, the vector of hidden layer outputs is y = [y₁, y₂]ᵀ,
the vector of actual outputs is z = [z₁, z₂, z₃]ᵀ, and the vector of desired outputs is t = [t₁, t₂, t₃]ᵀ. The network has the
following weight vectors: v₁₁ = 0.4, v₁₂ = -0.6, v₁₃ = 1.9, v₂₁ = -1.2, v₂₂ = 0.5, v₂₃ = -0.7, w₁₁ = 1.0, w₂₂ = -1.2, w₃₁ =
0.3, w₃₂ = 0.6. The learning rate parameter is 0.01. [7]
Assume that all units use sigmoid activation functions and that each unit has a bias θ = 0 (zero).
If the network is tested with an input vector X = [1, 0, 1]ᵀ and t = [1, 1, 0]ᵀ, calculate local error gradients for output
nodes, hidden nodes and weight updates using the backpropagation algorithm.
Question 4
(b) Define (i) overfitting, (ii) underfitting and (iii) generalization in cases of regression and classification problems
with suitable diagrams. Also discuss how to overcome overfitting and underfitting. [5]
Underfitting
Simple definition
Underfitting occurs when a model is too simple to capture the important pattern in the
data.
The model doesn't learn enough from the training data.
Regression example
Suppose the actual data looks like this:
y
│
•
│
•
•
│
•
•
│
•
•
│ •
•
│____________________________ x
But we use a simple straight line:
y
│
•
│
• /
•
│
• /
•
│
• /
•
│ • /
•
│_/________________________ x
The straight line cannot capture the curved pattern.
This is underfitting.
From your passage
The first figure in your material shows exactly this situation:
A straight line y=θ0+θ1x is fitted to data that clearly does not follow a straight-line pattern.
Therefore:
Model is too simple→Underfitting
Characteristics
Model is too simple.
Important patterns are missed.
Training error is usually high.
Test error is also usually high.
Poor performance on both training and unseen data.
Overfitting
Simple definition
Overfitting occurs when a model is too complex and learns the training data, including
noise and small irregularities, instead of learning the general pattern.
The model performs extremely well on the training data but poorly on new data.
Suppose the actual data looks approximately like this:
y
│
│
•
•
•
│ •
•
│
• •
│
•
│________________________ x
A reasonable model might look like:
y
│
•
│
•─────•
│ •
•
│
• •
│
•
│________________________ x
But an overly complicated model might wiggle through every single training point:
y
│
•
│
/\
│ •──/ \──•
│
\
│
•
\
\•
│________________________ x
It fits the training points almost perfectly, but the curve doesn't represent the true general
relationship.
That is overfitting.
Your passage gives the example of a 5th-order polynomial:
y=j=0∑5θjxj
The passage says that the curve passes through the data almost perfectly, but it would not
necessarily be a good predictor for new housing prices.
That is:
Very complex model→Overfitting
Generalization
This is VERY important.
Simple definition
Generalization is the ability of a machine-learning model to perform well on new, unseen
data, not just on the training data.
A model generalizes well if it can predict the output for new input values accurately.
For example:
Training data:
House size→House price
The model learns from existing houses.
Question 5
(a) Explain supervised learning, unsupervised learning, and reinforcement learning, providing a suitable example for
each. [6]
(b) What is a self-organizing feature map? Provide a brief explanation. [4]
(c) What is a Hopfield network? Describe the Hopfield network with the help of a schematic diagram, and outline
some of its specific applications. [5]