Question: explain pls (a) What responses would you expect from the following Prolog queries? (a) ?- max=10. (b) ?Min=0. (c) ?- [XL]=[1,2]. (d) ?- U is
(a) What responses would you expect from the following Prolog queries? (a) ?- max=10. (b) ?Min=0. (c) ?- [XL]=[1,2]. (d) ?- U is V+1. (e) ?f(g(h(a)),f(X))=f(g(X),Y). [5 marks] (b) Proof search: Explain which proof search strategy Prolog has, give its advantages and describe how it works by using the following example. rich(elon). knows (helen, tom). knows (tom, elon). knows(X,Y) :- knous(X,Z), knous (Z,Y). lucky (X):knows(X,Y), rich (Y) lucky (X) :- rich(X). Draw a proof tree for 1ucky (helen) and indicate which paths fail, which paths yield solutions, and whether there is an infinite path
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
