Description
For this homework, you are not allowed to use the built-in predicates from your
compiler/interpreter. Please create your own version of built-in predicates using a different name
such as mypredicate() or myfunction().
Question 1 (20 marks)
Discuss the limitations of expert systems in modeling human performance.
Question 2 (20 marks)
Determine if there is equivalence or not between (¬P → ¬Q) and (P ∨ ¬Q). Use truth tables to explain
your answer.
Question 3 (20 marks)
Consider the following pair of expressions:
lives_in(X, athabasca_town, works_in(X, athabasca_university))
lives_in(karen, Y, works_in(X, Z))
Try to unify this pair of expressions; then either show the most general unifier or explain why they will
not unify.
Question 4 (20 marks)
Write a program that computes the factorial of a given integer N.
For example: fact(0)=1, fact(1)=1, Fact(2)= 1*2=2, fact(3) = 1*2*3=6 etc.
Computer Science 456: Artificial Intelligence and Expert Systems
Question 5 (20 marks)
Write a program that reads an integer x and a list of integers L; then locate the list of all positions of x
into L, and return the resulting list.
For example, for x=2 and L=[1,2,3,4,2,5,2,6] the program should return the list R=[2,5,7].