Question: 1 - $$ No AI or copying, please. Also, there is no need for coding. I just want clear steps. The correct answer is: 'Cities

1- $$ No AI or copying, please. Also, there is no need for coding. I just want clear steps. The correct answer is: 'Cities reachable from Atlanta: Frankfurt, New York.) $$
1) Deductive Databases
Consider the following rules:
reachable(X,Y) :- flight(X,Y)
reachable(X,Z) :- flight(X,Y), reachable(Y,Z)
reachable(X,Y) means that city Y can be reached from city X.
flight(X,Y) means that there is a flight to city Y from city X.
Construct fact predicates that describe the following:
a) Los Angeles, New York, Chicago, Atlanta, Frankfurt, Paris, Singapore, Sydney are cities
b) The following flights exist: LA to NY, NY to Atlanta, Atlanta to Frankfurt, Frankfurt to Atlanta, Frankfurt to Singapore and Singapore to Sydney (note: no flight in reverse direction can be automatically assumed)
Consider the query:
reachable(Atlanta, Y)?
What will this query retrieve (in English terms)? Show the steps of rule execution that will retrieve the value(s) for Y to answer this query.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!