Question: Consider the following Prolog facts and rules: membr ( H , [ H | _ ] ) . membr ( H , [ _ |
Consider the following Prolog facts and rules:
membrHH
membrHT : membrH T
uniqueXHT : notXH uniqueX T
uniqueHHT : notmembrH T
Draw the Prolog tree corresponding to each of the following queries, explaining the effect of each
cut:
apt
membraaba
true ;
true ;
false.
bpt
uniqueabac
true ;
false.
cpt
uniqueaaba
false.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
