0% found this document useful (0 votes)
210 views3 pages

Midterm Exam - FALL 2020 Artificial Intelligence

This document contains instructions and questions for a midterm exam in an Artificial Intelligence course. It has 4 multiple choice and short answer questions worth a total of 40 marks. Question 1 asks about applying depth-first search or breadth-first search on a graph. Question 2 asks about generating candidates and determining frequency for association rule mining. Question 3 asks about applying k-means clustering. Question 4 asks to draw a truth table and decision tree based on the behavior of a machine with 3 keys. The instructions emphasize completing all questions, showing work, and submitting on time.

Uploaded by

zara shaheen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
210 views3 pages

Midterm Exam - FALL 2020 Artificial Intelligence

This document contains instructions and questions for a midterm exam in an Artificial Intelligence course. It has 4 multiple choice and short answer questions worth a total of 40 marks. Question 1 asks about applying depth-first search or breadth-first search on a graph. Question 2 asks about generating candidates and determining frequency for association rule mining. Question 3 asks about applying k-means clustering. Question 4 asks to draw a truth table and decision tree based on the behavior of a machine with 3 keys. The instructions emphasize completing all questions, showing work, and submitting on time.

Uploaded by

zara shaheen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Midterm Exam –FALL 2020

Artificial Intelligence
Time Allowed: 120 MINUTES
Instructions:
1) Answer ALL questions.
2) Show all your work clearly and completely. In case of any ambiguity, please write your
assumptions clearly. Marks can be deducted if work is not clear.
3) READ ALL INSTRUCTIONS CAREFULLY. If you do not follow the instructions as
mentioned in the questions, you can lose marks.
4) Note that there are no marks for error carry forward. So attempt all questions carefully.
5) Cheating is strictly not allowed and someone caught cheating can get an F in this course.
6) For submission, only handwritten submissions should be submitted on Google class.
7) Any submission after due time will have 1 mark deduction per minute, so use your time
wisely. No submission will be accepted 15 minutes after the time is over.

Question 1 /10
Question 2 /10
Question 3 /10
Question 4 /20

Total
Question 1 [10]
i. In the following graph, starting from the node A at the top, which algorithm between DFS and BFS
reaches the goal node (G) after visiting the least number of nodes? You can assume that if a node has
edge to multiple nodes, the nodes are visited in alphabetical order.

ii. List all nodes that are visited in order from A to G using the approach you have chosen in part i)

Question 2 [10]
We know that the Apriori algorithm is used to generate association rules from a dataset of transactions. The algorithm
is already running and a complete list of frequent 4-itemsets (all itemsets of size 4 with support > min support) have
been generated. They are listed as follows:
{a, b, c, d}
{a, b, c, e}
{a, b, d, e}
{a, c, d, e}
{b, c, d, e}
{c, d, e, f}
{c, d, e, g}

a. Now, consider the following 5-itemset: {b, c, d, e, f}


i) Will the itemset be generated as a candidate? Yes? No? Maybe? Justify your answer.
ii) Is the itemset frequent? Yes? No? Maybe? Justify your answer.

b. Consider the following 5-itemset: {a, b, c, d, e}


i) Will the itemset be generated as a candidate? Yes? No? Maybe? Justify your answer.
ii) Is the itemset frequent? Yes? No? Maybe? Justify your answer.

Question 3 [10]
Assume that a data scientist has been provided with the following points: (2,2), (4,4), (5,5), (6, 6), (9,9), (0,4) and
(4,0). He runs K-means algorithm on the data with k = 3 and gets the following clusters after first iteration:
C1 = {(2, 2), (4, 4), (6, 6)}
C2 = {(0, 4), (4, 0)}
C3 = {(5, 5), (9, 9)}

Help him in running the k-means algorithm one more time. What are the new clusters and their centroids? To calculate
distance between two points, you can use either Euclidean or Manhattan distance formula.
Question 4 [20 = 8 + 12]
In a machine, there are three keys A, B and C. They can be pressed to play a sound ‘S’ and turn the LED ‘L’ on.
The machine works as follows:
- Sound ‘S’ is played whenever any key is pressed
- Sound ‘S’ is not played when keys ‘B’ and ‘C’ are pressed together
- LED ‘L’ is lighted only whenever ‘S’ is not on and when any key is pressed.

i. Based on this information, draw a truth table for the scenario described above as discussed in class.
ii. In your table, now assume ‘L’ to be target attribute. Draw a decision tree for the above scenario using
truth table from part i.

----------------------------------------- GOOD LUCK  -----------------------------------------

You might also like