Deductive Database Based on Rule and Fact
Problem: Practice deductive database based on rules and facts to calculate the reachable Rules: reachable (X,Y) :- flight (X,Y) reachable (X,Z) :- flight (X,Y), reachable (Y,Z) Facts: flight(LA,NY) flight(NY,Atlanta) flight(Atlanta,Frankfurt) flight(Frankfurt,Atlanta) flight(Frankfurt,Singapore) flight(Singapore,Sydney) Appy rule 1 reachable (X,Y) :- flight (X,Y), we have: reachable (LA,NY) reachable (NY,Atlanta) reachable (Atlanta,Frankfurt) reachable (Frankfurt,Atlanta) reachable (Frankfurt,Singapore) reachable (Singapore,Sydney)…