Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

MSc Introduction to Artificial Intelligence (Online paper)

Main Summer Examinations 2020

(a) Assume that we have N products, each with a weight and a profit. We would like to

decide which of these products to load in a lorry, with the objective of maximising the total profit of loaded products. The maximum weight W that the lorry can withstand must not be exceeded.  To solve this problem using an optimisation algorithm, we decide to modify the objective of the problem to the following function, as a strategy to deal with the maximum weight constraint:

 

N                      N

 

maximise

vi pi  _       vi wi

i=1                  i=1

(1)

 

where vi  has value 1 (one) if product i is loaded and 0 (zero) if it is not loaded; pi is the profit of product i; and wi  is the weight of product i .

(i)  Is this strategy adequate to deal with the constraint? Why?

(ii)  Give an example of a feasible and an infeasible solution that illustrates your

argument,  along with their objective values computed  using  Eq.  1.   If your answer to (a)(i) is yes/no, your example should support/refute the proposed strategy to deal with the constraint.  Assume that W = 8, N = 3, p1  = 10,

p2  = 5, p3  = 20, w1  = 3, w2  = 3, and w3  = 4.

[20 marks]

(b)    (i)  List one advantage and two disadvantages of the KNN algorithm.

(ii) The Neural Network on the left performs the logical operation AND on the

inputs x1  and x2   using one neuron.  The incomplete network on the right is required to perform a given logical operation on three input variables.

 

The activation function of the above Neural Networks is the Sigmoid function given by the equation  . You may assume that sigmoid(x) > 0 for x _ _4 and sigmoid(x) > 1 for x < +4.

For each of the logical operations below, provide values for w0 , w1 , w2 , and w3 so that the network performs this logical operation on three inputs.  Draw a table to illustrate the input and output for each of your nodes that clearly shows why your network performs this operation.

(i) AND                                     (ii) OR

[20 marks]