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

EASTERN MEDITERRANEAN UNIVERSITY

DEPARTMENT OF MATHEMATICS
COMP587 ARTIFICIAL INTELLIGENCE
FINAL EXAM (SPRING 2020-2021) (DURATION IS 120 MINUTES)

(Question 1)(5 points). You have two empty buckets: the first bucket capable of holding
7 liters of water, and second bucket capable of holding 9 liters of water.You can fill or
empty these buckets. The task is to have 3 liters of water in the second bucket, and no
water in the first bucket.

(Question 2)(5 points). Use the semantic network to represent the following knowledge:

The whale, dolphin, dog, cat, chicken and ostrich are animals. The whale and dolphin are
mammals and live in water. The dog and cat are mammals and live on land. Mammals
have large brains. The chicken and ostrich are birds and they have feathers and lay eggs.
The chicken can fly, but the ostrich can’t fly. Mammals and birds are warm-blooded with
vertebrates. Mammals and birds have a constant temperature of body.

(Question 3)(6 points). The goal is to determine granting a loan to an applicant.


Granting of loans to applicants is up to the following factors:
“Age" - applicant's age, “Occupation”- applicant occupation type; “Checking" - presence
of a checking account; "Savings" - presence of a savings account; "Home Ownership" -
does the applicant own a home. The following table depicts some records about credit
giving to applicant:

Age Occupation Checking Savings Home Granting


Ownership loan
decision
young professional Yes Yes Yes Y
old semi No Yes Yes Y
professional
young professional Yes No No N
very professional Yes Yes No Y
old
old semi No Yes No N
professional
very professional Yes No Yes Y
old
young semi No Yes No N
professional
old professional No No Yes N
old semi Yes No No N
professional
Use naïve Bayes method to decide whether or not to grant a loan to an applicant if the
factors are respectively:
a) old, semi professional, Yes, Yes, No?
b) young, professional, No, Yes, Yes?
c) very old, professional, No, No, Yes?

(Question 4).
a)(3 points). Suppose that 0.5% of people have a certain disease. The test for this disease
is not perfect, and while testing it is observed that 85% of people who really have a
disease are tested positive, and 6% of people who do not really have a disease are also
tested positive. Calculate the probability that a person who tests positive actually has a
disease.
b)(3 points). A student taking a multiple-choice test knows the answer 60% of the time;
otherwise, he/she guesses. If he/she knows the answer, he/she gives the correct response
with probability 1; if he/she guesses he/she gives the correct answer with probability 0.2.
Use Bayes rule to calculate the probability that a student really knows the answer to those
questions he/she answered correctly.
c)(3 points). Assume that 0.1% of the population suffers from that disease. It is also
known that if a person has the disease, the test has 99% of chance of turning out positive.
If the person doesn’t have the disease, the test has a 96% chance of turning negative.
Given that a test turned out positive, what are the chances of the person really having the
disease?
d)(3 points). Suppose a car driver can use any of three highways A, B, or C to arrive at a
destination point. The probabilities that a car driver arrives on time using the highways A,
B, and C are 60%, 55%, and 65%, respectively. If a car driver arrives on time and it is
assumed that a car driver is equally likely to choose any of these highways, calculate the
probability that a car driver chooses the highway B.

(Question 5).
a)(3 points). Below is a set of rules:

R1: IF B AND C
THEN A (CF= -0.6)
R2: IF D (CF= -0.8) OR E (CF= -0.5) AND F (CF= -0.9)
THEN B (CF= 0.5)
R3: IF G (CF= -0.2) OR H (CF= 0.3)
THEN C (CF= 0.7)

Find the final CF for the conclusion A.

b)(3 points). Consider two rules given below:

R1: IF person 1 says it will rain (CF = - 0.7)


THEN it will rain (CF = 0.6)
R2: IF person 2 says it will rain (CF= - 0.6)
THEN it will rain (CF= - 0.9)

Combine these rules to find the CF for the conclusion that it will rain.
(Question 6)(6 points). Suppose that a medical doctor needs your help constructing a
constraint net to find prescriptions for his/her flu patients. The following table shows the
symptoms exhibited by flu patients and the list of medications that can be prescribed for
each symptom.

Symptom Medications
Headache H1, H2, H3
Runny nose R1, R2, R3, R4
Fever F1, F2, F3, F4
Sore throat S1, S2, S3, S4

Drugs that must NOT be prescribed together

• {H3, R2}
• {R2, F4}
• {F2, S3}
• {F3, R4}

Drugs that must be prescribed together:

• {H1, S4}
• {S2, F3}
• {S4, R2}

Find appropriate prescriptions (if possible) for the patient if H2, R3, F2, S2, and S4 are
allergic for him/her.

You might also like