Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question 1 (a) Which of the following pairs of expressions are unifiable? If any pair is unifiable give the resulting bindings for the variables. Otherwise
Question 1 (a) Which of the following pairs of expressions are unifiable? If any pair is unifiable give the resulting bindings for the variables. Otherwise give reasons why the pair cannot be unified. [[a, b, c]] and [ X Y ] . [A A ] and [ X , [ c, d, ell (A, A ] and [ XI [ c, d, ell A*B+C-2+X and U+X+Y-Z (b) Assume that a Prolog database contains the following facts. p(a) q(a,1) r(1,1). r(3,5) p(b). q(a,2). r(1,2). r(3,6). q(6,3). r(2,3) r(4,7) q(6,4) r(2,4). r(4,8) What are the effects of the following queries? 1. ?- P(X),q(X,Y),',r(Y,Z). 2 - p(x), once (q(X,Y)),r(Y,Z) 3. ?- P(X),,q(X,Y). Question 1 (a) Which of the following pairs of expressions are unifiable? If any pair is unifiable give the resulting bindings for the variables. Otherwise give reasons why the pair cannot be unified. [[a, b, c]] and [ X Y ] . [A A ] and [ X , [ c, d, ell (A, A ] and [ XI [ c, d, ell A*B+C-2+X and U+X+Y-Z (b) Assume that a Prolog database contains the following facts. p(a) q(a,1) r(1,1). r(3,5) p(b). q(a,2). r(1,2). r(3,6). q(6,3). r(2,3) r(4,7) q(6,4) r(2,4). r(4,8) What are the effects of the following queries? 1. ?- P(X),q(X,Y),',r(Y,Z). 2 - p(x), once (q(X,Y)),r(Y,Z) 3. ?- P(X),,q(X,Y)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started