Question: I need answer for question 10 please Start this Prolog assignment by entering the following five facts and two in-rules into your Prolog engine: inFact(bangor,penobscotCounty).
I need answer for question 10 please
Start this Prolog assignment by entering the following five facts and two in-rules into your Prolog engine:
inFact(bangor,penobscotCounty). inFact(portland,cumberlandCounty). inFact(penobscotCounty,maine). inFact(cumberlandCounty,maine). inFact(maine,newEngland). contains(A,B) :- inFact(B,A). contains(A, B) :- inFact(C,A),contains(C,B).
6. Use your in rule to determine all items that are in orono. Briefly explain the query result.
7. Write a query to determine in what items is orono.
10. In the contains rule (lines 6 and 7 in the facts and rules listed before question 1),
what would happen if you replaced the second predicate contains(A,B) :- inFact(C,A),contains(C,B). with contains(A,B) :- contains(C,B), inFact(C,A).
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
